index.mjs 3.4 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356
  1. import { createRequire as topLevelCreateRequire } from 'module';
  2. const require = topLevelCreateRequire(import.meta.url);
  3. var __create = Object.create;
  4. var __defProp = Object.defineProperty;
  5. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  6. var __getOwnPropNames = Object.getOwnPropertyNames;
  7. var __getProtoOf = Object.getPrototypeOf;
  8. var __hasOwnProp = Object.prototype.hasOwnProperty;
  9. var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
  10. get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
  11. }) : x)(function(x) {
  12. if (typeof require !== "undefined")
  13. return require.apply(this, arguments);
  14. throw new Error('Dynamic require of "' + x + '" is not supported');
  15. });
  16. var __esm = (fn, res) => function __init() {
  17. return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
  18. };
  19. var __commonJS = (cb, mod) => function __require2() {
  20. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  21. };
  22. var __export = (target, all4) => {
  23. for (var name2 in all4)
  24. __defProp(target, name2, { get: all4[name2], enumerable: true });
  25. };
  26. var __copyProps = (to, from, except, desc) => {
  27. if (from && typeof from === "object" || typeof from === "function") {
  28. for (let key2 of __getOwnPropNames(from))
  29. if (!__hasOwnProp.call(to, key2) && key2 !== except)
  30. __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
  31. }
  32. return to;
  33. };
  34. var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  35. // If the importer is in node compatibility mode or this is not an ESM
  36. // file that has been converted to a CommonJS file using a Babel-
  37. // compatible transform (i.e. "__esModule" has not been set), then set
  38. // "default" to the CommonJS "module.exports" for node compatibility.
  39. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  40. mod
  41. ));
  42. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  43. // node_modules/is-buffer/index.js
  44. var require_is_buffer = __commonJS({
  45. "node_modules/is-buffer/index.js"(exports, module) {
  46. module.exports = function isBuffer2(obj) {
  47. return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
  48. };
  49. }
  50. });
  51. // node_modules/extend/index.js
  52. var require_extend = __commonJS({
  53. "node_modules/extend/index.js"(exports, module) {
  54. "use strict";
  55. var hasOwn2 = Object.prototype.hasOwnProperty;
  56. var toStr = Object.prototype.toString;
  57. var defineProperty = Object.defineProperty;
  58. var gOPD = Object.getOwnPropertyDescriptor;
  59. var isArray3 = function isArray4(arr) {
  60. if (typeof Array.isArray === "function") {
  61. return Array.isArray(arr);
  62. }
  63. return toStr.call(arr) === "[object Array]";
  64. };
  65. var isPlainObject2 = function isPlainObject3(obj) {
  66. if (!obj || toStr.call(obj) !== "[object Object]") {
  67. return false;
  68. }
  69. var hasOwnConstructor = hasOwn2.call(obj, "constructor");
  70. var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn2.call(obj.constructor.prototype, "isPrototypeOf");
  71. if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
  72. return false;
  73. }
  74. var key2;
  75. for (key2 in obj) {
  76. }
  77. return typeof key2 === "undefined" || hasOwn2.call(obj, key2);
  78. };
  79. var setProperty = function setProperty2(target, options) {
  80. if (defineProperty && options.name === "__proto__") {
  81. defineProperty(target, options.name, {
  82. enumerable: true,
  83. configurable: true,
  84. value: options.newValue,
  85. writable: true
  86. });
  87. } else {
  88. target[options.name] = options.newValue;
  89. }
  90. };
  91. var getProperty = function getProperty2(obj, name2) {
  92. if (name2 === "__proto__") {
  93. if (!hasOwn2.call(obj, name2)) {
  94. return void 0;
  95. } else if (gOPD) {
  96. return gOPD(obj, name2).value;
  97. }
  98. }
  99. return obj[name2];
  100. };
  101. module.exports = function extend4() {
  102. var options, name2, src, copy, copyIsArray, clone;
  103. var target = arguments[0];
  104. var i = 1;
  105. var length = arguments.length;
  106. var deep = false;
  107. if (typeof target === "boolean") {
  108. deep = target;
  109. target = arguments[1] || {};
  110. i = 2;
  111. }
  112. if (target == null || typeof target !== "object" && typeof target !== "function") {
  113. target = {};
  114. }
  115. for (; i < length; ++i) {
  116. options = arguments[i];
  117. if (options != null) {
  118. for (name2 in options) {
  119. src = getProperty(target, name2);
  120. copy = getProperty(options, name2);
  121. if (target !== copy) {
  122. if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray3(copy)))) {
  123. if (copyIsArray) {
  124. copyIsArray = false;
  125. clone = src && isArray3(src) ? src : [];
  126. } else {
  127. clone = src && isPlainObject2(src) ? src : {};
  128. }
  129. setProperty(target, { name: name2, newValue: extend4(deep, clone, copy) });
  130. } else if (typeof copy !== "undefined") {
  131. setProperty(target, { name: name2, newValue: copy });
  132. }
  133. }
  134. }
  135. }
  136. }
  137. return target;
  138. };
  139. }
  140. });
  141. // node_modules/acorn-jsx/xhtml.js
  142. var require_xhtml = __commonJS({
  143. "node_modules/acorn-jsx/xhtml.js"(exports, module) {
  144. module.exports = {
  145. quot: '"',
  146. amp: "&",
  147. apos: "'",
  148. lt: "<",
  149. gt: ">",
  150. nbsp: "\xA0",
  151. iexcl: "\xA1",
  152. cent: "\xA2",
  153. pound: "\xA3",
  154. curren: "\xA4",
  155. yen: "\xA5",
  156. brvbar: "\xA6",
  157. sect: "\xA7",
  158. uml: "\xA8",
  159. copy: "\xA9",
  160. ordf: "\xAA",
  161. laquo: "\xAB",
  162. not: "\xAC",
  163. shy: "\xAD",
  164. reg: "\xAE",
  165. macr: "\xAF",
  166. deg: "\xB0",
  167. plusmn: "\xB1",
  168. sup2: "\xB2",
  169. sup3: "\xB3",
  170. acute: "\xB4",
  171. micro: "\xB5",
  172. para: "\xB6",
  173. middot: "\xB7",
  174. cedil: "\xB8",
  175. sup1: "\xB9",
  176. ordm: "\xBA",
  177. raquo: "\xBB",
  178. frac14: "\xBC",
  179. frac12: "\xBD",
  180. frac34: "\xBE",
  181. iquest: "\xBF",
  182. Agrave: "\xC0",
  183. Aacute: "\xC1",
  184. Acirc: "\xC2",
  185. Atilde: "\xC3",
  186. Auml: "\xC4",
  187. Aring: "\xC5",
  188. AElig: "\xC6",
  189. Ccedil: "\xC7",
  190. Egrave: "\xC8",
  191. Eacute: "\xC9",
  192. Ecirc: "\xCA",
  193. Euml: "\xCB",
  194. Igrave: "\xCC",
  195. Iacute: "\xCD",
  196. Icirc: "\xCE",
  197. Iuml: "\xCF",
  198. ETH: "\xD0",
  199. Ntilde: "\xD1",
  200. Ograve: "\xD2",
  201. Oacute: "\xD3",
  202. Ocirc: "\xD4",
  203. Otilde: "\xD5",
  204. Ouml: "\xD6",
  205. times: "\xD7",
  206. Oslash: "\xD8",
  207. Ugrave: "\xD9",
  208. Uacute: "\xDA",
  209. Ucirc: "\xDB",
  210. Uuml: "\xDC",
  211. Yacute: "\xDD",
  212. THORN: "\xDE",
  213. szlig: "\xDF",
  214. agrave: "\xE0",
  215. aacute: "\xE1",
  216. acirc: "\xE2",
  217. atilde: "\xE3",
  218. auml: "\xE4",
  219. aring: "\xE5",
  220. aelig: "\xE6",
  221. ccedil: "\xE7",
  222. egrave: "\xE8",
  223. eacute: "\xE9",
  224. ecirc: "\xEA",
  225. euml: "\xEB",
  226. igrave: "\xEC",
  227. iacute: "\xED",
  228. icirc: "\xEE",
  229. iuml: "\xEF",
  230. eth: "\xF0",
  231. ntilde: "\xF1",
  232. ograve: "\xF2",
  233. oacute: "\xF3",
  234. ocirc: "\xF4",
  235. otilde: "\xF5",
  236. ouml: "\xF6",
  237. divide: "\xF7",
  238. oslash: "\xF8",
  239. ugrave: "\xF9",
  240. uacute: "\xFA",
  241. ucirc: "\xFB",
  242. uuml: "\xFC",
  243. yacute: "\xFD",
  244. thorn: "\xFE",
  245. yuml: "\xFF",
  246. OElig: "\u0152",
  247. oelig: "\u0153",
  248. Scaron: "\u0160",
  249. scaron: "\u0161",
  250. Yuml: "\u0178",
  251. fnof: "\u0192",
  252. circ: "\u02C6",
  253. tilde: "\u02DC",
  254. Alpha: "\u0391",
  255. Beta: "\u0392",
  256. Gamma: "\u0393",
  257. Delta: "\u0394",
  258. Epsilon: "\u0395",
  259. Zeta: "\u0396",
  260. Eta: "\u0397",
  261. Theta: "\u0398",
  262. Iota: "\u0399",
  263. Kappa: "\u039A",
  264. Lambda: "\u039B",
  265. Mu: "\u039C",
  266. Nu: "\u039D",
  267. Xi: "\u039E",
  268. Omicron: "\u039F",
  269. Pi: "\u03A0",
  270. Rho: "\u03A1",
  271. Sigma: "\u03A3",
  272. Tau: "\u03A4",
  273. Upsilon: "\u03A5",
  274. Phi: "\u03A6",
  275. Chi: "\u03A7",
  276. Psi: "\u03A8",
  277. Omega: "\u03A9",
  278. alpha: "\u03B1",
  279. beta: "\u03B2",
  280. gamma: "\u03B3",
  281. delta: "\u03B4",
  282. epsilon: "\u03B5",
  283. zeta: "\u03B6",
  284. eta: "\u03B7",
  285. theta: "\u03B8",
  286. iota: "\u03B9",
  287. kappa: "\u03BA",
  288. lambda: "\u03BB",
  289. mu: "\u03BC",
  290. nu: "\u03BD",
  291. xi: "\u03BE",
  292. omicron: "\u03BF",
  293. pi: "\u03C0",
  294. rho: "\u03C1",
  295. sigmaf: "\u03C2",
  296. sigma: "\u03C3",
  297. tau: "\u03C4",
  298. upsilon: "\u03C5",
  299. phi: "\u03C6",
  300. chi: "\u03C7",
  301. psi: "\u03C8",
  302. omega: "\u03C9",
  303. thetasym: "\u03D1",
  304. upsih: "\u03D2",
  305. piv: "\u03D6",
  306. ensp: "\u2002",
  307. emsp: "\u2003",
  308. thinsp: "\u2009",
  309. zwnj: "\u200C",
  310. zwj: "\u200D",
  311. lrm: "\u200E",
  312. rlm: "\u200F",
  313. ndash: "\u2013",
  314. mdash: "\u2014",
  315. lsquo: "\u2018",
  316. rsquo: "\u2019",
  317. sbquo: "\u201A",
  318. ldquo: "\u201C",
  319. rdquo: "\u201D",
  320. bdquo: "\u201E",
  321. dagger: "\u2020",
  322. Dagger: "\u2021",
  323. bull: "\u2022",
  324. hellip: "\u2026",
  325. permil: "\u2030",
  326. prime: "\u2032",
  327. Prime: "\u2033",
  328. lsaquo: "\u2039",
  329. rsaquo: "\u203A",
  330. oline: "\u203E",
  331. frasl: "\u2044",
  332. euro: "\u20AC",
  333. image: "\u2111",
  334. weierp: "\u2118",
  335. real: "\u211C",
  336. trade: "\u2122",
  337. alefsym: "\u2135",
  338. larr: "\u2190",
  339. uarr: "\u2191",
  340. rarr: "\u2192",
  341. darr: "\u2193",
  342. harr: "\u2194",
  343. crarr: "\u21B5",
  344. lArr: "\u21D0",
  345. uArr: "\u21D1",
  346. rArr: "\u21D2",
  347. dArr: "\u21D3",
  348. hArr: "\u21D4",
  349. forall: "\u2200",
  350. part: "\u2202",
  351. exist: "\u2203",
  352. empty: "\u2205",
  353. nabla: "\u2207",
  354. isin: "\u2208",
  355. notin: "\u2209",
  356. ni: "\u220B",
  357. prod: "\u220F",
  358. sum: "\u2211",
  359. minus: "\u2212",
  360. lowast: "\u2217",
  361. radic: "\u221A",
  362. prop: "\u221D",
  363. infin: "\u221E",
  364. ang: "\u2220",
  365. and: "\u2227",
  366. or: "\u2228",
  367. cap: "\u2229",
  368. cup: "\u222A",
  369. "int": "\u222B",
  370. there4: "\u2234",
  371. sim: "\u223C",
  372. cong: "\u2245",
  373. asymp: "\u2248",
  374. ne: "\u2260",
  375. equiv: "\u2261",
  376. le: "\u2264",
  377. ge: "\u2265",
  378. sub: "\u2282",
  379. sup: "\u2283",
  380. nsub: "\u2284",
  381. sube: "\u2286",
  382. supe: "\u2287",
  383. oplus: "\u2295",
  384. otimes: "\u2297",
  385. perp: "\u22A5",
  386. sdot: "\u22C5",
  387. lceil: "\u2308",
  388. rceil: "\u2309",
  389. lfloor: "\u230A",
  390. rfloor: "\u230B",
  391. lang: "\u2329",
  392. rang: "\u232A",
  393. loz: "\u25CA",
  394. spades: "\u2660",
  395. clubs: "\u2663",
  396. hearts: "\u2665",
  397. diams: "\u2666"
  398. };
  399. }
  400. });
  401. // node_modules/acorn-jsx/node_modules/acorn/dist/acorn.mjs
  402. var acorn_exports = {};
  403. __export(acorn_exports, {
  404. Node: () => Node3,
  405. Parser: () => Parser3,
  406. Position: () => Position3,
  407. SourceLocation: () => SourceLocation3,
  408. TokContext: () => TokContext3,
  409. Token: () => Token3,
  410. TokenType: () => TokenType3,
  411. defaultOptions: () => defaultOptions2,
  412. getLineInfo: () => getLineInfo2,
  413. isIdentifierChar: () => isIdentifierChar2,
  414. isIdentifierStart: () => isIdentifierStart2,
  415. isNewLine: () => isNewLine2,
  416. keywordTypes: () => keywords$12,
  417. lineBreak: () => lineBreak2,
  418. lineBreakG: () => lineBreakG2,
  419. nonASCIIwhitespace: () => nonASCIIwhitespace2,
  420. parse: () => parse5,
  421. parseExpressionAt: () => parseExpressionAt3,
  422. tokContexts: () => types$12,
  423. tokTypes: () => types2,
  424. tokenizer: () => tokenizer3,
  425. version: () => version2
  426. });
  427. function isInAstralSet2(code2, set) {
  428. var pos2 = 65536;
  429. for (var i = 0; i < set.length; i += 2) {
  430. pos2 += set[i];
  431. if (pos2 > code2) {
  432. return false;
  433. }
  434. pos2 += set[i + 1];
  435. if (pos2 >= code2) {
  436. return true;
  437. }
  438. }
  439. }
  440. function isIdentifierStart2(code2, astral) {
  441. if (code2 < 65) {
  442. return code2 === 36;
  443. }
  444. if (code2 < 91) {
  445. return true;
  446. }
  447. if (code2 < 97) {
  448. return code2 === 95;
  449. }
  450. if (code2 < 123) {
  451. return true;
  452. }
  453. if (code2 <= 65535) {
  454. return code2 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code2));
  455. }
  456. if (astral === false) {
  457. return false;
  458. }
  459. return isInAstralSet2(code2, astralIdentifierStartCodes2);
  460. }
  461. function isIdentifierChar2(code2, astral) {
  462. if (code2 < 48) {
  463. return code2 === 36;
  464. }
  465. if (code2 < 58) {
  466. return true;
  467. }
  468. if (code2 < 65) {
  469. return false;
  470. }
  471. if (code2 < 91) {
  472. return true;
  473. }
  474. if (code2 < 97) {
  475. return code2 === 95;
  476. }
  477. if (code2 < 123) {
  478. return true;
  479. }
  480. if (code2 <= 65535) {
  481. return code2 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code2));
  482. }
  483. if (astral === false) {
  484. return false;
  485. }
  486. return isInAstralSet2(code2, astralIdentifierStartCodes2) || isInAstralSet2(code2, astralIdentifierCodes2);
  487. }
  488. function binop2(name2, prec) {
  489. return new TokenType3(name2, { beforeExpr: true, binop: prec });
  490. }
  491. function kw2(name2, options) {
  492. if (options === void 0)
  493. options = {};
  494. options.keyword = name2;
  495. return keywords$12[name2] = new TokenType3(name2, options);
  496. }
  497. function isNewLine2(code2, ecma2019String) {
  498. return code2 === 10 || code2 === 13 || !ecma2019String && (code2 === 8232 || code2 === 8233);
  499. }
  500. function has(obj, propName) {
  501. return hasOwnProperty2.call(obj, propName);
  502. }
  503. function wordsRegexp2(words) {
  504. return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
  505. }
  506. function getLineInfo2(input, offset3) {
  507. for (var line2 = 1, cur = 0; ; ) {
  508. lineBreakG2.lastIndex = cur;
  509. var match = lineBreakG2.exec(input);
  510. if (match && match.index < offset3) {
  511. ++line2;
  512. cur = match.index + match[0].length;
  513. } else {
  514. return new Position3(line2, offset3 - cur);
  515. }
  516. }
  517. }
  518. function getOptions2(opts) {
  519. var options = {};
  520. for (var opt in defaultOptions2) {
  521. options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions2[opt];
  522. }
  523. if (options.ecmaVersion >= 2015) {
  524. options.ecmaVersion -= 2009;
  525. }
  526. if (options.allowReserved == null) {
  527. options.allowReserved = options.ecmaVersion < 5;
  528. }
  529. if (isArray2(options.onToken)) {
  530. var tokens = options.onToken;
  531. options.onToken = function(token2) {
  532. return tokens.push(token2);
  533. };
  534. }
  535. if (isArray2(options.onComment)) {
  536. options.onComment = pushComment2(options, options.onComment);
  537. }
  538. return options;
  539. }
  540. function pushComment2(options, array) {
  541. return function(block, text5, start3, end, startLoc, endLoc) {
  542. var comment2 = {
  543. type: block ? "Block" : "Line",
  544. value: text5,
  545. start: start3,
  546. end
  547. };
  548. if (options.locations) {
  549. comment2.loc = new SourceLocation3(this, startLoc, endLoc);
  550. }
  551. if (options.ranges) {
  552. comment2.range = [start3, end];
  553. }
  554. array.push(comment2);
  555. };
  556. }
  557. function functionFlags2(async, generator) {
  558. return SCOPE_FUNCTION2 | (async ? SCOPE_ASYNC2 : 0) | (generator ? SCOPE_GENERATOR2 : 0);
  559. }
  560. function DestructuringErrors3() {
  561. this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
  562. }
  563. function finishNodeAt2(node2, type, pos2, loc) {
  564. node2.type = type;
  565. node2.end = pos2;
  566. if (this.options.locations) {
  567. node2.loc.end = loc;
  568. }
  569. if (this.options.ranges) {
  570. node2.range[1] = pos2;
  571. }
  572. return node2;
  573. }
  574. function buildUnicodeData2(ecmaVersion) {
  575. var d = data2[ecmaVersion] = {
  576. binary: wordsRegexp2(unicodeBinaryProperties2[ecmaVersion] + " " + unicodeGeneralCategoryValues2),
  577. nonBinary: {
  578. General_Category: wordsRegexp2(unicodeGeneralCategoryValues2),
  579. Script: wordsRegexp2(unicodeScriptValues2[ecmaVersion])
  580. }
  581. };
  582. d.nonBinary.Script_Extensions = d.nonBinary.Script;
  583. d.nonBinary.gc = d.nonBinary.General_Category;
  584. d.nonBinary.sc = d.nonBinary.Script;
  585. d.nonBinary.scx = d.nonBinary.Script_Extensions;
  586. }
  587. function codePointToString2(ch) {
  588. if (ch <= 65535) {
  589. return String.fromCharCode(ch);
  590. }
  591. ch -= 65536;
  592. return String.fromCharCode((ch >> 10) + 55296, (ch & 1023) + 56320);
  593. }
  594. function isSyntaxCharacter2(ch) {
  595. return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
  596. }
  597. function isRegExpIdentifierStart2(ch) {
  598. return isIdentifierStart2(ch, true) || ch === 36 || ch === 95;
  599. }
  600. function isRegExpIdentifierPart2(ch) {
  601. return isIdentifierChar2(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
  602. }
  603. function isControlLetter2(ch) {
  604. return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
  605. }
  606. function isValidUnicode2(ch) {
  607. return ch >= 0 && ch <= 1114111;
  608. }
  609. function isCharacterClassEscape2(ch) {
  610. return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
  611. }
  612. function isUnicodePropertyNameCharacter2(ch) {
  613. return isControlLetter2(ch) || ch === 95;
  614. }
  615. function isUnicodePropertyValueCharacter2(ch) {
  616. return isUnicodePropertyNameCharacter2(ch) || isDecimalDigit2(ch);
  617. }
  618. function isDecimalDigit2(ch) {
  619. return ch >= 48 && ch <= 57;
  620. }
  621. function isHexDigit2(ch) {
  622. return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
  623. }
  624. function hexToInt2(ch) {
  625. if (ch >= 65 && ch <= 70) {
  626. return 10 + (ch - 65);
  627. }
  628. if (ch >= 97 && ch <= 102) {
  629. return 10 + (ch - 97);
  630. }
  631. return ch - 48;
  632. }
  633. function isOctalDigit2(ch) {
  634. return ch >= 48 && ch <= 55;
  635. }
  636. function stringToNumber2(str, isLegacyOctalNumericLiteral) {
  637. if (isLegacyOctalNumericLiteral) {
  638. return parseInt(str, 8);
  639. }
  640. return parseFloat(str.replace(/_/g, ""));
  641. }
  642. function stringToBigInt2(str) {
  643. if (typeof BigInt !== "function") {
  644. return null;
  645. }
  646. return BigInt(str.replace(/_/g, ""));
  647. }
  648. function codePointToString$1(code2) {
  649. if (code2 <= 65535) {
  650. return String.fromCharCode(code2);
  651. }
  652. code2 -= 65536;
  653. return String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320);
  654. }
  655. function parse5(input, options) {
  656. return Parser3.parse(input, options);
  657. }
  658. function parseExpressionAt3(input, pos2, options) {
  659. return Parser3.parseExpressionAt(input, pos2, options);
  660. }
  661. function tokenizer3(input, options) {
  662. return Parser3.tokenizer(input, options);
  663. }
  664. var reservedWords2, ecma5AndLessKeywords2, keywords2, keywordRelationalOperator2, nonASCIIidentifierStartChars2, nonASCIIidentifierChars2, nonASCIIidentifierStart2, nonASCIIidentifier2, astralIdentifierStartCodes2, astralIdentifierCodes2, TokenType3, beforeExpr2, startsExpr2, keywords$12, types2, lineBreak2, lineBreakG2, nonASCIIwhitespace2, skipWhiteSpace2, ref2, hasOwnProperty2, toString2, isArray2, Position3, SourceLocation3, defaultOptions2, SCOPE_TOP2, SCOPE_FUNCTION2, SCOPE_VAR2, SCOPE_ASYNC2, SCOPE_GENERATOR2, SCOPE_ARROW2, SCOPE_SIMPLE_CATCH2, SCOPE_SUPER2, SCOPE_DIRECT_SUPER2, BIND_NONE2, BIND_VAR2, BIND_LEXICAL2, BIND_FUNCTION2, BIND_SIMPLE_CATCH2, BIND_OUTSIDE2, Parser3, prototypeAccessors2, pp2, literal2, pp$12, loopLabel2, switchLabel2, empty2, FUNC_STATEMENT2, FUNC_HANGING_STATEMENT2, FUNC_NULLABLE_ID2, pp$22, pp$32, empty$12, pp$42, pp$52, Scope3, Node3, pp$62, TokContext3, types$12, pp$72, ecma9BinaryProperties2, ecma10BinaryProperties2, ecma11BinaryProperties2, unicodeBinaryProperties2, unicodeGeneralCategoryValues2, ecma9ScriptValues2, ecma10ScriptValues2, ecma11ScriptValues2, unicodeScriptValues2, data2, pp$82, RegExpValidationState3, Token3, pp$92, INVALID_TEMPLATE_ESCAPE_ERROR2, version2;
  665. var init_acorn = __esm({
  666. "node_modules/acorn-jsx/node_modules/acorn/dist/acorn.mjs"() {
  667. reservedWords2 = {
  668. 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
  669. 5: "class enum extends super const export import",
  670. 6: "enum",
  671. strict: "implements interface let package private protected public static yield",
  672. strictBind: "eval arguments"
  673. };
  674. ecma5AndLessKeywords2 = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
  675. keywords2 = {
  676. 5: ecma5AndLessKeywords2,
  677. "5module": ecma5AndLessKeywords2 + " export import",
  678. 6: ecma5AndLessKeywords2 + " const class extends export import super"
  679. };
  680. keywordRelationalOperator2 = /^in(stanceof)?$/;
  681. nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  682. nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  683. nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
  684. nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
  685. nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
  686. astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  687. astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  688. TokenType3 = function TokenType4(label, conf) {
  689. if (conf === void 0)
  690. conf = {};
  691. this.label = label;
  692. this.keyword = conf.keyword;
  693. this.beforeExpr = !!conf.beforeExpr;
  694. this.startsExpr = !!conf.startsExpr;
  695. this.isLoop = !!conf.isLoop;
  696. this.isAssign = !!conf.isAssign;
  697. this.prefix = !!conf.prefix;
  698. this.postfix = !!conf.postfix;
  699. this.binop = conf.binop || null;
  700. this.updateContext = null;
  701. };
  702. beforeExpr2 = { beforeExpr: true };
  703. startsExpr2 = { startsExpr: true };
  704. keywords$12 = {};
  705. types2 = {
  706. num: new TokenType3("num", startsExpr2),
  707. regexp: new TokenType3("regexp", startsExpr2),
  708. string: new TokenType3("string", startsExpr2),
  709. name: new TokenType3("name", startsExpr2),
  710. eof: new TokenType3("eof"),
  711. // Punctuation token types.
  712. bracketL: new TokenType3("[", { beforeExpr: true, startsExpr: true }),
  713. bracketR: new TokenType3("]"),
  714. braceL: new TokenType3("{", { beforeExpr: true, startsExpr: true }),
  715. braceR: new TokenType3("}"),
  716. parenL: new TokenType3("(", { beforeExpr: true, startsExpr: true }),
  717. parenR: new TokenType3(")"),
  718. comma: new TokenType3(",", beforeExpr2),
  719. semi: new TokenType3(";", beforeExpr2),
  720. colon: new TokenType3(":", beforeExpr2),
  721. dot: new TokenType3("."),
  722. question: new TokenType3("?", beforeExpr2),
  723. questionDot: new TokenType3("?."),
  724. arrow: new TokenType3("=>", beforeExpr2),
  725. template: new TokenType3("template"),
  726. invalidTemplate: new TokenType3("invalidTemplate"),
  727. ellipsis: new TokenType3("...", beforeExpr2),
  728. backQuote: new TokenType3("`", startsExpr2),
  729. dollarBraceL: new TokenType3("${", { beforeExpr: true, startsExpr: true }),
  730. // Operators. These carry several kinds of properties to help the
  731. // parser use them properly (the presence of these properties is
  732. // what categorizes them as operators).
  733. //
  734. // `binop`, when present, specifies that this operator is a binary
  735. // operator, and will refer to its precedence.
  736. //
  737. // `prefix` and `postfix` mark the operator as a prefix or postfix
  738. // unary operator.
  739. //
  740. // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
  741. // binary operators with a very low precedence, that should result
  742. // in AssignmentExpression nodes.
  743. eq: new TokenType3("=", { beforeExpr: true, isAssign: true }),
  744. assign: new TokenType3("_=", { beforeExpr: true, isAssign: true }),
  745. incDec: new TokenType3("++/--", { prefix: true, postfix: true, startsExpr: true }),
  746. prefix: new TokenType3("!/~", { beforeExpr: true, prefix: true, startsExpr: true }),
  747. logicalOR: binop2("||", 1),
  748. logicalAND: binop2("&&", 2),
  749. bitwiseOR: binop2("|", 3),
  750. bitwiseXOR: binop2("^", 4),
  751. bitwiseAND: binop2("&", 5),
  752. equality: binop2("==/!=/===/!==", 6),
  753. relational: binop2("</>/<=/>=", 7),
  754. bitShift: binop2("<</>>/>>>", 8),
  755. plusMin: new TokenType3("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
  756. modulo: binop2("%", 10),
  757. star: binop2("*", 10),
  758. slash: binop2("/", 10),
  759. starstar: new TokenType3("**", { beforeExpr: true }),
  760. coalesce: binop2("??", 1),
  761. // Keyword token types.
  762. _break: kw2("break"),
  763. _case: kw2("case", beforeExpr2),
  764. _catch: kw2("catch"),
  765. _continue: kw2("continue"),
  766. _debugger: kw2("debugger"),
  767. _default: kw2("default", beforeExpr2),
  768. _do: kw2("do", { isLoop: true, beforeExpr: true }),
  769. _else: kw2("else", beforeExpr2),
  770. _finally: kw2("finally"),
  771. _for: kw2("for", { isLoop: true }),
  772. _function: kw2("function", startsExpr2),
  773. _if: kw2("if"),
  774. _return: kw2("return", beforeExpr2),
  775. _switch: kw2("switch"),
  776. _throw: kw2("throw", beforeExpr2),
  777. _try: kw2("try"),
  778. _var: kw2("var"),
  779. _const: kw2("const"),
  780. _while: kw2("while", { isLoop: true }),
  781. _with: kw2("with"),
  782. _new: kw2("new", { beforeExpr: true, startsExpr: true }),
  783. _this: kw2("this", startsExpr2),
  784. _super: kw2("super", startsExpr2),
  785. _class: kw2("class", startsExpr2),
  786. _extends: kw2("extends", beforeExpr2),
  787. _export: kw2("export"),
  788. _import: kw2("import", startsExpr2),
  789. _null: kw2("null", startsExpr2),
  790. _true: kw2("true", startsExpr2),
  791. _false: kw2("false", startsExpr2),
  792. _in: kw2("in", { beforeExpr: true, binop: 7 }),
  793. _instanceof: kw2("instanceof", { beforeExpr: true, binop: 7 }),
  794. _typeof: kw2("typeof", { beforeExpr: true, prefix: true, startsExpr: true }),
  795. _void: kw2("void", { beforeExpr: true, prefix: true, startsExpr: true }),
  796. _delete: kw2("delete", { beforeExpr: true, prefix: true, startsExpr: true })
  797. };
  798. lineBreak2 = /\r\n?|\n|\u2028|\u2029/;
  799. lineBreakG2 = new RegExp(lineBreak2.source, "g");
  800. nonASCIIwhitespace2 = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
  801. skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  802. ref2 = Object.prototype;
  803. hasOwnProperty2 = ref2.hasOwnProperty;
  804. toString2 = ref2.toString;
  805. isArray2 = Array.isArray || function(obj) {
  806. return toString2.call(obj) === "[object Array]";
  807. };
  808. Position3 = function Position4(line2, col) {
  809. this.line = line2;
  810. this.column = col;
  811. };
  812. Position3.prototype.offset = function offset2(n) {
  813. return new Position3(this.line, this.column + n);
  814. };
  815. SourceLocation3 = function SourceLocation4(p, start3, end) {
  816. this.start = start3;
  817. this.end = end;
  818. if (p.sourceFile !== null) {
  819. this.source = p.sourceFile;
  820. }
  821. };
  822. defaultOptions2 = {
  823. // `ecmaVersion` indicates the ECMAScript version to parse. Must be
  824. // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10
  825. // (2019). This influences support for strict mode, the set of
  826. // reserved words, and support for new syntax features. The default
  827. // is 10.
  828. ecmaVersion: 10,
  829. // `sourceType` indicates the mode the code should be parsed in.
  830. // Can be either `"script"` or `"module"`. This influences global
  831. // strict mode and parsing of `import` and `export` declarations.
  832. sourceType: "script",
  833. // `onInsertedSemicolon` can be a callback that will be called
  834. // when a semicolon is automatically inserted. It will be passed
  835. // the position of the comma as an offset, and if `locations` is
  836. // enabled, it is given the location as a `{line, column}` object
  837. // as second argument.
  838. onInsertedSemicolon: null,
  839. // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
  840. // trailing commas.
  841. onTrailingComma: null,
  842. // By default, reserved words are only enforced if ecmaVersion >= 5.
  843. // Set `allowReserved` to a boolean value to explicitly turn this on
  844. // an off. When this option has the value "never", reserved words
  845. // and keywords can also not be used as property names.
  846. allowReserved: null,
  847. // When enabled, a return at the top level is not considered an
  848. // error.
  849. allowReturnOutsideFunction: false,
  850. // When enabled, import/export statements are not constrained to
  851. // appearing at the top of the program.
  852. allowImportExportEverywhere: false,
  853. // When enabled, await identifiers are allowed to appear at the top-level scope,
  854. // but they are still not allowed in non-async functions.
  855. allowAwaitOutsideFunction: false,
  856. // When enabled, hashbang directive in the beginning of file
  857. // is allowed and treated as a line comment.
  858. allowHashBang: false,
  859. // When `locations` is on, `loc` properties holding objects with
  860. // `start` and `end` properties in `{line, column}` form (with
  861. // line being 1-based and column 0-based) will be attached to the
  862. // nodes.
  863. locations: false,
  864. // A function can be passed as `onToken` option, which will
  865. // cause Acorn to call that function with object in the same
  866. // format as tokens returned from `tokenizer().getToken()`. Note
  867. // that you are not allowed to call the parser from the
  868. // callback—that will corrupt its internal state.
  869. onToken: null,
  870. // A function can be passed as `onComment` option, which will
  871. // cause Acorn to call that function with `(block, text, start,
  872. // end)` parameters whenever a comment is skipped. `block` is a
  873. // boolean indicating whether this is a block (`/* */`) comment,
  874. // `text` is the content of the comment, and `start` and `end` are
  875. // character offsets that denote the start and end of the comment.
  876. // When the `locations` option is on, two more parameters are
  877. // passed, the full `{line, column}` locations of the start and
  878. // end of the comments. Note that you are not allowed to call the
  879. // parser from the callback—that will corrupt its internal state.
  880. onComment: null,
  881. // Nodes have their start and end characters offsets recorded in
  882. // `start` and `end` properties (directly on the node, rather than
  883. // the `loc` object, which holds line/column data. To also add a
  884. // [semi-standardized][range] `range` property holding a `[start,
  885. // end]` array with the same numbers, set the `ranges` option to
  886. // `true`.
  887. //
  888. // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
  889. ranges: false,
  890. // It is possible to parse multiple files into a single AST by
  891. // passing the tree produced by parsing the first file as
  892. // `program` option in subsequent parses. This will add the
  893. // toplevel forms of the parsed file to the `Program` (top) node
  894. // of an existing parse tree.
  895. program: null,
  896. // When `locations` is on, you can pass this to record the source
  897. // file in every node's `loc` object.
  898. sourceFile: null,
  899. // This value, if given, is stored in every node, whether
  900. // `locations` is on or off.
  901. directSourceFile: null,
  902. // When enabled, parenthesized expressions are represented by
  903. // (non-standard) ParenthesizedExpression nodes
  904. preserveParens: false
  905. };
  906. SCOPE_TOP2 = 1;
  907. SCOPE_FUNCTION2 = 2;
  908. SCOPE_VAR2 = SCOPE_TOP2 | SCOPE_FUNCTION2;
  909. SCOPE_ASYNC2 = 4;
  910. SCOPE_GENERATOR2 = 8;
  911. SCOPE_ARROW2 = 16;
  912. SCOPE_SIMPLE_CATCH2 = 32;
  913. SCOPE_SUPER2 = 64;
  914. SCOPE_DIRECT_SUPER2 = 128;
  915. BIND_NONE2 = 0;
  916. BIND_VAR2 = 1;
  917. BIND_LEXICAL2 = 2;
  918. BIND_FUNCTION2 = 3;
  919. BIND_SIMPLE_CATCH2 = 4;
  920. BIND_OUTSIDE2 = 5;
  921. Parser3 = function Parser4(options, input, startPos) {
  922. this.options = options = getOptions2(options);
  923. this.sourceFile = options.sourceFile;
  924. this.keywords = wordsRegexp2(keywords2[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
  925. var reserved = "";
  926. if (options.allowReserved !== true) {
  927. for (var v = options.ecmaVersion; ; v--) {
  928. if (reserved = reservedWords2[v]) {
  929. break;
  930. }
  931. }
  932. if (options.sourceType === "module") {
  933. reserved += " await";
  934. }
  935. }
  936. this.reservedWords = wordsRegexp2(reserved);
  937. var reservedStrict = (reserved ? reserved + " " : "") + reservedWords2.strict;
  938. this.reservedWordsStrict = wordsRegexp2(reservedStrict);
  939. this.reservedWordsStrictBind = wordsRegexp2(reservedStrict + " " + reservedWords2.strictBind);
  940. this.input = String(input);
  941. this.containsEsc = false;
  942. if (startPos) {
  943. this.pos = startPos;
  944. this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
  945. this.curLine = this.input.slice(0, this.lineStart).split(lineBreak2).length;
  946. } else {
  947. this.pos = this.lineStart = 0;
  948. this.curLine = 1;
  949. }
  950. this.type = types2.eof;
  951. this.value = null;
  952. this.start = this.end = this.pos;
  953. this.startLoc = this.endLoc = this.curPosition();
  954. this.lastTokEndLoc = this.lastTokStartLoc = null;
  955. this.lastTokStart = this.lastTokEnd = this.pos;
  956. this.context = this.initialContext();
  957. this.exprAllowed = true;
  958. this.inModule = options.sourceType === "module";
  959. this.strict = this.inModule || this.strictDirective(this.pos);
  960. this.potentialArrowAt = -1;
  961. this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
  962. this.labels = [];
  963. this.undefinedExports = {};
  964. if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") {
  965. this.skipLineComment(2);
  966. }
  967. this.scopeStack = [];
  968. this.enterScope(SCOPE_TOP2);
  969. this.regexpState = null;
  970. };
  971. prototypeAccessors2 = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true } };
  972. Parser3.prototype.parse = function parse3() {
  973. var node2 = this.options.program || this.startNode();
  974. this.nextToken();
  975. return this.parseTopLevel(node2);
  976. };
  977. prototypeAccessors2.inFunction.get = function() {
  978. return (this.currentVarScope().flags & SCOPE_FUNCTION2) > 0;
  979. };
  980. prototypeAccessors2.inGenerator.get = function() {
  981. return (this.currentVarScope().flags & SCOPE_GENERATOR2) > 0;
  982. };
  983. prototypeAccessors2.inAsync.get = function() {
  984. return (this.currentVarScope().flags & SCOPE_ASYNC2) > 0;
  985. };
  986. prototypeAccessors2.allowSuper.get = function() {
  987. return (this.currentThisScope().flags & SCOPE_SUPER2) > 0;
  988. };
  989. prototypeAccessors2.allowDirectSuper.get = function() {
  990. return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER2) > 0;
  991. };
  992. prototypeAccessors2.treatFunctionsAsVar.get = function() {
  993. return this.treatFunctionsAsVarInScope(this.currentScope());
  994. };
  995. Parser3.prototype.inNonArrowFunction = function inNonArrowFunction() {
  996. return (this.currentThisScope().flags & SCOPE_FUNCTION2) > 0;
  997. };
  998. Parser3.extend = function extend3() {
  999. var plugins = [], len = arguments.length;
  1000. while (len--)
  1001. plugins[len] = arguments[len];
  1002. var cls = this;
  1003. for (var i = 0; i < plugins.length; i++) {
  1004. cls = plugins[i](cls);
  1005. }
  1006. return cls;
  1007. };
  1008. Parser3.parse = function parse4(input, options) {
  1009. return new this(options, input).parse();
  1010. };
  1011. Parser3.parseExpressionAt = function parseExpressionAt2(input, pos2, options) {
  1012. var parser = new this(options, input, pos2);
  1013. parser.nextToken();
  1014. return parser.parseExpression();
  1015. };
  1016. Parser3.tokenizer = function tokenizer2(input, options) {
  1017. return new this(options, input);
  1018. };
  1019. Object.defineProperties(Parser3.prototype, prototypeAccessors2);
  1020. pp2 = Parser3.prototype;
  1021. literal2 = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
  1022. pp2.strictDirective = function(start3) {
  1023. for (; ; ) {
  1024. skipWhiteSpace2.lastIndex = start3;
  1025. start3 += skipWhiteSpace2.exec(this.input)[0].length;
  1026. var match = literal2.exec(this.input.slice(start3));
  1027. if (!match) {
  1028. return false;
  1029. }
  1030. if ((match[1] || match[2]) === "use strict") {
  1031. skipWhiteSpace2.lastIndex = start3 + match[0].length;
  1032. var spaceAfter = skipWhiteSpace2.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
  1033. var next = this.input.charAt(end);
  1034. return next === ";" || next === "}" || lineBreak2.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
  1035. }
  1036. start3 += match[0].length;
  1037. skipWhiteSpace2.lastIndex = start3;
  1038. start3 += skipWhiteSpace2.exec(this.input)[0].length;
  1039. if (this.input[start3] === ";") {
  1040. start3++;
  1041. }
  1042. }
  1043. };
  1044. pp2.eat = function(type) {
  1045. if (this.type === type) {
  1046. this.next();
  1047. return true;
  1048. } else {
  1049. return false;
  1050. }
  1051. };
  1052. pp2.isContextual = function(name2) {
  1053. return this.type === types2.name && this.value === name2 && !this.containsEsc;
  1054. };
  1055. pp2.eatContextual = function(name2) {
  1056. if (!this.isContextual(name2)) {
  1057. return false;
  1058. }
  1059. this.next();
  1060. return true;
  1061. };
  1062. pp2.expectContextual = function(name2) {
  1063. if (!this.eatContextual(name2)) {
  1064. this.unexpected();
  1065. }
  1066. };
  1067. pp2.canInsertSemicolon = function() {
  1068. return this.type === types2.eof || this.type === types2.braceR || lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
  1069. };
  1070. pp2.insertSemicolon = function() {
  1071. if (this.canInsertSemicolon()) {
  1072. if (this.options.onInsertedSemicolon) {
  1073. this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
  1074. }
  1075. return true;
  1076. }
  1077. };
  1078. pp2.semicolon = function() {
  1079. if (!this.eat(types2.semi) && !this.insertSemicolon()) {
  1080. this.unexpected();
  1081. }
  1082. };
  1083. pp2.afterTrailingComma = function(tokType, notNext) {
  1084. if (this.type === tokType) {
  1085. if (this.options.onTrailingComma) {
  1086. this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
  1087. }
  1088. if (!notNext) {
  1089. this.next();
  1090. }
  1091. return true;
  1092. }
  1093. };
  1094. pp2.expect = function(type) {
  1095. this.eat(type) || this.unexpected();
  1096. };
  1097. pp2.unexpected = function(pos2) {
  1098. this.raise(pos2 != null ? pos2 : this.start, "Unexpected token");
  1099. };
  1100. pp2.checkPatternErrors = function(refDestructuringErrors, isAssign) {
  1101. if (!refDestructuringErrors) {
  1102. return;
  1103. }
  1104. if (refDestructuringErrors.trailingComma > -1) {
  1105. this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
  1106. }
  1107. var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
  1108. if (parens > -1) {
  1109. this.raiseRecoverable(parens, "Parenthesized pattern");
  1110. }
  1111. };
  1112. pp2.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
  1113. if (!refDestructuringErrors) {
  1114. return false;
  1115. }
  1116. var shorthandAssign = refDestructuringErrors.shorthandAssign;
  1117. var doubleProto = refDestructuringErrors.doubleProto;
  1118. if (!andThrow) {
  1119. return shorthandAssign >= 0 || doubleProto >= 0;
  1120. }
  1121. if (shorthandAssign >= 0) {
  1122. this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns");
  1123. }
  1124. if (doubleProto >= 0) {
  1125. this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
  1126. }
  1127. };
  1128. pp2.checkYieldAwaitInDefaultParams = function() {
  1129. if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {
  1130. this.raise(this.yieldPos, "Yield expression cannot be a default value");
  1131. }
  1132. if (this.awaitPos) {
  1133. this.raise(this.awaitPos, "Await expression cannot be a default value");
  1134. }
  1135. };
  1136. pp2.isSimpleAssignTarget = function(expr) {
  1137. if (expr.type === "ParenthesizedExpression") {
  1138. return this.isSimpleAssignTarget(expr.expression);
  1139. }
  1140. return expr.type === "Identifier" || expr.type === "MemberExpression";
  1141. };
  1142. pp$12 = Parser3.prototype;
  1143. pp$12.parseTopLevel = function(node2) {
  1144. var exports = {};
  1145. if (!node2.body) {
  1146. node2.body = [];
  1147. }
  1148. while (this.type !== types2.eof) {
  1149. var stmt = this.parseStatement(null, true, exports);
  1150. node2.body.push(stmt);
  1151. }
  1152. if (this.inModule) {
  1153. for (var i = 0, list3 = Object.keys(this.undefinedExports); i < list3.length; i += 1) {
  1154. var name2 = list3[i];
  1155. this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined");
  1156. }
  1157. }
  1158. this.adaptDirectivePrologue(node2.body);
  1159. this.next();
  1160. node2.sourceType = this.options.sourceType;
  1161. return this.finishNode(node2, "Program");
  1162. };
  1163. loopLabel2 = { kind: "loop" };
  1164. switchLabel2 = { kind: "switch" };
  1165. pp$12.isLet = function(context) {
  1166. if (this.options.ecmaVersion < 6 || !this.isContextual("let")) {
  1167. return false;
  1168. }
  1169. skipWhiteSpace2.lastIndex = this.pos;
  1170. var skip = skipWhiteSpace2.exec(this.input);
  1171. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  1172. if (nextCh === 91) {
  1173. return true;
  1174. }
  1175. if (context) {
  1176. return false;
  1177. }
  1178. if (nextCh === 123) {
  1179. return true;
  1180. }
  1181. if (isIdentifierStart2(nextCh, true)) {
  1182. var pos2 = next + 1;
  1183. while (isIdentifierChar2(this.input.charCodeAt(pos2), true)) {
  1184. ++pos2;
  1185. }
  1186. var ident = this.input.slice(next, pos2);
  1187. if (!keywordRelationalOperator2.test(ident)) {
  1188. return true;
  1189. }
  1190. }
  1191. return false;
  1192. };
  1193. pp$12.isAsyncFunction = function() {
  1194. if (this.options.ecmaVersion < 8 || !this.isContextual("async")) {
  1195. return false;
  1196. }
  1197. skipWhiteSpace2.lastIndex = this.pos;
  1198. var skip = skipWhiteSpace2.exec(this.input);
  1199. var next = this.pos + skip[0].length;
  1200. return !lineBreak2.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !isIdentifierChar2(this.input.charAt(next + 8)));
  1201. };
  1202. pp$12.parseStatement = function(context, topLevel, exports) {
  1203. var starttype = this.type, node2 = this.startNode(), kind;
  1204. if (this.isLet(context)) {
  1205. starttype = types2._var;
  1206. kind = "let";
  1207. }
  1208. switch (starttype) {
  1209. case types2._break:
  1210. case types2._continue:
  1211. return this.parseBreakContinueStatement(node2, starttype.keyword);
  1212. case types2._debugger:
  1213. return this.parseDebuggerStatement(node2);
  1214. case types2._do:
  1215. return this.parseDoStatement(node2);
  1216. case types2._for:
  1217. return this.parseForStatement(node2);
  1218. case types2._function:
  1219. if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) {
  1220. this.unexpected();
  1221. }
  1222. return this.parseFunctionStatement(node2, false, !context);
  1223. case types2._class:
  1224. if (context) {
  1225. this.unexpected();
  1226. }
  1227. return this.parseClass(node2, true);
  1228. case types2._if:
  1229. return this.parseIfStatement(node2);
  1230. case types2._return:
  1231. return this.parseReturnStatement(node2);
  1232. case types2._switch:
  1233. return this.parseSwitchStatement(node2);
  1234. case types2._throw:
  1235. return this.parseThrowStatement(node2);
  1236. case types2._try:
  1237. return this.parseTryStatement(node2);
  1238. case types2._const:
  1239. case types2._var:
  1240. kind = kind || this.value;
  1241. if (context && kind !== "var") {
  1242. this.unexpected();
  1243. }
  1244. return this.parseVarStatement(node2, kind);
  1245. case types2._while:
  1246. return this.parseWhileStatement(node2);
  1247. case types2._with:
  1248. return this.parseWithStatement(node2);
  1249. case types2.braceL:
  1250. return this.parseBlock(true, node2);
  1251. case types2.semi:
  1252. return this.parseEmptyStatement(node2);
  1253. case types2._export:
  1254. case types2._import:
  1255. if (this.options.ecmaVersion > 10 && starttype === types2._import) {
  1256. skipWhiteSpace2.lastIndex = this.pos;
  1257. var skip = skipWhiteSpace2.exec(this.input);
  1258. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  1259. if (nextCh === 40 || nextCh === 46) {
  1260. return this.parseExpressionStatement(node2, this.parseExpression());
  1261. }
  1262. }
  1263. if (!this.options.allowImportExportEverywhere) {
  1264. if (!topLevel) {
  1265. this.raise(this.start, "'import' and 'export' may only appear at the top level");
  1266. }
  1267. if (!this.inModule) {
  1268. this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
  1269. }
  1270. }
  1271. return starttype === types2._import ? this.parseImport(node2) : this.parseExport(node2, exports);
  1272. default:
  1273. if (this.isAsyncFunction()) {
  1274. if (context) {
  1275. this.unexpected();
  1276. }
  1277. this.next();
  1278. return this.parseFunctionStatement(node2, true, !context);
  1279. }
  1280. var maybeName = this.value, expr = this.parseExpression();
  1281. if (starttype === types2.name && expr.type === "Identifier" && this.eat(types2.colon)) {
  1282. return this.parseLabeledStatement(node2, maybeName, expr, context);
  1283. } else {
  1284. return this.parseExpressionStatement(node2, expr);
  1285. }
  1286. }
  1287. };
  1288. pp$12.parseBreakContinueStatement = function(node2, keyword) {
  1289. var isBreak = keyword === "break";
  1290. this.next();
  1291. if (this.eat(types2.semi) || this.insertSemicolon()) {
  1292. node2.label = null;
  1293. } else if (this.type !== types2.name) {
  1294. this.unexpected();
  1295. } else {
  1296. node2.label = this.parseIdent();
  1297. this.semicolon();
  1298. }
  1299. var i = 0;
  1300. for (; i < this.labels.length; ++i) {
  1301. var lab = this.labels[i];
  1302. if (node2.label == null || lab.name === node2.label.name) {
  1303. if (lab.kind != null && (isBreak || lab.kind === "loop")) {
  1304. break;
  1305. }
  1306. if (node2.label && isBreak) {
  1307. break;
  1308. }
  1309. }
  1310. }
  1311. if (i === this.labels.length) {
  1312. this.raise(node2.start, "Unsyntactic " + keyword);
  1313. }
  1314. return this.finishNode(node2, isBreak ? "BreakStatement" : "ContinueStatement");
  1315. };
  1316. pp$12.parseDebuggerStatement = function(node2) {
  1317. this.next();
  1318. this.semicolon();
  1319. return this.finishNode(node2, "DebuggerStatement");
  1320. };
  1321. pp$12.parseDoStatement = function(node2) {
  1322. this.next();
  1323. this.labels.push(loopLabel2);
  1324. node2.body = this.parseStatement("do");
  1325. this.labels.pop();
  1326. this.expect(types2._while);
  1327. node2.test = this.parseParenExpression();
  1328. if (this.options.ecmaVersion >= 6) {
  1329. this.eat(types2.semi);
  1330. } else {
  1331. this.semicolon();
  1332. }
  1333. return this.finishNode(node2, "DoWhileStatement");
  1334. };
  1335. pp$12.parseForStatement = function(node2) {
  1336. this.next();
  1337. var awaitAt = this.options.ecmaVersion >= 9 && (this.inAsync || !this.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await") ? this.lastTokStart : -1;
  1338. this.labels.push(loopLabel2);
  1339. this.enterScope(0);
  1340. this.expect(types2.parenL);
  1341. if (this.type === types2.semi) {
  1342. if (awaitAt > -1) {
  1343. this.unexpected(awaitAt);
  1344. }
  1345. return this.parseFor(node2, null);
  1346. }
  1347. var isLet = this.isLet();
  1348. if (this.type === types2._var || this.type === types2._const || isLet) {
  1349. var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
  1350. this.next();
  1351. this.parseVar(init$1, true, kind);
  1352. this.finishNode(init$1, "VariableDeclaration");
  1353. if ((this.type === types2._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
  1354. if (this.options.ecmaVersion >= 9) {
  1355. if (this.type === types2._in) {
  1356. if (awaitAt > -1) {
  1357. this.unexpected(awaitAt);
  1358. }
  1359. } else {
  1360. node2.await = awaitAt > -1;
  1361. }
  1362. }
  1363. return this.parseForIn(node2, init$1);
  1364. }
  1365. if (awaitAt > -1) {
  1366. this.unexpected(awaitAt);
  1367. }
  1368. return this.parseFor(node2, init$1);
  1369. }
  1370. var refDestructuringErrors = new DestructuringErrors3();
  1371. var init = this.parseExpression(true, refDestructuringErrors);
  1372. if (this.type === types2._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) {
  1373. if (this.options.ecmaVersion >= 9) {
  1374. if (this.type === types2._in) {
  1375. if (awaitAt > -1) {
  1376. this.unexpected(awaitAt);
  1377. }
  1378. } else {
  1379. node2.await = awaitAt > -1;
  1380. }
  1381. }
  1382. this.toAssignable(init, false, refDestructuringErrors);
  1383. this.checkLVal(init);
  1384. return this.parseForIn(node2, init);
  1385. } else {
  1386. this.checkExpressionErrors(refDestructuringErrors, true);
  1387. }
  1388. if (awaitAt > -1) {
  1389. this.unexpected(awaitAt);
  1390. }
  1391. return this.parseFor(node2, init);
  1392. };
  1393. pp$12.parseFunctionStatement = function(node2, isAsync, declarationPosition) {
  1394. this.next();
  1395. return this.parseFunction(node2, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), false, isAsync);
  1396. };
  1397. pp$12.parseIfStatement = function(node2) {
  1398. this.next();
  1399. node2.test = this.parseParenExpression();
  1400. node2.consequent = this.parseStatement("if");
  1401. node2.alternate = this.eat(types2._else) ? this.parseStatement("if") : null;
  1402. return this.finishNode(node2, "IfStatement");
  1403. };
  1404. pp$12.parseReturnStatement = function(node2) {
  1405. if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
  1406. this.raise(this.start, "'return' outside of function");
  1407. }
  1408. this.next();
  1409. if (this.eat(types2.semi) || this.insertSemicolon()) {
  1410. node2.argument = null;
  1411. } else {
  1412. node2.argument = this.parseExpression();
  1413. this.semicolon();
  1414. }
  1415. return this.finishNode(node2, "ReturnStatement");
  1416. };
  1417. pp$12.parseSwitchStatement = function(node2) {
  1418. this.next();
  1419. node2.discriminant = this.parseParenExpression();
  1420. node2.cases = [];
  1421. this.expect(types2.braceL);
  1422. this.labels.push(switchLabel2);
  1423. this.enterScope(0);
  1424. var cur;
  1425. for (var sawDefault = false; this.type !== types2.braceR; ) {
  1426. if (this.type === types2._case || this.type === types2._default) {
  1427. var isCase = this.type === types2._case;
  1428. if (cur) {
  1429. this.finishNode(cur, "SwitchCase");
  1430. }
  1431. node2.cases.push(cur = this.startNode());
  1432. cur.consequent = [];
  1433. this.next();
  1434. if (isCase) {
  1435. cur.test = this.parseExpression();
  1436. } else {
  1437. if (sawDefault) {
  1438. this.raiseRecoverable(this.lastTokStart, "Multiple default clauses");
  1439. }
  1440. sawDefault = true;
  1441. cur.test = null;
  1442. }
  1443. this.expect(types2.colon);
  1444. } else {
  1445. if (!cur) {
  1446. this.unexpected();
  1447. }
  1448. cur.consequent.push(this.parseStatement(null));
  1449. }
  1450. }
  1451. this.exitScope();
  1452. if (cur) {
  1453. this.finishNode(cur, "SwitchCase");
  1454. }
  1455. this.next();
  1456. this.labels.pop();
  1457. return this.finishNode(node2, "SwitchStatement");
  1458. };
  1459. pp$12.parseThrowStatement = function(node2) {
  1460. this.next();
  1461. if (lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) {
  1462. this.raise(this.lastTokEnd, "Illegal newline after throw");
  1463. }
  1464. node2.argument = this.parseExpression();
  1465. this.semicolon();
  1466. return this.finishNode(node2, "ThrowStatement");
  1467. };
  1468. empty2 = [];
  1469. pp$12.parseTryStatement = function(node2) {
  1470. this.next();
  1471. node2.block = this.parseBlock();
  1472. node2.handler = null;
  1473. if (this.type === types2._catch) {
  1474. var clause = this.startNode();
  1475. this.next();
  1476. if (this.eat(types2.parenL)) {
  1477. clause.param = this.parseBindingAtom();
  1478. var simple = clause.param.type === "Identifier";
  1479. this.enterScope(simple ? SCOPE_SIMPLE_CATCH2 : 0);
  1480. this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH2 : BIND_LEXICAL2);
  1481. this.expect(types2.parenR);
  1482. } else {
  1483. if (this.options.ecmaVersion < 10) {
  1484. this.unexpected();
  1485. }
  1486. clause.param = null;
  1487. this.enterScope(0);
  1488. }
  1489. clause.body = this.parseBlock(false);
  1490. this.exitScope();
  1491. node2.handler = this.finishNode(clause, "CatchClause");
  1492. }
  1493. node2.finalizer = this.eat(types2._finally) ? this.parseBlock() : null;
  1494. if (!node2.handler && !node2.finalizer) {
  1495. this.raise(node2.start, "Missing catch or finally clause");
  1496. }
  1497. return this.finishNode(node2, "TryStatement");
  1498. };
  1499. pp$12.parseVarStatement = function(node2, kind) {
  1500. this.next();
  1501. this.parseVar(node2, false, kind);
  1502. this.semicolon();
  1503. return this.finishNode(node2, "VariableDeclaration");
  1504. };
  1505. pp$12.parseWhileStatement = function(node2) {
  1506. this.next();
  1507. node2.test = this.parseParenExpression();
  1508. this.labels.push(loopLabel2);
  1509. node2.body = this.parseStatement("while");
  1510. this.labels.pop();
  1511. return this.finishNode(node2, "WhileStatement");
  1512. };
  1513. pp$12.parseWithStatement = function(node2) {
  1514. if (this.strict) {
  1515. this.raise(this.start, "'with' in strict mode");
  1516. }
  1517. this.next();
  1518. node2.object = this.parseParenExpression();
  1519. node2.body = this.parseStatement("with");
  1520. return this.finishNode(node2, "WithStatement");
  1521. };
  1522. pp$12.parseEmptyStatement = function(node2) {
  1523. this.next();
  1524. return this.finishNode(node2, "EmptyStatement");
  1525. };
  1526. pp$12.parseLabeledStatement = function(node2, maybeName, expr, context) {
  1527. for (var i$1 = 0, list3 = this.labels; i$1 < list3.length; i$1 += 1) {
  1528. var label = list3[i$1];
  1529. if (label.name === maybeName) {
  1530. this.raise(expr.start, "Label '" + maybeName + "' is already declared");
  1531. }
  1532. }
  1533. var kind = this.type.isLoop ? "loop" : this.type === types2._switch ? "switch" : null;
  1534. for (var i = this.labels.length - 1; i >= 0; i--) {
  1535. var label$1 = this.labels[i];
  1536. if (label$1.statementStart === node2.start) {
  1537. label$1.statementStart = this.start;
  1538. label$1.kind = kind;
  1539. } else {
  1540. break;
  1541. }
  1542. }
  1543. this.labels.push({ name: maybeName, kind, statementStart: this.start });
  1544. node2.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  1545. this.labels.pop();
  1546. node2.label = expr;
  1547. return this.finishNode(node2, "LabeledStatement");
  1548. };
  1549. pp$12.parseExpressionStatement = function(node2, expr) {
  1550. node2.expression = expr;
  1551. this.semicolon();
  1552. return this.finishNode(node2, "ExpressionStatement");
  1553. };
  1554. pp$12.parseBlock = function(createNewLexicalScope, node2, exitStrict) {
  1555. if (createNewLexicalScope === void 0)
  1556. createNewLexicalScope = true;
  1557. if (node2 === void 0)
  1558. node2 = this.startNode();
  1559. node2.body = [];
  1560. this.expect(types2.braceL);
  1561. if (createNewLexicalScope) {
  1562. this.enterScope(0);
  1563. }
  1564. while (this.type !== types2.braceR) {
  1565. var stmt = this.parseStatement(null);
  1566. node2.body.push(stmt);
  1567. }
  1568. if (exitStrict) {
  1569. this.strict = false;
  1570. }
  1571. this.next();
  1572. if (createNewLexicalScope) {
  1573. this.exitScope();
  1574. }
  1575. return this.finishNode(node2, "BlockStatement");
  1576. };
  1577. pp$12.parseFor = function(node2, init) {
  1578. node2.init = init;
  1579. this.expect(types2.semi);
  1580. node2.test = this.type === types2.semi ? null : this.parseExpression();
  1581. this.expect(types2.semi);
  1582. node2.update = this.type === types2.parenR ? null : this.parseExpression();
  1583. this.expect(types2.parenR);
  1584. node2.body = this.parseStatement("for");
  1585. this.exitScope();
  1586. this.labels.pop();
  1587. return this.finishNode(node2, "ForStatement");
  1588. };
  1589. pp$12.parseForIn = function(node2, init) {
  1590. var isForIn = this.type === types2._in;
  1591. this.next();
  1592. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  1593. this.raise(
  1594. init.start,
  1595. (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
  1596. );
  1597. } else if (init.type === "AssignmentPattern") {
  1598. this.raise(init.start, "Invalid left-hand side in for-loop");
  1599. }
  1600. node2.left = init;
  1601. node2.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
  1602. this.expect(types2.parenR);
  1603. node2.body = this.parseStatement("for");
  1604. this.exitScope();
  1605. this.labels.pop();
  1606. return this.finishNode(node2, isForIn ? "ForInStatement" : "ForOfStatement");
  1607. };
  1608. pp$12.parseVar = function(node2, isFor, kind) {
  1609. node2.declarations = [];
  1610. node2.kind = kind;
  1611. for (; ; ) {
  1612. var decl = this.startNode();
  1613. this.parseVarId(decl, kind);
  1614. if (this.eat(types2.eq)) {
  1615. decl.init = this.parseMaybeAssign(isFor);
  1616. } else if (kind === "const" && !(this.type === types2._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  1617. this.unexpected();
  1618. } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types2._in || this.isContextual("of")))) {
  1619. this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
  1620. } else {
  1621. decl.init = null;
  1622. }
  1623. node2.declarations.push(this.finishNode(decl, "VariableDeclarator"));
  1624. if (!this.eat(types2.comma)) {
  1625. break;
  1626. }
  1627. }
  1628. return node2;
  1629. };
  1630. pp$12.parseVarId = function(decl, kind) {
  1631. decl.id = this.parseBindingAtom();
  1632. this.checkLVal(decl.id, kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, false);
  1633. };
  1634. FUNC_STATEMENT2 = 1;
  1635. FUNC_HANGING_STATEMENT2 = 2;
  1636. FUNC_NULLABLE_ID2 = 4;
  1637. pp$12.parseFunction = function(node2, statement, allowExpressionBody, isAsync) {
  1638. this.initFunction(node2);
  1639. if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
  1640. if (this.type === types2.star && statement & FUNC_HANGING_STATEMENT2) {
  1641. this.unexpected();
  1642. }
  1643. node2.generator = this.eat(types2.star);
  1644. }
  1645. if (this.options.ecmaVersion >= 8) {
  1646. node2.async = !!isAsync;
  1647. }
  1648. if (statement & FUNC_STATEMENT2) {
  1649. node2.id = statement & FUNC_NULLABLE_ID2 && this.type !== types2.name ? null : this.parseIdent();
  1650. if (node2.id && !(statement & FUNC_HANGING_STATEMENT2)) {
  1651. this.checkLVal(node2.id, this.strict || node2.generator || node2.async ? this.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2);
  1652. }
  1653. }
  1654. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  1655. this.yieldPos = 0;
  1656. this.awaitPos = 0;
  1657. this.awaitIdentPos = 0;
  1658. this.enterScope(functionFlags2(node2.async, node2.generator));
  1659. if (!(statement & FUNC_STATEMENT2)) {
  1660. node2.id = this.type === types2.name ? this.parseIdent() : null;
  1661. }
  1662. this.parseFunctionParams(node2);
  1663. this.parseFunctionBody(node2, allowExpressionBody, false);
  1664. this.yieldPos = oldYieldPos;
  1665. this.awaitPos = oldAwaitPos;
  1666. this.awaitIdentPos = oldAwaitIdentPos;
  1667. return this.finishNode(node2, statement & FUNC_STATEMENT2 ? "FunctionDeclaration" : "FunctionExpression");
  1668. };
  1669. pp$12.parseFunctionParams = function(node2) {
  1670. this.expect(types2.parenL);
  1671. node2.params = this.parseBindingList(types2.parenR, false, this.options.ecmaVersion >= 8);
  1672. this.checkYieldAwaitInDefaultParams();
  1673. };
  1674. pp$12.parseClass = function(node2, isStatement) {
  1675. this.next();
  1676. var oldStrict = this.strict;
  1677. this.strict = true;
  1678. this.parseClassId(node2, isStatement);
  1679. this.parseClassSuper(node2);
  1680. var classBody = this.startNode();
  1681. var hadConstructor = false;
  1682. classBody.body = [];
  1683. this.expect(types2.braceL);
  1684. while (this.type !== types2.braceR) {
  1685. var element2 = this.parseClassElement(node2.superClass !== null);
  1686. if (element2) {
  1687. classBody.body.push(element2);
  1688. if (element2.type === "MethodDefinition" && element2.kind === "constructor") {
  1689. if (hadConstructor) {
  1690. this.raise(element2.start, "Duplicate constructor in the same class");
  1691. }
  1692. hadConstructor = true;
  1693. }
  1694. }
  1695. }
  1696. this.strict = oldStrict;
  1697. this.next();
  1698. node2.body = this.finishNode(classBody, "ClassBody");
  1699. return this.finishNode(node2, isStatement ? "ClassDeclaration" : "ClassExpression");
  1700. };
  1701. pp$12.parseClassElement = function(constructorAllowsSuper) {
  1702. var this$1 = this;
  1703. if (this.eat(types2.semi)) {
  1704. return null;
  1705. }
  1706. var method = this.startNode();
  1707. var tryContextual = function(k, noLineBreak) {
  1708. if (noLineBreak === void 0)
  1709. noLineBreak = false;
  1710. var start3 = this$1.start, startLoc = this$1.startLoc;
  1711. if (!this$1.eatContextual(k)) {
  1712. return false;
  1713. }
  1714. if (this$1.type !== types2.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) {
  1715. return true;
  1716. }
  1717. if (method.key) {
  1718. this$1.unexpected();
  1719. }
  1720. method.computed = false;
  1721. method.key = this$1.startNodeAt(start3, startLoc);
  1722. method.key.name = k;
  1723. this$1.finishNode(method.key, "Identifier");
  1724. return false;
  1725. };
  1726. method.kind = "method";
  1727. method.static = tryContextual("static");
  1728. var isGenerator = this.eat(types2.star);
  1729. var isAsync = false;
  1730. if (!isGenerator) {
  1731. if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) {
  1732. isAsync = true;
  1733. isGenerator = this.options.ecmaVersion >= 9 && this.eat(types2.star);
  1734. } else if (tryContextual("get")) {
  1735. method.kind = "get";
  1736. } else if (tryContextual("set")) {
  1737. method.kind = "set";
  1738. }
  1739. }
  1740. if (!method.key) {
  1741. this.parsePropertyName(method);
  1742. }
  1743. var key2 = method.key;
  1744. var allowsDirectSuper = false;
  1745. if (!method.computed && !method.static && (key2.type === "Identifier" && key2.name === "constructor" || key2.type === "Literal" && key2.value === "constructor")) {
  1746. if (method.kind !== "method") {
  1747. this.raise(key2.start, "Constructor can't have get/set modifier");
  1748. }
  1749. if (isGenerator) {
  1750. this.raise(key2.start, "Constructor can't be a generator");
  1751. }
  1752. if (isAsync) {
  1753. this.raise(key2.start, "Constructor can't be an async method");
  1754. }
  1755. method.kind = "constructor";
  1756. allowsDirectSuper = constructorAllowsSuper;
  1757. } else if (method.static && key2.type === "Identifier" && key2.name === "prototype") {
  1758. this.raise(key2.start, "Classes may not have a static property named prototype");
  1759. }
  1760. this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper);
  1761. if (method.kind === "get" && method.value.params.length !== 0) {
  1762. this.raiseRecoverable(method.value.start, "getter should have no params");
  1763. }
  1764. if (method.kind === "set" && method.value.params.length !== 1) {
  1765. this.raiseRecoverable(method.value.start, "setter should have exactly one param");
  1766. }
  1767. if (method.kind === "set" && method.value.params[0].type === "RestElement") {
  1768. this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params");
  1769. }
  1770. return method;
  1771. };
  1772. pp$12.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
  1773. method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
  1774. return this.finishNode(method, "MethodDefinition");
  1775. };
  1776. pp$12.parseClassId = function(node2, isStatement) {
  1777. if (this.type === types2.name) {
  1778. node2.id = this.parseIdent();
  1779. if (isStatement) {
  1780. this.checkLVal(node2.id, BIND_LEXICAL2, false);
  1781. }
  1782. } else {
  1783. if (isStatement === true) {
  1784. this.unexpected();
  1785. }
  1786. node2.id = null;
  1787. }
  1788. };
  1789. pp$12.parseClassSuper = function(node2) {
  1790. node2.superClass = this.eat(types2._extends) ? this.parseExprSubscripts() : null;
  1791. };
  1792. pp$12.parseExport = function(node2, exports) {
  1793. this.next();
  1794. if (this.eat(types2.star)) {
  1795. if (this.options.ecmaVersion >= 11) {
  1796. if (this.eatContextual("as")) {
  1797. node2.exported = this.parseIdent(true);
  1798. this.checkExport(exports, node2.exported.name, this.lastTokStart);
  1799. } else {
  1800. node2.exported = null;
  1801. }
  1802. }
  1803. this.expectContextual("from");
  1804. if (this.type !== types2.string) {
  1805. this.unexpected();
  1806. }
  1807. node2.source = this.parseExprAtom();
  1808. this.semicolon();
  1809. return this.finishNode(node2, "ExportAllDeclaration");
  1810. }
  1811. if (this.eat(types2._default)) {
  1812. this.checkExport(exports, "default", this.lastTokStart);
  1813. var isAsync;
  1814. if (this.type === types2._function || (isAsync = this.isAsyncFunction())) {
  1815. var fNode = this.startNode();
  1816. this.next();
  1817. if (isAsync) {
  1818. this.next();
  1819. }
  1820. node2.declaration = this.parseFunction(fNode, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, false, isAsync);
  1821. } else if (this.type === types2._class) {
  1822. var cNode = this.startNode();
  1823. node2.declaration = this.parseClass(cNode, "nullableID");
  1824. } else {
  1825. node2.declaration = this.parseMaybeAssign();
  1826. this.semicolon();
  1827. }
  1828. return this.finishNode(node2, "ExportDefaultDeclaration");
  1829. }
  1830. if (this.shouldParseExportStatement()) {
  1831. node2.declaration = this.parseStatement(null);
  1832. if (node2.declaration.type === "VariableDeclaration") {
  1833. this.checkVariableExport(exports, node2.declaration.declarations);
  1834. } else {
  1835. this.checkExport(exports, node2.declaration.id.name, node2.declaration.id.start);
  1836. }
  1837. node2.specifiers = [];
  1838. node2.source = null;
  1839. } else {
  1840. node2.declaration = null;
  1841. node2.specifiers = this.parseExportSpecifiers(exports);
  1842. if (this.eatContextual("from")) {
  1843. if (this.type !== types2.string) {
  1844. this.unexpected();
  1845. }
  1846. node2.source = this.parseExprAtom();
  1847. } else {
  1848. for (var i = 0, list3 = node2.specifiers; i < list3.length; i += 1) {
  1849. var spec = list3[i];
  1850. this.checkUnreserved(spec.local);
  1851. this.checkLocalExport(spec.local);
  1852. }
  1853. node2.source = null;
  1854. }
  1855. this.semicolon();
  1856. }
  1857. return this.finishNode(node2, "ExportNamedDeclaration");
  1858. };
  1859. pp$12.checkExport = function(exports, name2, pos2) {
  1860. if (!exports) {
  1861. return;
  1862. }
  1863. if (has(exports, name2)) {
  1864. this.raiseRecoverable(pos2, "Duplicate export '" + name2 + "'");
  1865. }
  1866. exports[name2] = true;
  1867. };
  1868. pp$12.checkPatternExport = function(exports, pat) {
  1869. var type = pat.type;
  1870. if (type === "Identifier") {
  1871. this.checkExport(exports, pat.name, pat.start);
  1872. } else if (type === "ObjectPattern") {
  1873. for (var i = 0, list3 = pat.properties; i < list3.length; i += 1) {
  1874. var prop = list3[i];
  1875. this.checkPatternExport(exports, prop);
  1876. }
  1877. } else if (type === "ArrayPattern") {
  1878. for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
  1879. var elt = list$1[i$1];
  1880. if (elt) {
  1881. this.checkPatternExport(exports, elt);
  1882. }
  1883. }
  1884. } else if (type === "Property") {
  1885. this.checkPatternExport(exports, pat.value);
  1886. } else if (type === "AssignmentPattern") {
  1887. this.checkPatternExport(exports, pat.left);
  1888. } else if (type === "RestElement") {
  1889. this.checkPatternExport(exports, pat.argument);
  1890. } else if (type === "ParenthesizedExpression") {
  1891. this.checkPatternExport(exports, pat.expression);
  1892. }
  1893. };
  1894. pp$12.checkVariableExport = function(exports, decls) {
  1895. if (!exports) {
  1896. return;
  1897. }
  1898. for (var i = 0, list3 = decls; i < list3.length; i += 1) {
  1899. var decl = list3[i];
  1900. this.checkPatternExport(exports, decl.id);
  1901. }
  1902. };
  1903. pp$12.shouldParseExportStatement = function() {
  1904. return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
  1905. };
  1906. pp$12.parseExportSpecifiers = function(exports) {
  1907. var nodes = [], first = true;
  1908. this.expect(types2.braceL);
  1909. while (!this.eat(types2.braceR)) {
  1910. if (!first) {
  1911. this.expect(types2.comma);
  1912. if (this.afterTrailingComma(types2.braceR)) {
  1913. break;
  1914. }
  1915. } else {
  1916. first = false;
  1917. }
  1918. var node2 = this.startNode();
  1919. node2.local = this.parseIdent(true);
  1920. node2.exported = this.eatContextual("as") ? this.parseIdent(true) : node2.local;
  1921. this.checkExport(exports, node2.exported.name, node2.exported.start);
  1922. nodes.push(this.finishNode(node2, "ExportSpecifier"));
  1923. }
  1924. return nodes;
  1925. };
  1926. pp$12.parseImport = function(node2) {
  1927. this.next();
  1928. if (this.type === types2.string) {
  1929. node2.specifiers = empty2;
  1930. node2.source = this.parseExprAtom();
  1931. } else {
  1932. node2.specifiers = this.parseImportSpecifiers();
  1933. this.expectContextual("from");
  1934. node2.source = this.type === types2.string ? this.parseExprAtom() : this.unexpected();
  1935. }
  1936. this.semicolon();
  1937. return this.finishNode(node2, "ImportDeclaration");
  1938. };
  1939. pp$12.parseImportSpecifiers = function() {
  1940. var nodes = [], first = true;
  1941. if (this.type === types2.name) {
  1942. var node2 = this.startNode();
  1943. node2.local = this.parseIdent();
  1944. this.checkLVal(node2.local, BIND_LEXICAL2);
  1945. nodes.push(this.finishNode(node2, "ImportDefaultSpecifier"));
  1946. if (!this.eat(types2.comma)) {
  1947. return nodes;
  1948. }
  1949. }
  1950. if (this.type === types2.star) {
  1951. var node$1 = this.startNode();
  1952. this.next();
  1953. this.expectContextual("as");
  1954. node$1.local = this.parseIdent();
  1955. this.checkLVal(node$1.local, BIND_LEXICAL2);
  1956. nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
  1957. return nodes;
  1958. }
  1959. this.expect(types2.braceL);
  1960. while (!this.eat(types2.braceR)) {
  1961. if (!first) {
  1962. this.expect(types2.comma);
  1963. if (this.afterTrailingComma(types2.braceR)) {
  1964. break;
  1965. }
  1966. } else {
  1967. first = false;
  1968. }
  1969. var node$2 = this.startNode();
  1970. node$2.imported = this.parseIdent(true);
  1971. if (this.eatContextual("as")) {
  1972. node$2.local = this.parseIdent();
  1973. } else {
  1974. this.checkUnreserved(node$2.imported);
  1975. node$2.local = node$2.imported;
  1976. }
  1977. this.checkLVal(node$2.local, BIND_LEXICAL2);
  1978. nodes.push(this.finishNode(node$2, "ImportSpecifier"));
  1979. }
  1980. return nodes;
  1981. };
  1982. pp$12.adaptDirectivePrologue = function(statements) {
  1983. for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
  1984. statements[i].directive = statements[i].expression.raw.slice(1, -1);
  1985. }
  1986. };
  1987. pp$12.isDirectiveCandidate = function(statement) {
  1988. return statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && // Reject parenthesized strings.
  1989. (this.input[statement.start] === '"' || this.input[statement.start] === "'");
  1990. };
  1991. pp$22 = Parser3.prototype;
  1992. pp$22.toAssignable = function(node2, isBinding, refDestructuringErrors) {
  1993. if (this.options.ecmaVersion >= 6 && node2) {
  1994. switch (node2.type) {
  1995. case "Identifier":
  1996. if (this.inAsync && node2.name === "await") {
  1997. this.raise(node2.start, "Cannot use 'await' as identifier inside an async function");
  1998. }
  1999. break;
  2000. case "ObjectPattern":
  2001. case "ArrayPattern":
  2002. case "RestElement":
  2003. break;
  2004. case "ObjectExpression":
  2005. node2.type = "ObjectPattern";
  2006. if (refDestructuringErrors) {
  2007. this.checkPatternErrors(refDestructuringErrors, true);
  2008. }
  2009. for (var i = 0, list3 = node2.properties; i < list3.length; i += 1) {
  2010. var prop = list3[i];
  2011. this.toAssignable(prop, isBinding);
  2012. if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
  2013. this.raise(prop.argument.start, "Unexpected token");
  2014. }
  2015. }
  2016. break;
  2017. case "Property":
  2018. if (node2.kind !== "init") {
  2019. this.raise(node2.key.start, "Object pattern can't contain getter or setter");
  2020. }
  2021. this.toAssignable(node2.value, isBinding);
  2022. break;
  2023. case "ArrayExpression":
  2024. node2.type = "ArrayPattern";
  2025. if (refDestructuringErrors) {
  2026. this.checkPatternErrors(refDestructuringErrors, true);
  2027. }
  2028. this.toAssignableList(node2.elements, isBinding);
  2029. break;
  2030. case "SpreadElement":
  2031. node2.type = "RestElement";
  2032. this.toAssignable(node2.argument, isBinding);
  2033. if (node2.argument.type === "AssignmentPattern") {
  2034. this.raise(node2.argument.start, "Rest elements cannot have a default value");
  2035. }
  2036. break;
  2037. case "AssignmentExpression":
  2038. if (node2.operator !== "=") {
  2039. this.raise(node2.left.end, "Only '=' operator can be used for specifying default value.");
  2040. }
  2041. node2.type = "AssignmentPattern";
  2042. delete node2.operator;
  2043. this.toAssignable(node2.left, isBinding);
  2044. case "AssignmentPattern":
  2045. break;
  2046. case "ParenthesizedExpression":
  2047. this.toAssignable(node2.expression, isBinding, refDestructuringErrors);
  2048. break;
  2049. case "ChainExpression":
  2050. this.raiseRecoverable(node2.start, "Optional chaining cannot appear in left-hand side");
  2051. break;
  2052. case "MemberExpression":
  2053. if (!isBinding) {
  2054. break;
  2055. }
  2056. default:
  2057. this.raise(node2.start, "Assigning to rvalue");
  2058. }
  2059. } else if (refDestructuringErrors) {
  2060. this.checkPatternErrors(refDestructuringErrors, true);
  2061. }
  2062. return node2;
  2063. };
  2064. pp$22.toAssignableList = function(exprList, isBinding) {
  2065. var end = exprList.length;
  2066. for (var i = 0; i < end; i++) {
  2067. var elt = exprList[i];
  2068. if (elt) {
  2069. this.toAssignable(elt, isBinding);
  2070. }
  2071. }
  2072. if (end) {
  2073. var last = exprList[end - 1];
  2074. if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") {
  2075. this.unexpected(last.argument.start);
  2076. }
  2077. }
  2078. return exprList;
  2079. };
  2080. pp$22.parseSpread = function(refDestructuringErrors) {
  2081. var node2 = this.startNode();
  2082. this.next();
  2083. node2.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  2084. return this.finishNode(node2, "SpreadElement");
  2085. };
  2086. pp$22.parseRestBinding = function() {
  2087. var node2 = this.startNode();
  2088. this.next();
  2089. if (this.options.ecmaVersion === 6 && this.type !== types2.name) {
  2090. this.unexpected();
  2091. }
  2092. node2.argument = this.parseBindingAtom();
  2093. return this.finishNode(node2, "RestElement");
  2094. };
  2095. pp$22.parseBindingAtom = function() {
  2096. if (this.options.ecmaVersion >= 6) {
  2097. switch (this.type) {
  2098. case types2.bracketL:
  2099. var node2 = this.startNode();
  2100. this.next();
  2101. node2.elements = this.parseBindingList(types2.bracketR, true, true);
  2102. return this.finishNode(node2, "ArrayPattern");
  2103. case types2.braceL:
  2104. return this.parseObj(true);
  2105. }
  2106. }
  2107. return this.parseIdent();
  2108. };
  2109. pp$22.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
  2110. var elts = [], first = true;
  2111. while (!this.eat(close)) {
  2112. if (first) {
  2113. first = false;
  2114. } else {
  2115. this.expect(types2.comma);
  2116. }
  2117. if (allowEmpty && this.type === types2.comma) {
  2118. elts.push(null);
  2119. } else if (allowTrailingComma && this.afterTrailingComma(close)) {
  2120. break;
  2121. } else if (this.type === types2.ellipsis) {
  2122. var rest = this.parseRestBinding();
  2123. this.parseBindingListItem(rest);
  2124. elts.push(rest);
  2125. if (this.type === types2.comma) {
  2126. this.raise(this.start, "Comma is not permitted after the rest element");
  2127. }
  2128. this.expect(close);
  2129. break;
  2130. } else {
  2131. var elem = this.parseMaybeDefault(this.start, this.startLoc);
  2132. this.parseBindingListItem(elem);
  2133. elts.push(elem);
  2134. }
  2135. }
  2136. return elts;
  2137. };
  2138. pp$22.parseBindingListItem = function(param) {
  2139. return param;
  2140. };
  2141. pp$22.parseMaybeDefault = function(startPos, startLoc, left) {
  2142. left = left || this.parseBindingAtom();
  2143. if (this.options.ecmaVersion < 6 || !this.eat(types2.eq)) {
  2144. return left;
  2145. }
  2146. var node2 = this.startNodeAt(startPos, startLoc);
  2147. node2.left = left;
  2148. node2.right = this.parseMaybeAssign();
  2149. return this.finishNode(node2, "AssignmentPattern");
  2150. };
  2151. pp$22.checkLVal = function(expr, bindingType, checkClashes) {
  2152. if (bindingType === void 0)
  2153. bindingType = BIND_NONE2;
  2154. switch (expr.type) {
  2155. case "Identifier":
  2156. if (bindingType === BIND_LEXICAL2 && expr.name === "let") {
  2157. this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name");
  2158. }
  2159. if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {
  2160. this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
  2161. }
  2162. if (checkClashes) {
  2163. if (has(checkClashes, expr.name)) {
  2164. this.raiseRecoverable(expr.start, "Argument name clash");
  2165. }
  2166. checkClashes[expr.name] = true;
  2167. }
  2168. if (bindingType !== BIND_NONE2 && bindingType !== BIND_OUTSIDE2) {
  2169. this.declareName(expr.name, bindingType, expr.start);
  2170. }
  2171. break;
  2172. case "ChainExpression":
  2173. this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
  2174. break;
  2175. case "MemberExpression":
  2176. if (bindingType) {
  2177. this.raiseRecoverable(expr.start, "Binding member expression");
  2178. }
  2179. break;
  2180. case "ObjectPattern":
  2181. for (var i = 0, list3 = expr.properties; i < list3.length; i += 1) {
  2182. var prop = list3[i];
  2183. this.checkLVal(prop, bindingType, checkClashes);
  2184. }
  2185. break;
  2186. case "Property":
  2187. this.checkLVal(expr.value, bindingType, checkClashes);
  2188. break;
  2189. case "ArrayPattern":
  2190. for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
  2191. var elem = list$1[i$1];
  2192. if (elem) {
  2193. this.checkLVal(elem, bindingType, checkClashes);
  2194. }
  2195. }
  2196. break;
  2197. case "AssignmentPattern":
  2198. this.checkLVal(expr.left, bindingType, checkClashes);
  2199. break;
  2200. case "RestElement":
  2201. this.checkLVal(expr.argument, bindingType, checkClashes);
  2202. break;
  2203. case "ParenthesizedExpression":
  2204. this.checkLVal(expr.expression, bindingType, checkClashes);
  2205. break;
  2206. default:
  2207. this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue");
  2208. }
  2209. };
  2210. pp$32 = Parser3.prototype;
  2211. pp$32.checkPropClash = function(prop, propHash, refDestructuringErrors) {
  2212. if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") {
  2213. return;
  2214. }
  2215. if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {
  2216. return;
  2217. }
  2218. var key2 = prop.key;
  2219. var name2;
  2220. switch (key2.type) {
  2221. case "Identifier":
  2222. name2 = key2.name;
  2223. break;
  2224. case "Literal":
  2225. name2 = String(key2.value);
  2226. break;
  2227. default:
  2228. return;
  2229. }
  2230. var kind = prop.kind;
  2231. if (this.options.ecmaVersion >= 6) {
  2232. if (name2 === "__proto__" && kind === "init") {
  2233. if (propHash.proto) {
  2234. if (refDestructuringErrors) {
  2235. if (refDestructuringErrors.doubleProto < 0) {
  2236. refDestructuringErrors.doubleProto = key2.start;
  2237. }
  2238. } else {
  2239. this.raiseRecoverable(key2.start, "Redefinition of __proto__ property");
  2240. }
  2241. }
  2242. propHash.proto = true;
  2243. }
  2244. return;
  2245. }
  2246. name2 = "$" + name2;
  2247. var other = propHash[name2];
  2248. if (other) {
  2249. var redefinition;
  2250. if (kind === "init") {
  2251. redefinition = this.strict && other.init || other.get || other.set;
  2252. } else {
  2253. redefinition = other.init || other[kind];
  2254. }
  2255. if (redefinition) {
  2256. this.raiseRecoverable(key2.start, "Redefinition of property");
  2257. }
  2258. } else {
  2259. other = propHash[name2] = {
  2260. init: false,
  2261. get: false,
  2262. set: false
  2263. };
  2264. }
  2265. other[kind] = true;
  2266. };
  2267. pp$32.parseExpression = function(noIn, refDestructuringErrors) {
  2268. var startPos = this.start, startLoc = this.startLoc;
  2269. var expr = this.parseMaybeAssign(noIn, refDestructuringErrors);
  2270. if (this.type === types2.comma) {
  2271. var node2 = this.startNodeAt(startPos, startLoc);
  2272. node2.expressions = [expr];
  2273. while (this.eat(types2.comma)) {
  2274. node2.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors));
  2275. }
  2276. return this.finishNode(node2, "SequenceExpression");
  2277. }
  2278. return expr;
  2279. };
  2280. pp$32.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
  2281. if (this.isContextual("yield")) {
  2282. if (this.inGenerator) {
  2283. return this.parseYield(noIn);
  2284. } else {
  2285. this.exprAllowed = false;
  2286. }
  2287. }
  2288. var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1;
  2289. if (refDestructuringErrors) {
  2290. oldParenAssign = refDestructuringErrors.parenthesizedAssign;
  2291. oldTrailingComma = refDestructuringErrors.trailingComma;
  2292. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
  2293. } else {
  2294. refDestructuringErrors = new DestructuringErrors3();
  2295. ownDestructuringErrors = true;
  2296. }
  2297. var startPos = this.start, startLoc = this.startLoc;
  2298. if (this.type === types2.parenL || this.type === types2.name) {
  2299. this.potentialArrowAt = this.start;
  2300. }
  2301. var left = this.parseMaybeConditional(noIn, refDestructuringErrors);
  2302. if (afterLeftParse) {
  2303. left = afterLeftParse.call(this, left, startPos, startLoc);
  2304. }
  2305. if (this.type.isAssign) {
  2306. var node2 = this.startNodeAt(startPos, startLoc);
  2307. node2.operator = this.value;
  2308. node2.left = this.type === types2.eq ? this.toAssignable(left, false, refDestructuringErrors) : left;
  2309. if (!ownDestructuringErrors) {
  2310. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
  2311. }
  2312. if (refDestructuringErrors.shorthandAssign >= node2.left.start) {
  2313. refDestructuringErrors.shorthandAssign = -1;
  2314. }
  2315. this.checkLVal(left);
  2316. this.next();
  2317. node2.right = this.parseMaybeAssign(noIn);
  2318. return this.finishNode(node2, "AssignmentExpression");
  2319. } else {
  2320. if (ownDestructuringErrors) {
  2321. this.checkExpressionErrors(refDestructuringErrors, true);
  2322. }
  2323. }
  2324. if (oldParenAssign > -1) {
  2325. refDestructuringErrors.parenthesizedAssign = oldParenAssign;
  2326. }
  2327. if (oldTrailingComma > -1) {
  2328. refDestructuringErrors.trailingComma = oldTrailingComma;
  2329. }
  2330. return left;
  2331. };
  2332. pp$32.parseMaybeConditional = function(noIn, refDestructuringErrors) {
  2333. var startPos = this.start, startLoc = this.startLoc;
  2334. var expr = this.parseExprOps(noIn, refDestructuringErrors);
  2335. if (this.checkExpressionErrors(refDestructuringErrors)) {
  2336. return expr;
  2337. }
  2338. if (this.eat(types2.question)) {
  2339. var node2 = this.startNodeAt(startPos, startLoc);
  2340. node2.test = expr;
  2341. node2.consequent = this.parseMaybeAssign();
  2342. this.expect(types2.colon);
  2343. node2.alternate = this.parseMaybeAssign(noIn);
  2344. return this.finishNode(node2, "ConditionalExpression");
  2345. }
  2346. return expr;
  2347. };
  2348. pp$32.parseExprOps = function(noIn, refDestructuringErrors) {
  2349. var startPos = this.start, startLoc = this.startLoc;
  2350. var expr = this.parseMaybeUnary(refDestructuringErrors, false);
  2351. if (this.checkExpressionErrors(refDestructuringErrors)) {
  2352. return expr;
  2353. }
  2354. return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn);
  2355. };
  2356. pp$32.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
  2357. var prec = this.type.binop;
  2358. if (prec != null && (!noIn || this.type !== types2._in)) {
  2359. if (prec > minPrec) {
  2360. var logical = this.type === types2.logicalOR || this.type === types2.logicalAND;
  2361. var coalesce = this.type === types2.coalesce;
  2362. if (coalesce) {
  2363. prec = types2.logicalAND.binop;
  2364. }
  2365. var op = this.value;
  2366. this.next();
  2367. var startPos = this.start, startLoc = this.startLoc;
  2368. var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn);
  2369. var node2 = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
  2370. if (logical && this.type === types2.coalesce || coalesce && (this.type === types2.logicalOR || this.type === types2.logicalAND)) {
  2371. this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
  2372. }
  2373. return this.parseExprOp(node2, leftStartPos, leftStartLoc, minPrec, noIn);
  2374. }
  2375. }
  2376. return left;
  2377. };
  2378. pp$32.buildBinary = function(startPos, startLoc, left, right, op, logical) {
  2379. var node2 = this.startNodeAt(startPos, startLoc);
  2380. node2.left = left;
  2381. node2.operator = op;
  2382. node2.right = right;
  2383. return this.finishNode(node2, logical ? "LogicalExpression" : "BinaryExpression");
  2384. };
  2385. pp$32.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
  2386. var startPos = this.start, startLoc = this.startLoc, expr;
  2387. if (this.isContextual("await") && (this.inAsync || !this.inFunction && this.options.allowAwaitOutsideFunction)) {
  2388. expr = this.parseAwait();
  2389. sawUnary = true;
  2390. } else if (this.type.prefix) {
  2391. var node2 = this.startNode(), update = this.type === types2.incDec;
  2392. node2.operator = this.value;
  2393. node2.prefix = true;
  2394. this.next();
  2395. node2.argument = this.parseMaybeUnary(null, true);
  2396. this.checkExpressionErrors(refDestructuringErrors, true);
  2397. if (update) {
  2398. this.checkLVal(node2.argument);
  2399. } else if (this.strict && node2.operator === "delete" && node2.argument.type === "Identifier") {
  2400. this.raiseRecoverable(node2.start, "Deleting local variable in strict mode");
  2401. } else {
  2402. sawUnary = true;
  2403. }
  2404. expr = this.finishNode(node2, update ? "UpdateExpression" : "UnaryExpression");
  2405. } else {
  2406. expr = this.parseExprSubscripts(refDestructuringErrors);
  2407. if (this.checkExpressionErrors(refDestructuringErrors)) {
  2408. return expr;
  2409. }
  2410. while (this.type.postfix && !this.canInsertSemicolon()) {
  2411. var node$1 = this.startNodeAt(startPos, startLoc);
  2412. node$1.operator = this.value;
  2413. node$1.prefix = false;
  2414. node$1.argument = expr;
  2415. this.checkLVal(expr);
  2416. this.next();
  2417. expr = this.finishNode(node$1, "UpdateExpression");
  2418. }
  2419. }
  2420. if (!sawUnary && this.eat(types2.starstar)) {
  2421. return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false);
  2422. } else {
  2423. return expr;
  2424. }
  2425. };
  2426. pp$32.parseExprSubscripts = function(refDestructuringErrors) {
  2427. var startPos = this.start, startLoc = this.startLoc;
  2428. var expr = this.parseExprAtom(refDestructuringErrors);
  2429. if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
  2430. return expr;
  2431. }
  2432. var result = this.parseSubscripts(expr, startPos, startLoc);
  2433. if (refDestructuringErrors && result.type === "MemberExpression") {
  2434. if (refDestructuringErrors.parenthesizedAssign >= result.start) {
  2435. refDestructuringErrors.parenthesizedAssign = -1;
  2436. }
  2437. if (refDestructuringErrors.parenthesizedBind >= result.start) {
  2438. refDestructuringErrors.parenthesizedBind = -1;
  2439. }
  2440. }
  2441. return result;
  2442. };
  2443. pp$32.parseSubscripts = function(base2, startPos, startLoc, noCalls) {
  2444. var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base2.type === "Identifier" && base2.name === "async" && this.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && this.potentialArrowAt === base2.start;
  2445. var optionalChained = false;
  2446. while (true) {
  2447. var element2 = this.parseSubscript(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained);
  2448. if (element2.optional) {
  2449. optionalChained = true;
  2450. }
  2451. if (element2 === base2 || element2.type === "ArrowFunctionExpression") {
  2452. if (optionalChained) {
  2453. var chainNode = this.startNodeAt(startPos, startLoc);
  2454. chainNode.expression = element2;
  2455. element2 = this.finishNode(chainNode, "ChainExpression");
  2456. }
  2457. return element2;
  2458. }
  2459. base2 = element2;
  2460. }
  2461. };
  2462. pp$32.parseSubscript = function(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained) {
  2463. var optionalSupported = this.options.ecmaVersion >= 11;
  2464. var optional = optionalSupported && this.eat(types2.questionDot);
  2465. if (noCalls && optional) {
  2466. this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
  2467. }
  2468. var computed = this.eat(types2.bracketL);
  2469. if (computed || optional && this.type !== types2.parenL && this.type !== types2.backQuote || this.eat(types2.dot)) {
  2470. var node2 = this.startNodeAt(startPos, startLoc);
  2471. node2.object = base2;
  2472. node2.property = computed ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== "never");
  2473. node2.computed = !!computed;
  2474. if (computed) {
  2475. this.expect(types2.bracketR);
  2476. }
  2477. if (optionalSupported) {
  2478. node2.optional = optional;
  2479. }
  2480. base2 = this.finishNode(node2, "MemberExpression");
  2481. } else if (!noCalls && this.eat(types2.parenL)) {
  2482. var refDestructuringErrors = new DestructuringErrors3(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  2483. this.yieldPos = 0;
  2484. this.awaitPos = 0;
  2485. this.awaitIdentPos = 0;
  2486. var exprList = this.parseExprList(types2.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
  2487. if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types2.arrow)) {
  2488. this.checkPatternErrors(refDestructuringErrors, false);
  2489. this.checkYieldAwaitInDefaultParams();
  2490. if (this.awaitIdentPos > 0) {
  2491. this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function");
  2492. }
  2493. this.yieldPos = oldYieldPos;
  2494. this.awaitPos = oldAwaitPos;
  2495. this.awaitIdentPos = oldAwaitIdentPos;
  2496. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true);
  2497. }
  2498. this.checkExpressionErrors(refDestructuringErrors, true);
  2499. this.yieldPos = oldYieldPos || this.yieldPos;
  2500. this.awaitPos = oldAwaitPos || this.awaitPos;
  2501. this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
  2502. var node$1 = this.startNodeAt(startPos, startLoc);
  2503. node$1.callee = base2;
  2504. node$1.arguments = exprList;
  2505. if (optionalSupported) {
  2506. node$1.optional = optional;
  2507. }
  2508. base2 = this.finishNode(node$1, "CallExpression");
  2509. } else if (this.type === types2.backQuote) {
  2510. if (optional || optionalChained) {
  2511. this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
  2512. }
  2513. var node$2 = this.startNodeAt(startPos, startLoc);
  2514. node$2.tag = base2;
  2515. node$2.quasi = this.parseTemplate({ isTagged: true });
  2516. base2 = this.finishNode(node$2, "TaggedTemplateExpression");
  2517. }
  2518. return base2;
  2519. };
  2520. pp$32.parseExprAtom = function(refDestructuringErrors) {
  2521. if (this.type === types2.slash) {
  2522. this.readRegexp();
  2523. }
  2524. var node2, canBeArrow = this.potentialArrowAt === this.start;
  2525. switch (this.type) {
  2526. case types2._super:
  2527. if (!this.allowSuper) {
  2528. this.raise(this.start, "'super' keyword outside a method");
  2529. }
  2530. node2 = this.startNode();
  2531. this.next();
  2532. if (this.type === types2.parenL && !this.allowDirectSuper) {
  2533. this.raise(node2.start, "super() call outside constructor of a subclass");
  2534. }
  2535. if (this.type !== types2.dot && this.type !== types2.bracketL && this.type !== types2.parenL) {
  2536. this.unexpected();
  2537. }
  2538. return this.finishNode(node2, "Super");
  2539. case types2._this:
  2540. node2 = this.startNode();
  2541. this.next();
  2542. return this.finishNode(node2, "ThisExpression");
  2543. case types2.name:
  2544. var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
  2545. var id = this.parseIdent(false);
  2546. if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types2._function)) {
  2547. return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true);
  2548. }
  2549. if (canBeArrow && !this.canInsertSemicolon()) {
  2550. if (this.eat(types2.arrow)) {
  2551. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false);
  2552. }
  2553. if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types2.name && !containsEsc) {
  2554. id = this.parseIdent(false);
  2555. if (this.canInsertSemicolon() || !this.eat(types2.arrow)) {
  2556. this.unexpected();
  2557. }
  2558. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true);
  2559. }
  2560. }
  2561. return id;
  2562. case types2.regexp:
  2563. var value2 = this.value;
  2564. node2 = this.parseLiteral(value2.value);
  2565. node2.regex = { pattern: value2.pattern, flags: value2.flags };
  2566. return node2;
  2567. case types2.num:
  2568. case types2.string:
  2569. return this.parseLiteral(this.value);
  2570. case types2._null:
  2571. case types2._true:
  2572. case types2._false:
  2573. node2 = this.startNode();
  2574. node2.value = this.type === types2._null ? null : this.type === types2._true;
  2575. node2.raw = this.type.keyword;
  2576. this.next();
  2577. return this.finishNode(node2, "Literal");
  2578. case types2.parenL:
  2579. var start3 = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow);
  2580. if (refDestructuringErrors) {
  2581. if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {
  2582. refDestructuringErrors.parenthesizedAssign = start3;
  2583. }
  2584. if (refDestructuringErrors.parenthesizedBind < 0) {
  2585. refDestructuringErrors.parenthesizedBind = start3;
  2586. }
  2587. }
  2588. return expr;
  2589. case types2.bracketL:
  2590. node2 = this.startNode();
  2591. this.next();
  2592. node2.elements = this.parseExprList(types2.bracketR, true, true, refDestructuringErrors);
  2593. return this.finishNode(node2, "ArrayExpression");
  2594. case types2.braceL:
  2595. return this.parseObj(false, refDestructuringErrors);
  2596. case types2._function:
  2597. node2 = this.startNode();
  2598. this.next();
  2599. return this.parseFunction(node2, 0);
  2600. case types2._class:
  2601. return this.parseClass(this.startNode(), false);
  2602. case types2._new:
  2603. return this.parseNew();
  2604. case types2.backQuote:
  2605. return this.parseTemplate();
  2606. case types2._import:
  2607. if (this.options.ecmaVersion >= 11) {
  2608. return this.parseExprImport();
  2609. } else {
  2610. return this.unexpected();
  2611. }
  2612. default:
  2613. this.unexpected();
  2614. }
  2615. };
  2616. pp$32.parseExprImport = function() {
  2617. var node2 = this.startNode();
  2618. if (this.containsEsc) {
  2619. this.raiseRecoverable(this.start, "Escape sequence in keyword import");
  2620. }
  2621. var meta = this.parseIdent(true);
  2622. switch (this.type) {
  2623. case types2.parenL:
  2624. return this.parseDynamicImport(node2);
  2625. case types2.dot:
  2626. node2.meta = meta;
  2627. return this.parseImportMeta(node2);
  2628. default:
  2629. this.unexpected();
  2630. }
  2631. };
  2632. pp$32.parseDynamicImport = function(node2) {
  2633. this.next();
  2634. node2.source = this.parseMaybeAssign();
  2635. if (!this.eat(types2.parenR)) {
  2636. var errorPos = this.start;
  2637. if (this.eat(types2.comma) && this.eat(types2.parenR)) {
  2638. this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
  2639. } else {
  2640. this.unexpected(errorPos);
  2641. }
  2642. }
  2643. return this.finishNode(node2, "ImportExpression");
  2644. };
  2645. pp$32.parseImportMeta = function(node2) {
  2646. this.next();
  2647. var containsEsc = this.containsEsc;
  2648. node2.property = this.parseIdent(true);
  2649. if (node2.property.name !== "meta") {
  2650. this.raiseRecoverable(node2.property.start, "The only valid meta property for import is 'import.meta'");
  2651. }
  2652. if (containsEsc) {
  2653. this.raiseRecoverable(node2.start, "'import.meta' must not contain escaped characters");
  2654. }
  2655. if (this.options.sourceType !== "module") {
  2656. this.raiseRecoverable(node2.start, "Cannot use 'import.meta' outside a module");
  2657. }
  2658. return this.finishNode(node2, "MetaProperty");
  2659. };
  2660. pp$32.parseLiteral = function(value2) {
  2661. var node2 = this.startNode();
  2662. node2.value = value2;
  2663. node2.raw = this.input.slice(this.start, this.end);
  2664. if (node2.raw.charCodeAt(node2.raw.length - 1) === 110) {
  2665. node2.bigint = node2.raw.slice(0, -1).replace(/_/g, "");
  2666. }
  2667. this.next();
  2668. return this.finishNode(node2, "Literal");
  2669. };
  2670. pp$32.parseParenExpression = function() {
  2671. this.expect(types2.parenL);
  2672. var val = this.parseExpression();
  2673. this.expect(types2.parenR);
  2674. return val;
  2675. };
  2676. pp$32.parseParenAndDistinguishExpression = function(canBeArrow) {
  2677. var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
  2678. if (this.options.ecmaVersion >= 6) {
  2679. this.next();
  2680. var innerStartPos = this.start, innerStartLoc = this.startLoc;
  2681. var exprList = [], first = true, lastIsComma = false;
  2682. var refDestructuringErrors = new DestructuringErrors3(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
  2683. this.yieldPos = 0;
  2684. this.awaitPos = 0;
  2685. while (this.type !== types2.parenR) {
  2686. first ? first = false : this.expect(types2.comma);
  2687. if (allowTrailingComma && this.afterTrailingComma(types2.parenR, true)) {
  2688. lastIsComma = true;
  2689. break;
  2690. } else if (this.type === types2.ellipsis) {
  2691. spreadStart = this.start;
  2692. exprList.push(this.parseParenItem(this.parseRestBinding()));
  2693. if (this.type === types2.comma) {
  2694. this.raise(this.start, "Comma is not permitted after the rest element");
  2695. }
  2696. break;
  2697. } else {
  2698. exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
  2699. }
  2700. }
  2701. var innerEndPos = this.start, innerEndLoc = this.startLoc;
  2702. this.expect(types2.parenR);
  2703. if (canBeArrow && !this.canInsertSemicolon() && this.eat(types2.arrow)) {
  2704. this.checkPatternErrors(refDestructuringErrors, false);
  2705. this.checkYieldAwaitInDefaultParams();
  2706. this.yieldPos = oldYieldPos;
  2707. this.awaitPos = oldAwaitPos;
  2708. return this.parseParenArrowList(startPos, startLoc, exprList);
  2709. }
  2710. if (!exprList.length || lastIsComma) {
  2711. this.unexpected(this.lastTokStart);
  2712. }
  2713. if (spreadStart) {
  2714. this.unexpected(spreadStart);
  2715. }
  2716. this.checkExpressionErrors(refDestructuringErrors, true);
  2717. this.yieldPos = oldYieldPos || this.yieldPos;
  2718. this.awaitPos = oldAwaitPos || this.awaitPos;
  2719. if (exprList.length > 1) {
  2720. val = this.startNodeAt(innerStartPos, innerStartLoc);
  2721. val.expressions = exprList;
  2722. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  2723. } else {
  2724. val = exprList[0];
  2725. }
  2726. } else {
  2727. val = this.parseParenExpression();
  2728. }
  2729. if (this.options.preserveParens) {
  2730. var par = this.startNodeAt(startPos, startLoc);
  2731. par.expression = val;
  2732. return this.finishNode(par, "ParenthesizedExpression");
  2733. } else {
  2734. return val;
  2735. }
  2736. };
  2737. pp$32.parseParenItem = function(item) {
  2738. return item;
  2739. };
  2740. pp$32.parseParenArrowList = function(startPos, startLoc, exprList) {
  2741. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList);
  2742. };
  2743. empty$12 = [];
  2744. pp$32.parseNew = function() {
  2745. if (this.containsEsc) {
  2746. this.raiseRecoverable(this.start, "Escape sequence in keyword new");
  2747. }
  2748. var node2 = this.startNode();
  2749. var meta = this.parseIdent(true);
  2750. if (this.options.ecmaVersion >= 6 && this.eat(types2.dot)) {
  2751. node2.meta = meta;
  2752. var containsEsc = this.containsEsc;
  2753. node2.property = this.parseIdent(true);
  2754. if (node2.property.name !== "target") {
  2755. this.raiseRecoverable(node2.property.start, "The only valid meta property for new is 'new.target'");
  2756. }
  2757. if (containsEsc) {
  2758. this.raiseRecoverable(node2.start, "'new.target' must not contain escaped characters");
  2759. }
  2760. if (!this.inNonArrowFunction()) {
  2761. this.raiseRecoverable(node2.start, "'new.target' can only be used in functions");
  2762. }
  2763. return this.finishNode(node2, "MetaProperty");
  2764. }
  2765. var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types2._import;
  2766. node2.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  2767. if (isImport && node2.callee.type === "ImportExpression") {
  2768. this.raise(startPos, "Cannot use new with import()");
  2769. }
  2770. if (this.eat(types2.parenL)) {
  2771. node2.arguments = this.parseExprList(types2.parenR, this.options.ecmaVersion >= 8, false);
  2772. } else {
  2773. node2.arguments = empty$12;
  2774. }
  2775. return this.finishNode(node2, "NewExpression");
  2776. };
  2777. pp$32.parseTemplateElement = function(ref3) {
  2778. var isTagged = ref3.isTagged;
  2779. var elem = this.startNode();
  2780. if (this.type === types2.invalidTemplate) {
  2781. if (!isTagged) {
  2782. this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
  2783. }
  2784. elem.value = {
  2785. raw: this.value,
  2786. cooked: null
  2787. };
  2788. } else {
  2789. elem.value = {
  2790. raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
  2791. cooked: this.value
  2792. };
  2793. }
  2794. this.next();
  2795. elem.tail = this.type === types2.backQuote;
  2796. return this.finishNode(elem, "TemplateElement");
  2797. };
  2798. pp$32.parseTemplate = function(ref3) {
  2799. if (ref3 === void 0)
  2800. ref3 = {};
  2801. var isTagged = ref3.isTagged;
  2802. if (isTagged === void 0)
  2803. isTagged = false;
  2804. var node2 = this.startNode();
  2805. this.next();
  2806. node2.expressions = [];
  2807. var curElt = this.parseTemplateElement({ isTagged });
  2808. node2.quasis = [curElt];
  2809. while (!curElt.tail) {
  2810. if (this.type === types2.eof) {
  2811. this.raise(this.pos, "Unterminated template literal");
  2812. }
  2813. this.expect(types2.dollarBraceL);
  2814. node2.expressions.push(this.parseExpression());
  2815. this.expect(types2.braceR);
  2816. node2.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
  2817. }
  2818. this.next();
  2819. return this.finishNode(node2, "TemplateLiteral");
  2820. };
  2821. pp$32.isAsyncProp = function(prop) {
  2822. return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types2.name || this.type === types2.num || this.type === types2.string || this.type === types2.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types2.star) && !lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
  2823. };
  2824. pp$32.parseObj = function(isPattern, refDestructuringErrors) {
  2825. var node2 = this.startNode(), first = true, propHash = {};
  2826. node2.properties = [];
  2827. this.next();
  2828. while (!this.eat(types2.braceR)) {
  2829. if (!first) {
  2830. this.expect(types2.comma);
  2831. if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types2.braceR)) {
  2832. break;
  2833. }
  2834. } else {
  2835. first = false;
  2836. }
  2837. var prop = this.parseProperty(isPattern, refDestructuringErrors);
  2838. if (!isPattern) {
  2839. this.checkPropClash(prop, propHash, refDestructuringErrors);
  2840. }
  2841. node2.properties.push(prop);
  2842. }
  2843. return this.finishNode(node2, isPattern ? "ObjectPattern" : "ObjectExpression");
  2844. };
  2845. pp$32.parseProperty = function(isPattern, refDestructuringErrors) {
  2846. var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
  2847. if (this.options.ecmaVersion >= 9 && this.eat(types2.ellipsis)) {
  2848. if (isPattern) {
  2849. prop.argument = this.parseIdent(false);
  2850. if (this.type === types2.comma) {
  2851. this.raise(this.start, "Comma is not permitted after the rest element");
  2852. }
  2853. return this.finishNode(prop, "RestElement");
  2854. }
  2855. if (this.type === types2.parenL && refDestructuringErrors) {
  2856. if (refDestructuringErrors.parenthesizedAssign < 0) {
  2857. refDestructuringErrors.parenthesizedAssign = this.start;
  2858. }
  2859. if (refDestructuringErrors.parenthesizedBind < 0) {
  2860. refDestructuringErrors.parenthesizedBind = this.start;
  2861. }
  2862. }
  2863. prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  2864. if (this.type === types2.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
  2865. refDestructuringErrors.trailingComma = this.start;
  2866. }
  2867. return this.finishNode(prop, "SpreadElement");
  2868. }
  2869. if (this.options.ecmaVersion >= 6) {
  2870. prop.method = false;
  2871. prop.shorthand = false;
  2872. if (isPattern || refDestructuringErrors) {
  2873. startPos = this.start;
  2874. startLoc = this.startLoc;
  2875. }
  2876. if (!isPattern) {
  2877. isGenerator = this.eat(types2.star);
  2878. }
  2879. }
  2880. var containsEsc = this.containsEsc;
  2881. this.parsePropertyName(prop);
  2882. if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
  2883. isAsync = true;
  2884. isGenerator = this.options.ecmaVersion >= 9 && this.eat(types2.star);
  2885. this.parsePropertyName(prop, refDestructuringErrors);
  2886. } else {
  2887. isAsync = false;
  2888. }
  2889. this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
  2890. return this.finishNode(prop, "Property");
  2891. };
  2892. pp$32.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
  2893. if ((isGenerator || isAsync) && this.type === types2.colon) {
  2894. this.unexpected();
  2895. }
  2896. if (this.eat(types2.colon)) {
  2897. prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
  2898. prop.kind = "init";
  2899. } else if (this.options.ecmaVersion >= 6 && this.type === types2.parenL) {
  2900. if (isPattern) {
  2901. this.unexpected();
  2902. }
  2903. prop.kind = "init";
  2904. prop.method = true;
  2905. prop.value = this.parseMethod(isGenerator, isAsync);
  2906. } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types2.comma && this.type !== types2.braceR && this.type !== types2.eq)) {
  2907. if (isGenerator || isAsync) {
  2908. this.unexpected();
  2909. }
  2910. prop.kind = prop.key.name;
  2911. this.parsePropertyName(prop);
  2912. prop.value = this.parseMethod(false);
  2913. var paramCount = prop.kind === "get" ? 0 : 1;
  2914. if (prop.value.params.length !== paramCount) {
  2915. var start3 = prop.value.start;
  2916. if (prop.kind === "get") {
  2917. this.raiseRecoverable(start3, "getter should have no params");
  2918. } else {
  2919. this.raiseRecoverable(start3, "setter should have exactly one param");
  2920. }
  2921. } else {
  2922. if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
  2923. this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
  2924. }
  2925. }
  2926. } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
  2927. if (isGenerator || isAsync) {
  2928. this.unexpected();
  2929. }
  2930. this.checkUnreserved(prop.key);
  2931. if (prop.key.name === "await" && !this.awaitIdentPos) {
  2932. this.awaitIdentPos = startPos;
  2933. }
  2934. prop.kind = "init";
  2935. if (isPattern) {
  2936. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
  2937. } else if (this.type === types2.eq && refDestructuringErrors) {
  2938. if (refDestructuringErrors.shorthandAssign < 0) {
  2939. refDestructuringErrors.shorthandAssign = this.start;
  2940. }
  2941. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
  2942. } else {
  2943. prop.value = prop.key;
  2944. }
  2945. prop.shorthand = true;
  2946. } else {
  2947. this.unexpected();
  2948. }
  2949. };
  2950. pp$32.parsePropertyName = function(prop) {
  2951. if (this.options.ecmaVersion >= 6) {
  2952. if (this.eat(types2.bracketL)) {
  2953. prop.computed = true;
  2954. prop.key = this.parseMaybeAssign();
  2955. this.expect(types2.bracketR);
  2956. return prop.key;
  2957. } else {
  2958. prop.computed = false;
  2959. }
  2960. }
  2961. return prop.key = this.type === types2.num || this.type === types2.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
  2962. };
  2963. pp$32.initFunction = function(node2) {
  2964. node2.id = null;
  2965. if (this.options.ecmaVersion >= 6) {
  2966. node2.generator = node2.expression = false;
  2967. }
  2968. if (this.options.ecmaVersion >= 8) {
  2969. node2.async = false;
  2970. }
  2971. };
  2972. pp$32.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
  2973. var node2 = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  2974. this.initFunction(node2);
  2975. if (this.options.ecmaVersion >= 6) {
  2976. node2.generator = isGenerator;
  2977. }
  2978. if (this.options.ecmaVersion >= 8) {
  2979. node2.async = !!isAsync;
  2980. }
  2981. this.yieldPos = 0;
  2982. this.awaitPos = 0;
  2983. this.awaitIdentPos = 0;
  2984. this.enterScope(functionFlags2(isAsync, node2.generator) | SCOPE_SUPER2 | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0));
  2985. this.expect(types2.parenL);
  2986. node2.params = this.parseBindingList(types2.parenR, false, this.options.ecmaVersion >= 8);
  2987. this.checkYieldAwaitInDefaultParams();
  2988. this.parseFunctionBody(node2, false, true);
  2989. this.yieldPos = oldYieldPos;
  2990. this.awaitPos = oldAwaitPos;
  2991. this.awaitIdentPos = oldAwaitIdentPos;
  2992. return this.finishNode(node2, "FunctionExpression");
  2993. };
  2994. pp$32.parseArrowExpression = function(node2, params, isAsync) {
  2995. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  2996. this.enterScope(functionFlags2(isAsync, false) | SCOPE_ARROW2);
  2997. this.initFunction(node2);
  2998. if (this.options.ecmaVersion >= 8) {
  2999. node2.async = !!isAsync;
  3000. }
  3001. this.yieldPos = 0;
  3002. this.awaitPos = 0;
  3003. this.awaitIdentPos = 0;
  3004. node2.params = this.toAssignableList(params, true);
  3005. this.parseFunctionBody(node2, true, false);
  3006. this.yieldPos = oldYieldPos;
  3007. this.awaitPos = oldAwaitPos;
  3008. this.awaitIdentPos = oldAwaitIdentPos;
  3009. return this.finishNode(node2, "ArrowFunctionExpression");
  3010. };
  3011. pp$32.parseFunctionBody = function(node2, isArrowFunction, isMethod) {
  3012. var isExpression = isArrowFunction && this.type !== types2.braceL;
  3013. var oldStrict = this.strict, useStrict = false;
  3014. if (isExpression) {
  3015. node2.body = this.parseMaybeAssign();
  3016. node2.expression = true;
  3017. this.checkParams(node2, false);
  3018. } else {
  3019. var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node2.params);
  3020. if (!oldStrict || nonSimple) {
  3021. useStrict = this.strictDirective(this.end);
  3022. if (useStrict && nonSimple) {
  3023. this.raiseRecoverable(node2.start, "Illegal 'use strict' directive in function with non-simple parameter list");
  3024. }
  3025. }
  3026. var oldLabels = this.labels;
  3027. this.labels = [];
  3028. if (useStrict) {
  3029. this.strict = true;
  3030. }
  3031. this.checkParams(node2, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node2.params));
  3032. if (this.strict && node2.id) {
  3033. this.checkLVal(node2.id, BIND_OUTSIDE2);
  3034. }
  3035. node2.body = this.parseBlock(false, void 0, useStrict && !oldStrict);
  3036. node2.expression = false;
  3037. this.adaptDirectivePrologue(node2.body.body);
  3038. this.labels = oldLabels;
  3039. }
  3040. this.exitScope();
  3041. };
  3042. pp$32.isSimpleParamList = function(params) {
  3043. for (var i = 0, list3 = params; i < list3.length; i += 1) {
  3044. var param = list3[i];
  3045. if (param.type !== "Identifier") {
  3046. return false;
  3047. }
  3048. }
  3049. return true;
  3050. };
  3051. pp$32.checkParams = function(node2, allowDuplicates) {
  3052. var nameHash = {};
  3053. for (var i = 0, list3 = node2.params; i < list3.length; i += 1) {
  3054. var param = list3[i];
  3055. this.checkLVal(param, BIND_VAR2, allowDuplicates ? null : nameHash);
  3056. }
  3057. };
  3058. pp$32.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
  3059. var elts = [], first = true;
  3060. while (!this.eat(close)) {
  3061. if (!first) {
  3062. this.expect(types2.comma);
  3063. if (allowTrailingComma && this.afterTrailingComma(close)) {
  3064. break;
  3065. }
  3066. } else {
  3067. first = false;
  3068. }
  3069. var elt = void 0;
  3070. if (allowEmpty && this.type === types2.comma) {
  3071. elt = null;
  3072. } else if (this.type === types2.ellipsis) {
  3073. elt = this.parseSpread(refDestructuringErrors);
  3074. if (refDestructuringErrors && this.type === types2.comma && refDestructuringErrors.trailingComma < 0) {
  3075. refDestructuringErrors.trailingComma = this.start;
  3076. }
  3077. } else {
  3078. elt = this.parseMaybeAssign(false, refDestructuringErrors);
  3079. }
  3080. elts.push(elt);
  3081. }
  3082. return elts;
  3083. };
  3084. pp$32.checkUnreserved = function(ref3) {
  3085. var start3 = ref3.start;
  3086. var end = ref3.end;
  3087. var name2 = ref3.name;
  3088. if (this.inGenerator && name2 === "yield") {
  3089. this.raiseRecoverable(start3, "Cannot use 'yield' as identifier inside a generator");
  3090. }
  3091. if (this.inAsync && name2 === "await") {
  3092. this.raiseRecoverable(start3, "Cannot use 'await' as identifier inside an async function");
  3093. }
  3094. if (this.keywords.test(name2)) {
  3095. this.raise(start3, "Unexpected keyword '" + name2 + "'");
  3096. }
  3097. if (this.options.ecmaVersion < 6 && this.input.slice(start3, end).indexOf("\\") !== -1) {
  3098. return;
  3099. }
  3100. var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
  3101. if (re.test(name2)) {
  3102. if (!this.inAsync && name2 === "await") {
  3103. this.raiseRecoverable(start3, "Cannot use keyword 'await' outside an async function");
  3104. }
  3105. this.raiseRecoverable(start3, "The keyword '" + name2 + "' is reserved");
  3106. }
  3107. };
  3108. pp$32.parseIdent = function(liberal, isBinding) {
  3109. var node2 = this.startNode();
  3110. if (this.type === types2.name) {
  3111. node2.name = this.value;
  3112. } else if (this.type.keyword) {
  3113. node2.name = this.type.keyword;
  3114. if ((node2.name === "class" || node2.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
  3115. this.context.pop();
  3116. }
  3117. } else {
  3118. this.unexpected();
  3119. }
  3120. this.next(!!liberal);
  3121. this.finishNode(node2, "Identifier");
  3122. if (!liberal) {
  3123. this.checkUnreserved(node2);
  3124. if (node2.name === "await" && !this.awaitIdentPos) {
  3125. this.awaitIdentPos = node2.start;
  3126. }
  3127. }
  3128. return node2;
  3129. };
  3130. pp$32.parseYield = function(noIn) {
  3131. if (!this.yieldPos) {
  3132. this.yieldPos = this.start;
  3133. }
  3134. var node2 = this.startNode();
  3135. this.next();
  3136. if (this.type === types2.semi || this.canInsertSemicolon() || this.type !== types2.star && !this.type.startsExpr) {
  3137. node2.delegate = false;
  3138. node2.argument = null;
  3139. } else {
  3140. node2.delegate = this.eat(types2.star);
  3141. node2.argument = this.parseMaybeAssign(noIn);
  3142. }
  3143. return this.finishNode(node2, "YieldExpression");
  3144. };
  3145. pp$32.parseAwait = function() {
  3146. if (!this.awaitPos) {
  3147. this.awaitPos = this.start;
  3148. }
  3149. var node2 = this.startNode();
  3150. this.next();
  3151. node2.argument = this.parseMaybeUnary(null, false);
  3152. return this.finishNode(node2, "AwaitExpression");
  3153. };
  3154. pp$42 = Parser3.prototype;
  3155. pp$42.raise = function(pos2, message) {
  3156. var loc = getLineInfo2(this.input, pos2);
  3157. message += " (" + loc.line + ":" + loc.column + ")";
  3158. var err = new SyntaxError(message);
  3159. err.pos = pos2;
  3160. err.loc = loc;
  3161. err.raisedAt = this.pos;
  3162. throw err;
  3163. };
  3164. pp$42.raiseRecoverable = pp$42.raise;
  3165. pp$42.curPosition = function() {
  3166. if (this.options.locations) {
  3167. return new Position3(this.curLine, this.pos - this.lineStart);
  3168. }
  3169. };
  3170. pp$52 = Parser3.prototype;
  3171. Scope3 = function Scope4(flags) {
  3172. this.flags = flags;
  3173. this.var = [];
  3174. this.lexical = [];
  3175. this.functions = [];
  3176. };
  3177. pp$52.enterScope = function(flags) {
  3178. this.scopeStack.push(new Scope3(flags));
  3179. };
  3180. pp$52.exitScope = function() {
  3181. this.scopeStack.pop();
  3182. };
  3183. pp$52.treatFunctionsAsVarInScope = function(scope) {
  3184. return scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_TOP2;
  3185. };
  3186. pp$52.declareName = function(name2, bindingType, pos2) {
  3187. var redeclared = false;
  3188. if (bindingType === BIND_LEXICAL2) {
  3189. var scope = this.currentScope();
  3190. redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1;
  3191. scope.lexical.push(name2);
  3192. if (this.inModule && scope.flags & SCOPE_TOP2) {
  3193. delete this.undefinedExports[name2];
  3194. }
  3195. } else if (bindingType === BIND_SIMPLE_CATCH2) {
  3196. var scope$1 = this.currentScope();
  3197. scope$1.lexical.push(name2);
  3198. } else if (bindingType === BIND_FUNCTION2) {
  3199. var scope$2 = this.currentScope();
  3200. if (this.treatFunctionsAsVar) {
  3201. redeclared = scope$2.lexical.indexOf(name2) > -1;
  3202. } else {
  3203. redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1;
  3204. }
  3205. scope$2.functions.push(name2);
  3206. } else {
  3207. for (var i = this.scopeStack.length - 1; i >= 0; --i) {
  3208. var scope$3 = this.scopeStack[i];
  3209. if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH2 && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) {
  3210. redeclared = true;
  3211. break;
  3212. }
  3213. scope$3.var.push(name2);
  3214. if (this.inModule && scope$3.flags & SCOPE_TOP2) {
  3215. delete this.undefinedExports[name2];
  3216. }
  3217. if (scope$3.flags & SCOPE_VAR2) {
  3218. break;
  3219. }
  3220. }
  3221. }
  3222. if (redeclared) {
  3223. this.raiseRecoverable(pos2, "Identifier '" + name2 + "' has already been declared");
  3224. }
  3225. };
  3226. pp$52.checkLocalExport = function(id) {
  3227. if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) {
  3228. this.undefinedExports[id.name] = id;
  3229. }
  3230. };
  3231. pp$52.currentScope = function() {
  3232. return this.scopeStack[this.scopeStack.length - 1];
  3233. };
  3234. pp$52.currentVarScope = function() {
  3235. for (var i = this.scopeStack.length - 1; ; i--) {
  3236. var scope = this.scopeStack[i];
  3237. if (scope.flags & SCOPE_VAR2) {
  3238. return scope;
  3239. }
  3240. }
  3241. };
  3242. pp$52.currentThisScope = function() {
  3243. for (var i = this.scopeStack.length - 1; ; i--) {
  3244. var scope = this.scopeStack[i];
  3245. if (scope.flags & SCOPE_VAR2 && !(scope.flags & SCOPE_ARROW2)) {
  3246. return scope;
  3247. }
  3248. }
  3249. };
  3250. Node3 = function Node4(parser, pos2, loc) {
  3251. this.type = "";
  3252. this.start = pos2;
  3253. this.end = 0;
  3254. if (parser.options.locations) {
  3255. this.loc = new SourceLocation3(parser, loc);
  3256. }
  3257. if (parser.options.directSourceFile) {
  3258. this.sourceFile = parser.options.directSourceFile;
  3259. }
  3260. if (parser.options.ranges) {
  3261. this.range = [pos2, 0];
  3262. }
  3263. };
  3264. pp$62 = Parser3.prototype;
  3265. pp$62.startNode = function() {
  3266. return new Node3(this, this.start, this.startLoc);
  3267. };
  3268. pp$62.startNodeAt = function(pos2, loc) {
  3269. return new Node3(this, pos2, loc);
  3270. };
  3271. pp$62.finishNode = function(node2, type) {
  3272. return finishNodeAt2.call(this, node2, type, this.lastTokEnd, this.lastTokEndLoc);
  3273. };
  3274. pp$62.finishNodeAt = function(node2, type, pos2, loc) {
  3275. return finishNodeAt2.call(this, node2, type, pos2, loc);
  3276. };
  3277. TokContext3 = function TokContext4(token2, isExpr, preserveSpace, override, generator) {
  3278. this.token = token2;
  3279. this.isExpr = !!isExpr;
  3280. this.preserveSpace = !!preserveSpace;
  3281. this.override = override;
  3282. this.generator = !!generator;
  3283. };
  3284. types$12 = {
  3285. b_stat: new TokContext3("{", false),
  3286. b_expr: new TokContext3("{", true),
  3287. b_tmpl: new TokContext3("${", false),
  3288. p_stat: new TokContext3("(", false),
  3289. p_expr: new TokContext3("(", true),
  3290. q_tmpl: new TokContext3("`", true, true, function(p) {
  3291. return p.tryReadTemplateToken();
  3292. }),
  3293. f_stat: new TokContext3("function", false),
  3294. f_expr: new TokContext3("function", true),
  3295. f_expr_gen: new TokContext3("function", true, false, null, true),
  3296. f_gen: new TokContext3("function", false, false, null, true)
  3297. };
  3298. pp$72 = Parser3.prototype;
  3299. pp$72.initialContext = function() {
  3300. return [types$12.b_stat];
  3301. };
  3302. pp$72.braceIsBlock = function(prevType) {
  3303. var parent = this.curContext();
  3304. if (parent === types$12.f_expr || parent === types$12.f_stat) {
  3305. return true;
  3306. }
  3307. if (prevType === types2.colon && (parent === types$12.b_stat || parent === types$12.b_expr)) {
  3308. return !parent.isExpr;
  3309. }
  3310. if (prevType === types2._return || prevType === types2.name && this.exprAllowed) {
  3311. return lineBreak2.test(this.input.slice(this.lastTokEnd, this.start));
  3312. }
  3313. if (prevType === types2._else || prevType === types2.semi || prevType === types2.eof || prevType === types2.parenR || prevType === types2.arrow) {
  3314. return true;
  3315. }
  3316. if (prevType === types2.braceL) {
  3317. return parent === types$12.b_stat;
  3318. }
  3319. if (prevType === types2._var || prevType === types2._const || prevType === types2.name) {
  3320. return false;
  3321. }
  3322. return !this.exprAllowed;
  3323. };
  3324. pp$72.inGeneratorContext = function() {
  3325. for (var i = this.context.length - 1; i >= 1; i--) {
  3326. var context = this.context[i];
  3327. if (context.token === "function") {
  3328. return context.generator;
  3329. }
  3330. }
  3331. return false;
  3332. };
  3333. pp$72.updateContext = function(prevType) {
  3334. var update, type = this.type;
  3335. if (type.keyword && prevType === types2.dot) {
  3336. this.exprAllowed = false;
  3337. } else if (update = type.updateContext) {
  3338. update.call(this, prevType);
  3339. } else {
  3340. this.exprAllowed = type.beforeExpr;
  3341. }
  3342. };
  3343. types2.parenR.updateContext = types2.braceR.updateContext = function() {
  3344. if (this.context.length === 1) {
  3345. this.exprAllowed = true;
  3346. return;
  3347. }
  3348. var out = this.context.pop();
  3349. if (out === types$12.b_stat && this.curContext().token === "function") {
  3350. out = this.context.pop();
  3351. }
  3352. this.exprAllowed = !out.isExpr;
  3353. };
  3354. types2.braceL.updateContext = function(prevType) {
  3355. this.context.push(this.braceIsBlock(prevType) ? types$12.b_stat : types$12.b_expr);
  3356. this.exprAllowed = true;
  3357. };
  3358. types2.dollarBraceL.updateContext = function() {
  3359. this.context.push(types$12.b_tmpl);
  3360. this.exprAllowed = true;
  3361. };
  3362. types2.parenL.updateContext = function(prevType) {
  3363. var statementParens = prevType === types2._if || prevType === types2._for || prevType === types2._with || prevType === types2._while;
  3364. this.context.push(statementParens ? types$12.p_stat : types$12.p_expr);
  3365. this.exprAllowed = true;
  3366. };
  3367. types2.incDec.updateContext = function() {
  3368. };
  3369. types2._function.updateContext = types2._class.updateContext = function(prevType) {
  3370. if (prevType.beforeExpr && prevType !== types2.semi && prevType !== types2._else && !(prevType === types2._return && lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types2.colon || prevType === types2.braceL) && this.curContext() === types$12.b_stat)) {
  3371. this.context.push(types$12.f_expr);
  3372. } else {
  3373. this.context.push(types$12.f_stat);
  3374. }
  3375. this.exprAllowed = false;
  3376. };
  3377. types2.backQuote.updateContext = function() {
  3378. if (this.curContext() === types$12.q_tmpl) {
  3379. this.context.pop();
  3380. } else {
  3381. this.context.push(types$12.q_tmpl);
  3382. }
  3383. this.exprAllowed = false;
  3384. };
  3385. types2.star.updateContext = function(prevType) {
  3386. if (prevType === types2._function) {
  3387. var index2 = this.context.length - 1;
  3388. if (this.context[index2] === types$12.f_expr) {
  3389. this.context[index2] = types$12.f_expr_gen;
  3390. } else {
  3391. this.context[index2] = types$12.f_gen;
  3392. }
  3393. }
  3394. this.exprAllowed = true;
  3395. };
  3396. types2.name.updateContext = function(prevType) {
  3397. var allowed = false;
  3398. if (this.options.ecmaVersion >= 6 && prevType !== types2.dot) {
  3399. if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) {
  3400. allowed = true;
  3401. }
  3402. }
  3403. this.exprAllowed = allowed;
  3404. };
  3405. ecma9BinaryProperties2 = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
  3406. ecma10BinaryProperties2 = ecma9BinaryProperties2 + " Extended_Pictographic";
  3407. ecma11BinaryProperties2 = ecma10BinaryProperties2;
  3408. unicodeBinaryProperties2 = {
  3409. 9: ecma9BinaryProperties2,
  3410. 10: ecma10BinaryProperties2,
  3411. 11: ecma11BinaryProperties2
  3412. };
  3413. unicodeGeneralCategoryValues2 = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
  3414. ecma9ScriptValues2 = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
  3415. ecma10ScriptValues2 = ecma9ScriptValues2 + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
  3416. ecma11ScriptValues2 = ecma10ScriptValues2 + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
  3417. unicodeScriptValues2 = {
  3418. 9: ecma9ScriptValues2,
  3419. 10: ecma10ScriptValues2,
  3420. 11: ecma11ScriptValues2
  3421. };
  3422. data2 = {};
  3423. buildUnicodeData2(9);
  3424. buildUnicodeData2(10);
  3425. buildUnicodeData2(11);
  3426. pp$82 = Parser3.prototype;
  3427. RegExpValidationState3 = function RegExpValidationState4(parser) {
  3428. this.parser = parser;
  3429. this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "");
  3430. this.unicodeProperties = data2[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion];
  3431. this.source = "";
  3432. this.flags = "";
  3433. this.start = 0;
  3434. this.switchU = false;
  3435. this.switchN = false;
  3436. this.pos = 0;
  3437. this.lastIntValue = 0;
  3438. this.lastStringValue = "";
  3439. this.lastAssertionIsQuantifiable = false;
  3440. this.numCapturingParens = 0;
  3441. this.maxBackReference = 0;
  3442. this.groupNames = [];
  3443. this.backReferenceNames = [];
  3444. };
  3445. RegExpValidationState3.prototype.reset = function reset2(start3, pattern, flags) {
  3446. var unicode2 = flags.indexOf("u") !== -1;
  3447. this.start = start3 | 0;
  3448. this.source = pattern + "";
  3449. this.flags = flags;
  3450. this.switchU = unicode2 && this.parser.options.ecmaVersion >= 6;
  3451. this.switchN = unicode2 && this.parser.options.ecmaVersion >= 9;
  3452. };
  3453. RegExpValidationState3.prototype.raise = function raise2(message) {
  3454. this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
  3455. };
  3456. RegExpValidationState3.prototype.at = function at2(i, forceU) {
  3457. if (forceU === void 0)
  3458. forceU = false;
  3459. var s = this.source;
  3460. var l = s.length;
  3461. if (i >= l) {
  3462. return -1;
  3463. }
  3464. var c2 = s.charCodeAt(i);
  3465. if (!(forceU || this.switchU) || c2 <= 55295 || c2 >= 57344 || i + 1 >= l) {
  3466. return c2;
  3467. }
  3468. var next = s.charCodeAt(i + 1);
  3469. return next >= 56320 && next <= 57343 ? (c2 << 10) + next - 56613888 : c2;
  3470. };
  3471. RegExpValidationState3.prototype.nextIndex = function nextIndex2(i, forceU) {
  3472. if (forceU === void 0)
  3473. forceU = false;
  3474. var s = this.source;
  3475. var l = s.length;
  3476. if (i >= l) {
  3477. return l;
  3478. }
  3479. var c2 = s.charCodeAt(i), next;
  3480. if (!(forceU || this.switchU) || c2 <= 55295 || c2 >= 57344 || i + 1 >= l || (next = s.charCodeAt(i + 1)) < 56320 || next > 57343) {
  3481. return i + 1;
  3482. }
  3483. return i + 2;
  3484. };
  3485. RegExpValidationState3.prototype.current = function current2(forceU) {
  3486. if (forceU === void 0)
  3487. forceU = false;
  3488. return this.at(this.pos, forceU);
  3489. };
  3490. RegExpValidationState3.prototype.lookahead = function lookahead2(forceU) {
  3491. if (forceU === void 0)
  3492. forceU = false;
  3493. return this.at(this.nextIndex(this.pos, forceU), forceU);
  3494. };
  3495. RegExpValidationState3.prototype.advance = function advance2(forceU) {
  3496. if (forceU === void 0)
  3497. forceU = false;
  3498. this.pos = this.nextIndex(this.pos, forceU);
  3499. };
  3500. RegExpValidationState3.prototype.eat = function eat2(ch, forceU) {
  3501. if (forceU === void 0)
  3502. forceU = false;
  3503. if (this.current(forceU) === ch) {
  3504. this.advance(forceU);
  3505. return true;
  3506. }
  3507. return false;
  3508. };
  3509. pp$82.validateRegExpFlags = function(state) {
  3510. var validFlags = state.validFlags;
  3511. var flags = state.flags;
  3512. for (var i = 0; i < flags.length; i++) {
  3513. var flag = flags.charAt(i);
  3514. if (validFlags.indexOf(flag) === -1) {
  3515. this.raise(state.start, "Invalid regular expression flag");
  3516. }
  3517. if (flags.indexOf(flag, i + 1) > -1) {
  3518. this.raise(state.start, "Duplicate regular expression flag");
  3519. }
  3520. }
  3521. };
  3522. pp$82.validateRegExpPattern = function(state) {
  3523. this.regexp_pattern(state);
  3524. if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
  3525. state.switchN = true;
  3526. this.regexp_pattern(state);
  3527. }
  3528. };
  3529. pp$82.regexp_pattern = function(state) {
  3530. state.pos = 0;
  3531. state.lastIntValue = 0;
  3532. state.lastStringValue = "";
  3533. state.lastAssertionIsQuantifiable = false;
  3534. state.numCapturingParens = 0;
  3535. state.maxBackReference = 0;
  3536. state.groupNames.length = 0;
  3537. state.backReferenceNames.length = 0;
  3538. this.regexp_disjunction(state);
  3539. if (state.pos !== state.source.length) {
  3540. if (state.eat(
  3541. 41
  3542. /* ) */
  3543. )) {
  3544. state.raise("Unmatched ')'");
  3545. }
  3546. if (state.eat(
  3547. 93
  3548. /* ] */
  3549. ) || state.eat(
  3550. 125
  3551. /* } */
  3552. )) {
  3553. state.raise("Lone quantifier brackets");
  3554. }
  3555. }
  3556. if (state.maxBackReference > state.numCapturingParens) {
  3557. state.raise("Invalid escape");
  3558. }
  3559. for (var i = 0, list3 = state.backReferenceNames; i < list3.length; i += 1) {
  3560. var name2 = list3[i];
  3561. if (state.groupNames.indexOf(name2) === -1) {
  3562. state.raise("Invalid named capture referenced");
  3563. }
  3564. }
  3565. };
  3566. pp$82.regexp_disjunction = function(state) {
  3567. this.regexp_alternative(state);
  3568. while (state.eat(
  3569. 124
  3570. /* | */
  3571. )) {
  3572. this.regexp_alternative(state);
  3573. }
  3574. if (this.regexp_eatQuantifier(state, true)) {
  3575. state.raise("Nothing to repeat");
  3576. }
  3577. if (state.eat(
  3578. 123
  3579. /* { */
  3580. )) {
  3581. state.raise("Lone quantifier brackets");
  3582. }
  3583. };
  3584. pp$82.regexp_alternative = function(state) {
  3585. while (state.pos < state.source.length && this.regexp_eatTerm(state)) {
  3586. }
  3587. };
  3588. pp$82.regexp_eatTerm = function(state) {
  3589. if (this.regexp_eatAssertion(state)) {
  3590. if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
  3591. if (state.switchU) {
  3592. state.raise("Invalid quantifier");
  3593. }
  3594. }
  3595. return true;
  3596. }
  3597. if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
  3598. this.regexp_eatQuantifier(state);
  3599. return true;
  3600. }
  3601. return false;
  3602. };
  3603. pp$82.regexp_eatAssertion = function(state) {
  3604. var start3 = state.pos;
  3605. state.lastAssertionIsQuantifiable = false;
  3606. if (state.eat(
  3607. 94
  3608. /* ^ */
  3609. ) || state.eat(
  3610. 36
  3611. /* $ */
  3612. )) {
  3613. return true;
  3614. }
  3615. if (state.eat(
  3616. 92
  3617. /* \ */
  3618. )) {
  3619. if (state.eat(
  3620. 66
  3621. /* B */
  3622. ) || state.eat(
  3623. 98
  3624. /* b */
  3625. )) {
  3626. return true;
  3627. }
  3628. state.pos = start3;
  3629. }
  3630. if (state.eat(
  3631. 40
  3632. /* ( */
  3633. ) && state.eat(
  3634. 63
  3635. /* ? */
  3636. )) {
  3637. var lookbehind = false;
  3638. if (this.options.ecmaVersion >= 9) {
  3639. lookbehind = state.eat(
  3640. 60
  3641. /* < */
  3642. );
  3643. }
  3644. if (state.eat(
  3645. 61
  3646. /* = */
  3647. ) || state.eat(
  3648. 33
  3649. /* ! */
  3650. )) {
  3651. this.regexp_disjunction(state);
  3652. if (!state.eat(
  3653. 41
  3654. /* ) */
  3655. )) {
  3656. state.raise("Unterminated group");
  3657. }
  3658. state.lastAssertionIsQuantifiable = !lookbehind;
  3659. return true;
  3660. }
  3661. }
  3662. state.pos = start3;
  3663. return false;
  3664. };
  3665. pp$82.regexp_eatQuantifier = function(state, noError) {
  3666. if (noError === void 0)
  3667. noError = false;
  3668. if (this.regexp_eatQuantifierPrefix(state, noError)) {
  3669. state.eat(
  3670. 63
  3671. /* ? */
  3672. );
  3673. return true;
  3674. }
  3675. return false;
  3676. };
  3677. pp$82.regexp_eatQuantifierPrefix = function(state, noError) {
  3678. return state.eat(
  3679. 42
  3680. /* * */
  3681. ) || state.eat(
  3682. 43
  3683. /* + */
  3684. ) || state.eat(
  3685. 63
  3686. /* ? */
  3687. ) || this.regexp_eatBracedQuantifier(state, noError);
  3688. };
  3689. pp$82.regexp_eatBracedQuantifier = function(state, noError) {
  3690. var start3 = state.pos;
  3691. if (state.eat(
  3692. 123
  3693. /* { */
  3694. )) {
  3695. var min = 0, max = -1;
  3696. if (this.regexp_eatDecimalDigits(state)) {
  3697. min = state.lastIntValue;
  3698. if (state.eat(
  3699. 44
  3700. /* , */
  3701. ) && this.regexp_eatDecimalDigits(state)) {
  3702. max = state.lastIntValue;
  3703. }
  3704. if (state.eat(
  3705. 125
  3706. /* } */
  3707. )) {
  3708. if (max !== -1 && max < min && !noError) {
  3709. state.raise("numbers out of order in {} quantifier");
  3710. }
  3711. return true;
  3712. }
  3713. }
  3714. if (state.switchU && !noError) {
  3715. state.raise("Incomplete quantifier");
  3716. }
  3717. state.pos = start3;
  3718. }
  3719. return false;
  3720. };
  3721. pp$82.regexp_eatAtom = function(state) {
  3722. return this.regexp_eatPatternCharacters(state) || state.eat(
  3723. 46
  3724. /* . */
  3725. ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
  3726. };
  3727. pp$82.regexp_eatReverseSolidusAtomEscape = function(state) {
  3728. var start3 = state.pos;
  3729. if (state.eat(
  3730. 92
  3731. /* \ */
  3732. )) {
  3733. if (this.regexp_eatAtomEscape(state)) {
  3734. return true;
  3735. }
  3736. state.pos = start3;
  3737. }
  3738. return false;
  3739. };
  3740. pp$82.regexp_eatUncapturingGroup = function(state) {
  3741. var start3 = state.pos;
  3742. if (state.eat(
  3743. 40
  3744. /* ( */
  3745. )) {
  3746. if (state.eat(
  3747. 63
  3748. /* ? */
  3749. ) && state.eat(
  3750. 58
  3751. /* : */
  3752. )) {
  3753. this.regexp_disjunction(state);
  3754. if (state.eat(
  3755. 41
  3756. /* ) */
  3757. )) {
  3758. return true;
  3759. }
  3760. state.raise("Unterminated group");
  3761. }
  3762. state.pos = start3;
  3763. }
  3764. return false;
  3765. };
  3766. pp$82.regexp_eatCapturingGroup = function(state) {
  3767. if (state.eat(
  3768. 40
  3769. /* ( */
  3770. )) {
  3771. if (this.options.ecmaVersion >= 9) {
  3772. this.regexp_groupSpecifier(state);
  3773. } else if (state.current() === 63) {
  3774. state.raise("Invalid group");
  3775. }
  3776. this.regexp_disjunction(state);
  3777. if (state.eat(
  3778. 41
  3779. /* ) */
  3780. )) {
  3781. state.numCapturingParens += 1;
  3782. return true;
  3783. }
  3784. state.raise("Unterminated group");
  3785. }
  3786. return false;
  3787. };
  3788. pp$82.regexp_eatExtendedAtom = function(state) {
  3789. return state.eat(
  3790. 46
  3791. /* . */
  3792. ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
  3793. };
  3794. pp$82.regexp_eatInvalidBracedQuantifier = function(state) {
  3795. if (this.regexp_eatBracedQuantifier(state, true)) {
  3796. state.raise("Nothing to repeat");
  3797. }
  3798. return false;
  3799. };
  3800. pp$82.regexp_eatSyntaxCharacter = function(state) {
  3801. var ch = state.current();
  3802. if (isSyntaxCharacter2(ch)) {
  3803. state.lastIntValue = ch;
  3804. state.advance();
  3805. return true;
  3806. }
  3807. return false;
  3808. };
  3809. pp$82.regexp_eatPatternCharacters = function(state) {
  3810. var start3 = state.pos;
  3811. var ch = 0;
  3812. while ((ch = state.current()) !== -1 && !isSyntaxCharacter2(ch)) {
  3813. state.advance();
  3814. }
  3815. return state.pos !== start3;
  3816. };
  3817. pp$82.regexp_eatExtendedPatternCharacter = function(state) {
  3818. var ch = state.current();
  3819. if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) {
  3820. state.advance();
  3821. return true;
  3822. }
  3823. return false;
  3824. };
  3825. pp$82.regexp_groupSpecifier = function(state) {
  3826. if (state.eat(
  3827. 63
  3828. /* ? */
  3829. )) {
  3830. if (this.regexp_eatGroupName(state)) {
  3831. if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
  3832. state.raise("Duplicate capture group name");
  3833. }
  3834. state.groupNames.push(state.lastStringValue);
  3835. return;
  3836. }
  3837. state.raise("Invalid group");
  3838. }
  3839. };
  3840. pp$82.regexp_eatGroupName = function(state) {
  3841. state.lastStringValue = "";
  3842. if (state.eat(
  3843. 60
  3844. /* < */
  3845. )) {
  3846. if (this.regexp_eatRegExpIdentifierName(state) && state.eat(
  3847. 62
  3848. /* > */
  3849. )) {
  3850. return true;
  3851. }
  3852. state.raise("Invalid capture group name");
  3853. }
  3854. return false;
  3855. };
  3856. pp$82.regexp_eatRegExpIdentifierName = function(state) {
  3857. state.lastStringValue = "";
  3858. if (this.regexp_eatRegExpIdentifierStart(state)) {
  3859. state.lastStringValue += codePointToString2(state.lastIntValue);
  3860. while (this.regexp_eatRegExpIdentifierPart(state)) {
  3861. state.lastStringValue += codePointToString2(state.lastIntValue);
  3862. }
  3863. return true;
  3864. }
  3865. return false;
  3866. };
  3867. pp$82.regexp_eatRegExpIdentifierStart = function(state) {
  3868. var start3 = state.pos;
  3869. var forceU = this.options.ecmaVersion >= 11;
  3870. var ch = state.current(forceU);
  3871. state.advance(forceU);
  3872. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  3873. ch = state.lastIntValue;
  3874. }
  3875. if (isRegExpIdentifierStart2(ch)) {
  3876. state.lastIntValue = ch;
  3877. return true;
  3878. }
  3879. state.pos = start3;
  3880. return false;
  3881. };
  3882. pp$82.regexp_eatRegExpIdentifierPart = function(state) {
  3883. var start3 = state.pos;
  3884. var forceU = this.options.ecmaVersion >= 11;
  3885. var ch = state.current(forceU);
  3886. state.advance(forceU);
  3887. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  3888. ch = state.lastIntValue;
  3889. }
  3890. if (isRegExpIdentifierPart2(ch)) {
  3891. state.lastIntValue = ch;
  3892. return true;
  3893. }
  3894. state.pos = start3;
  3895. return false;
  3896. };
  3897. pp$82.regexp_eatAtomEscape = function(state) {
  3898. if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {
  3899. return true;
  3900. }
  3901. if (state.switchU) {
  3902. if (state.current() === 99) {
  3903. state.raise("Invalid unicode escape");
  3904. }
  3905. state.raise("Invalid escape");
  3906. }
  3907. return false;
  3908. };
  3909. pp$82.regexp_eatBackReference = function(state) {
  3910. var start3 = state.pos;
  3911. if (this.regexp_eatDecimalEscape(state)) {
  3912. var n = state.lastIntValue;
  3913. if (state.switchU) {
  3914. if (n > state.maxBackReference) {
  3915. state.maxBackReference = n;
  3916. }
  3917. return true;
  3918. }
  3919. if (n <= state.numCapturingParens) {
  3920. return true;
  3921. }
  3922. state.pos = start3;
  3923. }
  3924. return false;
  3925. };
  3926. pp$82.regexp_eatKGroupName = function(state) {
  3927. if (state.eat(
  3928. 107
  3929. /* k */
  3930. )) {
  3931. if (this.regexp_eatGroupName(state)) {
  3932. state.backReferenceNames.push(state.lastStringValue);
  3933. return true;
  3934. }
  3935. state.raise("Invalid named reference");
  3936. }
  3937. return false;
  3938. };
  3939. pp$82.regexp_eatCharacterEscape = function(state) {
  3940. return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
  3941. };
  3942. pp$82.regexp_eatCControlLetter = function(state) {
  3943. var start3 = state.pos;
  3944. if (state.eat(
  3945. 99
  3946. /* c */
  3947. )) {
  3948. if (this.regexp_eatControlLetter(state)) {
  3949. return true;
  3950. }
  3951. state.pos = start3;
  3952. }
  3953. return false;
  3954. };
  3955. pp$82.regexp_eatZero = function(state) {
  3956. if (state.current() === 48 && !isDecimalDigit2(state.lookahead())) {
  3957. state.lastIntValue = 0;
  3958. state.advance();
  3959. return true;
  3960. }
  3961. return false;
  3962. };
  3963. pp$82.regexp_eatControlEscape = function(state) {
  3964. var ch = state.current();
  3965. if (ch === 116) {
  3966. state.lastIntValue = 9;
  3967. state.advance();
  3968. return true;
  3969. }
  3970. if (ch === 110) {
  3971. state.lastIntValue = 10;
  3972. state.advance();
  3973. return true;
  3974. }
  3975. if (ch === 118) {
  3976. state.lastIntValue = 11;
  3977. state.advance();
  3978. return true;
  3979. }
  3980. if (ch === 102) {
  3981. state.lastIntValue = 12;
  3982. state.advance();
  3983. return true;
  3984. }
  3985. if (ch === 114) {
  3986. state.lastIntValue = 13;
  3987. state.advance();
  3988. return true;
  3989. }
  3990. return false;
  3991. };
  3992. pp$82.regexp_eatControlLetter = function(state) {
  3993. var ch = state.current();
  3994. if (isControlLetter2(ch)) {
  3995. state.lastIntValue = ch % 32;
  3996. state.advance();
  3997. return true;
  3998. }
  3999. return false;
  4000. };
  4001. pp$82.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
  4002. if (forceU === void 0)
  4003. forceU = false;
  4004. var start3 = state.pos;
  4005. var switchU = forceU || state.switchU;
  4006. if (state.eat(
  4007. 117
  4008. /* u */
  4009. )) {
  4010. if (this.regexp_eatFixedHexDigits(state, 4)) {
  4011. var lead = state.lastIntValue;
  4012. if (switchU && lead >= 55296 && lead <= 56319) {
  4013. var leadSurrogateEnd = state.pos;
  4014. if (state.eat(
  4015. 92
  4016. /* \ */
  4017. ) && state.eat(
  4018. 117
  4019. /* u */
  4020. ) && this.regexp_eatFixedHexDigits(state, 4)) {
  4021. var trail = state.lastIntValue;
  4022. if (trail >= 56320 && trail <= 57343) {
  4023. state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536;
  4024. return true;
  4025. }
  4026. }
  4027. state.pos = leadSurrogateEnd;
  4028. state.lastIntValue = lead;
  4029. }
  4030. return true;
  4031. }
  4032. if (switchU && state.eat(
  4033. 123
  4034. /* { */
  4035. ) && this.regexp_eatHexDigits(state) && state.eat(
  4036. 125
  4037. /* } */
  4038. ) && isValidUnicode2(state.lastIntValue)) {
  4039. return true;
  4040. }
  4041. if (switchU) {
  4042. state.raise("Invalid unicode escape");
  4043. }
  4044. state.pos = start3;
  4045. }
  4046. return false;
  4047. };
  4048. pp$82.regexp_eatIdentityEscape = function(state) {
  4049. if (state.switchU) {
  4050. if (this.regexp_eatSyntaxCharacter(state)) {
  4051. return true;
  4052. }
  4053. if (state.eat(
  4054. 47
  4055. /* / */
  4056. )) {
  4057. state.lastIntValue = 47;
  4058. return true;
  4059. }
  4060. return false;
  4061. }
  4062. var ch = state.current();
  4063. if (ch !== 99 && (!state.switchN || ch !== 107)) {
  4064. state.lastIntValue = ch;
  4065. state.advance();
  4066. return true;
  4067. }
  4068. return false;
  4069. };
  4070. pp$82.regexp_eatDecimalEscape = function(state) {
  4071. state.lastIntValue = 0;
  4072. var ch = state.current();
  4073. if (ch >= 49 && ch <= 57) {
  4074. do {
  4075. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  4076. state.advance();
  4077. } while ((ch = state.current()) >= 48 && ch <= 57);
  4078. return true;
  4079. }
  4080. return false;
  4081. };
  4082. pp$82.regexp_eatCharacterClassEscape = function(state) {
  4083. var ch = state.current();
  4084. if (isCharacterClassEscape2(ch)) {
  4085. state.lastIntValue = -1;
  4086. state.advance();
  4087. return true;
  4088. }
  4089. if (state.switchU && this.options.ecmaVersion >= 9 && (ch === 80 || ch === 112)) {
  4090. state.lastIntValue = -1;
  4091. state.advance();
  4092. if (state.eat(
  4093. 123
  4094. /* { */
  4095. ) && this.regexp_eatUnicodePropertyValueExpression(state) && state.eat(
  4096. 125
  4097. /* } */
  4098. )) {
  4099. return true;
  4100. }
  4101. state.raise("Invalid property name");
  4102. }
  4103. return false;
  4104. };
  4105. pp$82.regexp_eatUnicodePropertyValueExpression = function(state) {
  4106. var start3 = state.pos;
  4107. if (this.regexp_eatUnicodePropertyName(state) && state.eat(
  4108. 61
  4109. /* = */
  4110. )) {
  4111. var name2 = state.lastStringValue;
  4112. if (this.regexp_eatUnicodePropertyValue(state)) {
  4113. var value2 = state.lastStringValue;
  4114. this.regexp_validateUnicodePropertyNameAndValue(state, name2, value2);
  4115. return true;
  4116. }
  4117. }
  4118. state.pos = start3;
  4119. if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
  4120. var nameOrValue = state.lastStringValue;
  4121. this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
  4122. return true;
  4123. }
  4124. return false;
  4125. };
  4126. pp$82.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value2) {
  4127. if (!has(state.unicodeProperties.nonBinary, name2)) {
  4128. state.raise("Invalid property name");
  4129. }
  4130. if (!state.unicodeProperties.nonBinary[name2].test(value2)) {
  4131. state.raise("Invalid property value");
  4132. }
  4133. };
  4134. pp$82.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
  4135. if (!state.unicodeProperties.binary.test(nameOrValue)) {
  4136. state.raise("Invalid property name");
  4137. }
  4138. };
  4139. pp$82.regexp_eatUnicodePropertyName = function(state) {
  4140. var ch = 0;
  4141. state.lastStringValue = "";
  4142. while (isUnicodePropertyNameCharacter2(ch = state.current())) {
  4143. state.lastStringValue += codePointToString2(ch);
  4144. state.advance();
  4145. }
  4146. return state.lastStringValue !== "";
  4147. };
  4148. pp$82.regexp_eatUnicodePropertyValue = function(state) {
  4149. var ch = 0;
  4150. state.lastStringValue = "";
  4151. while (isUnicodePropertyValueCharacter2(ch = state.current())) {
  4152. state.lastStringValue += codePointToString2(ch);
  4153. state.advance();
  4154. }
  4155. return state.lastStringValue !== "";
  4156. };
  4157. pp$82.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
  4158. return this.regexp_eatUnicodePropertyValue(state);
  4159. };
  4160. pp$82.regexp_eatCharacterClass = function(state) {
  4161. if (state.eat(
  4162. 91
  4163. /* [ */
  4164. )) {
  4165. state.eat(
  4166. 94
  4167. /* ^ */
  4168. );
  4169. this.regexp_classRanges(state);
  4170. if (state.eat(
  4171. 93
  4172. /* ] */
  4173. )) {
  4174. return true;
  4175. }
  4176. state.raise("Unterminated character class");
  4177. }
  4178. return false;
  4179. };
  4180. pp$82.regexp_classRanges = function(state) {
  4181. while (this.regexp_eatClassAtom(state)) {
  4182. var left = state.lastIntValue;
  4183. if (state.eat(
  4184. 45
  4185. /* - */
  4186. ) && this.regexp_eatClassAtom(state)) {
  4187. var right = state.lastIntValue;
  4188. if (state.switchU && (left === -1 || right === -1)) {
  4189. state.raise("Invalid character class");
  4190. }
  4191. if (left !== -1 && right !== -1 && left > right) {
  4192. state.raise("Range out of order in character class");
  4193. }
  4194. }
  4195. }
  4196. };
  4197. pp$82.regexp_eatClassAtom = function(state) {
  4198. var start3 = state.pos;
  4199. if (state.eat(
  4200. 92
  4201. /* \ */
  4202. )) {
  4203. if (this.regexp_eatClassEscape(state)) {
  4204. return true;
  4205. }
  4206. if (state.switchU) {
  4207. var ch$1 = state.current();
  4208. if (ch$1 === 99 || isOctalDigit2(ch$1)) {
  4209. state.raise("Invalid class escape");
  4210. }
  4211. state.raise("Invalid escape");
  4212. }
  4213. state.pos = start3;
  4214. }
  4215. var ch = state.current();
  4216. if (ch !== 93) {
  4217. state.lastIntValue = ch;
  4218. state.advance();
  4219. return true;
  4220. }
  4221. return false;
  4222. };
  4223. pp$82.regexp_eatClassEscape = function(state) {
  4224. var start3 = state.pos;
  4225. if (state.eat(
  4226. 98
  4227. /* b */
  4228. )) {
  4229. state.lastIntValue = 8;
  4230. return true;
  4231. }
  4232. if (state.switchU && state.eat(
  4233. 45
  4234. /* - */
  4235. )) {
  4236. state.lastIntValue = 45;
  4237. return true;
  4238. }
  4239. if (!state.switchU && state.eat(
  4240. 99
  4241. /* c */
  4242. )) {
  4243. if (this.regexp_eatClassControlLetter(state)) {
  4244. return true;
  4245. }
  4246. state.pos = start3;
  4247. }
  4248. return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
  4249. };
  4250. pp$82.regexp_eatClassControlLetter = function(state) {
  4251. var ch = state.current();
  4252. if (isDecimalDigit2(ch) || ch === 95) {
  4253. state.lastIntValue = ch % 32;
  4254. state.advance();
  4255. return true;
  4256. }
  4257. return false;
  4258. };
  4259. pp$82.regexp_eatHexEscapeSequence = function(state) {
  4260. var start3 = state.pos;
  4261. if (state.eat(
  4262. 120
  4263. /* x */
  4264. )) {
  4265. if (this.regexp_eatFixedHexDigits(state, 2)) {
  4266. return true;
  4267. }
  4268. if (state.switchU) {
  4269. state.raise("Invalid escape");
  4270. }
  4271. state.pos = start3;
  4272. }
  4273. return false;
  4274. };
  4275. pp$82.regexp_eatDecimalDigits = function(state) {
  4276. var start3 = state.pos;
  4277. var ch = 0;
  4278. state.lastIntValue = 0;
  4279. while (isDecimalDigit2(ch = state.current())) {
  4280. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  4281. state.advance();
  4282. }
  4283. return state.pos !== start3;
  4284. };
  4285. pp$82.regexp_eatHexDigits = function(state) {
  4286. var start3 = state.pos;
  4287. var ch = 0;
  4288. state.lastIntValue = 0;
  4289. while (isHexDigit2(ch = state.current())) {
  4290. state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch);
  4291. state.advance();
  4292. }
  4293. return state.pos !== start3;
  4294. };
  4295. pp$82.regexp_eatLegacyOctalEscapeSequence = function(state) {
  4296. if (this.regexp_eatOctalDigit(state)) {
  4297. var n1 = state.lastIntValue;
  4298. if (this.regexp_eatOctalDigit(state)) {
  4299. var n2 = state.lastIntValue;
  4300. if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
  4301. state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
  4302. } else {
  4303. state.lastIntValue = n1 * 8 + n2;
  4304. }
  4305. } else {
  4306. state.lastIntValue = n1;
  4307. }
  4308. return true;
  4309. }
  4310. return false;
  4311. };
  4312. pp$82.regexp_eatOctalDigit = function(state) {
  4313. var ch = state.current();
  4314. if (isOctalDigit2(ch)) {
  4315. state.lastIntValue = ch - 48;
  4316. state.advance();
  4317. return true;
  4318. }
  4319. state.lastIntValue = 0;
  4320. return false;
  4321. };
  4322. pp$82.regexp_eatFixedHexDigits = function(state, length) {
  4323. var start3 = state.pos;
  4324. state.lastIntValue = 0;
  4325. for (var i = 0; i < length; ++i) {
  4326. var ch = state.current();
  4327. if (!isHexDigit2(ch)) {
  4328. state.pos = start3;
  4329. return false;
  4330. }
  4331. state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch);
  4332. state.advance();
  4333. }
  4334. return true;
  4335. };
  4336. Token3 = function Token4(p) {
  4337. this.type = p.type;
  4338. this.value = p.value;
  4339. this.start = p.start;
  4340. this.end = p.end;
  4341. if (p.options.locations) {
  4342. this.loc = new SourceLocation3(p, p.startLoc, p.endLoc);
  4343. }
  4344. if (p.options.ranges) {
  4345. this.range = [p.start, p.end];
  4346. }
  4347. };
  4348. pp$92 = Parser3.prototype;
  4349. pp$92.next = function(ignoreEscapeSequenceInKeyword) {
  4350. if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) {
  4351. this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword);
  4352. }
  4353. if (this.options.onToken) {
  4354. this.options.onToken(new Token3(this));
  4355. }
  4356. this.lastTokEnd = this.end;
  4357. this.lastTokStart = this.start;
  4358. this.lastTokEndLoc = this.endLoc;
  4359. this.lastTokStartLoc = this.startLoc;
  4360. this.nextToken();
  4361. };
  4362. pp$92.getToken = function() {
  4363. this.next();
  4364. return new Token3(this);
  4365. };
  4366. if (typeof Symbol !== "undefined") {
  4367. pp$92[Symbol.iterator] = function() {
  4368. var this$1 = this;
  4369. return {
  4370. next: function() {
  4371. var token2 = this$1.getToken();
  4372. return {
  4373. done: token2.type === types2.eof,
  4374. value: token2
  4375. };
  4376. }
  4377. };
  4378. };
  4379. }
  4380. pp$92.curContext = function() {
  4381. return this.context[this.context.length - 1];
  4382. };
  4383. pp$92.nextToken = function() {
  4384. var curContext = this.curContext();
  4385. if (!curContext || !curContext.preserveSpace) {
  4386. this.skipSpace();
  4387. }
  4388. this.start = this.pos;
  4389. if (this.options.locations) {
  4390. this.startLoc = this.curPosition();
  4391. }
  4392. if (this.pos >= this.input.length) {
  4393. return this.finishToken(types2.eof);
  4394. }
  4395. if (curContext.override) {
  4396. return curContext.override(this);
  4397. } else {
  4398. this.readToken(this.fullCharCodeAtPos());
  4399. }
  4400. };
  4401. pp$92.readToken = function(code2) {
  4402. if (isIdentifierStart2(code2, this.options.ecmaVersion >= 6) || code2 === 92) {
  4403. return this.readWord();
  4404. }
  4405. return this.getTokenFromCode(code2);
  4406. };
  4407. pp$92.fullCharCodeAtPos = function() {
  4408. var code2 = this.input.charCodeAt(this.pos);
  4409. if (code2 <= 55295 || code2 >= 57344) {
  4410. return code2;
  4411. }
  4412. var next = this.input.charCodeAt(this.pos + 1);
  4413. return (code2 << 10) + next - 56613888;
  4414. };
  4415. pp$92.skipBlockComment = function() {
  4416. var startLoc = this.options.onComment && this.curPosition();
  4417. var start3 = this.pos, end = this.input.indexOf("*/", this.pos += 2);
  4418. if (end === -1) {
  4419. this.raise(this.pos - 2, "Unterminated comment");
  4420. }
  4421. this.pos = end + 2;
  4422. if (this.options.locations) {
  4423. lineBreakG2.lastIndex = start3;
  4424. var match;
  4425. while ((match = lineBreakG2.exec(this.input)) && match.index < this.pos) {
  4426. ++this.curLine;
  4427. this.lineStart = match.index + match[0].length;
  4428. }
  4429. }
  4430. if (this.options.onComment) {
  4431. this.options.onComment(
  4432. true,
  4433. this.input.slice(start3 + 2, end),
  4434. start3,
  4435. this.pos,
  4436. startLoc,
  4437. this.curPosition()
  4438. );
  4439. }
  4440. };
  4441. pp$92.skipLineComment = function(startSkip) {
  4442. var start3 = this.pos;
  4443. var startLoc = this.options.onComment && this.curPosition();
  4444. var ch = this.input.charCodeAt(this.pos += startSkip);
  4445. while (this.pos < this.input.length && !isNewLine2(ch)) {
  4446. ch = this.input.charCodeAt(++this.pos);
  4447. }
  4448. if (this.options.onComment) {
  4449. this.options.onComment(
  4450. false,
  4451. this.input.slice(start3 + startSkip, this.pos),
  4452. start3,
  4453. this.pos,
  4454. startLoc,
  4455. this.curPosition()
  4456. );
  4457. }
  4458. };
  4459. pp$92.skipSpace = function() {
  4460. loop:
  4461. while (this.pos < this.input.length) {
  4462. var ch = this.input.charCodeAt(this.pos);
  4463. switch (ch) {
  4464. case 32:
  4465. case 160:
  4466. ++this.pos;
  4467. break;
  4468. case 13:
  4469. if (this.input.charCodeAt(this.pos + 1) === 10) {
  4470. ++this.pos;
  4471. }
  4472. case 10:
  4473. case 8232:
  4474. case 8233:
  4475. ++this.pos;
  4476. if (this.options.locations) {
  4477. ++this.curLine;
  4478. this.lineStart = this.pos;
  4479. }
  4480. break;
  4481. case 47:
  4482. switch (this.input.charCodeAt(this.pos + 1)) {
  4483. case 42:
  4484. this.skipBlockComment();
  4485. break;
  4486. case 47:
  4487. this.skipLineComment(2);
  4488. break;
  4489. default:
  4490. break loop;
  4491. }
  4492. break;
  4493. default:
  4494. if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace2.test(String.fromCharCode(ch))) {
  4495. ++this.pos;
  4496. } else {
  4497. break loop;
  4498. }
  4499. }
  4500. }
  4501. };
  4502. pp$92.finishToken = function(type, val) {
  4503. this.end = this.pos;
  4504. if (this.options.locations) {
  4505. this.endLoc = this.curPosition();
  4506. }
  4507. var prevType = this.type;
  4508. this.type = type;
  4509. this.value = val;
  4510. this.updateContext(prevType);
  4511. };
  4512. pp$92.readToken_dot = function() {
  4513. var next = this.input.charCodeAt(this.pos + 1);
  4514. if (next >= 48 && next <= 57) {
  4515. return this.readNumber(true);
  4516. }
  4517. var next2 = this.input.charCodeAt(this.pos + 2);
  4518. if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
  4519. this.pos += 3;
  4520. return this.finishToken(types2.ellipsis);
  4521. } else {
  4522. ++this.pos;
  4523. return this.finishToken(types2.dot);
  4524. }
  4525. };
  4526. pp$92.readToken_slash = function() {
  4527. var next = this.input.charCodeAt(this.pos + 1);
  4528. if (this.exprAllowed) {
  4529. ++this.pos;
  4530. return this.readRegexp();
  4531. }
  4532. if (next === 61) {
  4533. return this.finishOp(types2.assign, 2);
  4534. }
  4535. return this.finishOp(types2.slash, 1);
  4536. };
  4537. pp$92.readToken_mult_modulo_exp = function(code2) {
  4538. var next = this.input.charCodeAt(this.pos + 1);
  4539. var size = 1;
  4540. var tokentype = code2 === 42 ? types2.star : types2.modulo;
  4541. if (this.options.ecmaVersion >= 7 && code2 === 42 && next === 42) {
  4542. ++size;
  4543. tokentype = types2.starstar;
  4544. next = this.input.charCodeAt(this.pos + 2);
  4545. }
  4546. if (next === 61) {
  4547. return this.finishOp(types2.assign, size + 1);
  4548. }
  4549. return this.finishOp(tokentype, size);
  4550. };
  4551. pp$92.readToken_pipe_amp = function(code2) {
  4552. var next = this.input.charCodeAt(this.pos + 1);
  4553. if (next === code2) {
  4554. if (this.options.ecmaVersion >= 12) {
  4555. var next2 = this.input.charCodeAt(this.pos + 2);
  4556. if (next2 === 61) {
  4557. return this.finishOp(types2.assign, 3);
  4558. }
  4559. }
  4560. return this.finishOp(code2 === 124 ? types2.logicalOR : types2.logicalAND, 2);
  4561. }
  4562. if (next === 61) {
  4563. return this.finishOp(types2.assign, 2);
  4564. }
  4565. return this.finishOp(code2 === 124 ? types2.bitwiseOR : types2.bitwiseAND, 1);
  4566. };
  4567. pp$92.readToken_caret = function() {
  4568. var next = this.input.charCodeAt(this.pos + 1);
  4569. if (next === 61) {
  4570. return this.finishOp(types2.assign, 2);
  4571. }
  4572. return this.finishOp(types2.bitwiseXOR, 1);
  4573. };
  4574. pp$92.readToken_plus_min = function(code2) {
  4575. var next = this.input.charCodeAt(this.pos + 1);
  4576. if (next === code2) {
  4577. if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak2.test(this.input.slice(this.lastTokEnd, this.pos)))) {
  4578. this.skipLineComment(3);
  4579. this.skipSpace();
  4580. return this.nextToken();
  4581. }
  4582. return this.finishOp(types2.incDec, 2);
  4583. }
  4584. if (next === 61) {
  4585. return this.finishOp(types2.assign, 2);
  4586. }
  4587. return this.finishOp(types2.plusMin, 1);
  4588. };
  4589. pp$92.readToken_lt_gt = function(code2) {
  4590. var next = this.input.charCodeAt(this.pos + 1);
  4591. var size = 1;
  4592. if (next === code2) {
  4593. size = code2 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
  4594. if (this.input.charCodeAt(this.pos + size) === 61) {
  4595. return this.finishOp(types2.assign, size + 1);
  4596. }
  4597. return this.finishOp(types2.bitShift, size);
  4598. }
  4599. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
  4600. this.skipLineComment(4);
  4601. this.skipSpace();
  4602. return this.nextToken();
  4603. }
  4604. if (next === 61) {
  4605. size = 2;
  4606. }
  4607. return this.finishOp(types2.relational, size);
  4608. };
  4609. pp$92.readToken_eq_excl = function(code2) {
  4610. var next = this.input.charCodeAt(this.pos + 1);
  4611. if (next === 61) {
  4612. return this.finishOp(types2.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
  4613. }
  4614. if (code2 === 61 && next === 62 && this.options.ecmaVersion >= 6) {
  4615. this.pos += 2;
  4616. return this.finishToken(types2.arrow);
  4617. }
  4618. return this.finishOp(code2 === 61 ? types2.eq : types2.prefix, 1);
  4619. };
  4620. pp$92.readToken_question = function() {
  4621. var ecmaVersion = this.options.ecmaVersion;
  4622. if (ecmaVersion >= 11) {
  4623. var next = this.input.charCodeAt(this.pos + 1);
  4624. if (next === 46) {
  4625. var next2 = this.input.charCodeAt(this.pos + 2);
  4626. if (next2 < 48 || next2 > 57) {
  4627. return this.finishOp(types2.questionDot, 2);
  4628. }
  4629. }
  4630. if (next === 63) {
  4631. if (ecmaVersion >= 12) {
  4632. var next2$1 = this.input.charCodeAt(this.pos + 2);
  4633. if (next2$1 === 61) {
  4634. return this.finishOp(types2.assign, 3);
  4635. }
  4636. }
  4637. return this.finishOp(types2.coalesce, 2);
  4638. }
  4639. }
  4640. return this.finishOp(types2.question, 1);
  4641. };
  4642. pp$92.getTokenFromCode = function(code2) {
  4643. switch (code2) {
  4644. case 46:
  4645. return this.readToken_dot();
  4646. case 40:
  4647. ++this.pos;
  4648. return this.finishToken(types2.parenL);
  4649. case 41:
  4650. ++this.pos;
  4651. return this.finishToken(types2.parenR);
  4652. case 59:
  4653. ++this.pos;
  4654. return this.finishToken(types2.semi);
  4655. case 44:
  4656. ++this.pos;
  4657. return this.finishToken(types2.comma);
  4658. case 91:
  4659. ++this.pos;
  4660. return this.finishToken(types2.bracketL);
  4661. case 93:
  4662. ++this.pos;
  4663. return this.finishToken(types2.bracketR);
  4664. case 123:
  4665. ++this.pos;
  4666. return this.finishToken(types2.braceL);
  4667. case 125:
  4668. ++this.pos;
  4669. return this.finishToken(types2.braceR);
  4670. case 58:
  4671. ++this.pos;
  4672. return this.finishToken(types2.colon);
  4673. case 96:
  4674. if (this.options.ecmaVersion < 6) {
  4675. break;
  4676. }
  4677. ++this.pos;
  4678. return this.finishToken(types2.backQuote);
  4679. case 48:
  4680. var next = this.input.charCodeAt(this.pos + 1);
  4681. if (next === 120 || next === 88) {
  4682. return this.readRadixNumber(16);
  4683. }
  4684. if (this.options.ecmaVersion >= 6) {
  4685. if (next === 111 || next === 79) {
  4686. return this.readRadixNumber(8);
  4687. }
  4688. if (next === 98 || next === 66) {
  4689. return this.readRadixNumber(2);
  4690. }
  4691. }
  4692. case 49:
  4693. case 50:
  4694. case 51:
  4695. case 52:
  4696. case 53:
  4697. case 54:
  4698. case 55:
  4699. case 56:
  4700. case 57:
  4701. return this.readNumber(false);
  4702. case 34:
  4703. case 39:
  4704. return this.readString(code2);
  4705. case 47:
  4706. return this.readToken_slash();
  4707. case 37:
  4708. case 42:
  4709. return this.readToken_mult_modulo_exp(code2);
  4710. case 124:
  4711. case 38:
  4712. return this.readToken_pipe_amp(code2);
  4713. case 94:
  4714. return this.readToken_caret();
  4715. case 43:
  4716. case 45:
  4717. return this.readToken_plus_min(code2);
  4718. case 60:
  4719. case 62:
  4720. return this.readToken_lt_gt(code2);
  4721. case 61:
  4722. case 33:
  4723. return this.readToken_eq_excl(code2);
  4724. case 63:
  4725. return this.readToken_question();
  4726. case 126:
  4727. return this.finishOp(types2.prefix, 1);
  4728. }
  4729. this.raise(this.pos, "Unexpected character '" + codePointToString$1(code2) + "'");
  4730. };
  4731. pp$92.finishOp = function(type, size) {
  4732. var str = this.input.slice(this.pos, this.pos + size);
  4733. this.pos += size;
  4734. return this.finishToken(type, str);
  4735. };
  4736. pp$92.readRegexp = function() {
  4737. var escaped, inClass, start3 = this.pos;
  4738. for (; ; ) {
  4739. if (this.pos >= this.input.length) {
  4740. this.raise(start3, "Unterminated regular expression");
  4741. }
  4742. var ch = this.input.charAt(this.pos);
  4743. if (lineBreak2.test(ch)) {
  4744. this.raise(start3, "Unterminated regular expression");
  4745. }
  4746. if (!escaped) {
  4747. if (ch === "[") {
  4748. inClass = true;
  4749. } else if (ch === "]" && inClass) {
  4750. inClass = false;
  4751. } else if (ch === "/" && !inClass) {
  4752. break;
  4753. }
  4754. escaped = ch === "\\";
  4755. } else {
  4756. escaped = false;
  4757. }
  4758. ++this.pos;
  4759. }
  4760. var pattern = this.input.slice(start3, this.pos);
  4761. ++this.pos;
  4762. var flagsStart = this.pos;
  4763. var flags = this.readWord1();
  4764. if (this.containsEsc) {
  4765. this.unexpected(flagsStart);
  4766. }
  4767. var state = this.regexpState || (this.regexpState = new RegExpValidationState3(this));
  4768. state.reset(start3, pattern, flags);
  4769. this.validateRegExpFlags(state);
  4770. this.validateRegExpPattern(state);
  4771. var value2 = null;
  4772. try {
  4773. value2 = new RegExp(pattern, flags);
  4774. } catch (e) {
  4775. }
  4776. return this.finishToken(types2.regexp, { pattern, flags, value: value2 });
  4777. };
  4778. pp$92.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
  4779. var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0;
  4780. var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
  4781. var start3 = this.pos, total = 0, lastCode = 0;
  4782. for (var i = 0, e = len == null ? Infinity : len; i < e; ++i, ++this.pos) {
  4783. var code2 = this.input.charCodeAt(this.pos), val = void 0;
  4784. if (allowSeparators && code2 === 95) {
  4785. if (isLegacyOctalNumericLiteral) {
  4786. this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals");
  4787. }
  4788. if (lastCode === 95) {
  4789. this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore");
  4790. }
  4791. if (i === 0) {
  4792. this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits");
  4793. }
  4794. lastCode = code2;
  4795. continue;
  4796. }
  4797. if (code2 >= 97) {
  4798. val = code2 - 97 + 10;
  4799. } else if (code2 >= 65) {
  4800. val = code2 - 65 + 10;
  4801. } else if (code2 >= 48 && code2 <= 57) {
  4802. val = code2 - 48;
  4803. } else {
  4804. val = Infinity;
  4805. }
  4806. if (val >= radix) {
  4807. break;
  4808. }
  4809. lastCode = code2;
  4810. total = total * radix + val;
  4811. }
  4812. if (allowSeparators && lastCode === 95) {
  4813. this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits");
  4814. }
  4815. if (this.pos === start3 || len != null && this.pos - start3 !== len) {
  4816. return null;
  4817. }
  4818. return total;
  4819. };
  4820. pp$92.readRadixNumber = function(radix) {
  4821. var start3 = this.pos;
  4822. this.pos += 2;
  4823. var val = this.readInt(radix);
  4824. if (val == null) {
  4825. this.raise(this.start + 2, "Expected number in radix " + radix);
  4826. }
  4827. if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {
  4828. val = stringToBigInt2(this.input.slice(start3, this.pos));
  4829. ++this.pos;
  4830. } else if (isIdentifierStart2(this.fullCharCodeAtPos())) {
  4831. this.raise(this.pos, "Identifier directly after number");
  4832. }
  4833. return this.finishToken(types2.num, val);
  4834. };
  4835. pp$92.readNumber = function(startsWithDot) {
  4836. var start3 = this.pos;
  4837. if (!startsWithDot && this.readInt(10, void 0, true) === null) {
  4838. this.raise(start3, "Invalid number");
  4839. }
  4840. var octal = this.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  4841. if (octal && this.strict) {
  4842. this.raise(start3, "Invalid number");
  4843. }
  4844. var next = this.input.charCodeAt(this.pos);
  4845. if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
  4846. var val$1 = stringToBigInt2(this.input.slice(start3, this.pos));
  4847. ++this.pos;
  4848. if (isIdentifierStart2(this.fullCharCodeAtPos())) {
  4849. this.raise(this.pos, "Identifier directly after number");
  4850. }
  4851. return this.finishToken(types2.num, val$1);
  4852. }
  4853. if (octal && /[89]/.test(this.input.slice(start3, this.pos))) {
  4854. octal = false;
  4855. }
  4856. if (next === 46 && !octal) {
  4857. ++this.pos;
  4858. this.readInt(10);
  4859. next = this.input.charCodeAt(this.pos);
  4860. }
  4861. if ((next === 69 || next === 101) && !octal) {
  4862. next = this.input.charCodeAt(++this.pos);
  4863. if (next === 43 || next === 45) {
  4864. ++this.pos;
  4865. }
  4866. if (this.readInt(10) === null) {
  4867. this.raise(start3, "Invalid number");
  4868. }
  4869. }
  4870. if (isIdentifierStart2(this.fullCharCodeAtPos())) {
  4871. this.raise(this.pos, "Identifier directly after number");
  4872. }
  4873. var val = stringToNumber2(this.input.slice(start3, this.pos), octal);
  4874. return this.finishToken(types2.num, val);
  4875. };
  4876. pp$92.readCodePoint = function() {
  4877. var ch = this.input.charCodeAt(this.pos), code2;
  4878. if (ch === 123) {
  4879. if (this.options.ecmaVersion < 6) {
  4880. this.unexpected();
  4881. }
  4882. var codePos = ++this.pos;
  4883. code2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
  4884. ++this.pos;
  4885. if (code2 > 1114111) {
  4886. this.invalidStringToken(codePos, "Code point out of bounds");
  4887. }
  4888. } else {
  4889. code2 = this.readHexChar(4);
  4890. }
  4891. return code2;
  4892. };
  4893. pp$92.readString = function(quote) {
  4894. var out = "", chunkStart = ++this.pos;
  4895. for (; ; ) {
  4896. if (this.pos >= this.input.length) {
  4897. this.raise(this.start, "Unterminated string constant");
  4898. }
  4899. var ch = this.input.charCodeAt(this.pos);
  4900. if (ch === quote) {
  4901. break;
  4902. }
  4903. if (ch === 92) {
  4904. out += this.input.slice(chunkStart, this.pos);
  4905. out += this.readEscapedChar(false);
  4906. chunkStart = this.pos;
  4907. } else {
  4908. if (isNewLine2(ch, this.options.ecmaVersion >= 10)) {
  4909. this.raise(this.start, "Unterminated string constant");
  4910. }
  4911. ++this.pos;
  4912. }
  4913. }
  4914. out += this.input.slice(chunkStart, this.pos++);
  4915. return this.finishToken(types2.string, out);
  4916. };
  4917. INVALID_TEMPLATE_ESCAPE_ERROR2 = {};
  4918. pp$92.tryReadTemplateToken = function() {
  4919. this.inTemplateElement = true;
  4920. try {
  4921. this.readTmplToken();
  4922. } catch (err) {
  4923. if (err === INVALID_TEMPLATE_ESCAPE_ERROR2) {
  4924. this.readInvalidTemplateToken();
  4925. } else {
  4926. throw err;
  4927. }
  4928. }
  4929. this.inTemplateElement = false;
  4930. };
  4931. pp$92.invalidStringToken = function(position3, message) {
  4932. if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
  4933. throw INVALID_TEMPLATE_ESCAPE_ERROR2;
  4934. } else {
  4935. this.raise(position3, message);
  4936. }
  4937. };
  4938. pp$92.readTmplToken = function() {
  4939. var out = "", chunkStart = this.pos;
  4940. for (; ; ) {
  4941. if (this.pos >= this.input.length) {
  4942. this.raise(this.start, "Unterminated template");
  4943. }
  4944. var ch = this.input.charCodeAt(this.pos);
  4945. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
  4946. if (this.pos === this.start && (this.type === types2.template || this.type === types2.invalidTemplate)) {
  4947. if (ch === 36) {
  4948. this.pos += 2;
  4949. return this.finishToken(types2.dollarBraceL);
  4950. } else {
  4951. ++this.pos;
  4952. return this.finishToken(types2.backQuote);
  4953. }
  4954. }
  4955. out += this.input.slice(chunkStart, this.pos);
  4956. return this.finishToken(types2.template, out);
  4957. }
  4958. if (ch === 92) {
  4959. out += this.input.slice(chunkStart, this.pos);
  4960. out += this.readEscapedChar(true);
  4961. chunkStart = this.pos;
  4962. } else if (isNewLine2(ch)) {
  4963. out += this.input.slice(chunkStart, this.pos);
  4964. ++this.pos;
  4965. switch (ch) {
  4966. case 13:
  4967. if (this.input.charCodeAt(this.pos) === 10) {
  4968. ++this.pos;
  4969. }
  4970. case 10:
  4971. out += "\n";
  4972. break;
  4973. default:
  4974. out += String.fromCharCode(ch);
  4975. break;
  4976. }
  4977. if (this.options.locations) {
  4978. ++this.curLine;
  4979. this.lineStart = this.pos;
  4980. }
  4981. chunkStart = this.pos;
  4982. } else {
  4983. ++this.pos;
  4984. }
  4985. }
  4986. };
  4987. pp$92.readInvalidTemplateToken = function() {
  4988. for (; this.pos < this.input.length; this.pos++) {
  4989. switch (this.input[this.pos]) {
  4990. case "\\":
  4991. ++this.pos;
  4992. break;
  4993. case "$":
  4994. if (this.input[this.pos + 1] !== "{") {
  4995. break;
  4996. }
  4997. case "`":
  4998. return this.finishToken(types2.invalidTemplate, this.input.slice(this.start, this.pos));
  4999. }
  5000. }
  5001. this.raise(this.start, "Unterminated template");
  5002. };
  5003. pp$92.readEscapedChar = function(inTemplate) {
  5004. var ch = this.input.charCodeAt(++this.pos);
  5005. ++this.pos;
  5006. switch (ch) {
  5007. case 110:
  5008. return "\n";
  5009. case 114:
  5010. return "\r";
  5011. case 120:
  5012. return String.fromCharCode(this.readHexChar(2));
  5013. case 117:
  5014. return codePointToString$1(this.readCodePoint());
  5015. case 116:
  5016. return " ";
  5017. case 98:
  5018. return "\b";
  5019. case 118:
  5020. return "\v";
  5021. case 102:
  5022. return "\f";
  5023. case 13:
  5024. if (this.input.charCodeAt(this.pos) === 10) {
  5025. ++this.pos;
  5026. }
  5027. case 10:
  5028. if (this.options.locations) {
  5029. this.lineStart = this.pos;
  5030. ++this.curLine;
  5031. }
  5032. return "";
  5033. case 56:
  5034. case 57:
  5035. if (inTemplate) {
  5036. var codePos = this.pos - 1;
  5037. this.invalidStringToken(
  5038. codePos,
  5039. "Invalid escape sequence in template string"
  5040. );
  5041. return null;
  5042. }
  5043. default:
  5044. if (ch >= 48 && ch <= 55) {
  5045. var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
  5046. var octal = parseInt(octalStr, 8);
  5047. if (octal > 255) {
  5048. octalStr = octalStr.slice(0, -1);
  5049. octal = parseInt(octalStr, 8);
  5050. }
  5051. this.pos += octalStr.length - 1;
  5052. ch = this.input.charCodeAt(this.pos);
  5053. if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
  5054. this.invalidStringToken(
  5055. this.pos - 1 - octalStr.length,
  5056. inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"
  5057. );
  5058. }
  5059. return String.fromCharCode(octal);
  5060. }
  5061. if (isNewLine2(ch)) {
  5062. return "";
  5063. }
  5064. return String.fromCharCode(ch);
  5065. }
  5066. };
  5067. pp$92.readHexChar = function(len) {
  5068. var codePos = this.pos;
  5069. var n = this.readInt(16, len);
  5070. if (n === null) {
  5071. this.invalidStringToken(codePos, "Bad character escape sequence");
  5072. }
  5073. return n;
  5074. };
  5075. pp$92.readWord1 = function() {
  5076. this.containsEsc = false;
  5077. var word = "", first = true, chunkStart = this.pos;
  5078. var astral = this.options.ecmaVersion >= 6;
  5079. while (this.pos < this.input.length) {
  5080. var ch = this.fullCharCodeAtPos();
  5081. if (isIdentifierChar2(ch, astral)) {
  5082. this.pos += ch <= 65535 ? 1 : 2;
  5083. } else if (ch === 92) {
  5084. this.containsEsc = true;
  5085. word += this.input.slice(chunkStart, this.pos);
  5086. var escStart = this.pos;
  5087. if (this.input.charCodeAt(++this.pos) !== 117) {
  5088. this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX");
  5089. }
  5090. ++this.pos;
  5091. var esc = this.readCodePoint();
  5092. if (!(first ? isIdentifierStart2 : isIdentifierChar2)(esc, astral)) {
  5093. this.invalidStringToken(escStart, "Invalid Unicode escape");
  5094. }
  5095. word += codePointToString$1(esc);
  5096. chunkStart = this.pos;
  5097. } else {
  5098. break;
  5099. }
  5100. first = false;
  5101. }
  5102. return word + this.input.slice(chunkStart, this.pos);
  5103. };
  5104. pp$92.readWord = function() {
  5105. var word = this.readWord1();
  5106. var type = types2.name;
  5107. if (this.keywords.test(word)) {
  5108. type = keywords$12[word];
  5109. }
  5110. return this.finishToken(type, word);
  5111. };
  5112. version2 = "7.4.1";
  5113. Parser3.acorn = {
  5114. Parser: Parser3,
  5115. version: version2,
  5116. defaultOptions: defaultOptions2,
  5117. Position: Position3,
  5118. SourceLocation: SourceLocation3,
  5119. getLineInfo: getLineInfo2,
  5120. Node: Node3,
  5121. TokenType: TokenType3,
  5122. tokTypes: types2,
  5123. keywordTypes: keywords$12,
  5124. TokContext: TokContext3,
  5125. tokContexts: types$12,
  5126. isIdentifierChar: isIdentifierChar2,
  5127. isIdentifierStart: isIdentifierStart2,
  5128. Token: Token3,
  5129. isNewLine: isNewLine2,
  5130. lineBreak: lineBreak2,
  5131. lineBreakG: lineBreakG2,
  5132. nonASCIIwhitespace: nonASCIIwhitespace2
  5133. };
  5134. }
  5135. });
  5136. // node_modules/acorn-jsx/index.js
  5137. var require_acorn_jsx = __commonJS({
  5138. "node_modules/acorn-jsx/index.js"(exports, module) {
  5139. "use strict";
  5140. var XHTMLEntities = require_xhtml();
  5141. var hexNumber = /^[\da-fA-F]+$/;
  5142. var decimalNumber = /^\d+$/;
  5143. var acornJsxMap = /* @__PURE__ */ new WeakMap();
  5144. function getJsxTokens(acorn) {
  5145. acorn = acorn.Parser.acorn || acorn;
  5146. let acornJsx2 = acornJsxMap.get(acorn);
  5147. if (!acornJsx2) {
  5148. const tt = acorn.tokTypes;
  5149. const TokContext5 = acorn.TokContext;
  5150. const TokenType5 = acorn.TokenType;
  5151. const tc_oTag = new TokContext5("<tag", false);
  5152. const tc_cTag = new TokContext5("</tag", false);
  5153. const tc_expr = new TokContext5("<tag>...</tag>", true, true);
  5154. const tokContexts = {
  5155. tc_oTag,
  5156. tc_cTag,
  5157. tc_expr
  5158. };
  5159. const tokTypes = {
  5160. jsxName: new TokenType5("jsxName"),
  5161. jsxText: new TokenType5("jsxText", { beforeExpr: true }),
  5162. jsxTagStart: new TokenType5("jsxTagStart", { startsExpr: true }),
  5163. jsxTagEnd: new TokenType5("jsxTagEnd")
  5164. };
  5165. tokTypes.jsxTagStart.updateContext = function() {
  5166. this.context.push(tc_expr);
  5167. this.context.push(tc_oTag);
  5168. this.exprAllowed = false;
  5169. };
  5170. tokTypes.jsxTagEnd.updateContext = function(prevType) {
  5171. let out = this.context.pop();
  5172. if (out === tc_oTag && prevType === tt.slash || out === tc_cTag) {
  5173. this.context.pop();
  5174. this.exprAllowed = this.curContext() === tc_expr;
  5175. } else {
  5176. this.exprAllowed = true;
  5177. }
  5178. };
  5179. acornJsx2 = { tokContexts, tokTypes };
  5180. acornJsxMap.set(acorn, acornJsx2);
  5181. }
  5182. return acornJsx2;
  5183. }
  5184. function getQualifiedJSXName(object) {
  5185. if (!object)
  5186. return object;
  5187. if (object.type === "JSXIdentifier")
  5188. return object.name;
  5189. if (object.type === "JSXNamespacedName")
  5190. return object.namespace.name + ":" + object.name.name;
  5191. if (object.type === "JSXMemberExpression")
  5192. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  5193. }
  5194. module.exports = function(options) {
  5195. options = options || {};
  5196. return function(Parser5) {
  5197. return plugin2({
  5198. allowNamespaces: options.allowNamespaces !== false,
  5199. allowNamespacedObjects: !!options.allowNamespacedObjects
  5200. }, Parser5);
  5201. };
  5202. };
  5203. Object.defineProperty(module.exports, "tokTypes", {
  5204. get: function get_tokTypes() {
  5205. return getJsxTokens((init_acorn(), __toCommonJS(acorn_exports))).tokTypes;
  5206. },
  5207. configurable: true,
  5208. enumerable: true
  5209. });
  5210. function plugin2(options, Parser5) {
  5211. const acorn = Parser5.acorn || (init_acorn(), __toCommonJS(acorn_exports));
  5212. const acornJsx2 = getJsxTokens(acorn);
  5213. const tt = acorn.tokTypes;
  5214. const tok = acornJsx2.tokTypes;
  5215. const tokContexts = acorn.tokContexts;
  5216. const tc_oTag = acornJsx2.tokContexts.tc_oTag;
  5217. const tc_cTag = acornJsx2.tokContexts.tc_cTag;
  5218. const tc_expr = acornJsx2.tokContexts.tc_expr;
  5219. const isNewLine3 = acorn.isNewLine;
  5220. const isIdentifierStart3 = acorn.isIdentifierStart;
  5221. const isIdentifierChar3 = acorn.isIdentifierChar;
  5222. return class extends Parser5 {
  5223. // Expose actual `tokTypes` and `tokContexts` to other plugins.
  5224. static get acornJsx() {
  5225. return acornJsx2;
  5226. }
  5227. // Reads inline JSX contents token.
  5228. jsx_readToken() {
  5229. let out = "", chunkStart = this.pos;
  5230. for (; ; ) {
  5231. if (this.pos >= this.input.length)
  5232. this.raise(this.start, "Unterminated JSX contents");
  5233. let ch = this.input.charCodeAt(this.pos);
  5234. switch (ch) {
  5235. case 60:
  5236. case 123:
  5237. if (this.pos === this.start) {
  5238. if (ch === 60 && this.exprAllowed) {
  5239. ++this.pos;
  5240. return this.finishToken(tok.jsxTagStart);
  5241. }
  5242. return this.getTokenFromCode(ch);
  5243. }
  5244. out += this.input.slice(chunkStart, this.pos);
  5245. return this.finishToken(tok.jsxText, out);
  5246. case 38:
  5247. out += this.input.slice(chunkStart, this.pos);
  5248. out += this.jsx_readEntity();
  5249. chunkStart = this.pos;
  5250. break;
  5251. case 62:
  5252. case 125:
  5253. this.raise(
  5254. this.pos,
  5255. "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (ch === 62 ? "&gt;" : "&rbrace;") + '` or `{"' + this.input[this.pos] + '"}`?'
  5256. );
  5257. default:
  5258. if (isNewLine3(ch)) {
  5259. out += this.input.slice(chunkStart, this.pos);
  5260. out += this.jsx_readNewLine(true);
  5261. chunkStart = this.pos;
  5262. } else {
  5263. ++this.pos;
  5264. }
  5265. }
  5266. }
  5267. }
  5268. jsx_readNewLine(normalizeCRLF) {
  5269. let ch = this.input.charCodeAt(this.pos);
  5270. let out;
  5271. ++this.pos;
  5272. if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
  5273. ++this.pos;
  5274. out = normalizeCRLF ? "\n" : "\r\n";
  5275. } else {
  5276. out = String.fromCharCode(ch);
  5277. }
  5278. if (this.options.locations) {
  5279. ++this.curLine;
  5280. this.lineStart = this.pos;
  5281. }
  5282. return out;
  5283. }
  5284. jsx_readString(quote) {
  5285. let out = "", chunkStart = ++this.pos;
  5286. for (; ; ) {
  5287. if (this.pos >= this.input.length)
  5288. this.raise(this.start, "Unterminated string constant");
  5289. let ch = this.input.charCodeAt(this.pos);
  5290. if (ch === quote)
  5291. break;
  5292. if (ch === 38) {
  5293. out += this.input.slice(chunkStart, this.pos);
  5294. out += this.jsx_readEntity();
  5295. chunkStart = this.pos;
  5296. } else if (isNewLine3(ch)) {
  5297. out += this.input.slice(chunkStart, this.pos);
  5298. out += this.jsx_readNewLine(false);
  5299. chunkStart = this.pos;
  5300. } else {
  5301. ++this.pos;
  5302. }
  5303. }
  5304. out += this.input.slice(chunkStart, this.pos++);
  5305. return this.finishToken(tt.string, out);
  5306. }
  5307. jsx_readEntity() {
  5308. let str = "", count = 0, entity;
  5309. let ch = this.input[this.pos];
  5310. if (ch !== "&")
  5311. this.raise(this.pos, "Entity must start with an ampersand");
  5312. let startPos = ++this.pos;
  5313. while (this.pos < this.input.length && count++ < 10) {
  5314. ch = this.input[this.pos++];
  5315. if (ch === ";") {
  5316. if (str[0] === "#") {
  5317. if (str[1] === "x") {
  5318. str = str.substr(2);
  5319. if (hexNumber.test(str))
  5320. entity = String.fromCharCode(parseInt(str, 16));
  5321. } else {
  5322. str = str.substr(1);
  5323. if (decimalNumber.test(str))
  5324. entity = String.fromCharCode(parseInt(str, 10));
  5325. }
  5326. } else {
  5327. entity = XHTMLEntities[str];
  5328. }
  5329. break;
  5330. }
  5331. str += ch;
  5332. }
  5333. if (!entity) {
  5334. this.pos = startPos;
  5335. return "&";
  5336. }
  5337. return entity;
  5338. }
  5339. // Read a JSX identifier (valid tag or attribute name).
  5340. //
  5341. // Optimized version since JSX identifiers can't contain
  5342. // escape characters and so can be read as single slice.
  5343. // Also assumes that first character was already checked
  5344. // by isIdentifierStart in readToken.
  5345. jsx_readWord() {
  5346. let ch, start3 = this.pos;
  5347. do {
  5348. ch = this.input.charCodeAt(++this.pos);
  5349. } while (isIdentifierChar3(ch) || ch === 45);
  5350. return this.finishToken(tok.jsxName, this.input.slice(start3, this.pos));
  5351. }
  5352. // Parse next token as JSX identifier
  5353. jsx_parseIdentifier() {
  5354. let node2 = this.startNode();
  5355. if (this.type === tok.jsxName)
  5356. node2.name = this.value;
  5357. else if (this.type.keyword)
  5358. node2.name = this.type.keyword;
  5359. else
  5360. this.unexpected();
  5361. this.next();
  5362. return this.finishNode(node2, "JSXIdentifier");
  5363. }
  5364. // Parse namespaced identifier.
  5365. jsx_parseNamespacedName() {
  5366. let startPos = this.start, startLoc = this.startLoc;
  5367. let name2 = this.jsx_parseIdentifier();
  5368. if (!options.allowNamespaces || !this.eat(tt.colon))
  5369. return name2;
  5370. var node2 = this.startNodeAt(startPos, startLoc);
  5371. node2.namespace = name2;
  5372. node2.name = this.jsx_parseIdentifier();
  5373. return this.finishNode(node2, "JSXNamespacedName");
  5374. }
  5375. // Parses element name in any form - namespaced, member
  5376. // or single identifier.
  5377. jsx_parseElementName() {
  5378. if (this.type === tok.jsxTagEnd)
  5379. return "";
  5380. let startPos = this.start, startLoc = this.startLoc;
  5381. let node2 = this.jsx_parseNamespacedName();
  5382. if (this.type === tt.dot && node2.type === "JSXNamespacedName" && !options.allowNamespacedObjects) {
  5383. this.unexpected();
  5384. }
  5385. while (this.eat(tt.dot)) {
  5386. let newNode = this.startNodeAt(startPos, startLoc);
  5387. newNode.object = node2;
  5388. newNode.property = this.jsx_parseIdentifier();
  5389. node2 = this.finishNode(newNode, "JSXMemberExpression");
  5390. }
  5391. return node2;
  5392. }
  5393. // Parses any type of JSX attribute value.
  5394. jsx_parseAttributeValue() {
  5395. switch (this.type) {
  5396. case tt.braceL:
  5397. let node2 = this.jsx_parseExpressionContainer();
  5398. if (node2.expression.type === "JSXEmptyExpression")
  5399. this.raise(node2.start, "JSX attributes must only be assigned a non-empty expression");
  5400. return node2;
  5401. case tok.jsxTagStart:
  5402. case tt.string:
  5403. return this.parseExprAtom();
  5404. default:
  5405. this.raise(this.start, "JSX value should be either an expression or a quoted JSX text");
  5406. }
  5407. }
  5408. // JSXEmptyExpression is unique type since it doesn't actually parse anything,
  5409. // and so it should start at the end of last read token (left brace) and finish
  5410. // at the beginning of the next one (right brace).
  5411. jsx_parseEmptyExpression() {
  5412. let node2 = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
  5413. return this.finishNodeAt(node2, "JSXEmptyExpression", this.start, this.startLoc);
  5414. }
  5415. // Parses JSX expression enclosed into curly brackets.
  5416. jsx_parseExpressionContainer() {
  5417. let node2 = this.startNode();
  5418. this.next();
  5419. node2.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression();
  5420. this.expect(tt.braceR);
  5421. return this.finishNode(node2, "JSXExpressionContainer");
  5422. }
  5423. // Parses following JSX attribute name-value pair.
  5424. jsx_parseAttribute() {
  5425. let node2 = this.startNode();
  5426. if (this.eat(tt.braceL)) {
  5427. this.expect(tt.ellipsis);
  5428. node2.argument = this.parseMaybeAssign();
  5429. this.expect(tt.braceR);
  5430. return this.finishNode(node2, "JSXSpreadAttribute");
  5431. }
  5432. node2.name = this.jsx_parseNamespacedName();
  5433. node2.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null;
  5434. return this.finishNode(node2, "JSXAttribute");
  5435. }
  5436. // Parses JSX opening tag starting after '<'.
  5437. jsx_parseOpeningElementAt(startPos, startLoc) {
  5438. let node2 = this.startNodeAt(startPos, startLoc);
  5439. node2.attributes = [];
  5440. let nodeName = this.jsx_parseElementName();
  5441. if (nodeName)
  5442. node2.name = nodeName;
  5443. while (this.type !== tt.slash && this.type !== tok.jsxTagEnd)
  5444. node2.attributes.push(this.jsx_parseAttribute());
  5445. node2.selfClosing = this.eat(tt.slash);
  5446. this.expect(tok.jsxTagEnd);
  5447. return this.finishNode(node2, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment");
  5448. }
  5449. // Parses JSX closing tag starting after '</'.
  5450. jsx_parseClosingElementAt(startPos, startLoc) {
  5451. let node2 = this.startNodeAt(startPos, startLoc);
  5452. let nodeName = this.jsx_parseElementName();
  5453. if (nodeName)
  5454. node2.name = nodeName;
  5455. this.expect(tok.jsxTagEnd);
  5456. return this.finishNode(node2, nodeName ? "JSXClosingElement" : "JSXClosingFragment");
  5457. }
  5458. // Parses entire JSX element, including it's opening tag
  5459. // (starting after '<'), attributes, contents and closing tag.
  5460. jsx_parseElementAt(startPos, startLoc) {
  5461. let node2 = this.startNodeAt(startPos, startLoc);
  5462. let children = [];
  5463. let openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc);
  5464. let closingElement = null;
  5465. if (!openingElement.selfClosing) {
  5466. contents:
  5467. for (; ; ) {
  5468. switch (this.type) {
  5469. case tok.jsxTagStart:
  5470. startPos = this.start;
  5471. startLoc = this.startLoc;
  5472. this.next();
  5473. if (this.eat(tt.slash)) {
  5474. closingElement = this.jsx_parseClosingElementAt(startPos, startLoc);
  5475. break contents;
  5476. }
  5477. children.push(this.jsx_parseElementAt(startPos, startLoc));
  5478. break;
  5479. case tok.jsxText:
  5480. children.push(this.parseExprAtom());
  5481. break;
  5482. case tt.braceL:
  5483. children.push(this.jsx_parseExpressionContainer());
  5484. break;
  5485. default:
  5486. this.unexpected();
  5487. }
  5488. }
  5489. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  5490. this.raise(
  5491. closingElement.start,
  5492. "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"
  5493. );
  5494. }
  5495. }
  5496. let fragmentOrElement = openingElement.name ? "Element" : "Fragment";
  5497. node2["opening" + fragmentOrElement] = openingElement;
  5498. node2["closing" + fragmentOrElement] = closingElement;
  5499. node2.children = children;
  5500. if (this.type === tt.relational && this.value === "<") {
  5501. this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
  5502. }
  5503. return this.finishNode(node2, "JSX" + fragmentOrElement);
  5504. }
  5505. // Parse JSX text
  5506. jsx_parseText() {
  5507. let node2 = this.parseLiteral(this.value);
  5508. node2.type = "JSXText";
  5509. return node2;
  5510. }
  5511. // Parses entire JSX element from current position.
  5512. jsx_parseElement() {
  5513. let startPos = this.start, startLoc = this.startLoc;
  5514. this.next();
  5515. return this.jsx_parseElementAt(startPos, startLoc);
  5516. }
  5517. parseExprAtom(refShortHandDefaultPos) {
  5518. if (this.type === tok.jsxText)
  5519. return this.jsx_parseText();
  5520. else if (this.type === tok.jsxTagStart)
  5521. return this.jsx_parseElement();
  5522. else
  5523. return super.parseExprAtom(refShortHandDefaultPos);
  5524. }
  5525. readToken(code2) {
  5526. let context = this.curContext();
  5527. if (context === tc_expr)
  5528. return this.jsx_readToken();
  5529. if (context === tc_oTag || context === tc_cTag) {
  5530. if (isIdentifierStart3(code2))
  5531. return this.jsx_readWord();
  5532. if (code2 == 62) {
  5533. ++this.pos;
  5534. return this.finishToken(tok.jsxTagEnd);
  5535. }
  5536. if ((code2 === 34 || code2 === 39) && context == tc_oTag)
  5537. return this.jsx_readString(code2);
  5538. }
  5539. if (code2 === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) {
  5540. ++this.pos;
  5541. return this.finishToken(tok.jsxTagStart);
  5542. }
  5543. return super.readToken(code2);
  5544. }
  5545. updateContext(prevType) {
  5546. if (this.type == tt.braceL) {
  5547. var curContext = this.curContext();
  5548. if (curContext == tc_oTag)
  5549. this.context.push(tokContexts.b_expr);
  5550. else if (curContext == tc_expr)
  5551. this.context.push(tokContexts.b_tmpl);
  5552. else
  5553. super.updateContext(prevType);
  5554. this.exprAllowed = true;
  5555. } else if (this.type === tt.slash && prevType === tok.jsxTagStart) {
  5556. this.context.length -= 2;
  5557. this.context.push(tc_cTag);
  5558. this.exprAllowed = false;
  5559. } else {
  5560. return super.updateContext(prevType);
  5561. }
  5562. }
  5563. };
  5564. }
  5565. }
  5566. });
  5567. // node_modules/inline-style-parser/index.js
  5568. var require_inline_style_parser = __commonJS({
  5569. "node_modules/inline-style-parser/index.js"(exports, module) {
  5570. var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
  5571. var NEWLINE_REGEX = /\n/g;
  5572. var WHITESPACE_REGEX = /^\s*/;
  5573. var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
  5574. var COLON_REGEX = /^:\s*/;
  5575. var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
  5576. var SEMICOLON_REGEX = /^[;\s]*/;
  5577. var TRIM_REGEX = /^\s+|\s+$/g;
  5578. var NEWLINE = "\n";
  5579. var FORWARD_SLASH = "/";
  5580. var ASTERISK = "*";
  5581. var EMPTY_STRING = "";
  5582. var TYPE_COMMENT = "comment";
  5583. var TYPE_DECLARATION = "declaration";
  5584. module.exports = function(style, options) {
  5585. if (typeof style !== "string") {
  5586. throw new TypeError("First argument must be a string");
  5587. }
  5588. if (!style)
  5589. return [];
  5590. options = options || {};
  5591. var lineno = 1;
  5592. var column2 = 1;
  5593. function updatePosition(str) {
  5594. var lines = str.match(NEWLINE_REGEX);
  5595. if (lines)
  5596. lineno += lines.length;
  5597. var i = str.lastIndexOf(NEWLINE);
  5598. column2 = ~i ? str.length - i : column2 + str.length;
  5599. }
  5600. function position3() {
  5601. var start3 = { line: lineno, column: column2 };
  5602. return function(node2) {
  5603. node2.position = new Position5(start3);
  5604. whitespace2();
  5605. return node2;
  5606. };
  5607. }
  5608. function Position5(start3) {
  5609. this.start = start3;
  5610. this.end = { line: lineno, column: column2 };
  5611. this.source = options.source;
  5612. }
  5613. Position5.prototype.content = style;
  5614. var errorsList = [];
  5615. function error(msg) {
  5616. var err = new Error(
  5617. options.source + ":" + lineno + ":" + column2 + ": " + msg
  5618. );
  5619. err.reason = msg;
  5620. err.filename = options.source;
  5621. err.line = lineno;
  5622. err.column = column2;
  5623. err.source = style;
  5624. if (options.silent) {
  5625. errorsList.push(err);
  5626. } else {
  5627. throw err;
  5628. }
  5629. }
  5630. function match(re) {
  5631. var m = re.exec(style);
  5632. if (!m)
  5633. return;
  5634. var str = m[0];
  5635. updatePosition(str);
  5636. style = style.slice(str.length);
  5637. return m;
  5638. }
  5639. function whitespace2() {
  5640. match(WHITESPACE_REGEX);
  5641. }
  5642. function comments(rules) {
  5643. var c2;
  5644. rules = rules || [];
  5645. while (c2 = comment2()) {
  5646. if (c2 !== false) {
  5647. rules.push(c2);
  5648. }
  5649. }
  5650. return rules;
  5651. }
  5652. function comment2() {
  5653. var pos2 = position3();
  5654. if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1))
  5655. return;
  5656. var i = 2;
  5657. while (EMPTY_STRING != style.charAt(i) && (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))) {
  5658. ++i;
  5659. }
  5660. i += 2;
  5661. if (EMPTY_STRING === style.charAt(i - 1)) {
  5662. return error("End of comment missing");
  5663. }
  5664. var str = style.slice(2, i - 2);
  5665. column2 += 2;
  5666. updatePosition(str);
  5667. style = style.slice(i);
  5668. column2 += 2;
  5669. return pos2({
  5670. type: TYPE_COMMENT,
  5671. comment: str
  5672. });
  5673. }
  5674. function declaration() {
  5675. var pos2 = position3();
  5676. var prop = match(PROPERTY_REGEX);
  5677. if (!prop)
  5678. return;
  5679. comment2();
  5680. if (!match(COLON_REGEX))
  5681. return error("property missing ':'");
  5682. var val = match(VALUE_REGEX);
  5683. var ret = pos2({
  5684. type: TYPE_DECLARATION,
  5685. property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
  5686. value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
  5687. });
  5688. match(SEMICOLON_REGEX);
  5689. return ret;
  5690. }
  5691. function declarations() {
  5692. var decls = [];
  5693. comments(decls);
  5694. var decl;
  5695. while (decl = declaration()) {
  5696. if (decl !== false) {
  5697. decls.push(decl);
  5698. comments(decls);
  5699. }
  5700. }
  5701. return decls;
  5702. }
  5703. whitespace2();
  5704. return declarations();
  5705. };
  5706. function trim(str) {
  5707. return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
  5708. }
  5709. }
  5710. });
  5711. // node_modules/style-to-object/index.js
  5712. var require_style_to_object = __commonJS({
  5713. "node_modules/style-to-object/index.js"(exports, module) {
  5714. var parse9 = require_inline_style_parser();
  5715. function StyleToObject2(style, iterator) {
  5716. var output = null;
  5717. if (!style || typeof style !== "string") {
  5718. return output;
  5719. }
  5720. var declaration;
  5721. var declarations = parse9(style);
  5722. var hasIterator = typeof iterator === "function";
  5723. var property;
  5724. var value2;
  5725. for (var i = 0, len = declarations.length; i < len; i++) {
  5726. declaration = declarations[i];
  5727. property = declaration.property;
  5728. value2 = declaration.value;
  5729. if (hasIterator) {
  5730. iterator(property, value2, declaration);
  5731. } else if (value2) {
  5732. output || (output = {});
  5733. output[property] = value2;
  5734. }
  5735. }
  5736. return output;
  5737. }
  5738. module.exports = StyleToObject2;
  5739. module.exports.default = StyleToObject2;
  5740. }
  5741. });
  5742. // node_modules/markdown-extensions/markdown-extensions.json
  5743. var require_markdown_extensions = __commonJS({
  5744. "node_modules/markdown-extensions/markdown-extensions.json"(exports, module) {
  5745. module.exports = [
  5746. "md",
  5747. "markdown",
  5748. "mdown",
  5749. "mkdn",
  5750. "mkd",
  5751. "mdwn",
  5752. "mkdown",
  5753. "ron"
  5754. ];
  5755. }
  5756. });
  5757. // node_modules/markdown-extensions/index.js
  5758. var require_markdown_extensions2 = __commonJS({
  5759. "node_modules/markdown-extensions/index.js"(exports, module) {
  5760. "use strict";
  5761. module.exports = require_markdown_extensions();
  5762. }
  5763. });
  5764. // node_modules/@jridgewell/set-array/dist/set-array.umd.js
  5765. var require_set_array_umd = __commonJS({
  5766. "node_modules/@jridgewell/set-array/dist/set-array.umd.js"(exports, module) {
  5767. (function(global2, factory) {
  5768. typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.setArray = {}));
  5769. })(exports, function(exports2) {
  5770. "use strict";
  5771. exports2.get = void 0;
  5772. exports2.put = void 0;
  5773. exports2.pop = void 0;
  5774. class SetArray {
  5775. constructor() {
  5776. this._indexes = { __proto__: null };
  5777. this.array = [];
  5778. }
  5779. }
  5780. (() => {
  5781. exports2.get = (strarr, key2) => strarr._indexes[key2];
  5782. exports2.put = (strarr, key2) => {
  5783. const index2 = exports2.get(strarr, key2);
  5784. if (index2 !== void 0)
  5785. return index2;
  5786. const { array, _indexes: indexes } = strarr;
  5787. return indexes[key2] = array.push(key2) - 1;
  5788. };
  5789. exports2.pop = (strarr) => {
  5790. const { array, _indexes: indexes } = strarr;
  5791. if (array.length === 0)
  5792. return;
  5793. const last = array.pop();
  5794. indexes[last] = void 0;
  5795. };
  5796. })();
  5797. exports2.SetArray = SetArray;
  5798. Object.defineProperty(exports2, "__esModule", { value: true });
  5799. });
  5800. }
  5801. });
  5802. // node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js
  5803. var require_sourcemap_codec_umd = __commonJS({
  5804. "node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"(exports, module) {
  5805. (function(global2, factory) {
  5806. typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.sourcemapCodec = {}));
  5807. })(exports, function(exports2) {
  5808. "use strict";
  5809. const comma = ",".charCodeAt(0);
  5810. const semicolon = ";".charCodeAt(0);
  5811. const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  5812. const intToChar = new Uint8Array(64);
  5813. const charToInt = new Uint8Array(128);
  5814. for (let i = 0; i < chars.length; i++) {
  5815. const c2 = chars.charCodeAt(i);
  5816. intToChar[i] = c2;
  5817. charToInt[c2] = i;
  5818. }
  5819. const td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
  5820. decode(buf) {
  5821. const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
  5822. return out.toString();
  5823. }
  5824. } : {
  5825. decode(buf) {
  5826. let out = "";
  5827. for (let i = 0; i < buf.length; i++) {
  5828. out += String.fromCharCode(buf[i]);
  5829. }
  5830. return out;
  5831. }
  5832. };
  5833. function decode2(mappings) {
  5834. const state = new Int32Array(5);
  5835. const decoded = [];
  5836. let index2 = 0;
  5837. do {
  5838. const semi = indexOf(mappings, index2);
  5839. const line2 = [];
  5840. let sorted = true;
  5841. let lastCol = 0;
  5842. state[0] = 0;
  5843. for (let i = index2; i < semi; i++) {
  5844. let seg;
  5845. i = decodeInteger(mappings, i, state, 0);
  5846. const col = state[0];
  5847. if (col < lastCol)
  5848. sorted = false;
  5849. lastCol = col;
  5850. if (hasMoreVlq(mappings, i, semi)) {
  5851. i = decodeInteger(mappings, i, state, 1);
  5852. i = decodeInteger(mappings, i, state, 2);
  5853. i = decodeInteger(mappings, i, state, 3);
  5854. if (hasMoreVlq(mappings, i, semi)) {
  5855. i = decodeInteger(mappings, i, state, 4);
  5856. seg = [col, state[1], state[2], state[3], state[4]];
  5857. } else {
  5858. seg = [col, state[1], state[2], state[3]];
  5859. }
  5860. } else {
  5861. seg = [col];
  5862. }
  5863. line2.push(seg);
  5864. }
  5865. if (!sorted)
  5866. sort(line2);
  5867. decoded.push(line2);
  5868. index2 = semi + 1;
  5869. } while (index2 <= mappings.length);
  5870. return decoded;
  5871. }
  5872. function indexOf(mappings, index2) {
  5873. const idx = mappings.indexOf(";", index2);
  5874. return idx === -1 ? mappings.length : idx;
  5875. }
  5876. function decodeInteger(mappings, pos2, state, j) {
  5877. let value2 = 0;
  5878. let shift = 0;
  5879. let integer = 0;
  5880. do {
  5881. const c2 = mappings.charCodeAt(pos2++);
  5882. integer = charToInt[c2];
  5883. value2 |= (integer & 31) << shift;
  5884. shift += 5;
  5885. } while (integer & 32);
  5886. const shouldNegate = value2 & 1;
  5887. value2 >>>= 1;
  5888. if (shouldNegate) {
  5889. value2 = -2147483648 | -value2;
  5890. }
  5891. state[j] += value2;
  5892. return pos2;
  5893. }
  5894. function hasMoreVlq(mappings, i, length) {
  5895. if (i >= length)
  5896. return false;
  5897. return mappings.charCodeAt(i) !== comma;
  5898. }
  5899. function sort(line2) {
  5900. line2.sort(sortComparator);
  5901. }
  5902. function sortComparator(a, b) {
  5903. return a[0] - b[0];
  5904. }
  5905. function encode(decoded) {
  5906. const state = new Int32Array(5);
  5907. const bufLength = 1024 * 16;
  5908. const subLength = bufLength - 36;
  5909. const buf = new Uint8Array(bufLength);
  5910. const sub = buf.subarray(0, subLength);
  5911. let pos2 = 0;
  5912. let out = "";
  5913. for (let i = 0; i < decoded.length; i++) {
  5914. const line2 = decoded[i];
  5915. if (i > 0) {
  5916. if (pos2 === bufLength) {
  5917. out += td.decode(buf);
  5918. pos2 = 0;
  5919. }
  5920. buf[pos2++] = semicolon;
  5921. }
  5922. if (line2.length === 0)
  5923. continue;
  5924. state[0] = 0;
  5925. for (let j = 0; j < line2.length; j++) {
  5926. const segment = line2[j];
  5927. if (pos2 > subLength) {
  5928. out += td.decode(sub);
  5929. buf.copyWithin(0, subLength, pos2);
  5930. pos2 -= subLength;
  5931. }
  5932. if (j > 0)
  5933. buf[pos2++] = comma;
  5934. pos2 = encodeInteger(buf, pos2, state, segment, 0);
  5935. if (segment.length === 1)
  5936. continue;
  5937. pos2 = encodeInteger(buf, pos2, state, segment, 1);
  5938. pos2 = encodeInteger(buf, pos2, state, segment, 2);
  5939. pos2 = encodeInteger(buf, pos2, state, segment, 3);
  5940. if (segment.length === 4)
  5941. continue;
  5942. pos2 = encodeInteger(buf, pos2, state, segment, 4);
  5943. }
  5944. }
  5945. return out + td.decode(buf.subarray(0, pos2));
  5946. }
  5947. function encodeInteger(buf, pos2, state, segment, j) {
  5948. const next = segment[j];
  5949. let num = next - state[j];
  5950. state[j] = next;
  5951. num = num < 0 ? -num << 1 | 1 : num << 1;
  5952. do {
  5953. let clamped = num & 31;
  5954. num >>>= 5;
  5955. if (num > 0)
  5956. clamped |= 32;
  5957. buf[pos2++] = intToChar[clamped];
  5958. } while (num > 0);
  5959. return pos2;
  5960. }
  5961. exports2.decode = decode2;
  5962. exports2.encode = encode;
  5963. Object.defineProperty(exports2, "__esModule", { value: true });
  5964. });
  5965. }
  5966. });
  5967. // node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js
  5968. var require_sourcemap_codec_umd2 = __commonJS({
  5969. "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"(exports, module) {
  5970. (function(global2, factory) {
  5971. typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.sourcemapCodec = {}));
  5972. })(exports, function(exports2) {
  5973. "use strict";
  5974. const comma = ",".charCodeAt(0);
  5975. const semicolon = ";".charCodeAt(0);
  5976. const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  5977. const intToChar = new Uint8Array(64);
  5978. const charToInt = new Uint8Array(128);
  5979. for (let i = 0; i < chars.length; i++) {
  5980. const c2 = chars.charCodeAt(i);
  5981. intToChar[i] = c2;
  5982. charToInt[c2] = i;
  5983. }
  5984. const td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
  5985. decode(buf) {
  5986. const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
  5987. return out.toString();
  5988. }
  5989. } : {
  5990. decode(buf) {
  5991. let out = "";
  5992. for (let i = 0; i < buf.length; i++) {
  5993. out += String.fromCharCode(buf[i]);
  5994. }
  5995. return out;
  5996. }
  5997. };
  5998. function decode2(mappings) {
  5999. const state = new Int32Array(5);
  6000. const decoded = [];
  6001. let index2 = 0;
  6002. do {
  6003. const semi = indexOf(mappings, index2);
  6004. const line2 = [];
  6005. let sorted = true;
  6006. let lastCol = 0;
  6007. state[0] = 0;
  6008. for (let i = index2; i < semi; i++) {
  6009. let seg;
  6010. i = decodeInteger(mappings, i, state, 0);
  6011. const col = state[0];
  6012. if (col < lastCol)
  6013. sorted = false;
  6014. lastCol = col;
  6015. if (hasMoreVlq(mappings, i, semi)) {
  6016. i = decodeInteger(mappings, i, state, 1);
  6017. i = decodeInteger(mappings, i, state, 2);
  6018. i = decodeInteger(mappings, i, state, 3);
  6019. if (hasMoreVlq(mappings, i, semi)) {
  6020. i = decodeInteger(mappings, i, state, 4);
  6021. seg = [col, state[1], state[2], state[3], state[4]];
  6022. } else {
  6023. seg = [col, state[1], state[2], state[3]];
  6024. }
  6025. } else {
  6026. seg = [col];
  6027. }
  6028. line2.push(seg);
  6029. }
  6030. if (!sorted)
  6031. sort(line2);
  6032. decoded.push(line2);
  6033. index2 = semi + 1;
  6034. } while (index2 <= mappings.length);
  6035. return decoded;
  6036. }
  6037. function indexOf(mappings, index2) {
  6038. const idx = mappings.indexOf(";", index2);
  6039. return idx === -1 ? mappings.length : idx;
  6040. }
  6041. function decodeInteger(mappings, pos2, state, j) {
  6042. let value2 = 0;
  6043. let shift = 0;
  6044. let integer = 0;
  6045. do {
  6046. const c2 = mappings.charCodeAt(pos2++);
  6047. integer = charToInt[c2];
  6048. value2 |= (integer & 31) << shift;
  6049. shift += 5;
  6050. } while (integer & 32);
  6051. const shouldNegate = value2 & 1;
  6052. value2 >>>= 1;
  6053. if (shouldNegate) {
  6054. value2 = -2147483648 | -value2;
  6055. }
  6056. state[j] += value2;
  6057. return pos2;
  6058. }
  6059. function hasMoreVlq(mappings, i, length) {
  6060. if (i >= length)
  6061. return false;
  6062. return mappings.charCodeAt(i) !== comma;
  6063. }
  6064. function sort(line2) {
  6065. line2.sort(sortComparator);
  6066. }
  6067. function sortComparator(a, b) {
  6068. return a[0] - b[0];
  6069. }
  6070. function encode(decoded) {
  6071. const state = new Int32Array(5);
  6072. const bufLength = 1024 * 16;
  6073. const subLength = bufLength - 36;
  6074. const buf = new Uint8Array(bufLength);
  6075. const sub = buf.subarray(0, subLength);
  6076. let pos2 = 0;
  6077. let out = "";
  6078. for (let i = 0; i < decoded.length; i++) {
  6079. const line2 = decoded[i];
  6080. if (i > 0) {
  6081. if (pos2 === bufLength) {
  6082. out += td.decode(buf);
  6083. pos2 = 0;
  6084. }
  6085. buf[pos2++] = semicolon;
  6086. }
  6087. if (line2.length === 0)
  6088. continue;
  6089. state[0] = 0;
  6090. for (let j = 0; j < line2.length; j++) {
  6091. const segment = line2[j];
  6092. if (pos2 > subLength) {
  6093. out += td.decode(sub);
  6094. buf.copyWithin(0, subLength, pos2);
  6095. pos2 -= subLength;
  6096. }
  6097. if (j > 0)
  6098. buf[pos2++] = comma;
  6099. pos2 = encodeInteger(buf, pos2, state, segment, 0);
  6100. if (segment.length === 1)
  6101. continue;
  6102. pos2 = encodeInteger(buf, pos2, state, segment, 1);
  6103. pos2 = encodeInteger(buf, pos2, state, segment, 2);
  6104. pos2 = encodeInteger(buf, pos2, state, segment, 3);
  6105. if (segment.length === 4)
  6106. continue;
  6107. pos2 = encodeInteger(buf, pos2, state, segment, 4);
  6108. }
  6109. }
  6110. return out + td.decode(buf.subarray(0, pos2));
  6111. }
  6112. function encodeInteger(buf, pos2, state, segment, j) {
  6113. const next = segment[j];
  6114. let num = next - state[j];
  6115. state[j] = next;
  6116. num = num < 0 ? -num << 1 | 1 : num << 1;
  6117. do {
  6118. let clamped = num & 31;
  6119. num >>>= 5;
  6120. if (num > 0)
  6121. clamped |= 32;
  6122. buf[pos2++] = intToChar[clamped];
  6123. } while (num > 0);
  6124. return pos2;
  6125. }
  6126. exports2.decode = decode2;
  6127. exports2.encode = encode;
  6128. Object.defineProperty(exports2, "__esModule", { value: true });
  6129. });
  6130. }
  6131. });
  6132. // node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js
  6133. var require_resolve_uri_umd = __commonJS({
  6134. "node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"(exports, module) {
  6135. (function(global2, factory) {
  6136. typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.resolveURI = factory());
  6137. })(exports, function() {
  6138. "use strict";
  6139. const schemeRegex = /^[\w+.-]+:\/\//;
  6140. const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
  6141. const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
  6142. var UrlType;
  6143. (function(UrlType2) {
  6144. UrlType2[UrlType2["Empty"] = 1] = "Empty";
  6145. UrlType2[UrlType2["Hash"] = 2] = "Hash";
  6146. UrlType2[UrlType2["Query"] = 3] = "Query";
  6147. UrlType2[UrlType2["RelativePath"] = 4] = "RelativePath";
  6148. UrlType2[UrlType2["AbsolutePath"] = 5] = "AbsolutePath";
  6149. UrlType2[UrlType2["SchemeRelative"] = 6] = "SchemeRelative";
  6150. UrlType2[UrlType2["Absolute"] = 7] = "Absolute";
  6151. })(UrlType || (UrlType = {}));
  6152. function isAbsoluteUrl(input) {
  6153. return schemeRegex.test(input);
  6154. }
  6155. function isSchemeRelativeUrl(input) {
  6156. return input.startsWith("//");
  6157. }
  6158. function isAbsolutePath(input) {
  6159. return input.startsWith("/");
  6160. }
  6161. function isFileUrl(input) {
  6162. return input.startsWith("file:");
  6163. }
  6164. function isRelative(input) {
  6165. return /^[.?#]/.test(input);
  6166. }
  6167. function parseAbsoluteUrl(input) {
  6168. const match = urlRegex.exec(input);
  6169. return makeUrl(match[1], match[2] || "", match[3], match[4] || "", match[5] || "/", match[6] || "", match[7] || "");
  6170. }
  6171. function parseFileUrl(input) {
  6172. const match = fileRegex.exec(input);
  6173. const path = match[2];
  6174. return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path) ? path : "/" + path, match[3] || "", match[4] || "");
  6175. }
  6176. function makeUrl(scheme, user, host, port, path, query, hash) {
  6177. return {
  6178. scheme,
  6179. user,
  6180. host,
  6181. port,
  6182. path,
  6183. query,
  6184. hash,
  6185. type: UrlType.Absolute
  6186. };
  6187. }
  6188. function parseUrl(input) {
  6189. if (isSchemeRelativeUrl(input)) {
  6190. const url2 = parseAbsoluteUrl("http:" + input);
  6191. url2.scheme = "";
  6192. url2.type = UrlType.SchemeRelative;
  6193. return url2;
  6194. }
  6195. if (isAbsolutePath(input)) {
  6196. const url2 = parseAbsoluteUrl("http://foo.com" + input);
  6197. url2.scheme = "";
  6198. url2.host = "";
  6199. url2.type = UrlType.AbsolutePath;
  6200. return url2;
  6201. }
  6202. if (isFileUrl(input))
  6203. return parseFileUrl(input);
  6204. if (isAbsoluteUrl(input))
  6205. return parseAbsoluteUrl(input);
  6206. const url = parseAbsoluteUrl("http://foo.com/" + input);
  6207. url.scheme = "";
  6208. url.host = "";
  6209. url.type = input ? input.startsWith("?") ? UrlType.Query : input.startsWith("#") ? UrlType.Hash : UrlType.RelativePath : UrlType.Empty;
  6210. return url;
  6211. }
  6212. function stripPathFilename(path) {
  6213. if (path.endsWith("/.."))
  6214. return path;
  6215. const index2 = path.lastIndexOf("/");
  6216. return path.slice(0, index2 + 1);
  6217. }
  6218. function mergePaths(url, base2) {
  6219. normalizePath(base2, base2.type);
  6220. if (url.path === "/") {
  6221. url.path = base2.path;
  6222. } else {
  6223. url.path = stripPathFilename(base2.path) + url.path;
  6224. }
  6225. }
  6226. function normalizePath(url, type) {
  6227. const rel = type <= UrlType.RelativePath;
  6228. const pieces = url.path.split("/");
  6229. let pointer = 1;
  6230. let positive = 0;
  6231. let addTrailingSlash = false;
  6232. for (let i = 1; i < pieces.length; i++) {
  6233. const piece = pieces[i];
  6234. if (!piece) {
  6235. addTrailingSlash = true;
  6236. continue;
  6237. }
  6238. addTrailingSlash = false;
  6239. if (piece === ".")
  6240. continue;
  6241. if (piece === "..") {
  6242. if (positive) {
  6243. addTrailingSlash = true;
  6244. positive--;
  6245. pointer--;
  6246. } else if (rel) {
  6247. pieces[pointer++] = piece;
  6248. }
  6249. continue;
  6250. }
  6251. pieces[pointer++] = piece;
  6252. positive++;
  6253. }
  6254. let path = "";
  6255. for (let i = 1; i < pointer; i++) {
  6256. path += "/" + pieces[i];
  6257. }
  6258. if (!path || addTrailingSlash && !path.endsWith("/..")) {
  6259. path += "/";
  6260. }
  6261. url.path = path;
  6262. }
  6263. function resolve(input, base2) {
  6264. if (!input && !base2)
  6265. return "";
  6266. const url = parseUrl(input);
  6267. let inputType = url.type;
  6268. if (base2 && inputType !== UrlType.Absolute) {
  6269. const baseUrl = parseUrl(base2);
  6270. const baseType = baseUrl.type;
  6271. switch (inputType) {
  6272. case UrlType.Empty:
  6273. url.hash = baseUrl.hash;
  6274. case UrlType.Hash:
  6275. url.query = baseUrl.query;
  6276. case UrlType.Query:
  6277. case UrlType.RelativePath:
  6278. mergePaths(url, baseUrl);
  6279. case UrlType.AbsolutePath:
  6280. url.user = baseUrl.user;
  6281. url.host = baseUrl.host;
  6282. url.port = baseUrl.port;
  6283. case UrlType.SchemeRelative:
  6284. url.scheme = baseUrl.scheme;
  6285. }
  6286. if (baseType > inputType)
  6287. inputType = baseType;
  6288. }
  6289. normalizePath(url, inputType);
  6290. const queryHash = url.query + url.hash;
  6291. switch (inputType) {
  6292. case UrlType.Hash:
  6293. case UrlType.Query:
  6294. return queryHash;
  6295. case UrlType.RelativePath: {
  6296. const path = url.path.slice(1);
  6297. if (!path)
  6298. return queryHash || ".";
  6299. if (isRelative(base2 || input) && !isRelative(path)) {
  6300. return "./" + path + queryHash;
  6301. }
  6302. return path + queryHash;
  6303. }
  6304. case UrlType.AbsolutePath:
  6305. return url.path + queryHash;
  6306. default:
  6307. return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
  6308. }
  6309. }
  6310. return resolve;
  6311. });
  6312. }
  6313. });
  6314. // node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js
  6315. var require_trace_mapping_umd = __commonJS({
  6316. "node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"(exports, module) {
  6317. (function(global2, factory) {
  6318. typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require_sourcemap_codec_umd2(), require_resolve_uri_umd()) : typeof define === "function" && define.amd ? define(["exports", "@jridgewell/sourcemap-codec", "@jridgewell/resolve-uri"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.traceMapping = {}, global2.sourcemapCodec, global2.resolveURI));
  6319. })(exports, function(exports2, sourcemapCodec, resolveUri) {
  6320. "use strict";
  6321. function _interopDefaultLegacy(e) {
  6322. return e && typeof e === "object" && "default" in e ? e : { "default": e };
  6323. }
  6324. var resolveUri__default = /* @__PURE__ */ _interopDefaultLegacy(resolveUri);
  6325. function resolve(input, base2) {
  6326. if (base2 && !base2.endsWith("/"))
  6327. base2 += "/";
  6328. return resolveUri__default["default"](input, base2);
  6329. }
  6330. function stripFilename(path) {
  6331. if (!path)
  6332. return "";
  6333. const index2 = path.lastIndexOf("/");
  6334. return path.slice(0, index2 + 1);
  6335. }
  6336. const COLUMN = 0;
  6337. const SOURCES_INDEX = 1;
  6338. const SOURCE_LINE = 2;
  6339. const SOURCE_COLUMN = 3;
  6340. const NAMES_INDEX = 4;
  6341. const REV_GENERATED_LINE = 1;
  6342. const REV_GENERATED_COLUMN = 2;
  6343. function maybeSort(mappings, owned) {
  6344. const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
  6345. if (unsortedIndex === mappings.length)
  6346. return mappings;
  6347. if (!owned)
  6348. mappings = mappings.slice();
  6349. for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
  6350. mappings[i] = sortSegments(mappings[i], owned);
  6351. }
  6352. return mappings;
  6353. }
  6354. function nextUnsortedSegmentLine(mappings, start3) {
  6355. for (let i = start3; i < mappings.length; i++) {
  6356. if (!isSorted(mappings[i]))
  6357. return i;
  6358. }
  6359. return mappings.length;
  6360. }
  6361. function isSorted(line2) {
  6362. for (let j = 1; j < line2.length; j++) {
  6363. if (line2[j][COLUMN] < line2[j - 1][COLUMN]) {
  6364. return false;
  6365. }
  6366. }
  6367. return true;
  6368. }
  6369. function sortSegments(line2, owned) {
  6370. if (!owned)
  6371. line2 = line2.slice();
  6372. return line2.sort(sortComparator);
  6373. }
  6374. function sortComparator(a, b) {
  6375. return a[COLUMN] - b[COLUMN];
  6376. }
  6377. let found = false;
  6378. function binarySearch(haystack, needle, low, high) {
  6379. while (low <= high) {
  6380. const mid = low + (high - low >> 1);
  6381. const cmp = haystack[mid][COLUMN] - needle;
  6382. if (cmp === 0) {
  6383. found = true;
  6384. return mid;
  6385. }
  6386. if (cmp < 0) {
  6387. low = mid + 1;
  6388. } else {
  6389. high = mid - 1;
  6390. }
  6391. }
  6392. found = false;
  6393. return low - 1;
  6394. }
  6395. function upperBound(haystack, needle, index2) {
  6396. for (let i = index2 + 1; i < haystack.length; index2 = i++) {
  6397. if (haystack[i][COLUMN] !== needle)
  6398. break;
  6399. }
  6400. return index2;
  6401. }
  6402. function lowerBound(haystack, needle, index2) {
  6403. for (let i = index2 - 1; i >= 0; index2 = i--) {
  6404. if (haystack[i][COLUMN] !== needle)
  6405. break;
  6406. }
  6407. return index2;
  6408. }
  6409. function memoizedState() {
  6410. return {
  6411. lastKey: -1,
  6412. lastNeedle: -1,
  6413. lastIndex: -1
  6414. };
  6415. }
  6416. function memoizedBinarySearch(haystack, needle, state, key2) {
  6417. const { lastKey, lastNeedle, lastIndex } = state;
  6418. let low = 0;
  6419. let high = haystack.length - 1;
  6420. if (key2 === lastKey) {
  6421. if (needle === lastNeedle) {
  6422. found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
  6423. return lastIndex;
  6424. }
  6425. if (needle >= lastNeedle) {
  6426. low = lastIndex === -1 ? 0 : lastIndex;
  6427. } else {
  6428. high = lastIndex;
  6429. }
  6430. }
  6431. state.lastKey = key2;
  6432. state.lastNeedle = needle;
  6433. return state.lastIndex = binarySearch(haystack, needle, low, high);
  6434. }
  6435. function buildBySources(decoded, memos) {
  6436. const sources = memos.map(buildNullArray);
  6437. for (let i = 0; i < decoded.length; i++) {
  6438. const line2 = decoded[i];
  6439. for (let j = 0; j < line2.length; j++) {
  6440. const seg = line2[j];
  6441. if (seg.length === 1)
  6442. continue;
  6443. const sourceIndex = seg[SOURCES_INDEX];
  6444. const sourceLine = seg[SOURCE_LINE];
  6445. const sourceColumn = seg[SOURCE_COLUMN];
  6446. const originalSource = sources[sourceIndex];
  6447. const originalLine = originalSource[sourceLine] || (originalSource[sourceLine] = []);
  6448. const memo = memos[sourceIndex];
  6449. const index2 = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));
  6450. insert(originalLine, memo.lastIndex = index2 + 1, [sourceColumn, i, seg[COLUMN]]);
  6451. }
  6452. }
  6453. return sources;
  6454. }
  6455. function insert(array, index2, value2) {
  6456. for (let i = array.length; i > index2; i--) {
  6457. array[i] = array[i - 1];
  6458. }
  6459. array[index2] = value2;
  6460. }
  6461. function buildNullArray() {
  6462. return { __proto__: null };
  6463. }
  6464. const AnyMap = function(map, mapUrl) {
  6465. const parsed = typeof map === "string" ? JSON.parse(map) : map;
  6466. if (!("sections" in parsed))
  6467. return new TraceMap(parsed, mapUrl);
  6468. const mappings = [];
  6469. const sources = [];
  6470. const sourcesContent = [];
  6471. const names = [];
  6472. recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, 0, 0, Infinity, Infinity);
  6473. const joined = {
  6474. version: 3,
  6475. file: parsed.file,
  6476. names,
  6477. sources,
  6478. sourcesContent,
  6479. mappings
  6480. };
  6481. return exports2.presortedDecodedMap(joined);
  6482. };
  6483. function recurse(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
  6484. const { sections } = input;
  6485. for (let i = 0; i < sections.length; i++) {
  6486. const { map, offset: offset3 } = sections[i];
  6487. let sl = stopLine;
  6488. let sc = stopColumn;
  6489. if (i + 1 < sections.length) {
  6490. const nextOffset = sections[i + 1].offset;
  6491. sl = Math.min(stopLine, lineOffset + nextOffset.line);
  6492. if (sl === stopLine) {
  6493. sc = Math.min(stopColumn, columnOffset + nextOffset.column);
  6494. } else if (sl < stopLine) {
  6495. sc = columnOffset + nextOffset.column;
  6496. }
  6497. }
  6498. addSection(map, mapUrl, mappings, sources, sourcesContent, names, lineOffset + offset3.line, columnOffset + offset3.column, sl, sc);
  6499. }
  6500. }
  6501. function addSection(input, mapUrl, mappings, sources, sourcesContent, names, lineOffset, columnOffset, stopLine, stopColumn) {
  6502. if ("sections" in input)
  6503. return recurse(...arguments);
  6504. const map = new TraceMap(input, mapUrl);
  6505. const sourcesOffset = sources.length;
  6506. const namesOffset = names.length;
  6507. const decoded = exports2.decodedMappings(map);
  6508. const { resolvedSources, sourcesContent: contents } = map;
  6509. append(sources, resolvedSources);
  6510. append(names, map.names);
  6511. if (contents)
  6512. append(sourcesContent, contents);
  6513. else
  6514. for (let i = 0; i < resolvedSources.length; i++)
  6515. sourcesContent.push(null);
  6516. for (let i = 0; i < decoded.length; i++) {
  6517. const lineI = lineOffset + i;
  6518. if (lineI > stopLine)
  6519. return;
  6520. const out = getLine(mappings, lineI);
  6521. const cOffset = i === 0 ? columnOffset : 0;
  6522. const line2 = decoded[i];
  6523. for (let j = 0; j < line2.length; j++) {
  6524. const seg = line2[j];
  6525. const column2 = cOffset + seg[COLUMN];
  6526. if (lineI === stopLine && column2 >= stopColumn)
  6527. return;
  6528. if (seg.length === 1) {
  6529. out.push([column2]);
  6530. continue;
  6531. }
  6532. const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
  6533. const sourceLine = seg[SOURCE_LINE];
  6534. const sourceColumn = seg[SOURCE_COLUMN];
  6535. out.push(seg.length === 4 ? [column2, sourcesIndex, sourceLine, sourceColumn] : [column2, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]);
  6536. }
  6537. }
  6538. }
  6539. function append(arr, other) {
  6540. for (let i = 0; i < other.length; i++)
  6541. arr.push(other[i]);
  6542. }
  6543. function getLine(arr, index2) {
  6544. for (let i = arr.length; i <= index2; i++)
  6545. arr[i] = [];
  6546. return arr[index2];
  6547. }
  6548. const LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
  6549. const COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
  6550. const LEAST_UPPER_BOUND = -1;
  6551. const GREATEST_LOWER_BOUND = 1;
  6552. exports2.encodedMappings = void 0;
  6553. exports2.decodedMappings = void 0;
  6554. exports2.traceSegment = void 0;
  6555. exports2.originalPositionFor = void 0;
  6556. exports2.generatedPositionFor = void 0;
  6557. exports2.allGeneratedPositionsFor = void 0;
  6558. exports2.eachMapping = void 0;
  6559. exports2.sourceContentFor = void 0;
  6560. exports2.presortedDecodedMap = void 0;
  6561. exports2.decodedMap = void 0;
  6562. exports2.encodedMap = void 0;
  6563. class TraceMap {
  6564. constructor(map, mapUrl) {
  6565. const isString = typeof map === "string";
  6566. if (!isString && map._decodedMemo)
  6567. return map;
  6568. const parsed = isString ? JSON.parse(map) : map;
  6569. const { version: version3, file, names, sourceRoot, sources, sourcesContent } = parsed;
  6570. this.version = version3;
  6571. this.file = file;
  6572. this.names = names;
  6573. this.sourceRoot = sourceRoot;
  6574. this.sources = sources;
  6575. this.sourcesContent = sourcesContent;
  6576. const from = resolve(sourceRoot || "", stripFilename(mapUrl));
  6577. this.resolvedSources = sources.map((s) => resolve(s || "", from));
  6578. const { mappings } = parsed;
  6579. if (typeof mappings === "string") {
  6580. this._encoded = mappings;
  6581. this._decoded = void 0;
  6582. } else {
  6583. this._encoded = void 0;
  6584. this._decoded = maybeSort(mappings, isString);
  6585. }
  6586. this._decodedMemo = memoizedState();
  6587. this._bySources = void 0;
  6588. this._bySourceMemos = void 0;
  6589. }
  6590. }
  6591. (() => {
  6592. exports2.encodedMappings = (map) => {
  6593. var _a;
  6594. return (_a = map._encoded) !== null && _a !== void 0 ? _a : map._encoded = sourcemapCodec.encode(map._decoded);
  6595. };
  6596. exports2.decodedMappings = (map) => {
  6597. return map._decoded || (map._decoded = sourcemapCodec.decode(map._encoded));
  6598. };
  6599. exports2.traceSegment = (map, line2, column2) => {
  6600. const decoded = exports2.decodedMappings(map);
  6601. if (line2 >= decoded.length)
  6602. return null;
  6603. const segments = decoded[line2];
  6604. const index2 = traceSegmentInternal(segments, map._decodedMemo, line2, column2, GREATEST_LOWER_BOUND);
  6605. return index2 === -1 ? null : segments[index2];
  6606. };
  6607. exports2.originalPositionFor = (map, { line: line2, column: column2, bias }) => {
  6608. line2--;
  6609. if (line2 < 0)
  6610. throw new Error(LINE_GTR_ZERO);
  6611. if (column2 < 0)
  6612. throw new Error(COL_GTR_EQ_ZERO);
  6613. const decoded = exports2.decodedMappings(map);
  6614. if (line2 >= decoded.length)
  6615. return OMapping(null, null, null, null);
  6616. const segments = decoded[line2];
  6617. const index2 = traceSegmentInternal(segments, map._decodedMemo, line2, column2, bias || GREATEST_LOWER_BOUND);
  6618. if (index2 === -1)
  6619. return OMapping(null, null, null, null);
  6620. const segment = segments[index2];
  6621. if (segment.length === 1)
  6622. return OMapping(null, null, null, null);
  6623. const { names, resolvedSources } = map;
  6624. return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
  6625. };
  6626. exports2.allGeneratedPositionsFor = (map, { source: source2, line: line2, column: column2, bias }) => {
  6627. return generatedPosition(map, source2, line2, column2, bias || LEAST_UPPER_BOUND, true);
  6628. };
  6629. exports2.generatedPositionFor = (map, { source: source2, line: line2, column: column2, bias }) => {
  6630. return generatedPosition(map, source2, line2, column2, bias || GREATEST_LOWER_BOUND, false);
  6631. };
  6632. exports2.eachMapping = (map, cb) => {
  6633. const decoded = exports2.decodedMappings(map);
  6634. const { names, resolvedSources } = map;
  6635. for (let i = 0; i < decoded.length; i++) {
  6636. const line2 = decoded[i];
  6637. for (let j = 0; j < line2.length; j++) {
  6638. const seg = line2[j];
  6639. const generatedLine = i + 1;
  6640. const generatedColumn = seg[0];
  6641. let source2 = null;
  6642. let originalLine = null;
  6643. let originalColumn = null;
  6644. let name2 = null;
  6645. if (seg.length !== 1) {
  6646. source2 = resolvedSources[seg[1]];
  6647. originalLine = seg[2] + 1;
  6648. originalColumn = seg[3];
  6649. }
  6650. if (seg.length === 5)
  6651. name2 = names[seg[4]];
  6652. cb({
  6653. generatedLine,
  6654. generatedColumn,
  6655. source: source2,
  6656. originalLine,
  6657. originalColumn,
  6658. name: name2
  6659. });
  6660. }
  6661. }
  6662. };
  6663. exports2.sourceContentFor = (map, source2) => {
  6664. const { sources, resolvedSources, sourcesContent } = map;
  6665. if (sourcesContent == null)
  6666. return null;
  6667. let index2 = sources.indexOf(source2);
  6668. if (index2 === -1)
  6669. index2 = resolvedSources.indexOf(source2);
  6670. return index2 === -1 ? null : sourcesContent[index2];
  6671. };
  6672. exports2.presortedDecodedMap = (map, mapUrl) => {
  6673. const tracer = new TraceMap(clone(map, []), mapUrl);
  6674. tracer._decoded = map.mappings;
  6675. return tracer;
  6676. };
  6677. exports2.decodedMap = (map) => {
  6678. return clone(map, exports2.decodedMappings(map));
  6679. };
  6680. exports2.encodedMap = (map) => {
  6681. return clone(map, exports2.encodedMappings(map));
  6682. };
  6683. function generatedPosition(map, source2, line2, column2, bias, all4) {
  6684. line2--;
  6685. if (line2 < 0)
  6686. throw new Error(LINE_GTR_ZERO);
  6687. if (column2 < 0)
  6688. throw new Error(COL_GTR_EQ_ZERO);
  6689. const { sources, resolvedSources } = map;
  6690. let sourceIndex = sources.indexOf(source2);
  6691. if (sourceIndex === -1)
  6692. sourceIndex = resolvedSources.indexOf(source2);
  6693. if (sourceIndex === -1)
  6694. return all4 ? [] : GMapping(null, null);
  6695. const generated2 = map._bySources || (map._bySources = buildBySources(exports2.decodedMappings(map), map._bySourceMemos = sources.map(memoizedState)));
  6696. const segments = generated2[sourceIndex][line2];
  6697. if (segments == null)
  6698. return all4 ? [] : GMapping(null, null);
  6699. const memo = map._bySourceMemos[sourceIndex];
  6700. if (all4)
  6701. return sliceGeneratedPositions(segments, memo, line2, column2, bias);
  6702. const index2 = traceSegmentInternal(segments, memo, line2, column2, bias);
  6703. if (index2 === -1)
  6704. return GMapping(null, null);
  6705. const segment = segments[index2];
  6706. return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
  6707. }
  6708. })();
  6709. function clone(map, mappings) {
  6710. return {
  6711. version: map.version,
  6712. file: map.file,
  6713. names: map.names,
  6714. sourceRoot: map.sourceRoot,
  6715. sources: map.sources,
  6716. sourcesContent: map.sourcesContent,
  6717. mappings
  6718. };
  6719. }
  6720. function OMapping(source2, line2, column2, name2) {
  6721. return { source: source2, line: line2, column: column2, name: name2 };
  6722. }
  6723. function GMapping(line2, column2) {
  6724. return { line: line2, column: column2 };
  6725. }
  6726. function traceSegmentInternal(segments, memo, line2, column2, bias) {
  6727. let index2 = memoizedBinarySearch(segments, column2, memo, line2);
  6728. if (found) {
  6729. index2 = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column2, index2);
  6730. } else if (bias === LEAST_UPPER_BOUND)
  6731. index2++;
  6732. if (index2 === -1 || index2 === segments.length)
  6733. return -1;
  6734. return index2;
  6735. }
  6736. function sliceGeneratedPositions(segments, memo, line2, column2, bias) {
  6737. let min = traceSegmentInternal(segments, memo, line2, column2, GREATEST_LOWER_BOUND);
  6738. if (!found && bias === LEAST_UPPER_BOUND)
  6739. min++;
  6740. if (min === -1 || min === segments.length)
  6741. return [];
  6742. const matchedColumn = found ? column2 : segments[min][COLUMN];
  6743. if (!found)
  6744. min = lowerBound(segments, matchedColumn, min);
  6745. const max = upperBound(segments, matchedColumn, min);
  6746. const result = [];
  6747. for (; min <= max; min++) {
  6748. const segment = segments[min];
  6749. result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
  6750. }
  6751. return result;
  6752. }
  6753. exports2.AnyMap = AnyMap;
  6754. exports2.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND;
  6755. exports2.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND;
  6756. exports2.TraceMap = TraceMap;
  6757. Object.defineProperty(exports2, "__esModule", { value: true });
  6758. });
  6759. }
  6760. });
  6761. // node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js
  6762. var require_gen_mapping_umd = __commonJS({
  6763. "node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(exports, module) {
  6764. (function(global2, factory) {
  6765. typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require_set_array_umd(), require_sourcemap_codec_umd(), require_trace_mapping_umd()) : typeof define === "function" && define.amd ? define(["exports", "@jridgewell/set-array", "@jridgewell/sourcemap-codec", "@jridgewell/trace-mapping"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.genMapping = {}, global2.setArray, global2.sourcemapCodec, global2.traceMapping));
  6766. })(exports, function(exports2, setArray, sourcemapCodec, traceMapping) {
  6767. "use strict";
  6768. const COLUMN = 0;
  6769. const SOURCES_INDEX = 1;
  6770. const SOURCE_LINE = 2;
  6771. const SOURCE_COLUMN = 3;
  6772. const NAMES_INDEX = 4;
  6773. const NO_NAME = -1;
  6774. exports2.addSegment = void 0;
  6775. exports2.addMapping = void 0;
  6776. exports2.maybeAddSegment = void 0;
  6777. exports2.maybeAddMapping = void 0;
  6778. exports2.setSourceContent = void 0;
  6779. exports2.toDecodedMap = void 0;
  6780. exports2.toEncodedMap = void 0;
  6781. exports2.fromMap = void 0;
  6782. exports2.allMappings = void 0;
  6783. let addSegmentInternal;
  6784. class GenMapping {
  6785. constructor({ file, sourceRoot } = {}) {
  6786. this._names = new setArray.SetArray();
  6787. this._sources = new setArray.SetArray();
  6788. this._sourcesContent = [];
  6789. this._mappings = [];
  6790. this.file = file;
  6791. this.sourceRoot = sourceRoot;
  6792. }
  6793. }
  6794. (() => {
  6795. exports2.addSegment = (map, genLine, genColumn, source2, sourceLine, sourceColumn, name2, content3) => {
  6796. return addSegmentInternal(false, map, genLine, genColumn, source2, sourceLine, sourceColumn, name2, content3);
  6797. };
  6798. exports2.maybeAddSegment = (map, genLine, genColumn, source2, sourceLine, sourceColumn, name2, content3) => {
  6799. return addSegmentInternal(true, map, genLine, genColumn, source2, sourceLine, sourceColumn, name2, content3);
  6800. };
  6801. exports2.addMapping = (map, mapping) => {
  6802. return addMappingInternal(false, map, mapping);
  6803. };
  6804. exports2.maybeAddMapping = (map, mapping) => {
  6805. return addMappingInternal(true, map, mapping);
  6806. };
  6807. exports2.setSourceContent = (map, source2, content3) => {
  6808. const { _sources: sources, _sourcesContent: sourcesContent } = map;
  6809. sourcesContent[setArray.put(sources, source2)] = content3;
  6810. };
  6811. exports2.toDecodedMap = (map) => {
  6812. const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = map;
  6813. removeEmptyFinalLines(mappings);
  6814. return {
  6815. version: 3,
  6816. file: file || void 0,
  6817. names: names.array,
  6818. sourceRoot: sourceRoot || void 0,
  6819. sources: sources.array,
  6820. sourcesContent,
  6821. mappings
  6822. };
  6823. };
  6824. exports2.toEncodedMap = (map) => {
  6825. const decoded = exports2.toDecodedMap(map);
  6826. return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) });
  6827. };
  6828. exports2.allMappings = (map) => {
  6829. const out = [];
  6830. const { _mappings: mappings, _sources: sources, _names: names } = map;
  6831. for (let i = 0; i < mappings.length; i++) {
  6832. const line2 = mappings[i];
  6833. for (let j = 0; j < line2.length; j++) {
  6834. const seg = line2[j];
  6835. const generated2 = { line: i + 1, column: seg[COLUMN] };
  6836. let source2 = void 0;
  6837. let original = void 0;
  6838. let name2 = void 0;
  6839. if (seg.length !== 1) {
  6840. source2 = sources.array[seg[SOURCES_INDEX]];
  6841. original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };
  6842. if (seg.length === 5)
  6843. name2 = names.array[seg[NAMES_INDEX]];
  6844. }
  6845. out.push({ generated: generated2, source: source2, original, name: name2 });
  6846. }
  6847. }
  6848. return out;
  6849. };
  6850. exports2.fromMap = (input) => {
  6851. const map = new traceMapping.TraceMap(input);
  6852. const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
  6853. putAll(gen._names, map.names);
  6854. putAll(gen._sources, map.sources);
  6855. gen._sourcesContent = map.sourcesContent || map.sources.map(() => null);
  6856. gen._mappings = traceMapping.decodedMappings(map);
  6857. return gen;
  6858. };
  6859. addSegmentInternal = (skipable, map, genLine, genColumn, source2, sourceLine, sourceColumn, name2, content3) => {
  6860. const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = map;
  6861. const line2 = getLine(mappings, genLine);
  6862. const index2 = getColumnIndex(line2, genColumn);
  6863. if (!source2) {
  6864. if (skipable && skipSourceless(line2, index2))
  6865. return;
  6866. return insert(line2, index2, [genColumn]);
  6867. }
  6868. const sourcesIndex = setArray.put(sources, source2);
  6869. const namesIndex = name2 ? setArray.put(names, name2) : NO_NAME;
  6870. if (sourcesIndex === sourcesContent.length)
  6871. sourcesContent[sourcesIndex] = content3 !== null && content3 !== void 0 ? content3 : null;
  6872. if (skipable && skipSource(line2, index2, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
  6873. return;
  6874. }
  6875. return insert(line2, index2, name2 ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn]);
  6876. };
  6877. })();
  6878. function getLine(mappings, index2) {
  6879. for (let i = mappings.length; i <= index2; i++) {
  6880. mappings[i] = [];
  6881. }
  6882. return mappings[index2];
  6883. }
  6884. function getColumnIndex(line2, genColumn) {
  6885. let index2 = line2.length;
  6886. for (let i = index2 - 1; i >= 0; index2 = i--) {
  6887. const current3 = line2[i];
  6888. if (genColumn >= current3[COLUMN])
  6889. break;
  6890. }
  6891. return index2;
  6892. }
  6893. function insert(array, index2, value2) {
  6894. for (let i = array.length; i > index2; i--) {
  6895. array[i] = array[i - 1];
  6896. }
  6897. array[index2] = value2;
  6898. }
  6899. function removeEmptyFinalLines(mappings) {
  6900. const { length } = mappings;
  6901. let len = length;
  6902. for (let i = len - 1; i >= 0; len = i, i--) {
  6903. if (mappings[i].length > 0)
  6904. break;
  6905. }
  6906. if (len < length)
  6907. mappings.length = len;
  6908. }
  6909. function putAll(strarr, array) {
  6910. for (let i = 0; i < array.length; i++)
  6911. setArray.put(strarr, array[i]);
  6912. }
  6913. function skipSourceless(line2, index2) {
  6914. if (index2 === 0)
  6915. return true;
  6916. const prev = line2[index2 - 1];
  6917. return prev.length === 1;
  6918. }
  6919. function skipSource(line2, index2, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
  6920. if (index2 === 0)
  6921. return false;
  6922. const prev = line2[index2 - 1];
  6923. if (prev.length === 1)
  6924. return false;
  6925. return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
  6926. }
  6927. function addMappingInternal(skipable, map, mapping) {
  6928. const { generated: generated2, source: source2, original, name: name2, content: content3 } = mapping;
  6929. if (!source2) {
  6930. return addSegmentInternal(skipable, map, generated2.line - 1, generated2.column, null, null, null, null, null);
  6931. }
  6932. const s = source2;
  6933. return addSegmentInternal(skipable, map, generated2.line - 1, generated2.column, s, original.line - 1, original.column, name2, content3);
  6934. }
  6935. exports2.GenMapping = GenMapping;
  6936. Object.defineProperty(exports2, "__esModule", { value: true });
  6937. });
  6938. }
  6939. });
  6940. // node_modules/@babel/generator/lib/source-map.js
  6941. var require_source_map = __commonJS({
  6942. "node_modules/@babel/generator/lib/source-map.js"(exports) {
  6943. "use strict";
  6944. Object.defineProperty(exports, "__esModule", {
  6945. value: true
  6946. });
  6947. exports.default = void 0;
  6948. var _genMapping = require_gen_mapping_umd();
  6949. var _traceMapping = require_trace_mapping_umd();
  6950. var SourceMap = class {
  6951. constructor(opts, code2) {
  6952. var _opts$sourceFileName;
  6953. this._map = void 0;
  6954. this._rawMappings = void 0;
  6955. this._sourceFileName = void 0;
  6956. this._lastGenLine = 0;
  6957. this._lastSourceLine = 0;
  6958. this._lastSourceColumn = 0;
  6959. this._inputMap = void 0;
  6960. const map = this._map = new _genMapping.GenMapping({
  6961. sourceRoot: opts.sourceRoot
  6962. });
  6963. this._sourceFileName = (_opts$sourceFileName = opts.sourceFileName) == null ? void 0 : _opts$sourceFileName.replace(/\\/g, "/");
  6964. this._rawMappings = void 0;
  6965. if (opts.inputSourceMap) {
  6966. this._inputMap = new _traceMapping.TraceMap(opts.inputSourceMap);
  6967. const resolvedSources = this._inputMap.resolvedSources;
  6968. if (resolvedSources.length) {
  6969. for (let i = 0; i < resolvedSources.length; i++) {
  6970. var _this$_inputMap$sourc;
  6971. (0, _genMapping.setSourceContent)(map, resolvedSources[i], (_this$_inputMap$sourc = this._inputMap.sourcesContent) == null ? void 0 : _this$_inputMap$sourc[i]);
  6972. }
  6973. }
  6974. }
  6975. if (typeof code2 === "string" && !opts.inputSourceMap) {
  6976. (0, _genMapping.setSourceContent)(map, this._sourceFileName, code2);
  6977. } else if (typeof code2 === "object") {
  6978. for (const sourceFileName of Object.keys(code2)) {
  6979. (0, _genMapping.setSourceContent)(map, sourceFileName.replace(/\\/g, "/"), code2[sourceFileName]);
  6980. }
  6981. }
  6982. }
  6983. get() {
  6984. return (0, _genMapping.toEncodedMap)(this._map);
  6985. }
  6986. getDecoded() {
  6987. return (0, _genMapping.toDecodedMap)(this._map);
  6988. }
  6989. getRawMappings() {
  6990. return this._rawMappings || (this._rawMappings = (0, _genMapping.allMappings)(this._map));
  6991. }
  6992. mark(generated2, line2, column2, identifierName, identifierNamePos, filename) {
  6993. var _originalMapping;
  6994. this._rawMappings = void 0;
  6995. let originalMapping;
  6996. if (line2 != null) {
  6997. if (this._inputMap) {
  6998. originalMapping = (0, _traceMapping.originalPositionFor)(this._inputMap, {
  6999. line: line2,
  7000. column: column2
  7001. });
  7002. if (!originalMapping.name && identifierNamePos) {
  7003. const originalIdentifierMapping = (0, _traceMapping.originalPositionFor)(this._inputMap, identifierNamePos);
  7004. if (originalIdentifierMapping.name) {
  7005. identifierName = originalIdentifierMapping.name;
  7006. }
  7007. }
  7008. } else {
  7009. originalMapping = {
  7010. source: (filename == null ? void 0 : filename.replace(/\\/g, "/")) || this._sourceFileName,
  7011. line: line2,
  7012. column: column2
  7013. };
  7014. }
  7015. }
  7016. (0, _genMapping.maybeAddMapping)(this._map, {
  7017. name: identifierName,
  7018. generated: generated2,
  7019. source: (_originalMapping = originalMapping) == null ? void 0 : _originalMapping.source,
  7020. original: originalMapping
  7021. });
  7022. }
  7023. };
  7024. exports.default = SourceMap;
  7025. }
  7026. });
  7027. // node_modules/@babel/generator/lib/buffer.js
  7028. var require_buffer = __commonJS({
  7029. "node_modules/@babel/generator/lib/buffer.js"(exports) {
  7030. "use strict";
  7031. Object.defineProperty(exports, "__esModule", {
  7032. value: true
  7033. });
  7034. exports.default = void 0;
  7035. var Buffer2 = class {
  7036. constructor(map) {
  7037. this._map = null;
  7038. this._buf = "";
  7039. this._str = "";
  7040. this._appendCount = 0;
  7041. this._last = 0;
  7042. this._queue = [];
  7043. this._queueCursor = 0;
  7044. this._canMarkIdName = true;
  7045. this._position = {
  7046. line: 1,
  7047. column: 0
  7048. };
  7049. this._sourcePosition = {
  7050. identifierName: void 0,
  7051. identifierNamePos: void 0,
  7052. line: void 0,
  7053. column: void 0,
  7054. filename: void 0
  7055. };
  7056. this._map = map;
  7057. this._allocQueue();
  7058. }
  7059. _allocQueue() {
  7060. const queue = this._queue;
  7061. for (let i = 0; i < 16; i++) {
  7062. queue.push({
  7063. char: 0,
  7064. repeat: 1,
  7065. line: void 0,
  7066. column: void 0,
  7067. identifierName: void 0,
  7068. identifierNamePos: void 0,
  7069. filename: ""
  7070. });
  7071. }
  7072. }
  7073. _pushQueue(char, repeat, line2, column2, filename) {
  7074. const cursor = this._queueCursor;
  7075. if (cursor === this._queue.length) {
  7076. this._allocQueue();
  7077. }
  7078. const item = this._queue[cursor];
  7079. item.char = char;
  7080. item.repeat = repeat;
  7081. item.line = line2;
  7082. item.column = column2;
  7083. item.filename = filename;
  7084. this._queueCursor++;
  7085. }
  7086. _popQueue() {
  7087. if (this._queueCursor === 0) {
  7088. throw new Error("Cannot pop from empty queue");
  7089. }
  7090. return this._queue[--this._queueCursor];
  7091. }
  7092. get() {
  7093. this._flush();
  7094. const map = this._map;
  7095. const result = {
  7096. code: (this._buf + this._str).trimRight(),
  7097. decodedMap: map == null ? void 0 : map.getDecoded(),
  7098. get __mergedMap() {
  7099. return this.map;
  7100. },
  7101. get map() {
  7102. const resultMap = map ? map.get() : null;
  7103. result.map = resultMap;
  7104. return resultMap;
  7105. },
  7106. set map(value2) {
  7107. Object.defineProperty(result, "map", {
  7108. value: value2,
  7109. writable: true
  7110. });
  7111. },
  7112. get rawMappings() {
  7113. const mappings = map == null ? void 0 : map.getRawMappings();
  7114. result.rawMappings = mappings;
  7115. return mappings;
  7116. },
  7117. set rawMappings(value2) {
  7118. Object.defineProperty(result, "rawMappings", {
  7119. value: value2,
  7120. writable: true
  7121. });
  7122. }
  7123. };
  7124. return result;
  7125. }
  7126. append(str, maybeNewline) {
  7127. this._flush();
  7128. this._append(str, this._sourcePosition, maybeNewline);
  7129. }
  7130. appendChar(char) {
  7131. this._flush();
  7132. this._appendChar(char, 1, this._sourcePosition);
  7133. }
  7134. queue(char) {
  7135. if (char === 10) {
  7136. while (this._queueCursor !== 0) {
  7137. const char2 = this._queue[this._queueCursor - 1].char;
  7138. if (char2 !== 32 && char2 !== 9) {
  7139. break;
  7140. }
  7141. this._queueCursor--;
  7142. }
  7143. }
  7144. const sourcePosition = this._sourcePosition;
  7145. this._pushQueue(char, 1, sourcePosition.line, sourcePosition.column, sourcePosition.filename);
  7146. }
  7147. queueIndentation(char, repeat) {
  7148. this._pushQueue(char, repeat, void 0, void 0, void 0);
  7149. }
  7150. _flush() {
  7151. const queueCursor = this._queueCursor;
  7152. const queue = this._queue;
  7153. for (let i = 0; i < queueCursor; i++) {
  7154. const item = queue[i];
  7155. this._appendChar(item.char, item.repeat, item);
  7156. }
  7157. this._queueCursor = 0;
  7158. }
  7159. _appendChar(char, repeat, sourcePos) {
  7160. this._last = char;
  7161. this._str += repeat > 1 ? String.fromCharCode(char).repeat(repeat) : String.fromCharCode(char);
  7162. if (char !== 10) {
  7163. this._mark(sourcePos.line, sourcePos.column, sourcePos.identifierName, sourcePos.identifierNamePos, sourcePos.filename);
  7164. this._position.column += repeat;
  7165. } else {
  7166. this._position.line++;
  7167. this._position.column = 0;
  7168. }
  7169. if (this._canMarkIdName) {
  7170. sourcePos.identifierName = void 0;
  7171. sourcePos.identifierNamePos = void 0;
  7172. }
  7173. }
  7174. _append(str, sourcePos, maybeNewline) {
  7175. const len = str.length;
  7176. const position3 = this._position;
  7177. this._last = str.charCodeAt(len - 1);
  7178. if (++this._appendCount > 4096) {
  7179. +this._str;
  7180. this._buf += this._str;
  7181. this._str = str;
  7182. this._appendCount = 0;
  7183. } else {
  7184. this._str += str;
  7185. }
  7186. if (!maybeNewline && !this._map) {
  7187. position3.column += len;
  7188. return;
  7189. }
  7190. const {
  7191. column: column2,
  7192. identifierName,
  7193. identifierNamePos,
  7194. filename
  7195. } = sourcePos;
  7196. let line2 = sourcePos.line;
  7197. if ((identifierName != null || identifierNamePos != null) && this._canMarkIdName) {
  7198. sourcePos.identifierName = void 0;
  7199. sourcePos.identifierNamePos = void 0;
  7200. }
  7201. let i = str.indexOf("\n");
  7202. let last = 0;
  7203. if (i !== 0) {
  7204. this._mark(line2, column2, identifierName, identifierNamePos, filename);
  7205. }
  7206. while (i !== -1) {
  7207. position3.line++;
  7208. position3.column = 0;
  7209. last = i + 1;
  7210. if (last < len && line2 !== void 0) {
  7211. this._mark(++line2, 0, null, null, filename);
  7212. }
  7213. i = str.indexOf("\n", last);
  7214. }
  7215. position3.column += len - last;
  7216. }
  7217. _mark(line2, column2, identifierName, identifierNamePos, filename) {
  7218. var _this$_map;
  7219. (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position, line2, column2, identifierName, identifierNamePos, filename);
  7220. }
  7221. removeTrailingNewline() {
  7222. const queueCursor = this._queueCursor;
  7223. if (queueCursor !== 0 && this._queue[queueCursor - 1].char === 10) {
  7224. this._queueCursor--;
  7225. }
  7226. }
  7227. removeLastSemicolon() {
  7228. const queueCursor = this._queueCursor;
  7229. if (queueCursor !== 0 && this._queue[queueCursor - 1].char === 59) {
  7230. this._queueCursor--;
  7231. }
  7232. }
  7233. getLastChar() {
  7234. const queueCursor = this._queueCursor;
  7235. return queueCursor !== 0 ? this._queue[queueCursor - 1].char : this._last;
  7236. }
  7237. getNewlineCount() {
  7238. const queueCursor = this._queueCursor;
  7239. let count = 0;
  7240. if (queueCursor === 0)
  7241. return this._last === 10 ? 1 : 0;
  7242. for (let i = queueCursor - 1; i >= 0; i--) {
  7243. if (this._queue[i].char !== 10) {
  7244. break;
  7245. }
  7246. count++;
  7247. }
  7248. return count === queueCursor && this._last === 10 ? count + 1 : count;
  7249. }
  7250. endsWithCharAndNewline() {
  7251. const queue = this._queue;
  7252. const queueCursor = this._queueCursor;
  7253. if (queueCursor !== 0) {
  7254. const lastCp = queue[queueCursor - 1].char;
  7255. if (lastCp !== 10)
  7256. return;
  7257. if (queueCursor > 1) {
  7258. return queue[queueCursor - 2].char;
  7259. } else {
  7260. return this._last;
  7261. }
  7262. }
  7263. }
  7264. hasContent() {
  7265. return this._queueCursor !== 0 || !!this._last;
  7266. }
  7267. exactSource(loc, cb) {
  7268. if (!this._map) {
  7269. cb();
  7270. return;
  7271. }
  7272. this.source("start", loc);
  7273. const identifierName = loc.identifierName;
  7274. const sourcePos = this._sourcePosition;
  7275. if (identifierName) {
  7276. this._canMarkIdName = false;
  7277. sourcePos.identifierName = identifierName;
  7278. }
  7279. cb();
  7280. if (identifierName) {
  7281. this._canMarkIdName = true;
  7282. sourcePos.identifierName = void 0;
  7283. sourcePos.identifierNamePos = void 0;
  7284. }
  7285. this.source("end", loc);
  7286. }
  7287. source(prop, loc) {
  7288. if (!this._map)
  7289. return;
  7290. this._normalizePosition(prop, loc, 0, 0);
  7291. }
  7292. sourceWithOffset(prop, loc, lineOffset, columnOffset) {
  7293. if (!this._map)
  7294. return;
  7295. this._normalizePosition(prop, loc, lineOffset, columnOffset);
  7296. }
  7297. withSource(prop, loc, cb) {
  7298. if (this._map) {
  7299. this.source(prop, loc);
  7300. }
  7301. cb();
  7302. }
  7303. _normalizePosition(prop, loc, lineOffset, columnOffset) {
  7304. const pos2 = loc[prop];
  7305. const target = this._sourcePosition;
  7306. if (pos2) {
  7307. target.line = pos2.line + lineOffset;
  7308. target.column = pos2.column + columnOffset;
  7309. target.filename = loc.filename;
  7310. }
  7311. }
  7312. getCurrentColumn() {
  7313. const queue = this._queue;
  7314. const queueCursor = this._queueCursor;
  7315. let lastIndex = -1;
  7316. let len = 0;
  7317. for (let i = 0; i < queueCursor; i++) {
  7318. const item = queue[i];
  7319. if (item.char === 10) {
  7320. lastIndex = len;
  7321. }
  7322. len += item.repeat;
  7323. }
  7324. return lastIndex === -1 ? this._position.column + len : len - 1 - lastIndex;
  7325. }
  7326. getCurrentLine() {
  7327. let count = 0;
  7328. const queue = this._queue;
  7329. for (let i = 0; i < this._queueCursor; i++) {
  7330. if (queue[i].char === 10) {
  7331. count++;
  7332. }
  7333. }
  7334. return this._position.line + count;
  7335. }
  7336. };
  7337. exports.default = Buffer2;
  7338. }
  7339. });
  7340. // node_modules/@babel/types/lib/utils/shallowEqual.js
  7341. var require_shallowEqual = __commonJS({
  7342. "node_modules/@babel/types/lib/utils/shallowEqual.js"(exports) {
  7343. "use strict";
  7344. Object.defineProperty(exports, "__esModule", {
  7345. value: true
  7346. });
  7347. exports.default = shallowEqual;
  7348. function shallowEqual(actual, expected) {
  7349. const keys2 = Object.keys(expected);
  7350. for (const key2 of keys2) {
  7351. if (actual[key2] !== expected[key2]) {
  7352. return false;
  7353. }
  7354. }
  7355. return true;
  7356. }
  7357. }
  7358. });
  7359. // node_modules/@babel/types/lib/utils/deprecationWarning.js
  7360. var require_deprecationWarning = __commonJS({
  7361. "node_modules/@babel/types/lib/utils/deprecationWarning.js"(exports) {
  7362. "use strict";
  7363. Object.defineProperty(exports, "__esModule", {
  7364. value: true
  7365. });
  7366. exports.default = deprecationWarning;
  7367. var warnings = /* @__PURE__ */ new Set();
  7368. function deprecationWarning(oldName, newName, prefix = "") {
  7369. if (warnings.has(oldName))
  7370. return;
  7371. warnings.add(oldName);
  7372. const {
  7373. internal,
  7374. trace
  7375. } = captureShortStackTrace(1, 2);
  7376. if (internal) {
  7377. return;
  7378. }
  7379. console.warn(`${prefix}\`${oldName}\` has been deprecated, please migrate to \`${newName}\`
  7380. ${trace}`);
  7381. }
  7382. function captureShortStackTrace(skip, length) {
  7383. const {
  7384. stackTraceLimit,
  7385. prepareStackTrace
  7386. } = Error;
  7387. let stackTrace;
  7388. Error.stackTraceLimit = 1 + skip + length;
  7389. Error.prepareStackTrace = function(err, stack2) {
  7390. stackTrace = stack2;
  7391. };
  7392. new Error().stack;
  7393. Error.stackTraceLimit = stackTraceLimit;
  7394. Error.prepareStackTrace = prepareStackTrace;
  7395. if (!stackTrace)
  7396. return {
  7397. internal: false,
  7398. trace: ""
  7399. };
  7400. const shortStackTrace = stackTrace.slice(1 + skip, 1 + skip + length);
  7401. return {
  7402. internal: /[\\/]@babel[\\/]/.test(shortStackTrace[1].getFileName()),
  7403. trace: shortStackTrace.map((frame) => ` at ${frame}`).join("\n")
  7404. };
  7405. }
  7406. }
  7407. });
  7408. // node_modules/@babel/types/lib/validators/generated/index.js
  7409. var require_generated = __commonJS({
  7410. "node_modules/@babel/types/lib/validators/generated/index.js"(exports) {
  7411. "use strict";
  7412. Object.defineProperty(exports, "__esModule", {
  7413. value: true
  7414. });
  7415. exports.isAccessor = isAccessor;
  7416. exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
  7417. exports.isArgumentPlaceholder = isArgumentPlaceholder;
  7418. exports.isArrayExpression = isArrayExpression;
  7419. exports.isArrayPattern = isArrayPattern;
  7420. exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
  7421. exports.isArrowFunctionExpression = isArrowFunctionExpression2;
  7422. exports.isAssignmentExpression = isAssignmentExpression;
  7423. exports.isAssignmentPattern = isAssignmentPattern;
  7424. exports.isAwaitExpression = isAwaitExpression;
  7425. exports.isBigIntLiteral = isBigIntLiteral;
  7426. exports.isBinary = isBinary;
  7427. exports.isBinaryExpression = isBinaryExpression;
  7428. exports.isBindExpression = isBindExpression;
  7429. exports.isBlock = isBlock;
  7430. exports.isBlockParent = isBlockParent;
  7431. exports.isBlockStatement = isBlockStatement;
  7432. exports.isBooleanLiteral = isBooleanLiteral;
  7433. exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
  7434. exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
  7435. exports.isBreakStatement = isBreakStatement;
  7436. exports.isCallExpression = isCallExpression2;
  7437. exports.isCatchClause = isCatchClause;
  7438. exports.isClass = isClass;
  7439. exports.isClassAccessorProperty = isClassAccessorProperty;
  7440. exports.isClassBody = isClassBody;
  7441. exports.isClassDeclaration = isClassDeclaration;
  7442. exports.isClassExpression = isClassExpression;
  7443. exports.isClassImplements = isClassImplements;
  7444. exports.isClassMethod = isClassMethod;
  7445. exports.isClassPrivateMethod = isClassPrivateMethod;
  7446. exports.isClassPrivateProperty = isClassPrivateProperty;
  7447. exports.isClassProperty = isClassProperty;
  7448. exports.isCompletionStatement = isCompletionStatement;
  7449. exports.isConditional = isConditional;
  7450. exports.isConditionalExpression = isConditionalExpression;
  7451. exports.isContinueStatement = isContinueStatement;
  7452. exports.isDebuggerStatement = isDebuggerStatement;
  7453. exports.isDecimalLiteral = isDecimalLiteral;
  7454. exports.isDeclaration = isDeclaration2;
  7455. exports.isDeclareClass = isDeclareClass;
  7456. exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
  7457. exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
  7458. exports.isDeclareFunction = isDeclareFunction;
  7459. exports.isDeclareInterface = isDeclareInterface;
  7460. exports.isDeclareModule = isDeclareModule;
  7461. exports.isDeclareModuleExports = isDeclareModuleExports;
  7462. exports.isDeclareOpaqueType = isDeclareOpaqueType;
  7463. exports.isDeclareTypeAlias = isDeclareTypeAlias;
  7464. exports.isDeclareVariable = isDeclareVariable;
  7465. exports.isDeclaredPredicate = isDeclaredPredicate;
  7466. exports.isDecorator = isDecorator;
  7467. exports.isDirective = isDirective;
  7468. exports.isDirectiveLiteral = isDirectiveLiteral;
  7469. exports.isDoExpression = isDoExpression;
  7470. exports.isDoWhileStatement = isDoWhileStatement;
  7471. exports.isEmptyStatement = isEmptyStatement;
  7472. exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
  7473. exports.isEnumBody = isEnumBody;
  7474. exports.isEnumBooleanBody = isEnumBooleanBody;
  7475. exports.isEnumBooleanMember = isEnumBooleanMember;
  7476. exports.isEnumDeclaration = isEnumDeclaration;
  7477. exports.isEnumDefaultedMember = isEnumDefaultedMember;
  7478. exports.isEnumMember = isEnumMember;
  7479. exports.isEnumNumberBody = isEnumNumberBody;
  7480. exports.isEnumNumberMember = isEnumNumberMember;
  7481. exports.isEnumStringBody = isEnumStringBody;
  7482. exports.isEnumStringMember = isEnumStringMember;
  7483. exports.isEnumSymbolBody = isEnumSymbolBody;
  7484. exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
  7485. exports.isExportAllDeclaration = isExportAllDeclaration;
  7486. exports.isExportDeclaration = isExportDeclaration;
  7487. exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
  7488. exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
  7489. exports.isExportNamedDeclaration = isExportNamedDeclaration2;
  7490. exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
  7491. exports.isExportSpecifier = isExportSpecifier;
  7492. exports.isExpression = isExpression;
  7493. exports.isExpressionStatement = isExpressionStatement2;
  7494. exports.isExpressionWrapper = isExpressionWrapper;
  7495. exports.isFile = isFile;
  7496. exports.isFlow = isFlow;
  7497. exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
  7498. exports.isFlowDeclaration = isFlowDeclaration;
  7499. exports.isFlowPredicate = isFlowPredicate;
  7500. exports.isFlowType = isFlowType;
  7501. exports.isFor = isFor;
  7502. exports.isForInStatement = isForInStatement;
  7503. exports.isForOfStatement = isForOfStatement;
  7504. exports.isForStatement = isForStatement;
  7505. exports.isForXStatement = isForXStatement;
  7506. exports.isFunction = isFunction;
  7507. exports.isFunctionDeclaration = isFunctionDeclaration;
  7508. exports.isFunctionExpression = isFunctionExpression;
  7509. exports.isFunctionParent = isFunctionParent;
  7510. exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
  7511. exports.isFunctionTypeParam = isFunctionTypeParam;
  7512. exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
  7513. exports.isIdentifier = isIdentifier3;
  7514. exports.isIfStatement = isIfStatement;
  7515. exports.isImmutable = isImmutable;
  7516. exports.isImport = isImport;
  7517. exports.isImportAttribute = isImportAttribute;
  7518. exports.isImportDeclaration = isImportDeclaration;
  7519. exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
  7520. exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
  7521. exports.isImportOrExportDeclaration = isImportOrExportDeclaration;
  7522. exports.isImportSpecifier = isImportSpecifier;
  7523. exports.isIndexedAccessType = isIndexedAccessType;
  7524. exports.isInferredPredicate = isInferredPredicate;
  7525. exports.isInterfaceDeclaration = isInterfaceDeclaration;
  7526. exports.isInterfaceExtends = isInterfaceExtends;
  7527. exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
  7528. exports.isInterpreterDirective = isInterpreterDirective;
  7529. exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
  7530. exports.isJSX = isJSX;
  7531. exports.isJSXAttribute = isJSXAttribute;
  7532. exports.isJSXClosingElement = isJSXClosingElement;
  7533. exports.isJSXClosingFragment = isJSXClosingFragment;
  7534. exports.isJSXElement = isJSXElement3;
  7535. exports.isJSXEmptyExpression = isJSXEmptyExpression;
  7536. exports.isJSXExpressionContainer = isJSXExpressionContainer3;
  7537. exports.isJSXFragment = isJSXFragment2;
  7538. exports.isJSXIdentifier = isJSXIdentifier3;
  7539. exports.isJSXMemberExpression = isJSXMemberExpression;
  7540. exports.isJSXNamespacedName = isJSXNamespacedName;
  7541. exports.isJSXOpeningElement = isJSXOpeningElement;
  7542. exports.isJSXOpeningFragment = isJSXOpeningFragment;
  7543. exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
  7544. exports.isJSXSpreadChild = isJSXSpreadChild;
  7545. exports.isJSXText = isJSXText2;
  7546. exports.isLVal = isLVal;
  7547. exports.isLabeledStatement = isLabeledStatement;
  7548. exports.isLiteral = isLiteral;
  7549. exports.isLogicalExpression = isLogicalExpression;
  7550. exports.isLoop = isLoop;
  7551. exports.isMemberExpression = isMemberExpression2;
  7552. exports.isMetaProperty = isMetaProperty;
  7553. exports.isMethod = isMethod;
  7554. exports.isMiscellaneous = isMiscellaneous;
  7555. exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
  7556. exports.isModuleDeclaration = isModuleDeclaration;
  7557. exports.isModuleExpression = isModuleExpression;
  7558. exports.isModuleSpecifier = isModuleSpecifier;
  7559. exports.isNewExpression = isNewExpression;
  7560. exports.isNoop = isNoop;
  7561. exports.isNullLiteral = isNullLiteral;
  7562. exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
  7563. exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
  7564. exports.isNumberLiteral = isNumberLiteral;
  7565. exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
  7566. exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
  7567. exports.isNumericLiteral = isNumericLiteral;
  7568. exports.isObjectExpression = isObjectExpression2;
  7569. exports.isObjectMember = isObjectMember;
  7570. exports.isObjectMethod = isObjectMethod;
  7571. exports.isObjectPattern = isObjectPattern;
  7572. exports.isObjectProperty = isObjectProperty;
  7573. exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
  7574. exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
  7575. exports.isObjectTypeIndexer = isObjectTypeIndexer;
  7576. exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
  7577. exports.isObjectTypeProperty = isObjectTypeProperty;
  7578. exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
  7579. exports.isOpaqueType = isOpaqueType;
  7580. exports.isOptionalCallExpression = isOptionalCallExpression;
  7581. exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
  7582. exports.isOptionalMemberExpression = isOptionalMemberExpression;
  7583. exports.isParenthesizedExpression = isParenthesizedExpression;
  7584. exports.isPattern = isPattern;
  7585. exports.isPatternLike = isPatternLike;
  7586. exports.isPipelineBareFunction = isPipelineBareFunction;
  7587. exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
  7588. exports.isPipelineTopicExpression = isPipelineTopicExpression;
  7589. exports.isPlaceholder = isPlaceholder;
  7590. exports.isPrivate = isPrivate;
  7591. exports.isPrivateName = isPrivateName;
  7592. exports.isProgram = isProgram;
  7593. exports.isProperty = isProperty;
  7594. exports.isPureish = isPureish;
  7595. exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
  7596. exports.isRecordExpression = isRecordExpression;
  7597. exports.isRegExpLiteral = isRegExpLiteral;
  7598. exports.isRegexLiteral = isRegexLiteral;
  7599. exports.isRestElement = isRestElement;
  7600. exports.isRestProperty = isRestProperty;
  7601. exports.isReturnStatement = isReturnStatement;
  7602. exports.isScopable = isScopable;
  7603. exports.isSequenceExpression = isSequenceExpression;
  7604. exports.isSpreadElement = isSpreadElement;
  7605. exports.isSpreadProperty = isSpreadProperty;
  7606. exports.isStandardized = isStandardized;
  7607. exports.isStatement = isStatement;
  7608. exports.isStaticBlock = isStaticBlock;
  7609. exports.isStringLiteral = isStringLiteral2;
  7610. exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
  7611. exports.isStringTypeAnnotation = isStringTypeAnnotation;
  7612. exports.isSuper = isSuper;
  7613. exports.isSwitchCase = isSwitchCase;
  7614. exports.isSwitchStatement = isSwitchStatement;
  7615. exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
  7616. exports.isTSAnyKeyword = isTSAnyKeyword;
  7617. exports.isTSArrayType = isTSArrayType;
  7618. exports.isTSAsExpression = isTSAsExpression;
  7619. exports.isTSBaseType = isTSBaseType;
  7620. exports.isTSBigIntKeyword = isTSBigIntKeyword;
  7621. exports.isTSBooleanKeyword = isTSBooleanKeyword;
  7622. exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
  7623. exports.isTSConditionalType = isTSConditionalType;
  7624. exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
  7625. exports.isTSConstructorType = isTSConstructorType;
  7626. exports.isTSDeclareFunction = isTSDeclareFunction;
  7627. exports.isTSDeclareMethod = isTSDeclareMethod;
  7628. exports.isTSEntityName = isTSEntityName;
  7629. exports.isTSEnumDeclaration = isTSEnumDeclaration;
  7630. exports.isTSEnumMember = isTSEnumMember;
  7631. exports.isTSExportAssignment = isTSExportAssignment;
  7632. exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
  7633. exports.isTSExternalModuleReference = isTSExternalModuleReference;
  7634. exports.isTSFunctionType = isTSFunctionType;
  7635. exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
  7636. exports.isTSImportType = isTSImportType;
  7637. exports.isTSIndexSignature = isTSIndexSignature;
  7638. exports.isTSIndexedAccessType = isTSIndexedAccessType;
  7639. exports.isTSInferType = isTSInferType;
  7640. exports.isTSInstantiationExpression = isTSInstantiationExpression;
  7641. exports.isTSInterfaceBody = isTSInterfaceBody;
  7642. exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
  7643. exports.isTSIntersectionType = isTSIntersectionType;
  7644. exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
  7645. exports.isTSLiteralType = isTSLiteralType;
  7646. exports.isTSMappedType = isTSMappedType;
  7647. exports.isTSMethodSignature = isTSMethodSignature;
  7648. exports.isTSModuleBlock = isTSModuleBlock;
  7649. exports.isTSModuleDeclaration = isTSModuleDeclaration;
  7650. exports.isTSNamedTupleMember = isTSNamedTupleMember;
  7651. exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
  7652. exports.isTSNeverKeyword = isTSNeverKeyword;
  7653. exports.isTSNonNullExpression = isTSNonNullExpression;
  7654. exports.isTSNullKeyword = isTSNullKeyword;
  7655. exports.isTSNumberKeyword = isTSNumberKeyword;
  7656. exports.isTSObjectKeyword = isTSObjectKeyword;
  7657. exports.isTSOptionalType = isTSOptionalType;
  7658. exports.isTSParameterProperty = isTSParameterProperty;
  7659. exports.isTSParenthesizedType = isTSParenthesizedType;
  7660. exports.isTSPropertySignature = isTSPropertySignature;
  7661. exports.isTSQualifiedName = isTSQualifiedName;
  7662. exports.isTSRestType = isTSRestType;
  7663. exports.isTSSatisfiesExpression = isTSSatisfiesExpression;
  7664. exports.isTSStringKeyword = isTSStringKeyword;
  7665. exports.isTSSymbolKeyword = isTSSymbolKeyword;
  7666. exports.isTSThisType = isTSThisType;
  7667. exports.isTSTupleType = isTSTupleType;
  7668. exports.isTSType = isTSType;
  7669. exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
  7670. exports.isTSTypeAnnotation = isTSTypeAnnotation;
  7671. exports.isTSTypeAssertion = isTSTypeAssertion;
  7672. exports.isTSTypeElement = isTSTypeElement;
  7673. exports.isTSTypeLiteral = isTSTypeLiteral;
  7674. exports.isTSTypeOperator = isTSTypeOperator;
  7675. exports.isTSTypeParameter = isTSTypeParameter;
  7676. exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
  7677. exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
  7678. exports.isTSTypePredicate = isTSTypePredicate;
  7679. exports.isTSTypeQuery = isTSTypeQuery;
  7680. exports.isTSTypeReference = isTSTypeReference;
  7681. exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
  7682. exports.isTSUnionType = isTSUnionType;
  7683. exports.isTSUnknownKeyword = isTSUnknownKeyword;
  7684. exports.isTSVoidKeyword = isTSVoidKeyword;
  7685. exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
  7686. exports.isTemplateElement = isTemplateElement;
  7687. exports.isTemplateLiteral = isTemplateLiteral;
  7688. exports.isTerminatorless = isTerminatorless;
  7689. exports.isThisExpression = isThisExpression;
  7690. exports.isThisTypeAnnotation = isThisTypeAnnotation;
  7691. exports.isThrowStatement = isThrowStatement;
  7692. exports.isTopicReference = isTopicReference;
  7693. exports.isTryStatement = isTryStatement;
  7694. exports.isTupleExpression = isTupleExpression;
  7695. exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
  7696. exports.isTypeAlias = isTypeAlias;
  7697. exports.isTypeAnnotation = isTypeAnnotation;
  7698. exports.isTypeCastExpression = isTypeCastExpression;
  7699. exports.isTypeParameter = isTypeParameter;
  7700. exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
  7701. exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
  7702. exports.isTypeScript = isTypeScript;
  7703. exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
  7704. exports.isUnaryExpression = isUnaryExpression;
  7705. exports.isUnaryLike = isUnaryLike;
  7706. exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
  7707. exports.isUpdateExpression = isUpdateExpression;
  7708. exports.isUserWhitespacable = isUserWhitespacable;
  7709. exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
  7710. exports.isVariableDeclaration = isVariableDeclaration2;
  7711. exports.isVariableDeclarator = isVariableDeclarator2;
  7712. exports.isVariance = isVariance;
  7713. exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
  7714. exports.isWhile = isWhile;
  7715. exports.isWhileStatement = isWhileStatement;
  7716. exports.isWithStatement = isWithStatement;
  7717. exports.isYieldExpression = isYieldExpression;
  7718. var _shallowEqual = require_shallowEqual();
  7719. var _deprecationWarning = require_deprecationWarning();
  7720. function isArrayExpression(node2, opts) {
  7721. if (!node2)
  7722. return false;
  7723. const nodeType = node2.type;
  7724. if (nodeType === "ArrayExpression") {
  7725. if (typeof opts === "undefined") {
  7726. return true;
  7727. } else {
  7728. return (0, _shallowEqual.default)(node2, opts);
  7729. }
  7730. }
  7731. return false;
  7732. }
  7733. function isAssignmentExpression(node2, opts) {
  7734. if (!node2)
  7735. return false;
  7736. const nodeType = node2.type;
  7737. if (nodeType === "AssignmentExpression") {
  7738. if (typeof opts === "undefined") {
  7739. return true;
  7740. } else {
  7741. return (0, _shallowEqual.default)(node2, opts);
  7742. }
  7743. }
  7744. return false;
  7745. }
  7746. function isBinaryExpression(node2, opts) {
  7747. if (!node2)
  7748. return false;
  7749. const nodeType = node2.type;
  7750. if (nodeType === "BinaryExpression") {
  7751. if (typeof opts === "undefined") {
  7752. return true;
  7753. } else {
  7754. return (0, _shallowEqual.default)(node2, opts);
  7755. }
  7756. }
  7757. return false;
  7758. }
  7759. function isInterpreterDirective(node2, opts) {
  7760. if (!node2)
  7761. return false;
  7762. const nodeType = node2.type;
  7763. if (nodeType === "InterpreterDirective") {
  7764. if (typeof opts === "undefined") {
  7765. return true;
  7766. } else {
  7767. return (0, _shallowEqual.default)(node2, opts);
  7768. }
  7769. }
  7770. return false;
  7771. }
  7772. function isDirective(node2, opts) {
  7773. if (!node2)
  7774. return false;
  7775. const nodeType = node2.type;
  7776. if (nodeType === "Directive") {
  7777. if (typeof opts === "undefined") {
  7778. return true;
  7779. } else {
  7780. return (0, _shallowEqual.default)(node2, opts);
  7781. }
  7782. }
  7783. return false;
  7784. }
  7785. function isDirectiveLiteral(node2, opts) {
  7786. if (!node2)
  7787. return false;
  7788. const nodeType = node2.type;
  7789. if (nodeType === "DirectiveLiteral") {
  7790. if (typeof opts === "undefined") {
  7791. return true;
  7792. } else {
  7793. return (0, _shallowEqual.default)(node2, opts);
  7794. }
  7795. }
  7796. return false;
  7797. }
  7798. function isBlockStatement(node2, opts) {
  7799. if (!node2)
  7800. return false;
  7801. const nodeType = node2.type;
  7802. if (nodeType === "BlockStatement") {
  7803. if (typeof opts === "undefined") {
  7804. return true;
  7805. } else {
  7806. return (0, _shallowEqual.default)(node2, opts);
  7807. }
  7808. }
  7809. return false;
  7810. }
  7811. function isBreakStatement(node2, opts) {
  7812. if (!node2)
  7813. return false;
  7814. const nodeType = node2.type;
  7815. if (nodeType === "BreakStatement") {
  7816. if (typeof opts === "undefined") {
  7817. return true;
  7818. } else {
  7819. return (0, _shallowEqual.default)(node2, opts);
  7820. }
  7821. }
  7822. return false;
  7823. }
  7824. function isCallExpression2(node2, opts) {
  7825. if (!node2)
  7826. return false;
  7827. const nodeType = node2.type;
  7828. if (nodeType === "CallExpression") {
  7829. if (typeof opts === "undefined") {
  7830. return true;
  7831. } else {
  7832. return (0, _shallowEqual.default)(node2, opts);
  7833. }
  7834. }
  7835. return false;
  7836. }
  7837. function isCatchClause(node2, opts) {
  7838. if (!node2)
  7839. return false;
  7840. const nodeType = node2.type;
  7841. if (nodeType === "CatchClause") {
  7842. if (typeof opts === "undefined") {
  7843. return true;
  7844. } else {
  7845. return (0, _shallowEqual.default)(node2, opts);
  7846. }
  7847. }
  7848. return false;
  7849. }
  7850. function isConditionalExpression(node2, opts) {
  7851. if (!node2)
  7852. return false;
  7853. const nodeType = node2.type;
  7854. if (nodeType === "ConditionalExpression") {
  7855. if (typeof opts === "undefined") {
  7856. return true;
  7857. } else {
  7858. return (0, _shallowEqual.default)(node2, opts);
  7859. }
  7860. }
  7861. return false;
  7862. }
  7863. function isContinueStatement(node2, opts) {
  7864. if (!node2)
  7865. return false;
  7866. const nodeType = node2.type;
  7867. if (nodeType === "ContinueStatement") {
  7868. if (typeof opts === "undefined") {
  7869. return true;
  7870. } else {
  7871. return (0, _shallowEqual.default)(node2, opts);
  7872. }
  7873. }
  7874. return false;
  7875. }
  7876. function isDebuggerStatement(node2, opts) {
  7877. if (!node2)
  7878. return false;
  7879. const nodeType = node2.type;
  7880. if (nodeType === "DebuggerStatement") {
  7881. if (typeof opts === "undefined") {
  7882. return true;
  7883. } else {
  7884. return (0, _shallowEqual.default)(node2, opts);
  7885. }
  7886. }
  7887. return false;
  7888. }
  7889. function isDoWhileStatement(node2, opts) {
  7890. if (!node2)
  7891. return false;
  7892. const nodeType = node2.type;
  7893. if (nodeType === "DoWhileStatement") {
  7894. if (typeof opts === "undefined") {
  7895. return true;
  7896. } else {
  7897. return (0, _shallowEqual.default)(node2, opts);
  7898. }
  7899. }
  7900. return false;
  7901. }
  7902. function isEmptyStatement(node2, opts) {
  7903. if (!node2)
  7904. return false;
  7905. const nodeType = node2.type;
  7906. if (nodeType === "EmptyStatement") {
  7907. if (typeof opts === "undefined") {
  7908. return true;
  7909. } else {
  7910. return (0, _shallowEqual.default)(node2, opts);
  7911. }
  7912. }
  7913. return false;
  7914. }
  7915. function isExpressionStatement2(node2, opts) {
  7916. if (!node2)
  7917. return false;
  7918. const nodeType = node2.type;
  7919. if (nodeType === "ExpressionStatement") {
  7920. if (typeof opts === "undefined") {
  7921. return true;
  7922. } else {
  7923. return (0, _shallowEqual.default)(node2, opts);
  7924. }
  7925. }
  7926. return false;
  7927. }
  7928. function isFile(node2, opts) {
  7929. if (!node2)
  7930. return false;
  7931. const nodeType = node2.type;
  7932. if (nodeType === "File") {
  7933. if (typeof opts === "undefined") {
  7934. return true;
  7935. } else {
  7936. return (0, _shallowEqual.default)(node2, opts);
  7937. }
  7938. }
  7939. return false;
  7940. }
  7941. function isForInStatement(node2, opts) {
  7942. if (!node2)
  7943. return false;
  7944. const nodeType = node2.type;
  7945. if (nodeType === "ForInStatement") {
  7946. if (typeof opts === "undefined") {
  7947. return true;
  7948. } else {
  7949. return (0, _shallowEqual.default)(node2, opts);
  7950. }
  7951. }
  7952. return false;
  7953. }
  7954. function isForStatement(node2, opts) {
  7955. if (!node2)
  7956. return false;
  7957. const nodeType = node2.type;
  7958. if (nodeType === "ForStatement") {
  7959. if (typeof opts === "undefined") {
  7960. return true;
  7961. } else {
  7962. return (0, _shallowEqual.default)(node2, opts);
  7963. }
  7964. }
  7965. return false;
  7966. }
  7967. function isFunctionDeclaration(node2, opts) {
  7968. if (!node2)
  7969. return false;
  7970. const nodeType = node2.type;
  7971. if (nodeType === "FunctionDeclaration") {
  7972. if (typeof opts === "undefined") {
  7973. return true;
  7974. } else {
  7975. return (0, _shallowEqual.default)(node2, opts);
  7976. }
  7977. }
  7978. return false;
  7979. }
  7980. function isFunctionExpression(node2, opts) {
  7981. if (!node2)
  7982. return false;
  7983. const nodeType = node2.type;
  7984. if (nodeType === "FunctionExpression") {
  7985. if (typeof opts === "undefined") {
  7986. return true;
  7987. } else {
  7988. return (0, _shallowEqual.default)(node2, opts);
  7989. }
  7990. }
  7991. return false;
  7992. }
  7993. function isIdentifier3(node2, opts) {
  7994. if (!node2)
  7995. return false;
  7996. const nodeType = node2.type;
  7997. if (nodeType === "Identifier") {
  7998. if (typeof opts === "undefined") {
  7999. return true;
  8000. } else {
  8001. return (0, _shallowEqual.default)(node2, opts);
  8002. }
  8003. }
  8004. return false;
  8005. }
  8006. function isIfStatement(node2, opts) {
  8007. if (!node2)
  8008. return false;
  8009. const nodeType = node2.type;
  8010. if (nodeType === "IfStatement") {
  8011. if (typeof opts === "undefined") {
  8012. return true;
  8013. } else {
  8014. return (0, _shallowEqual.default)(node2, opts);
  8015. }
  8016. }
  8017. return false;
  8018. }
  8019. function isLabeledStatement(node2, opts) {
  8020. if (!node2)
  8021. return false;
  8022. const nodeType = node2.type;
  8023. if (nodeType === "LabeledStatement") {
  8024. if (typeof opts === "undefined") {
  8025. return true;
  8026. } else {
  8027. return (0, _shallowEqual.default)(node2, opts);
  8028. }
  8029. }
  8030. return false;
  8031. }
  8032. function isStringLiteral2(node2, opts) {
  8033. if (!node2)
  8034. return false;
  8035. const nodeType = node2.type;
  8036. if (nodeType === "StringLiteral") {
  8037. if (typeof opts === "undefined") {
  8038. return true;
  8039. } else {
  8040. return (0, _shallowEqual.default)(node2, opts);
  8041. }
  8042. }
  8043. return false;
  8044. }
  8045. function isNumericLiteral(node2, opts) {
  8046. if (!node2)
  8047. return false;
  8048. const nodeType = node2.type;
  8049. if (nodeType === "NumericLiteral") {
  8050. if (typeof opts === "undefined") {
  8051. return true;
  8052. } else {
  8053. return (0, _shallowEqual.default)(node2, opts);
  8054. }
  8055. }
  8056. return false;
  8057. }
  8058. function isNullLiteral(node2, opts) {
  8059. if (!node2)
  8060. return false;
  8061. const nodeType = node2.type;
  8062. if (nodeType === "NullLiteral") {
  8063. if (typeof opts === "undefined") {
  8064. return true;
  8065. } else {
  8066. return (0, _shallowEqual.default)(node2, opts);
  8067. }
  8068. }
  8069. return false;
  8070. }
  8071. function isBooleanLiteral(node2, opts) {
  8072. if (!node2)
  8073. return false;
  8074. const nodeType = node2.type;
  8075. if (nodeType === "BooleanLiteral") {
  8076. if (typeof opts === "undefined") {
  8077. return true;
  8078. } else {
  8079. return (0, _shallowEqual.default)(node2, opts);
  8080. }
  8081. }
  8082. return false;
  8083. }
  8084. function isRegExpLiteral(node2, opts) {
  8085. if (!node2)
  8086. return false;
  8087. const nodeType = node2.type;
  8088. if (nodeType === "RegExpLiteral") {
  8089. if (typeof opts === "undefined") {
  8090. return true;
  8091. } else {
  8092. return (0, _shallowEqual.default)(node2, opts);
  8093. }
  8094. }
  8095. return false;
  8096. }
  8097. function isLogicalExpression(node2, opts) {
  8098. if (!node2)
  8099. return false;
  8100. const nodeType = node2.type;
  8101. if (nodeType === "LogicalExpression") {
  8102. if (typeof opts === "undefined") {
  8103. return true;
  8104. } else {
  8105. return (0, _shallowEqual.default)(node2, opts);
  8106. }
  8107. }
  8108. return false;
  8109. }
  8110. function isMemberExpression2(node2, opts) {
  8111. if (!node2)
  8112. return false;
  8113. const nodeType = node2.type;
  8114. if (nodeType === "MemberExpression") {
  8115. if (typeof opts === "undefined") {
  8116. return true;
  8117. } else {
  8118. return (0, _shallowEqual.default)(node2, opts);
  8119. }
  8120. }
  8121. return false;
  8122. }
  8123. function isNewExpression(node2, opts) {
  8124. if (!node2)
  8125. return false;
  8126. const nodeType = node2.type;
  8127. if (nodeType === "NewExpression") {
  8128. if (typeof opts === "undefined") {
  8129. return true;
  8130. } else {
  8131. return (0, _shallowEqual.default)(node2, opts);
  8132. }
  8133. }
  8134. return false;
  8135. }
  8136. function isProgram(node2, opts) {
  8137. if (!node2)
  8138. return false;
  8139. const nodeType = node2.type;
  8140. if (nodeType === "Program") {
  8141. if (typeof opts === "undefined") {
  8142. return true;
  8143. } else {
  8144. return (0, _shallowEqual.default)(node2, opts);
  8145. }
  8146. }
  8147. return false;
  8148. }
  8149. function isObjectExpression2(node2, opts) {
  8150. if (!node2)
  8151. return false;
  8152. const nodeType = node2.type;
  8153. if (nodeType === "ObjectExpression") {
  8154. if (typeof opts === "undefined") {
  8155. return true;
  8156. } else {
  8157. return (0, _shallowEqual.default)(node2, opts);
  8158. }
  8159. }
  8160. return false;
  8161. }
  8162. function isObjectMethod(node2, opts) {
  8163. if (!node2)
  8164. return false;
  8165. const nodeType = node2.type;
  8166. if (nodeType === "ObjectMethod") {
  8167. if (typeof opts === "undefined") {
  8168. return true;
  8169. } else {
  8170. return (0, _shallowEqual.default)(node2, opts);
  8171. }
  8172. }
  8173. return false;
  8174. }
  8175. function isObjectProperty(node2, opts) {
  8176. if (!node2)
  8177. return false;
  8178. const nodeType = node2.type;
  8179. if (nodeType === "ObjectProperty") {
  8180. if (typeof opts === "undefined") {
  8181. return true;
  8182. } else {
  8183. return (0, _shallowEqual.default)(node2, opts);
  8184. }
  8185. }
  8186. return false;
  8187. }
  8188. function isRestElement(node2, opts) {
  8189. if (!node2)
  8190. return false;
  8191. const nodeType = node2.type;
  8192. if (nodeType === "RestElement") {
  8193. if (typeof opts === "undefined") {
  8194. return true;
  8195. } else {
  8196. return (0, _shallowEqual.default)(node2, opts);
  8197. }
  8198. }
  8199. return false;
  8200. }
  8201. function isReturnStatement(node2, opts) {
  8202. if (!node2)
  8203. return false;
  8204. const nodeType = node2.type;
  8205. if (nodeType === "ReturnStatement") {
  8206. if (typeof opts === "undefined") {
  8207. return true;
  8208. } else {
  8209. return (0, _shallowEqual.default)(node2, opts);
  8210. }
  8211. }
  8212. return false;
  8213. }
  8214. function isSequenceExpression(node2, opts) {
  8215. if (!node2)
  8216. return false;
  8217. const nodeType = node2.type;
  8218. if (nodeType === "SequenceExpression") {
  8219. if (typeof opts === "undefined") {
  8220. return true;
  8221. } else {
  8222. return (0, _shallowEqual.default)(node2, opts);
  8223. }
  8224. }
  8225. return false;
  8226. }
  8227. function isParenthesizedExpression(node2, opts) {
  8228. if (!node2)
  8229. return false;
  8230. const nodeType = node2.type;
  8231. if (nodeType === "ParenthesizedExpression") {
  8232. if (typeof opts === "undefined") {
  8233. return true;
  8234. } else {
  8235. return (0, _shallowEqual.default)(node2, opts);
  8236. }
  8237. }
  8238. return false;
  8239. }
  8240. function isSwitchCase(node2, opts) {
  8241. if (!node2)
  8242. return false;
  8243. const nodeType = node2.type;
  8244. if (nodeType === "SwitchCase") {
  8245. if (typeof opts === "undefined") {
  8246. return true;
  8247. } else {
  8248. return (0, _shallowEqual.default)(node2, opts);
  8249. }
  8250. }
  8251. return false;
  8252. }
  8253. function isSwitchStatement(node2, opts) {
  8254. if (!node2)
  8255. return false;
  8256. const nodeType = node2.type;
  8257. if (nodeType === "SwitchStatement") {
  8258. if (typeof opts === "undefined") {
  8259. return true;
  8260. } else {
  8261. return (0, _shallowEqual.default)(node2, opts);
  8262. }
  8263. }
  8264. return false;
  8265. }
  8266. function isThisExpression(node2, opts) {
  8267. if (!node2)
  8268. return false;
  8269. const nodeType = node2.type;
  8270. if (nodeType === "ThisExpression") {
  8271. if (typeof opts === "undefined") {
  8272. return true;
  8273. } else {
  8274. return (0, _shallowEqual.default)(node2, opts);
  8275. }
  8276. }
  8277. return false;
  8278. }
  8279. function isThrowStatement(node2, opts) {
  8280. if (!node2)
  8281. return false;
  8282. const nodeType = node2.type;
  8283. if (nodeType === "ThrowStatement") {
  8284. if (typeof opts === "undefined") {
  8285. return true;
  8286. } else {
  8287. return (0, _shallowEqual.default)(node2, opts);
  8288. }
  8289. }
  8290. return false;
  8291. }
  8292. function isTryStatement(node2, opts) {
  8293. if (!node2)
  8294. return false;
  8295. const nodeType = node2.type;
  8296. if (nodeType === "TryStatement") {
  8297. if (typeof opts === "undefined") {
  8298. return true;
  8299. } else {
  8300. return (0, _shallowEqual.default)(node2, opts);
  8301. }
  8302. }
  8303. return false;
  8304. }
  8305. function isUnaryExpression(node2, opts) {
  8306. if (!node2)
  8307. return false;
  8308. const nodeType = node2.type;
  8309. if (nodeType === "UnaryExpression") {
  8310. if (typeof opts === "undefined") {
  8311. return true;
  8312. } else {
  8313. return (0, _shallowEqual.default)(node2, opts);
  8314. }
  8315. }
  8316. return false;
  8317. }
  8318. function isUpdateExpression(node2, opts) {
  8319. if (!node2)
  8320. return false;
  8321. const nodeType = node2.type;
  8322. if (nodeType === "UpdateExpression") {
  8323. if (typeof opts === "undefined") {
  8324. return true;
  8325. } else {
  8326. return (0, _shallowEqual.default)(node2, opts);
  8327. }
  8328. }
  8329. return false;
  8330. }
  8331. function isVariableDeclaration2(node2, opts) {
  8332. if (!node2)
  8333. return false;
  8334. const nodeType = node2.type;
  8335. if (nodeType === "VariableDeclaration") {
  8336. if (typeof opts === "undefined") {
  8337. return true;
  8338. } else {
  8339. return (0, _shallowEqual.default)(node2, opts);
  8340. }
  8341. }
  8342. return false;
  8343. }
  8344. function isVariableDeclarator2(node2, opts) {
  8345. if (!node2)
  8346. return false;
  8347. const nodeType = node2.type;
  8348. if (nodeType === "VariableDeclarator") {
  8349. if (typeof opts === "undefined") {
  8350. return true;
  8351. } else {
  8352. return (0, _shallowEqual.default)(node2, opts);
  8353. }
  8354. }
  8355. return false;
  8356. }
  8357. function isWhileStatement(node2, opts) {
  8358. if (!node2)
  8359. return false;
  8360. const nodeType = node2.type;
  8361. if (nodeType === "WhileStatement") {
  8362. if (typeof opts === "undefined") {
  8363. return true;
  8364. } else {
  8365. return (0, _shallowEqual.default)(node2, opts);
  8366. }
  8367. }
  8368. return false;
  8369. }
  8370. function isWithStatement(node2, opts) {
  8371. if (!node2)
  8372. return false;
  8373. const nodeType = node2.type;
  8374. if (nodeType === "WithStatement") {
  8375. if (typeof opts === "undefined") {
  8376. return true;
  8377. } else {
  8378. return (0, _shallowEqual.default)(node2, opts);
  8379. }
  8380. }
  8381. return false;
  8382. }
  8383. function isAssignmentPattern(node2, opts) {
  8384. if (!node2)
  8385. return false;
  8386. const nodeType = node2.type;
  8387. if (nodeType === "AssignmentPattern") {
  8388. if (typeof opts === "undefined") {
  8389. return true;
  8390. } else {
  8391. return (0, _shallowEqual.default)(node2, opts);
  8392. }
  8393. }
  8394. return false;
  8395. }
  8396. function isArrayPattern(node2, opts) {
  8397. if (!node2)
  8398. return false;
  8399. const nodeType = node2.type;
  8400. if (nodeType === "ArrayPattern") {
  8401. if (typeof opts === "undefined") {
  8402. return true;
  8403. } else {
  8404. return (0, _shallowEqual.default)(node2, opts);
  8405. }
  8406. }
  8407. return false;
  8408. }
  8409. function isArrowFunctionExpression2(node2, opts) {
  8410. if (!node2)
  8411. return false;
  8412. const nodeType = node2.type;
  8413. if (nodeType === "ArrowFunctionExpression") {
  8414. if (typeof opts === "undefined") {
  8415. return true;
  8416. } else {
  8417. return (0, _shallowEqual.default)(node2, opts);
  8418. }
  8419. }
  8420. return false;
  8421. }
  8422. function isClassBody(node2, opts) {
  8423. if (!node2)
  8424. return false;
  8425. const nodeType = node2.type;
  8426. if (nodeType === "ClassBody") {
  8427. if (typeof opts === "undefined") {
  8428. return true;
  8429. } else {
  8430. return (0, _shallowEqual.default)(node2, opts);
  8431. }
  8432. }
  8433. return false;
  8434. }
  8435. function isClassExpression(node2, opts) {
  8436. if (!node2)
  8437. return false;
  8438. const nodeType = node2.type;
  8439. if (nodeType === "ClassExpression") {
  8440. if (typeof opts === "undefined") {
  8441. return true;
  8442. } else {
  8443. return (0, _shallowEqual.default)(node2, opts);
  8444. }
  8445. }
  8446. return false;
  8447. }
  8448. function isClassDeclaration(node2, opts) {
  8449. if (!node2)
  8450. return false;
  8451. const nodeType = node2.type;
  8452. if (nodeType === "ClassDeclaration") {
  8453. if (typeof opts === "undefined") {
  8454. return true;
  8455. } else {
  8456. return (0, _shallowEqual.default)(node2, opts);
  8457. }
  8458. }
  8459. return false;
  8460. }
  8461. function isExportAllDeclaration(node2, opts) {
  8462. if (!node2)
  8463. return false;
  8464. const nodeType = node2.type;
  8465. if (nodeType === "ExportAllDeclaration") {
  8466. if (typeof opts === "undefined") {
  8467. return true;
  8468. } else {
  8469. return (0, _shallowEqual.default)(node2, opts);
  8470. }
  8471. }
  8472. return false;
  8473. }
  8474. function isExportDefaultDeclaration(node2, opts) {
  8475. if (!node2)
  8476. return false;
  8477. const nodeType = node2.type;
  8478. if (nodeType === "ExportDefaultDeclaration") {
  8479. if (typeof opts === "undefined") {
  8480. return true;
  8481. } else {
  8482. return (0, _shallowEqual.default)(node2, opts);
  8483. }
  8484. }
  8485. return false;
  8486. }
  8487. function isExportNamedDeclaration2(node2, opts) {
  8488. if (!node2)
  8489. return false;
  8490. const nodeType = node2.type;
  8491. if (nodeType === "ExportNamedDeclaration") {
  8492. if (typeof opts === "undefined") {
  8493. return true;
  8494. } else {
  8495. return (0, _shallowEqual.default)(node2, opts);
  8496. }
  8497. }
  8498. return false;
  8499. }
  8500. function isExportSpecifier(node2, opts) {
  8501. if (!node2)
  8502. return false;
  8503. const nodeType = node2.type;
  8504. if (nodeType === "ExportSpecifier") {
  8505. if (typeof opts === "undefined") {
  8506. return true;
  8507. } else {
  8508. return (0, _shallowEqual.default)(node2, opts);
  8509. }
  8510. }
  8511. return false;
  8512. }
  8513. function isForOfStatement(node2, opts) {
  8514. if (!node2)
  8515. return false;
  8516. const nodeType = node2.type;
  8517. if (nodeType === "ForOfStatement") {
  8518. if (typeof opts === "undefined") {
  8519. return true;
  8520. } else {
  8521. return (0, _shallowEqual.default)(node2, opts);
  8522. }
  8523. }
  8524. return false;
  8525. }
  8526. function isImportDeclaration(node2, opts) {
  8527. if (!node2)
  8528. return false;
  8529. const nodeType = node2.type;
  8530. if (nodeType === "ImportDeclaration") {
  8531. if (typeof opts === "undefined") {
  8532. return true;
  8533. } else {
  8534. return (0, _shallowEqual.default)(node2, opts);
  8535. }
  8536. }
  8537. return false;
  8538. }
  8539. function isImportDefaultSpecifier(node2, opts) {
  8540. if (!node2)
  8541. return false;
  8542. const nodeType = node2.type;
  8543. if (nodeType === "ImportDefaultSpecifier") {
  8544. if (typeof opts === "undefined") {
  8545. return true;
  8546. } else {
  8547. return (0, _shallowEqual.default)(node2, opts);
  8548. }
  8549. }
  8550. return false;
  8551. }
  8552. function isImportNamespaceSpecifier(node2, opts) {
  8553. if (!node2)
  8554. return false;
  8555. const nodeType = node2.type;
  8556. if (nodeType === "ImportNamespaceSpecifier") {
  8557. if (typeof opts === "undefined") {
  8558. return true;
  8559. } else {
  8560. return (0, _shallowEqual.default)(node2, opts);
  8561. }
  8562. }
  8563. return false;
  8564. }
  8565. function isImportSpecifier(node2, opts) {
  8566. if (!node2)
  8567. return false;
  8568. const nodeType = node2.type;
  8569. if (nodeType === "ImportSpecifier") {
  8570. if (typeof opts === "undefined") {
  8571. return true;
  8572. } else {
  8573. return (0, _shallowEqual.default)(node2, opts);
  8574. }
  8575. }
  8576. return false;
  8577. }
  8578. function isMetaProperty(node2, opts) {
  8579. if (!node2)
  8580. return false;
  8581. const nodeType = node2.type;
  8582. if (nodeType === "MetaProperty") {
  8583. if (typeof opts === "undefined") {
  8584. return true;
  8585. } else {
  8586. return (0, _shallowEqual.default)(node2, opts);
  8587. }
  8588. }
  8589. return false;
  8590. }
  8591. function isClassMethod(node2, opts) {
  8592. if (!node2)
  8593. return false;
  8594. const nodeType = node2.type;
  8595. if (nodeType === "ClassMethod") {
  8596. if (typeof opts === "undefined") {
  8597. return true;
  8598. } else {
  8599. return (0, _shallowEqual.default)(node2, opts);
  8600. }
  8601. }
  8602. return false;
  8603. }
  8604. function isObjectPattern(node2, opts) {
  8605. if (!node2)
  8606. return false;
  8607. const nodeType = node2.type;
  8608. if (nodeType === "ObjectPattern") {
  8609. if (typeof opts === "undefined") {
  8610. return true;
  8611. } else {
  8612. return (0, _shallowEqual.default)(node2, opts);
  8613. }
  8614. }
  8615. return false;
  8616. }
  8617. function isSpreadElement(node2, opts) {
  8618. if (!node2)
  8619. return false;
  8620. const nodeType = node2.type;
  8621. if (nodeType === "SpreadElement") {
  8622. if (typeof opts === "undefined") {
  8623. return true;
  8624. } else {
  8625. return (0, _shallowEqual.default)(node2, opts);
  8626. }
  8627. }
  8628. return false;
  8629. }
  8630. function isSuper(node2, opts) {
  8631. if (!node2)
  8632. return false;
  8633. const nodeType = node2.type;
  8634. if (nodeType === "Super") {
  8635. if (typeof opts === "undefined") {
  8636. return true;
  8637. } else {
  8638. return (0, _shallowEqual.default)(node2, opts);
  8639. }
  8640. }
  8641. return false;
  8642. }
  8643. function isTaggedTemplateExpression(node2, opts) {
  8644. if (!node2)
  8645. return false;
  8646. const nodeType = node2.type;
  8647. if (nodeType === "TaggedTemplateExpression") {
  8648. if (typeof opts === "undefined") {
  8649. return true;
  8650. } else {
  8651. return (0, _shallowEqual.default)(node2, opts);
  8652. }
  8653. }
  8654. return false;
  8655. }
  8656. function isTemplateElement(node2, opts) {
  8657. if (!node2)
  8658. return false;
  8659. const nodeType = node2.type;
  8660. if (nodeType === "TemplateElement") {
  8661. if (typeof opts === "undefined") {
  8662. return true;
  8663. } else {
  8664. return (0, _shallowEqual.default)(node2, opts);
  8665. }
  8666. }
  8667. return false;
  8668. }
  8669. function isTemplateLiteral(node2, opts) {
  8670. if (!node2)
  8671. return false;
  8672. const nodeType = node2.type;
  8673. if (nodeType === "TemplateLiteral") {
  8674. if (typeof opts === "undefined") {
  8675. return true;
  8676. } else {
  8677. return (0, _shallowEqual.default)(node2, opts);
  8678. }
  8679. }
  8680. return false;
  8681. }
  8682. function isYieldExpression(node2, opts) {
  8683. if (!node2)
  8684. return false;
  8685. const nodeType = node2.type;
  8686. if (nodeType === "YieldExpression") {
  8687. if (typeof opts === "undefined") {
  8688. return true;
  8689. } else {
  8690. return (0, _shallowEqual.default)(node2, opts);
  8691. }
  8692. }
  8693. return false;
  8694. }
  8695. function isAwaitExpression(node2, opts) {
  8696. if (!node2)
  8697. return false;
  8698. const nodeType = node2.type;
  8699. if (nodeType === "AwaitExpression") {
  8700. if (typeof opts === "undefined") {
  8701. return true;
  8702. } else {
  8703. return (0, _shallowEqual.default)(node2, opts);
  8704. }
  8705. }
  8706. return false;
  8707. }
  8708. function isImport(node2, opts) {
  8709. if (!node2)
  8710. return false;
  8711. const nodeType = node2.type;
  8712. if (nodeType === "Import") {
  8713. if (typeof opts === "undefined") {
  8714. return true;
  8715. } else {
  8716. return (0, _shallowEqual.default)(node2, opts);
  8717. }
  8718. }
  8719. return false;
  8720. }
  8721. function isBigIntLiteral(node2, opts) {
  8722. if (!node2)
  8723. return false;
  8724. const nodeType = node2.type;
  8725. if (nodeType === "BigIntLiteral") {
  8726. if (typeof opts === "undefined") {
  8727. return true;
  8728. } else {
  8729. return (0, _shallowEqual.default)(node2, opts);
  8730. }
  8731. }
  8732. return false;
  8733. }
  8734. function isExportNamespaceSpecifier(node2, opts) {
  8735. if (!node2)
  8736. return false;
  8737. const nodeType = node2.type;
  8738. if (nodeType === "ExportNamespaceSpecifier") {
  8739. if (typeof opts === "undefined") {
  8740. return true;
  8741. } else {
  8742. return (0, _shallowEqual.default)(node2, opts);
  8743. }
  8744. }
  8745. return false;
  8746. }
  8747. function isOptionalMemberExpression(node2, opts) {
  8748. if (!node2)
  8749. return false;
  8750. const nodeType = node2.type;
  8751. if (nodeType === "OptionalMemberExpression") {
  8752. if (typeof opts === "undefined") {
  8753. return true;
  8754. } else {
  8755. return (0, _shallowEqual.default)(node2, opts);
  8756. }
  8757. }
  8758. return false;
  8759. }
  8760. function isOptionalCallExpression(node2, opts) {
  8761. if (!node2)
  8762. return false;
  8763. const nodeType = node2.type;
  8764. if (nodeType === "OptionalCallExpression") {
  8765. if (typeof opts === "undefined") {
  8766. return true;
  8767. } else {
  8768. return (0, _shallowEqual.default)(node2, opts);
  8769. }
  8770. }
  8771. return false;
  8772. }
  8773. function isClassProperty(node2, opts) {
  8774. if (!node2)
  8775. return false;
  8776. const nodeType = node2.type;
  8777. if (nodeType === "ClassProperty") {
  8778. if (typeof opts === "undefined") {
  8779. return true;
  8780. } else {
  8781. return (0, _shallowEqual.default)(node2, opts);
  8782. }
  8783. }
  8784. return false;
  8785. }
  8786. function isClassAccessorProperty(node2, opts) {
  8787. if (!node2)
  8788. return false;
  8789. const nodeType = node2.type;
  8790. if (nodeType === "ClassAccessorProperty") {
  8791. if (typeof opts === "undefined") {
  8792. return true;
  8793. } else {
  8794. return (0, _shallowEqual.default)(node2, opts);
  8795. }
  8796. }
  8797. return false;
  8798. }
  8799. function isClassPrivateProperty(node2, opts) {
  8800. if (!node2)
  8801. return false;
  8802. const nodeType = node2.type;
  8803. if (nodeType === "ClassPrivateProperty") {
  8804. if (typeof opts === "undefined") {
  8805. return true;
  8806. } else {
  8807. return (0, _shallowEqual.default)(node2, opts);
  8808. }
  8809. }
  8810. return false;
  8811. }
  8812. function isClassPrivateMethod(node2, opts) {
  8813. if (!node2)
  8814. return false;
  8815. const nodeType = node2.type;
  8816. if (nodeType === "ClassPrivateMethod") {
  8817. if (typeof opts === "undefined") {
  8818. return true;
  8819. } else {
  8820. return (0, _shallowEqual.default)(node2, opts);
  8821. }
  8822. }
  8823. return false;
  8824. }
  8825. function isPrivateName(node2, opts) {
  8826. if (!node2)
  8827. return false;
  8828. const nodeType = node2.type;
  8829. if (nodeType === "PrivateName") {
  8830. if (typeof opts === "undefined") {
  8831. return true;
  8832. } else {
  8833. return (0, _shallowEqual.default)(node2, opts);
  8834. }
  8835. }
  8836. return false;
  8837. }
  8838. function isStaticBlock(node2, opts) {
  8839. if (!node2)
  8840. return false;
  8841. const nodeType = node2.type;
  8842. if (nodeType === "StaticBlock") {
  8843. if (typeof opts === "undefined") {
  8844. return true;
  8845. } else {
  8846. return (0, _shallowEqual.default)(node2, opts);
  8847. }
  8848. }
  8849. return false;
  8850. }
  8851. function isAnyTypeAnnotation(node2, opts) {
  8852. if (!node2)
  8853. return false;
  8854. const nodeType = node2.type;
  8855. if (nodeType === "AnyTypeAnnotation") {
  8856. if (typeof opts === "undefined") {
  8857. return true;
  8858. } else {
  8859. return (0, _shallowEqual.default)(node2, opts);
  8860. }
  8861. }
  8862. return false;
  8863. }
  8864. function isArrayTypeAnnotation(node2, opts) {
  8865. if (!node2)
  8866. return false;
  8867. const nodeType = node2.type;
  8868. if (nodeType === "ArrayTypeAnnotation") {
  8869. if (typeof opts === "undefined") {
  8870. return true;
  8871. } else {
  8872. return (0, _shallowEqual.default)(node2, opts);
  8873. }
  8874. }
  8875. return false;
  8876. }
  8877. function isBooleanTypeAnnotation(node2, opts) {
  8878. if (!node2)
  8879. return false;
  8880. const nodeType = node2.type;
  8881. if (nodeType === "BooleanTypeAnnotation") {
  8882. if (typeof opts === "undefined") {
  8883. return true;
  8884. } else {
  8885. return (0, _shallowEqual.default)(node2, opts);
  8886. }
  8887. }
  8888. return false;
  8889. }
  8890. function isBooleanLiteralTypeAnnotation(node2, opts) {
  8891. if (!node2)
  8892. return false;
  8893. const nodeType = node2.type;
  8894. if (nodeType === "BooleanLiteralTypeAnnotation") {
  8895. if (typeof opts === "undefined") {
  8896. return true;
  8897. } else {
  8898. return (0, _shallowEqual.default)(node2, opts);
  8899. }
  8900. }
  8901. return false;
  8902. }
  8903. function isNullLiteralTypeAnnotation(node2, opts) {
  8904. if (!node2)
  8905. return false;
  8906. const nodeType = node2.type;
  8907. if (nodeType === "NullLiteralTypeAnnotation") {
  8908. if (typeof opts === "undefined") {
  8909. return true;
  8910. } else {
  8911. return (0, _shallowEqual.default)(node2, opts);
  8912. }
  8913. }
  8914. return false;
  8915. }
  8916. function isClassImplements(node2, opts) {
  8917. if (!node2)
  8918. return false;
  8919. const nodeType = node2.type;
  8920. if (nodeType === "ClassImplements") {
  8921. if (typeof opts === "undefined") {
  8922. return true;
  8923. } else {
  8924. return (0, _shallowEqual.default)(node2, opts);
  8925. }
  8926. }
  8927. return false;
  8928. }
  8929. function isDeclareClass(node2, opts) {
  8930. if (!node2)
  8931. return false;
  8932. const nodeType = node2.type;
  8933. if (nodeType === "DeclareClass") {
  8934. if (typeof opts === "undefined") {
  8935. return true;
  8936. } else {
  8937. return (0, _shallowEqual.default)(node2, opts);
  8938. }
  8939. }
  8940. return false;
  8941. }
  8942. function isDeclareFunction(node2, opts) {
  8943. if (!node2)
  8944. return false;
  8945. const nodeType = node2.type;
  8946. if (nodeType === "DeclareFunction") {
  8947. if (typeof opts === "undefined") {
  8948. return true;
  8949. } else {
  8950. return (0, _shallowEqual.default)(node2, opts);
  8951. }
  8952. }
  8953. return false;
  8954. }
  8955. function isDeclareInterface(node2, opts) {
  8956. if (!node2)
  8957. return false;
  8958. const nodeType = node2.type;
  8959. if (nodeType === "DeclareInterface") {
  8960. if (typeof opts === "undefined") {
  8961. return true;
  8962. } else {
  8963. return (0, _shallowEqual.default)(node2, opts);
  8964. }
  8965. }
  8966. return false;
  8967. }
  8968. function isDeclareModule(node2, opts) {
  8969. if (!node2)
  8970. return false;
  8971. const nodeType = node2.type;
  8972. if (nodeType === "DeclareModule") {
  8973. if (typeof opts === "undefined") {
  8974. return true;
  8975. } else {
  8976. return (0, _shallowEqual.default)(node2, opts);
  8977. }
  8978. }
  8979. return false;
  8980. }
  8981. function isDeclareModuleExports(node2, opts) {
  8982. if (!node2)
  8983. return false;
  8984. const nodeType = node2.type;
  8985. if (nodeType === "DeclareModuleExports") {
  8986. if (typeof opts === "undefined") {
  8987. return true;
  8988. } else {
  8989. return (0, _shallowEqual.default)(node2, opts);
  8990. }
  8991. }
  8992. return false;
  8993. }
  8994. function isDeclareTypeAlias(node2, opts) {
  8995. if (!node2)
  8996. return false;
  8997. const nodeType = node2.type;
  8998. if (nodeType === "DeclareTypeAlias") {
  8999. if (typeof opts === "undefined") {
  9000. return true;
  9001. } else {
  9002. return (0, _shallowEqual.default)(node2, opts);
  9003. }
  9004. }
  9005. return false;
  9006. }
  9007. function isDeclareOpaqueType(node2, opts) {
  9008. if (!node2)
  9009. return false;
  9010. const nodeType = node2.type;
  9011. if (nodeType === "DeclareOpaqueType") {
  9012. if (typeof opts === "undefined") {
  9013. return true;
  9014. } else {
  9015. return (0, _shallowEqual.default)(node2, opts);
  9016. }
  9017. }
  9018. return false;
  9019. }
  9020. function isDeclareVariable(node2, opts) {
  9021. if (!node2)
  9022. return false;
  9023. const nodeType = node2.type;
  9024. if (nodeType === "DeclareVariable") {
  9025. if (typeof opts === "undefined") {
  9026. return true;
  9027. } else {
  9028. return (0, _shallowEqual.default)(node2, opts);
  9029. }
  9030. }
  9031. return false;
  9032. }
  9033. function isDeclareExportDeclaration(node2, opts) {
  9034. if (!node2)
  9035. return false;
  9036. const nodeType = node2.type;
  9037. if (nodeType === "DeclareExportDeclaration") {
  9038. if (typeof opts === "undefined") {
  9039. return true;
  9040. } else {
  9041. return (0, _shallowEqual.default)(node2, opts);
  9042. }
  9043. }
  9044. return false;
  9045. }
  9046. function isDeclareExportAllDeclaration(node2, opts) {
  9047. if (!node2)
  9048. return false;
  9049. const nodeType = node2.type;
  9050. if (nodeType === "DeclareExportAllDeclaration") {
  9051. if (typeof opts === "undefined") {
  9052. return true;
  9053. } else {
  9054. return (0, _shallowEqual.default)(node2, opts);
  9055. }
  9056. }
  9057. return false;
  9058. }
  9059. function isDeclaredPredicate(node2, opts) {
  9060. if (!node2)
  9061. return false;
  9062. const nodeType = node2.type;
  9063. if (nodeType === "DeclaredPredicate") {
  9064. if (typeof opts === "undefined") {
  9065. return true;
  9066. } else {
  9067. return (0, _shallowEqual.default)(node2, opts);
  9068. }
  9069. }
  9070. return false;
  9071. }
  9072. function isExistsTypeAnnotation(node2, opts) {
  9073. if (!node2)
  9074. return false;
  9075. const nodeType = node2.type;
  9076. if (nodeType === "ExistsTypeAnnotation") {
  9077. if (typeof opts === "undefined") {
  9078. return true;
  9079. } else {
  9080. return (0, _shallowEqual.default)(node2, opts);
  9081. }
  9082. }
  9083. return false;
  9084. }
  9085. function isFunctionTypeAnnotation(node2, opts) {
  9086. if (!node2)
  9087. return false;
  9088. const nodeType = node2.type;
  9089. if (nodeType === "FunctionTypeAnnotation") {
  9090. if (typeof opts === "undefined") {
  9091. return true;
  9092. } else {
  9093. return (0, _shallowEqual.default)(node2, opts);
  9094. }
  9095. }
  9096. return false;
  9097. }
  9098. function isFunctionTypeParam(node2, opts) {
  9099. if (!node2)
  9100. return false;
  9101. const nodeType = node2.type;
  9102. if (nodeType === "FunctionTypeParam") {
  9103. if (typeof opts === "undefined") {
  9104. return true;
  9105. } else {
  9106. return (0, _shallowEqual.default)(node2, opts);
  9107. }
  9108. }
  9109. return false;
  9110. }
  9111. function isGenericTypeAnnotation(node2, opts) {
  9112. if (!node2)
  9113. return false;
  9114. const nodeType = node2.type;
  9115. if (nodeType === "GenericTypeAnnotation") {
  9116. if (typeof opts === "undefined") {
  9117. return true;
  9118. } else {
  9119. return (0, _shallowEqual.default)(node2, opts);
  9120. }
  9121. }
  9122. return false;
  9123. }
  9124. function isInferredPredicate(node2, opts) {
  9125. if (!node2)
  9126. return false;
  9127. const nodeType = node2.type;
  9128. if (nodeType === "InferredPredicate") {
  9129. if (typeof opts === "undefined") {
  9130. return true;
  9131. } else {
  9132. return (0, _shallowEqual.default)(node2, opts);
  9133. }
  9134. }
  9135. return false;
  9136. }
  9137. function isInterfaceExtends(node2, opts) {
  9138. if (!node2)
  9139. return false;
  9140. const nodeType = node2.type;
  9141. if (nodeType === "InterfaceExtends") {
  9142. if (typeof opts === "undefined") {
  9143. return true;
  9144. } else {
  9145. return (0, _shallowEqual.default)(node2, opts);
  9146. }
  9147. }
  9148. return false;
  9149. }
  9150. function isInterfaceDeclaration(node2, opts) {
  9151. if (!node2)
  9152. return false;
  9153. const nodeType = node2.type;
  9154. if (nodeType === "InterfaceDeclaration") {
  9155. if (typeof opts === "undefined") {
  9156. return true;
  9157. } else {
  9158. return (0, _shallowEqual.default)(node2, opts);
  9159. }
  9160. }
  9161. return false;
  9162. }
  9163. function isInterfaceTypeAnnotation(node2, opts) {
  9164. if (!node2)
  9165. return false;
  9166. const nodeType = node2.type;
  9167. if (nodeType === "InterfaceTypeAnnotation") {
  9168. if (typeof opts === "undefined") {
  9169. return true;
  9170. } else {
  9171. return (0, _shallowEqual.default)(node2, opts);
  9172. }
  9173. }
  9174. return false;
  9175. }
  9176. function isIntersectionTypeAnnotation(node2, opts) {
  9177. if (!node2)
  9178. return false;
  9179. const nodeType = node2.type;
  9180. if (nodeType === "IntersectionTypeAnnotation") {
  9181. if (typeof opts === "undefined") {
  9182. return true;
  9183. } else {
  9184. return (0, _shallowEqual.default)(node2, opts);
  9185. }
  9186. }
  9187. return false;
  9188. }
  9189. function isMixedTypeAnnotation(node2, opts) {
  9190. if (!node2)
  9191. return false;
  9192. const nodeType = node2.type;
  9193. if (nodeType === "MixedTypeAnnotation") {
  9194. if (typeof opts === "undefined") {
  9195. return true;
  9196. } else {
  9197. return (0, _shallowEqual.default)(node2, opts);
  9198. }
  9199. }
  9200. return false;
  9201. }
  9202. function isEmptyTypeAnnotation(node2, opts) {
  9203. if (!node2)
  9204. return false;
  9205. const nodeType = node2.type;
  9206. if (nodeType === "EmptyTypeAnnotation") {
  9207. if (typeof opts === "undefined") {
  9208. return true;
  9209. } else {
  9210. return (0, _shallowEqual.default)(node2, opts);
  9211. }
  9212. }
  9213. return false;
  9214. }
  9215. function isNullableTypeAnnotation(node2, opts) {
  9216. if (!node2)
  9217. return false;
  9218. const nodeType = node2.type;
  9219. if (nodeType === "NullableTypeAnnotation") {
  9220. if (typeof opts === "undefined") {
  9221. return true;
  9222. } else {
  9223. return (0, _shallowEqual.default)(node2, opts);
  9224. }
  9225. }
  9226. return false;
  9227. }
  9228. function isNumberLiteralTypeAnnotation(node2, opts) {
  9229. if (!node2)
  9230. return false;
  9231. const nodeType = node2.type;
  9232. if (nodeType === "NumberLiteralTypeAnnotation") {
  9233. if (typeof opts === "undefined") {
  9234. return true;
  9235. } else {
  9236. return (0, _shallowEqual.default)(node2, opts);
  9237. }
  9238. }
  9239. return false;
  9240. }
  9241. function isNumberTypeAnnotation(node2, opts) {
  9242. if (!node2)
  9243. return false;
  9244. const nodeType = node2.type;
  9245. if (nodeType === "NumberTypeAnnotation") {
  9246. if (typeof opts === "undefined") {
  9247. return true;
  9248. } else {
  9249. return (0, _shallowEqual.default)(node2, opts);
  9250. }
  9251. }
  9252. return false;
  9253. }
  9254. function isObjectTypeAnnotation(node2, opts) {
  9255. if (!node2)
  9256. return false;
  9257. const nodeType = node2.type;
  9258. if (nodeType === "ObjectTypeAnnotation") {
  9259. if (typeof opts === "undefined") {
  9260. return true;
  9261. } else {
  9262. return (0, _shallowEqual.default)(node2, opts);
  9263. }
  9264. }
  9265. return false;
  9266. }
  9267. function isObjectTypeInternalSlot(node2, opts) {
  9268. if (!node2)
  9269. return false;
  9270. const nodeType = node2.type;
  9271. if (nodeType === "ObjectTypeInternalSlot") {
  9272. if (typeof opts === "undefined") {
  9273. return true;
  9274. } else {
  9275. return (0, _shallowEqual.default)(node2, opts);
  9276. }
  9277. }
  9278. return false;
  9279. }
  9280. function isObjectTypeCallProperty(node2, opts) {
  9281. if (!node2)
  9282. return false;
  9283. const nodeType = node2.type;
  9284. if (nodeType === "ObjectTypeCallProperty") {
  9285. if (typeof opts === "undefined") {
  9286. return true;
  9287. } else {
  9288. return (0, _shallowEqual.default)(node2, opts);
  9289. }
  9290. }
  9291. return false;
  9292. }
  9293. function isObjectTypeIndexer(node2, opts) {
  9294. if (!node2)
  9295. return false;
  9296. const nodeType = node2.type;
  9297. if (nodeType === "ObjectTypeIndexer") {
  9298. if (typeof opts === "undefined") {
  9299. return true;
  9300. } else {
  9301. return (0, _shallowEqual.default)(node2, opts);
  9302. }
  9303. }
  9304. return false;
  9305. }
  9306. function isObjectTypeProperty(node2, opts) {
  9307. if (!node2)
  9308. return false;
  9309. const nodeType = node2.type;
  9310. if (nodeType === "ObjectTypeProperty") {
  9311. if (typeof opts === "undefined") {
  9312. return true;
  9313. } else {
  9314. return (0, _shallowEqual.default)(node2, opts);
  9315. }
  9316. }
  9317. return false;
  9318. }
  9319. function isObjectTypeSpreadProperty(node2, opts) {
  9320. if (!node2)
  9321. return false;
  9322. const nodeType = node2.type;
  9323. if (nodeType === "ObjectTypeSpreadProperty") {
  9324. if (typeof opts === "undefined") {
  9325. return true;
  9326. } else {
  9327. return (0, _shallowEqual.default)(node2, opts);
  9328. }
  9329. }
  9330. return false;
  9331. }
  9332. function isOpaqueType(node2, opts) {
  9333. if (!node2)
  9334. return false;
  9335. const nodeType = node2.type;
  9336. if (nodeType === "OpaqueType") {
  9337. if (typeof opts === "undefined") {
  9338. return true;
  9339. } else {
  9340. return (0, _shallowEqual.default)(node2, opts);
  9341. }
  9342. }
  9343. return false;
  9344. }
  9345. function isQualifiedTypeIdentifier(node2, opts) {
  9346. if (!node2)
  9347. return false;
  9348. const nodeType = node2.type;
  9349. if (nodeType === "QualifiedTypeIdentifier") {
  9350. if (typeof opts === "undefined") {
  9351. return true;
  9352. } else {
  9353. return (0, _shallowEqual.default)(node2, opts);
  9354. }
  9355. }
  9356. return false;
  9357. }
  9358. function isStringLiteralTypeAnnotation(node2, opts) {
  9359. if (!node2)
  9360. return false;
  9361. const nodeType = node2.type;
  9362. if (nodeType === "StringLiteralTypeAnnotation") {
  9363. if (typeof opts === "undefined") {
  9364. return true;
  9365. } else {
  9366. return (0, _shallowEqual.default)(node2, opts);
  9367. }
  9368. }
  9369. return false;
  9370. }
  9371. function isStringTypeAnnotation(node2, opts) {
  9372. if (!node2)
  9373. return false;
  9374. const nodeType = node2.type;
  9375. if (nodeType === "StringTypeAnnotation") {
  9376. if (typeof opts === "undefined") {
  9377. return true;
  9378. } else {
  9379. return (0, _shallowEqual.default)(node2, opts);
  9380. }
  9381. }
  9382. return false;
  9383. }
  9384. function isSymbolTypeAnnotation(node2, opts) {
  9385. if (!node2)
  9386. return false;
  9387. const nodeType = node2.type;
  9388. if (nodeType === "SymbolTypeAnnotation") {
  9389. if (typeof opts === "undefined") {
  9390. return true;
  9391. } else {
  9392. return (0, _shallowEqual.default)(node2, opts);
  9393. }
  9394. }
  9395. return false;
  9396. }
  9397. function isThisTypeAnnotation(node2, opts) {
  9398. if (!node2)
  9399. return false;
  9400. const nodeType = node2.type;
  9401. if (nodeType === "ThisTypeAnnotation") {
  9402. if (typeof opts === "undefined") {
  9403. return true;
  9404. } else {
  9405. return (0, _shallowEqual.default)(node2, opts);
  9406. }
  9407. }
  9408. return false;
  9409. }
  9410. function isTupleTypeAnnotation(node2, opts) {
  9411. if (!node2)
  9412. return false;
  9413. const nodeType = node2.type;
  9414. if (nodeType === "TupleTypeAnnotation") {
  9415. if (typeof opts === "undefined") {
  9416. return true;
  9417. } else {
  9418. return (0, _shallowEqual.default)(node2, opts);
  9419. }
  9420. }
  9421. return false;
  9422. }
  9423. function isTypeofTypeAnnotation(node2, opts) {
  9424. if (!node2)
  9425. return false;
  9426. const nodeType = node2.type;
  9427. if (nodeType === "TypeofTypeAnnotation") {
  9428. if (typeof opts === "undefined") {
  9429. return true;
  9430. } else {
  9431. return (0, _shallowEqual.default)(node2, opts);
  9432. }
  9433. }
  9434. return false;
  9435. }
  9436. function isTypeAlias(node2, opts) {
  9437. if (!node2)
  9438. return false;
  9439. const nodeType = node2.type;
  9440. if (nodeType === "TypeAlias") {
  9441. if (typeof opts === "undefined") {
  9442. return true;
  9443. } else {
  9444. return (0, _shallowEqual.default)(node2, opts);
  9445. }
  9446. }
  9447. return false;
  9448. }
  9449. function isTypeAnnotation(node2, opts) {
  9450. if (!node2)
  9451. return false;
  9452. const nodeType = node2.type;
  9453. if (nodeType === "TypeAnnotation") {
  9454. if (typeof opts === "undefined") {
  9455. return true;
  9456. } else {
  9457. return (0, _shallowEqual.default)(node2, opts);
  9458. }
  9459. }
  9460. return false;
  9461. }
  9462. function isTypeCastExpression(node2, opts) {
  9463. if (!node2)
  9464. return false;
  9465. const nodeType = node2.type;
  9466. if (nodeType === "TypeCastExpression") {
  9467. if (typeof opts === "undefined") {
  9468. return true;
  9469. } else {
  9470. return (0, _shallowEqual.default)(node2, opts);
  9471. }
  9472. }
  9473. return false;
  9474. }
  9475. function isTypeParameter(node2, opts) {
  9476. if (!node2)
  9477. return false;
  9478. const nodeType = node2.type;
  9479. if (nodeType === "TypeParameter") {
  9480. if (typeof opts === "undefined") {
  9481. return true;
  9482. } else {
  9483. return (0, _shallowEqual.default)(node2, opts);
  9484. }
  9485. }
  9486. return false;
  9487. }
  9488. function isTypeParameterDeclaration(node2, opts) {
  9489. if (!node2)
  9490. return false;
  9491. const nodeType = node2.type;
  9492. if (nodeType === "TypeParameterDeclaration") {
  9493. if (typeof opts === "undefined") {
  9494. return true;
  9495. } else {
  9496. return (0, _shallowEqual.default)(node2, opts);
  9497. }
  9498. }
  9499. return false;
  9500. }
  9501. function isTypeParameterInstantiation(node2, opts) {
  9502. if (!node2)
  9503. return false;
  9504. const nodeType = node2.type;
  9505. if (nodeType === "TypeParameterInstantiation") {
  9506. if (typeof opts === "undefined") {
  9507. return true;
  9508. } else {
  9509. return (0, _shallowEqual.default)(node2, opts);
  9510. }
  9511. }
  9512. return false;
  9513. }
  9514. function isUnionTypeAnnotation(node2, opts) {
  9515. if (!node2)
  9516. return false;
  9517. const nodeType = node2.type;
  9518. if (nodeType === "UnionTypeAnnotation") {
  9519. if (typeof opts === "undefined") {
  9520. return true;
  9521. } else {
  9522. return (0, _shallowEqual.default)(node2, opts);
  9523. }
  9524. }
  9525. return false;
  9526. }
  9527. function isVariance(node2, opts) {
  9528. if (!node2)
  9529. return false;
  9530. const nodeType = node2.type;
  9531. if (nodeType === "Variance") {
  9532. if (typeof opts === "undefined") {
  9533. return true;
  9534. } else {
  9535. return (0, _shallowEqual.default)(node2, opts);
  9536. }
  9537. }
  9538. return false;
  9539. }
  9540. function isVoidTypeAnnotation(node2, opts) {
  9541. if (!node2)
  9542. return false;
  9543. const nodeType = node2.type;
  9544. if (nodeType === "VoidTypeAnnotation") {
  9545. if (typeof opts === "undefined") {
  9546. return true;
  9547. } else {
  9548. return (0, _shallowEqual.default)(node2, opts);
  9549. }
  9550. }
  9551. return false;
  9552. }
  9553. function isEnumDeclaration(node2, opts) {
  9554. if (!node2)
  9555. return false;
  9556. const nodeType = node2.type;
  9557. if (nodeType === "EnumDeclaration") {
  9558. if (typeof opts === "undefined") {
  9559. return true;
  9560. } else {
  9561. return (0, _shallowEqual.default)(node2, opts);
  9562. }
  9563. }
  9564. return false;
  9565. }
  9566. function isEnumBooleanBody(node2, opts) {
  9567. if (!node2)
  9568. return false;
  9569. const nodeType = node2.type;
  9570. if (nodeType === "EnumBooleanBody") {
  9571. if (typeof opts === "undefined") {
  9572. return true;
  9573. } else {
  9574. return (0, _shallowEqual.default)(node2, opts);
  9575. }
  9576. }
  9577. return false;
  9578. }
  9579. function isEnumNumberBody(node2, opts) {
  9580. if (!node2)
  9581. return false;
  9582. const nodeType = node2.type;
  9583. if (nodeType === "EnumNumberBody") {
  9584. if (typeof opts === "undefined") {
  9585. return true;
  9586. } else {
  9587. return (0, _shallowEqual.default)(node2, opts);
  9588. }
  9589. }
  9590. return false;
  9591. }
  9592. function isEnumStringBody(node2, opts) {
  9593. if (!node2)
  9594. return false;
  9595. const nodeType = node2.type;
  9596. if (nodeType === "EnumStringBody") {
  9597. if (typeof opts === "undefined") {
  9598. return true;
  9599. } else {
  9600. return (0, _shallowEqual.default)(node2, opts);
  9601. }
  9602. }
  9603. return false;
  9604. }
  9605. function isEnumSymbolBody(node2, opts) {
  9606. if (!node2)
  9607. return false;
  9608. const nodeType = node2.type;
  9609. if (nodeType === "EnumSymbolBody") {
  9610. if (typeof opts === "undefined") {
  9611. return true;
  9612. } else {
  9613. return (0, _shallowEqual.default)(node2, opts);
  9614. }
  9615. }
  9616. return false;
  9617. }
  9618. function isEnumBooleanMember(node2, opts) {
  9619. if (!node2)
  9620. return false;
  9621. const nodeType = node2.type;
  9622. if (nodeType === "EnumBooleanMember") {
  9623. if (typeof opts === "undefined") {
  9624. return true;
  9625. } else {
  9626. return (0, _shallowEqual.default)(node2, opts);
  9627. }
  9628. }
  9629. return false;
  9630. }
  9631. function isEnumNumberMember(node2, opts) {
  9632. if (!node2)
  9633. return false;
  9634. const nodeType = node2.type;
  9635. if (nodeType === "EnumNumberMember") {
  9636. if (typeof opts === "undefined") {
  9637. return true;
  9638. } else {
  9639. return (0, _shallowEqual.default)(node2, opts);
  9640. }
  9641. }
  9642. return false;
  9643. }
  9644. function isEnumStringMember(node2, opts) {
  9645. if (!node2)
  9646. return false;
  9647. const nodeType = node2.type;
  9648. if (nodeType === "EnumStringMember") {
  9649. if (typeof opts === "undefined") {
  9650. return true;
  9651. } else {
  9652. return (0, _shallowEqual.default)(node2, opts);
  9653. }
  9654. }
  9655. return false;
  9656. }
  9657. function isEnumDefaultedMember(node2, opts) {
  9658. if (!node2)
  9659. return false;
  9660. const nodeType = node2.type;
  9661. if (nodeType === "EnumDefaultedMember") {
  9662. if (typeof opts === "undefined") {
  9663. return true;
  9664. } else {
  9665. return (0, _shallowEqual.default)(node2, opts);
  9666. }
  9667. }
  9668. return false;
  9669. }
  9670. function isIndexedAccessType(node2, opts) {
  9671. if (!node2)
  9672. return false;
  9673. const nodeType = node2.type;
  9674. if (nodeType === "IndexedAccessType") {
  9675. if (typeof opts === "undefined") {
  9676. return true;
  9677. } else {
  9678. return (0, _shallowEqual.default)(node2, opts);
  9679. }
  9680. }
  9681. return false;
  9682. }
  9683. function isOptionalIndexedAccessType(node2, opts) {
  9684. if (!node2)
  9685. return false;
  9686. const nodeType = node2.type;
  9687. if (nodeType === "OptionalIndexedAccessType") {
  9688. if (typeof opts === "undefined") {
  9689. return true;
  9690. } else {
  9691. return (0, _shallowEqual.default)(node2, opts);
  9692. }
  9693. }
  9694. return false;
  9695. }
  9696. function isJSXAttribute(node2, opts) {
  9697. if (!node2)
  9698. return false;
  9699. const nodeType = node2.type;
  9700. if (nodeType === "JSXAttribute") {
  9701. if (typeof opts === "undefined") {
  9702. return true;
  9703. } else {
  9704. return (0, _shallowEqual.default)(node2, opts);
  9705. }
  9706. }
  9707. return false;
  9708. }
  9709. function isJSXClosingElement(node2, opts) {
  9710. if (!node2)
  9711. return false;
  9712. const nodeType = node2.type;
  9713. if (nodeType === "JSXClosingElement") {
  9714. if (typeof opts === "undefined") {
  9715. return true;
  9716. } else {
  9717. return (0, _shallowEqual.default)(node2, opts);
  9718. }
  9719. }
  9720. return false;
  9721. }
  9722. function isJSXElement3(node2, opts) {
  9723. if (!node2)
  9724. return false;
  9725. const nodeType = node2.type;
  9726. if (nodeType === "JSXElement") {
  9727. if (typeof opts === "undefined") {
  9728. return true;
  9729. } else {
  9730. return (0, _shallowEqual.default)(node2, opts);
  9731. }
  9732. }
  9733. return false;
  9734. }
  9735. function isJSXEmptyExpression(node2, opts) {
  9736. if (!node2)
  9737. return false;
  9738. const nodeType = node2.type;
  9739. if (nodeType === "JSXEmptyExpression") {
  9740. if (typeof opts === "undefined") {
  9741. return true;
  9742. } else {
  9743. return (0, _shallowEqual.default)(node2, opts);
  9744. }
  9745. }
  9746. return false;
  9747. }
  9748. function isJSXExpressionContainer3(node2, opts) {
  9749. if (!node2)
  9750. return false;
  9751. const nodeType = node2.type;
  9752. if (nodeType === "JSXExpressionContainer") {
  9753. if (typeof opts === "undefined") {
  9754. return true;
  9755. } else {
  9756. return (0, _shallowEqual.default)(node2, opts);
  9757. }
  9758. }
  9759. return false;
  9760. }
  9761. function isJSXSpreadChild(node2, opts) {
  9762. if (!node2)
  9763. return false;
  9764. const nodeType = node2.type;
  9765. if (nodeType === "JSXSpreadChild") {
  9766. if (typeof opts === "undefined") {
  9767. return true;
  9768. } else {
  9769. return (0, _shallowEqual.default)(node2, opts);
  9770. }
  9771. }
  9772. return false;
  9773. }
  9774. function isJSXIdentifier3(node2, opts) {
  9775. if (!node2)
  9776. return false;
  9777. const nodeType = node2.type;
  9778. if (nodeType === "JSXIdentifier") {
  9779. if (typeof opts === "undefined") {
  9780. return true;
  9781. } else {
  9782. return (0, _shallowEqual.default)(node2, opts);
  9783. }
  9784. }
  9785. return false;
  9786. }
  9787. function isJSXMemberExpression(node2, opts) {
  9788. if (!node2)
  9789. return false;
  9790. const nodeType = node2.type;
  9791. if (nodeType === "JSXMemberExpression") {
  9792. if (typeof opts === "undefined") {
  9793. return true;
  9794. } else {
  9795. return (0, _shallowEqual.default)(node2, opts);
  9796. }
  9797. }
  9798. return false;
  9799. }
  9800. function isJSXNamespacedName(node2, opts) {
  9801. if (!node2)
  9802. return false;
  9803. const nodeType = node2.type;
  9804. if (nodeType === "JSXNamespacedName") {
  9805. if (typeof opts === "undefined") {
  9806. return true;
  9807. } else {
  9808. return (0, _shallowEqual.default)(node2, opts);
  9809. }
  9810. }
  9811. return false;
  9812. }
  9813. function isJSXOpeningElement(node2, opts) {
  9814. if (!node2)
  9815. return false;
  9816. const nodeType = node2.type;
  9817. if (nodeType === "JSXOpeningElement") {
  9818. if (typeof opts === "undefined") {
  9819. return true;
  9820. } else {
  9821. return (0, _shallowEqual.default)(node2, opts);
  9822. }
  9823. }
  9824. return false;
  9825. }
  9826. function isJSXSpreadAttribute(node2, opts) {
  9827. if (!node2)
  9828. return false;
  9829. const nodeType = node2.type;
  9830. if (nodeType === "JSXSpreadAttribute") {
  9831. if (typeof opts === "undefined") {
  9832. return true;
  9833. } else {
  9834. return (0, _shallowEqual.default)(node2, opts);
  9835. }
  9836. }
  9837. return false;
  9838. }
  9839. function isJSXText2(node2, opts) {
  9840. if (!node2)
  9841. return false;
  9842. const nodeType = node2.type;
  9843. if (nodeType === "JSXText") {
  9844. if (typeof opts === "undefined") {
  9845. return true;
  9846. } else {
  9847. return (0, _shallowEqual.default)(node2, opts);
  9848. }
  9849. }
  9850. return false;
  9851. }
  9852. function isJSXFragment2(node2, opts) {
  9853. if (!node2)
  9854. return false;
  9855. const nodeType = node2.type;
  9856. if (nodeType === "JSXFragment") {
  9857. if (typeof opts === "undefined") {
  9858. return true;
  9859. } else {
  9860. return (0, _shallowEqual.default)(node2, opts);
  9861. }
  9862. }
  9863. return false;
  9864. }
  9865. function isJSXOpeningFragment(node2, opts) {
  9866. if (!node2)
  9867. return false;
  9868. const nodeType = node2.type;
  9869. if (nodeType === "JSXOpeningFragment") {
  9870. if (typeof opts === "undefined") {
  9871. return true;
  9872. } else {
  9873. return (0, _shallowEqual.default)(node2, opts);
  9874. }
  9875. }
  9876. return false;
  9877. }
  9878. function isJSXClosingFragment(node2, opts) {
  9879. if (!node2)
  9880. return false;
  9881. const nodeType = node2.type;
  9882. if (nodeType === "JSXClosingFragment") {
  9883. if (typeof opts === "undefined") {
  9884. return true;
  9885. } else {
  9886. return (0, _shallowEqual.default)(node2, opts);
  9887. }
  9888. }
  9889. return false;
  9890. }
  9891. function isNoop(node2, opts) {
  9892. if (!node2)
  9893. return false;
  9894. const nodeType = node2.type;
  9895. if (nodeType === "Noop") {
  9896. if (typeof opts === "undefined") {
  9897. return true;
  9898. } else {
  9899. return (0, _shallowEqual.default)(node2, opts);
  9900. }
  9901. }
  9902. return false;
  9903. }
  9904. function isPlaceholder(node2, opts) {
  9905. if (!node2)
  9906. return false;
  9907. const nodeType = node2.type;
  9908. if (nodeType === "Placeholder") {
  9909. if (typeof opts === "undefined") {
  9910. return true;
  9911. } else {
  9912. return (0, _shallowEqual.default)(node2, opts);
  9913. }
  9914. }
  9915. return false;
  9916. }
  9917. function isV8IntrinsicIdentifier(node2, opts) {
  9918. if (!node2)
  9919. return false;
  9920. const nodeType = node2.type;
  9921. if (nodeType === "V8IntrinsicIdentifier") {
  9922. if (typeof opts === "undefined") {
  9923. return true;
  9924. } else {
  9925. return (0, _shallowEqual.default)(node2, opts);
  9926. }
  9927. }
  9928. return false;
  9929. }
  9930. function isArgumentPlaceholder(node2, opts) {
  9931. if (!node2)
  9932. return false;
  9933. const nodeType = node2.type;
  9934. if (nodeType === "ArgumentPlaceholder") {
  9935. if (typeof opts === "undefined") {
  9936. return true;
  9937. } else {
  9938. return (0, _shallowEqual.default)(node2, opts);
  9939. }
  9940. }
  9941. return false;
  9942. }
  9943. function isBindExpression(node2, opts) {
  9944. if (!node2)
  9945. return false;
  9946. const nodeType = node2.type;
  9947. if (nodeType === "BindExpression") {
  9948. if (typeof opts === "undefined") {
  9949. return true;
  9950. } else {
  9951. return (0, _shallowEqual.default)(node2, opts);
  9952. }
  9953. }
  9954. return false;
  9955. }
  9956. function isImportAttribute(node2, opts) {
  9957. if (!node2)
  9958. return false;
  9959. const nodeType = node2.type;
  9960. if (nodeType === "ImportAttribute") {
  9961. if (typeof opts === "undefined") {
  9962. return true;
  9963. } else {
  9964. return (0, _shallowEqual.default)(node2, opts);
  9965. }
  9966. }
  9967. return false;
  9968. }
  9969. function isDecorator(node2, opts) {
  9970. if (!node2)
  9971. return false;
  9972. const nodeType = node2.type;
  9973. if (nodeType === "Decorator") {
  9974. if (typeof opts === "undefined") {
  9975. return true;
  9976. } else {
  9977. return (0, _shallowEqual.default)(node2, opts);
  9978. }
  9979. }
  9980. return false;
  9981. }
  9982. function isDoExpression(node2, opts) {
  9983. if (!node2)
  9984. return false;
  9985. const nodeType = node2.type;
  9986. if (nodeType === "DoExpression") {
  9987. if (typeof opts === "undefined") {
  9988. return true;
  9989. } else {
  9990. return (0, _shallowEqual.default)(node2, opts);
  9991. }
  9992. }
  9993. return false;
  9994. }
  9995. function isExportDefaultSpecifier(node2, opts) {
  9996. if (!node2)
  9997. return false;
  9998. const nodeType = node2.type;
  9999. if (nodeType === "ExportDefaultSpecifier") {
  10000. if (typeof opts === "undefined") {
  10001. return true;
  10002. } else {
  10003. return (0, _shallowEqual.default)(node2, opts);
  10004. }
  10005. }
  10006. return false;
  10007. }
  10008. function isRecordExpression(node2, opts) {
  10009. if (!node2)
  10010. return false;
  10011. const nodeType = node2.type;
  10012. if (nodeType === "RecordExpression") {
  10013. if (typeof opts === "undefined") {
  10014. return true;
  10015. } else {
  10016. return (0, _shallowEqual.default)(node2, opts);
  10017. }
  10018. }
  10019. return false;
  10020. }
  10021. function isTupleExpression(node2, opts) {
  10022. if (!node2)
  10023. return false;
  10024. const nodeType = node2.type;
  10025. if (nodeType === "TupleExpression") {
  10026. if (typeof opts === "undefined") {
  10027. return true;
  10028. } else {
  10029. return (0, _shallowEqual.default)(node2, opts);
  10030. }
  10031. }
  10032. return false;
  10033. }
  10034. function isDecimalLiteral(node2, opts) {
  10035. if (!node2)
  10036. return false;
  10037. const nodeType = node2.type;
  10038. if (nodeType === "DecimalLiteral") {
  10039. if (typeof opts === "undefined") {
  10040. return true;
  10041. } else {
  10042. return (0, _shallowEqual.default)(node2, opts);
  10043. }
  10044. }
  10045. return false;
  10046. }
  10047. function isModuleExpression(node2, opts) {
  10048. if (!node2)
  10049. return false;
  10050. const nodeType = node2.type;
  10051. if (nodeType === "ModuleExpression") {
  10052. if (typeof opts === "undefined") {
  10053. return true;
  10054. } else {
  10055. return (0, _shallowEqual.default)(node2, opts);
  10056. }
  10057. }
  10058. return false;
  10059. }
  10060. function isTopicReference(node2, opts) {
  10061. if (!node2)
  10062. return false;
  10063. const nodeType = node2.type;
  10064. if (nodeType === "TopicReference") {
  10065. if (typeof opts === "undefined") {
  10066. return true;
  10067. } else {
  10068. return (0, _shallowEqual.default)(node2, opts);
  10069. }
  10070. }
  10071. return false;
  10072. }
  10073. function isPipelineTopicExpression(node2, opts) {
  10074. if (!node2)
  10075. return false;
  10076. const nodeType = node2.type;
  10077. if (nodeType === "PipelineTopicExpression") {
  10078. if (typeof opts === "undefined") {
  10079. return true;
  10080. } else {
  10081. return (0, _shallowEqual.default)(node2, opts);
  10082. }
  10083. }
  10084. return false;
  10085. }
  10086. function isPipelineBareFunction(node2, opts) {
  10087. if (!node2)
  10088. return false;
  10089. const nodeType = node2.type;
  10090. if (nodeType === "PipelineBareFunction") {
  10091. if (typeof opts === "undefined") {
  10092. return true;
  10093. } else {
  10094. return (0, _shallowEqual.default)(node2, opts);
  10095. }
  10096. }
  10097. return false;
  10098. }
  10099. function isPipelinePrimaryTopicReference(node2, opts) {
  10100. if (!node2)
  10101. return false;
  10102. const nodeType = node2.type;
  10103. if (nodeType === "PipelinePrimaryTopicReference") {
  10104. if (typeof opts === "undefined") {
  10105. return true;
  10106. } else {
  10107. return (0, _shallowEqual.default)(node2, opts);
  10108. }
  10109. }
  10110. return false;
  10111. }
  10112. function isTSParameterProperty(node2, opts) {
  10113. if (!node2)
  10114. return false;
  10115. const nodeType = node2.type;
  10116. if (nodeType === "TSParameterProperty") {
  10117. if (typeof opts === "undefined") {
  10118. return true;
  10119. } else {
  10120. return (0, _shallowEqual.default)(node2, opts);
  10121. }
  10122. }
  10123. return false;
  10124. }
  10125. function isTSDeclareFunction(node2, opts) {
  10126. if (!node2)
  10127. return false;
  10128. const nodeType = node2.type;
  10129. if (nodeType === "TSDeclareFunction") {
  10130. if (typeof opts === "undefined") {
  10131. return true;
  10132. } else {
  10133. return (0, _shallowEqual.default)(node2, opts);
  10134. }
  10135. }
  10136. return false;
  10137. }
  10138. function isTSDeclareMethod(node2, opts) {
  10139. if (!node2)
  10140. return false;
  10141. const nodeType = node2.type;
  10142. if (nodeType === "TSDeclareMethod") {
  10143. if (typeof opts === "undefined") {
  10144. return true;
  10145. } else {
  10146. return (0, _shallowEqual.default)(node2, opts);
  10147. }
  10148. }
  10149. return false;
  10150. }
  10151. function isTSQualifiedName(node2, opts) {
  10152. if (!node2)
  10153. return false;
  10154. const nodeType = node2.type;
  10155. if (nodeType === "TSQualifiedName") {
  10156. if (typeof opts === "undefined") {
  10157. return true;
  10158. } else {
  10159. return (0, _shallowEqual.default)(node2, opts);
  10160. }
  10161. }
  10162. return false;
  10163. }
  10164. function isTSCallSignatureDeclaration(node2, opts) {
  10165. if (!node2)
  10166. return false;
  10167. const nodeType = node2.type;
  10168. if (nodeType === "TSCallSignatureDeclaration") {
  10169. if (typeof opts === "undefined") {
  10170. return true;
  10171. } else {
  10172. return (0, _shallowEqual.default)(node2, opts);
  10173. }
  10174. }
  10175. return false;
  10176. }
  10177. function isTSConstructSignatureDeclaration(node2, opts) {
  10178. if (!node2)
  10179. return false;
  10180. const nodeType = node2.type;
  10181. if (nodeType === "TSConstructSignatureDeclaration") {
  10182. if (typeof opts === "undefined") {
  10183. return true;
  10184. } else {
  10185. return (0, _shallowEqual.default)(node2, opts);
  10186. }
  10187. }
  10188. return false;
  10189. }
  10190. function isTSPropertySignature(node2, opts) {
  10191. if (!node2)
  10192. return false;
  10193. const nodeType = node2.type;
  10194. if (nodeType === "TSPropertySignature") {
  10195. if (typeof opts === "undefined") {
  10196. return true;
  10197. } else {
  10198. return (0, _shallowEqual.default)(node2, opts);
  10199. }
  10200. }
  10201. return false;
  10202. }
  10203. function isTSMethodSignature(node2, opts) {
  10204. if (!node2)
  10205. return false;
  10206. const nodeType = node2.type;
  10207. if (nodeType === "TSMethodSignature") {
  10208. if (typeof opts === "undefined") {
  10209. return true;
  10210. } else {
  10211. return (0, _shallowEqual.default)(node2, opts);
  10212. }
  10213. }
  10214. return false;
  10215. }
  10216. function isTSIndexSignature(node2, opts) {
  10217. if (!node2)
  10218. return false;
  10219. const nodeType = node2.type;
  10220. if (nodeType === "TSIndexSignature") {
  10221. if (typeof opts === "undefined") {
  10222. return true;
  10223. } else {
  10224. return (0, _shallowEqual.default)(node2, opts);
  10225. }
  10226. }
  10227. return false;
  10228. }
  10229. function isTSAnyKeyword(node2, opts) {
  10230. if (!node2)
  10231. return false;
  10232. const nodeType = node2.type;
  10233. if (nodeType === "TSAnyKeyword") {
  10234. if (typeof opts === "undefined") {
  10235. return true;
  10236. } else {
  10237. return (0, _shallowEqual.default)(node2, opts);
  10238. }
  10239. }
  10240. return false;
  10241. }
  10242. function isTSBooleanKeyword(node2, opts) {
  10243. if (!node2)
  10244. return false;
  10245. const nodeType = node2.type;
  10246. if (nodeType === "TSBooleanKeyword") {
  10247. if (typeof opts === "undefined") {
  10248. return true;
  10249. } else {
  10250. return (0, _shallowEqual.default)(node2, opts);
  10251. }
  10252. }
  10253. return false;
  10254. }
  10255. function isTSBigIntKeyword(node2, opts) {
  10256. if (!node2)
  10257. return false;
  10258. const nodeType = node2.type;
  10259. if (nodeType === "TSBigIntKeyword") {
  10260. if (typeof opts === "undefined") {
  10261. return true;
  10262. } else {
  10263. return (0, _shallowEqual.default)(node2, opts);
  10264. }
  10265. }
  10266. return false;
  10267. }
  10268. function isTSIntrinsicKeyword(node2, opts) {
  10269. if (!node2)
  10270. return false;
  10271. const nodeType = node2.type;
  10272. if (nodeType === "TSIntrinsicKeyword") {
  10273. if (typeof opts === "undefined") {
  10274. return true;
  10275. } else {
  10276. return (0, _shallowEqual.default)(node2, opts);
  10277. }
  10278. }
  10279. return false;
  10280. }
  10281. function isTSNeverKeyword(node2, opts) {
  10282. if (!node2)
  10283. return false;
  10284. const nodeType = node2.type;
  10285. if (nodeType === "TSNeverKeyword") {
  10286. if (typeof opts === "undefined") {
  10287. return true;
  10288. } else {
  10289. return (0, _shallowEqual.default)(node2, opts);
  10290. }
  10291. }
  10292. return false;
  10293. }
  10294. function isTSNullKeyword(node2, opts) {
  10295. if (!node2)
  10296. return false;
  10297. const nodeType = node2.type;
  10298. if (nodeType === "TSNullKeyword") {
  10299. if (typeof opts === "undefined") {
  10300. return true;
  10301. } else {
  10302. return (0, _shallowEqual.default)(node2, opts);
  10303. }
  10304. }
  10305. return false;
  10306. }
  10307. function isTSNumberKeyword(node2, opts) {
  10308. if (!node2)
  10309. return false;
  10310. const nodeType = node2.type;
  10311. if (nodeType === "TSNumberKeyword") {
  10312. if (typeof opts === "undefined") {
  10313. return true;
  10314. } else {
  10315. return (0, _shallowEqual.default)(node2, opts);
  10316. }
  10317. }
  10318. return false;
  10319. }
  10320. function isTSObjectKeyword(node2, opts) {
  10321. if (!node2)
  10322. return false;
  10323. const nodeType = node2.type;
  10324. if (nodeType === "TSObjectKeyword") {
  10325. if (typeof opts === "undefined") {
  10326. return true;
  10327. } else {
  10328. return (0, _shallowEqual.default)(node2, opts);
  10329. }
  10330. }
  10331. return false;
  10332. }
  10333. function isTSStringKeyword(node2, opts) {
  10334. if (!node2)
  10335. return false;
  10336. const nodeType = node2.type;
  10337. if (nodeType === "TSStringKeyword") {
  10338. if (typeof opts === "undefined") {
  10339. return true;
  10340. } else {
  10341. return (0, _shallowEqual.default)(node2, opts);
  10342. }
  10343. }
  10344. return false;
  10345. }
  10346. function isTSSymbolKeyword(node2, opts) {
  10347. if (!node2)
  10348. return false;
  10349. const nodeType = node2.type;
  10350. if (nodeType === "TSSymbolKeyword") {
  10351. if (typeof opts === "undefined") {
  10352. return true;
  10353. } else {
  10354. return (0, _shallowEqual.default)(node2, opts);
  10355. }
  10356. }
  10357. return false;
  10358. }
  10359. function isTSUndefinedKeyword(node2, opts) {
  10360. if (!node2)
  10361. return false;
  10362. const nodeType = node2.type;
  10363. if (nodeType === "TSUndefinedKeyword") {
  10364. if (typeof opts === "undefined") {
  10365. return true;
  10366. } else {
  10367. return (0, _shallowEqual.default)(node2, opts);
  10368. }
  10369. }
  10370. return false;
  10371. }
  10372. function isTSUnknownKeyword(node2, opts) {
  10373. if (!node2)
  10374. return false;
  10375. const nodeType = node2.type;
  10376. if (nodeType === "TSUnknownKeyword") {
  10377. if (typeof opts === "undefined") {
  10378. return true;
  10379. } else {
  10380. return (0, _shallowEqual.default)(node2, opts);
  10381. }
  10382. }
  10383. return false;
  10384. }
  10385. function isTSVoidKeyword(node2, opts) {
  10386. if (!node2)
  10387. return false;
  10388. const nodeType = node2.type;
  10389. if (nodeType === "TSVoidKeyword") {
  10390. if (typeof opts === "undefined") {
  10391. return true;
  10392. } else {
  10393. return (0, _shallowEqual.default)(node2, opts);
  10394. }
  10395. }
  10396. return false;
  10397. }
  10398. function isTSThisType(node2, opts) {
  10399. if (!node2)
  10400. return false;
  10401. const nodeType = node2.type;
  10402. if (nodeType === "TSThisType") {
  10403. if (typeof opts === "undefined") {
  10404. return true;
  10405. } else {
  10406. return (0, _shallowEqual.default)(node2, opts);
  10407. }
  10408. }
  10409. return false;
  10410. }
  10411. function isTSFunctionType(node2, opts) {
  10412. if (!node2)
  10413. return false;
  10414. const nodeType = node2.type;
  10415. if (nodeType === "TSFunctionType") {
  10416. if (typeof opts === "undefined") {
  10417. return true;
  10418. } else {
  10419. return (0, _shallowEqual.default)(node2, opts);
  10420. }
  10421. }
  10422. return false;
  10423. }
  10424. function isTSConstructorType(node2, opts) {
  10425. if (!node2)
  10426. return false;
  10427. const nodeType = node2.type;
  10428. if (nodeType === "TSConstructorType") {
  10429. if (typeof opts === "undefined") {
  10430. return true;
  10431. } else {
  10432. return (0, _shallowEqual.default)(node2, opts);
  10433. }
  10434. }
  10435. return false;
  10436. }
  10437. function isTSTypeReference(node2, opts) {
  10438. if (!node2)
  10439. return false;
  10440. const nodeType = node2.type;
  10441. if (nodeType === "TSTypeReference") {
  10442. if (typeof opts === "undefined") {
  10443. return true;
  10444. } else {
  10445. return (0, _shallowEqual.default)(node2, opts);
  10446. }
  10447. }
  10448. return false;
  10449. }
  10450. function isTSTypePredicate(node2, opts) {
  10451. if (!node2)
  10452. return false;
  10453. const nodeType = node2.type;
  10454. if (nodeType === "TSTypePredicate") {
  10455. if (typeof opts === "undefined") {
  10456. return true;
  10457. } else {
  10458. return (0, _shallowEqual.default)(node2, opts);
  10459. }
  10460. }
  10461. return false;
  10462. }
  10463. function isTSTypeQuery(node2, opts) {
  10464. if (!node2)
  10465. return false;
  10466. const nodeType = node2.type;
  10467. if (nodeType === "TSTypeQuery") {
  10468. if (typeof opts === "undefined") {
  10469. return true;
  10470. } else {
  10471. return (0, _shallowEqual.default)(node2, opts);
  10472. }
  10473. }
  10474. return false;
  10475. }
  10476. function isTSTypeLiteral(node2, opts) {
  10477. if (!node2)
  10478. return false;
  10479. const nodeType = node2.type;
  10480. if (nodeType === "TSTypeLiteral") {
  10481. if (typeof opts === "undefined") {
  10482. return true;
  10483. } else {
  10484. return (0, _shallowEqual.default)(node2, opts);
  10485. }
  10486. }
  10487. return false;
  10488. }
  10489. function isTSArrayType(node2, opts) {
  10490. if (!node2)
  10491. return false;
  10492. const nodeType = node2.type;
  10493. if (nodeType === "TSArrayType") {
  10494. if (typeof opts === "undefined") {
  10495. return true;
  10496. } else {
  10497. return (0, _shallowEqual.default)(node2, opts);
  10498. }
  10499. }
  10500. return false;
  10501. }
  10502. function isTSTupleType(node2, opts) {
  10503. if (!node2)
  10504. return false;
  10505. const nodeType = node2.type;
  10506. if (nodeType === "TSTupleType") {
  10507. if (typeof opts === "undefined") {
  10508. return true;
  10509. } else {
  10510. return (0, _shallowEqual.default)(node2, opts);
  10511. }
  10512. }
  10513. return false;
  10514. }
  10515. function isTSOptionalType(node2, opts) {
  10516. if (!node2)
  10517. return false;
  10518. const nodeType = node2.type;
  10519. if (nodeType === "TSOptionalType") {
  10520. if (typeof opts === "undefined") {
  10521. return true;
  10522. } else {
  10523. return (0, _shallowEqual.default)(node2, opts);
  10524. }
  10525. }
  10526. return false;
  10527. }
  10528. function isTSRestType(node2, opts) {
  10529. if (!node2)
  10530. return false;
  10531. const nodeType = node2.type;
  10532. if (nodeType === "TSRestType") {
  10533. if (typeof opts === "undefined") {
  10534. return true;
  10535. } else {
  10536. return (0, _shallowEqual.default)(node2, opts);
  10537. }
  10538. }
  10539. return false;
  10540. }
  10541. function isTSNamedTupleMember(node2, opts) {
  10542. if (!node2)
  10543. return false;
  10544. const nodeType = node2.type;
  10545. if (nodeType === "TSNamedTupleMember") {
  10546. if (typeof opts === "undefined") {
  10547. return true;
  10548. } else {
  10549. return (0, _shallowEqual.default)(node2, opts);
  10550. }
  10551. }
  10552. return false;
  10553. }
  10554. function isTSUnionType(node2, opts) {
  10555. if (!node2)
  10556. return false;
  10557. const nodeType = node2.type;
  10558. if (nodeType === "TSUnionType") {
  10559. if (typeof opts === "undefined") {
  10560. return true;
  10561. } else {
  10562. return (0, _shallowEqual.default)(node2, opts);
  10563. }
  10564. }
  10565. return false;
  10566. }
  10567. function isTSIntersectionType(node2, opts) {
  10568. if (!node2)
  10569. return false;
  10570. const nodeType = node2.type;
  10571. if (nodeType === "TSIntersectionType") {
  10572. if (typeof opts === "undefined") {
  10573. return true;
  10574. } else {
  10575. return (0, _shallowEqual.default)(node2, opts);
  10576. }
  10577. }
  10578. return false;
  10579. }
  10580. function isTSConditionalType(node2, opts) {
  10581. if (!node2)
  10582. return false;
  10583. const nodeType = node2.type;
  10584. if (nodeType === "TSConditionalType") {
  10585. if (typeof opts === "undefined") {
  10586. return true;
  10587. } else {
  10588. return (0, _shallowEqual.default)(node2, opts);
  10589. }
  10590. }
  10591. return false;
  10592. }
  10593. function isTSInferType(node2, opts) {
  10594. if (!node2)
  10595. return false;
  10596. const nodeType = node2.type;
  10597. if (nodeType === "TSInferType") {
  10598. if (typeof opts === "undefined") {
  10599. return true;
  10600. } else {
  10601. return (0, _shallowEqual.default)(node2, opts);
  10602. }
  10603. }
  10604. return false;
  10605. }
  10606. function isTSParenthesizedType(node2, opts) {
  10607. if (!node2)
  10608. return false;
  10609. const nodeType = node2.type;
  10610. if (nodeType === "TSParenthesizedType") {
  10611. if (typeof opts === "undefined") {
  10612. return true;
  10613. } else {
  10614. return (0, _shallowEqual.default)(node2, opts);
  10615. }
  10616. }
  10617. return false;
  10618. }
  10619. function isTSTypeOperator(node2, opts) {
  10620. if (!node2)
  10621. return false;
  10622. const nodeType = node2.type;
  10623. if (nodeType === "TSTypeOperator") {
  10624. if (typeof opts === "undefined") {
  10625. return true;
  10626. } else {
  10627. return (0, _shallowEqual.default)(node2, opts);
  10628. }
  10629. }
  10630. return false;
  10631. }
  10632. function isTSIndexedAccessType(node2, opts) {
  10633. if (!node2)
  10634. return false;
  10635. const nodeType = node2.type;
  10636. if (nodeType === "TSIndexedAccessType") {
  10637. if (typeof opts === "undefined") {
  10638. return true;
  10639. } else {
  10640. return (0, _shallowEqual.default)(node2, opts);
  10641. }
  10642. }
  10643. return false;
  10644. }
  10645. function isTSMappedType(node2, opts) {
  10646. if (!node2)
  10647. return false;
  10648. const nodeType = node2.type;
  10649. if (nodeType === "TSMappedType") {
  10650. if (typeof opts === "undefined") {
  10651. return true;
  10652. } else {
  10653. return (0, _shallowEqual.default)(node2, opts);
  10654. }
  10655. }
  10656. return false;
  10657. }
  10658. function isTSLiteralType(node2, opts) {
  10659. if (!node2)
  10660. return false;
  10661. const nodeType = node2.type;
  10662. if (nodeType === "TSLiteralType") {
  10663. if (typeof opts === "undefined") {
  10664. return true;
  10665. } else {
  10666. return (0, _shallowEqual.default)(node2, opts);
  10667. }
  10668. }
  10669. return false;
  10670. }
  10671. function isTSExpressionWithTypeArguments(node2, opts) {
  10672. if (!node2)
  10673. return false;
  10674. const nodeType = node2.type;
  10675. if (nodeType === "TSExpressionWithTypeArguments") {
  10676. if (typeof opts === "undefined") {
  10677. return true;
  10678. } else {
  10679. return (0, _shallowEqual.default)(node2, opts);
  10680. }
  10681. }
  10682. return false;
  10683. }
  10684. function isTSInterfaceDeclaration(node2, opts) {
  10685. if (!node2)
  10686. return false;
  10687. const nodeType = node2.type;
  10688. if (nodeType === "TSInterfaceDeclaration") {
  10689. if (typeof opts === "undefined") {
  10690. return true;
  10691. } else {
  10692. return (0, _shallowEqual.default)(node2, opts);
  10693. }
  10694. }
  10695. return false;
  10696. }
  10697. function isTSInterfaceBody(node2, opts) {
  10698. if (!node2)
  10699. return false;
  10700. const nodeType = node2.type;
  10701. if (nodeType === "TSInterfaceBody") {
  10702. if (typeof opts === "undefined") {
  10703. return true;
  10704. } else {
  10705. return (0, _shallowEqual.default)(node2, opts);
  10706. }
  10707. }
  10708. return false;
  10709. }
  10710. function isTSTypeAliasDeclaration(node2, opts) {
  10711. if (!node2)
  10712. return false;
  10713. const nodeType = node2.type;
  10714. if (nodeType === "TSTypeAliasDeclaration") {
  10715. if (typeof opts === "undefined") {
  10716. return true;
  10717. } else {
  10718. return (0, _shallowEqual.default)(node2, opts);
  10719. }
  10720. }
  10721. return false;
  10722. }
  10723. function isTSInstantiationExpression(node2, opts) {
  10724. if (!node2)
  10725. return false;
  10726. const nodeType = node2.type;
  10727. if (nodeType === "TSInstantiationExpression") {
  10728. if (typeof opts === "undefined") {
  10729. return true;
  10730. } else {
  10731. return (0, _shallowEqual.default)(node2, opts);
  10732. }
  10733. }
  10734. return false;
  10735. }
  10736. function isTSAsExpression(node2, opts) {
  10737. if (!node2)
  10738. return false;
  10739. const nodeType = node2.type;
  10740. if (nodeType === "TSAsExpression") {
  10741. if (typeof opts === "undefined") {
  10742. return true;
  10743. } else {
  10744. return (0, _shallowEqual.default)(node2, opts);
  10745. }
  10746. }
  10747. return false;
  10748. }
  10749. function isTSSatisfiesExpression(node2, opts) {
  10750. if (!node2)
  10751. return false;
  10752. const nodeType = node2.type;
  10753. if (nodeType === "TSSatisfiesExpression") {
  10754. if (typeof opts === "undefined") {
  10755. return true;
  10756. } else {
  10757. return (0, _shallowEqual.default)(node2, opts);
  10758. }
  10759. }
  10760. return false;
  10761. }
  10762. function isTSTypeAssertion(node2, opts) {
  10763. if (!node2)
  10764. return false;
  10765. const nodeType = node2.type;
  10766. if (nodeType === "TSTypeAssertion") {
  10767. if (typeof opts === "undefined") {
  10768. return true;
  10769. } else {
  10770. return (0, _shallowEqual.default)(node2, opts);
  10771. }
  10772. }
  10773. return false;
  10774. }
  10775. function isTSEnumDeclaration(node2, opts) {
  10776. if (!node2)
  10777. return false;
  10778. const nodeType = node2.type;
  10779. if (nodeType === "TSEnumDeclaration") {
  10780. if (typeof opts === "undefined") {
  10781. return true;
  10782. } else {
  10783. return (0, _shallowEqual.default)(node2, opts);
  10784. }
  10785. }
  10786. return false;
  10787. }
  10788. function isTSEnumMember(node2, opts) {
  10789. if (!node2)
  10790. return false;
  10791. const nodeType = node2.type;
  10792. if (nodeType === "TSEnumMember") {
  10793. if (typeof opts === "undefined") {
  10794. return true;
  10795. } else {
  10796. return (0, _shallowEqual.default)(node2, opts);
  10797. }
  10798. }
  10799. return false;
  10800. }
  10801. function isTSModuleDeclaration(node2, opts) {
  10802. if (!node2)
  10803. return false;
  10804. const nodeType = node2.type;
  10805. if (nodeType === "TSModuleDeclaration") {
  10806. if (typeof opts === "undefined") {
  10807. return true;
  10808. } else {
  10809. return (0, _shallowEqual.default)(node2, opts);
  10810. }
  10811. }
  10812. return false;
  10813. }
  10814. function isTSModuleBlock(node2, opts) {
  10815. if (!node2)
  10816. return false;
  10817. const nodeType = node2.type;
  10818. if (nodeType === "TSModuleBlock") {
  10819. if (typeof opts === "undefined") {
  10820. return true;
  10821. } else {
  10822. return (0, _shallowEqual.default)(node2, opts);
  10823. }
  10824. }
  10825. return false;
  10826. }
  10827. function isTSImportType(node2, opts) {
  10828. if (!node2)
  10829. return false;
  10830. const nodeType = node2.type;
  10831. if (nodeType === "TSImportType") {
  10832. if (typeof opts === "undefined") {
  10833. return true;
  10834. } else {
  10835. return (0, _shallowEqual.default)(node2, opts);
  10836. }
  10837. }
  10838. return false;
  10839. }
  10840. function isTSImportEqualsDeclaration(node2, opts) {
  10841. if (!node2)
  10842. return false;
  10843. const nodeType = node2.type;
  10844. if (nodeType === "TSImportEqualsDeclaration") {
  10845. if (typeof opts === "undefined") {
  10846. return true;
  10847. } else {
  10848. return (0, _shallowEqual.default)(node2, opts);
  10849. }
  10850. }
  10851. return false;
  10852. }
  10853. function isTSExternalModuleReference(node2, opts) {
  10854. if (!node2)
  10855. return false;
  10856. const nodeType = node2.type;
  10857. if (nodeType === "TSExternalModuleReference") {
  10858. if (typeof opts === "undefined") {
  10859. return true;
  10860. } else {
  10861. return (0, _shallowEqual.default)(node2, opts);
  10862. }
  10863. }
  10864. return false;
  10865. }
  10866. function isTSNonNullExpression(node2, opts) {
  10867. if (!node2)
  10868. return false;
  10869. const nodeType = node2.type;
  10870. if (nodeType === "TSNonNullExpression") {
  10871. if (typeof opts === "undefined") {
  10872. return true;
  10873. } else {
  10874. return (0, _shallowEqual.default)(node2, opts);
  10875. }
  10876. }
  10877. return false;
  10878. }
  10879. function isTSExportAssignment(node2, opts) {
  10880. if (!node2)
  10881. return false;
  10882. const nodeType = node2.type;
  10883. if (nodeType === "TSExportAssignment") {
  10884. if (typeof opts === "undefined") {
  10885. return true;
  10886. } else {
  10887. return (0, _shallowEqual.default)(node2, opts);
  10888. }
  10889. }
  10890. return false;
  10891. }
  10892. function isTSNamespaceExportDeclaration(node2, opts) {
  10893. if (!node2)
  10894. return false;
  10895. const nodeType = node2.type;
  10896. if (nodeType === "TSNamespaceExportDeclaration") {
  10897. if (typeof opts === "undefined") {
  10898. return true;
  10899. } else {
  10900. return (0, _shallowEqual.default)(node2, opts);
  10901. }
  10902. }
  10903. return false;
  10904. }
  10905. function isTSTypeAnnotation(node2, opts) {
  10906. if (!node2)
  10907. return false;
  10908. const nodeType = node2.type;
  10909. if (nodeType === "TSTypeAnnotation") {
  10910. if (typeof opts === "undefined") {
  10911. return true;
  10912. } else {
  10913. return (0, _shallowEqual.default)(node2, opts);
  10914. }
  10915. }
  10916. return false;
  10917. }
  10918. function isTSTypeParameterInstantiation(node2, opts) {
  10919. if (!node2)
  10920. return false;
  10921. const nodeType = node2.type;
  10922. if (nodeType === "TSTypeParameterInstantiation") {
  10923. if (typeof opts === "undefined") {
  10924. return true;
  10925. } else {
  10926. return (0, _shallowEqual.default)(node2, opts);
  10927. }
  10928. }
  10929. return false;
  10930. }
  10931. function isTSTypeParameterDeclaration(node2, opts) {
  10932. if (!node2)
  10933. return false;
  10934. const nodeType = node2.type;
  10935. if (nodeType === "TSTypeParameterDeclaration") {
  10936. if (typeof opts === "undefined") {
  10937. return true;
  10938. } else {
  10939. return (0, _shallowEqual.default)(node2, opts);
  10940. }
  10941. }
  10942. return false;
  10943. }
  10944. function isTSTypeParameter(node2, opts) {
  10945. if (!node2)
  10946. return false;
  10947. const nodeType = node2.type;
  10948. if (nodeType === "TSTypeParameter") {
  10949. if (typeof opts === "undefined") {
  10950. return true;
  10951. } else {
  10952. return (0, _shallowEqual.default)(node2, opts);
  10953. }
  10954. }
  10955. return false;
  10956. }
  10957. function isStandardized(node2, opts) {
  10958. if (!node2)
  10959. return false;
  10960. const nodeType = node2.type;
  10961. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "InterpreterDirective" === nodeType || "Directive" === nodeType || "DirectiveLiteral" === nodeType || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "CallExpression" === nodeType || "CatchClause" === nodeType || "ConditionalExpression" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "File" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "Program" === nodeType || "ObjectExpression" === nodeType || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "RestElement" === nodeType || "ReturnStatement" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "SwitchCase" === nodeType || "SwitchStatement" === nodeType || "ThisExpression" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "VariableDeclaration" === nodeType || "VariableDeclarator" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassBody" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ExportSpecifier" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "MetaProperty" === nodeType || "ClassMethod" === nodeType || "ObjectPattern" === nodeType || "SpreadElement" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateElement" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "ExportNamespaceSpecifier" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType || "StaticBlock" === nodeType || nodeType === "Placeholder" && ("Identifier" === node2.expectedNode || "StringLiteral" === node2.expectedNode || "BlockStatement" === node2.expectedNode || "ClassBody" === node2.expectedNode)) {
  10962. if (typeof opts === "undefined") {
  10963. return true;
  10964. } else {
  10965. return (0, _shallowEqual.default)(node2, opts);
  10966. }
  10967. }
  10968. return false;
  10969. }
  10970. function isExpression(node2, opts) {
  10971. if (!node2)
  10972. return false;
  10973. const nodeType = node2.type;
  10974. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TopicReference" === nodeType || "PipelineTopicExpression" === nodeType || "PipelineBareFunction" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "TSInstantiationExpression" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node2.expectedNode || "Identifier" === node2.expectedNode || "StringLiteral" === node2.expectedNode)) {
  10975. if (typeof opts === "undefined") {
  10976. return true;
  10977. } else {
  10978. return (0, _shallowEqual.default)(node2, opts);
  10979. }
  10980. }
  10981. return false;
  10982. }
  10983. function isBinary(node2, opts) {
  10984. if (!node2)
  10985. return false;
  10986. const nodeType = node2.type;
  10987. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  10988. if (typeof opts === "undefined") {
  10989. return true;
  10990. } else {
  10991. return (0, _shallowEqual.default)(node2, opts);
  10992. }
  10993. }
  10994. return false;
  10995. }
  10996. function isScopable(node2, opts) {
  10997. if (!node2)
  10998. return false;
  10999. const nodeType = node2.type;
  11000. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node2.expectedNode) {
  11001. if (typeof opts === "undefined") {
  11002. return true;
  11003. } else {
  11004. return (0, _shallowEqual.default)(node2, opts);
  11005. }
  11006. }
  11007. return false;
  11008. }
  11009. function isBlockParent(node2, opts) {
  11010. if (!node2)
  11011. return false;
  11012. const nodeType = node2.type;
  11013. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node2.expectedNode) {
  11014. if (typeof opts === "undefined") {
  11015. return true;
  11016. } else {
  11017. return (0, _shallowEqual.default)(node2, opts);
  11018. }
  11019. }
  11020. return false;
  11021. }
  11022. function isBlock(node2, opts) {
  11023. if (!node2)
  11024. return false;
  11025. const nodeType = node2.type;
  11026. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node2.expectedNode) {
  11027. if (typeof opts === "undefined") {
  11028. return true;
  11029. } else {
  11030. return (0, _shallowEqual.default)(node2, opts);
  11031. }
  11032. }
  11033. return false;
  11034. }
  11035. function isStatement(node2, opts) {
  11036. if (!node2)
  11037. return false;
  11038. const nodeType = node2.type;
  11039. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node2.expectedNode || "Declaration" === node2.expectedNode || "BlockStatement" === node2.expectedNode)) {
  11040. if (typeof opts === "undefined") {
  11041. return true;
  11042. } else {
  11043. return (0, _shallowEqual.default)(node2, opts);
  11044. }
  11045. }
  11046. return false;
  11047. }
  11048. function isTerminatorless(node2, opts) {
  11049. if (!node2)
  11050. return false;
  11051. const nodeType = node2.type;
  11052. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  11053. if (typeof opts === "undefined") {
  11054. return true;
  11055. } else {
  11056. return (0, _shallowEqual.default)(node2, opts);
  11057. }
  11058. }
  11059. return false;
  11060. }
  11061. function isCompletionStatement(node2, opts) {
  11062. if (!node2)
  11063. return false;
  11064. const nodeType = node2.type;
  11065. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  11066. if (typeof opts === "undefined") {
  11067. return true;
  11068. } else {
  11069. return (0, _shallowEqual.default)(node2, opts);
  11070. }
  11071. }
  11072. return false;
  11073. }
  11074. function isConditional(node2, opts) {
  11075. if (!node2)
  11076. return false;
  11077. const nodeType = node2.type;
  11078. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  11079. if (typeof opts === "undefined") {
  11080. return true;
  11081. } else {
  11082. return (0, _shallowEqual.default)(node2, opts);
  11083. }
  11084. }
  11085. return false;
  11086. }
  11087. function isLoop(node2, opts) {
  11088. if (!node2)
  11089. return false;
  11090. const nodeType = node2.type;
  11091. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  11092. if (typeof opts === "undefined") {
  11093. return true;
  11094. } else {
  11095. return (0, _shallowEqual.default)(node2, opts);
  11096. }
  11097. }
  11098. return false;
  11099. }
  11100. function isWhile(node2, opts) {
  11101. if (!node2)
  11102. return false;
  11103. const nodeType = node2.type;
  11104. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  11105. if (typeof opts === "undefined") {
  11106. return true;
  11107. } else {
  11108. return (0, _shallowEqual.default)(node2, opts);
  11109. }
  11110. }
  11111. return false;
  11112. }
  11113. function isExpressionWrapper(node2, opts) {
  11114. if (!node2)
  11115. return false;
  11116. const nodeType = node2.type;
  11117. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  11118. if (typeof opts === "undefined") {
  11119. return true;
  11120. } else {
  11121. return (0, _shallowEqual.default)(node2, opts);
  11122. }
  11123. }
  11124. return false;
  11125. }
  11126. function isFor(node2, opts) {
  11127. if (!node2)
  11128. return false;
  11129. const nodeType = node2.type;
  11130. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  11131. if (typeof opts === "undefined") {
  11132. return true;
  11133. } else {
  11134. return (0, _shallowEqual.default)(node2, opts);
  11135. }
  11136. }
  11137. return false;
  11138. }
  11139. function isForXStatement(node2, opts) {
  11140. if (!node2)
  11141. return false;
  11142. const nodeType = node2.type;
  11143. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  11144. if (typeof opts === "undefined") {
  11145. return true;
  11146. } else {
  11147. return (0, _shallowEqual.default)(node2, opts);
  11148. }
  11149. }
  11150. return false;
  11151. }
  11152. function isFunction(node2, opts) {
  11153. if (!node2)
  11154. return false;
  11155. const nodeType = node2.type;
  11156. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  11157. if (typeof opts === "undefined") {
  11158. return true;
  11159. } else {
  11160. return (0, _shallowEqual.default)(node2, opts);
  11161. }
  11162. }
  11163. return false;
  11164. }
  11165. function isFunctionParent(node2, opts) {
  11166. if (!node2)
  11167. return false;
  11168. const nodeType = node2.type;
  11169. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType) {
  11170. if (typeof opts === "undefined") {
  11171. return true;
  11172. } else {
  11173. return (0, _shallowEqual.default)(node2, opts);
  11174. }
  11175. }
  11176. return false;
  11177. }
  11178. function isPureish(node2, opts) {
  11179. if (!node2)
  11180. return false;
  11181. const nodeType = node2.type;
  11182. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node2.expectedNode) {
  11183. if (typeof opts === "undefined") {
  11184. return true;
  11185. } else {
  11186. return (0, _shallowEqual.default)(node2, opts);
  11187. }
  11188. }
  11189. return false;
  11190. }
  11191. function isDeclaration2(node2, opts) {
  11192. if (!node2)
  11193. return false;
  11194. const nodeType = node2.type;
  11195. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node2.expectedNode) {
  11196. if (typeof opts === "undefined") {
  11197. return true;
  11198. } else {
  11199. return (0, _shallowEqual.default)(node2, opts);
  11200. }
  11201. }
  11202. return false;
  11203. }
  11204. function isPatternLike(node2, opts) {
  11205. if (!node2)
  11206. return false;
  11207. const nodeType = node2.type;
  11208. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Pattern" === node2.expectedNode || "Identifier" === node2.expectedNode)) {
  11209. if (typeof opts === "undefined") {
  11210. return true;
  11211. } else {
  11212. return (0, _shallowEqual.default)(node2, opts);
  11213. }
  11214. }
  11215. return false;
  11216. }
  11217. function isLVal(node2, opts) {
  11218. if (!node2)
  11219. return false;
  11220. const nodeType = node2.type;
  11221. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Pattern" === node2.expectedNode || "Identifier" === node2.expectedNode)) {
  11222. if (typeof opts === "undefined") {
  11223. return true;
  11224. } else {
  11225. return (0, _shallowEqual.default)(node2, opts);
  11226. }
  11227. }
  11228. return false;
  11229. }
  11230. function isTSEntityName(node2, opts) {
  11231. if (!node2)
  11232. return false;
  11233. const nodeType = node2.type;
  11234. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node2.expectedNode) {
  11235. if (typeof opts === "undefined") {
  11236. return true;
  11237. } else {
  11238. return (0, _shallowEqual.default)(node2, opts);
  11239. }
  11240. }
  11241. return false;
  11242. }
  11243. function isLiteral(node2, opts) {
  11244. if (!node2)
  11245. return false;
  11246. const nodeType = node2.type;
  11247. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node2.expectedNode) {
  11248. if (typeof opts === "undefined") {
  11249. return true;
  11250. } else {
  11251. return (0, _shallowEqual.default)(node2, opts);
  11252. }
  11253. }
  11254. return false;
  11255. }
  11256. function isImmutable(node2, opts) {
  11257. if (!node2)
  11258. return false;
  11259. const nodeType = node2.type;
  11260. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node2.expectedNode) {
  11261. if (typeof opts === "undefined") {
  11262. return true;
  11263. } else {
  11264. return (0, _shallowEqual.default)(node2, opts);
  11265. }
  11266. }
  11267. return false;
  11268. }
  11269. function isUserWhitespacable(node2, opts) {
  11270. if (!node2)
  11271. return false;
  11272. const nodeType = node2.type;
  11273. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  11274. if (typeof opts === "undefined") {
  11275. return true;
  11276. } else {
  11277. return (0, _shallowEqual.default)(node2, opts);
  11278. }
  11279. }
  11280. return false;
  11281. }
  11282. function isMethod(node2, opts) {
  11283. if (!node2)
  11284. return false;
  11285. const nodeType = node2.type;
  11286. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  11287. if (typeof opts === "undefined") {
  11288. return true;
  11289. } else {
  11290. return (0, _shallowEqual.default)(node2, opts);
  11291. }
  11292. }
  11293. return false;
  11294. }
  11295. function isObjectMember(node2, opts) {
  11296. if (!node2)
  11297. return false;
  11298. const nodeType = node2.type;
  11299. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  11300. if (typeof opts === "undefined") {
  11301. return true;
  11302. } else {
  11303. return (0, _shallowEqual.default)(node2, opts);
  11304. }
  11305. }
  11306. return false;
  11307. }
  11308. function isProperty(node2, opts) {
  11309. if (!node2)
  11310. return false;
  11311. const nodeType = node2.type;
  11312. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  11313. if (typeof opts === "undefined") {
  11314. return true;
  11315. } else {
  11316. return (0, _shallowEqual.default)(node2, opts);
  11317. }
  11318. }
  11319. return false;
  11320. }
  11321. function isUnaryLike(node2, opts) {
  11322. if (!node2)
  11323. return false;
  11324. const nodeType = node2.type;
  11325. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  11326. if (typeof opts === "undefined") {
  11327. return true;
  11328. } else {
  11329. return (0, _shallowEqual.default)(node2, opts);
  11330. }
  11331. }
  11332. return false;
  11333. }
  11334. function isPattern(node2, opts) {
  11335. if (!node2)
  11336. return false;
  11337. const nodeType = node2.type;
  11338. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node2.expectedNode) {
  11339. if (typeof opts === "undefined") {
  11340. return true;
  11341. } else {
  11342. return (0, _shallowEqual.default)(node2, opts);
  11343. }
  11344. }
  11345. return false;
  11346. }
  11347. function isClass(node2, opts) {
  11348. if (!node2)
  11349. return false;
  11350. const nodeType = node2.type;
  11351. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  11352. if (typeof opts === "undefined") {
  11353. return true;
  11354. } else {
  11355. return (0, _shallowEqual.default)(node2, opts);
  11356. }
  11357. }
  11358. return false;
  11359. }
  11360. function isImportOrExportDeclaration(node2, opts) {
  11361. if (!node2)
  11362. return false;
  11363. const nodeType = node2.type;
  11364. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  11365. if (typeof opts === "undefined") {
  11366. return true;
  11367. } else {
  11368. return (0, _shallowEqual.default)(node2, opts);
  11369. }
  11370. }
  11371. return false;
  11372. }
  11373. function isExportDeclaration(node2, opts) {
  11374. if (!node2)
  11375. return false;
  11376. const nodeType = node2.type;
  11377. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  11378. if (typeof opts === "undefined") {
  11379. return true;
  11380. } else {
  11381. return (0, _shallowEqual.default)(node2, opts);
  11382. }
  11383. }
  11384. return false;
  11385. }
  11386. function isModuleSpecifier(node2, opts) {
  11387. if (!node2)
  11388. return false;
  11389. const nodeType = node2.type;
  11390. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  11391. if (typeof opts === "undefined") {
  11392. return true;
  11393. } else {
  11394. return (0, _shallowEqual.default)(node2, opts);
  11395. }
  11396. }
  11397. return false;
  11398. }
  11399. function isAccessor(node2, opts) {
  11400. if (!node2)
  11401. return false;
  11402. const nodeType = node2.type;
  11403. if ("ClassAccessorProperty" === nodeType) {
  11404. if (typeof opts === "undefined") {
  11405. return true;
  11406. } else {
  11407. return (0, _shallowEqual.default)(node2, opts);
  11408. }
  11409. }
  11410. return false;
  11411. }
  11412. function isPrivate(node2, opts) {
  11413. if (!node2)
  11414. return false;
  11415. const nodeType = node2.type;
  11416. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  11417. if (typeof opts === "undefined") {
  11418. return true;
  11419. } else {
  11420. return (0, _shallowEqual.default)(node2, opts);
  11421. }
  11422. }
  11423. return false;
  11424. }
  11425. function isFlow(node2, opts) {
  11426. if (!node2)
  11427. return false;
  11428. const nodeType = node2.type;
  11429. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "EnumDeclaration" === nodeType || "EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType || "EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  11430. if (typeof opts === "undefined") {
  11431. return true;
  11432. } else {
  11433. return (0, _shallowEqual.default)(node2, opts);
  11434. }
  11435. }
  11436. return false;
  11437. }
  11438. function isFlowType(node2, opts) {
  11439. if (!node2)
  11440. return false;
  11441. const nodeType = node2.type;
  11442. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  11443. if (typeof opts === "undefined") {
  11444. return true;
  11445. } else {
  11446. return (0, _shallowEqual.default)(node2, opts);
  11447. }
  11448. }
  11449. return false;
  11450. }
  11451. function isFlowBaseAnnotation(node2, opts) {
  11452. if (!node2)
  11453. return false;
  11454. const nodeType = node2.type;
  11455. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  11456. if (typeof opts === "undefined") {
  11457. return true;
  11458. } else {
  11459. return (0, _shallowEqual.default)(node2, opts);
  11460. }
  11461. }
  11462. return false;
  11463. }
  11464. function isFlowDeclaration(node2, opts) {
  11465. if (!node2)
  11466. return false;
  11467. const nodeType = node2.type;
  11468. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  11469. if (typeof opts === "undefined") {
  11470. return true;
  11471. } else {
  11472. return (0, _shallowEqual.default)(node2, opts);
  11473. }
  11474. }
  11475. return false;
  11476. }
  11477. function isFlowPredicate(node2, opts) {
  11478. if (!node2)
  11479. return false;
  11480. const nodeType = node2.type;
  11481. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  11482. if (typeof opts === "undefined") {
  11483. return true;
  11484. } else {
  11485. return (0, _shallowEqual.default)(node2, opts);
  11486. }
  11487. }
  11488. return false;
  11489. }
  11490. function isEnumBody(node2, opts) {
  11491. if (!node2)
  11492. return false;
  11493. const nodeType = node2.type;
  11494. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  11495. if (typeof opts === "undefined") {
  11496. return true;
  11497. } else {
  11498. return (0, _shallowEqual.default)(node2, opts);
  11499. }
  11500. }
  11501. return false;
  11502. }
  11503. function isEnumMember(node2, opts) {
  11504. if (!node2)
  11505. return false;
  11506. const nodeType = node2.type;
  11507. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  11508. if (typeof opts === "undefined") {
  11509. return true;
  11510. } else {
  11511. return (0, _shallowEqual.default)(node2, opts);
  11512. }
  11513. }
  11514. return false;
  11515. }
  11516. function isJSX(node2, opts) {
  11517. if (!node2)
  11518. return false;
  11519. const nodeType = node2.type;
  11520. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  11521. if (typeof opts === "undefined") {
  11522. return true;
  11523. } else {
  11524. return (0, _shallowEqual.default)(node2, opts);
  11525. }
  11526. }
  11527. return false;
  11528. }
  11529. function isMiscellaneous(node2, opts) {
  11530. if (!node2)
  11531. return false;
  11532. const nodeType = node2.type;
  11533. if ("Noop" === nodeType || "Placeholder" === nodeType || "V8IntrinsicIdentifier" === nodeType) {
  11534. if (typeof opts === "undefined") {
  11535. return true;
  11536. } else {
  11537. return (0, _shallowEqual.default)(node2, opts);
  11538. }
  11539. }
  11540. return false;
  11541. }
  11542. function isTypeScript(node2, opts) {
  11543. if (!node2)
  11544. return false;
  11545. const nodeType = node2.type;
  11546. if ("TSParameterProperty" === nodeType || "TSDeclareFunction" === nodeType || "TSDeclareMethod" === nodeType || "TSQualifiedName" === nodeType || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSNamedTupleMember" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSInterfaceBody" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSInstantiationExpression" === nodeType || "TSAsExpression" === nodeType || "TSSatisfiesExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSEnumDeclaration" === nodeType || "TSEnumMember" === nodeType || "TSModuleDeclaration" === nodeType || "TSModuleBlock" === nodeType || "TSImportType" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExternalModuleReference" === nodeType || "TSNonNullExpression" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || "TSTypeAnnotation" === nodeType || "TSTypeParameterInstantiation" === nodeType || "TSTypeParameterDeclaration" === nodeType || "TSTypeParameter" === nodeType) {
  11547. if (typeof opts === "undefined") {
  11548. return true;
  11549. } else {
  11550. return (0, _shallowEqual.default)(node2, opts);
  11551. }
  11552. }
  11553. return false;
  11554. }
  11555. function isTSTypeElement(node2, opts) {
  11556. if (!node2)
  11557. return false;
  11558. const nodeType = node2.type;
  11559. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  11560. if (typeof opts === "undefined") {
  11561. return true;
  11562. } else {
  11563. return (0, _shallowEqual.default)(node2, opts);
  11564. }
  11565. }
  11566. return false;
  11567. }
  11568. function isTSType(node2, opts) {
  11569. if (!node2)
  11570. return false;
  11571. const nodeType = node2.type;
  11572. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  11573. if (typeof opts === "undefined") {
  11574. return true;
  11575. } else {
  11576. return (0, _shallowEqual.default)(node2, opts);
  11577. }
  11578. }
  11579. return false;
  11580. }
  11581. function isTSBaseType(node2, opts) {
  11582. if (!node2)
  11583. return false;
  11584. const nodeType = node2.type;
  11585. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  11586. if (typeof opts === "undefined") {
  11587. return true;
  11588. } else {
  11589. return (0, _shallowEqual.default)(node2, opts);
  11590. }
  11591. }
  11592. return false;
  11593. }
  11594. function isNumberLiteral(node2, opts) {
  11595. (0, _deprecationWarning.default)("isNumberLiteral", "isNumericLiteral");
  11596. if (!node2)
  11597. return false;
  11598. const nodeType = node2.type;
  11599. if (nodeType === "NumberLiteral") {
  11600. if (typeof opts === "undefined") {
  11601. return true;
  11602. } else {
  11603. return (0, _shallowEqual.default)(node2, opts);
  11604. }
  11605. }
  11606. return false;
  11607. }
  11608. function isRegexLiteral(node2, opts) {
  11609. (0, _deprecationWarning.default)("isRegexLiteral", "isRegExpLiteral");
  11610. if (!node2)
  11611. return false;
  11612. const nodeType = node2.type;
  11613. if (nodeType === "RegexLiteral") {
  11614. if (typeof opts === "undefined") {
  11615. return true;
  11616. } else {
  11617. return (0, _shallowEqual.default)(node2, opts);
  11618. }
  11619. }
  11620. return false;
  11621. }
  11622. function isRestProperty(node2, opts) {
  11623. (0, _deprecationWarning.default)("isRestProperty", "isRestElement");
  11624. if (!node2)
  11625. return false;
  11626. const nodeType = node2.type;
  11627. if (nodeType === "RestProperty") {
  11628. if (typeof opts === "undefined") {
  11629. return true;
  11630. } else {
  11631. return (0, _shallowEqual.default)(node2, opts);
  11632. }
  11633. }
  11634. return false;
  11635. }
  11636. function isSpreadProperty(node2, opts) {
  11637. (0, _deprecationWarning.default)("isSpreadProperty", "isSpreadElement");
  11638. if (!node2)
  11639. return false;
  11640. const nodeType = node2.type;
  11641. if (nodeType === "SpreadProperty") {
  11642. if (typeof opts === "undefined") {
  11643. return true;
  11644. } else {
  11645. return (0, _shallowEqual.default)(node2, opts);
  11646. }
  11647. }
  11648. return false;
  11649. }
  11650. function isModuleDeclaration(node2, opts) {
  11651. (0, _deprecationWarning.default)("isModuleDeclaration", "isImportOrExportDeclaration");
  11652. return isImportOrExportDeclaration(node2, opts);
  11653. }
  11654. }
  11655. });
  11656. // node_modules/@babel/types/lib/validators/matchesPattern.js
  11657. var require_matchesPattern = __commonJS({
  11658. "node_modules/@babel/types/lib/validators/matchesPattern.js"(exports) {
  11659. "use strict";
  11660. Object.defineProperty(exports, "__esModule", {
  11661. value: true
  11662. });
  11663. exports.default = matchesPattern;
  11664. var _generated = require_generated();
  11665. function matchesPattern(member, match, allowPartial) {
  11666. if (!(0, _generated.isMemberExpression)(member))
  11667. return false;
  11668. const parts = Array.isArray(match) ? match : match.split(".");
  11669. const nodes = [];
  11670. let node2;
  11671. for (node2 = member; (0, _generated.isMemberExpression)(node2); node2 = node2.object) {
  11672. nodes.push(node2.property);
  11673. }
  11674. nodes.push(node2);
  11675. if (nodes.length < parts.length)
  11676. return false;
  11677. if (!allowPartial && nodes.length > parts.length)
  11678. return false;
  11679. for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  11680. const node3 = nodes[j];
  11681. let value2;
  11682. if ((0, _generated.isIdentifier)(node3)) {
  11683. value2 = node3.name;
  11684. } else if ((0, _generated.isStringLiteral)(node3)) {
  11685. value2 = node3.value;
  11686. } else if ((0, _generated.isThisExpression)(node3)) {
  11687. value2 = "this";
  11688. } else {
  11689. return false;
  11690. }
  11691. if (parts[i] !== value2)
  11692. return false;
  11693. }
  11694. return true;
  11695. }
  11696. }
  11697. });
  11698. // node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
  11699. var require_buildMatchMemberExpression = __commonJS({
  11700. "node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports) {
  11701. "use strict";
  11702. Object.defineProperty(exports, "__esModule", {
  11703. value: true
  11704. });
  11705. exports.default = buildMatchMemberExpression;
  11706. var _matchesPattern = require_matchesPattern();
  11707. function buildMatchMemberExpression(match, allowPartial) {
  11708. const parts = match.split(".");
  11709. return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
  11710. }
  11711. }
  11712. });
  11713. // node_modules/@babel/types/lib/validators/react/isReactComponent.js
  11714. var require_isReactComponent = __commonJS({
  11715. "node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports) {
  11716. "use strict";
  11717. Object.defineProperty(exports, "__esModule", {
  11718. value: true
  11719. });
  11720. exports.default = void 0;
  11721. var _buildMatchMemberExpression = require_buildMatchMemberExpression();
  11722. var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
  11723. var _default = isReactComponent;
  11724. exports.default = _default;
  11725. }
  11726. });
  11727. // node_modules/@babel/types/lib/validators/react/isCompatTag.js
  11728. var require_isCompatTag = __commonJS({
  11729. "node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports) {
  11730. "use strict";
  11731. Object.defineProperty(exports, "__esModule", {
  11732. value: true
  11733. });
  11734. exports.default = isCompatTag;
  11735. function isCompatTag(tagName) {
  11736. return !!tagName && /^[a-z]/.test(tagName);
  11737. }
  11738. }
  11739. });
  11740. // node_modules/to-fast-properties/index.js
  11741. var require_to_fast_properties = __commonJS({
  11742. "node_modules/to-fast-properties/index.js"(exports, module) {
  11743. "use strict";
  11744. var fastProto = null;
  11745. function FastObject(o) {
  11746. if (fastProto !== null && typeof fastProto.property) {
  11747. const result = fastProto;
  11748. fastProto = FastObject.prototype = null;
  11749. return result;
  11750. }
  11751. fastProto = FastObject.prototype = o == null ? /* @__PURE__ */ Object.create(null) : o;
  11752. return new FastObject();
  11753. }
  11754. FastObject();
  11755. module.exports = function toFastproperties(o) {
  11756. return FastObject(o);
  11757. };
  11758. }
  11759. });
  11760. // node_modules/@babel/types/lib/validators/isType.js
  11761. var require_isType = __commonJS({
  11762. "node_modules/@babel/types/lib/validators/isType.js"(exports) {
  11763. "use strict";
  11764. Object.defineProperty(exports, "__esModule", {
  11765. value: true
  11766. });
  11767. exports.default = isType;
  11768. var _definitions = require_definitions();
  11769. function isType(nodeType, targetType) {
  11770. if (nodeType === targetType)
  11771. return true;
  11772. if (_definitions.ALIAS_KEYS[targetType])
  11773. return false;
  11774. const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
  11775. if (aliases) {
  11776. if (aliases[0] === nodeType)
  11777. return true;
  11778. for (const alias of aliases) {
  11779. if (nodeType === alias)
  11780. return true;
  11781. }
  11782. }
  11783. return false;
  11784. }
  11785. }
  11786. });
  11787. // node_modules/@babel/types/lib/validators/isPlaceholderType.js
  11788. var require_isPlaceholderType = __commonJS({
  11789. "node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports) {
  11790. "use strict";
  11791. Object.defineProperty(exports, "__esModule", {
  11792. value: true
  11793. });
  11794. exports.default = isPlaceholderType;
  11795. var _definitions = require_definitions();
  11796. function isPlaceholderType(placeholderType, targetType) {
  11797. if (placeholderType === targetType)
  11798. return true;
  11799. const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
  11800. if (aliases) {
  11801. for (const alias of aliases) {
  11802. if (targetType === alias)
  11803. return true;
  11804. }
  11805. }
  11806. return false;
  11807. }
  11808. }
  11809. });
  11810. // node_modules/@babel/types/lib/validators/is.js
  11811. var require_is = __commonJS({
  11812. "node_modules/@babel/types/lib/validators/is.js"(exports) {
  11813. "use strict";
  11814. Object.defineProperty(exports, "__esModule", {
  11815. value: true
  11816. });
  11817. exports.default = is2;
  11818. var _shallowEqual = require_shallowEqual();
  11819. var _isType = require_isType();
  11820. var _isPlaceholderType = require_isPlaceholderType();
  11821. var _definitions = require_definitions();
  11822. function is2(type, node2, opts) {
  11823. if (!node2)
  11824. return false;
  11825. const matches = (0, _isType.default)(node2.type, type);
  11826. if (!matches) {
  11827. if (!opts && node2.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
  11828. return (0, _isPlaceholderType.default)(node2.expectedNode, type);
  11829. }
  11830. return false;
  11831. }
  11832. if (typeof opts === "undefined") {
  11833. return true;
  11834. } else {
  11835. return (0, _shallowEqual.default)(node2, opts);
  11836. }
  11837. }
  11838. }
  11839. });
  11840. // node_modules/@babel/helper-validator-identifier/lib/identifier.js
  11841. var require_identifier = __commonJS({
  11842. "node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
  11843. "use strict";
  11844. Object.defineProperty(exports, "__esModule", {
  11845. value: true
  11846. });
  11847. exports.isIdentifierChar = isIdentifierChar3;
  11848. exports.isIdentifierName = isIdentifierName;
  11849. exports.isIdentifierStart = isIdentifierStart3;
  11850. var nonASCIIidentifierStartChars3 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  11851. var nonASCIIidentifierChars3 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  11852. var nonASCIIidentifierStart3 = new RegExp("[" + nonASCIIidentifierStartChars3 + "]");
  11853. var nonASCIIidentifier3 = new RegExp("[" + nonASCIIidentifierStartChars3 + nonASCIIidentifierChars3 + "]");
  11854. nonASCIIidentifierStartChars3 = nonASCIIidentifierChars3 = null;
  11855. var astralIdentifierStartCodes3 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191];
  11856. var astralIdentifierCodes3 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  11857. function isInAstralSet3(code2, set) {
  11858. let pos2 = 65536;
  11859. for (let i = 0, length = set.length; i < length; i += 2) {
  11860. pos2 += set[i];
  11861. if (pos2 > code2)
  11862. return false;
  11863. pos2 += set[i + 1];
  11864. if (pos2 >= code2)
  11865. return true;
  11866. }
  11867. return false;
  11868. }
  11869. function isIdentifierStart3(code2) {
  11870. if (code2 < 65)
  11871. return code2 === 36;
  11872. if (code2 <= 90)
  11873. return true;
  11874. if (code2 < 97)
  11875. return code2 === 95;
  11876. if (code2 <= 122)
  11877. return true;
  11878. if (code2 <= 65535) {
  11879. return code2 >= 170 && nonASCIIidentifierStart3.test(String.fromCharCode(code2));
  11880. }
  11881. return isInAstralSet3(code2, astralIdentifierStartCodes3);
  11882. }
  11883. function isIdentifierChar3(code2) {
  11884. if (code2 < 48)
  11885. return code2 === 36;
  11886. if (code2 < 58)
  11887. return true;
  11888. if (code2 < 65)
  11889. return false;
  11890. if (code2 <= 90)
  11891. return true;
  11892. if (code2 < 97)
  11893. return code2 === 95;
  11894. if (code2 <= 122)
  11895. return true;
  11896. if (code2 <= 65535) {
  11897. return code2 >= 170 && nonASCIIidentifier3.test(String.fromCharCode(code2));
  11898. }
  11899. return isInAstralSet3(code2, astralIdentifierStartCodes3) || isInAstralSet3(code2, astralIdentifierCodes3);
  11900. }
  11901. function isIdentifierName(name2) {
  11902. let isFirst = true;
  11903. for (let i = 0; i < name2.length; i++) {
  11904. let cp = name2.charCodeAt(i);
  11905. if ((cp & 64512) === 55296 && i + 1 < name2.length) {
  11906. const trail = name2.charCodeAt(++i);
  11907. if ((trail & 64512) === 56320) {
  11908. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  11909. }
  11910. }
  11911. if (isFirst) {
  11912. isFirst = false;
  11913. if (!isIdentifierStart3(cp)) {
  11914. return false;
  11915. }
  11916. } else if (!isIdentifierChar3(cp)) {
  11917. return false;
  11918. }
  11919. }
  11920. return !isFirst;
  11921. }
  11922. }
  11923. });
  11924. // node_modules/@babel/helper-validator-identifier/lib/keyword.js
  11925. var require_keyword = __commonJS({
  11926. "node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
  11927. "use strict";
  11928. Object.defineProperty(exports, "__esModule", {
  11929. value: true
  11930. });
  11931. exports.isKeyword = isKeyword;
  11932. exports.isReservedWord = isReservedWord;
  11933. exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
  11934. exports.isStrictBindReservedWord = isStrictBindReservedWord;
  11935. exports.isStrictReservedWord = isStrictReservedWord;
  11936. var reservedWords3 = {
  11937. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  11938. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  11939. strictBind: ["eval", "arguments"]
  11940. };
  11941. var keywords3 = new Set(reservedWords3.keyword);
  11942. var reservedWordsStrictSet = new Set(reservedWords3.strict);
  11943. var reservedWordsStrictBindSet = new Set(reservedWords3.strictBind);
  11944. function isReservedWord(word, inModule) {
  11945. return inModule && word === "await" || word === "enum";
  11946. }
  11947. function isStrictReservedWord(word, inModule) {
  11948. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  11949. }
  11950. function isStrictBindOnlyReservedWord(word) {
  11951. return reservedWordsStrictBindSet.has(word);
  11952. }
  11953. function isStrictBindReservedWord(word, inModule) {
  11954. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  11955. }
  11956. function isKeyword(word) {
  11957. return keywords3.has(word);
  11958. }
  11959. }
  11960. });
  11961. // node_modules/@babel/helper-validator-identifier/lib/index.js
  11962. var require_lib = __commonJS({
  11963. "node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
  11964. "use strict";
  11965. Object.defineProperty(exports, "__esModule", {
  11966. value: true
  11967. });
  11968. Object.defineProperty(exports, "isIdentifierChar", {
  11969. enumerable: true,
  11970. get: function() {
  11971. return _identifier.isIdentifierChar;
  11972. }
  11973. });
  11974. Object.defineProperty(exports, "isIdentifierName", {
  11975. enumerable: true,
  11976. get: function() {
  11977. return _identifier.isIdentifierName;
  11978. }
  11979. });
  11980. Object.defineProperty(exports, "isIdentifierStart", {
  11981. enumerable: true,
  11982. get: function() {
  11983. return _identifier.isIdentifierStart;
  11984. }
  11985. });
  11986. Object.defineProperty(exports, "isKeyword", {
  11987. enumerable: true,
  11988. get: function() {
  11989. return _keyword.isKeyword;
  11990. }
  11991. });
  11992. Object.defineProperty(exports, "isReservedWord", {
  11993. enumerable: true,
  11994. get: function() {
  11995. return _keyword.isReservedWord;
  11996. }
  11997. });
  11998. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  11999. enumerable: true,
  12000. get: function() {
  12001. return _keyword.isStrictBindOnlyReservedWord;
  12002. }
  12003. });
  12004. Object.defineProperty(exports, "isStrictBindReservedWord", {
  12005. enumerable: true,
  12006. get: function() {
  12007. return _keyword.isStrictBindReservedWord;
  12008. }
  12009. });
  12010. Object.defineProperty(exports, "isStrictReservedWord", {
  12011. enumerable: true,
  12012. get: function() {
  12013. return _keyword.isStrictReservedWord;
  12014. }
  12015. });
  12016. var _identifier = require_identifier();
  12017. var _keyword = require_keyword();
  12018. }
  12019. });
  12020. // node_modules/@babel/types/lib/validators/isValidIdentifier.js
  12021. var require_isValidIdentifier = __commonJS({
  12022. "node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports) {
  12023. "use strict";
  12024. Object.defineProperty(exports, "__esModule", {
  12025. value: true
  12026. });
  12027. exports.default = isValidIdentifier;
  12028. var _helperValidatorIdentifier = require_lib();
  12029. function isValidIdentifier(name2, reserved = true) {
  12030. if (typeof name2 !== "string")
  12031. return false;
  12032. if (reserved) {
  12033. if ((0, _helperValidatorIdentifier.isKeyword)(name2) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name2, true)) {
  12034. return false;
  12035. }
  12036. }
  12037. return (0, _helperValidatorIdentifier.isIdentifierName)(name2);
  12038. }
  12039. }
  12040. });
  12041. // node_modules/@babel/helper-string-parser/lib/index.js
  12042. var require_lib2 = __commonJS({
  12043. "node_modules/@babel/helper-string-parser/lib/index.js"(exports) {
  12044. "use strict";
  12045. Object.defineProperty(exports, "__esModule", {
  12046. value: true
  12047. });
  12048. exports.readCodePoint = readCodePoint;
  12049. exports.readInt = readInt;
  12050. exports.readStringContents = readStringContents;
  12051. var _isDigit = function isDigit(code2) {
  12052. return code2 >= 48 && code2 <= 57;
  12053. };
  12054. var forbiddenNumericSeparatorSiblings = {
  12055. decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
  12056. hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
  12057. };
  12058. var isAllowedNumericSeparatorSibling = {
  12059. bin: (ch) => ch === 48 || ch === 49,
  12060. oct: (ch) => ch >= 48 && ch <= 55,
  12061. dec: (ch) => ch >= 48 && ch <= 57,
  12062. hex: (ch) => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
  12063. };
  12064. function readStringContents(type, input, pos2, lineStart, curLine, errors) {
  12065. const initialPos = pos2;
  12066. const initialLineStart = lineStart;
  12067. const initialCurLine = curLine;
  12068. let out = "";
  12069. let firstInvalidLoc = null;
  12070. let chunkStart = pos2;
  12071. const {
  12072. length
  12073. } = input;
  12074. for (; ; ) {
  12075. if (pos2 >= length) {
  12076. errors.unterminated(initialPos, initialLineStart, initialCurLine);
  12077. out += input.slice(chunkStart, pos2);
  12078. break;
  12079. }
  12080. const ch = input.charCodeAt(pos2);
  12081. if (isStringEnd(type, ch, input, pos2)) {
  12082. out += input.slice(chunkStart, pos2);
  12083. break;
  12084. }
  12085. if (ch === 92) {
  12086. out += input.slice(chunkStart, pos2);
  12087. const res = readEscapedChar(input, pos2, lineStart, curLine, type === "template", errors);
  12088. if (res.ch === null && !firstInvalidLoc) {
  12089. firstInvalidLoc = {
  12090. pos: pos2,
  12091. lineStart,
  12092. curLine
  12093. };
  12094. } else {
  12095. out += res.ch;
  12096. }
  12097. ({
  12098. pos: pos2,
  12099. lineStart,
  12100. curLine
  12101. } = res);
  12102. chunkStart = pos2;
  12103. } else if (ch === 8232 || ch === 8233) {
  12104. ++pos2;
  12105. ++curLine;
  12106. lineStart = pos2;
  12107. } else if (ch === 10 || ch === 13) {
  12108. if (type === "template") {
  12109. out += input.slice(chunkStart, pos2) + "\n";
  12110. ++pos2;
  12111. if (ch === 13 && input.charCodeAt(pos2) === 10) {
  12112. ++pos2;
  12113. }
  12114. ++curLine;
  12115. chunkStart = lineStart = pos2;
  12116. } else {
  12117. errors.unterminated(initialPos, initialLineStart, initialCurLine);
  12118. }
  12119. } else {
  12120. ++pos2;
  12121. }
  12122. }
  12123. return {
  12124. pos: pos2,
  12125. str: out,
  12126. firstInvalidLoc,
  12127. lineStart,
  12128. curLine,
  12129. containsInvalid: !!firstInvalidLoc
  12130. };
  12131. }
  12132. function isStringEnd(type, ch, input, pos2) {
  12133. if (type === "template") {
  12134. return ch === 96 || ch === 36 && input.charCodeAt(pos2 + 1) === 123;
  12135. }
  12136. return ch === (type === "double" ? 34 : 39);
  12137. }
  12138. function readEscapedChar(input, pos2, lineStart, curLine, inTemplate, errors) {
  12139. const throwOnInvalid = !inTemplate;
  12140. pos2++;
  12141. const res = (ch2) => ({
  12142. pos: pos2,
  12143. ch: ch2,
  12144. lineStart,
  12145. curLine
  12146. });
  12147. const ch = input.charCodeAt(pos2++);
  12148. switch (ch) {
  12149. case 110:
  12150. return res("\n");
  12151. case 114:
  12152. return res("\r");
  12153. case 120: {
  12154. let code2;
  12155. ({
  12156. code: code2,
  12157. pos: pos2
  12158. } = readHexChar(input, pos2, lineStart, curLine, 2, false, throwOnInvalid, errors));
  12159. return res(code2 === null ? null : String.fromCharCode(code2));
  12160. }
  12161. case 117: {
  12162. let code2;
  12163. ({
  12164. code: code2,
  12165. pos: pos2
  12166. } = readCodePoint(input, pos2, lineStart, curLine, throwOnInvalid, errors));
  12167. return res(code2 === null ? null : String.fromCodePoint(code2));
  12168. }
  12169. case 116:
  12170. return res(" ");
  12171. case 98:
  12172. return res("\b");
  12173. case 118:
  12174. return res("\v");
  12175. case 102:
  12176. return res("\f");
  12177. case 13:
  12178. if (input.charCodeAt(pos2) === 10) {
  12179. ++pos2;
  12180. }
  12181. case 10:
  12182. lineStart = pos2;
  12183. ++curLine;
  12184. case 8232:
  12185. case 8233:
  12186. return res("");
  12187. case 56:
  12188. case 57:
  12189. if (inTemplate) {
  12190. return res(null);
  12191. } else {
  12192. errors.strictNumericEscape(pos2 - 1, lineStart, curLine);
  12193. }
  12194. default:
  12195. if (ch >= 48 && ch <= 55) {
  12196. const startPos = pos2 - 1;
  12197. const match = input.slice(startPos, pos2 + 2).match(/^[0-7]+/);
  12198. let octalStr = match[0];
  12199. let octal = parseInt(octalStr, 8);
  12200. if (octal > 255) {
  12201. octalStr = octalStr.slice(0, -1);
  12202. octal = parseInt(octalStr, 8);
  12203. }
  12204. pos2 += octalStr.length - 1;
  12205. const next = input.charCodeAt(pos2);
  12206. if (octalStr !== "0" || next === 56 || next === 57) {
  12207. if (inTemplate) {
  12208. return res(null);
  12209. } else {
  12210. errors.strictNumericEscape(startPos, lineStart, curLine);
  12211. }
  12212. }
  12213. return res(String.fromCharCode(octal));
  12214. }
  12215. return res(String.fromCharCode(ch));
  12216. }
  12217. }
  12218. function readHexChar(input, pos2, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
  12219. const initialPos = pos2;
  12220. let n;
  12221. ({
  12222. n,
  12223. pos: pos2
  12224. } = readInt(input, pos2, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
  12225. if (n === null) {
  12226. if (throwOnInvalid) {
  12227. errors.invalidEscapeSequence(initialPos, lineStart, curLine);
  12228. } else {
  12229. pos2 = initialPos - 1;
  12230. }
  12231. }
  12232. return {
  12233. code: n,
  12234. pos: pos2
  12235. };
  12236. }
  12237. function readInt(input, pos2, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
  12238. const start3 = pos2;
  12239. const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  12240. const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
  12241. let invalid2 = false;
  12242. let total = 0;
  12243. for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  12244. const code2 = input.charCodeAt(pos2);
  12245. let val;
  12246. if (code2 === 95 && allowNumSeparator !== "bail") {
  12247. const prev = input.charCodeAt(pos2 - 1);
  12248. const next = input.charCodeAt(pos2 + 1);
  12249. if (!allowNumSeparator) {
  12250. if (bailOnError)
  12251. return {
  12252. n: null,
  12253. pos: pos2
  12254. };
  12255. errors.numericSeparatorInEscapeSequence(pos2, lineStart, curLine);
  12256. } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
  12257. if (bailOnError)
  12258. return {
  12259. n: null,
  12260. pos: pos2
  12261. };
  12262. errors.unexpectedNumericSeparator(pos2, lineStart, curLine);
  12263. }
  12264. ++pos2;
  12265. continue;
  12266. }
  12267. if (code2 >= 97) {
  12268. val = code2 - 97 + 10;
  12269. } else if (code2 >= 65) {
  12270. val = code2 - 65 + 10;
  12271. } else if (_isDigit(code2)) {
  12272. val = code2 - 48;
  12273. } else {
  12274. val = Infinity;
  12275. }
  12276. if (val >= radix) {
  12277. if (val <= 9 && bailOnError) {
  12278. return {
  12279. n: null,
  12280. pos: pos2
  12281. };
  12282. } else if (val <= 9 && errors.invalidDigit(pos2, lineStart, curLine, radix)) {
  12283. val = 0;
  12284. } else if (forceLen) {
  12285. val = 0;
  12286. invalid2 = true;
  12287. } else {
  12288. break;
  12289. }
  12290. }
  12291. ++pos2;
  12292. total = total * radix + val;
  12293. }
  12294. if (pos2 === start3 || len != null && pos2 - start3 !== len || invalid2) {
  12295. return {
  12296. n: null,
  12297. pos: pos2
  12298. };
  12299. }
  12300. return {
  12301. n: total,
  12302. pos: pos2
  12303. };
  12304. }
  12305. function readCodePoint(input, pos2, lineStart, curLine, throwOnInvalid, errors) {
  12306. const ch = input.charCodeAt(pos2);
  12307. let code2;
  12308. if (ch === 123) {
  12309. ++pos2;
  12310. ({
  12311. code: code2,
  12312. pos: pos2
  12313. } = readHexChar(input, pos2, lineStart, curLine, input.indexOf("}", pos2) - pos2, true, throwOnInvalid, errors));
  12314. ++pos2;
  12315. if (code2 !== null && code2 > 1114111) {
  12316. if (throwOnInvalid) {
  12317. errors.invalidCodePoint(pos2, lineStart, curLine);
  12318. } else {
  12319. return {
  12320. code: null,
  12321. pos: pos2
  12322. };
  12323. }
  12324. }
  12325. } else {
  12326. ({
  12327. code: code2,
  12328. pos: pos2
  12329. } = readHexChar(input, pos2, lineStart, curLine, 4, false, throwOnInvalid, errors));
  12330. }
  12331. return {
  12332. code: code2,
  12333. pos: pos2
  12334. };
  12335. }
  12336. }
  12337. });
  12338. // node_modules/@babel/types/lib/constants/index.js
  12339. var require_constants = __commonJS({
  12340. "node_modules/@babel/types/lib/constants/index.js"(exports) {
  12341. "use strict";
  12342. Object.defineProperty(exports, "__esModule", {
  12343. value: true
  12344. });
  12345. exports.UPDATE_OPERATORS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.STATEMENT_OR_BLOCK_KEYS = exports.NUMBER_UNARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.NOT_LOCAL_BINDING = exports.LOGICAL_OPERATORS = exports.INHERIT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.EQUALITY_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.COMMENT_KEYS = exports.BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.BLOCK_SCOPED_SYMBOL = exports.BINARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = void 0;
  12346. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  12347. exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
  12348. var FLATTENABLE_KEYS = ["body", "expressions"];
  12349. exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
  12350. var FOR_INIT_KEYS = ["left", "init"];
  12351. exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
  12352. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  12353. exports.COMMENT_KEYS = COMMENT_KEYS;
  12354. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  12355. exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
  12356. var UPDATE_OPERATORS = ["++", "--"];
  12357. exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
  12358. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  12359. exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
  12360. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  12361. exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
  12362. var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
  12363. exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
  12364. var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
  12365. exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
  12366. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  12367. exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
  12368. var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS, "|>"];
  12369. exports.BINARY_OPERATORS = BINARY_OPERATORS;
  12370. var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")];
  12371. exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
  12372. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  12373. exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
  12374. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  12375. exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
  12376. var STRING_UNARY_OPERATORS = ["typeof"];
  12377. exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
  12378. var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
  12379. exports.UNARY_OPERATORS = UNARY_OPERATORS;
  12380. var INHERIT_KEYS = {
  12381. optional: ["typeAnnotation", "typeParameters", "returnType"],
  12382. force: ["start", "loc", "end"]
  12383. };
  12384. exports.INHERIT_KEYS = INHERIT_KEYS;
  12385. var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
  12386. exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
  12387. var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
  12388. exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
  12389. }
  12390. });
  12391. // node_modules/@babel/types/lib/definitions/utils.js
  12392. var require_utils = __commonJS({
  12393. "node_modules/@babel/types/lib/definitions/utils.js"(exports) {
  12394. "use strict";
  12395. Object.defineProperty(exports, "__esModule", {
  12396. value: true
  12397. });
  12398. exports.VISITOR_KEYS = exports.NODE_PARENT_VALIDATIONS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.ALIAS_KEYS = void 0;
  12399. exports.arrayOf = arrayOf;
  12400. exports.arrayOfType = arrayOfType;
  12401. exports.assertEach = assertEach;
  12402. exports.assertNodeOrValueType = assertNodeOrValueType;
  12403. exports.assertNodeType = assertNodeType;
  12404. exports.assertOneOf = assertOneOf;
  12405. exports.assertOptionalChainStart = assertOptionalChainStart;
  12406. exports.assertShape = assertShape;
  12407. exports.assertValueType = assertValueType;
  12408. exports.chain = chain;
  12409. exports.default = defineType;
  12410. exports.defineAliasedType = defineAliasedType;
  12411. exports.typeIs = typeIs;
  12412. exports.validate = validate;
  12413. exports.validateArrayOfType = validateArrayOfType;
  12414. exports.validateOptional = validateOptional;
  12415. exports.validateOptionalType = validateOptionalType;
  12416. exports.validateType = validateType;
  12417. var _is = require_is();
  12418. var _validate = require_validate();
  12419. var VISITOR_KEYS = {};
  12420. exports.VISITOR_KEYS = VISITOR_KEYS;
  12421. var ALIAS_KEYS = {};
  12422. exports.ALIAS_KEYS = ALIAS_KEYS;
  12423. var FLIPPED_ALIAS_KEYS = {};
  12424. exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
  12425. var NODE_FIELDS = {};
  12426. exports.NODE_FIELDS = NODE_FIELDS;
  12427. var BUILDER_KEYS = {};
  12428. exports.BUILDER_KEYS = BUILDER_KEYS;
  12429. var DEPRECATED_KEYS = {};
  12430. exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
  12431. var NODE_PARENT_VALIDATIONS = {};
  12432. exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
  12433. function getType(val) {
  12434. if (Array.isArray(val)) {
  12435. return "array";
  12436. } else if (val === null) {
  12437. return "null";
  12438. } else {
  12439. return typeof val;
  12440. }
  12441. }
  12442. function validate(validate2) {
  12443. return {
  12444. validate: validate2
  12445. };
  12446. }
  12447. function typeIs(typeName) {
  12448. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
  12449. }
  12450. function validateType(typeName) {
  12451. return validate(typeIs(typeName));
  12452. }
  12453. function validateOptional(validate2) {
  12454. return {
  12455. validate: validate2,
  12456. optional: true
  12457. };
  12458. }
  12459. function validateOptionalType(typeName) {
  12460. return {
  12461. validate: typeIs(typeName),
  12462. optional: true
  12463. };
  12464. }
  12465. function arrayOf(elementType) {
  12466. return chain(assertValueType("array"), assertEach(elementType));
  12467. }
  12468. function arrayOfType(typeName) {
  12469. return arrayOf(typeIs(typeName));
  12470. }
  12471. function validateArrayOfType(typeName) {
  12472. return validate(arrayOfType(typeName));
  12473. }
  12474. function assertEach(callback) {
  12475. function validator(node2, key2, val) {
  12476. if (!Array.isArray(val))
  12477. return;
  12478. for (let i = 0; i < val.length; i++) {
  12479. const subkey = `${key2}[${i}]`;
  12480. const v = val[i];
  12481. callback(node2, subkey, v);
  12482. if (process.env.BABEL_TYPES_8_BREAKING)
  12483. (0, _validate.validateChild)(node2, subkey, v);
  12484. }
  12485. }
  12486. validator.each = callback;
  12487. return validator;
  12488. }
  12489. function assertOneOf(...values) {
  12490. function validate2(node2, key2, val) {
  12491. if (values.indexOf(val) < 0) {
  12492. throw new TypeError(`Property ${key2} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
  12493. }
  12494. }
  12495. validate2.oneOf = values;
  12496. return validate2;
  12497. }
  12498. function assertNodeType(...types3) {
  12499. function validate2(node2, key2, val) {
  12500. for (const type of types3) {
  12501. if ((0, _is.default)(type, val)) {
  12502. (0, _validate.validateChild)(node2, key2, val);
  12503. return;
  12504. }
  12505. }
  12506. throw new TypeError(`Property ${key2} of ${node2.type} expected node to be of a type ${JSON.stringify(types3)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  12507. }
  12508. validate2.oneOfNodeTypes = types3;
  12509. return validate2;
  12510. }
  12511. function assertNodeOrValueType(...types3) {
  12512. function validate2(node2, key2, val) {
  12513. for (const type of types3) {
  12514. if (getType(val) === type || (0, _is.default)(type, val)) {
  12515. (0, _validate.validateChild)(node2, key2, val);
  12516. return;
  12517. }
  12518. }
  12519. throw new TypeError(`Property ${key2} of ${node2.type} expected node to be of a type ${JSON.stringify(types3)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
  12520. }
  12521. validate2.oneOfNodeOrValueTypes = types3;
  12522. return validate2;
  12523. }
  12524. function assertValueType(type) {
  12525. function validate2(node2, key2, val) {
  12526. const valid2 = getType(val) === type;
  12527. if (!valid2) {
  12528. throw new TypeError(`Property ${key2} expected type of ${type} but got ${getType(val)}`);
  12529. }
  12530. }
  12531. validate2.type = type;
  12532. return validate2;
  12533. }
  12534. function assertShape(shape) {
  12535. function validate2(node2, key2, val) {
  12536. const errors = [];
  12537. for (const property of Object.keys(shape)) {
  12538. try {
  12539. (0, _validate.validateField)(node2, property, val[property], shape[property]);
  12540. } catch (error) {
  12541. if (error instanceof TypeError) {
  12542. errors.push(error.message);
  12543. continue;
  12544. }
  12545. throw error;
  12546. }
  12547. }
  12548. if (errors.length) {
  12549. throw new TypeError(`Property ${key2} of ${node2.type} expected to have the following:
  12550. ${errors.join("\n")}`);
  12551. }
  12552. }
  12553. validate2.shapeOf = shape;
  12554. return validate2;
  12555. }
  12556. function assertOptionalChainStart() {
  12557. function validate2(node2) {
  12558. var _current;
  12559. let current3 = node2;
  12560. while (node2) {
  12561. const {
  12562. type
  12563. } = current3;
  12564. if (type === "OptionalCallExpression") {
  12565. if (current3.optional)
  12566. return;
  12567. current3 = current3.callee;
  12568. continue;
  12569. }
  12570. if (type === "OptionalMemberExpression") {
  12571. if (current3.optional)
  12572. return;
  12573. current3 = current3.object;
  12574. continue;
  12575. }
  12576. break;
  12577. }
  12578. throw new TypeError(`Non-optional ${node2.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current3) == null ? void 0 : _current.type}`);
  12579. }
  12580. return validate2;
  12581. }
  12582. function chain(...fns) {
  12583. function validate2(...args) {
  12584. for (const fn of fns) {
  12585. fn(...args);
  12586. }
  12587. }
  12588. validate2.chainOf = fns;
  12589. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  12590. throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
  12591. }
  12592. return validate2;
  12593. }
  12594. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  12595. var validFieldKeys = ["default", "optional", "validate"];
  12596. var store = {};
  12597. function defineAliasedType(...aliases) {
  12598. return (type, opts = {}) => {
  12599. let defined = opts.aliases;
  12600. if (!defined) {
  12601. var _store$opts$inherits$, _defined;
  12602. if (opts.inherits)
  12603. defined = (_store$opts$inherits$ = store[opts.inherits].aliases) == null ? void 0 : _store$opts$inherits$.slice();
  12604. (_defined = defined) != null ? _defined : defined = [];
  12605. opts.aliases = defined;
  12606. }
  12607. const additional = aliases.filter((a) => !defined.includes(a));
  12608. defined.unshift(...additional);
  12609. defineType(type, opts);
  12610. };
  12611. }
  12612. function defineType(type, opts = {}) {
  12613. const inherits = opts.inherits && store[opts.inherits] || {};
  12614. let fields = opts.fields;
  12615. if (!fields) {
  12616. fields = {};
  12617. if (inherits.fields) {
  12618. const keys2 = Object.getOwnPropertyNames(inherits.fields);
  12619. for (const key2 of keys2) {
  12620. const field = inherits.fields[key2];
  12621. const def = field.default;
  12622. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  12623. throw new Error("field defaults can only be primitives or empty arrays currently");
  12624. }
  12625. fields[key2] = {
  12626. default: Array.isArray(def) ? [] : def,
  12627. optional: field.optional,
  12628. validate: field.validate
  12629. };
  12630. }
  12631. }
  12632. }
  12633. const visitor = opts.visitor || inherits.visitor || [];
  12634. const aliases = opts.aliases || inherits.aliases || [];
  12635. const builder = opts.builder || inherits.builder || opts.visitor || [];
  12636. for (const k of Object.keys(opts)) {
  12637. if (validTypeOpts.indexOf(k) === -1) {
  12638. throw new Error(`Unknown type option "${k}" on ${type}`);
  12639. }
  12640. }
  12641. if (opts.deprecatedAlias) {
  12642. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  12643. }
  12644. for (const key2 of visitor.concat(builder)) {
  12645. fields[key2] = fields[key2] || {};
  12646. }
  12647. for (const key2 of Object.keys(fields)) {
  12648. const field = fields[key2];
  12649. if (field.default !== void 0 && builder.indexOf(key2) === -1) {
  12650. field.optional = true;
  12651. }
  12652. if (field.default === void 0) {
  12653. field.default = null;
  12654. } else if (!field.validate && field.default != null) {
  12655. field.validate = assertValueType(getType(field.default));
  12656. }
  12657. for (const k of Object.keys(field)) {
  12658. if (validFieldKeys.indexOf(k) === -1) {
  12659. throw new Error(`Unknown field key "${k}" on ${type}.${key2}`);
  12660. }
  12661. }
  12662. }
  12663. VISITOR_KEYS[type] = opts.visitor = visitor;
  12664. BUILDER_KEYS[type] = opts.builder = builder;
  12665. NODE_FIELDS[type] = opts.fields = fields;
  12666. ALIAS_KEYS[type] = opts.aliases = aliases;
  12667. aliases.forEach((alias) => {
  12668. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  12669. FLIPPED_ALIAS_KEYS[alias].push(type);
  12670. });
  12671. if (opts.validate) {
  12672. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  12673. }
  12674. store[type] = opts;
  12675. }
  12676. }
  12677. });
  12678. // node_modules/@babel/types/lib/definitions/core.js
  12679. var require_core = __commonJS({
  12680. "node_modules/@babel/types/lib/definitions/core.js"(exports) {
  12681. "use strict";
  12682. Object.defineProperty(exports, "__esModule", {
  12683. value: true
  12684. });
  12685. exports.patternLikeCommon = exports.functionTypeAnnotationCommon = exports.functionDeclarationCommon = exports.functionCommon = exports.classMethodOrPropertyCommon = exports.classMethodOrDeclareMethodCommon = void 0;
  12686. var _is = require_is();
  12687. var _isValidIdentifier = require_isValidIdentifier();
  12688. var _helperValidatorIdentifier = require_lib();
  12689. var _helperStringParser = require_lib2();
  12690. var _constants = require_constants();
  12691. var _utils = require_utils();
  12692. var defineType = (0, _utils.defineAliasedType)("Standardized");
  12693. defineType("ArrayExpression", {
  12694. fields: {
  12695. elements: {
  12696. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  12697. default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0
  12698. }
  12699. },
  12700. visitor: ["elements"],
  12701. aliases: ["Expression"]
  12702. });
  12703. defineType("AssignmentExpression", {
  12704. fields: {
  12705. operator: {
  12706. validate: function() {
  12707. if (!process.env.BABEL_TYPES_8_BREAKING) {
  12708. return (0, _utils.assertValueType)("string");
  12709. }
  12710. const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
  12711. const pattern = (0, _utils.assertOneOf)("=");
  12712. return function(node2, key2, val) {
  12713. const validator = (0, _is.default)("Pattern", node2.left) ? pattern : identifier;
  12714. validator(node2, key2, val);
  12715. };
  12716. }()
  12717. },
  12718. left: {
  12719. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression")
  12720. },
  12721. right: {
  12722. validate: (0, _utils.assertNodeType)("Expression")
  12723. }
  12724. },
  12725. builder: ["operator", "left", "right"],
  12726. visitor: ["left", "right"],
  12727. aliases: ["Expression"]
  12728. });
  12729. defineType("BinaryExpression", {
  12730. builder: ["operator", "left", "right"],
  12731. fields: {
  12732. operator: {
  12733. validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
  12734. },
  12735. left: {
  12736. validate: function() {
  12737. const expression = (0, _utils.assertNodeType)("Expression");
  12738. const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
  12739. const validator = Object.assign(function(node2, key2, val) {
  12740. const validator2 = node2.operator === "in" ? inOp : expression;
  12741. validator2(node2, key2, val);
  12742. }, {
  12743. oneOfNodeTypes: ["Expression", "PrivateName"]
  12744. });
  12745. return validator;
  12746. }()
  12747. },
  12748. right: {
  12749. validate: (0, _utils.assertNodeType)("Expression")
  12750. }
  12751. },
  12752. visitor: ["left", "right"],
  12753. aliases: ["Binary", "Expression"]
  12754. });
  12755. defineType("InterpreterDirective", {
  12756. builder: ["value"],
  12757. fields: {
  12758. value: {
  12759. validate: (0, _utils.assertValueType)("string")
  12760. }
  12761. }
  12762. });
  12763. defineType("Directive", {
  12764. visitor: ["value"],
  12765. fields: {
  12766. value: {
  12767. validate: (0, _utils.assertNodeType)("DirectiveLiteral")
  12768. }
  12769. }
  12770. });
  12771. defineType("DirectiveLiteral", {
  12772. builder: ["value"],
  12773. fields: {
  12774. value: {
  12775. validate: (0, _utils.assertValueType)("string")
  12776. }
  12777. }
  12778. });
  12779. defineType("BlockStatement", {
  12780. builder: ["body", "directives"],
  12781. visitor: ["directives", "body"],
  12782. fields: {
  12783. directives: {
  12784. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  12785. default: []
  12786. },
  12787. body: {
  12788. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  12789. }
  12790. },
  12791. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  12792. });
  12793. defineType("BreakStatement", {
  12794. visitor: ["label"],
  12795. fields: {
  12796. label: {
  12797. validate: (0, _utils.assertNodeType)("Identifier"),
  12798. optional: true
  12799. }
  12800. },
  12801. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  12802. });
  12803. defineType("CallExpression", {
  12804. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  12805. builder: ["callee", "arguments"],
  12806. aliases: ["Expression"],
  12807. fields: Object.assign({
  12808. callee: {
  12809. validate: (0, _utils.assertNodeType)("Expression", "Super", "V8IntrinsicIdentifier")
  12810. },
  12811. arguments: {
  12812. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  12813. }
  12814. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  12815. optional: {
  12816. validate: (0, _utils.assertOneOf)(true, false),
  12817. optional: true
  12818. }
  12819. } : {}, {
  12820. typeArguments: {
  12821. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  12822. optional: true
  12823. },
  12824. typeParameters: {
  12825. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  12826. optional: true
  12827. }
  12828. })
  12829. });
  12830. defineType("CatchClause", {
  12831. visitor: ["param", "body"],
  12832. fields: {
  12833. param: {
  12834. validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
  12835. optional: true
  12836. },
  12837. body: {
  12838. validate: (0, _utils.assertNodeType)("BlockStatement")
  12839. }
  12840. },
  12841. aliases: ["Scopable", "BlockParent"]
  12842. });
  12843. defineType("ConditionalExpression", {
  12844. visitor: ["test", "consequent", "alternate"],
  12845. fields: {
  12846. test: {
  12847. validate: (0, _utils.assertNodeType)("Expression")
  12848. },
  12849. consequent: {
  12850. validate: (0, _utils.assertNodeType)("Expression")
  12851. },
  12852. alternate: {
  12853. validate: (0, _utils.assertNodeType)("Expression")
  12854. }
  12855. },
  12856. aliases: ["Expression", "Conditional"]
  12857. });
  12858. defineType("ContinueStatement", {
  12859. visitor: ["label"],
  12860. fields: {
  12861. label: {
  12862. validate: (0, _utils.assertNodeType)("Identifier"),
  12863. optional: true
  12864. }
  12865. },
  12866. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  12867. });
  12868. defineType("DebuggerStatement", {
  12869. aliases: ["Statement"]
  12870. });
  12871. defineType("DoWhileStatement", {
  12872. visitor: ["test", "body"],
  12873. fields: {
  12874. test: {
  12875. validate: (0, _utils.assertNodeType)("Expression")
  12876. },
  12877. body: {
  12878. validate: (0, _utils.assertNodeType)("Statement")
  12879. }
  12880. },
  12881. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  12882. });
  12883. defineType("EmptyStatement", {
  12884. aliases: ["Statement"]
  12885. });
  12886. defineType("ExpressionStatement", {
  12887. visitor: ["expression"],
  12888. fields: {
  12889. expression: {
  12890. validate: (0, _utils.assertNodeType)("Expression")
  12891. }
  12892. },
  12893. aliases: ["Statement", "ExpressionWrapper"]
  12894. });
  12895. defineType("File", {
  12896. builder: ["program", "comments", "tokens"],
  12897. visitor: ["program"],
  12898. fields: {
  12899. program: {
  12900. validate: (0, _utils.assertNodeType)("Program")
  12901. },
  12902. comments: {
  12903. validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {
  12904. }, {
  12905. each: {
  12906. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  12907. }
  12908. }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
  12909. optional: true
  12910. },
  12911. tokens: {
  12912. validate: (0, _utils.assertEach)(Object.assign(() => {
  12913. }, {
  12914. type: "any"
  12915. })),
  12916. optional: true
  12917. }
  12918. }
  12919. });
  12920. defineType("ForInStatement", {
  12921. visitor: ["left", "right", "body"],
  12922. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  12923. fields: {
  12924. left: {
  12925. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression")
  12926. },
  12927. right: {
  12928. validate: (0, _utils.assertNodeType)("Expression")
  12929. },
  12930. body: {
  12931. validate: (0, _utils.assertNodeType)("Statement")
  12932. }
  12933. }
  12934. });
  12935. defineType("ForStatement", {
  12936. visitor: ["init", "test", "update", "body"],
  12937. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  12938. fields: {
  12939. init: {
  12940. validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
  12941. optional: true
  12942. },
  12943. test: {
  12944. validate: (0, _utils.assertNodeType)("Expression"),
  12945. optional: true
  12946. },
  12947. update: {
  12948. validate: (0, _utils.assertNodeType)("Expression"),
  12949. optional: true
  12950. },
  12951. body: {
  12952. validate: (0, _utils.assertNodeType)("Statement")
  12953. }
  12954. }
  12955. });
  12956. var functionCommon = () => ({
  12957. params: {
  12958. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
  12959. },
  12960. generator: {
  12961. default: false
  12962. },
  12963. async: {
  12964. default: false
  12965. }
  12966. });
  12967. exports.functionCommon = functionCommon;
  12968. var functionTypeAnnotationCommon = () => ({
  12969. returnType: {
  12970. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  12971. optional: true
  12972. },
  12973. typeParameters: {
  12974. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  12975. optional: true
  12976. }
  12977. });
  12978. exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
  12979. var functionDeclarationCommon = () => Object.assign({}, functionCommon(), {
  12980. declare: {
  12981. validate: (0, _utils.assertValueType)("boolean"),
  12982. optional: true
  12983. },
  12984. id: {
  12985. validate: (0, _utils.assertNodeType)("Identifier"),
  12986. optional: true
  12987. }
  12988. });
  12989. exports.functionDeclarationCommon = functionDeclarationCommon;
  12990. defineType("FunctionDeclaration", {
  12991. builder: ["id", "params", "body", "generator", "async"],
  12992. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  12993. fields: Object.assign({}, functionDeclarationCommon(), functionTypeAnnotationCommon(), {
  12994. body: {
  12995. validate: (0, _utils.assertNodeType)("BlockStatement")
  12996. },
  12997. predicate: {
  12998. validate: (0, _utils.assertNodeType)("DeclaredPredicate", "InferredPredicate"),
  12999. optional: true
  13000. }
  13001. }),
  13002. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  13003. validate: function() {
  13004. if (!process.env.BABEL_TYPES_8_BREAKING)
  13005. return () => {
  13006. };
  13007. const identifier = (0, _utils.assertNodeType)("Identifier");
  13008. return function(parent, key2, node2) {
  13009. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  13010. identifier(node2, "id", node2.id);
  13011. }
  13012. };
  13013. }()
  13014. });
  13015. defineType("FunctionExpression", {
  13016. inherits: "FunctionDeclaration",
  13017. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  13018. fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), {
  13019. id: {
  13020. validate: (0, _utils.assertNodeType)("Identifier"),
  13021. optional: true
  13022. },
  13023. body: {
  13024. validate: (0, _utils.assertNodeType)("BlockStatement")
  13025. },
  13026. predicate: {
  13027. validate: (0, _utils.assertNodeType)("DeclaredPredicate", "InferredPredicate"),
  13028. optional: true
  13029. }
  13030. })
  13031. });
  13032. var patternLikeCommon = () => ({
  13033. typeAnnotation: {
  13034. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  13035. optional: true
  13036. },
  13037. optional: {
  13038. validate: (0, _utils.assertValueType)("boolean"),
  13039. optional: true
  13040. },
  13041. decorators: {
  13042. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  13043. optional: true
  13044. }
  13045. });
  13046. exports.patternLikeCommon = patternLikeCommon;
  13047. defineType("Identifier", {
  13048. builder: ["name"],
  13049. visitor: ["typeAnnotation", "decorators"],
  13050. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  13051. fields: Object.assign({}, patternLikeCommon(), {
  13052. name: {
  13053. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node2, key2, val) {
  13054. if (!process.env.BABEL_TYPES_8_BREAKING)
  13055. return;
  13056. if (!(0, _isValidIdentifier.default)(val, false)) {
  13057. throw new TypeError(`"${val}" is not a valid identifier name`);
  13058. }
  13059. }, {
  13060. type: "string"
  13061. }))
  13062. }
  13063. }),
  13064. validate(parent, key2, node2) {
  13065. if (!process.env.BABEL_TYPES_8_BREAKING)
  13066. return;
  13067. const match = /\.(\w+)$/.exec(key2);
  13068. if (!match)
  13069. return;
  13070. const [, parentKey] = match;
  13071. const nonComp = {
  13072. computed: false
  13073. };
  13074. if (parentKey === "property") {
  13075. if ((0, _is.default)("MemberExpression", parent, nonComp))
  13076. return;
  13077. if ((0, _is.default)("OptionalMemberExpression", parent, nonComp))
  13078. return;
  13079. } else if (parentKey === "key") {
  13080. if ((0, _is.default)("Property", parent, nonComp))
  13081. return;
  13082. if ((0, _is.default)("Method", parent, nonComp))
  13083. return;
  13084. } else if (parentKey === "exported") {
  13085. if ((0, _is.default)("ExportSpecifier", parent))
  13086. return;
  13087. } else if (parentKey === "imported") {
  13088. if ((0, _is.default)("ImportSpecifier", parent, {
  13089. imported: node2
  13090. }))
  13091. return;
  13092. } else if (parentKey === "meta") {
  13093. if ((0, _is.default)("MetaProperty", parent, {
  13094. meta: node2
  13095. }))
  13096. return;
  13097. }
  13098. if (((0, _helperValidatorIdentifier.isKeyword)(node2.name) || (0, _helperValidatorIdentifier.isReservedWord)(node2.name, false)) && node2.name !== "this") {
  13099. throw new TypeError(`"${node2.name}" is not a valid identifier`);
  13100. }
  13101. }
  13102. });
  13103. defineType("IfStatement", {
  13104. visitor: ["test", "consequent", "alternate"],
  13105. aliases: ["Statement", "Conditional"],
  13106. fields: {
  13107. test: {
  13108. validate: (0, _utils.assertNodeType)("Expression")
  13109. },
  13110. consequent: {
  13111. validate: (0, _utils.assertNodeType)("Statement")
  13112. },
  13113. alternate: {
  13114. optional: true,
  13115. validate: (0, _utils.assertNodeType)("Statement")
  13116. }
  13117. }
  13118. });
  13119. defineType("LabeledStatement", {
  13120. visitor: ["label", "body"],
  13121. aliases: ["Statement"],
  13122. fields: {
  13123. label: {
  13124. validate: (0, _utils.assertNodeType)("Identifier")
  13125. },
  13126. body: {
  13127. validate: (0, _utils.assertNodeType)("Statement")
  13128. }
  13129. }
  13130. });
  13131. defineType("StringLiteral", {
  13132. builder: ["value"],
  13133. fields: {
  13134. value: {
  13135. validate: (0, _utils.assertValueType)("string")
  13136. }
  13137. },
  13138. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  13139. });
  13140. defineType("NumericLiteral", {
  13141. builder: ["value"],
  13142. deprecatedAlias: "NumberLiteral",
  13143. fields: {
  13144. value: {
  13145. validate: (0, _utils.assertValueType)("number")
  13146. }
  13147. },
  13148. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  13149. });
  13150. defineType("NullLiteral", {
  13151. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  13152. });
  13153. defineType("BooleanLiteral", {
  13154. builder: ["value"],
  13155. fields: {
  13156. value: {
  13157. validate: (0, _utils.assertValueType)("boolean")
  13158. }
  13159. },
  13160. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  13161. });
  13162. defineType("RegExpLiteral", {
  13163. builder: ["pattern", "flags"],
  13164. deprecatedAlias: "RegexLiteral",
  13165. aliases: ["Expression", "Pureish", "Literal"],
  13166. fields: {
  13167. pattern: {
  13168. validate: (0, _utils.assertValueType)("string")
  13169. },
  13170. flags: {
  13171. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node2, key2, val) {
  13172. if (!process.env.BABEL_TYPES_8_BREAKING)
  13173. return;
  13174. const invalid2 = /[^gimsuy]/.exec(val);
  13175. if (invalid2) {
  13176. throw new TypeError(`"${invalid2[0]}" is not a valid RegExp flag`);
  13177. }
  13178. }, {
  13179. type: "string"
  13180. })),
  13181. default: ""
  13182. }
  13183. }
  13184. });
  13185. defineType("LogicalExpression", {
  13186. builder: ["operator", "left", "right"],
  13187. visitor: ["left", "right"],
  13188. aliases: ["Binary", "Expression"],
  13189. fields: {
  13190. operator: {
  13191. validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
  13192. },
  13193. left: {
  13194. validate: (0, _utils.assertNodeType)("Expression")
  13195. },
  13196. right: {
  13197. validate: (0, _utils.assertNodeType)("Expression")
  13198. }
  13199. }
  13200. });
  13201. defineType("MemberExpression", {
  13202. builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []],
  13203. visitor: ["object", "property"],
  13204. aliases: ["Expression", "LVal"],
  13205. fields: Object.assign({
  13206. object: {
  13207. validate: (0, _utils.assertNodeType)("Expression", "Super")
  13208. },
  13209. property: {
  13210. validate: function() {
  13211. const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
  13212. const computed = (0, _utils.assertNodeType)("Expression");
  13213. const validator = function(node2, key2, val) {
  13214. const validator2 = node2.computed ? computed : normal;
  13215. validator2(node2, key2, val);
  13216. };
  13217. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  13218. return validator;
  13219. }()
  13220. },
  13221. computed: {
  13222. default: false
  13223. }
  13224. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  13225. optional: {
  13226. validate: (0, _utils.assertOneOf)(true, false),
  13227. optional: true
  13228. }
  13229. } : {})
  13230. });
  13231. defineType("NewExpression", {
  13232. inherits: "CallExpression"
  13233. });
  13234. defineType("Program", {
  13235. visitor: ["directives", "body"],
  13236. builder: ["body", "directives", "sourceType", "interpreter"],
  13237. fields: {
  13238. sourceFile: {
  13239. validate: (0, _utils.assertValueType)("string")
  13240. },
  13241. sourceType: {
  13242. validate: (0, _utils.assertOneOf)("script", "module"),
  13243. default: "script"
  13244. },
  13245. interpreter: {
  13246. validate: (0, _utils.assertNodeType)("InterpreterDirective"),
  13247. default: null,
  13248. optional: true
  13249. },
  13250. directives: {
  13251. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
  13252. default: []
  13253. },
  13254. body: {
  13255. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  13256. }
  13257. },
  13258. aliases: ["Scopable", "BlockParent", "Block"]
  13259. });
  13260. defineType("ObjectExpression", {
  13261. visitor: ["properties"],
  13262. aliases: ["Expression"],
  13263. fields: {
  13264. properties: {
  13265. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
  13266. }
  13267. }
  13268. });
  13269. defineType("ObjectMethod", {
  13270. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  13271. fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), {
  13272. kind: Object.assign({
  13273. validate: (0, _utils.assertOneOf)("method", "get", "set")
  13274. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  13275. default: "method"
  13276. } : {}),
  13277. computed: {
  13278. default: false
  13279. },
  13280. key: {
  13281. validate: function() {
  13282. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral");
  13283. const computed = (0, _utils.assertNodeType)("Expression");
  13284. const validator = function(node2, key2, val) {
  13285. const validator2 = node2.computed ? computed : normal;
  13286. validator2(node2, key2, val);
  13287. };
  13288. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"];
  13289. return validator;
  13290. }()
  13291. },
  13292. decorators: {
  13293. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  13294. optional: true
  13295. },
  13296. body: {
  13297. validate: (0, _utils.assertNodeType)("BlockStatement")
  13298. }
  13299. }),
  13300. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  13301. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  13302. });
  13303. defineType("ObjectProperty", {
  13304. builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []],
  13305. fields: {
  13306. computed: {
  13307. default: false
  13308. },
  13309. key: {
  13310. validate: function() {
  13311. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "PrivateName");
  13312. const computed = (0, _utils.assertNodeType)("Expression");
  13313. const validator = Object.assign(function(node2, key2, val) {
  13314. const validator2 = node2.computed ? computed : normal;
  13315. validator2(node2, key2, val);
  13316. }, {
  13317. oneOfNodeTypes: ["Expression", "Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "PrivateName"]
  13318. });
  13319. return validator;
  13320. }()
  13321. },
  13322. value: {
  13323. validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
  13324. },
  13325. shorthand: {
  13326. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node2, key2, val) {
  13327. if (!process.env.BABEL_TYPES_8_BREAKING)
  13328. return;
  13329. if (val && node2.computed) {
  13330. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  13331. }
  13332. }, {
  13333. type: "boolean"
  13334. }), function(node2, key2, val) {
  13335. if (!process.env.BABEL_TYPES_8_BREAKING)
  13336. return;
  13337. if (val && !(0, _is.default)("Identifier", node2.key)) {
  13338. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  13339. }
  13340. }),
  13341. default: false
  13342. },
  13343. decorators: {
  13344. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  13345. optional: true
  13346. }
  13347. },
  13348. visitor: ["key", "value", "decorators"],
  13349. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  13350. validate: function() {
  13351. const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern", "TSAsExpression", "TSSatisfiesExpression", "TSNonNullExpression", "TSTypeAssertion");
  13352. const expression = (0, _utils.assertNodeType)("Expression");
  13353. return function(parent, key2, node2) {
  13354. if (!process.env.BABEL_TYPES_8_BREAKING)
  13355. return;
  13356. const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
  13357. validator(node2, "value", node2.value);
  13358. };
  13359. }()
  13360. });
  13361. defineType("RestElement", {
  13362. visitor: ["argument", "typeAnnotation"],
  13363. builder: ["argument"],
  13364. aliases: ["LVal", "PatternLike"],
  13365. deprecatedAlias: "RestProperty",
  13366. fields: Object.assign({}, patternLikeCommon(), {
  13367. argument: {
  13368. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression")
  13369. }
  13370. }),
  13371. validate(parent, key2) {
  13372. if (!process.env.BABEL_TYPES_8_BREAKING)
  13373. return;
  13374. const match = /(\w+)\[(\d+)\]/.exec(key2);
  13375. if (!match)
  13376. throw new Error("Internal Babel error: malformed key.");
  13377. const [, listKey, index2] = match;
  13378. if (parent[listKey].length > +index2 + 1) {
  13379. throw new TypeError(`RestElement must be last element of ${listKey}`);
  13380. }
  13381. }
  13382. });
  13383. defineType("ReturnStatement", {
  13384. visitor: ["argument"],
  13385. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  13386. fields: {
  13387. argument: {
  13388. validate: (0, _utils.assertNodeType)("Expression"),
  13389. optional: true
  13390. }
  13391. }
  13392. });
  13393. defineType("SequenceExpression", {
  13394. visitor: ["expressions"],
  13395. fields: {
  13396. expressions: {
  13397. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
  13398. }
  13399. },
  13400. aliases: ["Expression"]
  13401. });
  13402. defineType("ParenthesizedExpression", {
  13403. visitor: ["expression"],
  13404. aliases: ["Expression", "ExpressionWrapper"],
  13405. fields: {
  13406. expression: {
  13407. validate: (0, _utils.assertNodeType)("Expression")
  13408. }
  13409. }
  13410. });
  13411. defineType("SwitchCase", {
  13412. visitor: ["test", "consequent"],
  13413. fields: {
  13414. test: {
  13415. validate: (0, _utils.assertNodeType)("Expression"),
  13416. optional: true
  13417. },
  13418. consequent: {
  13419. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  13420. }
  13421. }
  13422. });
  13423. defineType("SwitchStatement", {
  13424. visitor: ["discriminant", "cases"],
  13425. aliases: ["Statement", "BlockParent", "Scopable"],
  13426. fields: {
  13427. discriminant: {
  13428. validate: (0, _utils.assertNodeType)("Expression")
  13429. },
  13430. cases: {
  13431. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
  13432. }
  13433. }
  13434. });
  13435. defineType("ThisExpression", {
  13436. aliases: ["Expression"]
  13437. });
  13438. defineType("ThrowStatement", {
  13439. visitor: ["argument"],
  13440. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  13441. fields: {
  13442. argument: {
  13443. validate: (0, _utils.assertNodeType)("Expression")
  13444. }
  13445. }
  13446. });
  13447. defineType("TryStatement", {
  13448. visitor: ["block", "handler", "finalizer"],
  13449. aliases: ["Statement"],
  13450. fields: {
  13451. block: {
  13452. validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node2) {
  13453. if (!process.env.BABEL_TYPES_8_BREAKING)
  13454. return;
  13455. if (!node2.handler && !node2.finalizer) {
  13456. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  13457. }
  13458. }, {
  13459. oneOfNodeTypes: ["BlockStatement"]
  13460. }))
  13461. },
  13462. handler: {
  13463. optional: true,
  13464. validate: (0, _utils.assertNodeType)("CatchClause")
  13465. },
  13466. finalizer: {
  13467. optional: true,
  13468. validate: (0, _utils.assertNodeType)("BlockStatement")
  13469. }
  13470. }
  13471. });
  13472. defineType("UnaryExpression", {
  13473. builder: ["operator", "argument", "prefix"],
  13474. fields: {
  13475. prefix: {
  13476. default: true
  13477. },
  13478. argument: {
  13479. validate: (0, _utils.assertNodeType)("Expression")
  13480. },
  13481. operator: {
  13482. validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
  13483. }
  13484. },
  13485. visitor: ["argument"],
  13486. aliases: ["UnaryLike", "Expression"]
  13487. });
  13488. defineType("UpdateExpression", {
  13489. builder: ["operator", "argument", "prefix"],
  13490. fields: {
  13491. prefix: {
  13492. default: false
  13493. },
  13494. argument: {
  13495. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
  13496. },
  13497. operator: {
  13498. validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
  13499. }
  13500. },
  13501. visitor: ["argument"],
  13502. aliases: ["Expression"]
  13503. });
  13504. defineType("VariableDeclaration", {
  13505. builder: ["kind", "declarations"],
  13506. visitor: ["declarations"],
  13507. aliases: ["Statement", "Declaration"],
  13508. fields: {
  13509. declare: {
  13510. validate: (0, _utils.assertValueType)("boolean"),
  13511. optional: true
  13512. },
  13513. kind: {
  13514. validate: (0, _utils.assertOneOf)("var", "let", "const", "using")
  13515. },
  13516. declarations: {
  13517. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
  13518. }
  13519. },
  13520. validate(parent, key2, node2) {
  13521. if (!process.env.BABEL_TYPES_8_BREAKING)
  13522. return;
  13523. if (!(0, _is.default)("ForXStatement", parent, {
  13524. left: node2
  13525. }))
  13526. return;
  13527. if (node2.declarations.length !== 1) {
  13528. throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
  13529. }
  13530. }
  13531. });
  13532. defineType("VariableDeclarator", {
  13533. visitor: ["id", "init"],
  13534. fields: {
  13535. id: {
  13536. validate: function() {
  13537. if (!process.env.BABEL_TYPES_8_BREAKING) {
  13538. return (0, _utils.assertNodeType)("LVal");
  13539. }
  13540. const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
  13541. const without = (0, _utils.assertNodeType)("Identifier");
  13542. return function(node2, key2, val) {
  13543. const validator = node2.init ? normal : without;
  13544. validator(node2, key2, val);
  13545. };
  13546. }()
  13547. },
  13548. definite: {
  13549. optional: true,
  13550. validate: (0, _utils.assertValueType)("boolean")
  13551. },
  13552. init: {
  13553. optional: true,
  13554. validate: (0, _utils.assertNodeType)("Expression")
  13555. }
  13556. }
  13557. });
  13558. defineType("WhileStatement", {
  13559. visitor: ["test", "body"],
  13560. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  13561. fields: {
  13562. test: {
  13563. validate: (0, _utils.assertNodeType)("Expression")
  13564. },
  13565. body: {
  13566. validate: (0, _utils.assertNodeType)("Statement")
  13567. }
  13568. }
  13569. });
  13570. defineType("WithStatement", {
  13571. visitor: ["object", "body"],
  13572. aliases: ["Statement"],
  13573. fields: {
  13574. object: {
  13575. validate: (0, _utils.assertNodeType)("Expression")
  13576. },
  13577. body: {
  13578. validate: (0, _utils.assertNodeType)("Statement")
  13579. }
  13580. }
  13581. });
  13582. defineType("AssignmentPattern", {
  13583. visitor: ["left", "right", "decorators"],
  13584. builder: ["left", "right"],
  13585. aliases: ["Pattern", "PatternLike", "LVal"],
  13586. fields: Object.assign({}, patternLikeCommon(), {
  13587. left: {
  13588. validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression")
  13589. },
  13590. right: {
  13591. validate: (0, _utils.assertNodeType)("Expression")
  13592. },
  13593. decorators: {
  13594. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  13595. optional: true
  13596. }
  13597. })
  13598. });
  13599. defineType("ArrayPattern", {
  13600. visitor: ["elements", "typeAnnotation"],
  13601. builder: ["elements"],
  13602. aliases: ["Pattern", "PatternLike", "LVal"],
  13603. fields: Object.assign({}, patternLikeCommon(), {
  13604. elements: {
  13605. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike", "LVal")))
  13606. }
  13607. })
  13608. });
  13609. defineType("ArrowFunctionExpression", {
  13610. builder: ["params", "body", "async"],
  13611. visitor: ["params", "body", "returnType", "typeParameters"],
  13612. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  13613. fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), {
  13614. expression: {
  13615. validate: (0, _utils.assertValueType)("boolean")
  13616. },
  13617. body: {
  13618. validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
  13619. },
  13620. predicate: {
  13621. validate: (0, _utils.assertNodeType)("DeclaredPredicate", "InferredPredicate"),
  13622. optional: true
  13623. }
  13624. })
  13625. });
  13626. defineType("ClassBody", {
  13627. visitor: ["body"],
  13628. fields: {
  13629. body: {
  13630. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock")))
  13631. }
  13632. }
  13633. });
  13634. defineType("ClassExpression", {
  13635. builder: ["id", "superClass", "body", "decorators"],
  13636. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  13637. aliases: ["Scopable", "Class", "Expression"],
  13638. fields: {
  13639. id: {
  13640. validate: (0, _utils.assertNodeType)("Identifier"),
  13641. optional: true
  13642. },
  13643. typeParameters: {
  13644. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  13645. optional: true
  13646. },
  13647. body: {
  13648. validate: (0, _utils.assertNodeType)("ClassBody")
  13649. },
  13650. superClass: {
  13651. optional: true,
  13652. validate: (0, _utils.assertNodeType)("Expression")
  13653. },
  13654. superTypeParameters: {
  13655. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  13656. optional: true
  13657. },
  13658. implements: {
  13659. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  13660. optional: true
  13661. },
  13662. decorators: {
  13663. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  13664. optional: true
  13665. },
  13666. mixins: {
  13667. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  13668. optional: true
  13669. }
  13670. }
  13671. });
  13672. defineType("ClassDeclaration", {
  13673. inherits: "ClassExpression",
  13674. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  13675. fields: {
  13676. id: {
  13677. validate: (0, _utils.assertNodeType)("Identifier")
  13678. },
  13679. typeParameters: {
  13680. validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  13681. optional: true
  13682. },
  13683. body: {
  13684. validate: (0, _utils.assertNodeType)("ClassBody")
  13685. },
  13686. superClass: {
  13687. optional: true,
  13688. validate: (0, _utils.assertNodeType)("Expression")
  13689. },
  13690. superTypeParameters: {
  13691. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  13692. optional: true
  13693. },
  13694. implements: {
  13695. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
  13696. optional: true
  13697. },
  13698. decorators: {
  13699. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  13700. optional: true
  13701. },
  13702. mixins: {
  13703. validate: (0, _utils.assertNodeType)("InterfaceExtends"),
  13704. optional: true
  13705. },
  13706. declare: {
  13707. validate: (0, _utils.assertValueType)("boolean"),
  13708. optional: true
  13709. },
  13710. abstract: {
  13711. validate: (0, _utils.assertValueType)("boolean"),
  13712. optional: true
  13713. }
  13714. },
  13715. validate: function() {
  13716. const identifier = (0, _utils.assertNodeType)("Identifier");
  13717. return function(parent, key2, node2) {
  13718. if (!process.env.BABEL_TYPES_8_BREAKING)
  13719. return;
  13720. if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
  13721. identifier(node2, "id", node2.id);
  13722. }
  13723. };
  13724. }()
  13725. });
  13726. defineType("ExportAllDeclaration", {
  13727. visitor: ["source"],
  13728. aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
  13729. fields: {
  13730. source: {
  13731. validate: (0, _utils.assertNodeType)("StringLiteral")
  13732. },
  13733. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
  13734. assertions: {
  13735. optional: true,
  13736. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  13737. }
  13738. }
  13739. });
  13740. defineType("ExportDefaultDeclaration", {
  13741. visitor: ["declaration"],
  13742. aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
  13743. fields: {
  13744. declaration: {
  13745. validate: (0, _utils.assertNodeType)("TSDeclareFunction", "FunctionDeclaration", "ClassDeclaration", "Expression")
  13746. },
  13747. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("value"))
  13748. }
  13749. });
  13750. defineType("ExportNamedDeclaration", {
  13751. visitor: ["declaration", "specifiers", "source"],
  13752. aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
  13753. fields: {
  13754. declaration: {
  13755. optional: true,
  13756. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node2, key2, val) {
  13757. if (!process.env.BABEL_TYPES_8_BREAKING)
  13758. return;
  13759. if (val && node2.specifiers.length) {
  13760. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  13761. }
  13762. }, {
  13763. oneOfNodeTypes: ["Declaration"]
  13764. }), function(node2, key2, val) {
  13765. if (!process.env.BABEL_TYPES_8_BREAKING)
  13766. return;
  13767. if (val && node2.source) {
  13768. throw new TypeError("Cannot export a declaration from a source");
  13769. }
  13770. })
  13771. },
  13772. assertions: {
  13773. optional: true,
  13774. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  13775. },
  13776. specifiers: {
  13777. default: [],
  13778. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() {
  13779. const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  13780. const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
  13781. if (!process.env.BABEL_TYPES_8_BREAKING)
  13782. return sourced;
  13783. return function(node2, key2, val) {
  13784. const validator = node2.source ? sourced : sourceless;
  13785. validator(node2, key2, val);
  13786. };
  13787. }()))
  13788. },
  13789. source: {
  13790. validate: (0, _utils.assertNodeType)("StringLiteral"),
  13791. optional: true
  13792. },
  13793. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  13794. }
  13795. });
  13796. defineType("ExportSpecifier", {
  13797. visitor: ["local", "exported"],
  13798. aliases: ["ModuleSpecifier"],
  13799. fields: {
  13800. local: {
  13801. validate: (0, _utils.assertNodeType)("Identifier")
  13802. },
  13803. exported: {
  13804. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  13805. },
  13806. exportKind: {
  13807. validate: (0, _utils.assertOneOf)("type", "value"),
  13808. optional: true
  13809. }
  13810. }
  13811. });
  13812. defineType("ForOfStatement", {
  13813. visitor: ["left", "right", "body"],
  13814. builder: ["left", "right", "body", "await"],
  13815. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  13816. fields: {
  13817. left: {
  13818. validate: function() {
  13819. if (!process.env.BABEL_TYPES_8_BREAKING) {
  13820. return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
  13821. }
  13822. const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
  13823. const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression");
  13824. return function(node2, key2, val) {
  13825. if ((0, _is.default)("VariableDeclaration", val)) {
  13826. declaration(node2, key2, val);
  13827. } else {
  13828. lval(node2, key2, val);
  13829. }
  13830. };
  13831. }()
  13832. },
  13833. right: {
  13834. validate: (0, _utils.assertNodeType)("Expression")
  13835. },
  13836. body: {
  13837. validate: (0, _utils.assertNodeType)("Statement")
  13838. },
  13839. await: {
  13840. default: false
  13841. }
  13842. }
  13843. });
  13844. defineType("ImportDeclaration", {
  13845. visitor: ["specifiers", "source"],
  13846. aliases: ["Statement", "Declaration", "ImportOrExportDeclaration"],
  13847. fields: {
  13848. assertions: {
  13849. optional: true,
  13850. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
  13851. },
  13852. module: {
  13853. optional: true,
  13854. validate: (0, _utils.assertValueType)("boolean")
  13855. },
  13856. specifiers: {
  13857. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  13858. },
  13859. source: {
  13860. validate: (0, _utils.assertNodeType)("StringLiteral")
  13861. },
  13862. importKind: {
  13863. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  13864. optional: true
  13865. }
  13866. }
  13867. });
  13868. defineType("ImportDefaultSpecifier", {
  13869. visitor: ["local"],
  13870. aliases: ["ModuleSpecifier"],
  13871. fields: {
  13872. local: {
  13873. validate: (0, _utils.assertNodeType)("Identifier")
  13874. }
  13875. }
  13876. });
  13877. defineType("ImportNamespaceSpecifier", {
  13878. visitor: ["local"],
  13879. aliases: ["ModuleSpecifier"],
  13880. fields: {
  13881. local: {
  13882. validate: (0, _utils.assertNodeType)("Identifier")
  13883. }
  13884. }
  13885. });
  13886. defineType("ImportSpecifier", {
  13887. visitor: ["local", "imported"],
  13888. aliases: ["ModuleSpecifier"],
  13889. fields: {
  13890. local: {
  13891. validate: (0, _utils.assertNodeType)("Identifier")
  13892. },
  13893. imported: {
  13894. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  13895. },
  13896. importKind: {
  13897. validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
  13898. optional: true
  13899. }
  13900. }
  13901. });
  13902. defineType("MetaProperty", {
  13903. visitor: ["meta", "property"],
  13904. aliases: ["Expression"],
  13905. fields: {
  13906. meta: {
  13907. validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node2, key2, val) {
  13908. if (!process.env.BABEL_TYPES_8_BREAKING)
  13909. return;
  13910. let property;
  13911. switch (val.name) {
  13912. case "function":
  13913. property = "sent";
  13914. break;
  13915. case "new":
  13916. property = "target";
  13917. break;
  13918. case "import":
  13919. property = "meta";
  13920. break;
  13921. }
  13922. if (!(0, _is.default)("Identifier", node2.property, {
  13923. name: property
  13924. })) {
  13925. throw new TypeError("Unrecognised MetaProperty");
  13926. }
  13927. }, {
  13928. oneOfNodeTypes: ["Identifier"]
  13929. }))
  13930. },
  13931. property: {
  13932. validate: (0, _utils.assertNodeType)("Identifier")
  13933. }
  13934. }
  13935. });
  13936. var classMethodOrPropertyCommon = () => ({
  13937. abstract: {
  13938. validate: (0, _utils.assertValueType)("boolean"),
  13939. optional: true
  13940. },
  13941. accessibility: {
  13942. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  13943. optional: true
  13944. },
  13945. static: {
  13946. default: false
  13947. },
  13948. override: {
  13949. default: false
  13950. },
  13951. computed: {
  13952. default: false
  13953. },
  13954. optional: {
  13955. validate: (0, _utils.assertValueType)("boolean"),
  13956. optional: true
  13957. },
  13958. key: {
  13959. validate: (0, _utils.chain)(function() {
  13960. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
  13961. const computed = (0, _utils.assertNodeType)("Expression");
  13962. return function(node2, key2, val) {
  13963. const validator = node2.computed ? computed : normal;
  13964. validator(node2, key2, val);
  13965. };
  13966. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression"))
  13967. }
  13968. });
  13969. exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
  13970. var classMethodOrDeclareMethodCommon = () => Object.assign({}, functionCommon(), classMethodOrPropertyCommon(), {
  13971. params: {
  13972. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  13973. },
  13974. kind: {
  13975. validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
  13976. default: "method"
  13977. },
  13978. access: {
  13979. validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
  13980. optional: true
  13981. },
  13982. decorators: {
  13983. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  13984. optional: true
  13985. }
  13986. });
  13987. exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
  13988. defineType("ClassMethod", {
  13989. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  13990. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  13991. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  13992. fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), {
  13993. body: {
  13994. validate: (0, _utils.assertNodeType)("BlockStatement")
  13995. }
  13996. })
  13997. });
  13998. defineType("ObjectPattern", {
  13999. visitor: ["properties", "typeAnnotation", "decorators"],
  14000. builder: ["properties"],
  14001. aliases: ["Pattern", "PatternLike", "LVal"],
  14002. fields: Object.assign({}, patternLikeCommon(), {
  14003. properties: {
  14004. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
  14005. }
  14006. })
  14007. });
  14008. defineType("SpreadElement", {
  14009. visitor: ["argument"],
  14010. aliases: ["UnaryLike"],
  14011. deprecatedAlias: "SpreadProperty",
  14012. fields: {
  14013. argument: {
  14014. validate: (0, _utils.assertNodeType)("Expression")
  14015. }
  14016. }
  14017. });
  14018. defineType("Super", {
  14019. aliases: ["Expression"]
  14020. });
  14021. defineType("TaggedTemplateExpression", {
  14022. visitor: ["tag", "quasi", "typeParameters"],
  14023. builder: ["tag", "quasi"],
  14024. aliases: ["Expression"],
  14025. fields: {
  14026. tag: {
  14027. validate: (0, _utils.assertNodeType)("Expression")
  14028. },
  14029. quasi: {
  14030. validate: (0, _utils.assertNodeType)("TemplateLiteral")
  14031. },
  14032. typeParameters: {
  14033. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  14034. optional: true
  14035. }
  14036. }
  14037. });
  14038. defineType("TemplateElement", {
  14039. builder: ["value", "tail"],
  14040. fields: {
  14041. value: {
  14042. validate: (0, _utils.chain)((0, _utils.assertShape)({
  14043. raw: {
  14044. validate: (0, _utils.assertValueType)("string")
  14045. },
  14046. cooked: {
  14047. validate: (0, _utils.assertValueType)("string"),
  14048. optional: true
  14049. }
  14050. }), function templateElementCookedValidator(node2) {
  14051. const raw = node2.value.raw;
  14052. let unterminatedCalled = false;
  14053. const error = () => {
  14054. throw new Error("Internal @babel/types error.");
  14055. };
  14056. const {
  14057. str,
  14058. firstInvalidLoc
  14059. } = (0, _helperStringParser.readStringContents)("template", raw, 0, 0, 0, {
  14060. unterminated() {
  14061. unterminatedCalled = true;
  14062. },
  14063. strictNumericEscape: error,
  14064. invalidEscapeSequence: error,
  14065. numericSeparatorInEscapeSequence: error,
  14066. unexpectedNumericSeparator: error,
  14067. invalidDigit: error,
  14068. invalidCodePoint: error
  14069. });
  14070. if (!unterminatedCalled)
  14071. throw new Error("Invalid raw");
  14072. node2.value.cooked = firstInvalidLoc ? null : str;
  14073. })
  14074. },
  14075. tail: {
  14076. default: false
  14077. }
  14078. }
  14079. });
  14080. defineType("TemplateLiteral", {
  14081. visitor: ["quasis", "expressions"],
  14082. aliases: ["Expression", "Literal"],
  14083. fields: {
  14084. quasis: {
  14085. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
  14086. },
  14087. expressions: {
  14088. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node2, key2, val) {
  14089. if (node2.quasis.length !== val.length + 1) {
  14090. throw new TypeError(`Number of ${node2.type} quasis should be exactly one more than the number of expressions.
  14091. Expected ${val.length + 1} quasis but got ${node2.quasis.length}`);
  14092. }
  14093. })
  14094. }
  14095. }
  14096. });
  14097. defineType("YieldExpression", {
  14098. builder: ["argument", "delegate"],
  14099. visitor: ["argument"],
  14100. aliases: ["Expression", "Terminatorless"],
  14101. fields: {
  14102. delegate: {
  14103. validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node2, key2, val) {
  14104. if (!process.env.BABEL_TYPES_8_BREAKING)
  14105. return;
  14106. if (val && !node2.argument) {
  14107. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  14108. }
  14109. }, {
  14110. type: "boolean"
  14111. })),
  14112. default: false
  14113. },
  14114. argument: {
  14115. optional: true,
  14116. validate: (0, _utils.assertNodeType)("Expression")
  14117. }
  14118. }
  14119. });
  14120. defineType("AwaitExpression", {
  14121. builder: ["argument"],
  14122. visitor: ["argument"],
  14123. aliases: ["Expression", "Terminatorless"],
  14124. fields: {
  14125. argument: {
  14126. validate: (0, _utils.assertNodeType)("Expression")
  14127. }
  14128. }
  14129. });
  14130. defineType("Import", {
  14131. aliases: ["Expression"]
  14132. });
  14133. defineType("BigIntLiteral", {
  14134. builder: ["value"],
  14135. fields: {
  14136. value: {
  14137. validate: (0, _utils.assertValueType)("string")
  14138. }
  14139. },
  14140. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  14141. });
  14142. defineType("ExportNamespaceSpecifier", {
  14143. visitor: ["exported"],
  14144. aliases: ["ModuleSpecifier"],
  14145. fields: {
  14146. exported: {
  14147. validate: (0, _utils.assertNodeType)("Identifier")
  14148. }
  14149. }
  14150. });
  14151. defineType("OptionalMemberExpression", {
  14152. builder: ["object", "property", "computed", "optional"],
  14153. visitor: ["object", "property"],
  14154. aliases: ["Expression"],
  14155. fields: {
  14156. object: {
  14157. validate: (0, _utils.assertNodeType)("Expression")
  14158. },
  14159. property: {
  14160. validate: function() {
  14161. const normal = (0, _utils.assertNodeType)("Identifier");
  14162. const computed = (0, _utils.assertNodeType)("Expression");
  14163. const validator = Object.assign(function(node2, key2, val) {
  14164. const validator2 = node2.computed ? computed : normal;
  14165. validator2(node2, key2, val);
  14166. }, {
  14167. oneOfNodeTypes: ["Expression", "Identifier"]
  14168. });
  14169. return validator;
  14170. }()
  14171. },
  14172. computed: {
  14173. default: false
  14174. },
  14175. optional: {
  14176. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  14177. }
  14178. }
  14179. });
  14180. defineType("OptionalCallExpression", {
  14181. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  14182. builder: ["callee", "arguments", "optional"],
  14183. aliases: ["Expression"],
  14184. fields: {
  14185. callee: {
  14186. validate: (0, _utils.assertNodeType)("Expression")
  14187. },
  14188. arguments: {
  14189. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  14190. },
  14191. optional: {
  14192. validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
  14193. },
  14194. typeArguments: {
  14195. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
  14196. optional: true
  14197. },
  14198. typeParameters: {
  14199. validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
  14200. optional: true
  14201. }
  14202. }
  14203. });
  14204. defineType("ClassProperty", {
  14205. visitor: ["key", "value", "typeAnnotation", "decorators"],
  14206. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  14207. aliases: ["Property"],
  14208. fields: Object.assign({}, classMethodOrPropertyCommon(), {
  14209. value: {
  14210. validate: (0, _utils.assertNodeType)("Expression"),
  14211. optional: true
  14212. },
  14213. definite: {
  14214. validate: (0, _utils.assertValueType)("boolean"),
  14215. optional: true
  14216. },
  14217. typeAnnotation: {
  14218. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  14219. optional: true
  14220. },
  14221. decorators: {
  14222. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  14223. optional: true
  14224. },
  14225. readonly: {
  14226. validate: (0, _utils.assertValueType)("boolean"),
  14227. optional: true
  14228. },
  14229. declare: {
  14230. validate: (0, _utils.assertValueType)("boolean"),
  14231. optional: true
  14232. },
  14233. variance: {
  14234. validate: (0, _utils.assertNodeType)("Variance"),
  14235. optional: true
  14236. }
  14237. })
  14238. });
  14239. defineType("ClassAccessorProperty", {
  14240. visitor: ["key", "value", "typeAnnotation", "decorators"],
  14241. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  14242. aliases: ["Property", "Accessor"],
  14243. fields: Object.assign({}, classMethodOrPropertyCommon(), {
  14244. key: {
  14245. validate: (0, _utils.chain)(function() {
  14246. const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "PrivateName");
  14247. const computed = (0, _utils.assertNodeType)("Expression");
  14248. return function(node2, key2, val) {
  14249. const validator = node2.computed ? computed : normal;
  14250. validator(node2, key2, val);
  14251. };
  14252. }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression", "PrivateName"))
  14253. },
  14254. value: {
  14255. validate: (0, _utils.assertNodeType)("Expression"),
  14256. optional: true
  14257. },
  14258. definite: {
  14259. validate: (0, _utils.assertValueType)("boolean"),
  14260. optional: true
  14261. },
  14262. typeAnnotation: {
  14263. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  14264. optional: true
  14265. },
  14266. decorators: {
  14267. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  14268. optional: true
  14269. },
  14270. readonly: {
  14271. validate: (0, _utils.assertValueType)("boolean"),
  14272. optional: true
  14273. },
  14274. declare: {
  14275. validate: (0, _utils.assertValueType)("boolean"),
  14276. optional: true
  14277. },
  14278. variance: {
  14279. validate: (0, _utils.assertNodeType)("Variance"),
  14280. optional: true
  14281. }
  14282. })
  14283. });
  14284. defineType("ClassPrivateProperty", {
  14285. visitor: ["key", "value", "decorators", "typeAnnotation"],
  14286. builder: ["key", "value", "decorators", "static"],
  14287. aliases: ["Property", "Private"],
  14288. fields: {
  14289. key: {
  14290. validate: (0, _utils.assertNodeType)("PrivateName")
  14291. },
  14292. value: {
  14293. validate: (0, _utils.assertNodeType)("Expression"),
  14294. optional: true
  14295. },
  14296. typeAnnotation: {
  14297. validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  14298. optional: true
  14299. },
  14300. decorators: {
  14301. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  14302. optional: true
  14303. },
  14304. static: {
  14305. validate: (0, _utils.assertValueType)("boolean"),
  14306. default: false
  14307. },
  14308. readonly: {
  14309. validate: (0, _utils.assertValueType)("boolean"),
  14310. optional: true
  14311. },
  14312. definite: {
  14313. validate: (0, _utils.assertValueType)("boolean"),
  14314. optional: true
  14315. },
  14316. variance: {
  14317. validate: (0, _utils.assertNodeType)("Variance"),
  14318. optional: true
  14319. }
  14320. }
  14321. });
  14322. defineType("ClassPrivateMethod", {
  14323. builder: ["kind", "key", "params", "body", "static"],
  14324. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  14325. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  14326. fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), {
  14327. kind: {
  14328. validate: (0, _utils.assertOneOf)("get", "set", "method"),
  14329. default: "method"
  14330. },
  14331. key: {
  14332. validate: (0, _utils.assertNodeType)("PrivateName")
  14333. },
  14334. body: {
  14335. validate: (0, _utils.assertNodeType)("BlockStatement")
  14336. }
  14337. })
  14338. });
  14339. defineType("PrivateName", {
  14340. visitor: ["id"],
  14341. aliases: ["Private"],
  14342. fields: {
  14343. id: {
  14344. validate: (0, _utils.assertNodeType)("Identifier")
  14345. }
  14346. }
  14347. });
  14348. defineType("StaticBlock", {
  14349. visitor: ["body"],
  14350. fields: {
  14351. body: {
  14352. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
  14353. }
  14354. },
  14355. aliases: ["Scopable", "BlockParent", "FunctionParent"]
  14356. });
  14357. }
  14358. });
  14359. // node_modules/@babel/types/lib/definitions/flow.js
  14360. var require_flow = __commonJS({
  14361. "node_modules/@babel/types/lib/definitions/flow.js"() {
  14362. "use strict";
  14363. var _utils = require_utils();
  14364. var defineType = (0, _utils.defineAliasedType)("Flow");
  14365. var defineInterfaceishType = (name2) => {
  14366. defineType(name2, {
  14367. builder: ["id", "typeParameters", "extends", "body"],
  14368. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  14369. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14370. fields: {
  14371. id: (0, _utils.validateType)("Identifier"),
  14372. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  14373. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  14374. mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  14375. implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
  14376. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  14377. }
  14378. });
  14379. };
  14380. defineType("AnyTypeAnnotation", {
  14381. aliases: ["FlowType", "FlowBaseAnnotation"]
  14382. });
  14383. defineType("ArrayTypeAnnotation", {
  14384. visitor: ["elementType"],
  14385. aliases: ["FlowType"],
  14386. fields: {
  14387. elementType: (0, _utils.validateType)("FlowType")
  14388. }
  14389. });
  14390. defineType("BooleanTypeAnnotation", {
  14391. aliases: ["FlowType", "FlowBaseAnnotation"]
  14392. });
  14393. defineType("BooleanLiteralTypeAnnotation", {
  14394. builder: ["value"],
  14395. aliases: ["FlowType"],
  14396. fields: {
  14397. value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  14398. }
  14399. });
  14400. defineType("NullLiteralTypeAnnotation", {
  14401. aliases: ["FlowType", "FlowBaseAnnotation"]
  14402. });
  14403. defineType("ClassImplements", {
  14404. visitor: ["id", "typeParameters"],
  14405. fields: {
  14406. id: (0, _utils.validateType)("Identifier"),
  14407. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  14408. }
  14409. });
  14410. defineInterfaceishType("DeclareClass");
  14411. defineType("DeclareFunction", {
  14412. visitor: ["id"],
  14413. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14414. fields: {
  14415. id: (0, _utils.validateType)("Identifier"),
  14416. predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
  14417. }
  14418. });
  14419. defineInterfaceishType("DeclareInterface");
  14420. defineType("DeclareModule", {
  14421. builder: ["id", "body", "kind"],
  14422. visitor: ["id", "body"],
  14423. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14424. fields: {
  14425. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  14426. body: (0, _utils.validateType)("BlockStatement"),
  14427. kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
  14428. }
  14429. });
  14430. defineType("DeclareModuleExports", {
  14431. visitor: ["typeAnnotation"],
  14432. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14433. fields: {
  14434. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  14435. }
  14436. });
  14437. defineType("DeclareTypeAlias", {
  14438. visitor: ["id", "typeParameters", "right"],
  14439. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14440. fields: {
  14441. id: (0, _utils.validateType)("Identifier"),
  14442. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  14443. right: (0, _utils.validateType)("FlowType")
  14444. }
  14445. });
  14446. defineType("DeclareOpaqueType", {
  14447. visitor: ["id", "typeParameters", "supertype"],
  14448. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14449. fields: {
  14450. id: (0, _utils.validateType)("Identifier"),
  14451. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  14452. supertype: (0, _utils.validateOptionalType)("FlowType"),
  14453. impltype: (0, _utils.validateOptionalType)("FlowType")
  14454. }
  14455. });
  14456. defineType("DeclareVariable", {
  14457. visitor: ["id"],
  14458. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14459. fields: {
  14460. id: (0, _utils.validateType)("Identifier")
  14461. }
  14462. });
  14463. defineType("DeclareExportDeclaration", {
  14464. visitor: ["declaration", "specifiers", "source"],
  14465. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14466. fields: {
  14467. declaration: (0, _utils.validateOptionalType)("Flow"),
  14468. specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  14469. source: (0, _utils.validateOptionalType)("StringLiteral"),
  14470. default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  14471. }
  14472. });
  14473. defineType("DeclareExportAllDeclaration", {
  14474. visitor: ["source"],
  14475. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14476. fields: {
  14477. source: (0, _utils.validateType)("StringLiteral"),
  14478. exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
  14479. }
  14480. });
  14481. defineType("DeclaredPredicate", {
  14482. visitor: ["value"],
  14483. aliases: ["FlowPredicate"],
  14484. fields: {
  14485. value: (0, _utils.validateType)("Flow")
  14486. }
  14487. });
  14488. defineType("ExistsTypeAnnotation", {
  14489. aliases: ["FlowType"]
  14490. });
  14491. defineType("FunctionTypeAnnotation", {
  14492. visitor: ["typeParameters", "params", "rest", "returnType"],
  14493. aliases: ["FlowType"],
  14494. fields: {
  14495. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  14496. params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
  14497. rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  14498. this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
  14499. returnType: (0, _utils.validateType)("FlowType")
  14500. }
  14501. });
  14502. defineType("FunctionTypeParam", {
  14503. visitor: ["name", "typeAnnotation"],
  14504. fields: {
  14505. name: (0, _utils.validateOptionalType)("Identifier"),
  14506. typeAnnotation: (0, _utils.validateType)("FlowType"),
  14507. optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  14508. }
  14509. });
  14510. defineType("GenericTypeAnnotation", {
  14511. visitor: ["id", "typeParameters"],
  14512. aliases: ["FlowType"],
  14513. fields: {
  14514. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  14515. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  14516. }
  14517. });
  14518. defineType("InferredPredicate", {
  14519. aliases: ["FlowPredicate"]
  14520. });
  14521. defineType("InterfaceExtends", {
  14522. visitor: ["id", "typeParameters"],
  14523. fields: {
  14524. id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
  14525. typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
  14526. }
  14527. });
  14528. defineInterfaceishType("InterfaceDeclaration");
  14529. defineType("InterfaceTypeAnnotation", {
  14530. visitor: ["extends", "body"],
  14531. aliases: ["FlowType"],
  14532. fields: {
  14533. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
  14534. body: (0, _utils.validateType)("ObjectTypeAnnotation")
  14535. }
  14536. });
  14537. defineType("IntersectionTypeAnnotation", {
  14538. visitor: ["types"],
  14539. aliases: ["FlowType"],
  14540. fields: {
  14541. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  14542. }
  14543. });
  14544. defineType("MixedTypeAnnotation", {
  14545. aliases: ["FlowType", "FlowBaseAnnotation"]
  14546. });
  14547. defineType("EmptyTypeAnnotation", {
  14548. aliases: ["FlowType", "FlowBaseAnnotation"]
  14549. });
  14550. defineType("NullableTypeAnnotation", {
  14551. visitor: ["typeAnnotation"],
  14552. aliases: ["FlowType"],
  14553. fields: {
  14554. typeAnnotation: (0, _utils.validateType)("FlowType")
  14555. }
  14556. });
  14557. defineType("NumberLiteralTypeAnnotation", {
  14558. builder: ["value"],
  14559. aliases: ["FlowType"],
  14560. fields: {
  14561. value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
  14562. }
  14563. });
  14564. defineType("NumberTypeAnnotation", {
  14565. aliases: ["FlowType", "FlowBaseAnnotation"]
  14566. });
  14567. defineType("ObjectTypeAnnotation", {
  14568. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  14569. aliases: ["FlowType"],
  14570. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  14571. fields: {
  14572. properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  14573. indexers: {
  14574. validate: (0, _utils.arrayOfType)("ObjectTypeIndexer"),
  14575. optional: true,
  14576. default: []
  14577. },
  14578. callProperties: {
  14579. validate: (0, _utils.arrayOfType)("ObjectTypeCallProperty"),
  14580. optional: true,
  14581. default: []
  14582. },
  14583. internalSlots: {
  14584. validate: (0, _utils.arrayOfType)("ObjectTypeInternalSlot"),
  14585. optional: true,
  14586. default: []
  14587. },
  14588. exact: {
  14589. validate: (0, _utils.assertValueType)("boolean"),
  14590. default: false
  14591. },
  14592. inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
  14593. }
  14594. });
  14595. defineType("ObjectTypeInternalSlot", {
  14596. visitor: ["id", "value", "optional", "static", "method"],
  14597. aliases: ["UserWhitespacable"],
  14598. fields: {
  14599. id: (0, _utils.validateType)("Identifier"),
  14600. value: (0, _utils.validateType)("FlowType"),
  14601. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  14602. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  14603. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  14604. }
  14605. });
  14606. defineType("ObjectTypeCallProperty", {
  14607. visitor: ["value"],
  14608. aliases: ["UserWhitespacable"],
  14609. fields: {
  14610. value: (0, _utils.validateType)("FlowType"),
  14611. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  14612. }
  14613. });
  14614. defineType("ObjectTypeIndexer", {
  14615. visitor: ["id", "key", "value", "variance"],
  14616. aliases: ["UserWhitespacable"],
  14617. fields: {
  14618. id: (0, _utils.validateOptionalType)("Identifier"),
  14619. key: (0, _utils.validateType)("FlowType"),
  14620. value: (0, _utils.validateType)("FlowType"),
  14621. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  14622. variance: (0, _utils.validateOptionalType)("Variance")
  14623. }
  14624. });
  14625. defineType("ObjectTypeProperty", {
  14626. visitor: ["key", "value", "variance"],
  14627. aliases: ["UserWhitespacable"],
  14628. fields: {
  14629. key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  14630. value: (0, _utils.validateType)("FlowType"),
  14631. kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
  14632. static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  14633. proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  14634. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  14635. variance: (0, _utils.validateOptionalType)("Variance"),
  14636. method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  14637. }
  14638. });
  14639. defineType("ObjectTypeSpreadProperty", {
  14640. visitor: ["argument"],
  14641. aliases: ["UserWhitespacable"],
  14642. fields: {
  14643. argument: (0, _utils.validateType)("FlowType")
  14644. }
  14645. });
  14646. defineType("OpaqueType", {
  14647. visitor: ["id", "typeParameters", "supertype", "impltype"],
  14648. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14649. fields: {
  14650. id: (0, _utils.validateType)("Identifier"),
  14651. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  14652. supertype: (0, _utils.validateOptionalType)("FlowType"),
  14653. impltype: (0, _utils.validateType)("FlowType")
  14654. }
  14655. });
  14656. defineType("QualifiedTypeIdentifier", {
  14657. visitor: ["id", "qualification"],
  14658. fields: {
  14659. id: (0, _utils.validateType)("Identifier"),
  14660. qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
  14661. }
  14662. });
  14663. defineType("StringLiteralTypeAnnotation", {
  14664. builder: ["value"],
  14665. aliases: ["FlowType"],
  14666. fields: {
  14667. value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
  14668. }
  14669. });
  14670. defineType("StringTypeAnnotation", {
  14671. aliases: ["FlowType", "FlowBaseAnnotation"]
  14672. });
  14673. defineType("SymbolTypeAnnotation", {
  14674. aliases: ["FlowType", "FlowBaseAnnotation"]
  14675. });
  14676. defineType("ThisTypeAnnotation", {
  14677. aliases: ["FlowType", "FlowBaseAnnotation"]
  14678. });
  14679. defineType("TupleTypeAnnotation", {
  14680. visitor: ["types"],
  14681. aliases: ["FlowType"],
  14682. fields: {
  14683. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  14684. }
  14685. });
  14686. defineType("TypeofTypeAnnotation", {
  14687. visitor: ["argument"],
  14688. aliases: ["FlowType"],
  14689. fields: {
  14690. argument: (0, _utils.validateType)("FlowType")
  14691. }
  14692. });
  14693. defineType("TypeAlias", {
  14694. visitor: ["id", "typeParameters", "right"],
  14695. aliases: ["FlowDeclaration", "Statement", "Declaration"],
  14696. fields: {
  14697. id: (0, _utils.validateType)("Identifier"),
  14698. typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
  14699. right: (0, _utils.validateType)("FlowType")
  14700. }
  14701. });
  14702. defineType("TypeAnnotation", {
  14703. visitor: ["typeAnnotation"],
  14704. fields: {
  14705. typeAnnotation: (0, _utils.validateType)("FlowType")
  14706. }
  14707. });
  14708. defineType("TypeCastExpression", {
  14709. visitor: ["expression", "typeAnnotation"],
  14710. aliases: ["ExpressionWrapper", "Expression"],
  14711. fields: {
  14712. expression: (0, _utils.validateType)("Expression"),
  14713. typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
  14714. }
  14715. });
  14716. defineType("TypeParameter", {
  14717. visitor: ["bound", "default", "variance"],
  14718. fields: {
  14719. name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  14720. bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
  14721. default: (0, _utils.validateOptionalType)("FlowType"),
  14722. variance: (0, _utils.validateOptionalType)("Variance")
  14723. }
  14724. });
  14725. defineType("TypeParameterDeclaration", {
  14726. visitor: ["params"],
  14727. fields: {
  14728. params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
  14729. }
  14730. });
  14731. defineType("TypeParameterInstantiation", {
  14732. visitor: ["params"],
  14733. fields: {
  14734. params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  14735. }
  14736. });
  14737. defineType("UnionTypeAnnotation", {
  14738. visitor: ["types"],
  14739. aliases: ["FlowType"],
  14740. fields: {
  14741. types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
  14742. }
  14743. });
  14744. defineType("Variance", {
  14745. builder: ["kind"],
  14746. fields: {
  14747. kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
  14748. }
  14749. });
  14750. defineType("VoidTypeAnnotation", {
  14751. aliases: ["FlowType", "FlowBaseAnnotation"]
  14752. });
  14753. defineType("EnumDeclaration", {
  14754. aliases: ["Statement", "Declaration"],
  14755. visitor: ["id", "body"],
  14756. fields: {
  14757. id: (0, _utils.validateType)("Identifier"),
  14758. body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  14759. }
  14760. });
  14761. defineType("EnumBooleanBody", {
  14762. aliases: ["EnumBody"],
  14763. visitor: ["members"],
  14764. fields: {
  14765. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  14766. members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
  14767. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  14768. }
  14769. });
  14770. defineType("EnumNumberBody", {
  14771. aliases: ["EnumBody"],
  14772. visitor: ["members"],
  14773. fields: {
  14774. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  14775. members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
  14776. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  14777. }
  14778. });
  14779. defineType("EnumStringBody", {
  14780. aliases: ["EnumBody"],
  14781. visitor: ["members"],
  14782. fields: {
  14783. explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
  14784. members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
  14785. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  14786. }
  14787. });
  14788. defineType("EnumSymbolBody", {
  14789. aliases: ["EnumBody"],
  14790. visitor: ["members"],
  14791. fields: {
  14792. members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
  14793. hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  14794. }
  14795. });
  14796. defineType("EnumBooleanMember", {
  14797. aliases: ["EnumMember"],
  14798. visitor: ["id"],
  14799. fields: {
  14800. id: (0, _utils.validateType)("Identifier"),
  14801. init: (0, _utils.validateType)("BooleanLiteral")
  14802. }
  14803. });
  14804. defineType("EnumNumberMember", {
  14805. aliases: ["EnumMember"],
  14806. visitor: ["id", "init"],
  14807. fields: {
  14808. id: (0, _utils.validateType)("Identifier"),
  14809. init: (0, _utils.validateType)("NumericLiteral")
  14810. }
  14811. });
  14812. defineType("EnumStringMember", {
  14813. aliases: ["EnumMember"],
  14814. visitor: ["id", "init"],
  14815. fields: {
  14816. id: (0, _utils.validateType)("Identifier"),
  14817. init: (0, _utils.validateType)("StringLiteral")
  14818. }
  14819. });
  14820. defineType("EnumDefaultedMember", {
  14821. aliases: ["EnumMember"],
  14822. visitor: ["id"],
  14823. fields: {
  14824. id: (0, _utils.validateType)("Identifier")
  14825. }
  14826. });
  14827. defineType("IndexedAccessType", {
  14828. visitor: ["objectType", "indexType"],
  14829. aliases: ["FlowType"],
  14830. fields: {
  14831. objectType: (0, _utils.validateType)("FlowType"),
  14832. indexType: (0, _utils.validateType)("FlowType")
  14833. }
  14834. });
  14835. defineType("OptionalIndexedAccessType", {
  14836. visitor: ["objectType", "indexType"],
  14837. aliases: ["FlowType"],
  14838. fields: {
  14839. objectType: (0, _utils.validateType)("FlowType"),
  14840. indexType: (0, _utils.validateType)("FlowType"),
  14841. optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
  14842. }
  14843. });
  14844. }
  14845. });
  14846. // node_modules/@babel/types/lib/definitions/jsx.js
  14847. var require_jsx = __commonJS({
  14848. "node_modules/@babel/types/lib/definitions/jsx.js"() {
  14849. "use strict";
  14850. var _utils = require_utils();
  14851. var defineType = (0, _utils.defineAliasedType)("JSX");
  14852. defineType("JSXAttribute", {
  14853. visitor: ["name", "value"],
  14854. aliases: ["Immutable"],
  14855. fields: {
  14856. name: {
  14857. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  14858. },
  14859. value: {
  14860. optional: true,
  14861. validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  14862. }
  14863. }
  14864. });
  14865. defineType("JSXClosingElement", {
  14866. visitor: ["name"],
  14867. aliases: ["Immutable"],
  14868. fields: {
  14869. name: {
  14870. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  14871. }
  14872. }
  14873. });
  14874. defineType("JSXElement", {
  14875. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  14876. visitor: ["openingElement", "children", "closingElement"],
  14877. aliases: ["Immutable", "Expression"],
  14878. fields: Object.assign({
  14879. openingElement: {
  14880. validate: (0, _utils.assertNodeType)("JSXOpeningElement")
  14881. },
  14882. closingElement: {
  14883. optional: true,
  14884. validate: (0, _utils.assertNodeType)("JSXClosingElement")
  14885. },
  14886. children: {
  14887. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  14888. }
  14889. }, {
  14890. selfClosing: {
  14891. validate: (0, _utils.assertValueType)("boolean"),
  14892. optional: true
  14893. }
  14894. })
  14895. });
  14896. defineType("JSXEmptyExpression", {});
  14897. defineType("JSXExpressionContainer", {
  14898. visitor: ["expression"],
  14899. aliases: ["Immutable"],
  14900. fields: {
  14901. expression: {
  14902. validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
  14903. }
  14904. }
  14905. });
  14906. defineType("JSXSpreadChild", {
  14907. visitor: ["expression"],
  14908. aliases: ["Immutable"],
  14909. fields: {
  14910. expression: {
  14911. validate: (0, _utils.assertNodeType)("Expression")
  14912. }
  14913. }
  14914. });
  14915. defineType("JSXIdentifier", {
  14916. builder: ["name"],
  14917. fields: {
  14918. name: {
  14919. validate: (0, _utils.assertValueType)("string")
  14920. }
  14921. }
  14922. });
  14923. defineType("JSXMemberExpression", {
  14924. visitor: ["object", "property"],
  14925. fields: {
  14926. object: {
  14927. validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  14928. },
  14929. property: {
  14930. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  14931. }
  14932. }
  14933. });
  14934. defineType("JSXNamespacedName", {
  14935. visitor: ["namespace", "name"],
  14936. fields: {
  14937. namespace: {
  14938. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  14939. },
  14940. name: {
  14941. validate: (0, _utils.assertNodeType)("JSXIdentifier")
  14942. }
  14943. }
  14944. });
  14945. defineType("JSXOpeningElement", {
  14946. builder: ["name", "attributes", "selfClosing"],
  14947. visitor: ["name", "attributes"],
  14948. aliases: ["Immutable"],
  14949. fields: {
  14950. name: {
  14951. validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  14952. },
  14953. selfClosing: {
  14954. default: false
  14955. },
  14956. attributes: {
  14957. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  14958. },
  14959. typeParameters: {
  14960. validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  14961. optional: true
  14962. }
  14963. }
  14964. });
  14965. defineType("JSXSpreadAttribute", {
  14966. visitor: ["argument"],
  14967. fields: {
  14968. argument: {
  14969. validate: (0, _utils.assertNodeType)("Expression")
  14970. }
  14971. }
  14972. });
  14973. defineType("JSXText", {
  14974. aliases: ["Immutable"],
  14975. builder: ["value"],
  14976. fields: {
  14977. value: {
  14978. validate: (0, _utils.assertValueType)("string")
  14979. }
  14980. }
  14981. });
  14982. defineType("JSXFragment", {
  14983. builder: ["openingFragment", "closingFragment", "children"],
  14984. visitor: ["openingFragment", "children", "closingFragment"],
  14985. aliases: ["Immutable", "Expression"],
  14986. fields: {
  14987. openingFragment: {
  14988. validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
  14989. },
  14990. closingFragment: {
  14991. validate: (0, _utils.assertNodeType)("JSXClosingFragment")
  14992. },
  14993. children: {
  14994. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  14995. }
  14996. }
  14997. });
  14998. defineType("JSXOpeningFragment", {
  14999. aliases: ["Immutable"]
  15000. });
  15001. defineType("JSXClosingFragment", {
  15002. aliases: ["Immutable"]
  15003. });
  15004. }
  15005. });
  15006. // node_modules/@babel/types/lib/definitions/placeholders.js
  15007. var require_placeholders = __commonJS({
  15008. "node_modules/@babel/types/lib/definitions/placeholders.js"(exports) {
  15009. "use strict";
  15010. Object.defineProperty(exports, "__esModule", {
  15011. value: true
  15012. });
  15013. exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
  15014. var _utils = require_utils();
  15015. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  15016. exports.PLACEHOLDERS = PLACEHOLDERS;
  15017. var PLACEHOLDERS_ALIAS = {
  15018. Declaration: ["Statement"],
  15019. Pattern: ["PatternLike", "LVal"]
  15020. };
  15021. exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
  15022. for (const type of PLACEHOLDERS) {
  15023. const alias = _utils.ALIAS_KEYS[type];
  15024. if (alias != null && alias.length)
  15025. PLACEHOLDERS_ALIAS[type] = alias;
  15026. }
  15027. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  15028. exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
  15029. Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => {
  15030. PLACEHOLDERS_ALIAS[type].forEach((alias) => {
  15031. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  15032. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  15033. }
  15034. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  15035. });
  15036. });
  15037. }
  15038. });
  15039. // node_modules/@babel/types/lib/definitions/misc.js
  15040. var require_misc = __commonJS({
  15041. "node_modules/@babel/types/lib/definitions/misc.js"() {
  15042. "use strict";
  15043. var _utils = require_utils();
  15044. var _placeholders = require_placeholders();
  15045. var defineType = (0, _utils.defineAliasedType)("Miscellaneous");
  15046. {
  15047. defineType("Noop", {
  15048. visitor: []
  15049. });
  15050. }
  15051. defineType("Placeholder", {
  15052. visitor: [],
  15053. builder: ["expectedNode", "name"],
  15054. fields: {
  15055. name: {
  15056. validate: (0, _utils.assertNodeType)("Identifier")
  15057. },
  15058. expectedNode: {
  15059. validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
  15060. }
  15061. }
  15062. });
  15063. defineType("V8IntrinsicIdentifier", {
  15064. builder: ["name"],
  15065. fields: {
  15066. name: {
  15067. validate: (0, _utils.assertValueType)("string")
  15068. }
  15069. }
  15070. });
  15071. }
  15072. });
  15073. // node_modules/@babel/types/lib/definitions/experimental.js
  15074. var require_experimental = __commonJS({
  15075. "node_modules/@babel/types/lib/definitions/experimental.js"() {
  15076. "use strict";
  15077. var _utils = require_utils();
  15078. (0, _utils.default)("ArgumentPlaceholder", {});
  15079. (0, _utils.default)("BindExpression", {
  15080. visitor: ["object", "callee"],
  15081. aliases: ["Expression"],
  15082. fields: !process.env.BABEL_TYPES_8_BREAKING ? {
  15083. object: {
  15084. validate: Object.assign(() => {
  15085. }, {
  15086. oneOfNodeTypes: ["Expression"]
  15087. })
  15088. },
  15089. callee: {
  15090. validate: Object.assign(() => {
  15091. }, {
  15092. oneOfNodeTypes: ["Expression"]
  15093. })
  15094. }
  15095. } : {
  15096. object: {
  15097. validate: (0, _utils.assertNodeType)("Expression")
  15098. },
  15099. callee: {
  15100. validate: (0, _utils.assertNodeType)("Expression")
  15101. }
  15102. }
  15103. });
  15104. (0, _utils.default)("ImportAttribute", {
  15105. visitor: ["key", "value"],
  15106. fields: {
  15107. key: {
  15108. validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
  15109. },
  15110. value: {
  15111. validate: (0, _utils.assertNodeType)("StringLiteral")
  15112. }
  15113. }
  15114. });
  15115. (0, _utils.default)("Decorator", {
  15116. visitor: ["expression"],
  15117. fields: {
  15118. expression: {
  15119. validate: (0, _utils.assertNodeType)("Expression")
  15120. }
  15121. }
  15122. });
  15123. (0, _utils.default)("DoExpression", {
  15124. visitor: ["body"],
  15125. builder: ["body", "async"],
  15126. aliases: ["Expression"],
  15127. fields: {
  15128. body: {
  15129. validate: (0, _utils.assertNodeType)("BlockStatement")
  15130. },
  15131. async: {
  15132. validate: (0, _utils.assertValueType)("boolean"),
  15133. default: false
  15134. }
  15135. }
  15136. });
  15137. (0, _utils.default)("ExportDefaultSpecifier", {
  15138. visitor: ["exported"],
  15139. aliases: ["ModuleSpecifier"],
  15140. fields: {
  15141. exported: {
  15142. validate: (0, _utils.assertNodeType)("Identifier")
  15143. }
  15144. }
  15145. });
  15146. (0, _utils.default)("RecordExpression", {
  15147. visitor: ["properties"],
  15148. aliases: ["Expression"],
  15149. fields: {
  15150. properties: {
  15151. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
  15152. }
  15153. }
  15154. });
  15155. (0, _utils.default)("TupleExpression", {
  15156. fields: {
  15157. elements: {
  15158. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
  15159. default: []
  15160. }
  15161. },
  15162. visitor: ["elements"],
  15163. aliases: ["Expression"]
  15164. });
  15165. (0, _utils.default)("DecimalLiteral", {
  15166. builder: ["value"],
  15167. fields: {
  15168. value: {
  15169. validate: (0, _utils.assertValueType)("string")
  15170. }
  15171. },
  15172. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  15173. });
  15174. (0, _utils.default)("ModuleExpression", {
  15175. visitor: ["body"],
  15176. fields: {
  15177. body: {
  15178. validate: (0, _utils.assertNodeType)("Program")
  15179. }
  15180. },
  15181. aliases: ["Expression"]
  15182. });
  15183. (0, _utils.default)("TopicReference", {
  15184. aliases: ["Expression"]
  15185. });
  15186. (0, _utils.default)("PipelineTopicExpression", {
  15187. builder: ["expression"],
  15188. visitor: ["expression"],
  15189. fields: {
  15190. expression: {
  15191. validate: (0, _utils.assertNodeType)("Expression")
  15192. }
  15193. },
  15194. aliases: ["Expression"]
  15195. });
  15196. (0, _utils.default)("PipelineBareFunction", {
  15197. builder: ["callee"],
  15198. visitor: ["callee"],
  15199. fields: {
  15200. callee: {
  15201. validate: (0, _utils.assertNodeType)("Expression")
  15202. }
  15203. },
  15204. aliases: ["Expression"]
  15205. });
  15206. (0, _utils.default)("PipelinePrimaryTopicReference", {
  15207. aliases: ["Expression"]
  15208. });
  15209. }
  15210. });
  15211. // node_modules/@babel/types/lib/definitions/typescript.js
  15212. var require_typescript = __commonJS({
  15213. "node_modules/@babel/types/lib/definitions/typescript.js"() {
  15214. "use strict";
  15215. var _utils = require_utils();
  15216. var _core = require_core();
  15217. var _is = require_is();
  15218. var defineType = (0, _utils.defineAliasedType)("TypeScript");
  15219. var bool = (0, _utils.assertValueType)("boolean");
  15220. var tSFunctionTypeAnnotationCommon = () => ({
  15221. returnType: {
  15222. validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
  15223. optional: true
  15224. },
  15225. typeParameters: {
  15226. validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
  15227. optional: true
  15228. }
  15229. });
  15230. defineType("TSParameterProperty", {
  15231. aliases: ["LVal"],
  15232. visitor: ["parameter"],
  15233. fields: {
  15234. accessibility: {
  15235. validate: (0, _utils.assertOneOf)("public", "private", "protected"),
  15236. optional: true
  15237. },
  15238. readonly: {
  15239. validate: (0, _utils.assertValueType)("boolean"),
  15240. optional: true
  15241. },
  15242. parameter: {
  15243. validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
  15244. },
  15245. override: {
  15246. validate: (0, _utils.assertValueType)("boolean"),
  15247. optional: true
  15248. },
  15249. decorators: {
  15250. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
  15251. optional: true
  15252. }
  15253. }
  15254. });
  15255. defineType("TSDeclareFunction", {
  15256. aliases: ["Statement", "Declaration"],
  15257. visitor: ["id", "typeParameters", "params", "returnType"],
  15258. fields: Object.assign({}, (0, _core.functionDeclarationCommon)(), tSFunctionTypeAnnotationCommon())
  15259. });
  15260. defineType("TSDeclareMethod", {
  15261. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  15262. fields: Object.assign({}, (0, _core.classMethodOrDeclareMethodCommon)(), tSFunctionTypeAnnotationCommon())
  15263. });
  15264. defineType("TSQualifiedName", {
  15265. aliases: ["TSEntityName"],
  15266. visitor: ["left", "right"],
  15267. fields: {
  15268. left: (0, _utils.validateType)("TSEntityName"),
  15269. right: (0, _utils.validateType)("Identifier")
  15270. }
  15271. });
  15272. var signatureDeclarationCommon = () => ({
  15273. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  15274. ["parameters"]: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
  15275. ["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  15276. });
  15277. var callConstructSignatureDeclaration = {
  15278. aliases: ["TSTypeElement"],
  15279. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  15280. fields: signatureDeclarationCommon()
  15281. };
  15282. defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  15283. defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  15284. var namedTypeElementCommon = () => ({
  15285. key: (0, _utils.validateType)("Expression"),
  15286. computed: {
  15287. default: false
  15288. },
  15289. optional: (0, _utils.validateOptional)(bool)
  15290. });
  15291. defineType("TSPropertySignature", {
  15292. aliases: ["TSTypeElement"],
  15293. visitor: ["key", "typeAnnotation", "initializer"],
  15294. fields: Object.assign({}, namedTypeElementCommon(), {
  15295. readonly: (0, _utils.validateOptional)(bool),
  15296. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  15297. initializer: (0, _utils.validateOptionalType)("Expression"),
  15298. kind: {
  15299. validate: (0, _utils.assertOneOf)("get", "set")
  15300. }
  15301. })
  15302. });
  15303. defineType("TSMethodSignature", {
  15304. aliases: ["TSTypeElement"],
  15305. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  15306. fields: Object.assign({}, signatureDeclarationCommon(), namedTypeElementCommon(), {
  15307. kind: {
  15308. validate: (0, _utils.assertOneOf)("method", "get", "set")
  15309. }
  15310. })
  15311. });
  15312. defineType("TSIndexSignature", {
  15313. aliases: ["TSTypeElement"],
  15314. visitor: ["parameters", "typeAnnotation"],
  15315. fields: {
  15316. readonly: (0, _utils.validateOptional)(bool),
  15317. static: (0, _utils.validateOptional)(bool),
  15318. parameters: (0, _utils.validateArrayOfType)("Identifier"),
  15319. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
  15320. }
  15321. });
  15322. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  15323. for (const type of tsKeywordTypes) {
  15324. defineType(type, {
  15325. aliases: ["TSType", "TSBaseType"],
  15326. visitor: [],
  15327. fields: {}
  15328. });
  15329. }
  15330. defineType("TSThisType", {
  15331. aliases: ["TSType", "TSBaseType"],
  15332. visitor: [],
  15333. fields: {}
  15334. });
  15335. var fnOrCtrBase = {
  15336. aliases: ["TSType"],
  15337. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  15338. };
  15339. defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  15340. fields: signatureDeclarationCommon()
  15341. }));
  15342. defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  15343. fields: Object.assign({}, signatureDeclarationCommon(), {
  15344. abstract: (0, _utils.validateOptional)(bool)
  15345. })
  15346. }));
  15347. defineType("TSTypeReference", {
  15348. aliases: ["TSType"],
  15349. visitor: ["typeName", "typeParameters"],
  15350. fields: {
  15351. typeName: (0, _utils.validateType)("TSEntityName"),
  15352. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  15353. }
  15354. });
  15355. defineType("TSTypePredicate", {
  15356. aliases: ["TSType"],
  15357. visitor: ["parameterName", "typeAnnotation"],
  15358. builder: ["parameterName", "typeAnnotation", "asserts"],
  15359. fields: {
  15360. parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
  15361. typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
  15362. asserts: (0, _utils.validateOptional)(bool)
  15363. }
  15364. });
  15365. defineType("TSTypeQuery", {
  15366. aliases: ["TSType"],
  15367. visitor: ["exprName", "typeParameters"],
  15368. fields: {
  15369. exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]),
  15370. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  15371. }
  15372. });
  15373. defineType("TSTypeLiteral", {
  15374. aliases: ["TSType"],
  15375. visitor: ["members"],
  15376. fields: {
  15377. members: (0, _utils.validateArrayOfType)("TSTypeElement")
  15378. }
  15379. });
  15380. defineType("TSArrayType", {
  15381. aliases: ["TSType"],
  15382. visitor: ["elementType"],
  15383. fields: {
  15384. elementType: (0, _utils.validateType)("TSType")
  15385. }
  15386. });
  15387. defineType("TSTupleType", {
  15388. aliases: ["TSType"],
  15389. visitor: ["elementTypes"],
  15390. fields: {
  15391. elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
  15392. }
  15393. });
  15394. defineType("TSOptionalType", {
  15395. aliases: ["TSType"],
  15396. visitor: ["typeAnnotation"],
  15397. fields: {
  15398. typeAnnotation: (0, _utils.validateType)("TSType")
  15399. }
  15400. });
  15401. defineType("TSRestType", {
  15402. aliases: ["TSType"],
  15403. visitor: ["typeAnnotation"],
  15404. fields: {
  15405. typeAnnotation: (0, _utils.validateType)("TSType")
  15406. }
  15407. });
  15408. defineType("TSNamedTupleMember", {
  15409. visitor: ["label", "elementType"],
  15410. builder: ["label", "elementType", "optional"],
  15411. fields: {
  15412. label: (0, _utils.validateType)("Identifier"),
  15413. optional: {
  15414. validate: bool,
  15415. default: false
  15416. },
  15417. elementType: (0, _utils.validateType)("TSType")
  15418. }
  15419. });
  15420. var unionOrIntersection = {
  15421. aliases: ["TSType"],
  15422. visitor: ["types"],
  15423. fields: {
  15424. types: (0, _utils.validateArrayOfType)("TSType")
  15425. }
  15426. };
  15427. defineType("TSUnionType", unionOrIntersection);
  15428. defineType("TSIntersectionType", unionOrIntersection);
  15429. defineType("TSConditionalType", {
  15430. aliases: ["TSType"],
  15431. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  15432. fields: {
  15433. checkType: (0, _utils.validateType)("TSType"),
  15434. extendsType: (0, _utils.validateType)("TSType"),
  15435. trueType: (0, _utils.validateType)("TSType"),
  15436. falseType: (0, _utils.validateType)("TSType")
  15437. }
  15438. });
  15439. defineType("TSInferType", {
  15440. aliases: ["TSType"],
  15441. visitor: ["typeParameter"],
  15442. fields: {
  15443. typeParameter: (0, _utils.validateType)("TSTypeParameter")
  15444. }
  15445. });
  15446. defineType("TSParenthesizedType", {
  15447. aliases: ["TSType"],
  15448. visitor: ["typeAnnotation"],
  15449. fields: {
  15450. typeAnnotation: (0, _utils.validateType)("TSType")
  15451. }
  15452. });
  15453. defineType("TSTypeOperator", {
  15454. aliases: ["TSType"],
  15455. visitor: ["typeAnnotation"],
  15456. fields: {
  15457. operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
  15458. typeAnnotation: (0, _utils.validateType)("TSType")
  15459. }
  15460. });
  15461. defineType("TSIndexedAccessType", {
  15462. aliases: ["TSType"],
  15463. visitor: ["objectType", "indexType"],
  15464. fields: {
  15465. objectType: (0, _utils.validateType)("TSType"),
  15466. indexType: (0, _utils.validateType)("TSType")
  15467. }
  15468. });
  15469. defineType("TSMappedType", {
  15470. aliases: ["TSType"],
  15471. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  15472. fields: {
  15473. readonly: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")),
  15474. typeParameter: (0, _utils.validateType)("TSTypeParameter"),
  15475. optional: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")),
  15476. typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
  15477. nameType: (0, _utils.validateOptionalType)("TSType")
  15478. }
  15479. });
  15480. defineType("TSLiteralType", {
  15481. aliases: ["TSType", "TSBaseType"],
  15482. visitor: ["literal"],
  15483. fields: {
  15484. literal: {
  15485. validate: function() {
  15486. const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral");
  15487. const unaryOperator = (0, _utils.assertOneOf)("-");
  15488. const literal4 = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral");
  15489. function validator(parent, key2, node2) {
  15490. if ((0, _is.default)("UnaryExpression", node2)) {
  15491. unaryOperator(node2, "operator", node2.operator);
  15492. unaryExpression(node2, "argument", node2.argument);
  15493. } else {
  15494. literal4(parent, key2, node2);
  15495. }
  15496. }
  15497. validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral", "UnaryExpression"];
  15498. return validator;
  15499. }()
  15500. }
  15501. }
  15502. });
  15503. defineType("TSExpressionWithTypeArguments", {
  15504. aliases: ["TSType"],
  15505. visitor: ["expression", "typeParameters"],
  15506. fields: {
  15507. expression: (0, _utils.validateType)("TSEntityName"),
  15508. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  15509. }
  15510. });
  15511. defineType("TSInterfaceDeclaration", {
  15512. aliases: ["Statement", "Declaration"],
  15513. visitor: ["id", "typeParameters", "extends", "body"],
  15514. fields: {
  15515. declare: (0, _utils.validateOptional)(bool),
  15516. id: (0, _utils.validateType)("Identifier"),
  15517. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  15518. extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
  15519. body: (0, _utils.validateType)("TSInterfaceBody")
  15520. }
  15521. });
  15522. defineType("TSInterfaceBody", {
  15523. visitor: ["body"],
  15524. fields: {
  15525. body: (0, _utils.validateArrayOfType)("TSTypeElement")
  15526. }
  15527. });
  15528. defineType("TSTypeAliasDeclaration", {
  15529. aliases: ["Statement", "Declaration"],
  15530. visitor: ["id", "typeParameters", "typeAnnotation"],
  15531. fields: {
  15532. declare: (0, _utils.validateOptional)(bool),
  15533. id: (0, _utils.validateType)("Identifier"),
  15534. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
  15535. typeAnnotation: (0, _utils.validateType)("TSType")
  15536. }
  15537. });
  15538. defineType("TSInstantiationExpression", {
  15539. aliases: ["Expression"],
  15540. visitor: ["expression", "typeParameters"],
  15541. fields: {
  15542. expression: (0, _utils.validateType)("Expression"),
  15543. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  15544. }
  15545. });
  15546. var TSTypeExpression = {
  15547. aliases: ["Expression", "LVal", "PatternLike"],
  15548. visitor: ["expression", "typeAnnotation"],
  15549. fields: {
  15550. expression: (0, _utils.validateType)("Expression"),
  15551. typeAnnotation: (0, _utils.validateType)("TSType")
  15552. }
  15553. };
  15554. defineType("TSAsExpression", TSTypeExpression);
  15555. defineType("TSSatisfiesExpression", TSTypeExpression);
  15556. defineType("TSTypeAssertion", {
  15557. aliases: ["Expression", "LVal", "PatternLike"],
  15558. visitor: ["typeAnnotation", "expression"],
  15559. fields: {
  15560. typeAnnotation: (0, _utils.validateType)("TSType"),
  15561. expression: (0, _utils.validateType)("Expression")
  15562. }
  15563. });
  15564. defineType("TSEnumDeclaration", {
  15565. aliases: ["Statement", "Declaration"],
  15566. visitor: ["id", "members"],
  15567. fields: {
  15568. declare: (0, _utils.validateOptional)(bool),
  15569. const: (0, _utils.validateOptional)(bool),
  15570. id: (0, _utils.validateType)("Identifier"),
  15571. members: (0, _utils.validateArrayOfType)("TSEnumMember"),
  15572. initializer: (0, _utils.validateOptionalType)("Expression")
  15573. }
  15574. });
  15575. defineType("TSEnumMember", {
  15576. visitor: ["id", "initializer"],
  15577. fields: {
  15578. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  15579. initializer: (0, _utils.validateOptionalType)("Expression")
  15580. }
  15581. });
  15582. defineType("TSModuleDeclaration", {
  15583. aliases: ["Statement", "Declaration"],
  15584. visitor: ["id", "body"],
  15585. fields: {
  15586. declare: (0, _utils.validateOptional)(bool),
  15587. global: (0, _utils.validateOptional)(bool),
  15588. id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
  15589. body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
  15590. }
  15591. });
  15592. defineType("TSModuleBlock", {
  15593. aliases: ["Scopable", "Block", "BlockParent", "FunctionParent"],
  15594. visitor: ["body"],
  15595. fields: {
  15596. body: (0, _utils.validateArrayOfType)("Statement")
  15597. }
  15598. });
  15599. defineType("TSImportType", {
  15600. aliases: ["TSType"],
  15601. visitor: ["argument", "qualifier", "typeParameters"],
  15602. fields: {
  15603. argument: (0, _utils.validateType)("StringLiteral"),
  15604. qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
  15605. typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
  15606. }
  15607. });
  15608. defineType("TSImportEqualsDeclaration", {
  15609. aliases: ["Statement"],
  15610. visitor: ["id", "moduleReference"],
  15611. fields: {
  15612. isExport: (0, _utils.validate)(bool),
  15613. id: (0, _utils.validateType)("Identifier"),
  15614. moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]),
  15615. importKind: {
  15616. validate: (0, _utils.assertOneOf)("type", "value"),
  15617. optional: true
  15618. }
  15619. }
  15620. });
  15621. defineType("TSExternalModuleReference", {
  15622. visitor: ["expression"],
  15623. fields: {
  15624. expression: (0, _utils.validateType)("StringLiteral")
  15625. }
  15626. });
  15627. defineType("TSNonNullExpression", {
  15628. aliases: ["Expression", "LVal", "PatternLike"],
  15629. visitor: ["expression"],
  15630. fields: {
  15631. expression: (0, _utils.validateType)("Expression")
  15632. }
  15633. });
  15634. defineType("TSExportAssignment", {
  15635. aliases: ["Statement"],
  15636. visitor: ["expression"],
  15637. fields: {
  15638. expression: (0, _utils.validateType)("Expression")
  15639. }
  15640. });
  15641. defineType("TSNamespaceExportDeclaration", {
  15642. aliases: ["Statement"],
  15643. visitor: ["id"],
  15644. fields: {
  15645. id: (0, _utils.validateType)("Identifier")
  15646. }
  15647. });
  15648. defineType("TSTypeAnnotation", {
  15649. visitor: ["typeAnnotation"],
  15650. fields: {
  15651. typeAnnotation: {
  15652. validate: (0, _utils.assertNodeType)("TSType")
  15653. }
  15654. }
  15655. });
  15656. defineType("TSTypeParameterInstantiation", {
  15657. visitor: ["params"],
  15658. fields: {
  15659. params: {
  15660. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
  15661. }
  15662. }
  15663. });
  15664. defineType("TSTypeParameterDeclaration", {
  15665. visitor: ["params"],
  15666. fields: {
  15667. params: {
  15668. validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
  15669. }
  15670. }
  15671. });
  15672. defineType("TSTypeParameter", {
  15673. builder: ["constraint", "default", "name"],
  15674. visitor: ["constraint", "default"],
  15675. fields: {
  15676. name: {
  15677. validate: (0, _utils.assertValueType)("string")
  15678. },
  15679. in: {
  15680. validate: (0, _utils.assertValueType)("boolean"),
  15681. optional: true
  15682. },
  15683. out: {
  15684. validate: (0, _utils.assertValueType)("boolean"),
  15685. optional: true
  15686. },
  15687. const: {
  15688. validate: (0, _utils.assertValueType)("boolean"),
  15689. optional: true
  15690. },
  15691. constraint: {
  15692. validate: (0, _utils.assertNodeType)("TSType"),
  15693. optional: true
  15694. },
  15695. default: {
  15696. validate: (0, _utils.assertNodeType)("TSType"),
  15697. optional: true
  15698. }
  15699. }
  15700. });
  15701. }
  15702. });
  15703. // node_modules/@babel/types/lib/definitions/deprecated-aliases.js
  15704. var require_deprecated_aliases = __commonJS({
  15705. "node_modules/@babel/types/lib/definitions/deprecated-aliases.js"(exports) {
  15706. "use strict";
  15707. Object.defineProperty(exports, "__esModule", {
  15708. value: true
  15709. });
  15710. exports.DEPRECATED_ALIASES = void 0;
  15711. var DEPRECATED_ALIASES = {
  15712. ModuleDeclaration: "ImportOrExportDeclaration"
  15713. };
  15714. exports.DEPRECATED_ALIASES = DEPRECATED_ALIASES;
  15715. }
  15716. });
  15717. // node_modules/@babel/types/lib/definitions/index.js
  15718. var require_definitions = __commonJS({
  15719. "node_modules/@babel/types/lib/definitions/index.js"(exports) {
  15720. "use strict";
  15721. Object.defineProperty(exports, "__esModule", {
  15722. value: true
  15723. });
  15724. Object.defineProperty(exports, "ALIAS_KEYS", {
  15725. enumerable: true,
  15726. get: function() {
  15727. return _utils.ALIAS_KEYS;
  15728. }
  15729. });
  15730. Object.defineProperty(exports, "BUILDER_KEYS", {
  15731. enumerable: true,
  15732. get: function() {
  15733. return _utils.BUILDER_KEYS;
  15734. }
  15735. });
  15736. Object.defineProperty(exports, "DEPRECATED_ALIASES", {
  15737. enumerable: true,
  15738. get: function() {
  15739. return _deprecatedAliases.DEPRECATED_ALIASES;
  15740. }
  15741. });
  15742. Object.defineProperty(exports, "DEPRECATED_KEYS", {
  15743. enumerable: true,
  15744. get: function() {
  15745. return _utils.DEPRECATED_KEYS;
  15746. }
  15747. });
  15748. Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
  15749. enumerable: true,
  15750. get: function() {
  15751. return _utils.FLIPPED_ALIAS_KEYS;
  15752. }
  15753. });
  15754. Object.defineProperty(exports, "NODE_FIELDS", {
  15755. enumerable: true,
  15756. get: function() {
  15757. return _utils.NODE_FIELDS;
  15758. }
  15759. });
  15760. Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
  15761. enumerable: true,
  15762. get: function() {
  15763. return _utils.NODE_PARENT_VALIDATIONS;
  15764. }
  15765. });
  15766. Object.defineProperty(exports, "PLACEHOLDERS", {
  15767. enumerable: true,
  15768. get: function() {
  15769. return _placeholders.PLACEHOLDERS;
  15770. }
  15771. });
  15772. Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
  15773. enumerable: true,
  15774. get: function() {
  15775. return _placeholders.PLACEHOLDERS_ALIAS;
  15776. }
  15777. });
  15778. Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
  15779. enumerable: true,
  15780. get: function() {
  15781. return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
  15782. }
  15783. });
  15784. exports.TYPES = void 0;
  15785. Object.defineProperty(exports, "VISITOR_KEYS", {
  15786. enumerable: true,
  15787. get: function() {
  15788. return _utils.VISITOR_KEYS;
  15789. }
  15790. });
  15791. var _toFastProperties = require_to_fast_properties();
  15792. require_core();
  15793. require_flow();
  15794. require_jsx();
  15795. require_misc();
  15796. require_experimental();
  15797. require_typescript();
  15798. var _utils = require_utils();
  15799. var _placeholders = require_placeholders();
  15800. var _deprecatedAliases = require_deprecated_aliases();
  15801. Object.keys(_deprecatedAliases.DEPRECATED_ALIASES).forEach((deprecatedAlias) => {
  15802. _utils.FLIPPED_ALIAS_KEYS[deprecatedAlias] = _utils.FLIPPED_ALIAS_KEYS[_deprecatedAliases.DEPRECATED_ALIASES[deprecatedAlias]];
  15803. });
  15804. _toFastProperties(_utils.VISITOR_KEYS);
  15805. _toFastProperties(_utils.ALIAS_KEYS);
  15806. _toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
  15807. _toFastProperties(_utils.NODE_FIELDS);
  15808. _toFastProperties(_utils.BUILDER_KEYS);
  15809. _toFastProperties(_utils.DEPRECATED_KEYS);
  15810. _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
  15811. _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
  15812. var TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS));
  15813. exports.TYPES = TYPES;
  15814. }
  15815. });
  15816. // node_modules/@babel/types/lib/validators/validate.js
  15817. var require_validate = __commonJS({
  15818. "node_modules/@babel/types/lib/validators/validate.js"(exports) {
  15819. "use strict";
  15820. Object.defineProperty(exports, "__esModule", {
  15821. value: true
  15822. });
  15823. exports.default = validate;
  15824. exports.validateChild = validateChild;
  15825. exports.validateField = validateField;
  15826. var _definitions = require_definitions();
  15827. function validate(node2, key2, val) {
  15828. if (!node2)
  15829. return;
  15830. const fields = _definitions.NODE_FIELDS[node2.type];
  15831. if (!fields)
  15832. return;
  15833. const field = fields[key2];
  15834. validateField(node2, key2, val, field);
  15835. validateChild(node2, key2, val);
  15836. }
  15837. function validateField(node2, key2, val, field) {
  15838. if (!(field != null && field.validate))
  15839. return;
  15840. if (field.optional && val == null)
  15841. return;
  15842. field.validate(node2, key2, val);
  15843. }
  15844. function validateChild(node2, key2, val) {
  15845. if (val == null)
  15846. return;
  15847. const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type];
  15848. if (!validate2)
  15849. return;
  15850. validate2(node2, key2, val);
  15851. }
  15852. }
  15853. });
  15854. // node_modules/@babel/types/lib/builders/validateNode.js
  15855. var require_validateNode = __commonJS({
  15856. "node_modules/@babel/types/lib/builders/validateNode.js"(exports) {
  15857. "use strict";
  15858. Object.defineProperty(exports, "__esModule", {
  15859. value: true
  15860. });
  15861. exports.default = validateNode;
  15862. var _validate = require_validate();
  15863. var _ = require_lib3();
  15864. function validateNode(node2) {
  15865. const keys2 = _.BUILDER_KEYS[node2.type];
  15866. for (const key2 of keys2) {
  15867. (0, _validate.default)(node2, key2, node2[key2]);
  15868. }
  15869. return node2;
  15870. }
  15871. }
  15872. });
  15873. // node_modules/@babel/types/lib/builders/generated/index.js
  15874. var require_generated2 = __commonJS({
  15875. "node_modules/@babel/types/lib/builders/generated/index.js"(exports) {
  15876. "use strict";
  15877. Object.defineProperty(exports, "__esModule", {
  15878. value: true
  15879. });
  15880. exports.anyTypeAnnotation = anyTypeAnnotation;
  15881. exports.argumentPlaceholder = argumentPlaceholder;
  15882. exports.arrayExpression = arrayExpression;
  15883. exports.arrayPattern = arrayPattern;
  15884. exports.arrayTypeAnnotation = arrayTypeAnnotation;
  15885. exports.arrowFunctionExpression = arrowFunctionExpression;
  15886. exports.assignmentExpression = assignmentExpression;
  15887. exports.assignmentPattern = assignmentPattern;
  15888. exports.awaitExpression = awaitExpression;
  15889. exports.bigIntLiteral = bigIntLiteral;
  15890. exports.binaryExpression = binaryExpression;
  15891. exports.bindExpression = bindExpression;
  15892. exports.blockStatement = blockStatement;
  15893. exports.booleanLiteral = booleanLiteral;
  15894. exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
  15895. exports.booleanTypeAnnotation = booleanTypeAnnotation;
  15896. exports.breakStatement = breakStatement;
  15897. exports.callExpression = callExpression;
  15898. exports.catchClause = catchClause;
  15899. exports.classAccessorProperty = classAccessorProperty;
  15900. exports.classBody = classBody;
  15901. exports.classDeclaration = classDeclaration;
  15902. exports.classExpression = classExpression;
  15903. exports.classImplements = classImplements;
  15904. exports.classMethod = classMethod;
  15905. exports.classPrivateMethod = classPrivateMethod;
  15906. exports.classPrivateProperty = classPrivateProperty;
  15907. exports.classProperty = classProperty;
  15908. exports.conditionalExpression = conditionalExpression;
  15909. exports.continueStatement = continueStatement;
  15910. exports.debuggerStatement = debuggerStatement;
  15911. exports.decimalLiteral = decimalLiteral;
  15912. exports.declareClass = declareClass;
  15913. exports.declareExportAllDeclaration = declareExportAllDeclaration;
  15914. exports.declareExportDeclaration = declareExportDeclaration;
  15915. exports.declareFunction = declareFunction;
  15916. exports.declareInterface = declareInterface;
  15917. exports.declareModule = declareModule;
  15918. exports.declareModuleExports = declareModuleExports;
  15919. exports.declareOpaqueType = declareOpaqueType;
  15920. exports.declareTypeAlias = declareTypeAlias;
  15921. exports.declareVariable = declareVariable;
  15922. exports.declaredPredicate = declaredPredicate;
  15923. exports.decorator = decorator;
  15924. exports.directive = directive;
  15925. exports.directiveLiteral = directiveLiteral;
  15926. exports.doExpression = doExpression;
  15927. exports.doWhileStatement = doWhileStatement;
  15928. exports.emptyStatement = emptyStatement;
  15929. exports.emptyTypeAnnotation = emptyTypeAnnotation;
  15930. exports.enumBooleanBody = enumBooleanBody;
  15931. exports.enumBooleanMember = enumBooleanMember;
  15932. exports.enumDeclaration = enumDeclaration;
  15933. exports.enumDefaultedMember = enumDefaultedMember;
  15934. exports.enumNumberBody = enumNumberBody;
  15935. exports.enumNumberMember = enumNumberMember;
  15936. exports.enumStringBody = enumStringBody;
  15937. exports.enumStringMember = enumStringMember;
  15938. exports.enumSymbolBody = enumSymbolBody;
  15939. exports.existsTypeAnnotation = existsTypeAnnotation;
  15940. exports.exportAllDeclaration = exportAllDeclaration;
  15941. exports.exportDefaultDeclaration = exportDefaultDeclaration;
  15942. exports.exportDefaultSpecifier = exportDefaultSpecifier;
  15943. exports.exportNamedDeclaration = exportNamedDeclaration;
  15944. exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
  15945. exports.exportSpecifier = exportSpecifier;
  15946. exports.expressionStatement = expressionStatement;
  15947. exports.file = file;
  15948. exports.forInStatement = forInStatement;
  15949. exports.forOfStatement = forOfStatement;
  15950. exports.forStatement = forStatement;
  15951. exports.functionDeclaration = functionDeclaration;
  15952. exports.functionExpression = functionExpression;
  15953. exports.functionTypeAnnotation = functionTypeAnnotation;
  15954. exports.functionTypeParam = functionTypeParam;
  15955. exports.genericTypeAnnotation = genericTypeAnnotation;
  15956. exports.identifier = identifier;
  15957. exports.ifStatement = ifStatement;
  15958. exports.import = _import;
  15959. exports.importAttribute = importAttribute;
  15960. exports.importDeclaration = importDeclaration;
  15961. exports.importDefaultSpecifier = importDefaultSpecifier;
  15962. exports.importNamespaceSpecifier = importNamespaceSpecifier;
  15963. exports.importSpecifier = importSpecifier;
  15964. exports.indexedAccessType = indexedAccessType;
  15965. exports.inferredPredicate = inferredPredicate;
  15966. exports.interfaceDeclaration = interfaceDeclaration;
  15967. exports.interfaceExtends = interfaceExtends;
  15968. exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
  15969. exports.interpreterDirective = interpreterDirective;
  15970. exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
  15971. exports.jSXAttribute = exports.jsxAttribute = jsxAttribute2;
  15972. exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
  15973. exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
  15974. exports.jSXElement = exports.jsxElement = jsxElement;
  15975. exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
  15976. exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
  15977. exports.jSXFragment = exports.jsxFragment = jsxFragment;
  15978. exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier2;
  15979. exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
  15980. exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
  15981. exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
  15982. exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
  15983. exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
  15984. exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
  15985. exports.jSXText = exports.jsxText = jsxText2;
  15986. exports.labeledStatement = labeledStatement;
  15987. exports.logicalExpression = logicalExpression;
  15988. exports.memberExpression = memberExpression;
  15989. exports.metaProperty = metaProperty;
  15990. exports.mixedTypeAnnotation = mixedTypeAnnotation;
  15991. exports.moduleExpression = moduleExpression;
  15992. exports.newExpression = newExpression;
  15993. exports.noop = noop;
  15994. exports.nullLiteral = nullLiteral;
  15995. exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
  15996. exports.nullableTypeAnnotation = nullableTypeAnnotation;
  15997. exports.numberLiteral = NumberLiteral;
  15998. exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
  15999. exports.numberTypeAnnotation = numberTypeAnnotation;
  16000. exports.numericLiteral = numericLiteral;
  16001. exports.objectExpression = objectExpression;
  16002. exports.objectMethod = objectMethod;
  16003. exports.objectPattern = objectPattern;
  16004. exports.objectProperty = objectProperty;
  16005. exports.objectTypeAnnotation = objectTypeAnnotation;
  16006. exports.objectTypeCallProperty = objectTypeCallProperty;
  16007. exports.objectTypeIndexer = objectTypeIndexer;
  16008. exports.objectTypeInternalSlot = objectTypeInternalSlot;
  16009. exports.objectTypeProperty = objectTypeProperty;
  16010. exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
  16011. exports.opaqueType = opaqueType;
  16012. exports.optionalCallExpression = optionalCallExpression;
  16013. exports.optionalIndexedAccessType = optionalIndexedAccessType;
  16014. exports.optionalMemberExpression = optionalMemberExpression;
  16015. exports.parenthesizedExpression = parenthesizedExpression;
  16016. exports.pipelineBareFunction = pipelineBareFunction;
  16017. exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
  16018. exports.pipelineTopicExpression = pipelineTopicExpression;
  16019. exports.placeholder = placeholder;
  16020. exports.privateName = privateName;
  16021. exports.program = program;
  16022. exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
  16023. exports.recordExpression = recordExpression;
  16024. exports.regExpLiteral = regExpLiteral;
  16025. exports.regexLiteral = RegexLiteral;
  16026. exports.restElement = restElement;
  16027. exports.restProperty = RestProperty;
  16028. exports.returnStatement = returnStatement;
  16029. exports.sequenceExpression = sequenceExpression;
  16030. exports.spreadElement = spreadElement;
  16031. exports.spreadProperty = SpreadProperty;
  16032. exports.staticBlock = staticBlock;
  16033. exports.stringLiteral = stringLiteral2;
  16034. exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
  16035. exports.stringTypeAnnotation = stringTypeAnnotation;
  16036. exports.super = _super;
  16037. exports.switchCase = switchCase;
  16038. exports.switchStatement = switchStatement;
  16039. exports.symbolTypeAnnotation = symbolTypeAnnotation;
  16040. exports.taggedTemplateExpression = taggedTemplateExpression;
  16041. exports.templateElement = templateElement;
  16042. exports.templateLiteral = templateLiteral;
  16043. exports.thisExpression = thisExpression;
  16044. exports.thisTypeAnnotation = thisTypeAnnotation;
  16045. exports.throwStatement = throwStatement;
  16046. exports.topicReference = topicReference;
  16047. exports.tryStatement = tryStatement;
  16048. exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
  16049. exports.tSArrayType = exports.tsArrayType = tsArrayType;
  16050. exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
  16051. exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
  16052. exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
  16053. exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
  16054. exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
  16055. exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
  16056. exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
  16057. exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
  16058. exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
  16059. exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
  16060. exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
  16061. exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
  16062. exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
  16063. exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
  16064. exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
  16065. exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
  16066. exports.tSImportType = exports.tsImportType = tsImportType;
  16067. exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
  16068. exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
  16069. exports.tSInferType = exports.tsInferType = tsInferType;
  16070. exports.tSInstantiationExpression = exports.tsInstantiationExpression = tsInstantiationExpression;
  16071. exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
  16072. exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
  16073. exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
  16074. exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
  16075. exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
  16076. exports.tSMappedType = exports.tsMappedType = tsMappedType;
  16077. exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
  16078. exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
  16079. exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
  16080. exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
  16081. exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
  16082. exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
  16083. exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
  16084. exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
  16085. exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
  16086. exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
  16087. exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
  16088. exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
  16089. exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
  16090. exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
  16091. exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
  16092. exports.tSRestType = exports.tsRestType = tsRestType;
  16093. exports.tSSatisfiesExpression = exports.tsSatisfiesExpression = tsSatisfiesExpression;
  16094. exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
  16095. exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
  16096. exports.tSThisType = exports.tsThisType = tsThisType;
  16097. exports.tSTupleType = exports.tsTupleType = tsTupleType;
  16098. exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
  16099. exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
  16100. exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
  16101. exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
  16102. exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
  16103. exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
  16104. exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
  16105. exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
  16106. exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
  16107. exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
  16108. exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
  16109. exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
  16110. exports.tSUnionType = exports.tsUnionType = tsUnionType;
  16111. exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
  16112. exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
  16113. exports.tupleExpression = tupleExpression;
  16114. exports.tupleTypeAnnotation = tupleTypeAnnotation;
  16115. exports.typeAlias = typeAlias;
  16116. exports.typeAnnotation = typeAnnotation;
  16117. exports.typeCastExpression = typeCastExpression;
  16118. exports.typeParameter = typeParameter;
  16119. exports.typeParameterDeclaration = typeParameterDeclaration;
  16120. exports.typeParameterInstantiation = typeParameterInstantiation;
  16121. exports.typeofTypeAnnotation = typeofTypeAnnotation;
  16122. exports.unaryExpression = unaryExpression;
  16123. exports.unionTypeAnnotation = unionTypeAnnotation;
  16124. exports.updateExpression = updateExpression;
  16125. exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
  16126. exports.variableDeclaration = variableDeclaration;
  16127. exports.variableDeclarator = variableDeclarator;
  16128. exports.variance = variance;
  16129. exports.voidTypeAnnotation = voidTypeAnnotation;
  16130. exports.whileStatement = whileStatement;
  16131. exports.withStatement = withStatement;
  16132. exports.yieldExpression = yieldExpression;
  16133. var _validateNode = require_validateNode();
  16134. var _deprecationWarning = require_deprecationWarning();
  16135. function arrayExpression(elements = []) {
  16136. return (0, _validateNode.default)({
  16137. type: "ArrayExpression",
  16138. elements
  16139. });
  16140. }
  16141. function assignmentExpression(operator, left, right) {
  16142. return (0, _validateNode.default)({
  16143. type: "AssignmentExpression",
  16144. operator,
  16145. left,
  16146. right
  16147. });
  16148. }
  16149. function binaryExpression(operator, left, right) {
  16150. return (0, _validateNode.default)({
  16151. type: "BinaryExpression",
  16152. operator,
  16153. left,
  16154. right
  16155. });
  16156. }
  16157. function interpreterDirective(value2) {
  16158. return (0, _validateNode.default)({
  16159. type: "InterpreterDirective",
  16160. value: value2
  16161. });
  16162. }
  16163. function directive(value2) {
  16164. return (0, _validateNode.default)({
  16165. type: "Directive",
  16166. value: value2
  16167. });
  16168. }
  16169. function directiveLiteral(value2) {
  16170. return (0, _validateNode.default)({
  16171. type: "DirectiveLiteral",
  16172. value: value2
  16173. });
  16174. }
  16175. function blockStatement(body, directives = []) {
  16176. return (0, _validateNode.default)({
  16177. type: "BlockStatement",
  16178. body,
  16179. directives
  16180. });
  16181. }
  16182. function breakStatement(label = null) {
  16183. return (0, _validateNode.default)({
  16184. type: "BreakStatement",
  16185. label
  16186. });
  16187. }
  16188. function callExpression(callee, _arguments) {
  16189. return (0, _validateNode.default)({
  16190. type: "CallExpression",
  16191. callee,
  16192. arguments: _arguments
  16193. });
  16194. }
  16195. function catchClause(param = null, body) {
  16196. return (0, _validateNode.default)({
  16197. type: "CatchClause",
  16198. param,
  16199. body
  16200. });
  16201. }
  16202. function conditionalExpression(test, consequent, alternate) {
  16203. return (0, _validateNode.default)({
  16204. type: "ConditionalExpression",
  16205. test,
  16206. consequent,
  16207. alternate
  16208. });
  16209. }
  16210. function continueStatement(label = null) {
  16211. return (0, _validateNode.default)({
  16212. type: "ContinueStatement",
  16213. label
  16214. });
  16215. }
  16216. function debuggerStatement() {
  16217. return {
  16218. type: "DebuggerStatement"
  16219. };
  16220. }
  16221. function doWhileStatement(test, body) {
  16222. return (0, _validateNode.default)({
  16223. type: "DoWhileStatement",
  16224. test,
  16225. body
  16226. });
  16227. }
  16228. function emptyStatement() {
  16229. return {
  16230. type: "EmptyStatement"
  16231. };
  16232. }
  16233. function expressionStatement(expression) {
  16234. return (0, _validateNode.default)({
  16235. type: "ExpressionStatement",
  16236. expression
  16237. });
  16238. }
  16239. function file(program2, comments = null, tokens = null) {
  16240. return (0, _validateNode.default)({
  16241. type: "File",
  16242. program: program2,
  16243. comments,
  16244. tokens
  16245. });
  16246. }
  16247. function forInStatement(left, right, body) {
  16248. return (0, _validateNode.default)({
  16249. type: "ForInStatement",
  16250. left,
  16251. right,
  16252. body
  16253. });
  16254. }
  16255. function forStatement(init = null, test = null, update = null, body) {
  16256. return (0, _validateNode.default)({
  16257. type: "ForStatement",
  16258. init,
  16259. test,
  16260. update,
  16261. body
  16262. });
  16263. }
  16264. function functionDeclaration(id = null, params, body, generator = false, async = false) {
  16265. return (0, _validateNode.default)({
  16266. type: "FunctionDeclaration",
  16267. id,
  16268. params,
  16269. body,
  16270. generator,
  16271. async
  16272. });
  16273. }
  16274. function functionExpression(id = null, params, body, generator = false, async = false) {
  16275. return (0, _validateNode.default)({
  16276. type: "FunctionExpression",
  16277. id,
  16278. params,
  16279. body,
  16280. generator,
  16281. async
  16282. });
  16283. }
  16284. function identifier(name2) {
  16285. return (0, _validateNode.default)({
  16286. type: "Identifier",
  16287. name: name2
  16288. });
  16289. }
  16290. function ifStatement(test, consequent, alternate = null) {
  16291. return (0, _validateNode.default)({
  16292. type: "IfStatement",
  16293. test,
  16294. consequent,
  16295. alternate
  16296. });
  16297. }
  16298. function labeledStatement(label, body) {
  16299. return (0, _validateNode.default)({
  16300. type: "LabeledStatement",
  16301. label,
  16302. body
  16303. });
  16304. }
  16305. function stringLiteral2(value2) {
  16306. return (0, _validateNode.default)({
  16307. type: "StringLiteral",
  16308. value: value2
  16309. });
  16310. }
  16311. function numericLiteral(value2) {
  16312. return (0, _validateNode.default)({
  16313. type: "NumericLiteral",
  16314. value: value2
  16315. });
  16316. }
  16317. function nullLiteral() {
  16318. return {
  16319. type: "NullLiteral"
  16320. };
  16321. }
  16322. function booleanLiteral(value2) {
  16323. return (0, _validateNode.default)({
  16324. type: "BooleanLiteral",
  16325. value: value2
  16326. });
  16327. }
  16328. function regExpLiteral(pattern, flags = "") {
  16329. return (0, _validateNode.default)({
  16330. type: "RegExpLiteral",
  16331. pattern,
  16332. flags
  16333. });
  16334. }
  16335. function logicalExpression(operator, left, right) {
  16336. return (0, _validateNode.default)({
  16337. type: "LogicalExpression",
  16338. operator,
  16339. left,
  16340. right
  16341. });
  16342. }
  16343. function memberExpression(object, property, computed = false, optional = null) {
  16344. return (0, _validateNode.default)({
  16345. type: "MemberExpression",
  16346. object,
  16347. property,
  16348. computed,
  16349. optional
  16350. });
  16351. }
  16352. function newExpression(callee, _arguments) {
  16353. return (0, _validateNode.default)({
  16354. type: "NewExpression",
  16355. callee,
  16356. arguments: _arguments
  16357. });
  16358. }
  16359. function program(body, directives = [], sourceType = "script", interpreter = null) {
  16360. return (0, _validateNode.default)({
  16361. type: "Program",
  16362. body,
  16363. directives,
  16364. sourceType,
  16365. interpreter,
  16366. sourceFile: null
  16367. });
  16368. }
  16369. function objectExpression(properties) {
  16370. return (0, _validateNode.default)({
  16371. type: "ObjectExpression",
  16372. properties
  16373. });
  16374. }
  16375. function objectMethod(kind = "method", key2, params, body, computed = false, generator = false, async = false) {
  16376. return (0, _validateNode.default)({
  16377. type: "ObjectMethod",
  16378. kind,
  16379. key: key2,
  16380. params,
  16381. body,
  16382. computed,
  16383. generator,
  16384. async
  16385. });
  16386. }
  16387. function objectProperty(key2, value2, computed = false, shorthand = false, decorators = null) {
  16388. return (0, _validateNode.default)({
  16389. type: "ObjectProperty",
  16390. key: key2,
  16391. value: value2,
  16392. computed,
  16393. shorthand,
  16394. decorators
  16395. });
  16396. }
  16397. function restElement(argument) {
  16398. return (0, _validateNode.default)({
  16399. type: "RestElement",
  16400. argument
  16401. });
  16402. }
  16403. function returnStatement(argument = null) {
  16404. return (0, _validateNode.default)({
  16405. type: "ReturnStatement",
  16406. argument
  16407. });
  16408. }
  16409. function sequenceExpression(expressions) {
  16410. return (0, _validateNode.default)({
  16411. type: "SequenceExpression",
  16412. expressions
  16413. });
  16414. }
  16415. function parenthesizedExpression(expression) {
  16416. return (0, _validateNode.default)({
  16417. type: "ParenthesizedExpression",
  16418. expression
  16419. });
  16420. }
  16421. function switchCase(test = null, consequent) {
  16422. return (0, _validateNode.default)({
  16423. type: "SwitchCase",
  16424. test,
  16425. consequent
  16426. });
  16427. }
  16428. function switchStatement(discriminant, cases) {
  16429. return (0, _validateNode.default)({
  16430. type: "SwitchStatement",
  16431. discriminant,
  16432. cases
  16433. });
  16434. }
  16435. function thisExpression() {
  16436. return {
  16437. type: "ThisExpression"
  16438. };
  16439. }
  16440. function throwStatement(argument) {
  16441. return (0, _validateNode.default)({
  16442. type: "ThrowStatement",
  16443. argument
  16444. });
  16445. }
  16446. function tryStatement(block, handler = null, finalizer = null) {
  16447. return (0, _validateNode.default)({
  16448. type: "TryStatement",
  16449. block,
  16450. handler,
  16451. finalizer
  16452. });
  16453. }
  16454. function unaryExpression(operator, argument, prefix = true) {
  16455. return (0, _validateNode.default)({
  16456. type: "UnaryExpression",
  16457. operator,
  16458. argument,
  16459. prefix
  16460. });
  16461. }
  16462. function updateExpression(operator, argument, prefix = false) {
  16463. return (0, _validateNode.default)({
  16464. type: "UpdateExpression",
  16465. operator,
  16466. argument,
  16467. prefix
  16468. });
  16469. }
  16470. function variableDeclaration(kind, declarations) {
  16471. return (0, _validateNode.default)({
  16472. type: "VariableDeclaration",
  16473. kind,
  16474. declarations
  16475. });
  16476. }
  16477. function variableDeclarator(id, init = null) {
  16478. return (0, _validateNode.default)({
  16479. type: "VariableDeclarator",
  16480. id,
  16481. init
  16482. });
  16483. }
  16484. function whileStatement(test, body) {
  16485. return (0, _validateNode.default)({
  16486. type: "WhileStatement",
  16487. test,
  16488. body
  16489. });
  16490. }
  16491. function withStatement(object, body) {
  16492. return (0, _validateNode.default)({
  16493. type: "WithStatement",
  16494. object,
  16495. body
  16496. });
  16497. }
  16498. function assignmentPattern(left, right) {
  16499. return (0, _validateNode.default)({
  16500. type: "AssignmentPattern",
  16501. left,
  16502. right
  16503. });
  16504. }
  16505. function arrayPattern(elements) {
  16506. return (0, _validateNode.default)({
  16507. type: "ArrayPattern",
  16508. elements
  16509. });
  16510. }
  16511. function arrowFunctionExpression(params, body, async = false) {
  16512. return (0, _validateNode.default)({
  16513. type: "ArrowFunctionExpression",
  16514. params,
  16515. body,
  16516. async,
  16517. expression: null
  16518. });
  16519. }
  16520. function classBody(body) {
  16521. return (0, _validateNode.default)({
  16522. type: "ClassBody",
  16523. body
  16524. });
  16525. }
  16526. function classExpression(id = null, superClass = null, body, decorators = null) {
  16527. return (0, _validateNode.default)({
  16528. type: "ClassExpression",
  16529. id,
  16530. superClass,
  16531. body,
  16532. decorators
  16533. });
  16534. }
  16535. function classDeclaration(id, superClass = null, body, decorators = null) {
  16536. return (0, _validateNode.default)({
  16537. type: "ClassDeclaration",
  16538. id,
  16539. superClass,
  16540. body,
  16541. decorators
  16542. });
  16543. }
  16544. function exportAllDeclaration(source2) {
  16545. return (0, _validateNode.default)({
  16546. type: "ExportAllDeclaration",
  16547. source: source2
  16548. });
  16549. }
  16550. function exportDefaultDeclaration(declaration) {
  16551. return (0, _validateNode.default)({
  16552. type: "ExportDefaultDeclaration",
  16553. declaration
  16554. });
  16555. }
  16556. function exportNamedDeclaration(declaration = null, specifiers = [], source2 = null) {
  16557. return (0, _validateNode.default)({
  16558. type: "ExportNamedDeclaration",
  16559. declaration,
  16560. specifiers,
  16561. source: source2
  16562. });
  16563. }
  16564. function exportSpecifier(local, exported) {
  16565. return (0, _validateNode.default)({
  16566. type: "ExportSpecifier",
  16567. local,
  16568. exported
  16569. });
  16570. }
  16571. function forOfStatement(left, right, body, _await = false) {
  16572. return (0, _validateNode.default)({
  16573. type: "ForOfStatement",
  16574. left,
  16575. right,
  16576. body,
  16577. await: _await
  16578. });
  16579. }
  16580. function importDeclaration(specifiers, source2) {
  16581. return (0, _validateNode.default)({
  16582. type: "ImportDeclaration",
  16583. specifiers,
  16584. source: source2
  16585. });
  16586. }
  16587. function importDefaultSpecifier(local) {
  16588. return (0, _validateNode.default)({
  16589. type: "ImportDefaultSpecifier",
  16590. local
  16591. });
  16592. }
  16593. function importNamespaceSpecifier(local) {
  16594. return (0, _validateNode.default)({
  16595. type: "ImportNamespaceSpecifier",
  16596. local
  16597. });
  16598. }
  16599. function importSpecifier(local, imported) {
  16600. return (0, _validateNode.default)({
  16601. type: "ImportSpecifier",
  16602. local,
  16603. imported
  16604. });
  16605. }
  16606. function metaProperty(meta, property) {
  16607. return (0, _validateNode.default)({
  16608. type: "MetaProperty",
  16609. meta,
  16610. property
  16611. });
  16612. }
  16613. function classMethod(kind = "method", key2, params, body, computed = false, _static = false, generator = false, async = false) {
  16614. return (0, _validateNode.default)({
  16615. type: "ClassMethod",
  16616. kind,
  16617. key: key2,
  16618. params,
  16619. body,
  16620. computed,
  16621. static: _static,
  16622. generator,
  16623. async
  16624. });
  16625. }
  16626. function objectPattern(properties) {
  16627. return (0, _validateNode.default)({
  16628. type: "ObjectPattern",
  16629. properties
  16630. });
  16631. }
  16632. function spreadElement(argument) {
  16633. return (0, _validateNode.default)({
  16634. type: "SpreadElement",
  16635. argument
  16636. });
  16637. }
  16638. function _super() {
  16639. return {
  16640. type: "Super"
  16641. };
  16642. }
  16643. function taggedTemplateExpression(tag, quasi) {
  16644. return (0, _validateNode.default)({
  16645. type: "TaggedTemplateExpression",
  16646. tag,
  16647. quasi
  16648. });
  16649. }
  16650. function templateElement(value2, tail = false) {
  16651. return (0, _validateNode.default)({
  16652. type: "TemplateElement",
  16653. value: value2,
  16654. tail
  16655. });
  16656. }
  16657. function templateLiteral(quasis, expressions) {
  16658. return (0, _validateNode.default)({
  16659. type: "TemplateLiteral",
  16660. quasis,
  16661. expressions
  16662. });
  16663. }
  16664. function yieldExpression(argument = null, delegate = false) {
  16665. return (0, _validateNode.default)({
  16666. type: "YieldExpression",
  16667. argument,
  16668. delegate
  16669. });
  16670. }
  16671. function awaitExpression(argument) {
  16672. return (0, _validateNode.default)({
  16673. type: "AwaitExpression",
  16674. argument
  16675. });
  16676. }
  16677. function _import() {
  16678. return {
  16679. type: "Import"
  16680. };
  16681. }
  16682. function bigIntLiteral(value2) {
  16683. return (0, _validateNode.default)({
  16684. type: "BigIntLiteral",
  16685. value: value2
  16686. });
  16687. }
  16688. function exportNamespaceSpecifier(exported) {
  16689. return (0, _validateNode.default)({
  16690. type: "ExportNamespaceSpecifier",
  16691. exported
  16692. });
  16693. }
  16694. function optionalMemberExpression(object, property, computed = false, optional) {
  16695. return (0, _validateNode.default)({
  16696. type: "OptionalMemberExpression",
  16697. object,
  16698. property,
  16699. computed,
  16700. optional
  16701. });
  16702. }
  16703. function optionalCallExpression(callee, _arguments, optional) {
  16704. return (0, _validateNode.default)({
  16705. type: "OptionalCallExpression",
  16706. callee,
  16707. arguments: _arguments,
  16708. optional
  16709. });
  16710. }
  16711. function classProperty(key2, value2 = null, typeAnnotation2 = null, decorators = null, computed = false, _static = false) {
  16712. return (0, _validateNode.default)({
  16713. type: "ClassProperty",
  16714. key: key2,
  16715. value: value2,
  16716. typeAnnotation: typeAnnotation2,
  16717. decorators,
  16718. computed,
  16719. static: _static
  16720. });
  16721. }
  16722. function classAccessorProperty(key2, value2 = null, typeAnnotation2 = null, decorators = null, computed = false, _static = false) {
  16723. return (0, _validateNode.default)({
  16724. type: "ClassAccessorProperty",
  16725. key: key2,
  16726. value: value2,
  16727. typeAnnotation: typeAnnotation2,
  16728. decorators,
  16729. computed,
  16730. static: _static
  16731. });
  16732. }
  16733. function classPrivateProperty(key2, value2 = null, decorators = null, _static = false) {
  16734. return (0, _validateNode.default)({
  16735. type: "ClassPrivateProperty",
  16736. key: key2,
  16737. value: value2,
  16738. decorators,
  16739. static: _static
  16740. });
  16741. }
  16742. function classPrivateMethod(kind = "method", key2, params, body, _static = false) {
  16743. return (0, _validateNode.default)({
  16744. type: "ClassPrivateMethod",
  16745. kind,
  16746. key: key2,
  16747. params,
  16748. body,
  16749. static: _static
  16750. });
  16751. }
  16752. function privateName(id) {
  16753. return (0, _validateNode.default)({
  16754. type: "PrivateName",
  16755. id
  16756. });
  16757. }
  16758. function staticBlock(body) {
  16759. return (0, _validateNode.default)({
  16760. type: "StaticBlock",
  16761. body
  16762. });
  16763. }
  16764. function anyTypeAnnotation() {
  16765. return {
  16766. type: "AnyTypeAnnotation"
  16767. };
  16768. }
  16769. function arrayTypeAnnotation(elementType) {
  16770. return (0, _validateNode.default)({
  16771. type: "ArrayTypeAnnotation",
  16772. elementType
  16773. });
  16774. }
  16775. function booleanTypeAnnotation() {
  16776. return {
  16777. type: "BooleanTypeAnnotation"
  16778. };
  16779. }
  16780. function booleanLiteralTypeAnnotation(value2) {
  16781. return (0, _validateNode.default)({
  16782. type: "BooleanLiteralTypeAnnotation",
  16783. value: value2
  16784. });
  16785. }
  16786. function nullLiteralTypeAnnotation() {
  16787. return {
  16788. type: "NullLiteralTypeAnnotation"
  16789. };
  16790. }
  16791. function classImplements(id, typeParameters = null) {
  16792. return (0, _validateNode.default)({
  16793. type: "ClassImplements",
  16794. id,
  16795. typeParameters
  16796. });
  16797. }
  16798. function declareClass(id, typeParameters = null, _extends = null, body) {
  16799. return (0, _validateNode.default)({
  16800. type: "DeclareClass",
  16801. id,
  16802. typeParameters,
  16803. extends: _extends,
  16804. body
  16805. });
  16806. }
  16807. function declareFunction(id) {
  16808. return (0, _validateNode.default)({
  16809. type: "DeclareFunction",
  16810. id
  16811. });
  16812. }
  16813. function declareInterface(id, typeParameters = null, _extends = null, body) {
  16814. return (0, _validateNode.default)({
  16815. type: "DeclareInterface",
  16816. id,
  16817. typeParameters,
  16818. extends: _extends,
  16819. body
  16820. });
  16821. }
  16822. function declareModule(id, body, kind = null) {
  16823. return (0, _validateNode.default)({
  16824. type: "DeclareModule",
  16825. id,
  16826. body,
  16827. kind
  16828. });
  16829. }
  16830. function declareModuleExports(typeAnnotation2) {
  16831. return (0, _validateNode.default)({
  16832. type: "DeclareModuleExports",
  16833. typeAnnotation: typeAnnotation2
  16834. });
  16835. }
  16836. function declareTypeAlias(id, typeParameters = null, right) {
  16837. return (0, _validateNode.default)({
  16838. type: "DeclareTypeAlias",
  16839. id,
  16840. typeParameters,
  16841. right
  16842. });
  16843. }
  16844. function declareOpaqueType(id, typeParameters = null, supertype = null) {
  16845. return (0, _validateNode.default)({
  16846. type: "DeclareOpaqueType",
  16847. id,
  16848. typeParameters,
  16849. supertype
  16850. });
  16851. }
  16852. function declareVariable(id) {
  16853. return (0, _validateNode.default)({
  16854. type: "DeclareVariable",
  16855. id
  16856. });
  16857. }
  16858. function declareExportDeclaration(declaration = null, specifiers = null, source2 = null) {
  16859. return (0, _validateNode.default)({
  16860. type: "DeclareExportDeclaration",
  16861. declaration,
  16862. specifiers,
  16863. source: source2
  16864. });
  16865. }
  16866. function declareExportAllDeclaration(source2) {
  16867. return (0, _validateNode.default)({
  16868. type: "DeclareExportAllDeclaration",
  16869. source: source2
  16870. });
  16871. }
  16872. function declaredPredicate(value2) {
  16873. return (0, _validateNode.default)({
  16874. type: "DeclaredPredicate",
  16875. value: value2
  16876. });
  16877. }
  16878. function existsTypeAnnotation() {
  16879. return {
  16880. type: "ExistsTypeAnnotation"
  16881. };
  16882. }
  16883. function functionTypeAnnotation(typeParameters = null, params, rest = null, returnType) {
  16884. return (0, _validateNode.default)({
  16885. type: "FunctionTypeAnnotation",
  16886. typeParameters,
  16887. params,
  16888. rest,
  16889. returnType
  16890. });
  16891. }
  16892. function functionTypeParam(name2 = null, typeAnnotation2) {
  16893. return (0, _validateNode.default)({
  16894. type: "FunctionTypeParam",
  16895. name: name2,
  16896. typeAnnotation: typeAnnotation2
  16897. });
  16898. }
  16899. function genericTypeAnnotation(id, typeParameters = null) {
  16900. return (0, _validateNode.default)({
  16901. type: "GenericTypeAnnotation",
  16902. id,
  16903. typeParameters
  16904. });
  16905. }
  16906. function inferredPredicate() {
  16907. return {
  16908. type: "InferredPredicate"
  16909. };
  16910. }
  16911. function interfaceExtends(id, typeParameters = null) {
  16912. return (0, _validateNode.default)({
  16913. type: "InterfaceExtends",
  16914. id,
  16915. typeParameters
  16916. });
  16917. }
  16918. function interfaceDeclaration(id, typeParameters = null, _extends = null, body) {
  16919. return (0, _validateNode.default)({
  16920. type: "InterfaceDeclaration",
  16921. id,
  16922. typeParameters,
  16923. extends: _extends,
  16924. body
  16925. });
  16926. }
  16927. function interfaceTypeAnnotation(_extends = null, body) {
  16928. return (0, _validateNode.default)({
  16929. type: "InterfaceTypeAnnotation",
  16930. extends: _extends,
  16931. body
  16932. });
  16933. }
  16934. function intersectionTypeAnnotation(types3) {
  16935. return (0, _validateNode.default)({
  16936. type: "IntersectionTypeAnnotation",
  16937. types: types3
  16938. });
  16939. }
  16940. function mixedTypeAnnotation() {
  16941. return {
  16942. type: "MixedTypeAnnotation"
  16943. };
  16944. }
  16945. function emptyTypeAnnotation() {
  16946. return {
  16947. type: "EmptyTypeAnnotation"
  16948. };
  16949. }
  16950. function nullableTypeAnnotation(typeAnnotation2) {
  16951. return (0, _validateNode.default)({
  16952. type: "NullableTypeAnnotation",
  16953. typeAnnotation: typeAnnotation2
  16954. });
  16955. }
  16956. function numberLiteralTypeAnnotation(value2) {
  16957. return (0, _validateNode.default)({
  16958. type: "NumberLiteralTypeAnnotation",
  16959. value: value2
  16960. });
  16961. }
  16962. function numberTypeAnnotation() {
  16963. return {
  16964. type: "NumberTypeAnnotation"
  16965. };
  16966. }
  16967. function objectTypeAnnotation(properties, indexers = [], callProperties = [], internalSlots = [], exact = false) {
  16968. return (0, _validateNode.default)({
  16969. type: "ObjectTypeAnnotation",
  16970. properties,
  16971. indexers,
  16972. callProperties,
  16973. internalSlots,
  16974. exact
  16975. });
  16976. }
  16977. function objectTypeInternalSlot(id, value2, optional, _static, method) {
  16978. return (0, _validateNode.default)({
  16979. type: "ObjectTypeInternalSlot",
  16980. id,
  16981. value: value2,
  16982. optional,
  16983. static: _static,
  16984. method
  16985. });
  16986. }
  16987. function objectTypeCallProperty(value2) {
  16988. return (0, _validateNode.default)({
  16989. type: "ObjectTypeCallProperty",
  16990. value: value2,
  16991. static: null
  16992. });
  16993. }
  16994. function objectTypeIndexer(id = null, key2, value2, variance2 = null) {
  16995. return (0, _validateNode.default)({
  16996. type: "ObjectTypeIndexer",
  16997. id,
  16998. key: key2,
  16999. value: value2,
  17000. variance: variance2,
  17001. static: null
  17002. });
  17003. }
  17004. function objectTypeProperty(key2, value2, variance2 = null) {
  17005. return (0, _validateNode.default)({
  17006. type: "ObjectTypeProperty",
  17007. key: key2,
  17008. value: value2,
  17009. variance: variance2,
  17010. kind: null,
  17011. method: null,
  17012. optional: null,
  17013. proto: null,
  17014. static: null
  17015. });
  17016. }
  17017. function objectTypeSpreadProperty(argument) {
  17018. return (0, _validateNode.default)({
  17019. type: "ObjectTypeSpreadProperty",
  17020. argument
  17021. });
  17022. }
  17023. function opaqueType(id, typeParameters = null, supertype = null, impltype) {
  17024. return (0, _validateNode.default)({
  17025. type: "OpaqueType",
  17026. id,
  17027. typeParameters,
  17028. supertype,
  17029. impltype
  17030. });
  17031. }
  17032. function qualifiedTypeIdentifier(id, qualification) {
  17033. return (0, _validateNode.default)({
  17034. type: "QualifiedTypeIdentifier",
  17035. id,
  17036. qualification
  17037. });
  17038. }
  17039. function stringLiteralTypeAnnotation(value2) {
  17040. return (0, _validateNode.default)({
  17041. type: "StringLiteralTypeAnnotation",
  17042. value: value2
  17043. });
  17044. }
  17045. function stringTypeAnnotation() {
  17046. return {
  17047. type: "StringTypeAnnotation"
  17048. };
  17049. }
  17050. function symbolTypeAnnotation() {
  17051. return {
  17052. type: "SymbolTypeAnnotation"
  17053. };
  17054. }
  17055. function thisTypeAnnotation() {
  17056. return {
  17057. type: "ThisTypeAnnotation"
  17058. };
  17059. }
  17060. function tupleTypeAnnotation(types3) {
  17061. return (0, _validateNode.default)({
  17062. type: "TupleTypeAnnotation",
  17063. types: types3
  17064. });
  17065. }
  17066. function typeofTypeAnnotation(argument) {
  17067. return (0, _validateNode.default)({
  17068. type: "TypeofTypeAnnotation",
  17069. argument
  17070. });
  17071. }
  17072. function typeAlias(id, typeParameters = null, right) {
  17073. return (0, _validateNode.default)({
  17074. type: "TypeAlias",
  17075. id,
  17076. typeParameters,
  17077. right
  17078. });
  17079. }
  17080. function typeAnnotation(typeAnnotation2) {
  17081. return (0, _validateNode.default)({
  17082. type: "TypeAnnotation",
  17083. typeAnnotation: typeAnnotation2
  17084. });
  17085. }
  17086. function typeCastExpression(expression, typeAnnotation2) {
  17087. return (0, _validateNode.default)({
  17088. type: "TypeCastExpression",
  17089. expression,
  17090. typeAnnotation: typeAnnotation2
  17091. });
  17092. }
  17093. function typeParameter(bound = null, _default = null, variance2 = null) {
  17094. return (0, _validateNode.default)({
  17095. type: "TypeParameter",
  17096. bound,
  17097. default: _default,
  17098. variance: variance2,
  17099. name: null
  17100. });
  17101. }
  17102. function typeParameterDeclaration(params) {
  17103. return (0, _validateNode.default)({
  17104. type: "TypeParameterDeclaration",
  17105. params
  17106. });
  17107. }
  17108. function typeParameterInstantiation(params) {
  17109. return (0, _validateNode.default)({
  17110. type: "TypeParameterInstantiation",
  17111. params
  17112. });
  17113. }
  17114. function unionTypeAnnotation(types3) {
  17115. return (0, _validateNode.default)({
  17116. type: "UnionTypeAnnotation",
  17117. types: types3
  17118. });
  17119. }
  17120. function variance(kind) {
  17121. return (0, _validateNode.default)({
  17122. type: "Variance",
  17123. kind
  17124. });
  17125. }
  17126. function voidTypeAnnotation() {
  17127. return {
  17128. type: "VoidTypeAnnotation"
  17129. };
  17130. }
  17131. function enumDeclaration(id, body) {
  17132. return (0, _validateNode.default)({
  17133. type: "EnumDeclaration",
  17134. id,
  17135. body
  17136. });
  17137. }
  17138. function enumBooleanBody(members) {
  17139. return (0, _validateNode.default)({
  17140. type: "EnumBooleanBody",
  17141. members,
  17142. explicitType: null,
  17143. hasUnknownMembers: null
  17144. });
  17145. }
  17146. function enumNumberBody(members) {
  17147. return (0, _validateNode.default)({
  17148. type: "EnumNumberBody",
  17149. members,
  17150. explicitType: null,
  17151. hasUnknownMembers: null
  17152. });
  17153. }
  17154. function enumStringBody(members) {
  17155. return (0, _validateNode.default)({
  17156. type: "EnumStringBody",
  17157. members,
  17158. explicitType: null,
  17159. hasUnknownMembers: null
  17160. });
  17161. }
  17162. function enumSymbolBody(members) {
  17163. return (0, _validateNode.default)({
  17164. type: "EnumSymbolBody",
  17165. members,
  17166. hasUnknownMembers: null
  17167. });
  17168. }
  17169. function enumBooleanMember(id) {
  17170. return (0, _validateNode.default)({
  17171. type: "EnumBooleanMember",
  17172. id,
  17173. init: null
  17174. });
  17175. }
  17176. function enumNumberMember(id, init) {
  17177. return (0, _validateNode.default)({
  17178. type: "EnumNumberMember",
  17179. id,
  17180. init
  17181. });
  17182. }
  17183. function enumStringMember(id, init) {
  17184. return (0, _validateNode.default)({
  17185. type: "EnumStringMember",
  17186. id,
  17187. init
  17188. });
  17189. }
  17190. function enumDefaultedMember(id) {
  17191. return (0, _validateNode.default)({
  17192. type: "EnumDefaultedMember",
  17193. id
  17194. });
  17195. }
  17196. function indexedAccessType(objectType, indexType) {
  17197. return (0, _validateNode.default)({
  17198. type: "IndexedAccessType",
  17199. objectType,
  17200. indexType
  17201. });
  17202. }
  17203. function optionalIndexedAccessType(objectType, indexType) {
  17204. return (0, _validateNode.default)({
  17205. type: "OptionalIndexedAccessType",
  17206. objectType,
  17207. indexType,
  17208. optional: null
  17209. });
  17210. }
  17211. function jsxAttribute2(name2, value2 = null) {
  17212. return (0, _validateNode.default)({
  17213. type: "JSXAttribute",
  17214. name: name2,
  17215. value: value2
  17216. });
  17217. }
  17218. function jsxClosingElement(name2) {
  17219. return (0, _validateNode.default)({
  17220. type: "JSXClosingElement",
  17221. name: name2
  17222. });
  17223. }
  17224. function jsxElement(openingElement, closingElement = null, children, selfClosing = null) {
  17225. return (0, _validateNode.default)({
  17226. type: "JSXElement",
  17227. openingElement,
  17228. closingElement,
  17229. children,
  17230. selfClosing
  17231. });
  17232. }
  17233. function jsxEmptyExpression() {
  17234. return {
  17235. type: "JSXEmptyExpression"
  17236. };
  17237. }
  17238. function jsxExpressionContainer(expression) {
  17239. return (0, _validateNode.default)({
  17240. type: "JSXExpressionContainer",
  17241. expression
  17242. });
  17243. }
  17244. function jsxSpreadChild(expression) {
  17245. return (0, _validateNode.default)({
  17246. type: "JSXSpreadChild",
  17247. expression
  17248. });
  17249. }
  17250. function jsxIdentifier2(name2) {
  17251. return (0, _validateNode.default)({
  17252. type: "JSXIdentifier",
  17253. name: name2
  17254. });
  17255. }
  17256. function jsxMemberExpression(object, property) {
  17257. return (0, _validateNode.default)({
  17258. type: "JSXMemberExpression",
  17259. object,
  17260. property
  17261. });
  17262. }
  17263. function jsxNamespacedName(namespace, name2) {
  17264. return (0, _validateNode.default)({
  17265. type: "JSXNamespacedName",
  17266. namespace,
  17267. name: name2
  17268. });
  17269. }
  17270. function jsxOpeningElement(name2, attributes, selfClosing = false) {
  17271. return (0, _validateNode.default)({
  17272. type: "JSXOpeningElement",
  17273. name: name2,
  17274. attributes,
  17275. selfClosing
  17276. });
  17277. }
  17278. function jsxSpreadAttribute(argument) {
  17279. return (0, _validateNode.default)({
  17280. type: "JSXSpreadAttribute",
  17281. argument
  17282. });
  17283. }
  17284. function jsxText2(value2) {
  17285. return (0, _validateNode.default)({
  17286. type: "JSXText",
  17287. value: value2
  17288. });
  17289. }
  17290. function jsxFragment(openingFragment, closingFragment, children) {
  17291. return (0, _validateNode.default)({
  17292. type: "JSXFragment",
  17293. openingFragment,
  17294. closingFragment,
  17295. children
  17296. });
  17297. }
  17298. function jsxOpeningFragment() {
  17299. return {
  17300. type: "JSXOpeningFragment"
  17301. };
  17302. }
  17303. function jsxClosingFragment() {
  17304. return {
  17305. type: "JSXClosingFragment"
  17306. };
  17307. }
  17308. function noop() {
  17309. return {
  17310. type: "Noop"
  17311. };
  17312. }
  17313. function placeholder(expectedNode, name2) {
  17314. return (0, _validateNode.default)({
  17315. type: "Placeholder",
  17316. expectedNode,
  17317. name: name2
  17318. });
  17319. }
  17320. function v8IntrinsicIdentifier(name2) {
  17321. return (0, _validateNode.default)({
  17322. type: "V8IntrinsicIdentifier",
  17323. name: name2
  17324. });
  17325. }
  17326. function argumentPlaceholder() {
  17327. return {
  17328. type: "ArgumentPlaceholder"
  17329. };
  17330. }
  17331. function bindExpression(object, callee) {
  17332. return (0, _validateNode.default)({
  17333. type: "BindExpression",
  17334. object,
  17335. callee
  17336. });
  17337. }
  17338. function importAttribute(key2, value2) {
  17339. return (0, _validateNode.default)({
  17340. type: "ImportAttribute",
  17341. key: key2,
  17342. value: value2
  17343. });
  17344. }
  17345. function decorator(expression) {
  17346. return (0, _validateNode.default)({
  17347. type: "Decorator",
  17348. expression
  17349. });
  17350. }
  17351. function doExpression(body, async = false) {
  17352. return (0, _validateNode.default)({
  17353. type: "DoExpression",
  17354. body,
  17355. async
  17356. });
  17357. }
  17358. function exportDefaultSpecifier(exported) {
  17359. return (0, _validateNode.default)({
  17360. type: "ExportDefaultSpecifier",
  17361. exported
  17362. });
  17363. }
  17364. function recordExpression(properties) {
  17365. return (0, _validateNode.default)({
  17366. type: "RecordExpression",
  17367. properties
  17368. });
  17369. }
  17370. function tupleExpression(elements = []) {
  17371. return (0, _validateNode.default)({
  17372. type: "TupleExpression",
  17373. elements
  17374. });
  17375. }
  17376. function decimalLiteral(value2) {
  17377. return (0, _validateNode.default)({
  17378. type: "DecimalLiteral",
  17379. value: value2
  17380. });
  17381. }
  17382. function moduleExpression(body) {
  17383. return (0, _validateNode.default)({
  17384. type: "ModuleExpression",
  17385. body
  17386. });
  17387. }
  17388. function topicReference() {
  17389. return {
  17390. type: "TopicReference"
  17391. };
  17392. }
  17393. function pipelineTopicExpression(expression) {
  17394. return (0, _validateNode.default)({
  17395. type: "PipelineTopicExpression",
  17396. expression
  17397. });
  17398. }
  17399. function pipelineBareFunction(callee) {
  17400. return (0, _validateNode.default)({
  17401. type: "PipelineBareFunction",
  17402. callee
  17403. });
  17404. }
  17405. function pipelinePrimaryTopicReference() {
  17406. return {
  17407. type: "PipelinePrimaryTopicReference"
  17408. };
  17409. }
  17410. function tsParameterProperty(parameter) {
  17411. return (0, _validateNode.default)({
  17412. type: "TSParameterProperty",
  17413. parameter
  17414. });
  17415. }
  17416. function tsDeclareFunction(id = null, typeParameters = null, params, returnType = null) {
  17417. return (0, _validateNode.default)({
  17418. type: "TSDeclareFunction",
  17419. id,
  17420. typeParameters,
  17421. params,
  17422. returnType
  17423. });
  17424. }
  17425. function tsDeclareMethod(decorators = null, key2, typeParameters = null, params, returnType = null) {
  17426. return (0, _validateNode.default)({
  17427. type: "TSDeclareMethod",
  17428. decorators,
  17429. key: key2,
  17430. typeParameters,
  17431. params,
  17432. returnType
  17433. });
  17434. }
  17435. function tsQualifiedName(left, right) {
  17436. return (0, _validateNode.default)({
  17437. type: "TSQualifiedName",
  17438. left,
  17439. right
  17440. });
  17441. }
  17442. function tsCallSignatureDeclaration(typeParameters = null, parameters, typeAnnotation2 = null) {
  17443. return (0, _validateNode.default)({
  17444. type: "TSCallSignatureDeclaration",
  17445. typeParameters,
  17446. parameters,
  17447. typeAnnotation: typeAnnotation2
  17448. });
  17449. }
  17450. function tsConstructSignatureDeclaration(typeParameters = null, parameters, typeAnnotation2 = null) {
  17451. return (0, _validateNode.default)({
  17452. type: "TSConstructSignatureDeclaration",
  17453. typeParameters,
  17454. parameters,
  17455. typeAnnotation: typeAnnotation2
  17456. });
  17457. }
  17458. function tsPropertySignature(key2, typeAnnotation2 = null, initializer = null) {
  17459. return (0, _validateNode.default)({
  17460. type: "TSPropertySignature",
  17461. key: key2,
  17462. typeAnnotation: typeAnnotation2,
  17463. initializer,
  17464. kind: null
  17465. });
  17466. }
  17467. function tsMethodSignature(key2, typeParameters = null, parameters, typeAnnotation2 = null) {
  17468. return (0, _validateNode.default)({
  17469. type: "TSMethodSignature",
  17470. key: key2,
  17471. typeParameters,
  17472. parameters,
  17473. typeAnnotation: typeAnnotation2,
  17474. kind: null
  17475. });
  17476. }
  17477. function tsIndexSignature(parameters, typeAnnotation2 = null) {
  17478. return (0, _validateNode.default)({
  17479. type: "TSIndexSignature",
  17480. parameters,
  17481. typeAnnotation: typeAnnotation2
  17482. });
  17483. }
  17484. function tsAnyKeyword() {
  17485. return {
  17486. type: "TSAnyKeyword"
  17487. };
  17488. }
  17489. function tsBooleanKeyword() {
  17490. return {
  17491. type: "TSBooleanKeyword"
  17492. };
  17493. }
  17494. function tsBigIntKeyword() {
  17495. return {
  17496. type: "TSBigIntKeyword"
  17497. };
  17498. }
  17499. function tsIntrinsicKeyword() {
  17500. return {
  17501. type: "TSIntrinsicKeyword"
  17502. };
  17503. }
  17504. function tsNeverKeyword() {
  17505. return {
  17506. type: "TSNeverKeyword"
  17507. };
  17508. }
  17509. function tsNullKeyword() {
  17510. return {
  17511. type: "TSNullKeyword"
  17512. };
  17513. }
  17514. function tsNumberKeyword() {
  17515. return {
  17516. type: "TSNumberKeyword"
  17517. };
  17518. }
  17519. function tsObjectKeyword() {
  17520. return {
  17521. type: "TSObjectKeyword"
  17522. };
  17523. }
  17524. function tsStringKeyword() {
  17525. return {
  17526. type: "TSStringKeyword"
  17527. };
  17528. }
  17529. function tsSymbolKeyword() {
  17530. return {
  17531. type: "TSSymbolKeyword"
  17532. };
  17533. }
  17534. function tsUndefinedKeyword() {
  17535. return {
  17536. type: "TSUndefinedKeyword"
  17537. };
  17538. }
  17539. function tsUnknownKeyword() {
  17540. return {
  17541. type: "TSUnknownKeyword"
  17542. };
  17543. }
  17544. function tsVoidKeyword() {
  17545. return {
  17546. type: "TSVoidKeyword"
  17547. };
  17548. }
  17549. function tsThisType() {
  17550. return {
  17551. type: "TSThisType"
  17552. };
  17553. }
  17554. function tsFunctionType(typeParameters = null, parameters, typeAnnotation2 = null) {
  17555. return (0, _validateNode.default)({
  17556. type: "TSFunctionType",
  17557. typeParameters,
  17558. parameters,
  17559. typeAnnotation: typeAnnotation2
  17560. });
  17561. }
  17562. function tsConstructorType(typeParameters = null, parameters, typeAnnotation2 = null) {
  17563. return (0, _validateNode.default)({
  17564. type: "TSConstructorType",
  17565. typeParameters,
  17566. parameters,
  17567. typeAnnotation: typeAnnotation2
  17568. });
  17569. }
  17570. function tsTypeReference(typeName, typeParameters = null) {
  17571. return (0, _validateNode.default)({
  17572. type: "TSTypeReference",
  17573. typeName,
  17574. typeParameters
  17575. });
  17576. }
  17577. function tsTypePredicate(parameterName, typeAnnotation2 = null, asserts = null) {
  17578. return (0, _validateNode.default)({
  17579. type: "TSTypePredicate",
  17580. parameterName,
  17581. typeAnnotation: typeAnnotation2,
  17582. asserts
  17583. });
  17584. }
  17585. function tsTypeQuery(exprName, typeParameters = null) {
  17586. return (0, _validateNode.default)({
  17587. type: "TSTypeQuery",
  17588. exprName,
  17589. typeParameters
  17590. });
  17591. }
  17592. function tsTypeLiteral(members) {
  17593. return (0, _validateNode.default)({
  17594. type: "TSTypeLiteral",
  17595. members
  17596. });
  17597. }
  17598. function tsArrayType(elementType) {
  17599. return (0, _validateNode.default)({
  17600. type: "TSArrayType",
  17601. elementType
  17602. });
  17603. }
  17604. function tsTupleType(elementTypes) {
  17605. return (0, _validateNode.default)({
  17606. type: "TSTupleType",
  17607. elementTypes
  17608. });
  17609. }
  17610. function tsOptionalType(typeAnnotation2) {
  17611. return (0, _validateNode.default)({
  17612. type: "TSOptionalType",
  17613. typeAnnotation: typeAnnotation2
  17614. });
  17615. }
  17616. function tsRestType(typeAnnotation2) {
  17617. return (0, _validateNode.default)({
  17618. type: "TSRestType",
  17619. typeAnnotation: typeAnnotation2
  17620. });
  17621. }
  17622. function tsNamedTupleMember(label, elementType, optional = false) {
  17623. return (0, _validateNode.default)({
  17624. type: "TSNamedTupleMember",
  17625. label,
  17626. elementType,
  17627. optional
  17628. });
  17629. }
  17630. function tsUnionType(types3) {
  17631. return (0, _validateNode.default)({
  17632. type: "TSUnionType",
  17633. types: types3
  17634. });
  17635. }
  17636. function tsIntersectionType(types3) {
  17637. return (0, _validateNode.default)({
  17638. type: "TSIntersectionType",
  17639. types: types3
  17640. });
  17641. }
  17642. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  17643. return (0, _validateNode.default)({
  17644. type: "TSConditionalType",
  17645. checkType,
  17646. extendsType,
  17647. trueType,
  17648. falseType
  17649. });
  17650. }
  17651. function tsInferType(typeParameter2) {
  17652. return (0, _validateNode.default)({
  17653. type: "TSInferType",
  17654. typeParameter: typeParameter2
  17655. });
  17656. }
  17657. function tsParenthesizedType(typeAnnotation2) {
  17658. return (0, _validateNode.default)({
  17659. type: "TSParenthesizedType",
  17660. typeAnnotation: typeAnnotation2
  17661. });
  17662. }
  17663. function tsTypeOperator(typeAnnotation2) {
  17664. return (0, _validateNode.default)({
  17665. type: "TSTypeOperator",
  17666. typeAnnotation: typeAnnotation2,
  17667. operator: null
  17668. });
  17669. }
  17670. function tsIndexedAccessType(objectType, indexType) {
  17671. return (0, _validateNode.default)({
  17672. type: "TSIndexedAccessType",
  17673. objectType,
  17674. indexType
  17675. });
  17676. }
  17677. function tsMappedType(typeParameter2, typeAnnotation2 = null, nameType = null) {
  17678. return (0, _validateNode.default)({
  17679. type: "TSMappedType",
  17680. typeParameter: typeParameter2,
  17681. typeAnnotation: typeAnnotation2,
  17682. nameType
  17683. });
  17684. }
  17685. function tsLiteralType(literal4) {
  17686. return (0, _validateNode.default)({
  17687. type: "TSLiteralType",
  17688. literal: literal4
  17689. });
  17690. }
  17691. function tsExpressionWithTypeArguments(expression, typeParameters = null) {
  17692. return (0, _validateNode.default)({
  17693. type: "TSExpressionWithTypeArguments",
  17694. expression,
  17695. typeParameters
  17696. });
  17697. }
  17698. function tsInterfaceDeclaration(id, typeParameters = null, _extends = null, body) {
  17699. return (0, _validateNode.default)({
  17700. type: "TSInterfaceDeclaration",
  17701. id,
  17702. typeParameters,
  17703. extends: _extends,
  17704. body
  17705. });
  17706. }
  17707. function tsInterfaceBody(body) {
  17708. return (0, _validateNode.default)({
  17709. type: "TSInterfaceBody",
  17710. body
  17711. });
  17712. }
  17713. function tsTypeAliasDeclaration(id, typeParameters = null, typeAnnotation2) {
  17714. return (0, _validateNode.default)({
  17715. type: "TSTypeAliasDeclaration",
  17716. id,
  17717. typeParameters,
  17718. typeAnnotation: typeAnnotation2
  17719. });
  17720. }
  17721. function tsInstantiationExpression(expression, typeParameters = null) {
  17722. return (0, _validateNode.default)({
  17723. type: "TSInstantiationExpression",
  17724. expression,
  17725. typeParameters
  17726. });
  17727. }
  17728. function tsAsExpression(expression, typeAnnotation2) {
  17729. return (0, _validateNode.default)({
  17730. type: "TSAsExpression",
  17731. expression,
  17732. typeAnnotation: typeAnnotation2
  17733. });
  17734. }
  17735. function tsSatisfiesExpression(expression, typeAnnotation2) {
  17736. return (0, _validateNode.default)({
  17737. type: "TSSatisfiesExpression",
  17738. expression,
  17739. typeAnnotation: typeAnnotation2
  17740. });
  17741. }
  17742. function tsTypeAssertion(typeAnnotation2, expression) {
  17743. return (0, _validateNode.default)({
  17744. type: "TSTypeAssertion",
  17745. typeAnnotation: typeAnnotation2,
  17746. expression
  17747. });
  17748. }
  17749. function tsEnumDeclaration(id, members) {
  17750. return (0, _validateNode.default)({
  17751. type: "TSEnumDeclaration",
  17752. id,
  17753. members
  17754. });
  17755. }
  17756. function tsEnumMember(id, initializer = null) {
  17757. return (0, _validateNode.default)({
  17758. type: "TSEnumMember",
  17759. id,
  17760. initializer
  17761. });
  17762. }
  17763. function tsModuleDeclaration(id, body) {
  17764. return (0, _validateNode.default)({
  17765. type: "TSModuleDeclaration",
  17766. id,
  17767. body
  17768. });
  17769. }
  17770. function tsModuleBlock(body) {
  17771. return (0, _validateNode.default)({
  17772. type: "TSModuleBlock",
  17773. body
  17774. });
  17775. }
  17776. function tsImportType(argument, qualifier = null, typeParameters = null) {
  17777. return (0, _validateNode.default)({
  17778. type: "TSImportType",
  17779. argument,
  17780. qualifier,
  17781. typeParameters
  17782. });
  17783. }
  17784. function tsImportEqualsDeclaration(id, moduleReference) {
  17785. return (0, _validateNode.default)({
  17786. type: "TSImportEqualsDeclaration",
  17787. id,
  17788. moduleReference,
  17789. isExport: null
  17790. });
  17791. }
  17792. function tsExternalModuleReference(expression) {
  17793. return (0, _validateNode.default)({
  17794. type: "TSExternalModuleReference",
  17795. expression
  17796. });
  17797. }
  17798. function tsNonNullExpression(expression) {
  17799. return (0, _validateNode.default)({
  17800. type: "TSNonNullExpression",
  17801. expression
  17802. });
  17803. }
  17804. function tsExportAssignment(expression) {
  17805. return (0, _validateNode.default)({
  17806. type: "TSExportAssignment",
  17807. expression
  17808. });
  17809. }
  17810. function tsNamespaceExportDeclaration(id) {
  17811. return (0, _validateNode.default)({
  17812. type: "TSNamespaceExportDeclaration",
  17813. id
  17814. });
  17815. }
  17816. function tsTypeAnnotation(typeAnnotation2) {
  17817. return (0, _validateNode.default)({
  17818. type: "TSTypeAnnotation",
  17819. typeAnnotation: typeAnnotation2
  17820. });
  17821. }
  17822. function tsTypeParameterInstantiation(params) {
  17823. return (0, _validateNode.default)({
  17824. type: "TSTypeParameterInstantiation",
  17825. params
  17826. });
  17827. }
  17828. function tsTypeParameterDeclaration(params) {
  17829. return (0, _validateNode.default)({
  17830. type: "TSTypeParameterDeclaration",
  17831. params
  17832. });
  17833. }
  17834. function tsTypeParameter(constraint = null, _default = null, name2) {
  17835. return (0, _validateNode.default)({
  17836. type: "TSTypeParameter",
  17837. constraint,
  17838. default: _default,
  17839. name: name2
  17840. });
  17841. }
  17842. function NumberLiteral(value2) {
  17843. (0, _deprecationWarning.default)("NumberLiteral", "NumericLiteral", "The node type ");
  17844. return numericLiteral(value2);
  17845. }
  17846. function RegexLiteral(pattern, flags = "") {
  17847. (0, _deprecationWarning.default)("RegexLiteral", "RegExpLiteral", "The node type ");
  17848. return regExpLiteral(pattern, flags);
  17849. }
  17850. function RestProperty(argument) {
  17851. (0, _deprecationWarning.default)("RestProperty", "RestElement", "The node type ");
  17852. return restElement(argument);
  17853. }
  17854. function SpreadProperty(argument) {
  17855. (0, _deprecationWarning.default)("SpreadProperty", "SpreadElement", "The node type ");
  17856. return spreadElement(argument);
  17857. }
  17858. }
  17859. });
  17860. // node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
  17861. var require_cleanJSXElementLiteralChild = __commonJS({
  17862. "node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports) {
  17863. "use strict";
  17864. Object.defineProperty(exports, "__esModule", {
  17865. value: true
  17866. });
  17867. exports.default = cleanJSXElementLiteralChild;
  17868. var _generated = require_generated2();
  17869. var _ = require_lib3();
  17870. function cleanJSXElementLiteralChild(child, args) {
  17871. const lines = child.value.split(/\r\n|\n|\r/);
  17872. let lastNonEmptyLine = 0;
  17873. for (let i = 0; i < lines.length; i++) {
  17874. if (lines[i].match(/[^ \t]/)) {
  17875. lastNonEmptyLine = i;
  17876. }
  17877. }
  17878. let str = "";
  17879. for (let i = 0; i < lines.length; i++) {
  17880. const line2 = lines[i];
  17881. const isFirstLine = i === 0;
  17882. const isLastLine = i === lines.length - 1;
  17883. const isLastNonEmptyLine = i === lastNonEmptyLine;
  17884. let trimmedLine = line2.replace(/\t/g, " ");
  17885. if (!isFirstLine) {
  17886. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  17887. }
  17888. if (!isLastLine) {
  17889. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  17890. }
  17891. if (trimmedLine) {
  17892. if (!isLastNonEmptyLine) {
  17893. trimmedLine += " ";
  17894. }
  17895. str += trimmedLine;
  17896. }
  17897. }
  17898. if (str)
  17899. args.push((0, _.inherits)((0, _generated.stringLiteral)(str), child));
  17900. }
  17901. }
  17902. });
  17903. // node_modules/@babel/types/lib/builders/react/buildChildren.js
  17904. var require_buildChildren = __commonJS({
  17905. "node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports) {
  17906. "use strict";
  17907. Object.defineProperty(exports, "__esModule", {
  17908. value: true
  17909. });
  17910. exports.default = buildChildren;
  17911. var _generated = require_generated();
  17912. var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild();
  17913. function buildChildren(node2) {
  17914. const elements = [];
  17915. for (let i = 0; i < node2.children.length; i++) {
  17916. let child = node2.children[i];
  17917. if ((0, _generated.isJSXText)(child)) {
  17918. (0, _cleanJSXElementLiteralChild.default)(child, elements);
  17919. continue;
  17920. }
  17921. if ((0, _generated.isJSXExpressionContainer)(child))
  17922. child = child.expression;
  17923. if ((0, _generated.isJSXEmptyExpression)(child))
  17924. continue;
  17925. elements.push(child);
  17926. }
  17927. return elements;
  17928. }
  17929. }
  17930. });
  17931. // node_modules/@babel/types/lib/validators/isNode.js
  17932. var require_isNode = __commonJS({
  17933. "node_modules/@babel/types/lib/validators/isNode.js"(exports) {
  17934. "use strict";
  17935. Object.defineProperty(exports, "__esModule", {
  17936. value: true
  17937. });
  17938. exports.default = isNode2;
  17939. var _definitions = require_definitions();
  17940. function isNode2(node2) {
  17941. return !!(node2 && _definitions.VISITOR_KEYS[node2.type]);
  17942. }
  17943. }
  17944. });
  17945. // node_modules/@babel/types/lib/asserts/assertNode.js
  17946. var require_assertNode = __commonJS({
  17947. "node_modules/@babel/types/lib/asserts/assertNode.js"(exports) {
  17948. "use strict";
  17949. Object.defineProperty(exports, "__esModule", {
  17950. value: true
  17951. });
  17952. exports.default = assertNode2;
  17953. var _isNode = require_isNode();
  17954. function assertNode2(node2) {
  17955. if (!(0, _isNode.default)(node2)) {
  17956. var _node$type;
  17957. const type = (_node$type = node2 == null ? void 0 : node2.type) != null ? _node$type : JSON.stringify(node2);
  17958. throw new TypeError(`Not a valid node of type "${type}"`);
  17959. }
  17960. }
  17961. }
  17962. });
  17963. // node_modules/@babel/types/lib/asserts/generated/index.js
  17964. var require_generated3 = __commonJS({
  17965. "node_modules/@babel/types/lib/asserts/generated/index.js"(exports) {
  17966. "use strict";
  17967. Object.defineProperty(exports, "__esModule", {
  17968. value: true
  17969. });
  17970. exports.assertAccessor = assertAccessor;
  17971. exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
  17972. exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
  17973. exports.assertArrayExpression = assertArrayExpression;
  17974. exports.assertArrayPattern = assertArrayPattern;
  17975. exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
  17976. exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
  17977. exports.assertAssignmentExpression = assertAssignmentExpression;
  17978. exports.assertAssignmentPattern = assertAssignmentPattern;
  17979. exports.assertAwaitExpression = assertAwaitExpression;
  17980. exports.assertBigIntLiteral = assertBigIntLiteral;
  17981. exports.assertBinary = assertBinary;
  17982. exports.assertBinaryExpression = assertBinaryExpression;
  17983. exports.assertBindExpression = assertBindExpression;
  17984. exports.assertBlock = assertBlock;
  17985. exports.assertBlockParent = assertBlockParent;
  17986. exports.assertBlockStatement = assertBlockStatement;
  17987. exports.assertBooleanLiteral = assertBooleanLiteral;
  17988. exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
  17989. exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
  17990. exports.assertBreakStatement = assertBreakStatement;
  17991. exports.assertCallExpression = assertCallExpression;
  17992. exports.assertCatchClause = assertCatchClause;
  17993. exports.assertClass = assertClass;
  17994. exports.assertClassAccessorProperty = assertClassAccessorProperty;
  17995. exports.assertClassBody = assertClassBody;
  17996. exports.assertClassDeclaration = assertClassDeclaration;
  17997. exports.assertClassExpression = assertClassExpression;
  17998. exports.assertClassImplements = assertClassImplements;
  17999. exports.assertClassMethod = assertClassMethod;
  18000. exports.assertClassPrivateMethod = assertClassPrivateMethod;
  18001. exports.assertClassPrivateProperty = assertClassPrivateProperty;
  18002. exports.assertClassProperty = assertClassProperty;
  18003. exports.assertCompletionStatement = assertCompletionStatement;
  18004. exports.assertConditional = assertConditional;
  18005. exports.assertConditionalExpression = assertConditionalExpression;
  18006. exports.assertContinueStatement = assertContinueStatement;
  18007. exports.assertDebuggerStatement = assertDebuggerStatement;
  18008. exports.assertDecimalLiteral = assertDecimalLiteral;
  18009. exports.assertDeclaration = assertDeclaration;
  18010. exports.assertDeclareClass = assertDeclareClass;
  18011. exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
  18012. exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
  18013. exports.assertDeclareFunction = assertDeclareFunction;
  18014. exports.assertDeclareInterface = assertDeclareInterface;
  18015. exports.assertDeclareModule = assertDeclareModule;
  18016. exports.assertDeclareModuleExports = assertDeclareModuleExports;
  18017. exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
  18018. exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
  18019. exports.assertDeclareVariable = assertDeclareVariable;
  18020. exports.assertDeclaredPredicate = assertDeclaredPredicate;
  18021. exports.assertDecorator = assertDecorator;
  18022. exports.assertDirective = assertDirective;
  18023. exports.assertDirectiveLiteral = assertDirectiveLiteral;
  18024. exports.assertDoExpression = assertDoExpression;
  18025. exports.assertDoWhileStatement = assertDoWhileStatement;
  18026. exports.assertEmptyStatement = assertEmptyStatement;
  18027. exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
  18028. exports.assertEnumBody = assertEnumBody;
  18029. exports.assertEnumBooleanBody = assertEnumBooleanBody;
  18030. exports.assertEnumBooleanMember = assertEnumBooleanMember;
  18031. exports.assertEnumDeclaration = assertEnumDeclaration;
  18032. exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
  18033. exports.assertEnumMember = assertEnumMember;
  18034. exports.assertEnumNumberBody = assertEnumNumberBody;
  18035. exports.assertEnumNumberMember = assertEnumNumberMember;
  18036. exports.assertEnumStringBody = assertEnumStringBody;
  18037. exports.assertEnumStringMember = assertEnumStringMember;
  18038. exports.assertEnumSymbolBody = assertEnumSymbolBody;
  18039. exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
  18040. exports.assertExportAllDeclaration = assertExportAllDeclaration;
  18041. exports.assertExportDeclaration = assertExportDeclaration;
  18042. exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
  18043. exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
  18044. exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
  18045. exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
  18046. exports.assertExportSpecifier = assertExportSpecifier;
  18047. exports.assertExpression = assertExpression;
  18048. exports.assertExpressionStatement = assertExpressionStatement;
  18049. exports.assertExpressionWrapper = assertExpressionWrapper;
  18050. exports.assertFile = assertFile;
  18051. exports.assertFlow = assertFlow;
  18052. exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
  18053. exports.assertFlowDeclaration = assertFlowDeclaration;
  18054. exports.assertFlowPredicate = assertFlowPredicate;
  18055. exports.assertFlowType = assertFlowType;
  18056. exports.assertFor = assertFor;
  18057. exports.assertForInStatement = assertForInStatement;
  18058. exports.assertForOfStatement = assertForOfStatement;
  18059. exports.assertForStatement = assertForStatement;
  18060. exports.assertForXStatement = assertForXStatement;
  18061. exports.assertFunction = assertFunction;
  18062. exports.assertFunctionDeclaration = assertFunctionDeclaration;
  18063. exports.assertFunctionExpression = assertFunctionExpression;
  18064. exports.assertFunctionParent = assertFunctionParent;
  18065. exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
  18066. exports.assertFunctionTypeParam = assertFunctionTypeParam;
  18067. exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
  18068. exports.assertIdentifier = assertIdentifier;
  18069. exports.assertIfStatement = assertIfStatement;
  18070. exports.assertImmutable = assertImmutable;
  18071. exports.assertImport = assertImport;
  18072. exports.assertImportAttribute = assertImportAttribute;
  18073. exports.assertImportDeclaration = assertImportDeclaration;
  18074. exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
  18075. exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
  18076. exports.assertImportOrExportDeclaration = assertImportOrExportDeclaration;
  18077. exports.assertImportSpecifier = assertImportSpecifier;
  18078. exports.assertIndexedAccessType = assertIndexedAccessType;
  18079. exports.assertInferredPredicate = assertInferredPredicate;
  18080. exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
  18081. exports.assertInterfaceExtends = assertInterfaceExtends;
  18082. exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
  18083. exports.assertInterpreterDirective = assertInterpreterDirective;
  18084. exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
  18085. exports.assertJSX = assertJSX;
  18086. exports.assertJSXAttribute = assertJSXAttribute;
  18087. exports.assertJSXClosingElement = assertJSXClosingElement;
  18088. exports.assertJSXClosingFragment = assertJSXClosingFragment;
  18089. exports.assertJSXElement = assertJSXElement;
  18090. exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
  18091. exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
  18092. exports.assertJSXFragment = assertJSXFragment;
  18093. exports.assertJSXIdentifier = assertJSXIdentifier;
  18094. exports.assertJSXMemberExpression = assertJSXMemberExpression;
  18095. exports.assertJSXNamespacedName = assertJSXNamespacedName;
  18096. exports.assertJSXOpeningElement = assertJSXOpeningElement;
  18097. exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
  18098. exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
  18099. exports.assertJSXSpreadChild = assertJSXSpreadChild;
  18100. exports.assertJSXText = assertJSXText;
  18101. exports.assertLVal = assertLVal;
  18102. exports.assertLabeledStatement = assertLabeledStatement;
  18103. exports.assertLiteral = assertLiteral;
  18104. exports.assertLogicalExpression = assertLogicalExpression;
  18105. exports.assertLoop = assertLoop;
  18106. exports.assertMemberExpression = assertMemberExpression;
  18107. exports.assertMetaProperty = assertMetaProperty;
  18108. exports.assertMethod = assertMethod;
  18109. exports.assertMiscellaneous = assertMiscellaneous;
  18110. exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
  18111. exports.assertModuleDeclaration = assertModuleDeclaration;
  18112. exports.assertModuleExpression = assertModuleExpression;
  18113. exports.assertModuleSpecifier = assertModuleSpecifier;
  18114. exports.assertNewExpression = assertNewExpression;
  18115. exports.assertNoop = assertNoop;
  18116. exports.assertNullLiteral = assertNullLiteral;
  18117. exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
  18118. exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
  18119. exports.assertNumberLiteral = assertNumberLiteral;
  18120. exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
  18121. exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
  18122. exports.assertNumericLiteral = assertNumericLiteral;
  18123. exports.assertObjectExpression = assertObjectExpression;
  18124. exports.assertObjectMember = assertObjectMember;
  18125. exports.assertObjectMethod = assertObjectMethod;
  18126. exports.assertObjectPattern = assertObjectPattern;
  18127. exports.assertObjectProperty = assertObjectProperty;
  18128. exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
  18129. exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
  18130. exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
  18131. exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
  18132. exports.assertObjectTypeProperty = assertObjectTypeProperty;
  18133. exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
  18134. exports.assertOpaqueType = assertOpaqueType;
  18135. exports.assertOptionalCallExpression = assertOptionalCallExpression;
  18136. exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
  18137. exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
  18138. exports.assertParenthesizedExpression = assertParenthesizedExpression;
  18139. exports.assertPattern = assertPattern;
  18140. exports.assertPatternLike = assertPatternLike;
  18141. exports.assertPipelineBareFunction = assertPipelineBareFunction;
  18142. exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
  18143. exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
  18144. exports.assertPlaceholder = assertPlaceholder;
  18145. exports.assertPrivate = assertPrivate;
  18146. exports.assertPrivateName = assertPrivateName;
  18147. exports.assertProgram = assertProgram;
  18148. exports.assertProperty = assertProperty;
  18149. exports.assertPureish = assertPureish;
  18150. exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
  18151. exports.assertRecordExpression = assertRecordExpression;
  18152. exports.assertRegExpLiteral = assertRegExpLiteral;
  18153. exports.assertRegexLiteral = assertRegexLiteral;
  18154. exports.assertRestElement = assertRestElement;
  18155. exports.assertRestProperty = assertRestProperty;
  18156. exports.assertReturnStatement = assertReturnStatement;
  18157. exports.assertScopable = assertScopable;
  18158. exports.assertSequenceExpression = assertSequenceExpression;
  18159. exports.assertSpreadElement = assertSpreadElement;
  18160. exports.assertSpreadProperty = assertSpreadProperty;
  18161. exports.assertStandardized = assertStandardized;
  18162. exports.assertStatement = assertStatement;
  18163. exports.assertStaticBlock = assertStaticBlock;
  18164. exports.assertStringLiteral = assertStringLiteral;
  18165. exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
  18166. exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
  18167. exports.assertSuper = assertSuper;
  18168. exports.assertSwitchCase = assertSwitchCase;
  18169. exports.assertSwitchStatement = assertSwitchStatement;
  18170. exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
  18171. exports.assertTSAnyKeyword = assertTSAnyKeyword;
  18172. exports.assertTSArrayType = assertTSArrayType;
  18173. exports.assertTSAsExpression = assertTSAsExpression;
  18174. exports.assertTSBaseType = assertTSBaseType;
  18175. exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
  18176. exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
  18177. exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
  18178. exports.assertTSConditionalType = assertTSConditionalType;
  18179. exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
  18180. exports.assertTSConstructorType = assertTSConstructorType;
  18181. exports.assertTSDeclareFunction = assertTSDeclareFunction;
  18182. exports.assertTSDeclareMethod = assertTSDeclareMethod;
  18183. exports.assertTSEntityName = assertTSEntityName;
  18184. exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
  18185. exports.assertTSEnumMember = assertTSEnumMember;
  18186. exports.assertTSExportAssignment = assertTSExportAssignment;
  18187. exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
  18188. exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
  18189. exports.assertTSFunctionType = assertTSFunctionType;
  18190. exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
  18191. exports.assertTSImportType = assertTSImportType;
  18192. exports.assertTSIndexSignature = assertTSIndexSignature;
  18193. exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
  18194. exports.assertTSInferType = assertTSInferType;
  18195. exports.assertTSInstantiationExpression = assertTSInstantiationExpression;
  18196. exports.assertTSInterfaceBody = assertTSInterfaceBody;
  18197. exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
  18198. exports.assertTSIntersectionType = assertTSIntersectionType;
  18199. exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
  18200. exports.assertTSLiteralType = assertTSLiteralType;
  18201. exports.assertTSMappedType = assertTSMappedType;
  18202. exports.assertTSMethodSignature = assertTSMethodSignature;
  18203. exports.assertTSModuleBlock = assertTSModuleBlock;
  18204. exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
  18205. exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
  18206. exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
  18207. exports.assertTSNeverKeyword = assertTSNeverKeyword;
  18208. exports.assertTSNonNullExpression = assertTSNonNullExpression;
  18209. exports.assertTSNullKeyword = assertTSNullKeyword;
  18210. exports.assertTSNumberKeyword = assertTSNumberKeyword;
  18211. exports.assertTSObjectKeyword = assertTSObjectKeyword;
  18212. exports.assertTSOptionalType = assertTSOptionalType;
  18213. exports.assertTSParameterProperty = assertTSParameterProperty;
  18214. exports.assertTSParenthesizedType = assertTSParenthesizedType;
  18215. exports.assertTSPropertySignature = assertTSPropertySignature;
  18216. exports.assertTSQualifiedName = assertTSQualifiedName;
  18217. exports.assertTSRestType = assertTSRestType;
  18218. exports.assertTSSatisfiesExpression = assertTSSatisfiesExpression;
  18219. exports.assertTSStringKeyword = assertTSStringKeyword;
  18220. exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
  18221. exports.assertTSThisType = assertTSThisType;
  18222. exports.assertTSTupleType = assertTSTupleType;
  18223. exports.assertTSType = assertTSType;
  18224. exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
  18225. exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
  18226. exports.assertTSTypeAssertion = assertTSTypeAssertion;
  18227. exports.assertTSTypeElement = assertTSTypeElement;
  18228. exports.assertTSTypeLiteral = assertTSTypeLiteral;
  18229. exports.assertTSTypeOperator = assertTSTypeOperator;
  18230. exports.assertTSTypeParameter = assertTSTypeParameter;
  18231. exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
  18232. exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
  18233. exports.assertTSTypePredicate = assertTSTypePredicate;
  18234. exports.assertTSTypeQuery = assertTSTypeQuery;
  18235. exports.assertTSTypeReference = assertTSTypeReference;
  18236. exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
  18237. exports.assertTSUnionType = assertTSUnionType;
  18238. exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
  18239. exports.assertTSVoidKeyword = assertTSVoidKeyword;
  18240. exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
  18241. exports.assertTemplateElement = assertTemplateElement;
  18242. exports.assertTemplateLiteral = assertTemplateLiteral;
  18243. exports.assertTerminatorless = assertTerminatorless;
  18244. exports.assertThisExpression = assertThisExpression;
  18245. exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
  18246. exports.assertThrowStatement = assertThrowStatement;
  18247. exports.assertTopicReference = assertTopicReference;
  18248. exports.assertTryStatement = assertTryStatement;
  18249. exports.assertTupleExpression = assertTupleExpression;
  18250. exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
  18251. exports.assertTypeAlias = assertTypeAlias;
  18252. exports.assertTypeAnnotation = assertTypeAnnotation;
  18253. exports.assertTypeCastExpression = assertTypeCastExpression;
  18254. exports.assertTypeParameter = assertTypeParameter;
  18255. exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
  18256. exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
  18257. exports.assertTypeScript = assertTypeScript;
  18258. exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
  18259. exports.assertUnaryExpression = assertUnaryExpression;
  18260. exports.assertUnaryLike = assertUnaryLike;
  18261. exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
  18262. exports.assertUpdateExpression = assertUpdateExpression;
  18263. exports.assertUserWhitespacable = assertUserWhitespacable;
  18264. exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
  18265. exports.assertVariableDeclaration = assertVariableDeclaration;
  18266. exports.assertVariableDeclarator = assertVariableDeclarator;
  18267. exports.assertVariance = assertVariance;
  18268. exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
  18269. exports.assertWhile = assertWhile;
  18270. exports.assertWhileStatement = assertWhileStatement;
  18271. exports.assertWithStatement = assertWithStatement;
  18272. exports.assertYieldExpression = assertYieldExpression;
  18273. var _is = require_is();
  18274. var _deprecationWarning = require_deprecationWarning();
  18275. function assert(type, node2, opts) {
  18276. if (!(0, _is.default)(type, node2, opts)) {
  18277. throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node2.type}".`);
  18278. }
  18279. }
  18280. function assertArrayExpression(node2, opts) {
  18281. assert("ArrayExpression", node2, opts);
  18282. }
  18283. function assertAssignmentExpression(node2, opts) {
  18284. assert("AssignmentExpression", node2, opts);
  18285. }
  18286. function assertBinaryExpression(node2, opts) {
  18287. assert("BinaryExpression", node2, opts);
  18288. }
  18289. function assertInterpreterDirective(node2, opts) {
  18290. assert("InterpreterDirective", node2, opts);
  18291. }
  18292. function assertDirective(node2, opts) {
  18293. assert("Directive", node2, opts);
  18294. }
  18295. function assertDirectiveLiteral(node2, opts) {
  18296. assert("DirectiveLiteral", node2, opts);
  18297. }
  18298. function assertBlockStatement(node2, opts) {
  18299. assert("BlockStatement", node2, opts);
  18300. }
  18301. function assertBreakStatement(node2, opts) {
  18302. assert("BreakStatement", node2, opts);
  18303. }
  18304. function assertCallExpression(node2, opts) {
  18305. assert("CallExpression", node2, opts);
  18306. }
  18307. function assertCatchClause(node2, opts) {
  18308. assert("CatchClause", node2, opts);
  18309. }
  18310. function assertConditionalExpression(node2, opts) {
  18311. assert("ConditionalExpression", node2, opts);
  18312. }
  18313. function assertContinueStatement(node2, opts) {
  18314. assert("ContinueStatement", node2, opts);
  18315. }
  18316. function assertDebuggerStatement(node2, opts) {
  18317. assert("DebuggerStatement", node2, opts);
  18318. }
  18319. function assertDoWhileStatement(node2, opts) {
  18320. assert("DoWhileStatement", node2, opts);
  18321. }
  18322. function assertEmptyStatement(node2, opts) {
  18323. assert("EmptyStatement", node2, opts);
  18324. }
  18325. function assertExpressionStatement(node2, opts) {
  18326. assert("ExpressionStatement", node2, opts);
  18327. }
  18328. function assertFile(node2, opts) {
  18329. assert("File", node2, opts);
  18330. }
  18331. function assertForInStatement(node2, opts) {
  18332. assert("ForInStatement", node2, opts);
  18333. }
  18334. function assertForStatement(node2, opts) {
  18335. assert("ForStatement", node2, opts);
  18336. }
  18337. function assertFunctionDeclaration(node2, opts) {
  18338. assert("FunctionDeclaration", node2, opts);
  18339. }
  18340. function assertFunctionExpression(node2, opts) {
  18341. assert("FunctionExpression", node2, opts);
  18342. }
  18343. function assertIdentifier(node2, opts) {
  18344. assert("Identifier", node2, opts);
  18345. }
  18346. function assertIfStatement(node2, opts) {
  18347. assert("IfStatement", node2, opts);
  18348. }
  18349. function assertLabeledStatement(node2, opts) {
  18350. assert("LabeledStatement", node2, opts);
  18351. }
  18352. function assertStringLiteral(node2, opts) {
  18353. assert("StringLiteral", node2, opts);
  18354. }
  18355. function assertNumericLiteral(node2, opts) {
  18356. assert("NumericLiteral", node2, opts);
  18357. }
  18358. function assertNullLiteral(node2, opts) {
  18359. assert("NullLiteral", node2, opts);
  18360. }
  18361. function assertBooleanLiteral(node2, opts) {
  18362. assert("BooleanLiteral", node2, opts);
  18363. }
  18364. function assertRegExpLiteral(node2, opts) {
  18365. assert("RegExpLiteral", node2, opts);
  18366. }
  18367. function assertLogicalExpression(node2, opts) {
  18368. assert("LogicalExpression", node2, opts);
  18369. }
  18370. function assertMemberExpression(node2, opts) {
  18371. assert("MemberExpression", node2, opts);
  18372. }
  18373. function assertNewExpression(node2, opts) {
  18374. assert("NewExpression", node2, opts);
  18375. }
  18376. function assertProgram(node2, opts) {
  18377. assert("Program", node2, opts);
  18378. }
  18379. function assertObjectExpression(node2, opts) {
  18380. assert("ObjectExpression", node2, opts);
  18381. }
  18382. function assertObjectMethod(node2, opts) {
  18383. assert("ObjectMethod", node2, opts);
  18384. }
  18385. function assertObjectProperty(node2, opts) {
  18386. assert("ObjectProperty", node2, opts);
  18387. }
  18388. function assertRestElement(node2, opts) {
  18389. assert("RestElement", node2, opts);
  18390. }
  18391. function assertReturnStatement(node2, opts) {
  18392. assert("ReturnStatement", node2, opts);
  18393. }
  18394. function assertSequenceExpression(node2, opts) {
  18395. assert("SequenceExpression", node2, opts);
  18396. }
  18397. function assertParenthesizedExpression(node2, opts) {
  18398. assert("ParenthesizedExpression", node2, opts);
  18399. }
  18400. function assertSwitchCase(node2, opts) {
  18401. assert("SwitchCase", node2, opts);
  18402. }
  18403. function assertSwitchStatement(node2, opts) {
  18404. assert("SwitchStatement", node2, opts);
  18405. }
  18406. function assertThisExpression(node2, opts) {
  18407. assert("ThisExpression", node2, opts);
  18408. }
  18409. function assertThrowStatement(node2, opts) {
  18410. assert("ThrowStatement", node2, opts);
  18411. }
  18412. function assertTryStatement(node2, opts) {
  18413. assert("TryStatement", node2, opts);
  18414. }
  18415. function assertUnaryExpression(node2, opts) {
  18416. assert("UnaryExpression", node2, opts);
  18417. }
  18418. function assertUpdateExpression(node2, opts) {
  18419. assert("UpdateExpression", node2, opts);
  18420. }
  18421. function assertVariableDeclaration(node2, opts) {
  18422. assert("VariableDeclaration", node2, opts);
  18423. }
  18424. function assertVariableDeclarator(node2, opts) {
  18425. assert("VariableDeclarator", node2, opts);
  18426. }
  18427. function assertWhileStatement(node2, opts) {
  18428. assert("WhileStatement", node2, opts);
  18429. }
  18430. function assertWithStatement(node2, opts) {
  18431. assert("WithStatement", node2, opts);
  18432. }
  18433. function assertAssignmentPattern(node2, opts) {
  18434. assert("AssignmentPattern", node2, opts);
  18435. }
  18436. function assertArrayPattern(node2, opts) {
  18437. assert("ArrayPattern", node2, opts);
  18438. }
  18439. function assertArrowFunctionExpression(node2, opts) {
  18440. assert("ArrowFunctionExpression", node2, opts);
  18441. }
  18442. function assertClassBody(node2, opts) {
  18443. assert("ClassBody", node2, opts);
  18444. }
  18445. function assertClassExpression(node2, opts) {
  18446. assert("ClassExpression", node2, opts);
  18447. }
  18448. function assertClassDeclaration(node2, opts) {
  18449. assert("ClassDeclaration", node2, opts);
  18450. }
  18451. function assertExportAllDeclaration(node2, opts) {
  18452. assert("ExportAllDeclaration", node2, opts);
  18453. }
  18454. function assertExportDefaultDeclaration(node2, opts) {
  18455. assert("ExportDefaultDeclaration", node2, opts);
  18456. }
  18457. function assertExportNamedDeclaration(node2, opts) {
  18458. assert("ExportNamedDeclaration", node2, opts);
  18459. }
  18460. function assertExportSpecifier(node2, opts) {
  18461. assert("ExportSpecifier", node2, opts);
  18462. }
  18463. function assertForOfStatement(node2, opts) {
  18464. assert("ForOfStatement", node2, opts);
  18465. }
  18466. function assertImportDeclaration(node2, opts) {
  18467. assert("ImportDeclaration", node2, opts);
  18468. }
  18469. function assertImportDefaultSpecifier(node2, opts) {
  18470. assert("ImportDefaultSpecifier", node2, opts);
  18471. }
  18472. function assertImportNamespaceSpecifier(node2, opts) {
  18473. assert("ImportNamespaceSpecifier", node2, opts);
  18474. }
  18475. function assertImportSpecifier(node2, opts) {
  18476. assert("ImportSpecifier", node2, opts);
  18477. }
  18478. function assertMetaProperty(node2, opts) {
  18479. assert("MetaProperty", node2, opts);
  18480. }
  18481. function assertClassMethod(node2, opts) {
  18482. assert("ClassMethod", node2, opts);
  18483. }
  18484. function assertObjectPattern(node2, opts) {
  18485. assert("ObjectPattern", node2, opts);
  18486. }
  18487. function assertSpreadElement(node2, opts) {
  18488. assert("SpreadElement", node2, opts);
  18489. }
  18490. function assertSuper(node2, opts) {
  18491. assert("Super", node2, opts);
  18492. }
  18493. function assertTaggedTemplateExpression(node2, opts) {
  18494. assert("TaggedTemplateExpression", node2, opts);
  18495. }
  18496. function assertTemplateElement(node2, opts) {
  18497. assert("TemplateElement", node2, opts);
  18498. }
  18499. function assertTemplateLiteral(node2, opts) {
  18500. assert("TemplateLiteral", node2, opts);
  18501. }
  18502. function assertYieldExpression(node2, opts) {
  18503. assert("YieldExpression", node2, opts);
  18504. }
  18505. function assertAwaitExpression(node2, opts) {
  18506. assert("AwaitExpression", node2, opts);
  18507. }
  18508. function assertImport(node2, opts) {
  18509. assert("Import", node2, opts);
  18510. }
  18511. function assertBigIntLiteral(node2, opts) {
  18512. assert("BigIntLiteral", node2, opts);
  18513. }
  18514. function assertExportNamespaceSpecifier(node2, opts) {
  18515. assert("ExportNamespaceSpecifier", node2, opts);
  18516. }
  18517. function assertOptionalMemberExpression(node2, opts) {
  18518. assert("OptionalMemberExpression", node2, opts);
  18519. }
  18520. function assertOptionalCallExpression(node2, opts) {
  18521. assert("OptionalCallExpression", node2, opts);
  18522. }
  18523. function assertClassProperty(node2, opts) {
  18524. assert("ClassProperty", node2, opts);
  18525. }
  18526. function assertClassAccessorProperty(node2, opts) {
  18527. assert("ClassAccessorProperty", node2, opts);
  18528. }
  18529. function assertClassPrivateProperty(node2, opts) {
  18530. assert("ClassPrivateProperty", node2, opts);
  18531. }
  18532. function assertClassPrivateMethod(node2, opts) {
  18533. assert("ClassPrivateMethod", node2, opts);
  18534. }
  18535. function assertPrivateName(node2, opts) {
  18536. assert("PrivateName", node2, opts);
  18537. }
  18538. function assertStaticBlock(node2, opts) {
  18539. assert("StaticBlock", node2, opts);
  18540. }
  18541. function assertAnyTypeAnnotation(node2, opts) {
  18542. assert("AnyTypeAnnotation", node2, opts);
  18543. }
  18544. function assertArrayTypeAnnotation(node2, opts) {
  18545. assert("ArrayTypeAnnotation", node2, opts);
  18546. }
  18547. function assertBooleanTypeAnnotation(node2, opts) {
  18548. assert("BooleanTypeAnnotation", node2, opts);
  18549. }
  18550. function assertBooleanLiteralTypeAnnotation(node2, opts) {
  18551. assert("BooleanLiteralTypeAnnotation", node2, opts);
  18552. }
  18553. function assertNullLiteralTypeAnnotation(node2, opts) {
  18554. assert("NullLiteralTypeAnnotation", node2, opts);
  18555. }
  18556. function assertClassImplements(node2, opts) {
  18557. assert("ClassImplements", node2, opts);
  18558. }
  18559. function assertDeclareClass(node2, opts) {
  18560. assert("DeclareClass", node2, opts);
  18561. }
  18562. function assertDeclareFunction(node2, opts) {
  18563. assert("DeclareFunction", node2, opts);
  18564. }
  18565. function assertDeclareInterface(node2, opts) {
  18566. assert("DeclareInterface", node2, opts);
  18567. }
  18568. function assertDeclareModule(node2, opts) {
  18569. assert("DeclareModule", node2, opts);
  18570. }
  18571. function assertDeclareModuleExports(node2, opts) {
  18572. assert("DeclareModuleExports", node2, opts);
  18573. }
  18574. function assertDeclareTypeAlias(node2, opts) {
  18575. assert("DeclareTypeAlias", node2, opts);
  18576. }
  18577. function assertDeclareOpaqueType(node2, opts) {
  18578. assert("DeclareOpaqueType", node2, opts);
  18579. }
  18580. function assertDeclareVariable(node2, opts) {
  18581. assert("DeclareVariable", node2, opts);
  18582. }
  18583. function assertDeclareExportDeclaration(node2, opts) {
  18584. assert("DeclareExportDeclaration", node2, opts);
  18585. }
  18586. function assertDeclareExportAllDeclaration(node2, opts) {
  18587. assert("DeclareExportAllDeclaration", node2, opts);
  18588. }
  18589. function assertDeclaredPredicate(node2, opts) {
  18590. assert("DeclaredPredicate", node2, opts);
  18591. }
  18592. function assertExistsTypeAnnotation(node2, opts) {
  18593. assert("ExistsTypeAnnotation", node2, opts);
  18594. }
  18595. function assertFunctionTypeAnnotation(node2, opts) {
  18596. assert("FunctionTypeAnnotation", node2, opts);
  18597. }
  18598. function assertFunctionTypeParam(node2, opts) {
  18599. assert("FunctionTypeParam", node2, opts);
  18600. }
  18601. function assertGenericTypeAnnotation(node2, opts) {
  18602. assert("GenericTypeAnnotation", node2, opts);
  18603. }
  18604. function assertInferredPredicate(node2, opts) {
  18605. assert("InferredPredicate", node2, opts);
  18606. }
  18607. function assertInterfaceExtends(node2, opts) {
  18608. assert("InterfaceExtends", node2, opts);
  18609. }
  18610. function assertInterfaceDeclaration(node2, opts) {
  18611. assert("InterfaceDeclaration", node2, opts);
  18612. }
  18613. function assertInterfaceTypeAnnotation(node2, opts) {
  18614. assert("InterfaceTypeAnnotation", node2, opts);
  18615. }
  18616. function assertIntersectionTypeAnnotation(node2, opts) {
  18617. assert("IntersectionTypeAnnotation", node2, opts);
  18618. }
  18619. function assertMixedTypeAnnotation(node2, opts) {
  18620. assert("MixedTypeAnnotation", node2, opts);
  18621. }
  18622. function assertEmptyTypeAnnotation(node2, opts) {
  18623. assert("EmptyTypeAnnotation", node2, opts);
  18624. }
  18625. function assertNullableTypeAnnotation(node2, opts) {
  18626. assert("NullableTypeAnnotation", node2, opts);
  18627. }
  18628. function assertNumberLiteralTypeAnnotation(node2, opts) {
  18629. assert("NumberLiteralTypeAnnotation", node2, opts);
  18630. }
  18631. function assertNumberTypeAnnotation(node2, opts) {
  18632. assert("NumberTypeAnnotation", node2, opts);
  18633. }
  18634. function assertObjectTypeAnnotation(node2, opts) {
  18635. assert("ObjectTypeAnnotation", node2, opts);
  18636. }
  18637. function assertObjectTypeInternalSlot(node2, opts) {
  18638. assert("ObjectTypeInternalSlot", node2, opts);
  18639. }
  18640. function assertObjectTypeCallProperty(node2, opts) {
  18641. assert("ObjectTypeCallProperty", node2, opts);
  18642. }
  18643. function assertObjectTypeIndexer(node2, opts) {
  18644. assert("ObjectTypeIndexer", node2, opts);
  18645. }
  18646. function assertObjectTypeProperty(node2, opts) {
  18647. assert("ObjectTypeProperty", node2, opts);
  18648. }
  18649. function assertObjectTypeSpreadProperty(node2, opts) {
  18650. assert("ObjectTypeSpreadProperty", node2, opts);
  18651. }
  18652. function assertOpaqueType(node2, opts) {
  18653. assert("OpaqueType", node2, opts);
  18654. }
  18655. function assertQualifiedTypeIdentifier(node2, opts) {
  18656. assert("QualifiedTypeIdentifier", node2, opts);
  18657. }
  18658. function assertStringLiteralTypeAnnotation(node2, opts) {
  18659. assert("StringLiteralTypeAnnotation", node2, opts);
  18660. }
  18661. function assertStringTypeAnnotation(node2, opts) {
  18662. assert("StringTypeAnnotation", node2, opts);
  18663. }
  18664. function assertSymbolTypeAnnotation(node2, opts) {
  18665. assert("SymbolTypeAnnotation", node2, opts);
  18666. }
  18667. function assertThisTypeAnnotation(node2, opts) {
  18668. assert("ThisTypeAnnotation", node2, opts);
  18669. }
  18670. function assertTupleTypeAnnotation(node2, opts) {
  18671. assert("TupleTypeAnnotation", node2, opts);
  18672. }
  18673. function assertTypeofTypeAnnotation(node2, opts) {
  18674. assert("TypeofTypeAnnotation", node2, opts);
  18675. }
  18676. function assertTypeAlias(node2, opts) {
  18677. assert("TypeAlias", node2, opts);
  18678. }
  18679. function assertTypeAnnotation(node2, opts) {
  18680. assert("TypeAnnotation", node2, opts);
  18681. }
  18682. function assertTypeCastExpression(node2, opts) {
  18683. assert("TypeCastExpression", node2, opts);
  18684. }
  18685. function assertTypeParameter(node2, opts) {
  18686. assert("TypeParameter", node2, opts);
  18687. }
  18688. function assertTypeParameterDeclaration(node2, opts) {
  18689. assert("TypeParameterDeclaration", node2, opts);
  18690. }
  18691. function assertTypeParameterInstantiation(node2, opts) {
  18692. assert("TypeParameterInstantiation", node2, opts);
  18693. }
  18694. function assertUnionTypeAnnotation(node2, opts) {
  18695. assert("UnionTypeAnnotation", node2, opts);
  18696. }
  18697. function assertVariance(node2, opts) {
  18698. assert("Variance", node2, opts);
  18699. }
  18700. function assertVoidTypeAnnotation(node2, opts) {
  18701. assert("VoidTypeAnnotation", node2, opts);
  18702. }
  18703. function assertEnumDeclaration(node2, opts) {
  18704. assert("EnumDeclaration", node2, opts);
  18705. }
  18706. function assertEnumBooleanBody(node2, opts) {
  18707. assert("EnumBooleanBody", node2, opts);
  18708. }
  18709. function assertEnumNumberBody(node2, opts) {
  18710. assert("EnumNumberBody", node2, opts);
  18711. }
  18712. function assertEnumStringBody(node2, opts) {
  18713. assert("EnumStringBody", node2, opts);
  18714. }
  18715. function assertEnumSymbolBody(node2, opts) {
  18716. assert("EnumSymbolBody", node2, opts);
  18717. }
  18718. function assertEnumBooleanMember(node2, opts) {
  18719. assert("EnumBooleanMember", node2, opts);
  18720. }
  18721. function assertEnumNumberMember(node2, opts) {
  18722. assert("EnumNumberMember", node2, opts);
  18723. }
  18724. function assertEnumStringMember(node2, opts) {
  18725. assert("EnumStringMember", node2, opts);
  18726. }
  18727. function assertEnumDefaultedMember(node2, opts) {
  18728. assert("EnumDefaultedMember", node2, opts);
  18729. }
  18730. function assertIndexedAccessType(node2, opts) {
  18731. assert("IndexedAccessType", node2, opts);
  18732. }
  18733. function assertOptionalIndexedAccessType(node2, opts) {
  18734. assert("OptionalIndexedAccessType", node2, opts);
  18735. }
  18736. function assertJSXAttribute(node2, opts) {
  18737. assert("JSXAttribute", node2, opts);
  18738. }
  18739. function assertJSXClosingElement(node2, opts) {
  18740. assert("JSXClosingElement", node2, opts);
  18741. }
  18742. function assertJSXElement(node2, opts) {
  18743. assert("JSXElement", node2, opts);
  18744. }
  18745. function assertJSXEmptyExpression(node2, opts) {
  18746. assert("JSXEmptyExpression", node2, opts);
  18747. }
  18748. function assertJSXExpressionContainer(node2, opts) {
  18749. assert("JSXExpressionContainer", node2, opts);
  18750. }
  18751. function assertJSXSpreadChild(node2, opts) {
  18752. assert("JSXSpreadChild", node2, opts);
  18753. }
  18754. function assertJSXIdentifier(node2, opts) {
  18755. assert("JSXIdentifier", node2, opts);
  18756. }
  18757. function assertJSXMemberExpression(node2, opts) {
  18758. assert("JSXMemberExpression", node2, opts);
  18759. }
  18760. function assertJSXNamespacedName(node2, opts) {
  18761. assert("JSXNamespacedName", node2, opts);
  18762. }
  18763. function assertJSXOpeningElement(node2, opts) {
  18764. assert("JSXOpeningElement", node2, opts);
  18765. }
  18766. function assertJSXSpreadAttribute(node2, opts) {
  18767. assert("JSXSpreadAttribute", node2, opts);
  18768. }
  18769. function assertJSXText(node2, opts) {
  18770. assert("JSXText", node2, opts);
  18771. }
  18772. function assertJSXFragment(node2, opts) {
  18773. assert("JSXFragment", node2, opts);
  18774. }
  18775. function assertJSXOpeningFragment(node2, opts) {
  18776. assert("JSXOpeningFragment", node2, opts);
  18777. }
  18778. function assertJSXClosingFragment(node2, opts) {
  18779. assert("JSXClosingFragment", node2, opts);
  18780. }
  18781. function assertNoop(node2, opts) {
  18782. assert("Noop", node2, opts);
  18783. }
  18784. function assertPlaceholder(node2, opts) {
  18785. assert("Placeholder", node2, opts);
  18786. }
  18787. function assertV8IntrinsicIdentifier(node2, opts) {
  18788. assert("V8IntrinsicIdentifier", node2, opts);
  18789. }
  18790. function assertArgumentPlaceholder(node2, opts) {
  18791. assert("ArgumentPlaceholder", node2, opts);
  18792. }
  18793. function assertBindExpression(node2, opts) {
  18794. assert("BindExpression", node2, opts);
  18795. }
  18796. function assertImportAttribute(node2, opts) {
  18797. assert("ImportAttribute", node2, opts);
  18798. }
  18799. function assertDecorator(node2, opts) {
  18800. assert("Decorator", node2, opts);
  18801. }
  18802. function assertDoExpression(node2, opts) {
  18803. assert("DoExpression", node2, opts);
  18804. }
  18805. function assertExportDefaultSpecifier(node2, opts) {
  18806. assert("ExportDefaultSpecifier", node2, opts);
  18807. }
  18808. function assertRecordExpression(node2, opts) {
  18809. assert("RecordExpression", node2, opts);
  18810. }
  18811. function assertTupleExpression(node2, opts) {
  18812. assert("TupleExpression", node2, opts);
  18813. }
  18814. function assertDecimalLiteral(node2, opts) {
  18815. assert("DecimalLiteral", node2, opts);
  18816. }
  18817. function assertModuleExpression(node2, opts) {
  18818. assert("ModuleExpression", node2, opts);
  18819. }
  18820. function assertTopicReference(node2, opts) {
  18821. assert("TopicReference", node2, opts);
  18822. }
  18823. function assertPipelineTopicExpression(node2, opts) {
  18824. assert("PipelineTopicExpression", node2, opts);
  18825. }
  18826. function assertPipelineBareFunction(node2, opts) {
  18827. assert("PipelineBareFunction", node2, opts);
  18828. }
  18829. function assertPipelinePrimaryTopicReference(node2, opts) {
  18830. assert("PipelinePrimaryTopicReference", node2, opts);
  18831. }
  18832. function assertTSParameterProperty(node2, opts) {
  18833. assert("TSParameterProperty", node2, opts);
  18834. }
  18835. function assertTSDeclareFunction(node2, opts) {
  18836. assert("TSDeclareFunction", node2, opts);
  18837. }
  18838. function assertTSDeclareMethod(node2, opts) {
  18839. assert("TSDeclareMethod", node2, opts);
  18840. }
  18841. function assertTSQualifiedName(node2, opts) {
  18842. assert("TSQualifiedName", node2, opts);
  18843. }
  18844. function assertTSCallSignatureDeclaration(node2, opts) {
  18845. assert("TSCallSignatureDeclaration", node2, opts);
  18846. }
  18847. function assertTSConstructSignatureDeclaration(node2, opts) {
  18848. assert("TSConstructSignatureDeclaration", node2, opts);
  18849. }
  18850. function assertTSPropertySignature(node2, opts) {
  18851. assert("TSPropertySignature", node2, opts);
  18852. }
  18853. function assertTSMethodSignature(node2, opts) {
  18854. assert("TSMethodSignature", node2, opts);
  18855. }
  18856. function assertTSIndexSignature(node2, opts) {
  18857. assert("TSIndexSignature", node2, opts);
  18858. }
  18859. function assertTSAnyKeyword(node2, opts) {
  18860. assert("TSAnyKeyword", node2, opts);
  18861. }
  18862. function assertTSBooleanKeyword(node2, opts) {
  18863. assert("TSBooleanKeyword", node2, opts);
  18864. }
  18865. function assertTSBigIntKeyword(node2, opts) {
  18866. assert("TSBigIntKeyword", node2, opts);
  18867. }
  18868. function assertTSIntrinsicKeyword(node2, opts) {
  18869. assert("TSIntrinsicKeyword", node2, opts);
  18870. }
  18871. function assertTSNeverKeyword(node2, opts) {
  18872. assert("TSNeverKeyword", node2, opts);
  18873. }
  18874. function assertTSNullKeyword(node2, opts) {
  18875. assert("TSNullKeyword", node2, opts);
  18876. }
  18877. function assertTSNumberKeyword(node2, opts) {
  18878. assert("TSNumberKeyword", node2, opts);
  18879. }
  18880. function assertTSObjectKeyword(node2, opts) {
  18881. assert("TSObjectKeyword", node2, opts);
  18882. }
  18883. function assertTSStringKeyword(node2, opts) {
  18884. assert("TSStringKeyword", node2, opts);
  18885. }
  18886. function assertTSSymbolKeyword(node2, opts) {
  18887. assert("TSSymbolKeyword", node2, opts);
  18888. }
  18889. function assertTSUndefinedKeyword(node2, opts) {
  18890. assert("TSUndefinedKeyword", node2, opts);
  18891. }
  18892. function assertTSUnknownKeyword(node2, opts) {
  18893. assert("TSUnknownKeyword", node2, opts);
  18894. }
  18895. function assertTSVoidKeyword(node2, opts) {
  18896. assert("TSVoidKeyword", node2, opts);
  18897. }
  18898. function assertTSThisType(node2, opts) {
  18899. assert("TSThisType", node2, opts);
  18900. }
  18901. function assertTSFunctionType(node2, opts) {
  18902. assert("TSFunctionType", node2, opts);
  18903. }
  18904. function assertTSConstructorType(node2, opts) {
  18905. assert("TSConstructorType", node2, opts);
  18906. }
  18907. function assertTSTypeReference(node2, opts) {
  18908. assert("TSTypeReference", node2, opts);
  18909. }
  18910. function assertTSTypePredicate(node2, opts) {
  18911. assert("TSTypePredicate", node2, opts);
  18912. }
  18913. function assertTSTypeQuery(node2, opts) {
  18914. assert("TSTypeQuery", node2, opts);
  18915. }
  18916. function assertTSTypeLiteral(node2, opts) {
  18917. assert("TSTypeLiteral", node2, opts);
  18918. }
  18919. function assertTSArrayType(node2, opts) {
  18920. assert("TSArrayType", node2, opts);
  18921. }
  18922. function assertTSTupleType(node2, opts) {
  18923. assert("TSTupleType", node2, opts);
  18924. }
  18925. function assertTSOptionalType(node2, opts) {
  18926. assert("TSOptionalType", node2, opts);
  18927. }
  18928. function assertTSRestType(node2, opts) {
  18929. assert("TSRestType", node2, opts);
  18930. }
  18931. function assertTSNamedTupleMember(node2, opts) {
  18932. assert("TSNamedTupleMember", node2, opts);
  18933. }
  18934. function assertTSUnionType(node2, opts) {
  18935. assert("TSUnionType", node2, opts);
  18936. }
  18937. function assertTSIntersectionType(node2, opts) {
  18938. assert("TSIntersectionType", node2, opts);
  18939. }
  18940. function assertTSConditionalType(node2, opts) {
  18941. assert("TSConditionalType", node2, opts);
  18942. }
  18943. function assertTSInferType(node2, opts) {
  18944. assert("TSInferType", node2, opts);
  18945. }
  18946. function assertTSParenthesizedType(node2, opts) {
  18947. assert("TSParenthesizedType", node2, opts);
  18948. }
  18949. function assertTSTypeOperator(node2, opts) {
  18950. assert("TSTypeOperator", node2, opts);
  18951. }
  18952. function assertTSIndexedAccessType(node2, opts) {
  18953. assert("TSIndexedAccessType", node2, opts);
  18954. }
  18955. function assertTSMappedType(node2, opts) {
  18956. assert("TSMappedType", node2, opts);
  18957. }
  18958. function assertTSLiteralType(node2, opts) {
  18959. assert("TSLiteralType", node2, opts);
  18960. }
  18961. function assertTSExpressionWithTypeArguments(node2, opts) {
  18962. assert("TSExpressionWithTypeArguments", node2, opts);
  18963. }
  18964. function assertTSInterfaceDeclaration(node2, opts) {
  18965. assert("TSInterfaceDeclaration", node2, opts);
  18966. }
  18967. function assertTSInterfaceBody(node2, opts) {
  18968. assert("TSInterfaceBody", node2, opts);
  18969. }
  18970. function assertTSTypeAliasDeclaration(node2, opts) {
  18971. assert("TSTypeAliasDeclaration", node2, opts);
  18972. }
  18973. function assertTSInstantiationExpression(node2, opts) {
  18974. assert("TSInstantiationExpression", node2, opts);
  18975. }
  18976. function assertTSAsExpression(node2, opts) {
  18977. assert("TSAsExpression", node2, opts);
  18978. }
  18979. function assertTSSatisfiesExpression(node2, opts) {
  18980. assert("TSSatisfiesExpression", node2, opts);
  18981. }
  18982. function assertTSTypeAssertion(node2, opts) {
  18983. assert("TSTypeAssertion", node2, opts);
  18984. }
  18985. function assertTSEnumDeclaration(node2, opts) {
  18986. assert("TSEnumDeclaration", node2, opts);
  18987. }
  18988. function assertTSEnumMember(node2, opts) {
  18989. assert("TSEnumMember", node2, opts);
  18990. }
  18991. function assertTSModuleDeclaration(node2, opts) {
  18992. assert("TSModuleDeclaration", node2, opts);
  18993. }
  18994. function assertTSModuleBlock(node2, opts) {
  18995. assert("TSModuleBlock", node2, opts);
  18996. }
  18997. function assertTSImportType(node2, opts) {
  18998. assert("TSImportType", node2, opts);
  18999. }
  19000. function assertTSImportEqualsDeclaration(node2, opts) {
  19001. assert("TSImportEqualsDeclaration", node2, opts);
  19002. }
  19003. function assertTSExternalModuleReference(node2, opts) {
  19004. assert("TSExternalModuleReference", node2, opts);
  19005. }
  19006. function assertTSNonNullExpression(node2, opts) {
  19007. assert("TSNonNullExpression", node2, opts);
  19008. }
  19009. function assertTSExportAssignment(node2, opts) {
  19010. assert("TSExportAssignment", node2, opts);
  19011. }
  19012. function assertTSNamespaceExportDeclaration(node2, opts) {
  19013. assert("TSNamespaceExportDeclaration", node2, opts);
  19014. }
  19015. function assertTSTypeAnnotation(node2, opts) {
  19016. assert("TSTypeAnnotation", node2, opts);
  19017. }
  19018. function assertTSTypeParameterInstantiation(node2, opts) {
  19019. assert("TSTypeParameterInstantiation", node2, opts);
  19020. }
  19021. function assertTSTypeParameterDeclaration(node2, opts) {
  19022. assert("TSTypeParameterDeclaration", node2, opts);
  19023. }
  19024. function assertTSTypeParameter(node2, opts) {
  19025. assert("TSTypeParameter", node2, opts);
  19026. }
  19027. function assertStandardized(node2, opts) {
  19028. assert("Standardized", node2, opts);
  19029. }
  19030. function assertExpression(node2, opts) {
  19031. assert("Expression", node2, opts);
  19032. }
  19033. function assertBinary(node2, opts) {
  19034. assert("Binary", node2, opts);
  19035. }
  19036. function assertScopable(node2, opts) {
  19037. assert("Scopable", node2, opts);
  19038. }
  19039. function assertBlockParent(node2, opts) {
  19040. assert("BlockParent", node2, opts);
  19041. }
  19042. function assertBlock(node2, opts) {
  19043. assert("Block", node2, opts);
  19044. }
  19045. function assertStatement(node2, opts) {
  19046. assert("Statement", node2, opts);
  19047. }
  19048. function assertTerminatorless(node2, opts) {
  19049. assert("Terminatorless", node2, opts);
  19050. }
  19051. function assertCompletionStatement(node2, opts) {
  19052. assert("CompletionStatement", node2, opts);
  19053. }
  19054. function assertConditional(node2, opts) {
  19055. assert("Conditional", node2, opts);
  19056. }
  19057. function assertLoop(node2, opts) {
  19058. assert("Loop", node2, opts);
  19059. }
  19060. function assertWhile(node2, opts) {
  19061. assert("While", node2, opts);
  19062. }
  19063. function assertExpressionWrapper(node2, opts) {
  19064. assert("ExpressionWrapper", node2, opts);
  19065. }
  19066. function assertFor(node2, opts) {
  19067. assert("For", node2, opts);
  19068. }
  19069. function assertForXStatement(node2, opts) {
  19070. assert("ForXStatement", node2, opts);
  19071. }
  19072. function assertFunction(node2, opts) {
  19073. assert("Function", node2, opts);
  19074. }
  19075. function assertFunctionParent(node2, opts) {
  19076. assert("FunctionParent", node2, opts);
  19077. }
  19078. function assertPureish(node2, opts) {
  19079. assert("Pureish", node2, opts);
  19080. }
  19081. function assertDeclaration(node2, opts) {
  19082. assert("Declaration", node2, opts);
  19083. }
  19084. function assertPatternLike(node2, opts) {
  19085. assert("PatternLike", node2, opts);
  19086. }
  19087. function assertLVal(node2, opts) {
  19088. assert("LVal", node2, opts);
  19089. }
  19090. function assertTSEntityName(node2, opts) {
  19091. assert("TSEntityName", node2, opts);
  19092. }
  19093. function assertLiteral(node2, opts) {
  19094. assert("Literal", node2, opts);
  19095. }
  19096. function assertImmutable(node2, opts) {
  19097. assert("Immutable", node2, opts);
  19098. }
  19099. function assertUserWhitespacable(node2, opts) {
  19100. assert("UserWhitespacable", node2, opts);
  19101. }
  19102. function assertMethod(node2, opts) {
  19103. assert("Method", node2, opts);
  19104. }
  19105. function assertObjectMember(node2, opts) {
  19106. assert("ObjectMember", node2, opts);
  19107. }
  19108. function assertProperty(node2, opts) {
  19109. assert("Property", node2, opts);
  19110. }
  19111. function assertUnaryLike(node2, opts) {
  19112. assert("UnaryLike", node2, opts);
  19113. }
  19114. function assertPattern(node2, opts) {
  19115. assert("Pattern", node2, opts);
  19116. }
  19117. function assertClass(node2, opts) {
  19118. assert("Class", node2, opts);
  19119. }
  19120. function assertImportOrExportDeclaration(node2, opts) {
  19121. assert("ImportOrExportDeclaration", node2, opts);
  19122. }
  19123. function assertExportDeclaration(node2, opts) {
  19124. assert("ExportDeclaration", node2, opts);
  19125. }
  19126. function assertModuleSpecifier(node2, opts) {
  19127. assert("ModuleSpecifier", node2, opts);
  19128. }
  19129. function assertAccessor(node2, opts) {
  19130. assert("Accessor", node2, opts);
  19131. }
  19132. function assertPrivate(node2, opts) {
  19133. assert("Private", node2, opts);
  19134. }
  19135. function assertFlow(node2, opts) {
  19136. assert("Flow", node2, opts);
  19137. }
  19138. function assertFlowType(node2, opts) {
  19139. assert("FlowType", node2, opts);
  19140. }
  19141. function assertFlowBaseAnnotation(node2, opts) {
  19142. assert("FlowBaseAnnotation", node2, opts);
  19143. }
  19144. function assertFlowDeclaration(node2, opts) {
  19145. assert("FlowDeclaration", node2, opts);
  19146. }
  19147. function assertFlowPredicate(node2, opts) {
  19148. assert("FlowPredicate", node2, opts);
  19149. }
  19150. function assertEnumBody(node2, opts) {
  19151. assert("EnumBody", node2, opts);
  19152. }
  19153. function assertEnumMember(node2, opts) {
  19154. assert("EnumMember", node2, opts);
  19155. }
  19156. function assertJSX(node2, opts) {
  19157. assert("JSX", node2, opts);
  19158. }
  19159. function assertMiscellaneous(node2, opts) {
  19160. assert("Miscellaneous", node2, opts);
  19161. }
  19162. function assertTypeScript(node2, opts) {
  19163. assert("TypeScript", node2, opts);
  19164. }
  19165. function assertTSTypeElement(node2, opts) {
  19166. assert("TSTypeElement", node2, opts);
  19167. }
  19168. function assertTSType(node2, opts) {
  19169. assert("TSType", node2, opts);
  19170. }
  19171. function assertTSBaseType(node2, opts) {
  19172. assert("TSBaseType", node2, opts);
  19173. }
  19174. function assertNumberLiteral(node2, opts) {
  19175. (0, _deprecationWarning.default)("assertNumberLiteral", "assertNumericLiteral");
  19176. assert("NumberLiteral", node2, opts);
  19177. }
  19178. function assertRegexLiteral(node2, opts) {
  19179. (0, _deprecationWarning.default)("assertRegexLiteral", "assertRegExpLiteral");
  19180. assert("RegexLiteral", node2, opts);
  19181. }
  19182. function assertRestProperty(node2, opts) {
  19183. (0, _deprecationWarning.default)("assertRestProperty", "assertRestElement");
  19184. assert("RestProperty", node2, opts);
  19185. }
  19186. function assertSpreadProperty(node2, opts) {
  19187. (0, _deprecationWarning.default)("assertSpreadProperty", "assertSpreadElement");
  19188. assert("SpreadProperty", node2, opts);
  19189. }
  19190. function assertModuleDeclaration(node2, opts) {
  19191. (0, _deprecationWarning.default)("assertModuleDeclaration", "assertImportOrExportDeclaration");
  19192. assert("ModuleDeclaration", node2, opts);
  19193. }
  19194. }
  19195. });
  19196. // node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
  19197. var require_createTypeAnnotationBasedOnTypeof = __commonJS({
  19198. "node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports) {
  19199. "use strict";
  19200. Object.defineProperty(exports, "__esModule", {
  19201. value: true
  19202. });
  19203. exports.default = void 0;
  19204. var _generated = require_generated2();
  19205. var _default = createTypeAnnotationBasedOnTypeof;
  19206. exports.default = _default;
  19207. function createTypeAnnotationBasedOnTypeof(type) {
  19208. switch (type) {
  19209. case "string":
  19210. return (0, _generated.stringTypeAnnotation)();
  19211. case "number":
  19212. return (0, _generated.numberTypeAnnotation)();
  19213. case "undefined":
  19214. return (0, _generated.voidTypeAnnotation)();
  19215. case "boolean":
  19216. return (0, _generated.booleanTypeAnnotation)();
  19217. case "function":
  19218. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
  19219. case "object":
  19220. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
  19221. case "symbol":
  19222. return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
  19223. case "bigint":
  19224. return (0, _generated.anyTypeAnnotation)();
  19225. }
  19226. throw new Error("Invalid typeof value: " + type);
  19227. }
  19228. }
  19229. });
  19230. // node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
  19231. var require_removeTypeDuplicates = __commonJS({
  19232. "node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports) {
  19233. "use strict";
  19234. Object.defineProperty(exports, "__esModule", {
  19235. value: true
  19236. });
  19237. exports.default = removeTypeDuplicates;
  19238. var _generated = require_generated();
  19239. function getQualifiedName(node2) {
  19240. return (0, _generated.isIdentifier)(node2) ? node2.name : `${node2.id.name}.${getQualifiedName(node2.qualification)}`;
  19241. }
  19242. function removeTypeDuplicates(nodes) {
  19243. const generics = /* @__PURE__ */ new Map();
  19244. const bases = /* @__PURE__ */ new Map();
  19245. const typeGroups = /* @__PURE__ */ new Set();
  19246. const types3 = [];
  19247. for (let i = 0; i < nodes.length; i++) {
  19248. const node2 = nodes[i];
  19249. if (!node2)
  19250. continue;
  19251. if (types3.indexOf(node2) >= 0) {
  19252. continue;
  19253. }
  19254. if ((0, _generated.isAnyTypeAnnotation)(node2)) {
  19255. return [node2];
  19256. }
  19257. if ((0, _generated.isFlowBaseAnnotation)(node2)) {
  19258. bases.set(node2.type, node2);
  19259. continue;
  19260. }
  19261. if ((0, _generated.isUnionTypeAnnotation)(node2)) {
  19262. if (!typeGroups.has(node2.types)) {
  19263. nodes = nodes.concat(node2.types);
  19264. typeGroups.add(node2.types);
  19265. }
  19266. continue;
  19267. }
  19268. if ((0, _generated.isGenericTypeAnnotation)(node2)) {
  19269. const name2 = getQualifiedName(node2.id);
  19270. if (generics.has(name2)) {
  19271. let existing = generics.get(name2);
  19272. if (existing.typeParameters) {
  19273. if (node2.typeParameters) {
  19274. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node2.typeParameters.params));
  19275. }
  19276. } else {
  19277. existing = node2.typeParameters;
  19278. }
  19279. } else {
  19280. generics.set(name2, node2);
  19281. }
  19282. continue;
  19283. }
  19284. types3.push(node2);
  19285. }
  19286. for (const [, baseType] of bases) {
  19287. types3.push(baseType);
  19288. }
  19289. for (const [, genericName] of generics) {
  19290. types3.push(genericName);
  19291. }
  19292. return types3;
  19293. }
  19294. }
  19295. });
  19296. // node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
  19297. var require_createFlowUnionType = __commonJS({
  19298. "node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports) {
  19299. "use strict";
  19300. Object.defineProperty(exports, "__esModule", {
  19301. value: true
  19302. });
  19303. exports.default = createFlowUnionType;
  19304. var _generated = require_generated2();
  19305. var _removeTypeDuplicates = require_removeTypeDuplicates();
  19306. function createFlowUnionType(types3) {
  19307. const flattened = (0, _removeTypeDuplicates.default)(types3);
  19308. if (flattened.length === 1) {
  19309. return flattened[0];
  19310. } else {
  19311. return (0, _generated.unionTypeAnnotation)(flattened);
  19312. }
  19313. }
  19314. }
  19315. });
  19316. // node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
  19317. var require_removeTypeDuplicates2 = __commonJS({
  19318. "node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports) {
  19319. "use strict";
  19320. Object.defineProperty(exports, "__esModule", {
  19321. value: true
  19322. });
  19323. exports.default = removeTypeDuplicates;
  19324. var _generated = require_generated();
  19325. function getQualifiedName(node2) {
  19326. return (0, _generated.isIdentifier)(node2) ? node2.name : `${node2.right.name}.${getQualifiedName(node2.left)}`;
  19327. }
  19328. function removeTypeDuplicates(nodes) {
  19329. const generics = /* @__PURE__ */ new Map();
  19330. const bases = /* @__PURE__ */ new Map();
  19331. const typeGroups = /* @__PURE__ */ new Set();
  19332. const types3 = [];
  19333. for (let i = 0; i < nodes.length; i++) {
  19334. const node2 = nodes[i];
  19335. if (!node2)
  19336. continue;
  19337. if (types3.indexOf(node2) >= 0) {
  19338. continue;
  19339. }
  19340. if ((0, _generated.isTSAnyKeyword)(node2)) {
  19341. return [node2];
  19342. }
  19343. if ((0, _generated.isTSBaseType)(node2)) {
  19344. bases.set(node2.type, node2);
  19345. continue;
  19346. }
  19347. if ((0, _generated.isTSUnionType)(node2)) {
  19348. if (!typeGroups.has(node2.types)) {
  19349. nodes.push(...node2.types);
  19350. typeGroups.add(node2.types);
  19351. }
  19352. continue;
  19353. }
  19354. if ((0, _generated.isTSTypeReference)(node2) && node2.typeParameters) {
  19355. const name2 = getQualifiedName(node2.typeName);
  19356. if (generics.has(name2)) {
  19357. let existing = generics.get(name2);
  19358. if (existing.typeParameters) {
  19359. if (node2.typeParameters) {
  19360. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node2.typeParameters.params));
  19361. }
  19362. } else {
  19363. existing = node2.typeParameters;
  19364. }
  19365. } else {
  19366. generics.set(name2, node2);
  19367. }
  19368. continue;
  19369. }
  19370. types3.push(node2);
  19371. }
  19372. for (const [, baseType] of bases) {
  19373. types3.push(baseType);
  19374. }
  19375. for (const [, genericName] of generics) {
  19376. types3.push(genericName);
  19377. }
  19378. return types3;
  19379. }
  19380. }
  19381. });
  19382. // node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
  19383. var require_createTSUnionType = __commonJS({
  19384. "node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports) {
  19385. "use strict";
  19386. Object.defineProperty(exports, "__esModule", {
  19387. value: true
  19388. });
  19389. exports.default = createTSUnionType;
  19390. var _generated = require_generated2();
  19391. var _removeTypeDuplicates = require_removeTypeDuplicates2();
  19392. var _index = require_generated();
  19393. function createTSUnionType(typeAnnotations) {
  19394. const types3 = typeAnnotations.map((type) => {
  19395. return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
  19396. });
  19397. const flattened = (0, _removeTypeDuplicates.default)(types3);
  19398. if (flattened.length === 1) {
  19399. return flattened[0];
  19400. } else {
  19401. return (0, _generated.tsUnionType)(flattened);
  19402. }
  19403. }
  19404. }
  19405. });
  19406. // node_modules/@babel/types/lib/builders/generated/uppercase.js
  19407. var require_uppercase = __commonJS({
  19408. "node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports) {
  19409. "use strict";
  19410. Object.defineProperty(exports, "__esModule", {
  19411. value: true
  19412. });
  19413. Object.defineProperty(exports, "AnyTypeAnnotation", {
  19414. enumerable: true,
  19415. get: function() {
  19416. return _index.anyTypeAnnotation;
  19417. }
  19418. });
  19419. Object.defineProperty(exports, "ArgumentPlaceholder", {
  19420. enumerable: true,
  19421. get: function() {
  19422. return _index.argumentPlaceholder;
  19423. }
  19424. });
  19425. Object.defineProperty(exports, "ArrayExpression", {
  19426. enumerable: true,
  19427. get: function() {
  19428. return _index.arrayExpression;
  19429. }
  19430. });
  19431. Object.defineProperty(exports, "ArrayPattern", {
  19432. enumerable: true,
  19433. get: function() {
  19434. return _index.arrayPattern;
  19435. }
  19436. });
  19437. Object.defineProperty(exports, "ArrayTypeAnnotation", {
  19438. enumerable: true,
  19439. get: function() {
  19440. return _index.arrayTypeAnnotation;
  19441. }
  19442. });
  19443. Object.defineProperty(exports, "ArrowFunctionExpression", {
  19444. enumerable: true,
  19445. get: function() {
  19446. return _index.arrowFunctionExpression;
  19447. }
  19448. });
  19449. Object.defineProperty(exports, "AssignmentExpression", {
  19450. enumerable: true,
  19451. get: function() {
  19452. return _index.assignmentExpression;
  19453. }
  19454. });
  19455. Object.defineProperty(exports, "AssignmentPattern", {
  19456. enumerable: true,
  19457. get: function() {
  19458. return _index.assignmentPattern;
  19459. }
  19460. });
  19461. Object.defineProperty(exports, "AwaitExpression", {
  19462. enumerable: true,
  19463. get: function() {
  19464. return _index.awaitExpression;
  19465. }
  19466. });
  19467. Object.defineProperty(exports, "BigIntLiteral", {
  19468. enumerable: true,
  19469. get: function() {
  19470. return _index.bigIntLiteral;
  19471. }
  19472. });
  19473. Object.defineProperty(exports, "BinaryExpression", {
  19474. enumerable: true,
  19475. get: function() {
  19476. return _index.binaryExpression;
  19477. }
  19478. });
  19479. Object.defineProperty(exports, "BindExpression", {
  19480. enumerable: true,
  19481. get: function() {
  19482. return _index.bindExpression;
  19483. }
  19484. });
  19485. Object.defineProperty(exports, "BlockStatement", {
  19486. enumerable: true,
  19487. get: function() {
  19488. return _index.blockStatement;
  19489. }
  19490. });
  19491. Object.defineProperty(exports, "BooleanLiteral", {
  19492. enumerable: true,
  19493. get: function() {
  19494. return _index.booleanLiteral;
  19495. }
  19496. });
  19497. Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
  19498. enumerable: true,
  19499. get: function() {
  19500. return _index.booleanLiteralTypeAnnotation;
  19501. }
  19502. });
  19503. Object.defineProperty(exports, "BooleanTypeAnnotation", {
  19504. enumerable: true,
  19505. get: function() {
  19506. return _index.booleanTypeAnnotation;
  19507. }
  19508. });
  19509. Object.defineProperty(exports, "BreakStatement", {
  19510. enumerable: true,
  19511. get: function() {
  19512. return _index.breakStatement;
  19513. }
  19514. });
  19515. Object.defineProperty(exports, "CallExpression", {
  19516. enumerable: true,
  19517. get: function() {
  19518. return _index.callExpression;
  19519. }
  19520. });
  19521. Object.defineProperty(exports, "CatchClause", {
  19522. enumerable: true,
  19523. get: function() {
  19524. return _index.catchClause;
  19525. }
  19526. });
  19527. Object.defineProperty(exports, "ClassAccessorProperty", {
  19528. enumerable: true,
  19529. get: function() {
  19530. return _index.classAccessorProperty;
  19531. }
  19532. });
  19533. Object.defineProperty(exports, "ClassBody", {
  19534. enumerable: true,
  19535. get: function() {
  19536. return _index.classBody;
  19537. }
  19538. });
  19539. Object.defineProperty(exports, "ClassDeclaration", {
  19540. enumerable: true,
  19541. get: function() {
  19542. return _index.classDeclaration;
  19543. }
  19544. });
  19545. Object.defineProperty(exports, "ClassExpression", {
  19546. enumerable: true,
  19547. get: function() {
  19548. return _index.classExpression;
  19549. }
  19550. });
  19551. Object.defineProperty(exports, "ClassImplements", {
  19552. enumerable: true,
  19553. get: function() {
  19554. return _index.classImplements;
  19555. }
  19556. });
  19557. Object.defineProperty(exports, "ClassMethod", {
  19558. enumerable: true,
  19559. get: function() {
  19560. return _index.classMethod;
  19561. }
  19562. });
  19563. Object.defineProperty(exports, "ClassPrivateMethod", {
  19564. enumerable: true,
  19565. get: function() {
  19566. return _index.classPrivateMethod;
  19567. }
  19568. });
  19569. Object.defineProperty(exports, "ClassPrivateProperty", {
  19570. enumerable: true,
  19571. get: function() {
  19572. return _index.classPrivateProperty;
  19573. }
  19574. });
  19575. Object.defineProperty(exports, "ClassProperty", {
  19576. enumerable: true,
  19577. get: function() {
  19578. return _index.classProperty;
  19579. }
  19580. });
  19581. Object.defineProperty(exports, "ConditionalExpression", {
  19582. enumerable: true,
  19583. get: function() {
  19584. return _index.conditionalExpression;
  19585. }
  19586. });
  19587. Object.defineProperty(exports, "ContinueStatement", {
  19588. enumerable: true,
  19589. get: function() {
  19590. return _index.continueStatement;
  19591. }
  19592. });
  19593. Object.defineProperty(exports, "DebuggerStatement", {
  19594. enumerable: true,
  19595. get: function() {
  19596. return _index.debuggerStatement;
  19597. }
  19598. });
  19599. Object.defineProperty(exports, "DecimalLiteral", {
  19600. enumerable: true,
  19601. get: function() {
  19602. return _index.decimalLiteral;
  19603. }
  19604. });
  19605. Object.defineProperty(exports, "DeclareClass", {
  19606. enumerable: true,
  19607. get: function() {
  19608. return _index.declareClass;
  19609. }
  19610. });
  19611. Object.defineProperty(exports, "DeclareExportAllDeclaration", {
  19612. enumerable: true,
  19613. get: function() {
  19614. return _index.declareExportAllDeclaration;
  19615. }
  19616. });
  19617. Object.defineProperty(exports, "DeclareExportDeclaration", {
  19618. enumerable: true,
  19619. get: function() {
  19620. return _index.declareExportDeclaration;
  19621. }
  19622. });
  19623. Object.defineProperty(exports, "DeclareFunction", {
  19624. enumerable: true,
  19625. get: function() {
  19626. return _index.declareFunction;
  19627. }
  19628. });
  19629. Object.defineProperty(exports, "DeclareInterface", {
  19630. enumerable: true,
  19631. get: function() {
  19632. return _index.declareInterface;
  19633. }
  19634. });
  19635. Object.defineProperty(exports, "DeclareModule", {
  19636. enumerable: true,
  19637. get: function() {
  19638. return _index.declareModule;
  19639. }
  19640. });
  19641. Object.defineProperty(exports, "DeclareModuleExports", {
  19642. enumerable: true,
  19643. get: function() {
  19644. return _index.declareModuleExports;
  19645. }
  19646. });
  19647. Object.defineProperty(exports, "DeclareOpaqueType", {
  19648. enumerable: true,
  19649. get: function() {
  19650. return _index.declareOpaqueType;
  19651. }
  19652. });
  19653. Object.defineProperty(exports, "DeclareTypeAlias", {
  19654. enumerable: true,
  19655. get: function() {
  19656. return _index.declareTypeAlias;
  19657. }
  19658. });
  19659. Object.defineProperty(exports, "DeclareVariable", {
  19660. enumerable: true,
  19661. get: function() {
  19662. return _index.declareVariable;
  19663. }
  19664. });
  19665. Object.defineProperty(exports, "DeclaredPredicate", {
  19666. enumerable: true,
  19667. get: function() {
  19668. return _index.declaredPredicate;
  19669. }
  19670. });
  19671. Object.defineProperty(exports, "Decorator", {
  19672. enumerable: true,
  19673. get: function() {
  19674. return _index.decorator;
  19675. }
  19676. });
  19677. Object.defineProperty(exports, "Directive", {
  19678. enumerable: true,
  19679. get: function() {
  19680. return _index.directive;
  19681. }
  19682. });
  19683. Object.defineProperty(exports, "DirectiveLiteral", {
  19684. enumerable: true,
  19685. get: function() {
  19686. return _index.directiveLiteral;
  19687. }
  19688. });
  19689. Object.defineProperty(exports, "DoExpression", {
  19690. enumerable: true,
  19691. get: function() {
  19692. return _index.doExpression;
  19693. }
  19694. });
  19695. Object.defineProperty(exports, "DoWhileStatement", {
  19696. enumerable: true,
  19697. get: function() {
  19698. return _index.doWhileStatement;
  19699. }
  19700. });
  19701. Object.defineProperty(exports, "EmptyStatement", {
  19702. enumerable: true,
  19703. get: function() {
  19704. return _index.emptyStatement;
  19705. }
  19706. });
  19707. Object.defineProperty(exports, "EmptyTypeAnnotation", {
  19708. enumerable: true,
  19709. get: function() {
  19710. return _index.emptyTypeAnnotation;
  19711. }
  19712. });
  19713. Object.defineProperty(exports, "EnumBooleanBody", {
  19714. enumerable: true,
  19715. get: function() {
  19716. return _index.enumBooleanBody;
  19717. }
  19718. });
  19719. Object.defineProperty(exports, "EnumBooleanMember", {
  19720. enumerable: true,
  19721. get: function() {
  19722. return _index.enumBooleanMember;
  19723. }
  19724. });
  19725. Object.defineProperty(exports, "EnumDeclaration", {
  19726. enumerable: true,
  19727. get: function() {
  19728. return _index.enumDeclaration;
  19729. }
  19730. });
  19731. Object.defineProperty(exports, "EnumDefaultedMember", {
  19732. enumerable: true,
  19733. get: function() {
  19734. return _index.enumDefaultedMember;
  19735. }
  19736. });
  19737. Object.defineProperty(exports, "EnumNumberBody", {
  19738. enumerable: true,
  19739. get: function() {
  19740. return _index.enumNumberBody;
  19741. }
  19742. });
  19743. Object.defineProperty(exports, "EnumNumberMember", {
  19744. enumerable: true,
  19745. get: function() {
  19746. return _index.enumNumberMember;
  19747. }
  19748. });
  19749. Object.defineProperty(exports, "EnumStringBody", {
  19750. enumerable: true,
  19751. get: function() {
  19752. return _index.enumStringBody;
  19753. }
  19754. });
  19755. Object.defineProperty(exports, "EnumStringMember", {
  19756. enumerable: true,
  19757. get: function() {
  19758. return _index.enumStringMember;
  19759. }
  19760. });
  19761. Object.defineProperty(exports, "EnumSymbolBody", {
  19762. enumerable: true,
  19763. get: function() {
  19764. return _index.enumSymbolBody;
  19765. }
  19766. });
  19767. Object.defineProperty(exports, "ExistsTypeAnnotation", {
  19768. enumerable: true,
  19769. get: function() {
  19770. return _index.existsTypeAnnotation;
  19771. }
  19772. });
  19773. Object.defineProperty(exports, "ExportAllDeclaration", {
  19774. enumerable: true,
  19775. get: function() {
  19776. return _index.exportAllDeclaration;
  19777. }
  19778. });
  19779. Object.defineProperty(exports, "ExportDefaultDeclaration", {
  19780. enumerable: true,
  19781. get: function() {
  19782. return _index.exportDefaultDeclaration;
  19783. }
  19784. });
  19785. Object.defineProperty(exports, "ExportDefaultSpecifier", {
  19786. enumerable: true,
  19787. get: function() {
  19788. return _index.exportDefaultSpecifier;
  19789. }
  19790. });
  19791. Object.defineProperty(exports, "ExportNamedDeclaration", {
  19792. enumerable: true,
  19793. get: function() {
  19794. return _index.exportNamedDeclaration;
  19795. }
  19796. });
  19797. Object.defineProperty(exports, "ExportNamespaceSpecifier", {
  19798. enumerable: true,
  19799. get: function() {
  19800. return _index.exportNamespaceSpecifier;
  19801. }
  19802. });
  19803. Object.defineProperty(exports, "ExportSpecifier", {
  19804. enumerable: true,
  19805. get: function() {
  19806. return _index.exportSpecifier;
  19807. }
  19808. });
  19809. Object.defineProperty(exports, "ExpressionStatement", {
  19810. enumerable: true,
  19811. get: function() {
  19812. return _index.expressionStatement;
  19813. }
  19814. });
  19815. Object.defineProperty(exports, "File", {
  19816. enumerable: true,
  19817. get: function() {
  19818. return _index.file;
  19819. }
  19820. });
  19821. Object.defineProperty(exports, "ForInStatement", {
  19822. enumerable: true,
  19823. get: function() {
  19824. return _index.forInStatement;
  19825. }
  19826. });
  19827. Object.defineProperty(exports, "ForOfStatement", {
  19828. enumerable: true,
  19829. get: function() {
  19830. return _index.forOfStatement;
  19831. }
  19832. });
  19833. Object.defineProperty(exports, "ForStatement", {
  19834. enumerable: true,
  19835. get: function() {
  19836. return _index.forStatement;
  19837. }
  19838. });
  19839. Object.defineProperty(exports, "FunctionDeclaration", {
  19840. enumerable: true,
  19841. get: function() {
  19842. return _index.functionDeclaration;
  19843. }
  19844. });
  19845. Object.defineProperty(exports, "FunctionExpression", {
  19846. enumerable: true,
  19847. get: function() {
  19848. return _index.functionExpression;
  19849. }
  19850. });
  19851. Object.defineProperty(exports, "FunctionTypeAnnotation", {
  19852. enumerable: true,
  19853. get: function() {
  19854. return _index.functionTypeAnnotation;
  19855. }
  19856. });
  19857. Object.defineProperty(exports, "FunctionTypeParam", {
  19858. enumerable: true,
  19859. get: function() {
  19860. return _index.functionTypeParam;
  19861. }
  19862. });
  19863. Object.defineProperty(exports, "GenericTypeAnnotation", {
  19864. enumerable: true,
  19865. get: function() {
  19866. return _index.genericTypeAnnotation;
  19867. }
  19868. });
  19869. Object.defineProperty(exports, "Identifier", {
  19870. enumerable: true,
  19871. get: function() {
  19872. return _index.identifier;
  19873. }
  19874. });
  19875. Object.defineProperty(exports, "IfStatement", {
  19876. enumerable: true,
  19877. get: function() {
  19878. return _index.ifStatement;
  19879. }
  19880. });
  19881. Object.defineProperty(exports, "Import", {
  19882. enumerable: true,
  19883. get: function() {
  19884. return _index.import;
  19885. }
  19886. });
  19887. Object.defineProperty(exports, "ImportAttribute", {
  19888. enumerable: true,
  19889. get: function() {
  19890. return _index.importAttribute;
  19891. }
  19892. });
  19893. Object.defineProperty(exports, "ImportDeclaration", {
  19894. enumerable: true,
  19895. get: function() {
  19896. return _index.importDeclaration;
  19897. }
  19898. });
  19899. Object.defineProperty(exports, "ImportDefaultSpecifier", {
  19900. enumerable: true,
  19901. get: function() {
  19902. return _index.importDefaultSpecifier;
  19903. }
  19904. });
  19905. Object.defineProperty(exports, "ImportNamespaceSpecifier", {
  19906. enumerable: true,
  19907. get: function() {
  19908. return _index.importNamespaceSpecifier;
  19909. }
  19910. });
  19911. Object.defineProperty(exports, "ImportSpecifier", {
  19912. enumerable: true,
  19913. get: function() {
  19914. return _index.importSpecifier;
  19915. }
  19916. });
  19917. Object.defineProperty(exports, "IndexedAccessType", {
  19918. enumerable: true,
  19919. get: function() {
  19920. return _index.indexedAccessType;
  19921. }
  19922. });
  19923. Object.defineProperty(exports, "InferredPredicate", {
  19924. enumerable: true,
  19925. get: function() {
  19926. return _index.inferredPredicate;
  19927. }
  19928. });
  19929. Object.defineProperty(exports, "InterfaceDeclaration", {
  19930. enumerable: true,
  19931. get: function() {
  19932. return _index.interfaceDeclaration;
  19933. }
  19934. });
  19935. Object.defineProperty(exports, "InterfaceExtends", {
  19936. enumerable: true,
  19937. get: function() {
  19938. return _index.interfaceExtends;
  19939. }
  19940. });
  19941. Object.defineProperty(exports, "InterfaceTypeAnnotation", {
  19942. enumerable: true,
  19943. get: function() {
  19944. return _index.interfaceTypeAnnotation;
  19945. }
  19946. });
  19947. Object.defineProperty(exports, "InterpreterDirective", {
  19948. enumerable: true,
  19949. get: function() {
  19950. return _index.interpreterDirective;
  19951. }
  19952. });
  19953. Object.defineProperty(exports, "IntersectionTypeAnnotation", {
  19954. enumerable: true,
  19955. get: function() {
  19956. return _index.intersectionTypeAnnotation;
  19957. }
  19958. });
  19959. Object.defineProperty(exports, "JSXAttribute", {
  19960. enumerable: true,
  19961. get: function() {
  19962. return _index.jsxAttribute;
  19963. }
  19964. });
  19965. Object.defineProperty(exports, "JSXClosingElement", {
  19966. enumerable: true,
  19967. get: function() {
  19968. return _index.jsxClosingElement;
  19969. }
  19970. });
  19971. Object.defineProperty(exports, "JSXClosingFragment", {
  19972. enumerable: true,
  19973. get: function() {
  19974. return _index.jsxClosingFragment;
  19975. }
  19976. });
  19977. Object.defineProperty(exports, "JSXElement", {
  19978. enumerable: true,
  19979. get: function() {
  19980. return _index.jsxElement;
  19981. }
  19982. });
  19983. Object.defineProperty(exports, "JSXEmptyExpression", {
  19984. enumerable: true,
  19985. get: function() {
  19986. return _index.jsxEmptyExpression;
  19987. }
  19988. });
  19989. Object.defineProperty(exports, "JSXExpressionContainer", {
  19990. enumerable: true,
  19991. get: function() {
  19992. return _index.jsxExpressionContainer;
  19993. }
  19994. });
  19995. Object.defineProperty(exports, "JSXFragment", {
  19996. enumerable: true,
  19997. get: function() {
  19998. return _index.jsxFragment;
  19999. }
  20000. });
  20001. Object.defineProperty(exports, "JSXIdentifier", {
  20002. enumerable: true,
  20003. get: function() {
  20004. return _index.jsxIdentifier;
  20005. }
  20006. });
  20007. Object.defineProperty(exports, "JSXMemberExpression", {
  20008. enumerable: true,
  20009. get: function() {
  20010. return _index.jsxMemberExpression;
  20011. }
  20012. });
  20013. Object.defineProperty(exports, "JSXNamespacedName", {
  20014. enumerable: true,
  20015. get: function() {
  20016. return _index.jsxNamespacedName;
  20017. }
  20018. });
  20019. Object.defineProperty(exports, "JSXOpeningElement", {
  20020. enumerable: true,
  20021. get: function() {
  20022. return _index.jsxOpeningElement;
  20023. }
  20024. });
  20025. Object.defineProperty(exports, "JSXOpeningFragment", {
  20026. enumerable: true,
  20027. get: function() {
  20028. return _index.jsxOpeningFragment;
  20029. }
  20030. });
  20031. Object.defineProperty(exports, "JSXSpreadAttribute", {
  20032. enumerable: true,
  20033. get: function() {
  20034. return _index.jsxSpreadAttribute;
  20035. }
  20036. });
  20037. Object.defineProperty(exports, "JSXSpreadChild", {
  20038. enumerable: true,
  20039. get: function() {
  20040. return _index.jsxSpreadChild;
  20041. }
  20042. });
  20043. Object.defineProperty(exports, "JSXText", {
  20044. enumerable: true,
  20045. get: function() {
  20046. return _index.jsxText;
  20047. }
  20048. });
  20049. Object.defineProperty(exports, "LabeledStatement", {
  20050. enumerable: true,
  20051. get: function() {
  20052. return _index.labeledStatement;
  20053. }
  20054. });
  20055. Object.defineProperty(exports, "LogicalExpression", {
  20056. enumerable: true,
  20057. get: function() {
  20058. return _index.logicalExpression;
  20059. }
  20060. });
  20061. Object.defineProperty(exports, "MemberExpression", {
  20062. enumerable: true,
  20063. get: function() {
  20064. return _index.memberExpression;
  20065. }
  20066. });
  20067. Object.defineProperty(exports, "MetaProperty", {
  20068. enumerable: true,
  20069. get: function() {
  20070. return _index.metaProperty;
  20071. }
  20072. });
  20073. Object.defineProperty(exports, "MixedTypeAnnotation", {
  20074. enumerable: true,
  20075. get: function() {
  20076. return _index.mixedTypeAnnotation;
  20077. }
  20078. });
  20079. Object.defineProperty(exports, "ModuleExpression", {
  20080. enumerable: true,
  20081. get: function() {
  20082. return _index.moduleExpression;
  20083. }
  20084. });
  20085. Object.defineProperty(exports, "NewExpression", {
  20086. enumerable: true,
  20087. get: function() {
  20088. return _index.newExpression;
  20089. }
  20090. });
  20091. Object.defineProperty(exports, "Noop", {
  20092. enumerable: true,
  20093. get: function() {
  20094. return _index.noop;
  20095. }
  20096. });
  20097. Object.defineProperty(exports, "NullLiteral", {
  20098. enumerable: true,
  20099. get: function() {
  20100. return _index.nullLiteral;
  20101. }
  20102. });
  20103. Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
  20104. enumerable: true,
  20105. get: function() {
  20106. return _index.nullLiteralTypeAnnotation;
  20107. }
  20108. });
  20109. Object.defineProperty(exports, "NullableTypeAnnotation", {
  20110. enumerable: true,
  20111. get: function() {
  20112. return _index.nullableTypeAnnotation;
  20113. }
  20114. });
  20115. Object.defineProperty(exports, "NumberLiteral", {
  20116. enumerable: true,
  20117. get: function() {
  20118. return _index.numberLiteral;
  20119. }
  20120. });
  20121. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  20122. enumerable: true,
  20123. get: function() {
  20124. return _index.numberLiteralTypeAnnotation;
  20125. }
  20126. });
  20127. Object.defineProperty(exports, "NumberTypeAnnotation", {
  20128. enumerable: true,
  20129. get: function() {
  20130. return _index.numberTypeAnnotation;
  20131. }
  20132. });
  20133. Object.defineProperty(exports, "NumericLiteral", {
  20134. enumerable: true,
  20135. get: function() {
  20136. return _index.numericLiteral;
  20137. }
  20138. });
  20139. Object.defineProperty(exports, "ObjectExpression", {
  20140. enumerable: true,
  20141. get: function() {
  20142. return _index.objectExpression;
  20143. }
  20144. });
  20145. Object.defineProperty(exports, "ObjectMethod", {
  20146. enumerable: true,
  20147. get: function() {
  20148. return _index.objectMethod;
  20149. }
  20150. });
  20151. Object.defineProperty(exports, "ObjectPattern", {
  20152. enumerable: true,
  20153. get: function() {
  20154. return _index.objectPattern;
  20155. }
  20156. });
  20157. Object.defineProperty(exports, "ObjectProperty", {
  20158. enumerable: true,
  20159. get: function() {
  20160. return _index.objectProperty;
  20161. }
  20162. });
  20163. Object.defineProperty(exports, "ObjectTypeAnnotation", {
  20164. enumerable: true,
  20165. get: function() {
  20166. return _index.objectTypeAnnotation;
  20167. }
  20168. });
  20169. Object.defineProperty(exports, "ObjectTypeCallProperty", {
  20170. enumerable: true,
  20171. get: function() {
  20172. return _index.objectTypeCallProperty;
  20173. }
  20174. });
  20175. Object.defineProperty(exports, "ObjectTypeIndexer", {
  20176. enumerable: true,
  20177. get: function() {
  20178. return _index.objectTypeIndexer;
  20179. }
  20180. });
  20181. Object.defineProperty(exports, "ObjectTypeInternalSlot", {
  20182. enumerable: true,
  20183. get: function() {
  20184. return _index.objectTypeInternalSlot;
  20185. }
  20186. });
  20187. Object.defineProperty(exports, "ObjectTypeProperty", {
  20188. enumerable: true,
  20189. get: function() {
  20190. return _index.objectTypeProperty;
  20191. }
  20192. });
  20193. Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
  20194. enumerable: true,
  20195. get: function() {
  20196. return _index.objectTypeSpreadProperty;
  20197. }
  20198. });
  20199. Object.defineProperty(exports, "OpaqueType", {
  20200. enumerable: true,
  20201. get: function() {
  20202. return _index.opaqueType;
  20203. }
  20204. });
  20205. Object.defineProperty(exports, "OptionalCallExpression", {
  20206. enumerable: true,
  20207. get: function() {
  20208. return _index.optionalCallExpression;
  20209. }
  20210. });
  20211. Object.defineProperty(exports, "OptionalIndexedAccessType", {
  20212. enumerable: true,
  20213. get: function() {
  20214. return _index.optionalIndexedAccessType;
  20215. }
  20216. });
  20217. Object.defineProperty(exports, "OptionalMemberExpression", {
  20218. enumerable: true,
  20219. get: function() {
  20220. return _index.optionalMemberExpression;
  20221. }
  20222. });
  20223. Object.defineProperty(exports, "ParenthesizedExpression", {
  20224. enumerable: true,
  20225. get: function() {
  20226. return _index.parenthesizedExpression;
  20227. }
  20228. });
  20229. Object.defineProperty(exports, "PipelineBareFunction", {
  20230. enumerable: true,
  20231. get: function() {
  20232. return _index.pipelineBareFunction;
  20233. }
  20234. });
  20235. Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
  20236. enumerable: true,
  20237. get: function() {
  20238. return _index.pipelinePrimaryTopicReference;
  20239. }
  20240. });
  20241. Object.defineProperty(exports, "PipelineTopicExpression", {
  20242. enumerable: true,
  20243. get: function() {
  20244. return _index.pipelineTopicExpression;
  20245. }
  20246. });
  20247. Object.defineProperty(exports, "Placeholder", {
  20248. enumerable: true,
  20249. get: function() {
  20250. return _index.placeholder;
  20251. }
  20252. });
  20253. Object.defineProperty(exports, "PrivateName", {
  20254. enumerable: true,
  20255. get: function() {
  20256. return _index.privateName;
  20257. }
  20258. });
  20259. Object.defineProperty(exports, "Program", {
  20260. enumerable: true,
  20261. get: function() {
  20262. return _index.program;
  20263. }
  20264. });
  20265. Object.defineProperty(exports, "QualifiedTypeIdentifier", {
  20266. enumerable: true,
  20267. get: function() {
  20268. return _index.qualifiedTypeIdentifier;
  20269. }
  20270. });
  20271. Object.defineProperty(exports, "RecordExpression", {
  20272. enumerable: true,
  20273. get: function() {
  20274. return _index.recordExpression;
  20275. }
  20276. });
  20277. Object.defineProperty(exports, "RegExpLiteral", {
  20278. enumerable: true,
  20279. get: function() {
  20280. return _index.regExpLiteral;
  20281. }
  20282. });
  20283. Object.defineProperty(exports, "RegexLiteral", {
  20284. enumerable: true,
  20285. get: function() {
  20286. return _index.regexLiteral;
  20287. }
  20288. });
  20289. Object.defineProperty(exports, "RestElement", {
  20290. enumerable: true,
  20291. get: function() {
  20292. return _index.restElement;
  20293. }
  20294. });
  20295. Object.defineProperty(exports, "RestProperty", {
  20296. enumerable: true,
  20297. get: function() {
  20298. return _index.restProperty;
  20299. }
  20300. });
  20301. Object.defineProperty(exports, "ReturnStatement", {
  20302. enumerable: true,
  20303. get: function() {
  20304. return _index.returnStatement;
  20305. }
  20306. });
  20307. Object.defineProperty(exports, "SequenceExpression", {
  20308. enumerable: true,
  20309. get: function() {
  20310. return _index.sequenceExpression;
  20311. }
  20312. });
  20313. Object.defineProperty(exports, "SpreadElement", {
  20314. enumerable: true,
  20315. get: function() {
  20316. return _index.spreadElement;
  20317. }
  20318. });
  20319. Object.defineProperty(exports, "SpreadProperty", {
  20320. enumerable: true,
  20321. get: function() {
  20322. return _index.spreadProperty;
  20323. }
  20324. });
  20325. Object.defineProperty(exports, "StaticBlock", {
  20326. enumerable: true,
  20327. get: function() {
  20328. return _index.staticBlock;
  20329. }
  20330. });
  20331. Object.defineProperty(exports, "StringLiteral", {
  20332. enumerable: true,
  20333. get: function() {
  20334. return _index.stringLiteral;
  20335. }
  20336. });
  20337. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  20338. enumerable: true,
  20339. get: function() {
  20340. return _index.stringLiteralTypeAnnotation;
  20341. }
  20342. });
  20343. Object.defineProperty(exports, "StringTypeAnnotation", {
  20344. enumerable: true,
  20345. get: function() {
  20346. return _index.stringTypeAnnotation;
  20347. }
  20348. });
  20349. Object.defineProperty(exports, "Super", {
  20350. enumerable: true,
  20351. get: function() {
  20352. return _index.super;
  20353. }
  20354. });
  20355. Object.defineProperty(exports, "SwitchCase", {
  20356. enumerable: true,
  20357. get: function() {
  20358. return _index.switchCase;
  20359. }
  20360. });
  20361. Object.defineProperty(exports, "SwitchStatement", {
  20362. enumerable: true,
  20363. get: function() {
  20364. return _index.switchStatement;
  20365. }
  20366. });
  20367. Object.defineProperty(exports, "SymbolTypeAnnotation", {
  20368. enumerable: true,
  20369. get: function() {
  20370. return _index.symbolTypeAnnotation;
  20371. }
  20372. });
  20373. Object.defineProperty(exports, "TSAnyKeyword", {
  20374. enumerable: true,
  20375. get: function() {
  20376. return _index.tsAnyKeyword;
  20377. }
  20378. });
  20379. Object.defineProperty(exports, "TSArrayType", {
  20380. enumerable: true,
  20381. get: function() {
  20382. return _index.tsArrayType;
  20383. }
  20384. });
  20385. Object.defineProperty(exports, "TSAsExpression", {
  20386. enumerable: true,
  20387. get: function() {
  20388. return _index.tsAsExpression;
  20389. }
  20390. });
  20391. Object.defineProperty(exports, "TSBigIntKeyword", {
  20392. enumerable: true,
  20393. get: function() {
  20394. return _index.tsBigIntKeyword;
  20395. }
  20396. });
  20397. Object.defineProperty(exports, "TSBooleanKeyword", {
  20398. enumerable: true,
  20399. get: function() {
  20400. return _index.tsBooleanKeyword;
  20401. }
  20402. });
  20403. Object.defineProperty(exports, "TSCallSignatureDeclaration", {
  20404. enumerable: true,
  20405. get: function() {
  20406. return _index.tsCallSignatureDeclaration;
  20407. }
  20408. });
  20409. Object.defineProperty(exports, "TSConditionalType", {
  20410. enumerable: true,
  20411. get: function() {
  20412. return _index.tsConditionalType;
  20413. }
  20414. });
  20415. Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
  20416. enumerable: true,
  20417. get: function() {
  20418. return _index.tsConstructSignatureDeclaration;
  20419. }
  20420. });
  20421. Object.defineProperty(exports, "TSConstructorType", {
  20422. enumerable: true,
  20423. get: function() {
  20424. return _index.tsConstructorType;
  20425. }
  20426. });
  20427. Object.defineProperty(exports, "TSDeclareFunction", {
  20428. enumerable: true,
  20429. get: function() {
  20430. return _index.tsDeclareFunction;
  20431. }
  20432. });
  20433. Object.defineProperty(exports, "TSDeclareMethod", {
  20434. enumerable: true,
  20435. get: function() {
  20436. return _index.tsDeclareMethod;
  20437. }
  20438. });
  20439. Object.defineProperty(exports, "TSEnumDeclaration", {
  20440. enumerable: true,
  20441. get: function() {
  20442. return _index.tsEnumDeclaration;
  20443. }
  20444. });
  20445. Object.defineProperty(exports, "TSEnumMember", {
  20446. enumerable: true,
  20447. get: function() {
  20448. return _index.tsEnumMember;
  20449. }
  20450. });
  20451. Object.defineProperty(exports, "TSExportAssignment", {
  20452. enumerable: true,
  20453. get: function() {
  20454. return _index.tsExportAssignment;
  20455. }
  20456. });
  20457. Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
  20458. enumerable: true,
  20459. get: function() {
  20460. return _index.tsExpressionWithTypeArguments;
  20461. }
  20462. });
  20463. Object.defineProperty(exports, "TSExternalModuleReference", {
  20464. enumerable: true,
  20465. get: function() {
  20466. return _index.tsExternalModuleReference;
  20467. }
  20468. });
  20469. Object.defineProperty(exports, "TSFunctionType", {
  20470. enumerable: true,
  20471. get: function() {
  20472. return _index.tsFunctionType;
  20473. }
  20474. });
  20475. Object.defineProperty(exports, "TSImportEqualsDeclaration", {
  20476. enumerable: true,
  20477. get: function() {
  20478. return _index.tsImportEqualsDeclaration;
  20479. }
  20480. });
  20481. Object.defineProperty(exports, "TSImportType", {
  20482. enumerable: true,
  20483. get: function() {
  20484. return _index.tsImportType;
  20485. }
  20486. });
  20487. Object.defineProperty(exports, "TSIndexSignature", {
  20488. enumerable: true,
  20489. get: function() {
  20490. return _index.tsIndexSignature;
  20491. }
  20492. });
  20493. Object.defineProperty(exports, "TSIndexedAccessType", {
  20494. enumerable: true,
  20495. get: function() {
  20496. return _index.tsIndexedAccessType;
  20497. }
  20498. });
  20499. Object.defineProperty(exports, "TSInferType", {
  20500. enumerable: true,
  20501. get: function() {
  20502. return _index.tsInferType;
  20503. }
  20504. });
  20505. Object.defineProperty(exports, "TSInstantiationExpression", {
  20506. enumerable: true,
  20507. get: function() {
  20508. return _index.tsInstantiationExpression;
  20509. }
  20510. });
  20511. Object.defineProperty(exports, "TSInterfaceBody", {
  20512. enumerable: true,
  20513. get: function() {
  20514. return _index.tsInterfaceBody;
  20515. }
  20516. });
  20517. Object.defineProperty(exports, "TSInterfaceDeclaration", {
  20518. enumerable: true,
  20519. get: function() {
  20520. return _index.tsInterfaceDeclaration;
  20521. }
  20522. });
  20523. Object.defineProperty(exports, "TSIntersectionType", {
  20524. enumerable: true,
  20525. get: function() {
  20526. return _index.tsIntersectionType;
  20527. }
  20528. });
  20529. Object.defineProperty(exports, "TSIntrinsicKeyword", {
  20530. enumerable: true,
  20531. get: function() {
  20532. return _index.tsIntrinsicKeyword;
  20533. }
  20534. });
  20535. Object.defineProperty(exports, "TSLiteralType", {
  20536. enumerable: true,
  20537. get: function() {
  20538. return _index.tsLiteralType;
  20539. }
  20540. });
  20541. Object.defineProperty(exports, "TSMappedType", {
  20542. enumerable: true,
  20543. get: function() {
  20544. return _index.tsMappedType;
  20545. }
  20546. });
  20547. Object.defineProperty(exports, "TSMethodSignature", {
  20548. enumerable: true,
  20549. get: function() {
  20550. return _index.tsMethodSignature;
  20551. }
  20552. });
  20553. Object.defineProperty(exports, "TSModuleBlock", {
  20554. enumerable: true,
  20555. get: function() {
  20556. return _index.tsModuleBlock;
  20557. }
  20558. });
  20559. Object.defineProperty(exports, "TSModuleDeclaration", {
  20560. enumerable: true,
  20561. get: function() {
  20562. return _index.tsModuleDeclaration;
  20563. }
  20564. });
  20565. Object.defineProperty(exports, "TSNamedTupleMember", {
  20566. enumerable: true,
  20567. get: function() {
  20568. return _index.tsNamedTupleMember;
  20569. }
  20570. });
  20571. Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
  20572. enumerable: true,
  20573. get: function() {
  20574. return _index.tsNamespaceExportDeclaration;
  20575. }
  20576. });
  20577. Object.defineProperty(exports, "TSNeverKeyword", {
  20578. enumerable: true,
  20579. get: function() {
  20580. return _index.tsNeverKeyword;
  20581. }
  20582. });
  20583. Object.defineProperty(exports, "TSNonNullExpression", {
  20584. enumerable: true,
  20585. get: function() {
  20586. return _index.tsNonNullExpression;
  20587. }
  20588. });
  20589. Object.defineProperty(exports, "TSNullKeyword", {
  20590. enumerable: true,
  20591. get: function() {
  20592. return _index.tsNullKeyword;
  20593. }
  20594. });
  20595. Object.defineProperty(exports, "TSNumberKeyword", {
  20596. enumerable: true,
  20597. get: function() {
  20598. return _index.tsNumberKeyword;
  20599. }
  20600. });
  20601. Object.defineProperty(exports, "TSObjectKeyword", {
  20602. enumerable: true,
  20603. get: function() {
  20604. return _index.tsObjectKeyword;
  20605. }
  20606. });
  20607. Object.defineProperty(exports, "TSOptionalType", {
  20608. enumerable: true,
  20609. get: function() {
  20610. return _index.tsOptionalType;
  20611. }
  20612. });
  20613. Object.defineProperty(exports, "TSParameterProperty", {
  20614. enumerable: true,
  20615. get: function() {
  20616. return _index.tsParameterProperty;
  20617. }
  20618. });
  20619. Object.defineProperty(exports, "TSParenthesizedType", {
  20620. enumerable: true,
  20621. get: function() {
  20622. return _index.tsParenthesizedType;
  20623. }
  20624. });
  20625. Object.defineProperty(exports, "TSPropertySignature", {
  20626. enumerable: true,
  20627. get: function() {
  20628. return _index.tsPropertySignature;
  20629. }
  20630. });
  20631. Object.defineProperty(exports, "TSQualifiedName", {
  20632. enumerable: true,
  20633. get: function() {
  20634. return _index.tsQualifiedName;
  20635. }
  20636. });
  20637. Object.defineProperty(exports, "TSRestType", {
  20638. enumerable: true,
  20639. get: function() {
  20640. return _index.tsRestType;
  20641. }
  20642. });
  20643. Object.defineProperty(exports, "TSSatisfiesExpression", {
  20644. enumerable: true,
  20645. get: function() {
  20646. return _index.tsSatisfiesExpression;
  20647. }
  20648. });
  20649. Object.defineProperty(exports, "TSStringKeyword", {
  20650. enumerable: true,
  20651. get: function() {
  20652. return _index.tsStringKeyword;
  20653. }
  20654. });
  20655. Object.defineProperty(exports, "TSSymbolKeyword", {
  20656. enumerable: true,
  20657. get: function() {
  20658. return _index.tsSymbolKeyword;
  20659. }
  20660. });
  20661. Object.defineProperty(exports, "TSThisType", {
  20662. enumerable: true,
  20663. get: function() {
  20664. return _index.tsThisType;
  20665. }
  20666. });
  20667. Object.defineProperty(exports, "TSTupleType", {
  20668. enumerable: true,
  20669. get: function() {
  20670. return _index.tsTupleType;
  20671. }
  20672. });
  20673. Object.defineProperty(exports, "TSTypeAliasDeclaration", {
  20674. enumerable: true,
  20675. get: function() {
  20676. return _index.tsTypeAliasDeclaration;
  20677. }
  20678. });
  20679. Object.defineProperty(exports, "TSTypeAnnotation", {
  20680. enumerable: true,
  20681. get: function() {
  20682. return _index.tsTypeAnnotation;
  20683. }
  20684. });
  20685. Object.defineProperty(exports, "TSTypeAssertion", {
  20686. enumerable: true,
  20687. get: function() {
  20688. return _index.tsTypeAssertion;
  20689. }
  20690. });
  20691. Object.defineProperty(exports, "TSTypeLiteral", {
  20692. enumerable: true,
  20693. get: function() {
  20694. return _index.tsTypeLiteral;
  20695. }
  20696. });
  20697. Object.defineProperty(exports, "TSTypeOperator", {
  20698. enumerable: true,
  20699. get: function() {
  20700. return _index.tsTypeOperator;
  20701. }
  20702. });
  20703. Object.defineProperty(exports, "TSTypeParameter", {
  20704. enumerable: true,
  20705. get: function() {
  20706. return _index.tsTypeParameter;
  20707. }
  20708. });
  20709. Object.defineProperty(exports, "TSTypeParameterDeclaration", {
  20710. enumerable: true,
  20711. get: function() {
  20712. return _index.tsTypeParameterDeclaration;
  20713. }
  20714. });
  20715. Object.defineProperty(exports, "TSTypeParameterInstantiation", {
  20716. enumerable: true,
  20717. get: function() {
  20718. return _index.tsTypeParameterInstantiation;
  20719. }
  20720. });
  20721. Object.defineProperty(exports, "TSTypePredicate", {
  20722. enumerable: true,
  20723. get: function() {
  20724. return _index.tsTypePredicate;
  20725. }
  20726. });
  20727. Object.defineProperty(exports, "TSTypeQuery", {
  20728. enumerable: true,
  20729. get: function() {
  20730. return _index.tsTypeQuery;
  20731. }
  20732. });
  20733. Object.defineProperty(exports, "TSTypeReference", {
  20734. enumerable: true,
  20735. get: function() {
  20736. return _index.tsTypeReference;
  20737. }
  20738. });
  20739. Object.defineProperty(exports, "TSUndefinedKeyword", {
  20740. enumerable: true,
  20741. get: function() {
  20742. return _index.tsUndefinedKeyword;
  20743. }
  20744. });
  20745. Object.defineProperty(exports, "TSUnionType", {
  20746. enumerable: true,
  20747. get: function() {
  20748. return _index.tsUnionType;
  20749. }
  20750. });
  20751. Object.defineProperty(exports, "TSUnknownKeyword", {
  20752. enumerable: true,
  20753. get: function() {
  20754. return _index.tsUnknownKeyword;
  20755. }
  20756. });
  20757. Object.defineProperty(exports, "TSVoidKeyword", {
  20758. enumerable: true,
  20759. get: function() {
  20760. return _index.tsVoidKeyword;
  20761. }
  20762. });
  20763. Object.defineProperty(exports, "TaggedTemplateExpression", {
  20764. enumerable: true,
  20765. get: function() {
  20766. return _index.taggedTemplateExpression;
  20767. }
  20768. });
  20769. Object.defineProperty(exports, "TemplateElement", {
  20770. enumerable: true,
  20771. get: function() {
  20772. return _index.templateElement;
  20773. }
  20774. });
  20775. Object.defineProperty(exports, "TemplateLiteral", {
  20776. enumerable: true,
  20777. get: function() {
  20778. return _index.templateLiteral;
  20779. }
  20780. });
  20781. Object.defineProperty(exports, "ThisExpression", {
  20782. enumerable: true,
  20783. get: function() {
  20784. return _index.thisExpression;
  20785. }
  20786. });
  20787. Object.defineProperty(exports, "ThisTypeAnnotation", {
  20788. enumerable: true,
  20789. get: function() {
  20790. return _index.thisTypeAnnotation;
  20791. }
  20792. });
  20793. Object.defineProperty(exports, "ThrowStatement", {
  20794. enumerable: true,
  20795. get: function() {
  20796. return _index.throwStatement;
  20797. }
  20798. });
  20799. Object.defineProperty(exports, "TopicReference", {
  20800. enumerable: true,
  20801. get: function() {
  20802. return _index.topicReference;
  20803. }
  20804. });
  20805. Object.defineProperty(exports, "TryStatement", {
  20806. enumerable: true,
  20807. get: function() {
  20808. return _index.tryStatement;
  20809. }
  20810. });
  20811. Object.defineProperty(exports, "TupleExpression", {
  20812. enumerable: true,
  20813. get: function() {
  20814. return _index.tupleExpression;
  20815. }
  20816. });
  20817. Object.defineProperty(exports, "TupleTypeAnnotation", {
  20818. enumerable: true,
  20819. get: function() {
  20820. return _index.tupleTypeAnnotation;
  20821. }
  20822. });
  20823. Object.defineProperty(exports, "TypeAlias", {
  20824. enumerable: true,
  20825. get: function() {
  20826. return _index.typeAlias;
  20827. }
  20828. });
  20829. Object.defineProperty(exports, "TypeAnnotation", {
  20830. enumerable: true,
  20831. get: function() {
  20832. return _index.typeAnnotation;
  20833. }
  20834. });
  20835. Object.defineProperty(exports, "TypeCastExpression", {
  20836. enumerable: true,
  20837. get: function() {
  20838. return _index.typeCastExpression;
  20839. }
  20840. });
  20841. Object.defineProperty(exports, "TypeParameter", {
  20842. enumerable: true,
  20843. get: function() {
  20844. return _index.typeParameter;
  20845. }
  20846. });
  20847. Object.defineProperty(exports, "TypeParameterDeclaration", {
  20848. enumerable: true,
  20849. get: function() {
  20850. return _index.typeParameterDeclaration;
  20851. }
  20852. });
  20853. Object.defineProperty(exports, "TypeParameterInstantiation", {
  20854. enumerable: true,
  20855. get: function() {
  20856. return _index.typeParameterInstantiation;
  20857. }
  20858. });
  20859. Object.defineProperty(exports, "TypeofTypeAnnotation", {
  20860. enumerable: true,
  20861. get: function() {
  20862. return _index.typeofTypeAnnotation;
  20863. }
  20864. });
  20865. Object.defineProperty(exports, "UnaryExpression", {
  20866. enumerable: true,
  20867. get: function() {
  20868. return _index.unaryExpression;
  20869. }
  20870. });
  20871. Object.defineProperty(exports, "UnionTypeAnnotation", {
  20872. enumerable: true,
  20873. get: function() {
  20874. return _index.unionTypeAnnotation;
  20875. }
  20876. });
  20877. Object.defineProperty(exports, "UpdateExpression", {
  20878. enumerable: true,
  20879. get: function() {
  20880. return _index.updateExpression;
  20881. }
  20882. });
  20883. Object.defineProperty(exports, "V8IntrinsicIdentifier", {
  20884. enumerable: true,
  20885. get: function() {
  20886. return _index.v8IntrinsicIdentifier;
  20887. }
  20888. });
  20889. Object.defineProperty(exports, "VariableDeclaration", {
  20890. enumerable: true,
  20891. get: function() {
  20892. return _index.variableDeclaration;
  20893. }
  20894. });
  20895. Object.defineProperty(exports, "VariableDeclarator", {
  20896. enumerable: true,
  20897. get: function() {
  20898. return _index.variableDeclarator;
  20899. }
  20900. });
  20901. Object.defineProperty(exports, "Variance", {
  20902. enumerable: true,
  20903. get: function() {
  20904. return _index.variance;
  20905. }
  20906. });
  20907. Object.defineProperty(exports, "VoidTypeAnnotation", {
  20908. enumerable: true,
  20909. get: function() {
  20910. return _index.voidTypeAnnotation;
  20911. }
  20912. });
  20913. Object.defineProperty(exports, "WhileStatement", {
  20914. enumerable: true,
  20915. get: function() {
  20916. return _index.whileStatement;
  20917. }
  20918. });
  20919. Object.defineProperty(exports, "WithStatement", {
  20920. enumerable: true,
  20921. get: function() {
  20922. return _index.withStatement;
  20923. }
  20924. });
  20925. Object.defineProperty(exports, "YieldExpression", {
  20926. enumerable: true,
  20927. get: function() {
  20928. return _index.yieldExpression;
  20929. }
  20930. });
  20931. var _index = require_generated2();
  20932. }
  20933. });
  20934. // node_modules/@babel/types/lib/clone/cloneNode.js
  20935. var require_cloneNode = __commonJS({
  20936. "node_modules/@babel/types/lib/clone/cloneNode.js"(exports) {
  20937. "use strict";
  20938. Object.defineProperty(exports, "__esModule", {
  20939. value: true
  20940. });
  20941. exports.default = cloneNode;
  20942. var _definitions = require_definitions();
  20943. var _generated = require_generated();
  20944. var has2 = Function.call.bind(Object.prototype.hasOwnProperty);
  20945. function cloneIfNode(obj, deep, withoutLoc, commentsCache) {
  20946. if (obj && typeof obj.type === "string") {
  20947. return cloneNodeInternal(obj, deep, withoutLoc, commentsCache);
  20948. }
  20949. return obj;
  20950. }
  20951. function cloneIfNodeOrArray(obj, deep, withoutLoc, commentsCache) {
  20952. if (Array.isArray(obj)) {
  20953. return obj.map((node2) => cloneIfNode(node2, deep, withoutLoc, commentsCache));
  20954. }
  20955. return cloneIfNode(obj, deep, withoutLoc, commentsCache);
  20956. }
  20957. function cloneNode(node2, deep = true, withoutLoc = false) {
  20958. return cloneNodeInternal(node2, deep, withoutLoc, /* @__PURE__ */ new Map());
  20959. }
  20960. function cloneNodeInternal(node2, deep = true, withoutLoc = false, commentsCache) {
  20961. if (!node2)
  20962. return node2;
  20963. const {
  20964. type
  20965. } = node2;
  20966. const newNode = {
  20967. type: node2.type
  20968. };
  20969. if ((0, _generated.isIdentifier)(node2)) {
  20970. newNode.name = node2.name;
  20971. if (has2(node2, "optional") && typeof node2.optional === "boolean") {
  20972. newNode.optional = node2.optional;
  20973. }
  20974. if (has2(node2, "typeAnnotation")) {
  20975. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node2.typeAnnotation, true, withoutLoc, commentsCache) : node2.typeAnnotation;
  20976. }
  20977. } else if (!has2(_definitions.NODE_FIELDS, type)) {
  20978. throw new Error(`Unknown node type: "${type}"`);
  20979. } else {
  20980. for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
  20981. if (has2(node2, field)) {
  20982. if (deep) {
  20983. newNode[field] = (0, _generated.isFile)(node2) && field === "comments" ? maybeCloneComments(node2.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node2[field], true, withoutLoc, commentsCache);
  20984. } else {
  20985. newNode[field] = node2[field];
  20986. }
  20987. }
  20988. }
  20989. }
  20990. if (has2(node2, "loc")) {
  20991. if (withoutLoc) {
  20992. newNode.loc = null;
  20993. } else {
  20994. newNode.loc = node2.loc;
  20995. }
  20996. }
  20997. if (has2(node2, "leadingComments")) {
  20998. newNode.leadingComments = maybeCloneComments(node2.leadingComments, deep, withoutLoc, commentsCache);
  20999. }
  21000. if (has2(node2, "innerComments")) {
  21001. newNode.innerComments = maybeCloneComments(node2.innerComments, deep, withoutLoc, commentsCache);
  21002. }
  21003. if (has2(node2, "trailingComments")) {
  21004. newNode.trailingComments = maybeCloneComments(node2.trailingComments, deep, withoutLoc, commentsCache);
  21005. }
  21006. if (has2(node2, "extra")) {
  21007. newNode.extra = Object.assign({}, node2.extra);
  21008. }
  21009. return newNode;
  21010. }
  21011. function maybeCloneComments(comments, deep, withoutLoc, commentsCache) {
  21012. if (!comments || !deep) {
  21013. return comments;
  21014. }
  21015. return comments.map((comment2) => {
  21016. const cache = commentsCache.get(comment2);
  21017. if (cache)
  21018. return cache;
  21019. const {
  21020. type,
  21021. value: value2,
  21022. loc
  21023. } = comment2;
  21024. const ret = {
  21025. type,
  21026. value: value2,
  21027. loc
  21028. };
  21029. if (withoutLoc) {
  21030. ret.loc = null;
  21031. }
  21032. commentsCache.set(comment2, ret);
  21033. return ret;
  21034. });
  21035. }
  21036. }
  21037. });
  21038. // node_modules/@babel/types/lib/clone/clone.js
  21039. var require_clone = __commonJS({
  21040. "node_modules/@babel/types/lib/clone/clone.js"(exports) {
  21041. "use strict";
  21042. Object.defineProperty(exports, "__esModule", {
  21043. value: true
  21044. });
  21045. exports.default = clone;
  21046. var _cloneNode = require_cloneNode();
  21047. function clone(node2) {
  21048. return (0, _cloneNode.default)(node2, false);
  21049. }
  21050. }
  21051. });
  21052. // node_modules/@babel/types/lib/clone/cloneDeep.js
  21053. var require_cloneDeep = __commonJS({
  21054. "node_modules/@babel/types/lib/clone/cloneDeep.js"(exports) {
  21055. "use strict";
  21056. Object.defineProperty(exports, "__esModule", {
  21057. value: true
  21058. });
  21059. exports.default = cloneDeep2;
  21060. var _cloneNode = require_cloneNode();
  21061. function cloneDeep2(node2) {
  21062. return (0, _cloneNode.default)(node2);
  21063. }
  21064. }
  21065. });
  21066. // node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
  21067. var require_cloneDeepWithoutLoc = __commonJS({
  21068. "node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports) {
  21069. "use strict";
  21070. Object.defineProperty(exports, "__esModule", {
  21071. value: true
  21072. });
  21073. exports.default = cloneDeepWithoutLoc;
  21074. var _cloneNode = require_cloneNode();
  21075. function cloneDeepWithoutLoc(node2) {
  21076. return (0, _cloneNode.default)(node2, true, true);
  21077. }
  21078. }
  21079. });
  21080. // node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
  21081. var require_cloneWithoutLoc = __commonJS({
  21082. "node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports) {
  21083. "use strict";
  21084. Object.defineProperty(exports, "__esModule", {
  21085. value: true
  21086. });
  21087. exports.default = cloneWithoutLoc;
  21088. var _cloneNode = require_cloneNode();
  21089. function cloneWithoutLoc(node2) {
  21090. return (0, _cloneNode.default)(node2, false, true);
  21091. }
  21092. }
  21093. });
  21094. // node_modules/@babel/types/lib/comments/addComments.js
  21095. var require_addComments = __commonJS({
  21096. "node_modules/@babel/types/lib/comments/addComments.js"(exports) {
  21097. "use strict";
  21098. Object.defineProperty(exports, "__esModule", {
  21099. value: true
  21100. });
  21101. exports.default = addComments;
  21102. function addComments(node2, type, comments) {
  21103. if (!comments || !node2)
  21104. return node2;
  21105. const key2 = `${type}Comments`;
  21106. if (node2[key2]) {
  21107. if (type === "leading") {
  21108. node2[key2] = comments.concat(node2[key2]);
  21109. } else {
  21110. node2[key2].push(...comments);
  21111. }
  21112. } else {
  21113. node2[key2] = comments;
  21114. }
  21115. return node2;
  21116. }
  21117. }
  21118. });
  21119. // node_modules/@babel/types/lib/comments/addComment.js
  21120. var require_addComment = __commonJS({
  21121. "node_modules/@babel/types/lib/comments/addComment.js"(exports) {
  21122. "use strict";
  21123. Object.defineProperty(exports, "__esModule", {
  21124. value: true
  21125. });
  21126. exports.default = addComment;
  21127. var _addComments = require_addComments();
  21128. function addComment(node2, type, content3, line2) {
  21129. return (0, _addComments.default)(node2, type, [{
  21130. type: line2 ? "CommentLine" : "CommentBlock",
  21131. value: content3
  21132. }]);
  21133. }
  21134. }
  21135. });
  21136. // node_modules/@babel/types/lib/utils/inherit.js
  21137. var require_inherit = __commonJS({
  21138. "node_modules/@babel/types/lib/utils/inherit.js"(exports) {
  21139. "use strict";
  21140. Object.defineProperty(exports, "__esModule", {
  21141. value: true
  21142. });
  21143. exports.default = inherit2;
  21144. function inherit2(key2, child, parent) {
  21145. if (child && parent) {
  21146. child[key2] = Array.from(new Set([].concat(child[key2], parent[key2]).filter(Boolean)));
  21147. }
  21148. }
  21149. }
  21150. });
  21151. // node_modules/@babel/types/lib/comments/inheritInnerComments.js
  21152. var require_inheritInnerComments = __commonJS({
  21153. "node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports) {
  21154. "use strict";
  21155. Object.defineProperty(exports, "__esModule", {
  21156. value: true
  21157. });
  21158. exports.default = inheritInnerComments;
  21159. var _inherit = require_inherit();
  21160. function inheritInnerComments(child, parent) {
  21161. (0, _inherit.default)("innerComments", child, parent);
  21162. }
  21163. }
  21164. });
  21165. // node_modules/@babel/types/lib/comments/inheritLeadingComments.js
  21166. var require_inheritLeadingComments = __commonJS({
  21167. "node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports) {
  21168. "use strict";
  21169. Object.defineProperty(exports, "__esModule", {
  21170. value: true
  21171. });
  21172. exports.default = inheritLeadingComments;
  21173. var _inherit = require_inherit();
  21174. function inheritLeadingComments(child, parent) {
  21175. (0, _inherit.default)("leadingComments", child, parent);
  21176. }
  21177. }
  21178. });
  21179. // node_modules/@babel/types/lib/comments/inheritTrailingComments.js
  21180. var require_inheritTrailingComments = __commonJS({
  21181. "node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports) {
  21182. "use strict";
  21183. Object.defineProperty(exports, "__esModule", {
  21184. value: true
  21185. });
  21186. exports.default = inheritTrailingComments;
  21187. var _inherit = require_inherit();
  21188. function inheritTrailingComments(child, parent) {
  21189. (0, _inherit.default)("trailingComments", child, parent);
  21190. }
  21191. }
  21192. });
  21193. // node_modules/@babel/types/lib/comments/inheritsComments.js
  21194. var require_inheritsComments = __commonJS({
  21195. "node_modules/@babel/types/lib/comments/inheritsComments.js"(exports) {
  21196. "use strict";
  21197. Object.defineProperty(exports, "__esModule", {
  21198. value: true
  21199. });
  21200. exports.default = inheritsComments;
  21201. var _inheritTrailingComments = require_inheritTrailingComments();
  21202. var _inheritLeadingComments = require_inheritLeadingComments();
  21203. var _inheritInnerComments = require_inheritInnerComments();
  21204. function inheritsComments(child, parent) {
  21205. (0, _inheritTrailingComments.default)(child, parent);
  21206. (0, _inheritLeadingComments.default)(child, parent);
  21207. (0, _inheritInnerComments.default)(child, parent);
  21208. return child;
  21209. }
  21210. }
  21211. });
  21212. // node_modules/@babel/types/lib/comments/removeComments.js
  21213. var require_removeComments = __commonJS({
  21214. "node_modules/@babel/types/lib/comments/removeComments.js"(exports) {
  21215. "use strict";
  21216. Object.defineProperty(exports, "__esModule", {
  21217. value: true
  21218. });
  21219. exports.default = removeComments;
  21220. var _constants = require_constants();
  21221. function removeComments(node2) {
  21222. _constants.COMMENT_KEYS.forEach((key2) => {
  21223. node2[key2] = null;
  21224. });
  21225. return node2;
  21226. }
  21227. }
  21228. });
  21229. // node_modules/@babel/types/lib/constants/generated/index.js
  21230. var require_generated4 = __commonJS({
  21231. "node_modules/@babel/types/lib/constants/generated/index.js"(exports) {
  21232. "use strict";
  21233. Object.defineProperty(exports, "__esModule", {
  21234. value: true
  21235. });
  21236. exports.WHILE_TYPES = exports.USERWHITESPACABLE_TYPES = exports.UNARYLIKE_TYPES = exports.TYPESCRIPT_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.TSENTITYNAME_TYPES = exports.TSBASETYPE_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.STANDARDIZED_TYPES = exports.SCOPABLE_TYPES = exports.PUREISH_TYPES = exports.PROPERTY_TYPES = exports.PRIVATE_TYPES = exports.PATTERN_TYPES = exports.PATTERNLIKE_TYPES = exports.OBJECTMEMBER_TYPES = exports.MODULESPECIFIER_TYPES = exports.MODULEDECLARATION_TYPES = exports.MISCELLANEOUS_TYPES = exports.METHOD_TYPES = exports.LVAL_TYPES = exports.LOOP_TYPES = exports.LITERAL_TYPES = exports.JSX_TYPES = exports.IMPORTOREXPORTDECLARATION_TYPES = exports.IMMUTABLE_TYPES = exports.FUNCTION_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FOR_TYPES = exports.FORXSTATEMENT_TYPES = exports.FLOW_TYPES = exports.FLOWTYPE_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.EXPRESSION_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.DECLARATION_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.CLASS_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.BINARY_TYPES = exports.ACCESSOR_TYPES = void 0;
  21237. var _definitions = require_definitions();
  21238. var STANDARDIZED_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Standardized"];
  21239. exports.STANDARDIZED_TYPES = STANDARDIZED_TYPES;
  21240. var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
  21241. exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
  21242. var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
  21243. exports.BINARY_TYPES = BINARY_TYPES;
  21244. var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
  21245. exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
  21246. var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
  21247. exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
  21248. var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
  21249. exports.BLOCK_TYPES = BLOCK_TYPES;
  21250. var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
  21251. exports.STATEMENT_TYPES = STATEMENT_TYPES;
  21252. var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
  21253. exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
  21254. var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
  21255. exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
  21256. var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
  21257. exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
  21258. var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
  21259. exports.LOOP_TYPES = LOOP_TYPES;
  21260. var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
  21261. exports.WHILE_TYPES = WHILE_TYPES;
  21262. var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  21263. exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
  21264. var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
  21265. exports.FOR_TYPES = FOR_TYPES;
  21266. var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
  21267. exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
  21268. var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
  21269. exports.FUNCTION_TYPES = FUNCTION_TYPES;
  21270. var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
  21271. exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
  21272. var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
  21273. exports.PUREISH_TYPES = PUREISH_TYPES;
  21274. var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
  21275. exports.DECLARATION_TYPES = DECLARATION_TYPES;
  21276. var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
  21277. exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
  21278. var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
  21279. exports.LVAL_TYPES = LVAL_TYPES;
  21280. var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
  21281. exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
  21282. var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
  21283. exports.LITERAL_TYPES = LITERAL_TYPES;
  21284. var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
  21285. exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
  21286. var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  21287. exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
  21288. var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
  21289. exports.METHOD_TYPES = METHOD_TYPES;
  21290. var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
  21291. exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
  21292. var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
  21293. exports.PROPERTY_TYPES = PROPERTY_TYPES;
  21294. var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
  21295. exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
  21296. var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
  21297. exports.PATTERN_TYPES = PATTERN_TYPES;
  21298. var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
  21299. exports.CLASS_TYPES = CLASS_TYPES;
  21300. var IMPORTOREXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ImportOrExportDeclaration"];
  21301. exports.IMPORTOREXPORTDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES;
  21302. var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  21303. exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
  21304. var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  21305. exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
  21306. var ACCESSOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Accessor"];
  21307. exports.ACCESSOR_TYPES = ACCESSOR_TYPES;
  21308. var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
  21309. exports.PRIVATE_TYPES = PRIVATE_TYPES;
  21310. var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
  21311. exports.FLOW_TYPES = FLOW_TYPES;
  21312. var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
  21313. exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
  21314. var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  21315. exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
  21316. var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  21317. exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
  21318. var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
  21319. exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
  21320. var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
  21321. exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
  21322. var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
  21323. exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
  21324. var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
  21325. exports.JSX_TYPES = JSX_TYPES;
  21326. var MISCELLANEOUS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Miscellaneous"];
  21327. exports.MISCELLANEOUS_TYPES = MISCELLANEOUS_TYPES;
  21328. var TYPESCRIPT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TypeScript"];
  21329. exports.TYPESCRIPT_TYPES = TYPESCRIPT_TYPES;
  21330. var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
  21331. exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
  21332. var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
  21333. exports.TSTYPE_TYPES = TSTYPE_TYPES;
  21334. var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
  21335. exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
  21336. var MODULEDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES;
  21337. exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
  21338. }
  21339. });
  21340. // node_modules/@babel/types/lib/converters/toBlock.js
  21341. var require_toBlock = __commonJS({
  21342. "node_modules/@babel/types/lib/converters/toBlock.js"(exports) {
  21343. "use strict";
  21344. Object.defineProperty(exports, "__esModule", {
  21345. value: true
  21346. });
  21347. exports.default = toBlock;
  21348. var _generated = require_generated();
  21349. var _generated2 = require_generated2();
  21350. function toBlock(node2, parent) {
  21351. if ((0, _generated.isBlockStatement)(node2)) {
  21352. return node2;
  21353. }
  21354. let blockNodes = [];
  21355. if ((0, _generated.isEmptyStatement)(node2)) {
  21356. blockNodes = [];
  21357. } else {
  21358. if (!(0, _generated.isStatement)(node2)) {
  21359. if ((0, _generated.isFunction)(parent)) {
  21360. node2 = (0, _generated2.returnStatement)(node2);
  21361. } else {
  21362. node2 = (0, _generated2.expressionStatement)(node2);
  21363. }
  21364. }
  21365. blockNodes = [node2];
  21366. }
  21367. return (0, _generated2.blockStatement)(blockNodes);
  21368. }
  21369. }
  21370. });
  21371. // node_modules/@babel/types/lib/converters/ensureBlock.js
  21372. var require_ensureBlock = __commonJS({
  21373. "node_modules/@babel/types/lib/converters/ensureBlock.js"(exports) {
  21374. "use strict";
  21375. Object.defineProperty(exports, "__esModule", {
  21376. value: true
  21377. });
  21378. exports.default = ensureBlock;
  21379. var _toBlock = require_toBlock();
  21380. function ensureBlock(node2, key2 = "body") {
  21381. const result = (0, _toBlock.default)(node2[key2], node2);
  21382. node2[key2] = result;
  21383. return result;
  21384. }
  21385. }
  21386. });
  21387. // node_modules/@babel/types/lib/converters/toIdentifier.js
  21388. var require_toIdentifier = __commonJS({
  21389. "node_modules/@babel/types/lib/converters/toIdentifier.js"(exports) {
  21390. "use strict";
  21391. Object.defineProperty(exports, "__esModule", {
  21392. value: true
  21393. });
  21394. exports.default = toIdentifier2;
  21395. var _isValidIdentifier = require_isValidIdentifier();
  21396. var _helperValidatorIdentifier = require_lib();
  21397. function toIdentifier2(input) {
  21398. input = input + "";
  21399. let name2 = "";
  21400. for (const c2 of input) {
  21401. name2 += (0, _helperValidatorIdentifier.isIdentifierChar)(c2.codePointAt(0)) ? c2 : "-";
  21402. }
  21403. name2 = name2.replace(/^[-0-9]+/, "");
  21404. name2 = name2.replace(/[-\s]+(.)?/g, function(match, c2) {
  21405. return c2 ? c2.toUpperCase() : "";
  21406. });
  21407. if (!(0, _isValidIdentifier.default)(name2)) {
  21408. name2 = `_${name2}`;
  21409. }
  21410. return name2 || "_";
  21411. }
  21412. }
  21413. });
  21414. // node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
  21415. var require_toBindingIdentifierName = __commonJS({
  21416. "node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports) {
  21417. "use strict";
  21418. Object.defineProperty(exports, "__esModule", {
  21419. value: true
  21420. });
  21421. exports.default = toBindingIdentifierName;
  21422. var _toIdentifier = require_toIdentifier();
  21423. function toBindingIdentifierName(name2) {
  21424. name2 = (0, _toIdentifier.default)(name2);
  21425. if (name2 === "eval" || name2 === "arguments")
  21426. name2 = "_" + name2;
  21427. return name2;
  21428. }
  21429. }
  21430. });
  21431. // node_modules/@babel/types/lib/converters/toComputedKey.js
  21432. var require_toComputedKey = __commonJS({
  21433. "node_modules/@babel/types/lib/converters/toComputedKey.js"(exports) {
  21434. "use strict";
  21435. Object.defineProperty(exports, "__esModule", {
  21436. value: true
  21437. });
  21438. exports.default = toComputedKey;
  21439. var _generated = require_generated();
  21440. var _generated2 = require_generated2();
  21441. function toComputedKey(node2, key2 = node2.key || node2.property) {
  21442. if (!node2.computed && (0, _generated.isIdentifier)(key2))
  21443. key2 = (0, _generated2.stringLiteral)(key2.name);
  21444. return key2;
  21445. }
  21446. }
  21447. });
  21448. // node_modules/@babel/types/lib/converters/toExpression.js
  21449. var require_toExpression = __commonJS({
  21450. "node_modules/@babel/types/lib/converters/toExpression.js"(exports) {
  21451. "use strict";
  21452. Object.defineProperty(exports, "__esModule", {
  21453. value: true
  21454. });
  21455. exports.default = void 0;
  21456. var _generated = require_generated();
  21457. var _default = toExpression;
  21458. exports.default = _default;
  21459. function toExpression(node2) {
  21460. if ((0, _generated.isExpressionStatement)(node2)) {
  21461. node2 = node2.expression;
  21462. }
  21463. if ((0, _generated.isExpression)(node2)) {
  21464. return node2;
  21465. }
  21466. if ((0, _generated.isClass)(node2)) {
  21467. node2.type = "ClassExpression";
  21468. } else if ((0, _generated.isFunction)(node2)) {
  21469. node2.type = "FunctionExpression";
  21470. }
  21471. if (!(0, _generated.isExpression)(node2)) {
  21472. throw new Error(`cannot turn ${node2.type} to an expression`);
  21473. }
  21474. return node2;
  21475. }
  21476. }
  21477. });
  21478. // node_modules/@babel/types/lib/traverse/traverseFast.js
  21479. var require_traverseFast = __commonJS({
  21480. "node_modules/@babel/types/lib/traverse/traverseFast.js"(exports) {
  21481. "use strict";
  21482. Object.defineProperty(exports, "__esModule", {
  21483. value: true
  21484. });
  21485. exports.default = traverseFast;
  21486. var _definitions = require_definitions();
  21487. function traverseFast(node2, enter, opts) {
  21488. if (!node2)
  21489. return;
  21490. const keys2 = _definitions.VISITOR_KEYS[node2.type];
  21491. if (!keys2)
  21492. return;
  21493. opts = opts || {};
  21494. enter(node2, opts);
  21495. for (const key2 of keys2) {
  21496. const subNode = node2[key2];
  21497. if (Array.isArray(subNode)) {
  21498. for (const node3 of subNode) {
  21499. traverseFast(node3, enter, opts);
  21500. }
  21501. } else {
  21502. traverseFast(subNode, enter, opts);
  21503. }
  21504. }
  21505. }
  21506. }
  21507. });
  21508. // node_modules/@babel/types/lib/modifications/removeProperties.js
  21509. var require_removeProperties = __commonJS({
  21510. "node_modules/@babel/types/lib/modifications/removeProperties.js"(exports) {
  21511. "use strict";
  21512. Object.defineProperty(exports, "__esModule", {
  21513. value: true
  21514. });
  21515. exports.default = removeProperties;
  21516. var _constants = require_constants();
  21517. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  21518. var CLEAR_KEYS_PLUS_COMMENTS = [..._constants.COMMENT_KEYS, "comments", ...CLEAR_KEYS];
  21519. function removeProperties(node2, opts = {}) {
  21520. const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  21521. for (const key2 of map) {
  21522. if (node2[key2] != null)
  21523. node2[key2] = void 0;
  21524. }
  21525. for (const key2 of Object.keys(node2)) {
  21526. if (key2[0] === "_" && node2[key2] != null)
  21527. node2[key2] = void 0;
  21528. }
  21529. const symbols = Object.getOwnPropertySymbols(node2);
  21530. for (const sym of symbols) {
  21531. node2[sym] = null;
  21532. }
  21533. }
  21534. }
  21535. });
  21536. // node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
  21537. var require_removePropertiesDeep = __commonJS({
  21538. "node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports) {
  21539. "use strict";
  21540. Object.defineProperty(exports, "__esModule", {
  21541. value: true
  21542. });
  21543. exports.default = removePropertiesDeep;
  21544. var _traverseFast = require_traverseFast();
  21545. var _removeProperties = require_removeProperties();
  21546. function removePropertiesDeep(tree, opts) {
  21547. (0, _traverseFast.default)(tree, _removeProperties.default, opts);
  21548. return tree;
  21549. }
  21550. }
  21551. });
  21552. // node_modules/@babel/types/lib/converters/toKeyAlias.js
  21553. var require_toKeyAlias = __commonJS({
  21554. "node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports) {
  21555. "use strict";
  21556. Object.defineProperty(exports, "__esModule", {
  21557. value: true
  21558. });
  21559. exports.default = toKeyAlias;
  21560. var _generated = require_generated();
  21561. var _cloneNode = require_cloneNode();
  21562. var _removePropertiesDeep = require_removePropertiesDeep();
  21563. function toKeyAlias(node2, key2 = node2.key) {
  21564. let alias;
  21565. if (node2.kind === "method") {
  21566. return toKeyAlias.increment() + "";
  21567. } else if ((0, _generated.isIdentifier)(key2)) {
  21568. alias = key2.name;
  21569. } else if ((0, _generated.isStringLiteral)(key2)) {
  21570. alias = JSON.stringify(key2.value);
  21571. } else {
  21572. alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key2)));
  21573. }
  21574. if (node2.computed) {
  21575. alias = `[${alias}]`;
  21576. }
  21577. if (node2.static) {
  21578. alias = `static:${alias}`;
  21579. }
  21580. return alias;
  21581. }
  21582. toKeyAlias.uid = 0;
  21583. toKeyAlias.increment = function() {
  21584. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  21585. return toKeyAlias.uid = 0;
  21586. } else {
  21587. return toKeyAlias.uid++;
  21588. }
  21589. };
  21590. }
  21591. });
  21592. // node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
  21593. var require_getBindingIdentifiers = __commonJS({
  21594. "node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports) {
  21595. "use strict";
  21596. Object.defineProperty(exports, "__esModule", {
  21597. value: true
  21598. });
  21599. exports.default = getBindingIdentifiers;
  21600. var _generated = require_generated();
  21601. function getBindingIdentifiers(node2, duplicates, outerOnly) {
  21602. const search2 = [].concat(node2);
  21603. const ids = /* @__PURE__ */ Object.create(null);
  21604. while (search2.length) {
  21605. const id = search2.shift();
  21606. if (!id)
  21607. continue;
  21608. const keys2 = getBindingIdentifiers.keys[id.type];
  21609. if ((0, _generated.isIdentifier)(id)) {
  21610. if (duplicates) {
  21611. const _ids = ids[id.name] = ids[id.name] || [];
  21612. _ids.push(id);
  21613. } else {
  21614. ids[id.name] = id;
  21615. }
  21616. continue;
  21617. }
  21618. if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
  21619. if ((0, _generated.isDeclaration)(id.declaration)) {
  21620. search2.push(id.declaration);
  21621. }
  21622. continue;
  21623. }
  21624. if (outerOnly) {
  21625. if ((0, _generated.isFunctionDeclaration)(id)) {
  21626. search2.push(id.id);
  21627. continue;
  21628. }
  21629. if ((0, _generated.isFunctionExpression)(id)) {
  21630. continue;
  21631. }
  21632. }
  21633. if (keys2) {
  21634. for (let i = 0; i < keys2.length; i++) {
  21635. const key2 = keys2[i];
  21636. const nodes = id[key2];
  21637. if (nodes) {
  21638. Array.isArray(nodes) ? search2.push(...nodes) : search2.push(nodes);
  21639. }
  21640. }
  21641. }
  21642. }
  21643. return ids;
  21644. }
  21645. getBindingIdentifiers.keys = {
  21646. DeclareClass: ["id"],
  21647. DeclareFunction: ["id"],
  21648. DeclareModule: ["id"],
  21649. DeclareVariable: ["id"],
  21650. DeclareInterface: ["id"],
  21651. DeclareTypeAlias: ["id"],
  21652. DeclareOpaqueType: ["id"],
  21653. InterfaceDeclaration: ["id"],
  21654. TypeAlias: ["id"],
  21655. OpaqueType: ["id"],
  21656. CatchClause: ["param"],
  21657. LabeledStatement: ["label"],
  21658. UnaryExpression: ["argument"],
  21659. AssignmentExpression: ["left"],
  21660. ImportSpecifier: ["local"],
  21661. ImportNamespaceSpecifier: ["local"],
  21662. ImportDefaultSpecifier: ["local"],
  21663. ImportDeclaration: ["specifiers"],
  21664. ExportSpecifier: ["exported"],
  21665. ExportNamespaceSpecifier: ["exported"],
  21666. ExportDefaultSpecifier: ["exported"],
  21667. FunctionDeclaration: ["id", "params"],
  21668. FunctionExpression: ["id", "params"],
  21669. ArrowFunctionExpression: ["params"],
  21670. ObjectMethod: ["params"],
  21671. ClassMethod: ["params"],
  21672. ClassPrivateMethod: ["params"],
  21673. ForInStatement: ["left"],
  21674. ForOfStatement: ["left"],
  21675. ClassDeclaration: ["id"],
  21676. ClassExpression: ["id"],
  21677. RestElement: ["argument"],
  21678. UpdateExpression: ["argument"],
  21679. ObjectProperty: ["value"],
  21680. AssignmentPattern: ["left"],
  21681. ArrayPattern: ["elements"],
  21682. ObjectPattern: ["properties"],
  21683. VariableDeclaration: ["declarations"],
  21684. VariableDeclarator: ["id"]
  21685. };
  21686. }
  21687. });
  21688. // node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
  21689. var require_gatherSequenceExpressions = __commonJS({
  21690. "node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports) {
  21691. "use strict";
  21692. Object.defineProperty(exports, "__esModule", {
  21693. value: true
  21694. });
  21695. exports.default = gatherSequenceExpressions;
  21696. var _getBindingIdentifiers = require_getBindingIdentifiers();
  21697. var _generated = require_generated();
  21698. var _generated2 = require_generated2();
  21699. var _cloneNode = require_cloneNode();
  21700. function gatherSequenceExpressions(nodes, scope, declars) {
  21701. const exprs = [];
  21702. let ensureLastUndefined = true;
  21703. for (const node2 of nodes) {
  21704. if (!(0, _generated.isEmptyStatement)(node2)) {
  21705. ensureLastUndefined = false;
  21706. }
  21707. if ((0, _generated.isExpression)(node2)) {
  21708. exprs.push(node2);
  21709. } else if ((0, _generated.isExpressionStatement)(node2)) {
  21710. exprs.push(node2.expression);
  21711. } else if ((0, _generated.isVariableDeclaration)(node2)) {
  21712. if (node2.kind !== "var")
  21713. return;
  21714. for (const declar of node2.declarations) {
  21715. const bindings = (0, _getBindingIdentifiers.default)(declar);
  21716. for (const key2 of Object.keys(bindings)) {
  21717. declars.push({
  21718. kind: node2.kind,
  21719. id: (0, _cloneNode.default)(bindings[key2])
  21720. });
  21721. }
  21722. if (declar.init) {
  21723. exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
  21724. }
  21725. }
  21726. ensureLastUndefined = true;
  21727. } else if ((0, _generated.isIfStatement)(node2)) {
  21728. const consequent = node2.consequent ? gatherSequenceExpressions([node2.consequent], scope, declars) : scope.buildUndefinedNode();
  21729. const alternate = node2.alternate ? gatherSequenceExpressions([node2.alternate], scope, declars) : scope.buildUndefinedNode();
  21730. if (!consequent || !alternate)
  21731. return;
  21732. exprs.push((0, _generated2.conditionalExpression)(node2.test, consequent, alternate));
  21733. } else if ((0, _generated.isBlockStatement)(node2)) {
  21734. const body = gatherSequenceExpressions(node2.body, scope, declars);
  21735. if (!body)
  21736. return;
  21737. exprs.push(body);
  21738. } else if ((0, _generated.isEmptyStatement)(node2)) {
  21739. if (nodes.indexOf(node2) === 0) {
  21740. ensureLastUndefined = true;
  21741. }
  21742. } else {
  21743. return;
  21744. }
  21745. }
  21746. if (ensureLastUndefined) {
  21747. exprs.push(scope.buildUndefinedNode());
  21748. }
  21749. if (exprs.length === 1) {
  21750. return exprs[0];
  21751. } else {
  21752. return (0, _generated2.sequenceExpression)(exprs);
  21753. }
  21754. }
  21755. }
  21756. });
  21757. // node_modules/@babel/types/lib/converters/toSequenceExpression.js
  21758. var require_toSequenceExpression = __commonJS({
  21759. "node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports) {
  21760. "use strict";
  21761. Object.defineProperty(exports, "__esModule", {
  21762. value: true
  21763. });
  21764. exports.default = toSequenceExpression;
  21765. var _gatherSequenceExpressions = require_gatherSequenceExpressions();
  21766. function toSequenceExpression(nodes, scope) {
  21767. if (!(nodes != null && nodes.length))
  21768. return;
  21769. const declars = [];
  21770. const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
  21771. if (!result)
  21772. return;
  21773. for (const declar of declars) {
  21774. scope.push(declar);
  21775. }
  21776. return result;
  21777. }
  21778. }
  21779. });
  21780. // node_modules/@babel/types/lib/converters/toStatement.js
  21781. var require_toStatement = __commonJS({
  21782. "node_modules/@babel/types/lib/converters/toStatement.js"(exports) {
  21783. "use strict";
  21784. Object.defineProperty(exports, "__esModule", {
  21785. value: true
  21786. });
  21787. exports.default = void 0;
  21788. var _generated = require_generated();
  21789. var _generated2 = require_generated2();
  21790. var _default = toStatement;
  21791. exports.default = _default;
  21792. function toStatement(node2, ignore3) {
  21793. if ((0, _generated.isStatement)(node2)) {
  21794. return node2;
  21795. }
  21796. let mustHaveId = false;
  21797. let newType;
  21798. if ((0, _generated.isClass)(node2)) {
  21799. mustHaveId = true;
  21800. newType = "ClassDeclaration";
  21801. } else if ((0, _generated.isFunction)(node2)) {
  21802. mustHaveId = true;
  21803. newType = "FunctionDeclaration";
  21804. } else if ((0, _generated.isAssignmentExpression)(node2)) {
  21805. return (0, _generated2.expressionStatement)(node2);
  21806. }
  21807. if (mustHaveId && !node2.id) {
  21808. newType = false;
  21809. }
  21810. if (!newType) {
  21811. if (ignore3) {
  21812. return false;
  21813. } else {
  21814. throw new Error(`cannot turn ${node2.type} to a statement`);
  21815. }
  21816. }
  21817. node2.type = newType;
  21818. return node2;
  21819. }
  21820. }
  21821. });
  21822. // node_modules/@babel/types/lib/converters/valueToNode.js
  21823. var require_valueToNode = __commonJS({
  21824. "node_modules/@babel/types/lib/converters/valueToNode.js"(exports) {
  21825. "use strict";
  21826. Object.defineProperty(exports, "__esModule", {
  21827. value: true
  21828. });
  21829. exports.default = void 0;
  21830. var _isValidIdentifier = require_isValidIdentifier();
  21831. var _generated = require_generated2();
  21832. var _default = valueToNode;
  21833. exports.default = _default;
  21834. var objectToString = Function.call.bind(Object.prototype.toString);
  21835. function isRegExp(value2) {
  21836. return objectToString(value2) === "[object RegExp]";
  21837. }
  21838. function isPlainObject2(value2) {
  21839. if (typeof value2 !== "object" || value2 === null || Object.prototype.toString.call(value2) !== "[object Object]") {
  21840. return false;
  21841. }
  21842. const proto = Object.getPrototypeOf(value2);
  21843. return proto === null || Object.getPrototypeOf(proto) === null;
  21844. }
  21845. function valueToNode(value2) {
  21846. if (value2 === void 0) {
  21847. return (0, _generated.identifier)("undefined");
  21848. }
  21849. if (value2 === true || value2 === false) {
  21850. return (0, _generated.booleanLiteral)(value2);
  21851. }
  21852. if (value2 === null) {
  21853. return (0, _generated.nullLiteral)();
  21854. }
  21855. if (typeof value2 === "string") {
  21856. return (0, _generated.stringLiteral)(value2);
  21857. }
  21858. if (typeof value2 === "number") {
  21859. let result;
  21860. if (Number.isFinite(value2)) {
  21861. result = (0, _generated.numericLiteral)(Math.abs(value2));
  21862. } else {
  21863. let numerator;
  21864. if (Number.isNaN(value2)) {
  21865. numerator = (0, _generated.numericLiteral)(0);
  21866. } else {
  21867. numerator = (0, _generated.numericLiteral)(1);
  21868. }
  21869. result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
  21870. }
  21871. if (value2 < 0 || Object.is(value2, -0)) {
  21872. result = (0, _generated.unaryExpression)("-", result);
  21873. }
  21874. return result;
  21875. }
  21876. if (isRegExp(value2)) {
  21877. const pattern = value2.source;
  21878. const flags = value2.toString().match(/\/([a-z]+|)$/)[1];
  21879. return (0, _generated.regExpLiteral)(pattern, flags);
  21880. }
  21881. if (Array.isArray(value2)) {
  21882. return (0, _generated.arrayExpression)(value2.map(valueToNode));
  21883. }
  21884. if (isPlainObject2(value2)) {
  21885. const props = [];
  21886. for (const key2 of Object.keys(value2)) {
  21887. let nodeKey;
  21888. if ((0, _isValidIdentifier.default)(key2)) {
  21889. nodeKey = (0, _generated.identifier)(key2);
  21890. } else {
  21891. nodeKey = (0, _generated.stringLiteral)(key2);
  21892. }
  21893. props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value2[key2])));
  21894. }
  21895. return (0, _generated.objectExpression)(props);
  21896. }
  21897. throw new Error("don't know how to turn this value into a node");
  21898. }
  21899. }
  21900. });
  21901. // node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
  21902. var require_appendToMemberExpression = __commonJS({
  21903. "node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports) {
  21904. "use strict";
  21905. Object.defineProperty(exports, "__esModule", {
  21906. value: true
  21907. });
  21908. exports.default = appendToMemberExpression;
  21909. var _generated = require_generated2();
  21910. function appendToMemberExpression(member, append, computed = false) {
  21911. member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
  21912. member.property = append;
  21913. member.computed = !!computed;
  21914. return member;
  21915. }
  21916. }
  21917. });
  21918. // node_modules/@babel/types/lib/modifications/inherits.js
  21919. var require_inherits = __commonJS({
  21920. "node_modules/@babel/types/lib/modifications/inherits.js"(exports) {
  21921. "use strict";
  21922. Object.defineProperty(exports, "__esModule", {
  21923. value: true
  21924. });
  21925. exports.default = inherits;
  21926. var _constants = require_constants();
  21927. var _inheritsComments = require_inheritsComments();
  21928. function inherits(child, parent) {
  21929. if (!child || !parent)
  21930. return child;
  21931. for (const key2 of _constants.INHERIT_KEYS.optional) {
  21932. if (child[key2] == null) {
  21933. child[key2] = parent[key2];
  21934. }
  21935. }
  21936. for (const key2 of Object.keys(parent)) {
  21937. if (key2[0] === "_" && key2 !== "__clone") {
  21938. child[key2] = parent[key2];
  21939. }
  21940. }
  21941. for (const key2 of _constants.INHERIT_KEYS.force) {
  21942. child[key2] = parent[key2];
  21943. }
  21944. (0, _inheritsComments.default)(child, parent);
  21945. return child;
  21946. }
  21947. }
  21948. });
  21949. // node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
  21950. var require_prependToMemberExpression = __commonJS({
  21951. "node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports) {
  21952. "use strict";
  21953. Object.defineProperty(exports, "__esModule", {
  21954. value: true
  21955. });
  21956. exports.default = prependToMemberExpression;
  21957. var _generated = require_generated2();
  21958. var _ = require_lib3();
  21959. function prependToMemberExpression(member, prepend) {
  21960. if ((0, _.isSuper)(member.object)) {
  21961. throw new Error("Cannot prepend node to super property access (`super.foo`).");
  21962. }
  21963. member.object = (0, _generated.memberExpression)(prepend, member.object);
  21964. return member;
  21965. }
  21966. }
  21967. });
  21968. // node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
  21969. var require_getOuterBindingIdentifiers = __commonJS({
  21970. "node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports) {
  21971. "use strict";
  21972. Object.defineProperty(exports, "__esModule", {
  21973. value: true
  21974. });
  21975. exports.default = void 0;
  21976. var _getBindingIdentifiers = require_getBindingIdentifiers();
  21977. var _default = getOuterBindingIdentifiers;
  21978. exports.default = _default;
  21979. function getOuterBindingIdentifiers(node2, duplicates) {
  21980. return (0, _getBindingIdentifiers.default)(node2, duplicates, true);
  21981. }
  21982. }
  21983. });
  21984. // node_modules/@babel/types/lib/traverse/traverse.js
  21985. var require_traverse = __commonJS({
  21986. "node_modules/@babel/types/lib/traverse/traverse.js"(exports) {
  21987. "use strict";
  21988. Object.defineProperty(exports, "__esModule", {
  21989. value: true
  21990. });
  21991. exports.default = traverse;
  21992. var _definitions = require_definitions();
  21993. function traverse(node2, handlers3, state) {
  21994. if (typeof handlers3 === "function") {
  21995. handlers3 = {
  21996. enter: handlers3
  21997. };
  21998. }
  21999. const {
  22000. enter,
  22001. exit: exit2
  22002. } = handlers3;
  22003. traverseSimpleImpl(node2, enter, exit2, state, []);
  22004. }
  22005. function traverseSimpleImpl(node2, enter, exit2, state, ancestors) {
  22006. const keys2 = _definitions.VISITOR_KEYS[node2.type];
  22007. if (!keys2)
  22008. return;
  22009. if (enter)
  22010. enter(node2, ancestors, state);
  22011. for (const key2 of keys2) {
  22012. const subNode = node2[key2];
  22013. if (Array.isArray(subNode)) {
  22014. for (let i = 0; i < subNode.length; i++) {
  22015. const child = subNode[i];
  22016. if (!child)
  22017. continue;
  22018. ancestors.push({
  22019. node: node2,
  22020. key: key2,
  22021. index: i
  22022. });
  22023. traverseSimpleImpl(child, enter, exit2, state, ancestors);
  22024. ancestors.pop();
  22025. }
  22026. } else if (subNode) {
  22027. ancestors.push({
  22028. node: node2,
  22029. key: key2
  22030. });
  22031. traverseSimpleImpl(subNode, enter, exit2, state, ancestors);
  22032. ancestors.pop();
  22033. }
  22034. }
  22035. if (exit2)
  22036. exit2(node2, ancestors, state);
  22037. }
  22038. }
  22039. });
  22040. // node_modules/@babel/types/lib/validators/isBinding.js
  22041. var require_isBinding = __commonJS({
  22042. "node_modules/@babel/types/lib/validators/isBinding.js"(exports) {
  22043. "use strict";
  22044. Object.defineProperty(exports, "__esModule", {
  22045. value: true
  22046. });
  22047. exports.default = isBinding;
  22048. var _getBindingIdentifiers = require_getBindingIdentifiers();
  22049. function isBinding(node2, parent, grandparent) {
  22050. if (grandparent && node2.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  22051. return false;
  22052. }
  22053. const keys2 = _getBindingIdentifiers.default.keys[parent.type];
  22054. if (keys2) {
  22055. for (let i = 0; i < keys2.length; i++) {
  22056. const key2 = keys2[i];
  22057. const val = parent[key2];
  22058. if (Array.isArray(val)) {
  22059. if (val.indexOf(node2) >= 0)
  22060. return true;
  22061. } else {
  22062. if (val === node2)
  22063. return true;
  22064. }
  22065. }
  22066. }
  22067. return false;
  22068. }
  22069. }
  22070. });
  22071. // node_modules/@babel/types/lib/validators/isLet.js
  22072. var require_isLet = __commonJS({
  22073. "node_modules/@babel/types/lib/validators/isLet.js"(exports) {
  22074. "use strict";
  22075. Object.defineProperty(exports, "__esModule", {
  22076. value: true
  22077. });
  22078. exports.default = isLet;
  22079. var _generated = require_generated();
  22080. var _constants = require_constants();
  22081. function isLet(node2) {
  22082. return (0, _generated.isVariableDeclaration)(node2) && (node2.kind !== "var" || node2[_constants.BLOCK_SCOPED_SYMBOL]);
  22083. }
  22084. }
  22085. });
  22086. // node_modules/@babel/types/lib/validators/isBlockScoped.js
  22087. var require_isBlockScoped = __commonJS({
  22088. "node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports) {
  22089. "use strict";
  22090. Object.defineProperty(exports, "__esModule", {
  22091. value: true
  22092. });
  22093. exports.default = isBlockScoped;
  22094. var _generated = require_generated();
  22095. var _isLet = require_isLet();
  22096. function isBlockScoped(node2) {
  22097. return (0, _generated.isFunctionDeclaration)(node2) || (0, _generated.isClassDeclaration)(node2) || (0, _isLet.default)(node2);
  22098. }
  22099. }
  22100. });
  22101. // node_modules/@babel/types/lib/validators/isImmutable.js
  22102. var require_isImmutable = __commonJS({
  22103. "node_modules/@babel/types/lib/validators/isImmutable.js"(exports) {
  22104. "use strict";
  22105. Object.defineProperty(exports, "__esModule", {
  22106. value: true
  22107. });
  22108. exports.default = isImmutable;
  22109. var _isType = require_isType();
  22110. var _generated = require_generated();
  22111. function isImmutable(node2) {
  22112. if ((0, _isType.default)(node2.type, "Immutable"))
  22113. return true;
  22114. if ((0, _generated.isIdentifier)(node2)) {
  22115. if (node2.name === "undefined") {
  22116. return true;
  22117. } else {
  22118. return false;
  22119. }
  22120. }
  22121. return false;
  22122. }
  22123. }
  22124. });
  22125. // node_modules/@babel/types/lib/validators/isNodesEquivalent.js
  22126. var require_isNodesEquivalent = __commonJS({
  22127. "node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports) {
  22128. "use strict";
  22129. Object.defineProperty(exports, "__esModule", {
  22130. value: true
  22131. });
  22132. exports.default = isNodesEquivalent;
  22133. var _definitions = require_definitions();
  22134. function isNodesEquivalent(a, b) {
  22135. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  22136. return a === b;
  22137. }
  22138. if (a.type !== b.type) {
  22139. return false;
  22140. }
  22141. const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
  22142. const visitorKeys = _definitions.VISITOR_KEYS[a.type];
  22143. for (const field of fields) {
  22144. const val_a = a[field];
  22145. const val_b = b[field];
  22146. if (typeof val_a !== typeof val_b) {
  22147. return false;
  22148. }
  22149. if (val_a == null && val_b == null) {
  22150. continue;
  22151. } else if (val_a == null || val_b == null) {
  22152. return false;
  22153. }
  22154. if (Array.isArray(val_a)) {
  22155. if (!Array.isArray(val_b)) {
  22156. return false;
  22157. }
  22158. if (val_a.length !== val_b.length) {
  22159. return false;
  22160. }
  22161. for (let i = 0; i < val_a.length; i++) {
  22162. if (!isNodesEquivalent(val_a[i], val_b[i])) {
  22163. return false;
  22164. }
  22165. }
  22166. continue;
  22167. }
  22168. if (typeof val_a === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  22169. for (const key2 of Object.keys(val_a)) {
  22170. if (val_a[key2] !== val_b[key2]) {
  22171. return false;
  22172. }
  22173. }
  22174. continue;
  22175. }
  22176. if (!isNodesEquivalent(val_a, val_b)) {
  22177. return false;
  22178. }
  22179. }
  22180. return true;
  22181. }
  22182. }
  22183. });
  22184. // node_modules/@babel/types/lib/validators/isReferenced.js
  22185. var require_isReferenced = __commonJS({
  22186. "node_modules/@babel/types/lib/validators/isReferenced.js"(exports) {
  22187. "use strict";
  22188. Object.defineProperty(exports, "__esModule", {
  22189. value: true
  22190. });
  22191. exports.default = isReferenced;
  22192. function isReferenced(node2, parent, grandparent) {
  22193. switch (parent.type) {
  22194. case "MemberExpression":
  22195. case "OptionalMemberExpression":
  22196. if (parent.property === node2) {
  22197. return !!parent.computed;
  22198. }
  22199. return parent.object === node2;
  22200. case "JSXMemberExpression":
  22201. return parent.object === node2;
  22202. case "VariableDeclarator":
  22203. return parent.init === node2;
  22204. case "ArrowFunctionExpression":
  22205. return parent.body === node2;
  22206. case "PrivateName":
  22207. return false;
  22208. case "ClassMethod":
  22209. case "ClassPrivateMethod":
  22210. case "ObjectMethod":
  22211. if (parent.key === node2) {
  22212. return !!parent.computed;
  22213. }
  22214. return false;
  22215. case "ObjectProperty":
  22216. if (parent.key === node2) {
  22217. return !!parent.computed;
  22218. }
  22219. return !grandparent || grandparent.type !== "ObjectPattern";
  22220. case "ClassProperty":
  22221. case "ClassAccessorProperty":
  22222. if (parent.key === node2) {
  22223. return !!parent.computed;
  22224. }
  22225. return true;
  22226. case "ClassPrivateProperty":
  22227. return parent.key !== node2;
  22228. case "ClassDeclaration":
  22229. case "ClassExpression":
  22230. return parent.superClass === node2;
  22231. case "AssignmentExpression":
  22232. return parent.right === node2;
  22233. case "AssignmentPattern":
  22234. return parent.right === node2;
  22235. case "LabeledStatement":
  22236. return false;
  22237. case "CatchClause":
  22238. return false;
  22239. case "RestElement":
  22240. return false;
  22241. case "BreakStatement":
  22242. case "ContinueStatement":
  22243. return false;
  22244. case "FunctionDeclaration":
  22245. case "FunctionExpression":
  22246. return false;
  22247. case "ExportNamespaceSpecifier":
  22248. case "ExportDefaultSpecifier":
  22249. return false;
  22250. case "ExportSpecifier":
  22251. if (grandparent != null && grandparent.source) {
  22252. return false;
  22253. }
  22254. return parent.local === node2;
  22255. case "ImportDefaultSpecifier":
  22256. case "ImportNamespaceSpecifier":
  22257. case "ImportSpecifier":
  22258. return false;
  22259. case "ImportAttribute":
  22260. return false;
  22261. case "JSXAttribute":
  22262. return false;
  22263. case "ObjectPattern":
  22264. case "ArrayPattern":
  22265. return false;
  22266. case "MetaProperty":
  22267. return false;
  22268. case "ObjectTypeProperty":
  22269. return parent.key !== node2;
  22270. case "TSEnumMember":
  22271. return parent.id !== node2;
  22272. case "TSPropertySignature":
  22273. if (parent.key === node2) {
  22274. return !!parent.computed;
  22275. }
  22276. return true;
  22277. }
  22278. return true;
  22279. }
  22280. }
  22281. });
  22282. // node_modules/@babel/types/lib/validators/isScope.js
  22283. var require_isScope = __commonJS({
  22284. "node_modules/@babel/types/lib/validators/isScope.js"(exports) {
  22285. "use strict";
  22286. Object.defineProperty(exports, "__esModule", {
  22287. value: true
  22288. });
  22289. exports.default = isScope;
  22290. var _generated = require_generated();
  22291. function isScope(node2, parent) {
  22292. if ((0, _generated.isBlockStatement)(node2) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  22293. return false;
  22294. }
  22295. if ((0, _generated.isPattern)(node2) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
  22296. return true;
  22297. }
  22298. return (0, _generated.isScopable)(node2);
  22299. }
  22300. }
  22301. });
  22302. // node_modules/@babel/types/lib/validators/isSpecifierDefault.js
  22303. var require_isSpecifierDefault = __commonJS({
  22304. "node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports) {
  22305. "use strict";
  22306. Object.defineProperty(exports, "__esModule", {
  22307. value: true
  22308. });
  22309. exports.default = isSpecifierDefault;
  22310. var _generated = require_generated();
  22311. function isSpecifierDefault(specifier) {
  22312. return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
  22313. name: "default"
  22314. });
  22315. }
  22316. }
  22317. });
  22318. // node_modules/@babel/types/lib/validators/isValidES3Identifier.js
  22319. var require_isValidES3Identifier = __commonJS({
  22320. "node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports) {
  22321. "use strict";
  22322. Object.defineProperty(exports, "__esModule", {
  22323. value: true
  22324. });
  22325. exports.default = isValidES3Identifier;
  22326. var _isValidIdentifier = require_isValidIdentifier();
  22327. var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
  22328. function isValidES3Identifier(name2) {
  22329. return (0, _isValidIdentifier.default)(name2) && !RESERVED_WORDS_ES3_ONLY.has(name2);
  22330. }
  22331. }
  22332. });
  22333. // node_modules/@babel/types/lib/validators/isVar.js
  22334. var require_isVar = __commonJS({
  22335. "node_modules/@babel/types/lib/validators/isVar.js"(exports) {
  22336. "use strict";
  22337. Object.defineProperty(exports, "__esModule", {
  22338. value: true
  22339. });
  22340. exports.default = isVar;
  22341. var _generated = require_generated();
  22342. var _constants = require_constants();
  22343. function isVar(node2) {
  22344. return (0, _generated.isVariableDeclaration)(node2, {
  22345. kind: "var"
  22346. }) && !node2[_constants.BLOCK_SCOPED_SYMBOL];
  22347. }
  22348. }
  22349. });
  22350. // node_modules/@babel/types/lib/index.js
  22351. var require_lib3 = __commonJS({
  22352. "node_modules/@babel/types/lib/index.js"(exports) {
  22353. "use strict";
  22354. Object.defineProperty(exports, "__esModule", {
  22355. value: true
  22356. });
  22357. var _exportNames = {
  22358. react: true,
  22359. assertNode: true,
  22360. createTypeAnnotationBasedOnTypeof: true,
  22361. createUnionTypeAnnotation: true,
  22362. createFlowUnionType: true,
  22363. createTSUnionType: true,
  22364. cloneNode: true,
  22365. clone: true,
  22366. cloneDeep: true,
  22367. cloneDeepWithoutLoc: true,
  22368. cloneWithoutLoc: true,
  22369. addComment: true,
  22370. addComments: true,
  22371. inheritInnerComments: true,
  22372. inheritLeadingComments: true,
  22373. inheritsComments: true,
  22374. inheritTrailingComments: true,
  22375. removeComments: true,
  22376. ensureBlock: true,
  22377. toBindingIdentifierName: true,
  22378. toBlock: true,
  22379. toComputedKey: true,
  22380. toExpression: true,
  22381. toIdentifier: true,
  22382. toKeyAlias: true,
  22383. toSequenceExpression: true,
  22384. toStatement: true,
  22385. valueToNode: true,
  22386. appendToMemberExpression: true,
  22387. inherits: true,
  22388. prependToMemberExpression: true,
  22389. removeProperties: true,
  22390. removePropertiesDeep: true,
  22391. removeTypeDuplicates: true,
  22392. getBindingIdentifiers: true,
  22393. getOuterBindingIdentifiers: true,
  22394. traverse: true,
  22395. traverseFast: true,
  22396. shallowEqual: true,
  22397. is: true,
  22398. isBinding: true,
  22399. isBlockScoped: true,
  22400. isImmutable: true,
  22401. isLet: true,
  22402. isNode: true,
  22403. isNodesEquivalent: true,
  22404. isPlaceholderType: true,
  22405. isReferenced: true,
  22406. isScope: true,
  22407. isSpecifierDefault: true,
  22408. isType: true,
  22409. isValidES3Identifier: true,
  22410. isValidIdentifier: true,
  22411. isVar: true,
  22412. matchesPattern: true,
  22413. validate: true,
  22414. buildMatchMemberExpression: true,
  22415. __internal__deprecationWarning: true
  22416. };
  22417. Object.defineProperty(exports, "__internal__deprecationWarning", {
  22418. enumerable: true,
  22419. get: function() {
  22420. return _deprecationWarning.default;
  22421. }
  22422. });
  22423. Object.defineProperty(exports, "addComment", {
  22424. enumerable: true,
  22425. get: function() {
  22426. return _addComment.default;
  22427. }
  22428. });
  22429. Object.defineProperty(exports, "addComments", {
  22430. enumerable: true,
  22431. get: function() {
  22432. return _addComments.default;
  22433. }
  22434. });
  22435. Object.defineProperty(exports, "appendToMemberExpression", {
  22436. enumerable: true,
  22437. get: function() {
  22438. return _appendToMemberExpression.default;
  22439. }
  22440. });
  22441. Object.defineProperty(exports, "assertNode", {
  22442. enumerable: true,
  22443. get: function() {
  22444. return _assertNode.default;
  22445. }
  22446. });
  22447. Object.defineProperty(exports, "buildMatchMemberExpression", {
  22448. enumerable: true,
  22449. get: function() {
  22450. return _buildMatchMemberExpression.default;
  22451. }
  22452. });
  22453. Object.defineProperty(exports, "clone", {
  22454. enumerable: true,
  22455. get: function() {
  22456. return _clone.default;
  22457. }
  22458. });
  22459. Object.defineProperty(exports, "cloneDeep", {
  22460. enumerable: true,
  22461. get: function() {
  22462. return _cloneDeep.default;
  22463. }
  22464. });
  22465. Object.defineProperty(exports, "cloneDeepWithoutLoc", {
  22466. enumerable: true,
  22467. get: function() {
  22468. return _cloneDeepWithoutLoc.default;
  22469. }
  22470. });
  22471. Object.defineProperty(exports, "cloneNode", {
  22472. enumerable: true,
  22473. get: function() {
  22474. return _cloneNode.default;
  22475. }
  22476. });
  22477. Object.defineProperty(exports, "cloneWithoutLoc", {
  22478. enumerable: true,
  22479. get: function() {
  22480. return _cloneWithoutLoc.default;
  22481. }
  22482. });
  22483. Object.defineProperty(exports, "createFlowUnionType", {
  22484. enumerable: true,
  22485. get: function() {
  22486. return _createFlowUnionType.default;
  22487. }
  22488. });
  22489. Object.defineProperty(exports, "createTSUnionType", {
  22490. enumerable: true,
  22491. get: function() {
  22492. return _createTSUnionType.default;
  22493. }
  22494. });
  22495. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  22496. enumerable: true,
  22497. get: function() {
  22498. return _createTypeAnnotationBasedOnTypeof.default;
  22499. }
  22500. });
  22501. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  22502. enumerable: true,
  22503. get: function() {
  22504. return _createFlowUnionType.default;
  22505. }
  22506. });
  22507. Object.defineProperty(exports, "ensureBlock", {
  22508. enumerable: true,
  22509. get: function() {
  22510. return _ensureBlock.default;
  22511. }
  22512. });
  22513. Object.defineProperty(exports, "getBindingIdentifiers", {
  22514. enumerable: true,
  22515. get: function() {
  22516. return _getBindingIdentifiers.default;
  22517. }
  22518. });
  22519. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  22520. enumerable: true,
  22521. get: function() {
  22522. return _getOuterBindingIdentifiers.default;
  22523. }
  22524. });
  22525. Object.defineProperty(exports, "inheritInnerComments", {
  22526. enumerable: true,
  22527. get: function() {
  22528. return _inheritInnerComments.default;
  22529. }
  22530. });
  22531. Object.defineProperty(exports, "inheritLeadingComments", {
  22532. enumerable: true,
  22533. get: function() {
  22534. return _inheritLeadingComments.default;
  22535. }
  22536. });
  22537. Object.defineProperty(exports, "inheritTrailingComments", {
  22538. enumerable: true,
  22539. get: function() {
  22540. return _inheritTrailingComments.default;
  22541. }
  22542. });
  22543. Object.defineProperty(exports, "inherits", {
  22544. enumerable: true,
  22545. get: function() {
  22546. return _inherits.default;
  22547. }
  22548. });
  22549. Object.defineProperty(exports, "inheritsComments", {
  22550. enumerable: true,
  22551. get: function() {
  22552. return _inheritsComments.default;
  22553. }
  22554. });
  22555. Object.defineProperty(exports, "is", {
  22556. enumerable: true,
  22557. get: function() {
  22558. return _is.default;
  22559. }
  22560. });
  22561. Object.defineProperty(exports, "isBinding", {
  22562. enumerable: true,
  22563. get: function() {
  22564. return _isBinding.default;
  22565. }
  22566. });
  22567. Object.defineProperty(exports, "isBlockScoped", {
  22568. enumerable: true,
  22569. get: function() {
  22570. return _isBlockScoped.default;
  22571. }
  22572. });
  22573. Object.defineProperty(exports, "isImmutable", {
  22574. enumerable: true,
  22575. get: function() {
  22576. return _isImmutable.default;
  22577. }
  22578. });
  22579. Object.defineProperty(exports, "isLet", {
  22580. enumerable: true,
  22581. get: function() {
  22582. return _isLet.default;
  22583. }
  22584. });
  22585. Object.defineProperty(exports, "isNode", {
  22586. enumerable: true,
  22587. get: function() {
  22588. return _isNode.default;
  22589. }
  22590. });
  22591. Object.defineProperty(exports, "isNodesEquivalent", {
  22592. enumerable: true,
  22593. get: function() {
  22594. return _isNodesEquivalent.default;
  22595. }
  22596. });
  22597. Object.defineProperty(exports, "isPlaceholderType", {
  22598. enumerable: true,
  22599. get: function() {
  22600. return _isPlaceholderType.default;
  22601. }
  22602. });
  22603. Object.defineProperty(exports, "isReferenced", {
  22604. enumerable: true,
  22605. get: function() {
  22606. return _isReferenced.default;
  22607. }
  22608. });
  22609. Object.defineProperty(exports, "isScope", {
  22610. enumerable: true,
  22611. get: function() {
  22612. return _isScope.default;
  22613. }
  22614. });
  22615. Object.defineProperty(exports, "isSpecifierDefault", {
  22616. enumerable: true,
  22617. get: function() {
  22618. return _isSpecifierDefault.default;
  22619. }
  22620. });
  22621. Object.defineProperty(exports, "isType", {
  22622. enumerable: true,
  22623. get: function() {
  22624. return _isType.default;
  22625. }
  22626. });
  22627. Object.defineProperty(exports, "isValidES3Identifier", {
  22628. enumerable: true,
  22629. get: function() {
  22630. return _isValidES3Identifier.default;
  22631. }
  22632. });
  22633. Object.defineProperty(exports, "isValidIdentifier", {
  22634. enumerable: true,
  22635. get: function() {
  22636. return _isValidIdentifier.default;
  22637. }
  22638. });
  22639. Object.defineProperty(exports, "isVar", {
  22640. enumerable: true,
  22641. get: function() {
  22642. return _isVar.default;
  22643. }
  22644. });
  22645. Object.defineProperty(exports, "matchesPattern", {
  22646. enumerable: true,
  22647. get: function() {
  22648. return _matchesPattern.default;
  22649. }
  22650. });
  22651. Object.defineProperty(exports, "prependToMemberExpression", {
  22652. enumerable: true,
  22653. get: function() {
  22654. return _prependToMemberExpression.default;
  22655. }
  22656. });
  22657. exports.react = void 0;
  22658. Object.defineProperty(exports, "removeComments", {
  22659. enumerable: true,
  22660. get: function() {
  22661. return _removeComments.default;
  22662. }
  22663. });
  22664. Object.defineProperty(exports, "removeProperties", {
  22665. enumerable: true,
  22666. get: function() {
  22667. return _removeProperties.default;
  22668. }
  22669. });
  22670. Object.defineProperty(exports, "removePropertiesDeep", {
  22671. enumerable: true,
  22672. get: function() {
  22673. return _removePropertiesDeep.default;
  22674. }
  22675. });
  22676. Object.defineProperty(exports, "removeTypeDuplicates", {
  22677. enumerable: true,
  22678. get: function() {
  22679. return _removeTypeDuplicates.default;
  22680. }
  22681. });
  22682. Object.defineProperty(exports, "shallowEqual", {
  22683. enumerable: true,
  22684. get: function() {
  22685. return _shallowEqual.default;
  22686. }
  22687. });
  22688. Object.defineProperty(exports, "toBindingIdentifierName", {
  22689. enumerable: true,
  22690. get: function() {
  22691. return _toBindingIdentifierName.default;
  22692. }
  22693. });
  22694. Object.defineProperty(exports, "toBlock", {
  22695. enumerable: true,
  22696. get: function() {
  22697. return _toBlock.default;
  22698. }
  22699. });
  22700. Object.defineProperty(exports, "toComputedKey", {
  22701. enumerable: true,
  22702. get: function() {
  22703. return _toComputedKey.default;
  22704. }
  22705. });
  22706. Object.defineProperty(exports, "toExpression", {
  22707. enumerable: true,
  22708. get: function() {
  22709. return _toExpression.default;
  22710. }
  22711. });
  22712. Object.defineProperty(exports, "toIdentifier", {
  22713. enumerable: true,
  22714. get: function() {
  22715. return _toIdentifier.default;
  22716. }
  22717. });
  22718. Object.defineProperty(exports, "toKeyAlias", {
  22719. enumerable: true,
  22720. get: function() {
  22721. return _toKeyAlias.default;
  22722. }
  22723. });
  22724. Object.defineProperty(exports, "toSequenceExpression", {
  22725. enumerable: true,
  22726. get: function() {
  22727. return _toSequenceExpression.default;
  22728. }
  22729. });
  22730. Object.defineProperty(exports, "toStatement", {
  22731. enumerable: true,
  22732. get: function() {
  22733. return _toStatement.default;
  22734. }
  22735. });
  22736. Object.defineProperty(exports, "traverse", {
  22737. enumerable: true,
  22738. get: function() {
  22739. return _traverse.default;
  22740. }
  22741. });
  22742. Object.defineProperty(exports, "traverseFast", {
  22743. enumerable: true,
  22744. get: function() {
  22745. return _traverseFast.default;
  22746. }
  22747. });
  22748. Object.defineProperty(exports, "validate", {
  22749. enumerable: true,
  22750. get: function() {
  22751. return _validate.default;
  22752. }
  22753. });
  22754. Object.defineProperty(exports, "valueToNode", {
  22755. enumerable: true,
  22756. get: function() {
  22757. return _valueToNode.default;
  22758. }
  22759. });
  22760. var _isReactComponent = require_isReactComponent();
  22761. var _isCompatTag = require_isCompatTag();
  22762. var _buildChildren = require_buildChildren();
  22763. var _assertNode = require_assertNode();
  22764. var _generated = require_generated3();
  22765. Object.keys(_generated).forEach(function(key2) {
  22766. if (key2 === "default" || key2 === "__esModule")
  22767. return;
  22768. if (Object.prototype.hasOwnProperty.call(_exportNames, key2))
  22769. return;
  22770. if (key2 in exports && exports[key2] === _generated[key2])
  22771. return;
  22772. Object.defineProperty(exports, key2, {
  22773. enumerable: true,
  22774. get: function() {
  22775. return _generated[key2];
  22776. }
  22777. });
  22778. });
  22779. var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof();
  22780. var _createFlowUnionType = require_createFlowUnionType();
  22781. var _createTSUnionType = require_createTSUnionType();
  22782. var _generated2 = require_generated2();
  22783. Object.keys(_generated2).forEach(function(key2) {
  22784. if (key2 === "default" || key2 === "__esModule")
  22785. return;
  22786. if (Object.prototype.hasOwnProperty.call(_exportNames, key2))
  22787. return;
  22788. if (key2 in exports && exports[key2] === _generated2[key2])
  22789. return;
  22790. Object.defineProperty(exports, key2, {
  22791. enumerable: true,
  22792. get: function() {
  22793. return _generated2[key2];
  22794. }
  22795. });
  22796. });
  22797. var _uppercase = require_uppercase();
  22798. Object.keys(_uppercase).forEach(function(key2) {
  22799. if (key2 === "default" || key2 === "__esModule")
  22800. return;
  22801. if (Object.prototype.hasOwnProperty.call(_exportNames, key2))
  22802. return;
  22803. if (key2 in exports && exports[key2] === _uppercase[key2])
  22804. return;
  22805. Object.defineProperty(exports, key2, {
  22806. enumerable: true,
  22807. get: function() {
  22808. return _uppercase[key2];
  22809. }
  22810. });
  22811. });
  22812. var _cloneNode = require_cloneNode();
  22813. var _clone = require_clone();
  22814. var _cloneDeep = require_cloneDeep();
  22815. var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc();
  22816. var _cloneWithoutLoc = require_cloneWithoutLoc();
  22817. var _addComment = require_addComment();
  22818. var _addComments = require_addComments();
  22819. var _inheritInnerComments = require_inheritInnerComments();
  22820. var _inheritLeadingComments = require_inheritLeadingComments();
  22821. var _inheritsComments = require_inheritsComments();
  22822. var _inheritTrailingComments = require_inheritTrailingComments();
  22823. var _removeComments = require_removeComments();
  22824. var _generated3 = require_generated4();
  22825. Object.keys(_generated3).forEach(function(key2) {
  22826. if (key2 === "default" || key2 === "__esModule")
  22827. return;
  22828. if (Object.prototype.hasOwnProperty.call(_exportNames, key2))
  22829. return;
  22830. if (key2 in exports && exports[key2] === _generated3[key2])
  22831. return;
  22832. Object.defineProperty(exports, key2, {
  22833. enumerable: true,
  22834. get: function() {
  22835. return _generated3[key2];
  22836. }
  22837. });
  22838. });
  22839. var _constants = require_constants();
  22840. Object.keys(_constants).forEach(function(key2) {
  22841. if (key2 === "default" || key2 === "__esModule")
  22842. return;
  22843. if (Object.prototype.hasOwnProperty.call(_exportNames, key2))
  22844. return;
  22845. if (key2 in exports && exports[key2] === _constants[key2])
  22846. return;
  22847. Object.defineProperty(exports, key2, {
  22848. enumerable: true,
  22849. get: function() {
  22850. return _constants[key2];
  22851. }
  22852. });
  22853. });
  22854. var _ensureBlock = require_ensureBlock();
  22855. var _toBindingIdentifierName = require_toBindingIdentifierName();
  22856. var _toBlock = require_toBlock();
  22857. var _toComputedKey = require_toComputedKey();
  22858. var _toExpression = require_toExpression();
  22859. var _toIdentifier = require_toIdentifier();
  22860. var _toKeyAlias = require_toKeyAlias();
  22861. var _toSequenceExpression = require_toSequenceExpression();
  22862. var _toStatement = require_toStatement();
  22863. var _valueToNode = require_valueToNode();
  22864. var _definitions = require_definitions();
  22865. Object.keys(_definitions).forEach(function(key2) {
  22866. if (key2 === "default" || key2 === "__esModule")
  22867. return;
  22868. if (Object.prototype.hasOwnProperty.call(_exportNames, key2))
  22869. return;
  22870. if (key2 in exports && exports[key2] === _definitions[key2])
  22871. return;
  22872. Object.defineProperty(exports, key2, {
  22873. enumerable: true,
  22874. get: function() {
  22875. return _definitions[key2];
  22876. }
  22877. });
  22878. });
  22879. var _appendToMemberExpression = require_appendToMemberExpression();
  22880. var _inherits = require_inherits();
  22881. var _prependToMemberExpression = require_prependToMemberExpression();
  22882. var _removeProperties = require_removeProperties();
  22883. var _removePropertiesDeep = require_removePropertiesDeep();
  22884. var _removeTypeDuplicates = require_removeTypeDuplicates();
  22885. var _getBindingIdentifiers = require_getBindingIdentifiers();
  22886. var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers();
  22887. var _traverse = require_traverse();
  22888. Object.keys(_traverse).forEach(function(key2) {
  22889. if (key2 === "default" || key2 === "__esModule")
  22890. return;
  22891. if (Object.prototype.hasOwnProperty.call(_exportNames, key2))
  22892. return;
  22893. if (key2 in exports && exports[key2] === _traverse[key2])
  22894. return;
  22895. Object.defineProperty(exports, key2, {
  22896. enumerable: true,
  22897. get: function() {
  22898. return _traverse[key2];
  22899. }
  22900. });
  22901. });
  22902. var _traverseFast = require_traverseFast();
  22903. var _shallowEqual = require_shallowEqual();
  22904. var _is = require_is();
  22905. var _isBinding = require_isBinding();
  22906. var _isBlockScoped = require_isBlockScoped();
  22907. var _isImmutable = require_isImmutable();
  22908. var _isLet = require_isLet();
  22909. var _isNode = require_isNode();
  22910. var _isNodesEquivalent = require_isNodesEquivalent();
  22911. var _isPlaceholderType = require_isPlaceholderType();
  22912. var _isReferenced = require_isReferenced();
  22913. var _isScope = require_isScope();
  22914. var _isSpecifierDefault = require_isSpecifierDefault();
  22915. var _isType = require_isType();
  22916. var _isValidES3Identifier = require_isValidES3Identifier();
  22917. var _isValidIdentifier = require_isValidIdentifier();
  22918. var _isVar = require_isVar();
  22919. var _matchesPattern = require_matchesPattern();
  22920. var _validate = require_validate();
  22921. var _buildMatchMemberExpression = require_buildMatchMemberExpression();
  22922. var _generated4 = require_generated();
  22923. Object.keys(_generated4).forEach(function(key2) {
  22924. if (key2 === "default" || key2 === "__esModule")
  22925. return;
  22926. if (Object.prototype.hasOwnProperty.call(_exportNames, key2))
  22927. return;
  22928. if (key2 in exports && exports[key2] === _generated4[key2])
  22929. return;
  22930. Object.defineProperty(exports, key2, {
  22931. enumerable: true,
  22932. get: function() {
  22933. return _generated4[key2];
  22934. }
  22935. });
  22936. });
  22937. var _deprecationWarning = require_deprecationWarning();
  22938. var react = {
  22939. isReactComponent: _isReactComponent.default,
  22940. isCompatTag: _isCompatTag.default,
  22941. buildChildren: _buildChildren.default
  22942. };
  22943. exports.react = react;
  22944. }
  22945. });
  22946. // node_modules/@babel/generator/lib/node/whitespace.js
  22947. var require_whitespace = __commonJS({
  22948. "node_modules/@babel/generator/lib/node/whitespace.js"(exports) {
  22949. "use strict";
  22950. Object.defineProperty(exports, "__esModule", {
  22951. value: true
  22952. });
  22953. exports.nodes = void 0;
  22954. var _t = require_lib3();
  22955. var {
  22956. FLIPPED_ALIAS_KEYS,
  22957. isArrayExpression,
  22958. isAssignmentExpression,
  22959. isBinary,
  22960. isBlockStatement,
  22961. isCallExpression: isCallExpression2,
  22962. isFunction,
  22963. isIdentifier: isIdentifier3,
  22964. isLiteral,
  22965. isMemberExpression: isMemberExpression2,
  22966. isObjectExpression: isObjectExpression2,
  22967. isOptionalCallExpression,
  22968. isOptionalMemberExpression,
  22969. isStringLiteral: isStringLiteral2
  22970. } = _t;
  22971. function crawlInternal(node2, state) {
  22972. if (!node2)
  22973. return state;
  22974. if (isMemberExpression2(node2) || isOptionalMemberExpression(node2)) {
  22975. crawlInternal(node2.object, state);
  22976. if (node2.computed)
  22977. crawlInternal(node2.property, state);
  22978. } else if (isBinary(node2) || isAssignmentExpression(node2)) {
  22979. crawlInternal(node2.left, state);
  22980. crawlInternal(node2.right, state);
  22981. } else if (isCallExpression2(node2) || isOptionalCallExpression(node2)) {
  22982. state.hasCall = true;
  22983. crawlInternal(node2.callee, state);
  22984. } else if (isFunction(node2)) {
  22985. state.hasFunction = true;
  22986. } else if (isIdentifier3(node2)) {
  22987. state.hasHelper = state.hasHelper || node2.callee && isHelper(node2.callee);
  22988. }
  22989. return state;
  22990. }
  22991. function crawl(node2) {
  22992. return crawlInternal(node2, {
  22993. hasCall: false,
  22994. hasFunction: false,
  22995. hasHelper: false
  22996. });
  22997. }
  22998. function isHelper(node2) {
  22999. if (!node2)
  23000. return false;
  23001. if (isMemberExpression2(node2)) {
  23002. return isHelper(node2.object) || isHelper(node2.property);
  23003. } else if (isIdentifier3(node2)) {
  23004. return node2.name === "require" || node2.name.charCodeAt(0) === 95;
  23005. } else if (isCallExpression2(node2)) {
  23006. return isHelper(node2.callee);
  23007. } else if (isBinary(node2) || isAssignmentExpression(node2)) {
  23008. return isIdentifier3(node2.left) && isHelper(node2.left) || isHelper(node2.right);
  23009. } else {
  23010. return false;
  23011. }
  23012. }
  23013. function isType(node2) {
  23014. return isLiteral(node2) || isObjectExpression2(node2) || isArrayExpression(node2) || isIdentifier3(node2) || isMemberExpression2(node2);
  23015. }
  23016. var nodes = {
  23017. AssignmentExpression(node2) {
  23018. const state = crawl(node2.right);
  23019. if (state.hasCall && state.hasHelper || state.hasFunction) {
  23020. return state.hasFunction ? 1 | 2 : 2;
  23021. }
  23022. },
  23023. SwitchCase(node2, parent) {
  23024. return (!!node2.consequent.length || parent.cases[0] === node2 ? 1 : 0) | (!node2.consequent.length && parent.cases[parent.cases.length - 1] === node2 ? 2 : 0);
  23025. },
  23026. LogicalExpression(node2) {
  23027. if (isFunction(node2.left) || isFunction(node2.right)) {
  23028. return 2;
  23029. }
  23030. },
  23031. Literal(node2) {
  23032. if (isStringLiteral2(node2) && node2.value === "use strict") {
  23033. return 2;
  23034. }
  23035. },
  23036. CallExpression(node2) {
  23037. if (isFunction(node2.callee) || isHelper(node2)) {
  23038. return 1 | 2;
  23039. }
  23040. },
  23041. OptionalCallExpression(node2) {
  23042. if (isFunction(node2.callee)) {
  23043. return 1 | 2;
  23044. }
  23045. },
  23046. VariableDeclaration(node2) {
  23047. for (let i = 0; i < node2.declarations.length; i++) {
  23048. const declar = node2.declarations[i];
  23049. let enabled = isHelper(declar.id) && !isType(declar.init);
  23050. if (!enabled && declar.init) {
  23051. const state = crawl(declar.init);
  23052. enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
  23053. }
  23054. if (enabled) {
  23055. return 1 | 2;
  23056. }
  23057. }
  23058. },
  23059. IfStatement(node2) {
  23060. if (isBlockStatement(node2.consequent)) {
  23061. return 1 | 2;
  23062. }
  23063. }
  23064. };
  23065. exports.nodes = nodes;
  23066. nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function(node2, parent) {
  23067. if (parent.properties[0] === node2) {
  23068. return 1;
  23069. }
  23070. };
  23071. nodes.ObjectTypeCallProperty = function(node2, parent) {
  23072. var _parent$properties;
  23073. if (parent.callProperties[0] === node2 && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {
  23074. return 1;
  23075. }
  23076. };
  23077. nodes.ObjectTypeIndexer = function(node2, parent) {
  23078. var _parent$properties2, _parent$callPropertie;
  23079. if (parent.indexers[0] === node2 && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {
  23080. return 1;
  23081. }
  23082. };
  23083. nodes.ObjectTypeInternalSlot = function(node2, parent) {
  23084. var _parent$properties3, _parent$callPropertie2, _parent$indexers;
  23085. if (parent.internalSlots[0] === node2 && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {
  23086. return 1;
  23087. }
  23088. };
  23089. [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function([type, amounts]) {
  23090. [type].concat(FLIPPED_ALIAS_KEYS[type] || []).forEach(function(type2) {
  23091. const ret = amounts ? 1 | 2 : 0;
  23092. nodes[type2] = () => ret;
  23093. });
  23094. });
  23095. }
  23096. });
  23097. // node_modules/@babel/generator/lib/node/parentheses.js
  23098. var require_parentheses = __commonJS({
  23099. "node_modules/@babel/generator/lib/node/parentheses.js"(exports) {
  23100. "use strict";
  23101. Object.defineProperty(exports, "__esModule", {
  23102. value: true
  23103. });
  23104. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  23105. exports.AssignmentExpression = AssignmentExpression;
  23106. exports.Binary = Binary;
  23107. exports.BinaryExpression = BinaryExpression2;
  23108. exports.ClassExpression = ClassExpression;
  23109. exports.ConditionalExpression = ConditionalExpression;
  23110. exports.DoExpression = DoExpression;
  23111. exports.FunctionExpression = FunctionExpression;
  23112. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  23113. exports.Identifier = Identifier;
  23114. exports.LogicalExpression = LogicalExpression;
  23115. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  23116. exports.ObjectExpression = ObjectExpression;
  23117. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  23118. exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
  23119. exports.SequenceExpression = SequenceExpression;
  23120. exports.TSTypeAssertion = exports.TSSatisfiesExpression = exports.TSAsExpression = TSAsExpression;
  23121. exports.TSInferType = TSInferType;
  23122. exports.TSInstantiationExpression = TSInstantiationExpression;
  23123. exports.TSIntersectionType = exports.TSUnionType = TSUnionType;
  23124. exports.UnaryLike = UnaryLike;
  23125. exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
  23126. exports.UpdateExpression = UpdateExpression;
  23127. exports.AwaitExpression = exports.YieldExpression = YieldExpression;
  23128. var _t = require_lib3();
  23129. var {
  23130. isArrayTypeAnnotation,
  23131. isArrowFunctionExpression: isArrowFunctionExpression2,
  23132. isAssignmentExpression,
  23133. isAwaitExpression,
  23134. isBinary,
  23135. isBinaryExpression,
  23136. isUpdateExpression,
  23137. isCallExpression: isCallExpression2,
  23138. isClass,
  23139. isClassExpression,
  23140. isConditional,
  23141. isConditionalExpression,
  23142. isExportDeclaration,
  23143. isExportDefaultDeclaration,
  23144. isExpressionStatement: isExpressionStatement2,
  23145. isFor,
  23146. isForInStatement,
  23147. isForOfStatement,
  23148. isForStatement,
  23149. isFunctionExpression,
  23150. isIfStatement,
  23151. isIndexedAccessType,
  23152. isIntersectionTypeAnnotation,
  23153. isLogicalExpression,
  23154. isMemberExpression: isMemberExpression2,
  23155. isNewExpression,
  23156. isNullableTypeAnnotation,
  23157. isObjectPattern,
  23158. isOptionalCallExpression,
  23159. isOptionalMemberExpression,
  23160. isReturnStatement,
  23161. isSequenceExpression,
  23162. isSwitchStatement,
  23163. isTSArrayType,
  23164. isTSAsExpression,
  23165. isTSInstantiationExpression,
  23166. isTSIntersectionType,
  23167. isTSNonNullExpression,
  23168. isTSOptionalType,
  23169. isTSRestType,
  23170. isTSTypeAssertion,
  23171. isTSUnionType,
  23172. isTaggedTemplateExpression,
  23173. isThrowStatement,
  23174. isTypeAnnotation,
  23175. isUnaryLike,
  23176. isUnionTypeAnnotation,
  23177. isVariableDeclarator: isVariableDeclarator2,
  23178. isWhileStatement,
  23179. isYieldExpression,
  23180. isTSSatisfiesExpression
  23181. } = _t;
  23182. var PRECEDENCE = {
  23183. "||": 0,
  23184. "??": 0,
  23185. "|>": 0,
  23186. "&&": 1,
  23187. "|": 2,
  23188. "^": 3,
  23189. "&": 4,
  23190. "==": 5,
  23191. "===": 5,
  23192. "!=": 5,
  23193. "!==": 5,
  23194. "<": 6,
  23195. ">": 6,
  23196. "<=": 6,
  23197. ">=": 6,
  23198. in: 6,
  23199. instanceof: 6,
  23200. ">>": 7,
  23201. "<<": 7,
  23202. ">>>": 7,
  23203. "+": 8,
  23204. "-": 8,
  23205. "*": 9,
  23206. "/": 9,
  23207. "%": 9,
  23208. "**": 10
  23209. };
  23210. function isTSTypeExpression(node2) {
  23211. return isTSAsExpression(node2) || isTSSatisfiesExpression(node2) || isTSTypeAssertion(node2);
  23212. }
  23213. var isClassExtendsClause = (node2, parent) => isClass(parent, {
  23214. superClass: node2
  23215. });
  23216. var hasPostfixPart = (node2, parent) => (isMemberExpression2(parent) || isOptionalMemberExpression(parent)) && parent.object === node2 || (isCallExpression2(parent) || isOptionalCallExpression(parent) || isNewExpression(parent)) && parent.callee === node2 || isTaggedTemplateExpression(parent) && parent.tag === node2 || isTSNonNullExpression(parent);
  23217. function NullableTypeAnnotation(node2, parent) {
  23218. return isArrayTypeAnnotation(parent);
  23219. }
  23220. function FunctionTypeAnnotation(node2, parent, printStack) {
  23221. if (printStack.length < 3)
  23222. return;
  23223. return isUnionTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation(parent) && isArrowFunctionExpression2(printStack[printStack.length - 3]);
  23224. }
  23225. function UpdateExpression(node2, parent) {
  23226. return hasPostfixPart(node2, parent) || isClassExtendsClause(node2, parent);
  23227. }
  23228. function ObjectExpression(node2, parent, printStack) {
  23229. return isFirstInContext(printStack, 1 | 2);
  23230. }
  23231. function DoExpression(node2, parent, printStack) {
  23232. return !node2.async && isFirstInContext(printStack, 1);
  23233. }
  23234. function Binary(node2, parent) {
  23235. if (node2.operator === "**" && isBinaryExpression(parent, {
  23236. operator: "**"
  23237. })) {
  23238. return parent.left === node2;
  23239. }
  23240. if (isClassExtendsClause(node2, parent)) {
  23241. return true;
  23242. }
  23243. if (hasPostfixPart(node2, parent) || isUnaryLike(parent) || isAwaitExpression(parent)) {
  23244. return true;
  23245. }
  23246. if (isBinary(parent)) {
  23247. const parentOp = parent.operator;
  23248. const parentPos = PRECEDENCE[parentOp];
  23249. const nodeOp = node2.operator;
  23250. const nodePos = PRECEDENCE[nodeOp];
  23251. if (parentPos === nodePos && parent.right === node2 && !isLogicalExpression(parent) || parentPos > nodePos) {
  23252. return true;
  23253. }
  23254. }
  23255. }
  23256. function UnionTypeAnnotation(node2, parent) {
  23257. return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation(parent);
  23258. }
  23259. function OptionalIndexedAccessType(node2, parent) {
  23260. return isIndexedAccessType(parent, {
  23261. objectType: node2
  23262. });
  23263. }
  23264. function TSAsExpression() {
  23265. return true;
  23266. }
  23267. function TSUnionType(node2, parent) {
  23268. return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent);
  23269. }
  23270. function TSInferType(node2, parent) {
  23271. return isTSArrayType(parent) || isTSOptionalType(parent);
  23272. }
  23273. function TSInstantiationExpression(node2, parent) {
  23274. return (isCallExpression2(parent) || isOptionalCallExpression(parent) || isNewExpression(parent) || isTSInstantiationExpression(parent)) && !!parent.typeParameters;
  23275. }
  23276. function BinaryExpression2(node2, parent) {
  23277. return node2.operator === "in" && (isVariableDeclarator2(parent) || isFor(parent));
  23278. }
  23279. function SequenceExpression(node2, parent) {
  23280. if (isForStatement(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement(parent) && parent.test === node2 || isWhileStatement(parent) && parent.test === node2 || isForInStatement(parent) && parent.right === node2 || isSwitchStatement(parent) && parent.discriminant === node2 || isExpressionStatement2(parent) && parent.expression === node2) {
  23281. return false;
  23282. }
  23283. return true;
  23284. }
  23285. function YieldExpression(node2, parent) {
  23286. return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node2, parent) || isAwaitExpression(parent) && isYieldExpression(node2) || isConditionalExpression(parent) && node2 === parent.test || isClassExtendsClause(node2, parent);
  23287. }
  23288. function ClassExpression(node2, parent, printStack) {
  23289. return isFirstInContext(printStack, 1 | 4);
  23290. }
  23291. function UnaryLike(node2, parent) {
  23292. return hasPostfixPart(node2, parent) || isBinaryExpression(parent, {
  23293. operator: "**",
  23294. left: node2
  23295. }) || isClassExtendsClause(node2, parent);
  23296. }
  23297. function FunctionExpression(node2, parent, printStack) {
  23298. return isFirstInContext(printStack, 1 | 4);
  23299. }
  23300. function ArrowFunctionExpression(node2, parent) {
  23301. return isExportDeclaration(parent) || ConditionalExpression(node2, parent);
  23302. }
  23303. function ConditionalExpression(node2, parent) {
  23304. if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, {
  23305. test: node2
  23306. }) || isAwaitExpression(parent) || isTSTypeExpression(parent)) {
  23307. return true;
  23308. }
  23309. return UnaryLike(node2, parent);
  23310. }
  23311. function OptionalMemberExpression(node2, parent) {
  23312. return isCallExpression2(parent, {
  23313. callee: node2
  23314. }) || isMemberExpression2(parent, {
  23315. object: node2
  23316. });
  23317. }
  23318. function AssignmentExpression(node2, parent) {
  23319. if (isObjectPattern(node2.left)) {
  23320. return true;
  23321. } else {
  23322. return ConditionalExpression(node2, parent);
  23323. }
  23324. }
  23325. function LogicalExpression(node2, parent) {
  23326. if (isTSTypeExpression(parent))
  23327. return true;
  23328. switch (node2.operator) {
  23329. case "||":
  23330. if (!isLogicalExpression(parent))
  23331. return false;
  23332. return parent.operator === "??" || parent.operator === "&&";
  23333. case "&&":
  23334. return isLogicalExpression(parent, {
  23335. operator: "??"
  23336. });
  23337. case "??":
  23338. return isLogicalExpression(parent) && parent.operator !== "??";
  23339. }
  23340. }
  23341. function Identifier(node2, parent, printStack) {
  23342. var _node$extra;
  23343. if ((_node$extra = node2.extra) != null && _node$extra.parenthesized && isAssignmentExpression(parent, {
  23344. left: node2
  23345. }) && (isFunctionExpression(parent.right) || isClassExpression(parent.right)) && parent.right.id == null) {
  23346. return true;
  23347. }
  23348. if (node2.name === "let") {
  23349. const isFollowedByBracket = isMemberExpression2(parent, {
  23350. object: node2,
  23351. computed: true
  23352. }) || isOptionalMemberExpression(parent, {
  23353. object: node2,
  23354. computed: true,
  23355. optional: false
  23356. });
  23357. return isFirstInContext(printStack, isFollowedByBracket ? 1 | 8 | 16 | 32 : 32);
  23358. }
  23359. return node2.name === "async" && isForOfStatement(parent) && node2 === parent.left;
  23360. }
  23361. function isFirstInContext(printStack, checkParam) {
  23362. const expressionStatement = checkParam & 1;
  23363. const arrowBody = checkParam & 2;
  23364. const exportDefault = checkParam & 4;
  23365. const forHead = checkParam & 8;
  23366. const forInHead = checkParam & 16;
  23367. const forOfHead = checkParam & 32;
  23368. let i = printStack.length - 1;
  23369. if (i <= 0)
  23370. return;
  23371. let node2 = printStack[i];
  23372. i--;
  23373. let parent = printStack[i];
  23374. while (i >= 0) {
  23375. if (expressionStatement && isExpressionStatement2(parent, {
  23376. expression: node2
  23377. }) || exportDefault && isExportDefaultDeclaration(parent, {
  23378. declaration: node2
  23379. }) || arrowBody && isArrowFunctionExpression2(parent, {
  23380. body: node2
  23381. }) || forHead && isForStatement(parent, {
  23382. init: node2
  23383. }) || forInHead && isForInStatement(parent, {
  23384. left: node2
  23385. }) || forOfHead && isForOfStatement(parent, {
  23386. left: node2
  23387. })) {
  23388. return true;
  23389. }
  23390. if (i > 0 && (hasPostfixPart(node2, parent) && !isNewExpression(parent) || isSequenceExpression(parent) && parent.expressions[0] === node2 || isUpdateExpression(parent) && !parent.prefix || isConditional(parent, {
  23391. test: node2
  23392. }) || isBinary(parent, {
  23393. left: node2
  23394. }) || isAssignmentExpression(parent, {
  23395. left: node2
  23396. }))) {
  23397. node2 = parent;
  23398. i--;
  23399. parent = printStack[i];
  23400. } else {
  23401. return false;
  23402. }
  23403. }
  23404. return false;
  23405. }
  23406. }
  23407. });
  23408. // node_modules/@babel/generator/lib/node/index.js
  23409. var require_node = __commonJS({
  23410. "node_modules/@babel/generator/lib/node/index.js"(exports) {
  23411. "use strict";
  23412. Object.defineProperty(exports, "__esModule", {
  23413. value: true
  23414. });
  23415. exports.needsParens = needsParens;
  23416. exports.needsWhitespace = needsWhitespace;
  23417. exports.needsWhitespaceAfter = needsWhitespaceAfter;
  23418. exports.needsWhitespaceBefore = needsWhitespaceBefore;
  23419. var whitespace2 = require_whitespace();
  23420. var parens = require_parentheses();
  23421. var _t = require_lib3();
  23422. var {
  23423. FLIPPED_ALIAS_KEYS,
  23424. isCallExpression: isCallExpression2,
  23425. isExpressionStatement: isExpressionStatement2,
  23426. isMemberExpression: isMemberExpression2,
  23427. isNewExpression
  23428. } = _t;
  23429. function expandAliases(obj) {
  23430. const newObj = {};
  23431. function add(type, func) {
  23432. const fn = newObj[type];
  23433. newObj[type] = fn ? function(node2, parent, stack2) {
  23434. const result = fn(node2, parent, stack2);
  23435. return result == null ? func(node2, parent, stack2) : result;
  23436. } : func;
  23437. }
  23438. for (const type of Object.keys(obj)) {
  23439. const aliases = FLIPPED_ALIAS_KEYS[type];
  23440. if (aliases) {
  23441. for (const alias of aliases) {
  23442. add(alias, obj[type]);
  23443. }
  23444. } else {
  23445. add(type, obj[type]);
  23446. }
  23447. }
  23448. return newObj;
  23449. }
  23450. var expandedParens = expandAliases(parens);
  23451. var expandedWhitespaceNodes = expandAliases(whitespace2.nodes);
  23452. function find2(obj, node2, parent, printStack) {
  23453. const fn = obj[node2.type];
  23454. return fn ? fn(node2, parent, printStack) : null;
  23455. }
  23456. function isOrHasCallExpression(node2) {
  23457. if (isCallExpression2(node2)) {
  23458. return true;
  23459. }
  23460. return isMemberExpression2(node2) && isOrHasCallExpression(node2.object);
  23461. }
  23462. function needsWhitespace(node2, parent, type) {
  23463. if (!node2)
  23464. return false;
  23465. if (isExpressionStatement2(node2)) {
  23466. node2 = node2.expression;
  23467. }
  23468. const flag = find2(expandedWhitespaceNodes, node2, parent);
  23469. if (typeof flag === "number") {
  23470. return (flag & type) !== 0;
  23471. }
  23472. return false;
  23473. }
  23474. function needsWhitespaceBefore(node2, parent) {
  23475. return needsWhitespace(node2, parent, 1);
  23476. }
  23477. function needsWhitespaceAfter(node2, parent) {
  23478. return needsWhitespace(node2, parent, 2);
  23479. }
  23480. function needsParens(node2, parent, printStack) {
  23481. if (!parent)
  23482. return false;
  23483. if (isNewExpression(parent) && parent.callee === node2) {
  23484. if (isOrHasCallExpression(node2))
  23485. return true;
  23486. }
  23487. return find2(expandedParens, node2, parent, printStack);
  23488. }
  23489. }
  23490. });
  23491. // node_modules/@babel/generator/lib/generators/template-literals.js
  23492. var require_template_literals = __commonJS({
  23493. "node_modules/@babel/generator/lib/generators/template-literals.js"(exports) {
  23494. "use strict";
  23495. Object.defineProperty(exports, "__esModule", {
  23496. value: true
  23497. });
  23498. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  23499. exports.TemplateElement = TemplateElement;
  23500. exports.TemplateLiteral = TemplateLiteral;
  23501. function TaggedTemplateExpression(node2) {
  23502. this.print(node2.tag, node2);
  23503. this.print(node2.typeParameters, node2);
  23504. this.print(node2.quasi, node2);
  23505. }
  23506. function TemplateElement(node2, parent) {
  23507. const isFirst = parent.quasis[0] === node2;
  23508. const isLast = parent.quasis[parent.quasis.length - 1] === node2;
  23509. const value2 = (isFirst ? "`" : "}") + node2.value.raw + (isLast ? "`" : "${");
  23510. this.token(value2, true);
  23511. }
  23512. function TemplateLiteral(node2) {
  23513. const quasis = node2.quasis;
  23514. for (let i = 0; i < quasis.length; i++) {
  23515. this.print(quasis[i], node2);
  23516. if (i + 1 < quasis.length) {
  23517. this.print(node2.expressions[i], node2);
  23518. }
  23519. }
  23520. }
  23521. }
  23522. });
  23523. // node_modules/@babel/generator/lib/generators/expressions.js
  23524. var require_expressions = __commonJS({
  23525. "node_modules/@babel/generator/lib/generators/expressions.js"(exports) {
  23526. "use strict";
  23527. Object.defineProperty(exports, "__esModule", {
  23528. value: true
  23529. });
  23530. exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
  23531. exports.AssignmentPattern = AssignmentPattern;
  23532. exports.AwaitExpression = AwaitExpression;
  23533. exports.BindExpression = BindExpression;
  23534. exports.CallExpression = CallExpression;
  23535. exports.ConditionalExpression = ConditionalExpression;
  23536. exports.Decorator = Decorator;
  23537. exports.DoExpression = DoExpression;
  23538. exports.EmptyStatement = EmptyStatement;
  23539. exports.ExpressionStatement = ExpressionStatement;
  23540. exports.Import = Import;
  23541. exports.MemberExpression = MemberExpression;
  23542. exports.MetaProperty = MetaProperty;
  23543. exports.ModuleExpression = ModuleExpression;
  23544. exports.NewExpression = NewExpression;
  23545. exports.OptionalCallExpression = OptionalCallExpression;
  23546. exports.OptionalMemberExpression = OptionalMemberExpression;
  23547. exports.ParenthesizedExpression = ParenthesizedExpression;
  23548. exports.PrivateName = PrivateName;
  23549. exports.SequenceExpression = SequenceExpression;
  23550. exports.Super = Super;
  23551. exports.ThisExpression = ThisExpression;
  23552. exports.UnaryExpression = UnaryExpression;
  23553. exports.UpdateExpression = UpdateExpression;
  23554. exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
  23555. exports.YieldExpression = YieldExpression;
  23556. exports._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport;
  23557. var _t = require_lib3();
  23558. var n = require_node();
  23559. var {
  23560. isCallExpression: isCallExpression2,
  23561. isLiteral,
  23562. isMemberExpression: isMemberExpression2,
  23563. isNewExpression
  23564. } = _t;
  23565. function UnaryExpression(node2) {
  23566. if (node2.operator === "void" || node2.operator === "delete" || node2.operator === "typeof" || node2.operator === "throw") {
  23567. this.word(node2.operator);
  23568. this.space();
  23569. } else {
  23570. this.token(node2.operator);
  23571. }
  23572. this.print(node2.argument, node2);
  23573. }
  23574. function DoExpression(node2) {
  23575. if (node2.async) {
  23576. this.word("async", true);
  23577. this.space();
  23578. }
  23579. this.word("do");
  23580. this.space();
  23581. this.print(node2.body, node2);
  23582. }
  23583. function ParenthesizedExpression(node2) {
  23584. this.tokenChar(40);
  23585. this.print(node2.expression, node2);
  23586. this.tokenChar(41);
  23587. }
  23588. function UpdateExpression(node2) {
  23589. if (node2.prefix) {
  23590. this.token(node2.operator);
  23591. this.print(node2.argument, node2);
  23592. } else {
  23593. this.printTerminatorless(node2.argument, node2, true);
  23594. this.token(node2.operator);
  23595. }
  23596. }
  23597. function ConditionalExpression(node2) {
  23598. this.print(node2.test, node2);
  23599. this.space();
  23600. this.tokenChar(63);
  23601. this.space();
  23602. this.print(node2.consequent, node2);
  23603. this.space();
  23604. this.tokenChar(58);
  23605. this.space();
  23606. this.print(node2.alternate, node2);
  23607. }
  23608. function NewExpression(node2, parent) {
  23609. this.word("new");
  23610. this.space();
  23611. this.print(node2.callee, node2);
  23612. if (this.format.minified && node2.arguments.length === 0 && !node2.optional && !isCallExpression2(parent, {
  23613. callee: node2
  23614. }) && !isMemberExpression2(parent) && !isNewExpression(parent)) {
  23615. return;
  23616. }
  23617. this.print(node2.typeArguments, node2);
  23618. this.print(node2.typeParameters, node2);
  23619. if (node2.optional) {
  23620. this.token("?.");
  23621. }
  23622. this.tokenChar(40);
  23623. this.printList(node2.arguments, node2);
  23624. this.tokenChar(41);
  23625. }
  23626. function SequenceExpression(node2) {
  23627. this.printList(node2.expressions, node2);
  23628. }
  23629. function ThisExpression() {
  23630. this.word("this");
  23631. }
  23632. function Super() {
  23633. this.word("super");
  23634. }
  23635. function isDecoratorMemberExpression(node2) {
  23636. switch (node2.type) {
  23637. case "Identifier":
  23638. return true;
  23639. case "MemberExpression":
  23640. return !node2.computed && node2.property.type === "Identifier" && isDecoratorMemberExpression(node2.object);
  23641. default:
  23642. return false;
  23643. }
  23644. }
  23645. function shouldParenthesizeDecoratorExpression(node2) {
  23646. if (node2.type === "ParenthesizedExpression") {
  23647. return false;
  23648. }
  23649. return !isDecoratorMemberExpression(node2.type === "CallExpression" ? node2.callee : node2);
  23650. }
  23651. function _shouldPrintDecoratorsBeforeExport(node2) {
  23652. if (typeof this.format.decoratorsBeforeExport === "boolean") {
  23653. return this.format.decoratorsBeforeExport;
  23654. }
  23655. return typeof node2.start === "number" && node2.start === node2.declaration.start;
  23656. }
  23657. function Decorator(node2) {
  23658. this.tokenChar(64);
  23659. const {
  23660. expression
  23661. } = node2;
  23662. if (shouldParenthesizeDecoratorExpression(expression)) {
  23663. this.tokenChar(40);
  23664. this.print(expression, node2);
  23665. this.tokenChar(41);
  23666. } else {
  23667. this.print(expression, node2);
  23668. }
  23669. this.newline();
  23670. }
  23671. function OptionalMemberExpression(node2) {
  23672. this.print(node2.object, node2);
  23673. if (!node2.computed && isMemberExpression2(node2.property)) {
  23674. throw new TypeError("Got a MemberExpression for MemberExpression property");
  23675. }
  23676. let computed = node2.computed;
  23677. if (isLiteral(node2.property) && typeof node2.property.value === "number") {
  23678. computed = true;
  23679. }
  23680. if (node2.optional) {
  23681. this.token("?.");
  23682. }
  23683. if (computed) {
  23684. this.tokenChar(91);
  23685. this.print(node2.property, node2);
  23686. this.tokenChar(93);
  23687. } else {
  23688. if (!node2.optional) {
  23689. this.tokenChar(46);
  23690. }
  23691. this.print(node2.property, node2);
  23692. }
  23693. }
  23694. function OptionalCallExpression(node2) {
  23695. this.print(node2.callee, node2);
  23696. this.print(node2.typeParameters, node2);
  23697. if (node2.optional) {
  23698. this.token("?.");
  23699. }
  23700. this.print(node2.typeArguments, node2);
  23701. this.tokenChar(40);
  23702. this.printList(node2.arguments, node2);
  23703. this.tokenChar(41);
  23704. }
  23705. function CallExpression(node2) {
  23706. this.print(node2.callee, node2);
  23707. this.print(node2.typeArguments, node2);
  23708. this.print(node2.typeParameters, node2);
  23709. this.tokenChar(40);
  23710. this.printList(node2.arguments, node2);
  23711. this.tokenChar(41);
  23712. }
  23713. function Import() {
  23714. this.word("import");
  23715. }
  23716. function AwaitExpression(node2) {
  23717. this.word("await");
  23718. if (node2.argument) {
  23719. this.space();
  23720. this.printTerminatorless(node2.argument, node2, false);
  23721. }
  23722. }
  23723. function YieldExpression(node2) {
  23724. this.word("yield", true);
  23725. if (node2.delegate) {
  23726. this.tokenChar(42);
  23727. if (node2.argument) {
  23728. this.space();
  23729. this.print(node2.argument, node2);
  23730. }
  23731. } else {
  23732. if (node2.argument) {
  23733. this.space();
  23734. this.printTerminatorless(node2.argument, node2, false);
  23735. }
  23736. }
  23737. }
  23738. function EmptyStatement() {
  23739. this.semicolon(true);
  23740. }
  23741. function ExpressionStatement(node2) {
  23742. this.print(node2.expression, node2);
  23743. this.semicolon();
  23744. }
  23745. function AssignmentPattern(node2) {
  23746. this.print(node2.left, node2);
  23747. if (node2.left.optional)
  23748. this.tokenChar(63);
  23749. this.print(node2.left.typeAnnotation, node2);
  23750. this.space();
  23751. this.tokenChar(61);
  23752. this.space();
  23753. this.print(node2.right, node2);
  23754. }
  23755. function AssignmentExpression(node2, parent) {
  23756. const parens = this.inForStatementInitCounter && node2.operator === "in" && !n.needsParens(node2, parent);
  23757. if (parens) {
  23758. this.tokenChar(40);
  23759. }
  23760. this.print(node2.left, node2);
  23761. this.space();
  23762. if (node2.operator === "in" || node2.operator === "instanceof") {
  23763. this.word(node2.operator);
  23764. } else {
  23765. this.token(node2.operator);
  23766. }
  23767. this.space();
  23768. this.print(node2.right, node2);
  23769. if (parens) {
  23770. this.tokenChar(41);
  23771. }
  23772. }
  23773. function BindExpression(node2) {
  23774. this.print(node2.object, node2);
  23775. this.token("::");
  23776. this.print(node2.callee, node2);
  23777. }
  23778. function MemberExpression(node2) {
  23779. this.print(node2.object, node2);
  23780. if (!node2.computed && isMemberExpression2(node2.property)) {
  23781. throw new TypeError("Got a MemberExpression for MemberExpression property");
  23782. }
  23783. let computed = node2.computed;
  23784. if (isLiteral(node2.property) && typeof node2.property.value === "number") {
  23785. computed = true;
  23786. }
  23787. if (computed) {
  23788. this.tokenChar(91);
  23789. this.print(node2.property, node2);
  23790. this.tokenChar(93);
  23791. } else {
  23792. this.tokenChar(46);
  23793. this.print(node2.property, node2);
  23794. }
  23795. }
  23796. function MetaProperty(node2) {
  23797. this.print(node2.meta, node2);
  23798. this.tokenChar(46);
  23799. this.print(node2.property, node2);
  23800. }
  23801. function PrivateName(node2) {
  23802. this.tokenChar(35);
  23803. this.print(node2.id, node2);
  23804. }
  23805. function V8IntrinsicIdentifier(node2) {
  23806. this.tokenChar(37);
  23807. this.word(node2.name);
  23808. }
  23809. function ModuleExpression(node2) {
  23810. this.word("module", true);
  23811. this.space();
  23812. this.tokenChar(123);
  23813. this.indent();
  23814. const {
  23815. body
  23816. } = node2;
  23817. if (body.body.length || body.directives.length) {
  23818. this.newline();
  23819. }
  23820. this.print(body, node2);
  23821. this.dedent();
  23822. this.sourceWithOffset("end", node2.loc, 0, -1);
  23823. this.rightBrace();
  23824. }
  23825. }
  23826. });
  23827. // node_modules/@babel/generator/lib/generators/statements.js
  23828. var require_statements = __commonJS({
  23829. "node_modules/@babel/generator/lib/generators/statements.js"(exports) {
  23830. "use strict";
  23831. Object.defineProperty(exports, "__esModule", {
  23832. value: true
  23833. });
  23834. exports.BreakStatement = BreakStatement;
  23835. exports.CatchClause = CatchClause;
  23836. exports.ContinueStatement = ContinueStatement;
  23837. exports.DebuggerStatement = DebuggerStatement;
  23838. exports.DoWhileStatement = DoWhileStatement;
  23839. exports.ForOfStatement = exports.ForInStatement = void 0;
  23840. exports.ForStatement = ForStatement;
  23841. exports.IfStatement = IfStatement;
  23842. exports.LabeledStatement = LabeledStatement;
  23843. exports.ReturnStatement = ReturnStatement;
  23844. exports.SwitchCase = SwitchCase;
  23845. exports.SwitchStatement = SwitchStatement;
  23846. exports.ThrowStatement = ThrowStatement;
  23847. exports.TryStatement = TryStatement;
  23848. exports.VariableDeclaration = VariableDeclaration;
  23849. exports.VariableDeclarator = VariableDeclarator;
  23850. exports.WhileStatement = WhileStatement;
  23851. exports.WithStatement = WithStatement;
  23852. var _t = require_lib3();
  23853. var {
  23854. isFor,
  23855. isForStatement,
  23856. isIfStatement,
  23857. isStatement
  23858. } = _t;
  23859. function WithStatement(node2) {
  23860. this.word("with");
  23861. this.space();
  23862. this.tokenChar(40);
  23863. this.print(node2.object, node2);
  23864. this.tokenChar(41);
  23865. this.printBlock(node2);
  23866. }
  23867. function IfStatement(node2) {
  23868. this.word("if");
  23869. this.space();
  23870. this.tokenChar(40);
  23871. this.print(node2.test, node2);
  23872. this.tokenChar(41);
  23873. this.space();
  23874. const needsBlock = node2.alternate && isIfStatement(getLastStatement(node2.consequent));
  23875. if (needsBlock) {
  23876. this.tokenChar(123);
  23877. this.newline();
  23878. this.indent();
  23879. }
  23880. this.printAndIndentOnComments(node2.consequent, node2);
  23881. if (needsBlock) {
  23882. this.dedent();
  23883. this.newline();
  23884. this.tokenChar(125);
  23885. }
  23886. if (node2.alternate) {
  23887. if (this.endsWith(125))
  23888. this.space();
  23889. this.word("else");
  23890. this.space();
  23891. this.printAndIndentOnComments(node2.alternate, node2);
  23892. }
  23893. }
  23894. function getLastStatement(statement) {
  23895. const {
  23896. body
  23897. } = statement;
  23898. if (isStatement(body) === false) {
  23899. return statement;
  23900. }
  23901. return getLastStatement(body);
  23902. }
  23903. function ForStatement(node2) {
  23904. this.word("for");
  23905. this.space();
  23906. this.tokenChar(40);
  23907. this.inForStatementInitCounter++;
  23908. this.print(node2.init, node2);
  23909. this.inForStatementInitCounter--;
  23910. this.tokenChar(59);
  23911. if (node2.test) {
  23912. this.space();
  23913. this.print(node2.test, node2);
  23914. }
  23915. this.tokenChar(59);
  23916. if (node2.update) {
  23917. this.space();
  23918. this.print(node2.update, node2);
  23919. }
  23920. this.tokenChar(41);
  23921. this.printBlock(node2);
  23922. }
  23923. function WhileStatement(node2) {
  23924. this.word("while");
  23925. this.space();
  23926. this.tokenChar(40);
  23927. this.print(node2.test, node2);
  23928. this.tokenChar(41);
  23929. this.printBlock(node2);
  23930. }
  23931. function ForXStatement(node2) {
  23932. this.word("for");
  23933. this.space();
  23934. const isForOf = node2.type === "ForOfStatement";
  23935. if (isForOf && node2.await) {
  23936. this.word("await");
  23937. this.space();
  23938. }
  23939. this.noIndentInnerCommentsHere();
  23940. this.tokenChar(40);
  23941. this.print(node2.left, node2);
  23942. this.space();
  23943. this.word(isForOf ? "of" : "in");
  23944. this.space();
  23945. this.print(node2.right, node2);
  23946. this.tokenChar(41);
  23947. this.printBlock(node2);
  23948. }
  23949. var ForInStatement2 = ForXStatement;
  23950. exports.ForInStatement = ForInStatement2;
  23951. var ForOfStatement = ForXStatement;
  23952. exports.ForOfStatement = ForOfStatement;
  23953. function DoWhileStatement(node2) {
  23954. this.word("do");
  23955. this.space();
  23956. this.print(node2.body, node2);
  23957. this.space();
  23958. this.word("while");
  23959. this.space();
  23960. this.tokenChar(40);
  23961. this.print(node2.test, node2);
  23962. this.tokenChar(41);
  23963. this.semicolon();
  23964. }
  23965. function printStatementAfterKeyword(printer, node2, parent, isLabel) {
  23966. if (node2) {
  23967. printer.space();
  23968. printer.printTerminatorless(node2, parent, isLabel);
  23969. }
  23970. printer.semicolon();
  23971. }
  23972. function BreakStatement(node2) {
  23973. this.word("break");
  23974. printStatementAfterKeyword(this, node2.label, node2, true);
  23975. }
  23976. function ContinueStatement(node2) {
  23977. this.word("continue");
  23978. printStatementAfterKeyword(this, node2.label, node2, true);
  23979. }
  23980. function ReturnStatement(node2) {
  23981. this.word("return");
  23982. printStatementAfterKeyword(this, node2.argument, node2, false);
  23983. }
  23984. function ThrowStatement(node2) {
  23985. this.word("throw");
  23986. printStatementAfterKeyword(this, node2.argument, node2, false);
  23987. }
  23988. function LabeledStatement(node2) {
  23989. this.print(node2.label, node2);
  23990. this.tokenChar(58);
  23991. this.space();
  23992. this.print(node2.body, node2);
  23993. }
  23994. function TryStatement(node2) {
  23995. this.word("try");
  23996. this.space();
  23997. this.print(node2.block, node2);
  23998. this.space();
  23999. if (node2.handlers) {
  24000. this.print(node2.handlers[0], node2);
  24001. } else {
  24002. this.print(node2.handler, node2);
  24003. }
  24004. if (node2.finalizer) {
  24005. this.space();
  24006. this.word("finally");
  24007. this.space();
  24008. this.print(node2.finalizer, node2);
  24009. }
  24010. }
  24011. function CatchClause(node2) {
  24012. this.word("catch");
  24013. this.space();
  24014. if (node2.param) {
  24015. this.tokenChar(40);
  24016. this.print(node2.param, node2);
  24017. this.print(node2.param.typeAnnotation, node2);
  24018. this.tokenChar(41);
  24019. this.space();
  24020. }
  24021. this.print(node2.body, node2);
  24022. }
  24023. function SwitchStatement(node2) {
  24024. this.word("switch");
  24025. this.space();
  24026. this.tokenChar(40);
  24027. this.print(node2.discriminant, node2);
  24028. this.tokenChar(41);
  24029. this.space();
  24030. this.tokenChar(123);
  24031. this.printSequence(node2.cases, node2, {
  24032. indent: true,
  24033. addNewlines(leading, cas) {
  24034. if (!leading && node2.cases[node2.cases.length - 1] === cas)
  24035. return -1;
  24036. }
  24037. });
  24038. this.tokenChar(125);
  24039. }
  24040. function SwitchCase(node2) {
  24041. if (node2.test) {
  24042. this.word("case");
  24043. this.space();
  24044. this.print(node2.test, node2);
  24045. this.tokenChar(58);
  24046. } else {
  24047. this.word("default");
  24048. this.tokenChar(58);
  24049. }
  24050. if (node2.consequent.length) {
  24051. this.newline();
  24052. this.printSequence(node2.consequent, node2, {
  24053. indent: true
  24054. });
  24055. }
  24056. }
  24057. function DebuggerStatement() {
  24058. this.word("debugger");
  24059. this.semicolon();
  24060. }
  24061. function VariableDeclaration(node2, parent) {
  24062. if (node2.declare) {
  24063. this.word("declare");
  24064. this.space();
  24065. }
  24066. const {
  24067. kind
  24068. } = node2;
  24069. this.word(kind, kind === "using");
  24070. this.space();
  24071. let hasInits = false;
  24072. if (!isFor(parent)) {
  24073. for (const declar of node2.declarations) {
  24074. if (declar.init) {
  24075. hasInits = true;
  24076. }
  24077. }
  24078. }
  24079. this.printList(node2.declarations, node2, {
  24080. separator: hasInits ? function() {
  24081. this.tokenChar(44);
  24082. this.newline();
  24083. } : void 0,
  24084. indent: node2.declarations.length > 1 ? true : false
  24085. });
  24086. if (isFor(parent)) {
  24087. if (isForStatement(parent)) {
  24088. if (parent.init === node2)
  24089. return;
  24090. } else {
  24091. if (parent.left === node2)
  24092. return;
  24093. }
  24094. }
  24095. this.semicolon();
  24096. }
  24097. function VariableDeclarator(node2) {
  24098. this.print(node2.id, node2);
  24099. if (node2.definite)
  24100. this.tokenChar(33);
  24101. this.print(node2.id.typeAnnotation, node2);
  24102. if (node2.init) {
  24103. this.space();
  24104. this.tokenChar(61);
  24105. this.space();
  24106. this.print(node2.init, node2);
  24107. }
  24108. }
  24109. }
  24110. });
  24111. // node_modules/@babel/generator/lib/generators/classes.js
  24112. var require_classes = __commonJS({
  24113. "node_modules/@babel/generator/lib/generators/classes.js"(exports) {
  24114. "use strict";
  24115. Object.defineProperty(exports, "__esModule", {
  24116. value: true
  24117. });
  24118. exports.ClassAccessorProperty = ClassAccessorProperty;
  24119. exports.ClassBody = ClassBody;
  24120. exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
  24121. exports.ClassMethod = ClassMethod;
  24122. exports.ClassPrivateMethod = ClassPrivateMethod;
  24123. exports.ClassPrivateProperty = ClassPrivateProperty;
  24124. exports.ClassProperty = ClassProperty;
  24125. exports.StaticBlock = StaticBlock;
  24126. exports._classMethodHead = _classMethodHead;
  24127. var _t = require_lib3();
  24128. var {
  24129. isExportDefaultDeclaration,
  24130. isExportNamedDeclaration: isExportNamedDeclaration2
  24131. } = _t;
  24132. function ClassDeclaration(node2, parent) {
  24133. const inExport = isExportDefaultDeclaration(parent) || isExportNamedDeclaration2(parent);
  24134. if (!inExport || !this._shouldPrintDecoratorsBeforeExport(parent)) {
  24135. this.printJoin(node2.decorators, node2);
  24136. }
  24137. if (node2.declare) {
  24138. this.word("declare");
  24139. this.space();
  24140. }
  24141. if (node2.abstract) {
  24142. this.word("abstract");
  24143. this.space();
  24144. }
  24145. this.word("class");
  24146. if (node2.id) {
  24147. this.space();
  24148. this.print(node2.id, node2);
  24149. }
  24150. this.print(node2.typeParameters, node2);
  24151. if (node2.superClass) {
  24152. this.space();
  24153. this.word("extends");
  24154. this.space();
  24155. this.print(node2.superClass, node2);
  24156. this.print(node2.superTypeParameters, node2);
  24157. }
  24158. if (node2.implements) {
  24159. this.space();
  24160. this.word("implements");
  24161. this.space();
  24162. this.printList(node2.implements, node2);
  24163. }
  24164. this.space();
  24165. this.print(node2.body, node2);
  24166. }
  24167. function ClassBody(node2) {
  24168. this.tokenChar(123);
  24169. if (node2.body.length === 0) {
  24170. this.tokenChar(125);
  24171. } else {
  24172. this.newline();
  24173. this.indent();
  24174. this.printSequence(node2.body, node2);
  24175. this.dedent();
  24176. if (!this.endsWith(10))
  24177. this.newline();
  24178. this.sourceWithOffset("end", node2.loc, 0, -1);
  24179. this.rightBrace();
  24180. }
  24181. }
  24182. function ClassProperty(node2) {
  24183. var _node$key$loc, _node$key$loc$end;
  24184. this.printJoin(node2.decorators, node2);
  24185. const endLine = (_node$key$loc = node2.key.loc) == null ? void 0 : (_node$key$loc$end = _node$key$loc.end) == null ? void 0 : _node$key$loc$end.line;
  24186. if (endLine)
  24187. this.catchUp(endLine);
  24188. this.tsPrintClassMemberModifiers(node2);
  24189. if (node2.computed) {
  24190. this.tokenChar(91);
  24191. this.print(node2.key, node2);
  24192. this.tokenChar(93);
  24193. } else {
  24194. this._variance(node2);
  24195. this.print(node2.key, node2);
  24196. }
  24197. if (node2.optional) {
  24198. this.tokenChar(63);
  24199. }
  24200. if (node2.definite) {
  24201. this.tokenChar(33);
  24202. }
  24203. this.print(node2.typeAnnotation, node2);
  24204. if (node2.value) {
  24205. this.space();
  24206. this.tokenChar(61);
  24207. this.space();
  24208. this.print(node2.value, node2);
  24209. }
  24210. this.semicolon();
  24211. }
  24212. function ClassAccessorProperty(node2) {
  24213. var _node$key$loc2, _node$key$loc2$end;
  24214. this.printJoin(node2.decorators, node2);
  24215. const endLine = (_node$key$loc2 = node2.key.loc) == null ? void 0 : (_node$key$loc2$end = _node$key$loc2.end) == null ? void 0 : _node$key$loc2$end.line;
  24216. if (endLine)
  24217. this.catchUp(endLine);
  24218. this.tsPrintClassMemberModifiers(node2);
  24219. this.word("accessor", true);
  24220. this.space();
  24221. if (node2.computed) {
  24222. this.tokenChar(91);
  24223. this.print(node2.key, node2);
  24224. this.tokenChar(93);
  24225. } else {
  24226. this._variance(node2);
  24227. this.print(node2.key, node2);
  24228. }
  24229. if (node2.optional) {
  24230. this.tokenChar(63);
  24231. }
  24232. if (node2.definite) {
  24233. this.tokenChar(33);
  24234. }
  24235. this.print(node2.typeAnnotation, node2);
  24236. if (node2.value) {
  24237. this.space();
  24238. this.tokenChar(61);
  24239. this.space();
  24240. this.print(node2.value, node2);
  24241. }
  24242. this.semicolon();
  24243. }
  24244. function ClassPrivateProperty(node2) {
  24245. this.printJoin(node2.decorators, node2);
  24246. if (node2.static) {
  24247. this.word("static");
  24248. this.space();
  24249. }
  24250. this.print(node2.key, node2);
  24251. this.print(node2.typeAnnotation, node2);
  24252. if (node2.value) {
  24253. this.space();
  24254. this.tokenChar(61);
  24255. this.space();
  24256. this.print(node2.value, node2);
  24257. }
  24258. this.semicolon();
  24259. }
  24260. function ClassMethod(node2) {
  24261. this._classMethodHead(node2);
  24262. this.space();
  24263. this.print(node2.body, node2);
  24264. }
  24265. function ClassPrivateMethod(node2) {
  24266. this._classMethodHead(node2);
  24267. this.space();
  24268. this.print(node2.body, node2);
  24269. }
  24270. function _classMethodHead(node2) {
  24271. var _node$key$loc3, _node$key$loc3$end;
  24272. this.printJoin(node2.decorators, node2);
  24273. const endLine = (_node$key$loc3 = node2.key.loc) == null ? void 0 : (_node$key$loc3$end = _node$key$loc3.end) == null ? void 0 : _node$key$loc3$end.line;
  24274. if (endLine)
  24275. this.catchUp(endLine);
  24276. this.tsPrintClassMemberModifiers(node2);
  24277. this._methodHead(node2);
  24278. }
  24279. function StaticBlock(node2) {
  24280. this.word("static");
  24281. this.space();
  24282. this.tokenChar(123);
  24283. if (node2.body.length === 0) {
  24284. this.tokenChar(125);
  24285. } else {
  24286. this.newline();
  24287. this.printSequence(node2.body, node2, {
  24288. indent: true
  24289. });
  24290. this.sourceWithOffset("end", node2.loc, 0, -1);
  24291. this.rightBrace();
  24292. }
  24293. }
  24294. }
  24295. });
  24296. // node_modules/@babel/generator/lib/generators/methods.js
  24297. var require_methods = __commonJS({
  24298. "node_modules/@babel/generator/lib/generators/methods.js"(exports) {
  24299. "use strict";
  24300. Object.defineProperty(exports, "__esModule", {
  24301. value: true
  24302. });
  24303. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  24304. exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
  24305. exports._functionHead = _functionHead;
  24306. exports._methodHead = _methodHead;
  24307. exports._param = _param;
  24308. exports._parameters = _parameters;
  24309. exports._params = _params;
  24310. exports._predicate = _predicate;
  24311. var _t = require_lib3();
  24312. var {
  24313. isIdentifier: isIdentifier3
  24314. } = _t;
  24315. function _params(node2, idNode, parentNode) {
  24316. this.print(node2.typeParameters, node2);
  24317. const nameInfo = _getFuncIdName.call(this, idNode, parentNode);
  24318. if (nameInfo) {
  24319. this.sourceIdentifierName(nameInfo.name, nameInfo.pos);
  24320. }
  24321. this.tokenChar(40);
  24322. this._parameters(node2.params, node2);
  24323. this.tokenChar(41);
  24324. const noLineTerminator = node2.type === "ArrowFunctionExpression";
  24325. this.print(node2.returnType, node2, noLineTerminator);
  24326. this._noLineTerminator = noLineTerminator;
  24327. }
  24328. function _parameters(parameters, parent) {
  24329. const paramLength = parameters.length;
  24330. for (let i = 0; i < paramLength; i++) {
  24331. this._param(parameters[i], parent);
  24332. if (i < parameters.length - 1) {
  24333. this.tokenChar(44);
  24334. this.space();
  24335. }
  24336. }
  24337. }
  24338. function _param(parameter, parent) {
  24339. this.printJoin(parameter.decorators, parameter);
  24340. this.print(parameter, parent);
  24341. if (parameter.optional) {
  24342. this.tokenChar(63);
  24343. }
  24344. this.print(parameter.typeAnnotation, parameter);
  24345. }
  24346. function _methodHead(node2) {
  24347. const kind = node2.kind;
  24348. const key2 = node2.key;
  24349. if (kind === "get" || kind === "set") {
  24350. this.word(kind);
  24351. this.space();
  24352. }
  24353. if (node2.async) {
  24354. this.word("async", true);
  24355. this.space();
  24356. }
  24357. if (kind === "method" || kind === "init") {
  24358. if (node2.generator) {
  24359. this.tokenChar(42);
  24360. }
  24361. }
  24362. if (node2.computed) {
  24363. this.tokenChar(91);
  24364. this.print(key2, node2);
  24365. this.tokenChar(93);
  24366. } else {
  24367. this.print(key2, node2);
  24368. }
  24369. if (node2.optional) {
  24370. this.tokenChar(63);
  24371. }
  24372. this._params(node2, node2.computed && node2.key.type !== "StringLiteral" ? void 0 : node2.key, void 0);
  24373. }
  24374. function _predicate(node2, noLineTerminatorAfter) {
  24375. if (node2.predicate) {
  24376. if (!node2.returnType) {
  24377. this.tokenChar(58);
  24378. }
  24379. this.space();
  24380. this.print(node2.predicate, node2, noLineTerminatorAfter);
  24381. }
  24382. }
  24383. function _functionHead(node2, parent) {
  24384. if (node2.async) {
  24385. this.word("async");
  24386. this._endsWithInnerRaw = false;
  24387. this.space();
  24388. }
  24389. this.word("function");
  24390. if (node2.generator) {
  24391. this._endsWithInnerRaw = false;
  24392. this.tokenChar(42);
  24393. }
  24394. this.space();
  24395. if (node2.id) {
  24396. this.print(node2.id, node2);
  24397. }
  24398. this._params(node2, node2.id, parent);
  24399. if (node2.type !== "TSDeclareFunction") {
  24400. this._predicate(node2);
  24401. }
  24402. }
  24403. function FunctionExpression(node2, parent) {
  24404. this._functionHead(node2, parent);
  24405. this.space();
  24406. this.print(node2.body, node2);
  24407. }
  24408. function ArrowFunctionExpression(node2, parent) {
  24409. if (node2.async) {
  24410. this.word("async", true);
  24411. this.space();
  24412. }
  24413. let firstParam;
  24414. if (!this.format.retainLines && node2.params.length === 1 && isIdentifier3(firstParam = node2.params[0]) && !hasTypesOrComments(node2, firstParam)) {
  24415. this.print(firstParam, node2, true);
  24416. } else {
  24417. this._params(node2, void 0, parent);
  24418. }
  24419. this._predicate(node2, true);
  24420. this.space();
  24421. this.printInnerComments();
  24422. this.token("=>");
  24423. this.space();
  24424. this.print(node2.body, node2);
  24425. }
  24426. function hasTypesOrComments(node2, param) {
  24427. var _param$leadingComment, _param$trailingCommen;
  24428. return !!(node2.typeParameters || node2.returnType || node2.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length);
  24429. }
  24430. function _getFuncIdName(idNode, parent) {
  24431. let id = idNode;
  24432. if (!id && parent) {
  24433. const parentType = parent.type;
  24434. if (parentType === "VariableDeclarator") {
  24435. id = parent.id;
  24436. } else if (parentType === "AssignmentExpression" || parentType === "AssignmentPattern") {
  24437. id = parent.left;
  24438. } else if (parentType === "ObjectProperty" || parentType === "ClassProperty") {
  24439. if (!parent.computed || parent.key.type === "StringLiteral") {
  24440. id = parent.key;
  24441. }
  24442. } else if (parentType === "ClassPrivateProperty" || parentType === "ClassAccessorProperty") {
  24443. id = parent.key;
  24444. }
  24445. }
  24446. if (!id)
  24447. return;
  24448. let nameInfo;
  24449. if (id.type === "Identifier") {
  24450. var _id$loc, _id$loc2;
  24451. nameInfo = {
  24452. pos: (_id$loc = id.loc) == null ? void 0 : _id$loc.start,
  24453. name: ((_id$loc2 = id.loc) == null ? void 0 : _id$loc2.identifierName) || id.name
  24454. };
  24455. } else if (id.type === "PrivateName") {
  24456. var _id$loc3;
  24457. nameInfo = {
  24458. pos: (_id$loc3 = id.loc) == null ? void 0 : _id$loc3.start,
  24459. name: "#" + id.id.name
  24460. };
  24461. } else if (id.type === "StringLiteral") {
  24462. var _id$loc4;
  24463. nameInfo = {
  24464. pos: (_id$loc4 = id.loc) == null ? void 0 : _id$loc4.start,
  24465. name: id.value
  24466. };
  24467. }
  24468. return nameInfo;
  24469. }
  24470. }
  24471. });
  24472. // node_modules/@babel/generator/lib/generators/modules.js
  24473. var require_modules = __commonJS({
  24474. "node_modules/@babel/generator/lib/generators/modules.js"(exports) {
  24475. "use strict";
  24476. Object.defineProperty(exports, "__esModule", {
  24477. value: true
  24478. });
  24479. exports.ExportAllDeclaration = ExportAllDeclaration;
  24480. exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
  24481. exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
  24482. exports.ExportNamedDeclaration = ExportNamedDeclaration;
  24483. exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
  24484. exports.ExportSpecifier = ExportSpecifier;
  24485. exports.ImportAttribute = ImportAttribute;
  24486. exports.ImportDeclaration = ImportDeclaration;
  24487. exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
  24488. exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
  24489. exports.ImportSpecifier = ImportSpecifier;
  24490. exports._printAssertions = _printAssertions;
  24491. var _t = require_lib3();
  24492. var {
  24493. isClassDeclaration,
  24494. isExportDefaultSpecifier,
  24495. isExportNamespaceSpecifier,
  24496. isImportDefaultSpecifier,
  24497. isImportNamespaceSpecifier,
  24498. isStatement
  24499. } = _t;
  24500. function ImportSpecifier(node2) {
  24501. if (node2.importKind === "type" || node2.importKind === "typeof") {
  24502. this.word(node2.importKind);
  24503. this.space();
  24504. }
  24505. this.print(node2.imported, node2);
  24506. if (node2.local && node2.local.name !== node2.imported.name) {
  24507. this.space();
  24508. this.word("as");
  24509. this.space();
  24510. this.print(node2.local, node2);
  24511. }
  24512. }
  24513. function ImportDefaultSpecifier(node2) {
  24514. this.print(node2.local, node2);
  24515. }
  24516. function ExportDefaultSpecifier(node2) {
  24517. this.print(node2.exported, node2);
  24518. }
  24519. function ExportSpecifier(node2) {
  24520. if (node2.exportKind === "type") {
  24521. this.word("type");
  24522. this.space();
  24523. }
  24524. this.print(node2.local, node2);
  24525. if (node2.exported && node2.local.name !== node2.exported.name) {
  24526. this.space();
  24527. this.word("as");
  24528. this.space();
  24529. this.print(node2.exported, node2);
  24530. }
  24531. }
  24532. function ExportNamespaceSpecifier(node2) {
  24533. this.tokenChar(42);
  24534. this.space();
  24535. this.word("as");
  24536. this.space();
  24537. this.print(node2.exported, node2);
  24538. }
  24539. function _printAssertions(node2) {
  24540. this.word("assert");
  24541. this.space();
  24542. this.tokenChar(123);
  24543. this.space();
  24544. this.printList(node2.assertions, node2);
  24545. this.space();
  24546. this.tokenChar(125);
  24547. }
  24548. function ExportAllDeclaration(node2) {
  24549. var _node$assertions;
  24550. this.word("export");
  24551. this.space();
  24552. if (node2.exportKind === "type") {
  24553. this.word("type");
  24554. this.space();
  24555. }
  24556. this.tokenChar(42);
  24557. this.space();
  24558. this.word("from");
  24559. this.space();
  24560. if ((_node$assertions = node2.assertions) != null && _node$assertions.length) {
  24561. this.print(node2.source, node2, true);
  24562. this.space();
  24563. this._printAssertions(node2);
  24564. } else {
  24565. this.print(node2.source, node2);
  24566. }
  24567. this.semicolon();
  24568. }
  24569. function maybePrintDecoratorsBeforeExport(printer, node2) {
  24570. if (isClassDeclaration(node2.declaration) && printer._shouldPrintDecoratorsBeforeExport(node2)) {
  24571. printer.printJoin(node2.declaration.decorators, node2);
  24572. }
  24573. }
  24574. function ExportNamedDeclaration(node2) {
  24575. maybePrintDecoratorsBeforeExport(this, node2);
  24576. this.word("export");
  24577. this.space();
  24578. if (node2.declaration) {
  24579. const declar = node2.declaration;
  24580. this.print(declar, node2);
  24581. if (!isStatement(declar))
  24582. this.semicolon();
  24583. } else {
  24584. if (node2.exportKind === "type") {
  24585. this.word("type");
  24586. this.space();
  24587. }
  24588. const specifiers = node2.specifiers.slice(0);
  24589. let hasSpecial = false;
  24590. for (; ; ) {
  24591. const first = specifiers[0];
  24592. if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) {
  24593. hasSpecial = true;
  24594. this.print(specifiers.shift(), node2);
  24595. if (specifiers.length) {
  24596. this.tokenChar(44);
  24597. this.space();
  24598. }
  24599. } else {
  24600. break;
  24601. }
  24602. }
  24603. if (specifiers.length || !specifiers.length && !hasSpecial) {
  24604. this.tokenChar(123);
  24605. if (specifiers.length) {
  24606. this.space();
  24607. this.printList(specifiers, node2);
  24608. this.space();
  24609. }
  24610. this.tokenChar(125);
  24611. }
  24612. if (node2.source) {
  24613. var _node$assertions2;
  24614. this.space();
  24615. this.word("from");
  24616. this.space();
  24617. if ((_node$assertions2 = node2.assertions) != null && _node$assertions2.length) {
  24618. this.print(node2.source, node2, true);
  24619. this.space();
  24620. this._printAssertions(node2);
  24621. } else {
  24622. this.print(node2.source, node2);
  24623. }
  24624. }
  24625. this.semicolon();
  24626. }
  24627. }
  24628. function ExportDefaultDeclaration(node2) {
  24629. maybePrintDecoratorsBeforeExport(this, node2);
  24630. this.word("export");
  24631. this.noIndentInnerCommentsHere();
  24632. this.space();
  24633. this.word("default");
  24634. this.space();
  24635. const declar = node2.declaration;
  24636. this.print(declar, node2);
  24637. if (!isStatement(declar))
  24638. this.semicolon();
  24639. }
  24640. function ImportDeclaration(node2) {
  24641. var _node$assertions3;
  24642. this.word("import");
  24643. this.space();
  24644. const isTypeKind = node2.importKind === "type" || node2.importKind === "typeof";
  24645. if (isTypeKind) {
  24646. this.noIndentInnerCommentsHere();
  24647. this.word(node2.importKind);
  24648. this.space();
  24649. } else if (node2.module) {
  24650. this.noIndentInnerCommentsHere();
  24651. this.word("module");
  24652. this.space();
  24653. }
  24654. const specifiers = node2.specifiers.slice(0);
  24655. const hasSpecifiers = !!specifiers.length;
  24656. while (hasSpecifiers) {
  24657. const first = specifiers[0];
  24658. if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {
  24659. this.print(specifiers.shift(), node2);
  24660. if (specifiers.length) {
  24661. this.tokenChar(44);
  24662. this.space();
  24663. }
  24664. } else {
  24665. break;
  24666. }
  24667. }
  24668. if (specifiers.length) {
  24669. this.tokenChar(123);
  24670. this.space();
  24671. this.printList(specifiers, node2);
  24672. this.space();
  24673. this.tokenChar(125);
  24674. } else if (isTypeKind && !hasSpecifiers) {
  24675. this.tokenChar(123);
  24676. this.tokenChar(125);
  24677. }
  24678. if (hasSpecifiers || isTypeKind) {
  24679. this.space();
  24680. this.word("from");
  24681. this.space();
  24682. }
  24683. if ((_node$assertions3 = node2.assertions) != null && _node$assertions3.length) {
  24684. this.print(node2.source, node2, true);
  24685. this.space();
  24686. this._printAssertions(node2);
  24687. } else {
  24688. this.print(node2.source, node2);
  24689. }
  24690. {
  24691. var _node$attributes;
  24692. if ((_node$attributes = node2.attributes) != null && _node$attributes.length) {
  24693. this.space();
  24694. this.word("with");
  24695. this.space();
  24696. this.printList(node2.attributes, node2);
  24697. }
  24698. }
  24699. this.semicolon();
  24700. }
  24701. function ImportAttribute(node2) {
  24702. this.print(node2.key);
  24703. this.tokenChar(58);
  24704. this.space();
  24705. this.print(node2.value);
  24706. }
  24707. function ImportNamespaceSpecifier(node2) {
  24708. this.tokenChar(42);
  24709. this.space();
  24710. this.word("as");
  24711. this.space();
  24712. this.print(node2.local, node2);
  24713. }
  24714. }
  24715. });
  24716. // node_modules/jsesc/jsesc.js
  24717. var require_jsesc = __commonJS({
  24718. "node_modules/jsesc/jsesc.js"(exports, module) {
  24719. "use strict";
  24720. var object = {};
  24721. var hasOwnProperty4 = object.hasOwnProperty;
  24722. var forOwn = (object2, callback) => {
  24723. for (const key2 in object2) {
  24724. if (hasOwnProperty4.call(object2, key2)) {
  24725. callback(key2, object2[key2]);
  24726. }
  24727. }
  24728. };
  24729. var extend4 = (destination, source2) => {
  24730. if (!source2) {
  24731. return destination;
  24732. }
  24733. forOwn(source2, (key2, value2) => {
  24734. destination[key2] = value2;
  24735. });
  24736. return destination;
  24737. };
  24738. var forEach = (array, callback) => {
  24739. const length = array.length;
  24740. let index2 = -1;
  24741. while (++index2 < length) {
  24742. callback(array[index2]);
  24743. }
  24744. };
  24745. var toString4 = object.toString;
  24746. var isArray3 = Array.isArray;
  24747. var isBuffer2 = Buffer.isBuffer;
  24748. var isObject = (value2) => {
  24749. return toString4.call(value2) == "[object Object]";
  24750. };
  24751. var isString = (value2) => {
  24752. return typeof value2 == "string" || toString4.call(value2) == "[object String]";
  24753. };
  24754. var isNumber = (value2) => {
  24755. return typeof value2 == "number" || toString4.call(value2) == "[object Number]";
  24756. };
  24757. var isFunction = (value2) => {
  24758. return typeof value2 == "function";
  24759. };
  24760. var isMap = (value2) => {
  24761. return toString4.call(value2) == "[object Map]";
  24762. };
  24763. var isSet = (value2) => {
  24764. return toString4.call(value2) == "[object Set]";
  24765. };
  24766. var singleEscapes = {
  24767. '"': '\\"',
  24768. "'": "\\'",
  24769. "\\": "\\\\",
  24770. "\b": "\\b",
  24771. "\f": "\\f",
  24772. "\n": "\\n",
  24773. "\r": "\\r",
  24774. " ": "\\t"
  24775. // `\v` is omitted intentionally, because in IE < 9, '\v' == 'v'.
  24776. // '\v': '\\x0B'
  24777. };
  24778. var regexSingleEscape = /["'\\\b\f\n\r\t]/;
  24779. var regexDigit = /[0-9]/;
  24780. var regexWhitelist = /[ !#-&\(-\[\]-_a-~]/;
  24781. var jsesc = (argument, options) => {
  24782. const increaseIndentation = () => {
  24783. oldIndent = indent;
  24784. ++options.indentLevel;
  24785. indent = options.indent.repeat(options.indentLevel);
  24786. };
  24787. const defaults = {
  24788. "escapeEverything": false,
  24789. "minimal": false,
  24790. "isScriptContext": false,
  24791. "quotes": "single",
  24792. "wrap": false,
  24793. "es6": false,
  24794. "json": false,
  24795. "compact": true,
  24796. "lowercaseHex": false,
  24797. "numbers": "decimal",
  24798. "indent": " ",
  24799. "indentLevel": 0,
  24800. "__inline1__": false,
  24801. "__inline2__": false
  24802. };
  24803. const json = options && options.json;
  24804. if (json) {
  24805. defaults.quotes = "double";
  24806. defaults.wrap = true;
  24807. }
  24808. options = extend4(defaults, options);
  24809. if (options.quotes != "single" && options.quotes != "double" && options.quotes != "backtick") {
  24810. options.quotes = "single";
  24811. }
  24812. const quote = options.quotes == "double" ? '"' : options.quotes == "backtick" ? "`" : "'";
  24813. const compact = options.compact;
  24814. const lowercaseHex = options.lowercaseHex;
  24815. let indent = options.indent.repeat(options.indentLevel);
  24816. let oldIndent = "";
  24817. const inline1 = options.__inline1__;
  24818. const inline2 = options.__inline2__;
  24819. const newLine = compact ? "" : "\n";
  24820. let result;
  24821. let isEmpty = true;
  24822. const useBinNumbers = options.numbers == "binary";
  24823. const useOctNumbers = options.numbers == "octal";
  24824. const useDecNumbers = options.numbers == "decimal";
  24825. const useHexNumbers = options.numbers == "hexadecimal";
  24826. if (json && argument && isFunction(argument.toJSON)) {
  24827. argument = argument.toJSON();
  24828. }
  24829. if (!isString(argument)) {
  24830. if (isMap(argument)) {
  24831. if (argument.size == 0) {
  24832. return "new Map()";
  24833. }
  24834. if (!compact) {
  24835. options.__inline1__ = true;
  24836. options.__inline2__ = false;
  24837. }
  24838. return "new Map(" + jsesc(Array.from(argument), options) + ")";
  24839. }
  24840. if (isSet(argument)) {
  24841. if (argument.size == 0) {
  24842. return "new Set()";
  24843. }
  24844. return "new Set(" + jsesc(Array.from(argument), options) + ")";
  24845. }
  24846. if (isBuffer2(argument)) {
  24847. if (argument.length == 0) {
  24848. return "Buffer.from([])";
  24849. }
  24850. return "Buffer.from(" + jsesc(Array.from(argument), options) + ")";
  24851. }
  24852. if (isArray3(argument)) {
  24853. result = [];
  24854. options.wrap = true;
  24855. if (inline1) {
  24856. options.__inline1__ = false;
  24857. options.__inline2__ = true;
  24858. }
  24859. if (!inline2) {
  24860. increaseIndentation();
  24861. }
  24862. forEach(argument, (value2) => {
  24863. isEmpty = false;
  24864. if (inline2) {
  24865. options.__inline2__ = false;
  24866. }
  24867. result.push(
  24868. (compact || inline2 ? "" : indent) + jsesc(value2, options)
  24869. );
  24870. });
  24871. if (isEmpty) {
  24872. return "[]";
  24873. }
  24874. if (inline2) {
  24875. return "[" + result.join(", ") + "]";
  24876. }
  24877. return "[" + newLine + result.join("," + newLine) + newLine + (compact ? "" : oldIndent) + "]";
  24878. } else if (isNumber(argument)) {
  24879. if (json) {
  24880. return JSON.stringify(argument);
  24881. }
  24882. if (useDecNumbers) {
  24883. return String(argument);
  24884. }
  24885. if (useHexNumbers) {
  24886. let hexadecimal = argument.toString(16);
  24887. if (!lowercaseHex) {
  24888. hexadecimal = hexadecimal.toUpperCase();
  24889. }
  24890. return "0x" + hexadecimal;
  24891. }
  24892. if (useBinNumbers) {
  24893. return "0b" + argument.toString(2);
  24894. }
  24895. if (useOctNumbers) {
  24896. return "0o" + argument.toString(8);
  24897. }
  24898. } else if (!isObject(argument)) {
  24899. if (json) {
  24900. return JSON.stringify(argument) || "null";
  24901. }
  24902. return String(argument);
  24903. } else {
  24904. result = [];
  24905. options.wrap = true;
  24906. increaseIndentation();
  24907. forOwn(argument, (key2, value2) => {
  24908. isEmpty = false;
  24909. result.push(
  24910. (compact ? "" : indent) + jsesc(key2, options) + ":" + (compact ? "" : " ") + jsesc(value2, options)
  24911. );
  24912. });
  24913. if (isEmpty) {
  24914. return "{}";
  24915. }
  24916. return "{" + newLine + result.join("," + newLine) + newLine + (compact ? "" : oldIndent) + "}";
  24917. }
  24918. }
  24919. const string3 = argument;
  24920. let index2 = -1;
  24921. const length = string3.length;
  24922. result = "";
  24923. while (++index2 < length) {
  24924. const character = string3.charAt(index2);
  24925. if (options.es6) {
  24926. const first = string3.charCodeAt(index2);
  24927. if (
  24928. // check if it’s the start of a surrogate pair
  24929. first >= 55296 && first <= 56319 && // high surrogate
  24930. length > index2 + 1
  24931. ) {
  24932. const second = string3.charCodeAt(index2 + 1);
  24933. if (second >= 56320 && second <= 57343) {
  24934. const codePoint = (first - 55296) * 1024 + second - 56320 + 65536;
  24935. let hexadecimal2 = codePoint.toString(16);
  24936. if (!lowercaseHex) {
  24937. hexadecimal2 = hexadecimal2.toUpperCase();
  24938. }
  24939. result += "\\u{" + hexadecimal2 + "}";
  24940. ++index2;
  24941. continue;
  24942. }
  24943. }
  24944. }
  24945. if (!options.escapeEverything) {
  24946. if (regexWhitelist.test(character)) {
  24947. result += character;
  24948. continue;
  24949. }
  24950. if (character == '"') {
  24951. result += quote == character ? '\\"' : character;
  24952. continue;
  24953. }
  24954. if (character == "`") {
  24955. result += quote == character ? "\\`" : character;
  24956. continue;
  24957. }
  24958. if (character == "'") {
  24959. result += quote == character ? "\\'" : character;
  24960. continue;
  24961. }
  24962. }
  24963. if (character == "\0" && !json && !regexDigit.test(string3.charAt(index2 + 1))) {
  24964. result += "\\0";
  24965. continue;
  24966. }
  24967. if (regexSingleEscape.test(character)) {
  24968. result += singleEscapes[character];
  24969. continue;
  24970. }
  24971. const charCode = character.charCodeAt(0);
  24972. if (options.minimal && charCode != 8232 && charCode != 8233) {
  24973. result += character;
  24974. continue;
  24975. }
  24976. let hexadecimal = charCode.toString(16);
  24977. if (!lowercaseHex) {
  24978. hexadecimal = hexadecimal.toUpperCase();
  24979. }
  24980. const longhand = hexadecimal.length > 2 || json;
  24981. const escaped = "\\" + (longhand ? "u" : "x") + ("0000" + hexadecimal).slice(longhand ? -4 : -2);
  24982. result += escaped;
  24983. continue;
  24984. }
  24985. if (options.wrap) {
  24986. result = quote + result + quote;
  24987. }
  24988. if (quote == "`") {
  24989. result = result.replace(/\$\{/g, "\\${");
  24990. }
  24991. if (options.isScriptContext) {
  24992. return result.replace(/<\/(script|style)/gi, "<\\/$1").replace(/<!--/g, json ? "\\u003C!--" : "\\x3C!--");
  24993. }
  24994. return result;
  24995. };
  24996. jsesc.version = "2.5.2";
  24997. module.exports = jsesc;
  24998. }
  24999. });
  25000. // node_modules/@babel/generator/lib/generators/types.js
  25001. var require_types = __commonJS({
  25002. "node_modules/@babel/generator/lib/generators/types.js"(exports) {
  25003. "use strict";
  25004. Object.defineProperty(exports, "__esModule", {
  25005. value: true
  25006. });
  25007. exports.ArgumentPlaceholder = ArgumentPlaceholder;
  25008. exports.ArrayPattern = exports.ArrayExpression = ArrayExpression2;
  25009. exports.BigIntLiteral = BigIntLiteral;
  25010. exports.BooleanLiteral = BooleanLiteral;
  25011. exports.DecimalLiteral = DecimalLiteral;
  25012. exports.Identifier = Identifier;
  25013. exports.NullLiteral = NullLiteral;
  25014. exports.NumericLiteral = NumericLiteral;
  25015. exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
  25016. exports.ObjectMethod = ObjectMethod;
  25017. exports.ObjectProperty = ObjectProperty;
  25018. exports.PipelineBareFunction = PipelineBareFunction;
  25019. exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
  25020. exports.PipelineTopicExpression = PipelineTopicExpression;
  25021. exports.RecordExpression = RecordExpression;
  25022. exports.RegExpLiteral = RegExpLiteral;
  25023. exports.SpreadElement = exports.RestElement = RestElement2;
  25024. exports.StringLiteral = StringLiteral;
  25025. exports.TopicReference = TopicReference;
  25026. exports.TupleExpression = TupleExpression;
  25027. var _t = require_lib3();
  25028. var _jsesc = require_jsesc();
  25029. var {
  25030. isAssignmentPattern,
  25031. isIdentifier: isIdentifier3
  25032. } = _t;
  25033. function Identifier(node2) {
  25034. var _node$loc;
  25035. this.sourceIdentifierName(((_node$loc = node2.loc) == null ? void 0 : _node$loc.identifierName) || node2.name);
  25036. this.word(node2.name);
  25037. }
  25038. function ArgumentPlaceholder() {
  25039. this.tokenChar(63);
  25040. }
  25041. function RestElement2(node2) {
  25042. this.token("...");
  25043. this.print(node2.argument, node2);
  25044. }
  25045. function ObjectExpression(node2) {
  25046. const props = node2.properties;
  25047. this.tokenChar(123);
  25048. if (props.length) {
  25049. this.space();
  25050. this.printList(props, node2, {
  25051. indent: true,
  25052. statement: true
  25053. });
  25054. this.space();
  25055. }
  25056. this.sourceWithOffset("end", node2.loc, 0, -1);
  25057. this.tokenChar(125);
  25058. }
  25059. function ObjectMethod(node2) {
  25060. this.printJoin(node2.decorators, node2);
  25061. this._methodHead(node2);
  25062. this.space();
  25063. this.print(node2.body, node2);
  25064. }
  25065. function ObjectProperty(node2) {
  25066. this.printJoin(node2.decorators, node2);
  25067. if (node2.computed) {
  25068. this.tokenChar(91);
  25069. this.print(node2.key, node2);
  25070. this.tokenChar(93);
  25071. } else {
  25072. if (isAssignmentPattern(node2.value) && isIdentifier3(node2.key) && node2.key.name === node2.value.left.name) {
  25073. this.print(node2.value, node2);
  25074. return;
  25075. }
  25076. this.print(node2.key, node2);
  25077. if (node2.shorthand && isIdentifier3(node2.key) && isIdentifier3(node2.value) && node2.key.name === node2.value.name) {
  25078. return;
  25079. }
  25080. }
  25081. this.tokenChar(58);
  25082. this.space();
  25083. this.print(node2.value, node2);
  25084. }
  25085. function ArrayExpression2(node2) {
  25086. const elems = node2.elements;
  25087. const len = elems.length;
  25088. this.tokenChar(91);
  25089. for (let i = 0; i < elems.length; i++) {
  25090. const elem = elems[i];
  25091. if (elem) {
  25092. if (i > 0)
  25093. this.space();
  25094. this.print(elem, node2);
  25095. if (i < len - 1)
  25096. this.tokenChar(44);
  25097. } else {
  25098. this.tokenChar(44);
  25099. }
  25100. }
  25101. this.tokenChar(93);
  25102. }
  25103. function RecordExpression(node2) {
  25104. const props = node2.properties;
  25105. let startToken;
  25106. let endToken;
  25107. if (this.format.recordAndTupleSyntaxType === "bar") {
  25108. startToken = "{|";
  25109. endToken = "|}";
  25110. } else if (this.format.recordAndTupleSyntaxType !== "hash" && this.format.recordAndTupleSyntaxType != null) {
  25111. throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);
  25112. } else {
  25113. startToken = "#{";
  25114. endToken = "}";
  25115. }
  25116. this.token(startToken);
  25117. if (props.length) {
  25118. this.space();
  25119. this.printList(props, node2, {
  25120. indent: true,
  25121. statement: true
  25122. });
  25123. this.space();
  25124. }
  25125. this.token(endToken);
  25126. }
  25127. function TupleExpression(node2) {
  25128. const elems = node2.elements;
  25129. const len = elems.length;
  25130. let startToken;
  25131. let endToken;
  25132. if (this.format.recordAndTupleSyntaxType === "bar") {
  25133. startToken = "[|";
  25134. endToken = "|]";
  25135. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  25136. startToken = "#[";
  25137. endToken = "]";
  25138. } else {
  25139. throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
  25140. }
  25141. this.token(startToken);
  25142. for (let i = 0; i < elems.length; i++) {
  25143. const elem = elems[i];
  25144. if (elem) {
  25145. if (i > 0)
  25146. this.space();
  25147. this.print(elem, node2);
  25148. if (i < len - 1)
  25149. this.tokenChar(44);
  25150. }
  25151. }
  25152. this.token(endToken);
  25153. }
  25154. function RegExpLiteral(node2) {
  25155. this.word(`/${node2.pattern}/${node2.flags}`);
  25156. }
  25157. function BooleanLiteral(node2) {
  25158. this.word(node2.value ? "true" : "false");
  25159. }
  25160. function NullLiteral() {
  25161. this.word("null");
  25162. }
  25163. function NumericLiteral(node2) {
  25164. const raw = this.getPossibleRaw(node2);
  25165. const opts = this.format.jsescOption;
  25166. const value2 = node2.value + "";
  25167. if (opts.numbers) {
  25168. this.number(_jsesc(node2.value, opts));
  25169. } else if (raw == null) {
  25170. this.number(value2);
  25171. } else if (this.format.minified) {
  25172. this.number(raw.length < value2.length ? raw : value2);
  25173. } else {
  25174. this.number(raw);
  25175. }
  25176. }
  25177. function StringLiteral(node2) {
  25178. const raw = this.getPossibleRaw(node2);
  25179. if (!this.format.minified && raw !== void 0) {
  25180. this.token(raw);
  25181. return;
  25182. }
  25183. const val = _jsesc(node2.value, this.format.jsescOption);
  25184. this.token(val);
  25185. }
  25186. function BigIntLiteral(node2) {
  25187. const raw = this.getPossibleRaw(node2);
  25188. if (!this.format.minified && raw !== void 0) {
  25189. this.word(raw);
  25190. return;
  25191. }
  25192. this.word(node2.value + "n");
  25193. }
  25194. function DecimalLiteral(node2) {
  25195. const raw = this.getPossibleRaw(node2);
  25196. if (!this.format.minified && raw !== void 0) {
  25197. this.word(raw);
  25198. return;
  25199. }
  25200. this.word(node2.value + "m");
  25201. }
  25202. var validTopicTokenSet = /* @__PURE__ */ new Set(["^^", "@@", "^", "%", "#"]);
  25203. function TopicReference() {
  25204. const {
  25205. topicToken
  25206. } = this.format;
  25207. if (validTopicTokenSet.has(topicToken)) {
  25208. this.token(topicToken);
  25209. } else {
  25210. const givenTopicTokenJSON = JSON.stringify(topicToken);
  25211. const validTopics = Array.from(validTopicTokenSet, (v) => JSON.stringify(v));
  25212. throw new Error(`The "topicToken" generator option must be one of ${validTopics.join(", ")} (${givenTopicTokenJSON} received instead).`);
  25213. }
  25214. }
  25215. function PipelineTopicExpression(node2) {
  25216. this.print(node2.expression, node2);
  25217. }
  25218. function PipelineBareFunction(node2) {
  25219. this.print(node2.callee, node2);
  25220. }
  25221. function PipelinePrimaryTopicReference() {
  25222. this.tokenChar(35);
  25223. }
  25224. }
  25225. });
  25226. // node_modules/@babel/generator/lib/generators/flow.js
  25227. var require_flow2 = __commonJS({
  25228. "node_modules/@babel/generator/lib/generators/flow.js"(exports) {
  25229. "use strict";
  25230. Object.defineProperty(exports, "__esModule", {
  25231. value: true
  25232. });
  25233. exports.AnyTypeAnnotation = AnyTypeAnnotation;
  25234. exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
  25235. exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
  25236. exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
  25237. exports.DeclareClass = DeclareClass;
  25238. exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
  25239. exports.DeclareExportDeclaration = DeclareExportDeclaration;
  25240. exports.DeclareFunction = DeclareFunction;
  25241. exports.DeclareInterface = DeclareInterface;
  25242. exports.DeclareModule = DeclareModule;
  25243. exports.DeclareModuleExports = DeclareModuleExports;
  25244. exports.DeclareOpaqueType = DeclareOpaqueType;
  25245. exports.DeclareTypeAlias = DeclareTypeAlias;
  25246. exports.DeclareVariable = DeclareVariable;
  25247. exports.DeclaredPredicate = DeclaredPredicate;
  25248. exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
  25249. exports.EnumBooleanBody = EnumBooleanBody;
  25250. exports.EnumBooleanMember = EnumBooleanMember;
  25251. exports.EnumDeclaration = EnumDeclaration;
  25252. exports.EnumDefaultedMember = EnumDefaultedMember;
  25253. exports.EnumNumberBody = EnumNumberBody;
  25254. exports.EnumNumberMember = EnumNumberMember;
  25255. exports.EnumStringBody = EnumStringBody;
  25256. exports.EnumStringMember = EnumStringMember;
  25257. exports.EnumSymbolBody = EnumSymbolBody;
  25258. exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
  25259. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  25260. exports.FunctionTypeParam = FunctionTypeParam;
  25261. exports.IndexedAccessType = IndexedAccessType;
  25262. exports.InferredPredicate = InferredPredicate;
  25263. exports.InterfaceDeclaration = InterfaceDeclaration;
  25264. exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
  25265. exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
  25266. exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
  25267. exports.MixedTypeAnnotation = MixedTypeAnnotation;
  25268. exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
  25269. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  25270. Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
  25271. enumerable: true,
  25272. get: function() {
  25273. return _types2.NumericLiteral;
  25274. }
  25275. });
  25276. exports.NumberTypeAnnotation = NumberTypeAnnotation;
  25277. exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
  25278. exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
  25279. exports.ObjectTypeIndexer = ObjectTypeIndexer;
  25280. exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
  25281. exports.ObjectTypeProperty = ObjectTypeProperty;
  25282. exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
  25283. exports.OpaqueType = OpaqueType;
  25284. exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
  25285. exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
  25286. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  25287. enumerable: true,
  25288. get: function() {
  25289. return _types2.StringLiteral;
  25290. }
  25291. });
  25292. exports.StringTypeAnnotation = StringTypeAnnotation;
  25293. exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
  25294. exports.ThisTypeAnnotation = ThisTypeAnnotation;
  25295. exports.TupleTypeAnnotation = TupleTypeAnnotation;
  25296. exports.TypeAlias = TypeAlias;
  25297. exports.TypeAnnotation = TypeAnnotation;
  25298. exports.TypeCastExpression = TypeCastExpression;
  25299. exports.TypeParameter = TypeParameter;
  25300. exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
  25301. exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
  25302. exports.UnionTypeAnnotation = UnionTypeAnnotation;
  25303. exports.Variance = Variance;
  25304. exports.VoidTypeAnnotation = VoidTypeAnnotation;
  25305. exports._interfaceish = _interfaceish;
  25306. exports._variance = _variance;
  25307. var _t = require_lib3();
  25308. var _modules = require_modules();
  25309. var _types2 = require_types();
  25310. var {
  25311. isDeclareExportDeclaration,
  25312. isStatement
  25313. } = _t;
  25314. function AnyTypeAnnotation() {
  25315. this.word("any");
  25316. }
  25317. function ArrayTypeAnnotation(node2) {
  25318. this.print(node2.elementType, node2, true);
  25319. this.tokenChar(91);
  25320. this.tokenChar(93);
  25321. }
  25322. function BooleanTypeAnnotation() {
  25323. this.word("boolean");
  25324. }
  25325. function BooleanLiteralTypeAnnotation(node2) {
  25326. this.word(node2.value ? "true" : "false");
  25327. }
  25328. function NullLiteralTypeAnnotation() {
  25329. this.word("null");
  25330. }
  25331. function DeclareClass(node2, parent) {
  25332. if (!isDeclareExportDeclaration(parent)) {
  25333. this.word("declare");
  25334. this.space();
  25335. }
  25336. this.word("class");
  25337. this.space();
  25338. this._interfaceish(node2);
  25339. }
  25340. function DeclareFunction(node2, parent) {
  25341. if (!isDeclareExportDeclaration(parent)) {
  25342. this.word("declare");
  25343. this.space();
  25344. }
  25345. this.word("function");
  25346. this.space();
  25347. this.print(node2.id, node2);
  25348. this.print(node2.id.typeAnnotation.typeAnnotation, node2);
  25349. if (node2.predicate) {
  25350. this.space();
  25351. this.print(node2.predicate, node2);
  25352. }
  25353. this.semicolon();
  25354. }
  25355. function InferredPredicate() {
  25356. this.tokenChar(37);
  25357. this.word("checks");
  25358. }
  25359. function DeclaredPredicate(node2) {
  25360. this.tokenChar(37);
  25361. this.word("checks");
  25362. this.tokenChar(40);
  25363. this.print(node2.value, node2);
  25364. this.tokenChar(41);
  25365. }
  25366. function DeclareInterface(node2) {
  25367. this.word("declare");
  25368. this.space();
  25369. this.InterfaceDeclaration(node2);
  25370. }
  25371. function DeclareModule(node2) {
  25372. this.word("declare");
  25373. this.space();
  25374. this.word("module");
  25375. this.space();
  25376. this.print(node2.id, node2);
  25377. this.space();
  25378. this.print(node2.body, node2);
  25379. }
  25380. function DeclareModuleExports(node2) {
  25381. this.word("declare");
  25382. this.space();
  25383. this.word("module");
  25384. this.tokenChar(46);
  25385. this.word("exports");
  25386. this.print(node2.typeAnnotation, node2);
  25387. }
  25388. function DeclareTypeAlias(node2) {
  25389. this.word("declare");
  25390. this.space();
  25391. this.TypeAlias(node2);
  25392. }
  25393. function DeclareOpaqueType(node2, parent) {
  25394. if (!isDeclareExportDeclaration(parent)) {
  25395. this.word("declare");
  25396. this.space();
  25397. }
  25398. this.OpaqueType(node2);
  25399. }
  25400. function DeclareVariable(node2, parent) {
  25401. if (!isDeclareExportDeclaration(parent)) {
  25402. this.word("declare");
  25403. this.space();
  25404. }
  25405. this.word("var");
  25406. this.space();
  25407. this.print(node2.id, node2);
  25408. this.print(node2.id.typeAnnotation, node2);
  25409. this.semicolon();
  25410. }
  25411. function DeclareExportDeclaration(node2) {
  25412. this.word("declare");
  25413. this.space();
  25414. this.word("export");
  25415. this.space();
  25416. if (node2.default) {
  25417. this.word("default");
  25418. this.space();
  25419. }
  25420. FlowExportDeclaration.call(this, node2);
  25421. }
  25422. function DeclareExportAllDeclaration(node2) {
  25423. this.word("declare");
  25424. this.space();
  25425. _modules.ExportAllDeclaration.call(this, node2);
  25426. }
  25427. function EnumDeclaration(node2) {
  25428. const {
  25429. id,
  25430. body
  25431. } = node2;
  25432. this.word("enum");
  25433. this.space();
  25434. this.print(id, node2);
  25435. this.print(body, node2);
  25436. }
  25437. function enumExplicitType(context, name2, hasExplicitType) {
  25438. if (hasExplicitType) {
  25439. context.space();
  25440. context.word("of");
  25441. context.space();
  25442. context.word(name2);
  25443. }
  25444. context.space();
  25445. }
  25446. function enumBody(context, node2) {
  25447. const {
  25448. members
  25449. } = node2;
  25450. context.token("{");
  25451. context.indent();
  25452. context.newline();
  25453. for (const member of members) {
  25454. context.print(member, node2);
  25455. context.newline();
  25456. }
  25457. if (node2.hasUnknownMembers) {
  25458. context.token("...");
  25459. context.newline();
  25460. }
  25461. context.dedent();
  25462. context.token("}");
  25463. }
  25464. function EnumBooleanBody(node2) {
  25465. const {
  25466. explicitType
  25467. } = node2;
  25468. enumExplicitType(this, "boolean", explicitType);
  25469. enumBody(this, node2);
  25470. }
  25471. function EnumNumberBody(node2) {
  25472. const {
  25473. explicitType
  25474. } = node2;
  25475. enumExplicitType(this, "number", explicitType);
  25476. enumBody(this, node2);
  25477. }
  25478. function EnumStringBody(node2) {
  25479. const {
  25480. explicitType
  25481. } = node2;
  25482. enumExplicitType(this, "string", explicitType);
  25483. enumBody(this, node2);
  25484. }
  25485. function EnumSymbolBody(node2) {
  25486. enumExplicitType(this, "symbol", true);
  25487. enumBody(this, node2);
  25488. }
  25489. function EnumDefaultedMember(node2) {
  25490. const {
  25491. id
  25492. } = node2;
  25493. this.print(id, node2);
  25494. this.tokenChar(44);
  25495. }
  25496. function enumInitializedMember(context, node2) {
  25497. const {
  25498. id,
  25499. init
  25500. } = node2;
  25501. context.print(id, node2);
  25502. context.space();
  25503. context.token("=");
  25504. context.space();
  25505. context.print(init, node2);
  25506. context.token(",");
  25507. }
  25508. function EnumBooleanMember(node2) {
  25509. enumInitializedMember(this, node2);
  25510. }
  25511. function EnumNumberMember(node2) {
  25512. enumInitializedMember(this, node2);
  25513. }
  25514. function EnumStringMember(node2) {
  25515. enumInitializedMember(this, node2);
  25516. }
  25517. function FlowExportDeclaration(node2) {
  25518. if (node2.declaration) {
  25519. const declar = node2.declaration;
  25520. this.print(declar, node2);
  25521. if (!isStatement(declar))
  25522. this.semicolon();
  25523. } else {
  25524. this.tokenChar(123);
  25525. if (node2.specifiers.length) {
  25526. this.space();
  25527. this.printList(node2.specifiers, node2);
  25528. this.space();
  25529. }
  25530. this.tokenChar(125);
  25531. if (node2.source) {
  25532. this.space();
  25533. this.word("from");
  25534. this.space();
  25535. this.print(node2.source, node2);
  25536. }
  25537. this.semicolon();
  25538. }
  25539. }
  25540. function ExistsTypeAnnotation() {
  25541. this.tokenChar(42);
  25542. }
  25543. function FunctionTypeAnnotation(node2, parent) {
  25544. this.print(node2.typeParameters, node2);
  25545. this.tokenChar(40);
  25546. if (node2.this) {
  25547. this.word("this");
  25548. this.tokenChar(58);
  25549. this.space();
  25550. this.print(node2.this.typeAnnotation, node2);
  25551. if (node2.params.length || node2.rest) {
  25552. this.tokenChar(44);
  25553. this.space();
  25554. }
  25555. }
  25556. this.printList(node2.params, node2);
  25557. if (node2.rest) {
  25558. if (node2.params.length) {
  25559. this.tokenChar(44);
  25560. this.space();
  25561. }
  25562. this.token("...");
  25563. this.print(node2.rest, node2);
  25564. }
  25565. this.tokenChar(41);
  25566. if (parent && (parent.type === "ObjectTypeCallProperty" || parent.type === "ObjectTypeInternalSlot" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method)) {
  25567. this.tokenChar(58);
  25568. } else {
  25569. this.space();
  25570. this.token("=>");
  25571. }
  25572. this.space();
  25573. this.print(node2.returnType, node2);
  25574. }
  25575. function FunctionTypeParam(node2) {
  25576. this.print(node2.name, node2);
  25577. if (node2.optional)
  25578. this.tokenChar(63);
  25579. if (node2.name) {
  25580. this.tokenChar(58);
  25581. this.space();
  25582. }
  25583. this.print(node2.typeAnnotation, node2);
  25584. }
  25585. function InterfaceExtends(node2) {
  25586. this.print(node2.id, node2);
  25587. this.print(node2.typeParameters, node2, true);
  25588. }
  25589. function _interfaceish(node2) {
  25590. var _node$extends;
  25591. this.print(node2.id, node2);
  25592. this.print(node2.typeParameters, node2);
  25593. if ((_node$extends = node2.extends) != null && _node$extends.length) {
  25594. this.space();
  25595. this.word("extends");
  25596. this.space();
  25597. this.printList(node2.extends, node2);
  25598. }
  25599. if (node2.mixins && node2.mixins.length) {
  25600. this.space();
  25601. this.word("mixins");
  25602. this.space();
  25603. this.printList(node2.mixins, node2);
  25604. }
  25605. if (node2.implements && node2.implements.length) {
  25606. this.space();
  25607. this.word("implements");
  25608. this.space();
  25609. this.printList(node2.implements, node2);
  25610. }
  25611. this.space();
  25612. this.print(node2.body, node2);
  25613. }
  25614. function _variance(node2) {
  25615. if (node2.variance) {
  25616. if (node2.variance.kind === "plus") {
  25617. this.tokenChar(43);
  25618. } else if (node2.variance.kind === "minus") {
  25619. this.tokenChar(45);
  25620. }
  25621. }
  25622. }
  25623. function InterfaceDeclaration(node2) {
  25624. this.word("interface");
  25625. this.space();
  25626. this._interfaceish(node2);
  25627. }
  25628. function andSeparator() {
  25629. this.space();
  25630. this.tokenChar(38);
  25631. this.space();
  25632. }
  25633. function InterfaceTypeAnnotation(node2) {
  25634. this.word("interface");
  25635. if (node2.extends && node2.extends.length) {
  25636. this.space();
  25637. this.word("extends");
  25638. this.space();
  25639. this.printList(node2.extends, node2);
  25640. }
  25641. this.space();
  25642. this.print(node2.body, node2);
  25643. }
  25644. function IntersectionTypeAnnotation(node2) {
  25645. this.printJoin(node2.types, node2, {
  25646. separator: andSeparator
  25647. });
  25648. }
  25649. function MixedTypeAnnotation() {
  25650. this.word("mixed");
  25651. }
  25652. function EmptyTypeAnnotation() {
  25653. this.word("empty");
  25654. }
  25655. function NullableTypeAnnotation(node2) {
  25656. this.tokenChar(63);
  25657. this.print(node2.typeAnnotation, node2);
  25658. }
  25659. function NumberTypeAnnotation() {
  25660. this.word("number");
  25661. }
  25662. function StringTypeAnnotation() {
  25663. this.word("string");
  25664. }
  25665. function ThisTypeAnnotation() {
  25666. this.word("this");
  25667. }
  25668. function TupleTypeAnnotation(node2) {
  25669. this.tokenChar(91);
  25670. this.printList(node2.types, node2);
  25671. this.tokenChar(93);
  25672. }
  25673. function TypeofTypeAnnotation(node2) {
  25674. this.word("typeof");
  25675. this.space();
  25676. this.print(node2.argument, node2);
  25677. }
  25678. function TypeAlias(node2) {
  25679. this.word("type");
  25680. this.space();
  25681. this.print(node2.id, node2);
  25682. this.print(node2.typeParameters, node2);
  25683. this.space();
  25684. this.tokenChar(61);
  25685. this.space();
  25686. this.print(node2.right, node2);
  25687. this.semicolon();
  25688. }
  25689. function TypeAnnotation(node2) {
  25690. this.tokenChar(58);
  25691. this.space();
  25692. if (node2.optional)
  25693. this.tokenChar(63);
  25694. this.print(node2.typeAnnotation, node2);
  25695. }
  25696. function TypeParameterInstantiation(node2) {
  25697. this.tokenChar(60);
  25698. this.printList(node2.params, node2, {});
  25699. this.tokenChar(62);
  25700. }
  25701. function TypeParameter(node2) {
  25702. this._variance(node2);
  25703. this.word(node2.name);
  25704. if (node2.bound) {
  25705. this.print(node2.bound, node2);
  25706. }
  25707. if (node2.default) {
  25708. this.space();
  25709. this.tokenChar(61);
  25710. this.space();
  25711. this.print(node2.default, node2);
  25712. }
  25713. }
  25714. function OpaqueType(node2) {
  25715. this.word("opaque");
  25716. this.space();
  25717. this.word("type");
  25718. this.space();
  25719. this.print(node2.id, node2);
  25720. this.print(node2.typeParameters, node2);
  25721. if (node2.supertype) {
  25722. this.tokenChar(58);
  25723. this.space();
  25724. this.print(node2.supertype, node2);
  25725. }
  25726. if (node2.impltype) {
  25727. this.space();
  25728. this.tokenChar(61);
  25729. this.space();
  25730. this.print(node2.impltype, node2);
  25731. }
  25732. this.semicolon();
  25733. }
  25734. function ObjectTypeAnnotation(node2) {
  25735. if (node2.exact) {
  25736. this.token("{|");
  25737. } else {
  25738. this.tokenChar(123);
  25739. }
  25740. const props = [...node2.properties, ...node2.callProperties || [], ...node2.indexers || [], ...node2.internalSlots || []];
  25741. if (props.length) {
  25742. this.newline();
  25743. this.space();
  25744. this.printJoin(props, node2, {
  25745. addNewlines(leading) {
  25746. if (leading && !props[0])
  25747. return 1;
  25748. },
  25749. indent: true,
  25750. statement: true,
  25751. iterator: () => {
  25752. if (props.length !== 1 || node2.inexact) {
  25753. this.tokenChar(44);
  25754. this.space();
  25755. }
  25756. }
  25757. });
  25758. this.space();
  25759. }
  25760. if (node2.inexact) {
  25761. this.indent();
  25762. this.token("...");
  25763. if (props.length) {
  25764. this.newline();
  25765. }
  25766. this.dedent();
  25767. }
  25768. if (node2.exact) {
  25769. this.token("|}");
  25770. } else {
  25771. this.tokenChar(125);
  25772. }
  25773. }
  25774. function ObjectTypeInternalSlot(node2) {
  25775. if (node2.static) {
  25776. this.word("static");
  25777. this.space();
  25778. }
  25779. this.tokenChar(91);
  25780. this.tokenChar(91);
  25781. this.print(node2.id, node2);
  25782. this.tokenChar(93);
  25783. this.tokenChar(93);
  25784. if (node2.optional)
  25785. this.tokenChar(63);
  25786. if (!node2.method) {
  25787. this.tokenChar(58);
  25788. this.space();
  25789. }
  25790. this.print(node2.value, node2);
  25791. }
  25792. function ObjectTypeCallProperty(node2) {
  25793. if (node2.static) {
  25794. this.word("static");
  25795. this.space();
  25796. }
  25797. this.print(node2.value, node2);
  25798. }
  25799. function ObjectTypeIndexer(node2) {
  25800. if (node2.static) {
  25801. this.word("static");
  25802. this.space();
  25803. }
  25804. this._variance(node2);
  25805. this.tokenChar(91);
  25806. if (node2.id) {
  25807. this.print(node2.id, node2);
  25808. this.tokenChar(58);
  25809. this.space();
  25810. }
  25811. this.print(node2.key, node2);
  25812. this.tokenChar(93);
  25813. this.tokenChar(58);
  25814. this.space();
  25815. this.print(node2.value, node2);
  25816. }
  25817. function ObjectTypeProperty(node2) {
  25818. if (node2.proto) {
  25819. this.word("proto");
  25820. this.space();
  25821. }
  25822. if (node2.static) {
  25823. this.word("static");
  25824. this.space();
  25825. }
  25826. if (node2.kind === "get" || node2.kind === "set") {
  25827. this.word(node2.kind);
  25828. this.space();
  25829. }
  25830. this._variance(node2);
  25831. this.print(node2.key, node2);
  25832. if (node2.optional)
  25833. this.tokenChar(63);
  25834. if (!node2.method) {
  25835. this.tokenChar(58);
  25836. this.space();
  25837. }
  25838. this.print(node2.value, node2);
  25839. }
  25840. function ObjectTypeSpreadProperty(node2) {
  25841. this.token("...");
  25842. this.print(node2.argument, node2);
  25843. }
  25844. function QualifiedTypeIdentifier(node2) {
  25845. this.print(node2.qualification, node2);
  25846. this.tokenChar(46);
  25847. this.print(node2.id, node2);
  25848. }
  25849. function SymbolTypeAnnotation() {
  25850. this.word("symbol");
  25851. }
  25852. function orSeparator() {
  25853. this.space();
  25854. this.tokenChar(124);
  25855. this.space();
  25856. }
  25857. function UnionTypeAnnotation(node2) {
  25858. this.printJoin(node2.types, node2, {
  25859. separator: orSeparator
  25860. });
  25861. }
  25862. function TypeCastExpression(node2) {
  25863. this.tokenChar(40);
  25864. this.print(node2.expression, node2);
  25865. this.print(node2.typeAnnotation, node2);
  25866. this.tokenChar(41);
  25867. }
  25868. function Variance(node2) {
  25869. if (node2.kind === "plus") {
  25870. this.tokenChar(43);
  25871. } else {
  25872. this.tokenChar(45);
  25873. }
  25874. }
  25875. function VoidTypeAnnotation() {
  25876. this.word("void");
  25877. }
  25878. function IndexedAccessType(node2) {
  25879. this.print(node2.objectType, node2, true);
  25880. this.tokenChar(91);
  25881. this.print(node2.indexType, node2);
  25882. this.tokenChar(93);
  25883. }
  25884. function OptionalIndexedAccessType(node2) {
  25885. this.print(node2.objectType, node2);
  25886. if (node2.optional) {
  25887. this.token("?.");
  25888. }
  25889. this.tokenChar(91);
  25890. this.print(node2.indexType, node2);
  25891. this.tokenChar(93);
  25892. }
  25893. }
  25894. });
  25895. // node_modules/@babel/generator/lib/generators/base.js
  25896. var require_base = __commonJS({
  25897. "node_modules/@babel/generator/lib/generators/base.js"(exports) {
  25898. "use strict";
  25899. Object.defineProperty(exports, "__esModule", {
  25900. value: true
  25901. });
  25902. exports.BlockStatement = BlockStatement2;
  25903. exports.Directive = Directive;
  25904. exports.DirectiveLiteral = DirectiveLiteral;
  25905. exports.File = File;
  25906. exports.InterpreterDirective = InterpreterDirective;
  25907. exports.Placeholder = Placeholder;
  25908. exports.Program = Program;
  25909. function File(node2) {
  25910. if (node2.program) {
  25911. this.print(node2.program.interpreter, node2);
  25912. }
  25913. this.print(node2.program, node2);
  25914. }
  25915. function Program(node2) {
  25916. var _node$directives;
  25917. this.noIndentInnerCommentsHere();
  25918. this.printInnerComments();
  25919. const directivesLen = (_node$directives = node2.directives) == null ? void 0 : _node$directives.length;
  25920. if (directivesLen) {
  25921. var _node$directives$trai;
  25922. const newline = node2.body.length ? 2 : 1;
  25923. this.printSequence(node2.directives, node2, {
  25924. trailingCommentsLineOffset: newline
  25925. });
  25926. if (!((_node$directives$trai = node2.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai.length)) {
  25927. this.newline(newline);
  25928. }
  25929. }
  25930. this.printSequence(node2.body, node2);
  25931. }
  25932. function BlockStatement2(node2) {
  25933. var _node$directives2;
  25934. this.tokenChar(123);
  25935. const directivesLen = (_node$directives2 = node2.directives) == null ? void 0 : _node$directives2.length;
  25936. if (directivesLen) {
  25937. var _node$directives$trai2;
  25938. const newline = node2.body.length ? 2 : 1;
  25939. this.printSequence(node2.directives, node2, {
  25940. indent: true,
  25941. trailingCommentsLineOffset: newline
  25942. });
  25943. if (!((_node$directives$trai2 = node2.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai2.length)) {
  25944. this.newline(newline);
  25945. }
  25946. }
  25947. this.printSequence(node2.body, node2, {
  25948. indent: true
  25949. });
  25950. this.sourceWithOffset("end", node2.loc, 0, -1);
  25951. this.rightBrace();
  25952. }
  25953. function Directive(node2) {
  25954. this.print(node2.value, node2);
  25955. this.semicolon();
  25956. }
  25957. var unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
  25958. var unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
  25959. function DirectiveLiteral(node2) {
  25960. const raw = this.getPossibleRaw(node2);
  25961. if (!this.format.minified && raw !== void 0) {
  25962. this.token(raw);
  25963. return;
  25964. }
  25965. const {
  25966. value: value2
  25967. } = node2;
  25968. if (!unescapedDoubleQuoteRE.test(value2)) {
  25969. this.token(`"${value2}"`);
  25970. } else if (!unescapedSingleQuoteRE.test(value2)) {
  25971. this.token(`'${value2}'`);
  25972. } else {
  25973. throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");
  25974. }
  25975. }
  25976. function InterpreterDirective(node2) {
  25977. this.token(`#!${node2.value}`);
  25978. this.newline(1, true);
  25979. }
  25980. function Placeholder(node2) {
  25981. this.token("%%");
  25982. this.print(node2.name);
  25983. this.token("%%");
  25984. if (node2.expectedNode === "Statement") {
  25985. this.semicolon();
  25986. }
  25987. }
  25988. }
  25989. });
  25990. // node_modules/@babel/generator/lib/generators/jsx.js
  25991. var require_jsx2 = __commonJS({
  25992. "node_modules/@babel/generator/lib/generators/jsx.js"(exports) {
  25993. "use strict";
  25994. Object.defineProperty(exports, "__esModule", {
  25995. value: true
  25996. });
  25997. exports.JSXAttribute = JSXAttribute2;
  25998. exports.JSXClosingElement = JSXClosingElement2;
  25999. exports.JSXClosingFragment = JSXClosingFragment2;
  26000. exports.JSXElement = JSXElement2;
  26001. exports.JSXEmptyExpression = JSXEmptyExpression2;
  26002. exports.JSXExpressionContainer = JSXExpressionContainer2;
  26003. exports.JSXFragment = JSXFragment2;
  26004. exports.JSXIdentifier = JSXIdentifier2;
  26005. exports.JSXMemberExpression = JSXMemberExpression2;
  26006. exports.JSXNamespacedName = JSXNamespacedName2;
  26007. exports.JSXOpeningElement = JSXOpeningElement2;
  26008. exports.JSXOpeningFragment = JSXOpeningFragment2;
  26009. exports.JSXSpreadAttribute = JSXSpreadAttribute2;
  26010. exports.JSXSpreadChild = JSXSpreadChild;
  26011. exports.JSXText = JSXText2;
  26012. function JSXAttribute2(node2) {
  26013. this.print(node2.name, node2);
  26014. if (node2.value) {
  26015. this.tokenChar(61);
  26016. this.print(node2.value, node2);
  26017. }
  26018. }
  26019. function JSXIdentifier2(node2) {
  26020. this.word(node2.name);
  26021. }
  26022. function JSXNamespacedName2(node2) {
  26023. this.print(node2.namespace, node2);
  26024. this.tokenChar(58);
  26025. this.print(node2.name, node2);
  26026. }
  26027. function JSXMemberExpression2(node2) {
  26028. this.print(node2.object, node2);
  26029. this.tokenChar(46);
  26030. this.print(node2.property, node2);
  26031. }
  26032. function JSXSpreadAttribute2(node2) {
  26033. this.tokenChar(123);
  26034. this.token("...");
  26035. this.print(node2.argument, node2);
  26036. this.tokenChar(125);
  26037. }
  26038. function JSXExpressionContainer2(node2) {
  26039. this.tokenChar(123);
  26040. this.print(node2.expression, node2);
  26041. this.tokenChar(125);
  26042. }
  26043. function JSXSpreadChild(node2) {
  26044. this.tokenChar(123);
  26045. this.token("...");
  26046. this.print(node2.expression, node2);
  26047. this.tokenChar(125);
  26048. }
  26049. function JSXText2(node2) {
  26050. const raw = this.getPossibleRaw(node2);
  26051. if (raw !== void 0) {
  26052. this.token(raw, true);
  26053. } else {
  26054. this.token(node2.value, true);
  26055. }
  26056. }
  26057. function JSXElement2(node2) {
  26058. const open = node2.openingElement;
  26059. this.print(open, node2);
  26060. if (open.selfClosing)
  26061. return;
  26062. this.indent();
  26063. for (const child of node2.children) {
  26064. this.print(child, node2);
  26065. }
  26066. this.dedent();
  26067. this.print(node2.closingElement, node2);
  26068. }
  26069. function spaceSeparator() {
  26070. this.space();
  26071. }
  26072. function JSXOpeningElement2(node2) {
  26073. this.tokenChar(60);
  26074. this.print(node2.name, node2);
  26075. this.print(node2.typeParameters, node2);
  26076. if (node2.attributes.length > 0) {
  26077. this.space();
  26078. this.printJoin(node2.attributes, node2, {
  26079. separator: spaceSeparator
  26080. });
  26081. }
  26082. if (node2.selfClosing) {
  26083. this.space();
  26084. this.token("/>");
  26085. } else {
  26086. this.tokenChar(62);
  26087. }
  26088. }
  26089. function JSXClosingElement2(node2) {
  26090. this.token("</");
  26091. this.print(node2.name, node2);
  26092. this.tokenChar(62);
  26093. }
  26094. function JSXEmptyExpression2() {
  26095. this.printInnerComments();
  26096. }
  26097. function JSXFragment2(node2) {
  26098. this.print(node2.openingFragment, node2);
  26099. this.indent();
  26100. for (const child of node2.children) {
  26101. this.print(child, node2);
  26102. }
  26103. this.dedent();
  26104. this.print(node2.closingFragment, node2);
  26105. }
  26106. function JSXOpeningFragment2() {
  26107. this.tokenChar(60);
  26108. this.tokenChar(62);
  26109. }
  26110. function JSXClosingFragment2() {
  26111. this.token("</");
  26112. this.tokenChar(62);
  26113. }
  26114. }
  26115. });
  26116. // node_modules/@babel/generator/lib/generators/typescript.js
  26117. var require_typescript2 = __commonJS({
  26118. "node_modules/@babel/generator/lib/generators/typescript.js"(exports) {
  26119. "use strict";
  26120. Object.defineProperty(exports, "__esModule", {
  26121. value: true
  26122. });
  26123. exports.TSAnyKeyword = TSAnyKeyword;
  26124. exports.TSArrayType = TSArrayType;
  26125. exports.TSSatisfiesExpression = exports.TSAsExpression = TSTypeExpression;
  26126. exports.TSBigIntKeyword = TSBigIntKeyword;
  26127. exports.TSBooleanKeyword = TSBooleanKeyword;
  26128. exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
  26129. exports.TSConditionalType = TSConditionalType;
  26130. exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
  26131. exports.TSConstructorType = TSConstructorType;
  26132. exports.TSDeclareFunction = TSDeclareFunction;
  26133. exports.TSDeclareMethod = TSDeclareMethod;
  26134. exports.TSEnumDeclaration = TSEnumDeclaration;
  26135. exports.TSEnumMember = TSEnumMember;
  26136. exports.TSExportAssignment = TSExportAssignment;
  26137. exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
  26138. exports.TSExternalModuleReference = TSExternalModuleReference;
  26139. exports.TSFunctionType = TSFunctionType;
  26140. exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
  26141. exports.TSImportType = TSImportType;
  26142. exports.TSIndexSignature = TSIndexSignature;
  26143. exports.TSIndexedAccessType = TSIndexedAccessType;
  26144. exports.TSInferType = TSInferType;
  26145. exports.TSInstantiationExpression = TSInstantiationExpression;
  26146. exports.TSInterfaceBody = TSInterfaceBody;
  26147. exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
  26148. exports.TSIntersectionType = TSIntersectionType;
  26149. exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
  26150. exports.TSLiteralType = TSLiteralType;
  26151. exports.TSMappedType = TSMappedType;
  26152. exports.TSMethodSignature = TSMethodSignature;
  26153. exports.TSModuleBlock = TSModuleBlock;
  26154. exports.TSModuleDeclaration = TSModuleDeclaration;
  26155. exports.TSNamedTupleMember = TSNamedTupleMember;
  26156. exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
  26157. exports.TSNeverKeyword = TSNeverKeyword;
  26158. exports.TSNonNullExpression = TSNonNullExpression;
  26159. exports.TSNullKeyword = TSNullKeyword;
  26160. exports.TSNumberKeyword = TSNumberKeyword;
  26161. exports.TSObjectKeyword = TSObjectKeyword;
  26162. exports.TSOptionalType = TSOptionalType;
  26163. exports.TSParameterProperty = TSParameterProperty;
  26164. exports.TSParenthesizedType = TSParenthesizedType;
  26165. exports.TSPropertySignature = TSPropertySignature;
  26166. exports.TSQualifiedName = TSQualifiedName;
  26167. exports.TSRestType = TSRestType;
  26168. exports.TSStringKeyword = TSStringKeyword;
  26169. exports.TSSymbolKeyword = TSSymbolKeyword;
  26170. exports.TSThisType = TSThisType;
  26171. exports.TSTupleType = TSTupleType;
  26172. exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
  26173. exports.TSTypeAnnotation = TSTypeAnnotation;
  26174. exports.TSTypeAssertion = TSTypeAssertion;
  26175. exports.TSTypeLiteral = TSTypeLiteral;
  26176. exports.TSTypeOperator = TSTypeOperator;
  26177. exports.TSTypeParameter = TSTypeParameter;
  26178. exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
  26179. exports.TSTypePredicate = TSTypePredicate;
  26180. exports.TSTypeQuery = TSTypeQuery;
  26181. exports.TSTypeReference = TSTypeReference;
  26182. exports.TSUndefinedKeyword = TSUndefinedKeyword;
  26183. exports.TSUnionType = TSUnionType;
  26184. exports.TSUnknownKeyword = TSUnknownKeyword;
  26185. exports.TSVoidKeyword = TSVoidKeyword;
  26186. exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
  26187. exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
  26188. exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
  26189. exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
  26190. exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
  26191. function TSTypeAnnotation(node2) {
  26192. this.tokenChar(58);
  26193. this.space();
  26194. if (node2.optional)
  26195. this.tokenChar(63);
  26196. this.print(node2.typeAnnotation, node2);
  26197. }
  26198. function TSTypeParameterInstantiation(node2, parent) {
  26199. this.tokenChar(60);
  26200. this.printList(node2.params, node2, {});
  26201. if (parent.type === "ArrowFunctionExpression" && node2.params.length === 1) {
  26202. this.tokenChar(44);
  26203. }
  26204. this.tokenChar(62);
  26205. }
  26206. function TSTypeParameter(node2) {
  26207. if (node2.in) {
  26208. this.word("in");
  26209. this.space();
  26210. }
  26211. if (node2.out) {
  26212. this.word("out");
  26213. this.space();
  26214. }
  26215. this.word(node2.name);
  26216. if (node2.constraint) {
  26217. this.space();
  26218. this.word("extends");
  26219. this.space();
  26220. this.print(node2.constraint, node2);
  26221. }
  26222. if (node2.default) {
  26223. this.space();
  26224. this.tokenChar(61);
  26225. this.space();
  26226. this.print(node2.default, node2);
  26227. }
  26228. }
  26229. function TSParameterProperty(node2) {
  26230. if (node2.accessibility) {
  26231. this.word(node2.accessibility);
  26232. this.space();
  26233. }
  26234. if (node2.readonly) {
  26235. this.word("readonly");
  26236. this.space();
  26237. }
  26238. this._param(node2.parameter);
  26239. }
  26240. function TSDeclareFunction(node2, parent) {
  26241. if (node2.declare) {
  26242. this.word("declare");
  26243. this.space();
  26244. }
  26245. this._functionHead(node2, parent);
  26246. this.tokenChar(59);
  26247. }
  26248. function TSDeclareMethod(node2) {
  26249. this._classMethodHead(node2);
  26250. this.tokenChar(59);
  26251. }
  26252. function TSQualifiedName(node2) {
  26253. this.print(node2.left, node2);
  26254. this.tokenChar(46);
  26255. this.print(node2.right, node2);
  26256. }
  26257. function TSCallSignatureDeclaration(node2) {
  26258. this.tsPrintSignatureDeclarationBase(node2);
  26259. this.tokenChar(59);
  26260. }
  26261. function TSConstructSignatureDeclaration(node2) {
  26262. this.word("new");
  26263. this.space();
  26264. this.tsPrintSignatureDeclarationBase(node2);
  26265. this.tokenChar(59);
  26266. }
  26267. function TSPropertySignature(node2) {
  26268. const {
  26269. readonly,
  26270. initializer
  26271. } = node2;
  26272. if (readonly) {
  26273. this.word("readonly");
  26274. this.space();
  26275. }
  26276. this.tsPrintPropertyOrMethodName(node2);
  26277. this.print(node2.typeAnnotation, node2);
  26278. if (initializer) {
  26279. this.space();
  26280. this.tokenChar(61);
  26281. this.space();
  26282. this.print(initializer, node2);
  26283. }
  26284. this.tokenChar(59);
  26285. }
  26286. function tsPrintPropertyOrMethodName(node2) {
  26287. if (node2.computed) {
  26288. this.tokenChar(91);
  26289. }
  26290. this.print(node2.key, node2);
  26291. if (node2.computed) {
  26292. this.tokenChar(93);
  26293. }
  26294. if (node2.optional) {
  26295. this.tokenChar(63);
  26296. }
  26297. }
  26298. function TSMethodSignature(node2) {
  26299. const {
  26300. kind
  26301. } = node2;
  26302. if (kind === "set" || kind === "get") {
  26303. this.word(kind);
  26304. this.space();
  26305. }
  26306. this.tsPrintPropertyOrMethodName(node2);
  26307. this.tsPrintSignatureDeclarationBase(node2);
  26308. this.tokenChar(59);
  26309. }
  26310. function TSIndexSignature(node2) {
  26311. const {
  26312. readonly,
  26313. static: isStatic
  26314. } = node2;
  26315. if (isStatic) {
  26316. this.word("static");
  26317. this.space();
  26318. }
  26319. if (readonly) {
  26320. this.word("readonly");
  26321. this.space();
  26322. }
  26323. this.tokenChar(91);
  26324. this._parameters(node2.parameters, node2);
  26325. this.tokenChar(93);
  26326. this.print(node2.typeAnnotation, node2);
  26327. this.tokenChar(59);
  26328. }
  26329. function TSAnyKeyword() {
  26330. this.word("any");
  26331. }
  26332. function TSBigIntKeyword() {
  26333. this.word("bigint");
  26334. }
  26335. function TSUnknownKeyword() {
  26336. this.word("unknown");
  26337. }
  26338. function TSNumberKeyword() {
  26339. this.word("number");
  26340. }
  26341. function TSObjectKeyword() {
  26342. this.word("object");
  26343. }
  26344. function TSBooleanKeyword() {
  26345. this.word("boolean");
  26346. }
  26347. function TSStringKeyword() {
  26348. this.word("string");
  26349. }
  26350. function TSSymbolKeyword() {
  26351. this.word("symbol");
  26352. }
  26353. function TSVoidKeyword() {
  26354. this.word("void");
  26355. }
  26356. function TSUndefinedKeyword() {
  26357. this.word("undefined");
  26358. }
  26359. function TSNullKeyword() {
  26360. this.word("null");
  26361. }
  26362. function TSNeverKeyword() {
  26363. this.word("never");
  26364. }
  26365. function TSIntrinsicKeyword() {
  26366. this.word("intrinsic");
  26367. }
  26368. function TSThisType() {
  26369. this.word("this");
  26370. }
  26371. function TSFunctionType(node2) {
  26372. this.tsPrintFunctionOrConstructorType(node2);
  26373. }
  26374. function TSConstructorType(node2) {
  26375. if (node2.abstract) {
  26376. this.word("abstract");
  26377. this.space();
  26378. }
  26379. this.word("new");
  26380. this.space();
  26381. this.tsPrintFunctionOrConstructorType(node2);
  26382. }
  26383. function tsPrintFunctionOrConstructorType(node2) {
  26384. const {
  26385. typeParameters
  26386. } = node2;
  26387. const parameters = node2.parameters;
  26388. this.print(typeParameters, node2);
  26389. this.tokenChar(40);
  26390. this._parameters(parameters, node2);
  26391. this.tokenChar(41);
  26392. this.space();
  26393. this.token("=>");
  26394. this.space();
  26395. const returnType = node2.typeAnnotation;
  26396. this.print(returnType.typeAnnotation, node2);
  26397. }
  26398. function TSTypeReference(node2) {
  26399. this.print(node2.typeName, node2, true);
  26400. this.print(node2.typeParameters, node2, true);
  26401. }
  26402. function TSTypePredicate(node2) {
  26403. if (node2.asserts) {
  26404. this.word("asserts");
  26405. this.space();
  26406. }
  26407. this.print(node2.parameterName);
  26408. if (node2.typeAnnotation) {
  26409. this.space();
  26410. this.word("is");
  26411. this.space();
  26412. this.print(node2.typeAnnotation.typeAnnotation);
  26413. }
  26414. }
  26415. function TSTypeQuery(node2) {
  26416. this.word("typeof");
  26417. this.space();
  26418. this.print(node2.exprName);
  26419. if (node2.typeParameters) {
  26420. this.print(node2.typeParameters, node2);
  26421. }
  26422. }
  26423. function TSTypeLiteral(node2) {
  26424. this.tsPrintTypeLiteralOrInterfaceBody(node2.members, node2);
  26425. }
  26426. function tsPrintTypeLiteralOrInterfaceBody(members, node2) {
  26427. tsPrintBraced(this, members, node2);
  26428. }
  26429. function tsPrintBraced(printer, members, node2) {
  26430. printer.token("{");
  26431. if (members.length) {
  26432. printer.indent();
  26433. printer.newline();
  26434. for (const member of members) {
  26435. printer.print(member, node2);
  26436. printer.newline();
  26437. }
  26438. printer.dedent();
  26439. }
  26440. printer.sourceWithOffset("end", node2.loc, 0, -1);
  26441. printer.rightBrace();
  26442. }
  26443. function TSArrayType(node2) {
  26444. this.print(node2.elementType, node2, true);
  26445. this.token("[]");
  26446. }
  26447. function TSTupleType(node2) {
  26448. this.tokenChar(91);
  26449. this.printList(node2.elementTypes, node2);
  26450. this.tokenChar(93);
  26451. }
  26452. function TSOptionalType(node2) {
  26453. this.print(node2.typeAnnotation, node2);
  26454. this.tokenChar(63);
  26455. }
  26456. function TSRestType(node2) {
  26457. this.token("...");
  26458. this.print(node2.typeAnnotation, node2);
  26459. }
  26460. function TSNamedTupleMember(node2) {
  26461. this.print(node2.label, node2);
  26462. if (node2.optional)
  26463. this.tokenChar(63);
  26464. this.tokenChar(58);
  26465. this.space();
  26466. this.print(node2.elementType, node2);
  26467. }
  26468. function TSUnionType(node2) {
  26469. tsPrintUnionOrIntersectionType(this, node2, "|");
  26470. }
  26471. function TSIntersectionType(node2) {
  26472. tsPrintUnionOrIntersectionType(this, node2, "&");
  26473. }
  26474. function tsPrintUnionOrIntersectionType(printer, node2, sep) {
  26475. printer.printJoin(node2.types, node2, {
  26476. separator() {
  26477. this.space();
  26478. this.token(sep);
  26479. this.space();
  26480. }
  26481. });
  26482. }
  26483. function TSConditionalType(node2) {
  26484. this.print(node2.checkType);
  26485. this.space();
  26486. this.word("extends");
  26487. this.space();
  26488. this.print(node2.extendsType);
  26489. this.space();
  26490. this.tokenChar(63);
  26491. this.space();
  26492. this.print(node2.trueType);
  26493. this.space();
  26494. this.tokenChar(58);
  26495. this.space();
  26496. this.print(node2.falseType);
  26497. }
  26498. function TSInferType(node2) {
  26499. this.token("infer");
  26500. this.space();
  26501. this.print(node2.typeParameter);
  26502. }
  26503. function TSParenthesizedType(node2) {
  26504. this.tokenChar(40);
  26505. this.print(node2.typeAnnotation, node2);
  26506. this.tokenChar(41);
  26507. }
  26508. function TSTypeOperator(node2) {
  26509. this.word(node2.operator);
  26510. this.space();
  26511. this.print(node2.typeAnnotation, node2);
  26512. }
  26513. function TSIndexedAccessType(node2) {
  26514. this.print(node2.objectType, node2, true);
  26515. this.tokenChar(91);
  26516. this.print(node2.indexType, node2);
  26517. this.tokenChar(93);
  26518. }
  26519. function TSMappedType(node2) {
  26520. const {
  26521. nameType,
  26522. optional,
  26523. readonly,
  26524. typeParameter
  26525. } = node2;
  26526. this.tokenChar(123);
  26527. this.space();
  26528. if (readonly) {
  26529. tokenIfPlusMinus(this, readonly);
  26530. this.word("readonly");
  26531. this.space();
  26532. }
  26533. this.tokenChar(91);
  26534. this.word(typeParameter.name);
  26535. this.space();
  26536. this.word("in");
  26537. this.space();
  26538. this.print(typeParameter.constraint, typeParameter);
  26539. if (nameType) {
  26540. this.space();
  26541. this.word("as");
  26542. this.space();
  26543. this.print(nameType, node2);
  26544. }
  26545. this.tokenChar(93);
  26546. if (optional) {
  26547. tokenIfPlusMinus(this, optional);
  26548. this.tokenChar(63);
  26549. }
  26550. this.tokenChar(58);
  26551. this.space();
  26552. this.print(node2.typeAnnotation, node2);
  26553. this.space();
  26554. this.tokenChar(125);
  26555. }
  26556. function tokenIfPlusMinus(self2, tok) {
  26557. if (tok !== true) {
  26558. self2.token(tok);
  26559. }
  26560. }
  26561. function TSLiteralType(node2) {
  26562. this.print(node2.literal, node2);
  26563. }
  26564. function TSExpressionWithTypeArguments(node2) {
  26565. this.print(node2.expression, node2);
  26566. this.print(node2.typeParameters, node2);
  26567. }
  26568. function TSInterfaceDeclaration(node2) {
  26569. const {
  26570. declare,
  26571. id,
  26572. typeParameters,
  26573. extends: extendz,
  26574. body
  26575. } = node2;
  26576. if (declare) {
  26577. this.word("declare");
  26578. this.space();
  26579. }
  26580. this.word("interface");
  26581. this.space();
  26582. this.print(id, node2);
  26583. this.print(typeParameters, node2);
  26584. if (extendz != null && extendz.length) {
  26585. this.space();
  26586. this.word("extends");
  26587. this.space();
  26588. this.printList(extendz, node2);
  26589. }
  26590. this.space();
  26591. this.print(body, node2);
  26592. }
  26593. function TSInterfaceBody(node2) {
  26594. this.tsPrintTypeLiteralOrInterfaceBody(node2.body, node2);
  26595. }
  26596. function TSTypeAliasDeclaration(node2) {
  26597. const {
  26598. declare,
  26599. id,
  26600. typeParameters,
  26601. typeAnnotation
  26602. } = node2;
  26603. if (declare) {
  26604. this.word("declare");
  26605. this.space();
  26606. }
  26607. this.word("type");
  26608. this.space();
  26609. this.print(id, node2);
  26610. this.print(typeParameters, node2);
  26611. this.space();
  26612. this.tokenChar(61);
  26613. this.space();
  26614. this.print(typeAnnotation, node2);
  26615. this.tokenChar(59);
  26616. }
  26617. function TSTypeExpression(node2) {
  26618. var _expression$trailingC;
  26619. const {
  26620. type,
  26621. expression,
  26622. typeAnnotation
  26623. } = node2;
  26624. const forceParens = !!((_expression$trailingC = expression.trailingComments) != null && _expression$trailingC.length);
  26625. this.print(expression, node2, true, void 0, forceParens);
  26626. this.space();
  26627. this.word(type === "TSAsExpression" ? "as" : "satisfies");
  26628. this.space();
  26629. this.print(typeAnnotation, node2);
  26630. }
  26631. function TSTypeAssertion(node2) {
  26632. const {
  26633. typeAnnotation,
  26634. expression
  26635. } = node2;
  26636. this.tokenChar(60);
  26637. this.print(typeAnnotation, node2);
  26638. this.tokenChar(62);
  26639. this.space();
  26640. this.print(expression, node2);
  26641. }
  26642. function TSInstantiationExpression(node2) {
  26643. this.print(node2.expression, node2);
  26644. this.print(node2.typeParameters, node2);
  26645. }
  26646. function TSEnumDeclaration(node2) {
  26647. const {
  26648. declare,
  26649. const: isConst,
  26650. id,
  26651. members
  26652. } = node2;
  26653. if (declare) {
  26654. this.word("declare");
  26655. this.space();
  26656. }
  26657. if (isConst) {
  26658. this.word("const");
  26659. this.space();
  26660. }
  26661. this.word("enum");
  26662. this.space();
  26663. this.print(id, node2);
  26664. this.space();
  26665. tsPrintBraced(this, members, node2);
  26666. }
  26667. function TSEnumMember(node2) {
  26668. const {
  26669. id,
  26670. initializer
  26671. } = node2;
  26672. this.print(id, node2);
  26673. if (initializer) {
  26674. this.space();
  26675. this.tokenChar(61);
  26676. this.space();
  26677. this.print(initializer, node2);
  26678. }
  26679. this.tokenChar(44);
  26680. }
  26681. function TSModuleDeclaration(node2) {
  26682. const {
  26683. declare,
  26684. id
  26685. } = node2;
  26686. if (declare) {
  26687. this.word("declare");
  26688. this.space();
  26689. }
  26690. if (!node2.global) {
  26691. this.word(id.type === "Identifier" ? "namespace" : "module");
  26692. this.space();
  26693. }
  26694. this.print(id, node2);
  26695. if (!node2.body) {
  26696. this.tokenChar(59);
  26697. return;
  26698. }
  26699. let body = node2.body;
  26700. while (body.type === "TSModuleDeclaration") {
  26701. this.tokenChar(46);
  26702. this.print(body.id, body);
  26703. body = body.body;
  26704. }
  26705. this.space();
  26706. this.print(body, node2);
  26707. }
  26708. function TSModuleBlock(node2) {
  26709. tsPrintBraced(this, node2.body, node2);
  26710. }
  26711. function TSImportType(node2) {
  26712. const {
  26713. argument,
  26714. qualifier,
  26715. typeParameters
  26716. } = node2;
  26717. this.word("import");
  26718. this.tokenChar(40);
  26719. this.print(argument, node2);
  26720. this.tokenChar(41);
  26721. if (qualifier) {
  26722. this.tokenChar(46);
  26723. this.print(qualifier, node2);
  26724. }
  26725. if (typeParameters) {
  26726. this.print(typeParameters, node2);
  26727. }
  26728. }
  26729. function TSImportEqualsDeclaration(node2) {
  26730. const {
  26731. isExport,
  26732. id,
  26733. moduleReference
  26734. } = node2;
  26735. if (isExport) {
  26736. this.word("export");
  26737. this.space();
  26738. }
  26739. this.word("import");
  26740. this.space();
  26741. this.print(id, node2);
  26742. this.space();
  26743. this.tokenChar(61);
  26744. this.space();
  26745. this.print(moduleReference, node2);
  26746. this.tokenChar(59);
  26747. }
  26748. function TSExternalModuleReference(node2) {
  26749. this.token("require(");
  26750. this.print(node2.expression, node2);
  26751. this.tokenChar(41);
  26752. }
  26753. function TSNonNullExpression(node2) {
  26754. this.print(node2.expression, node2);
  26755. this.tokenChar(33);
  26756. }
  26757. function TSExportAssignment(node2) {
  26758. this.word("export");
  26759. this.space();
  26760. this.tokenChar(61);
  26761. this.space();
  26762. this.print(node2.expression, node2);
  26763. this.tokenChar(59);
  26764. }
  26765. function TSNamespaceExportDeclaration(node2) {
  26766. this.word("export");
  26767. this.space();
  26768. this.word("as");
  26769. this.space();
  26770. this.word("namespace");
  26771. this.space();
  26772. this.print(node2.id, node2);
  26773. }
  26774. function tsPrintSignatureDeclarationBase(node2) {
  26775. const {
  26776. typeParameters
  26777. } = node2;
  26778. const parameters = node2.parameters;
  26779. this.print(typeParameters, node2);
  26780. this.tokenChar(40);
  26781. this._parameters(parameters, node2);
  26782. this.tokenChar(41);
  26783. const returnType = node2.typeAnnotation;
  26784. this.print(returnType, node2);
  26785. }
  26786. function tsPrintClassMemberModifiers(node2) {
  26787. const isField = node2.type === "ClassAccessorProperty" || node2.type === "ClassProperty";
  26788. if (isField && node2.declare) {
  26789. this.word("declare");
  26790. this.space();
  26791. }
  26792. if (node2.accessibility) {
  26793. this.word(node2.accessibility);
  26794. this.space();
  26795. }
  26796. if (node2.static) {
  26797. this.word("static");
  26798. this.space();
  26799. }
  26800. if (node2.override) {
  26801. this.word("override");
  26802. this.space();
  26803. }
  26804. if (node2.abstract) {
  26805. this.word("abstract");
  26806. this.space();
  26807. }
  26808. if (isField && node2.readonly) {
  26809. this.word("readonly");
  26810. this.space();
  26811. }
  26812. }
  26813. }
  26814. });
  26815. // node_modules/@babel/generator/lib/generators/index.js
  26816. var require_generators = __commonJS({
  26817. "node_modules/@babel/generator/lib/generators/index.js"(exports) {
  26818. "use strict";
  26819. Object.defineProperty(exports, "__esModule", {
  26820. value: true
  26821. });
  26822. var _templateLiterals = require_template_literals();
  26823. Object.keys(_templateLiterals).forEach(function(key2) {
  26824. if (key2 === "default" || key2 === "__esModule")
  26825. return;
  26826. if (key2 in exports && exports[key2] === _templateLiterals[key2])
  26827. return;
  26828. Object.defineProperty(exports, key2, {
  26829. enumerable: true,
  26830. get: function() {
  26831. return _templateLiterals[key2];
  26832. }
  26833. });
  26834. });
  26835. var _expressions = require_expressions();
  26836. Object.keys(_expressions).forEach(function(key2) {
  26837. if (key2 === "default" || key2 === "__esModule")
  26838. return;
  26839. if (key2 in exports && exports[key2] === _expressions[key2])
  26840. return;
  26841. Object.defineProperty(exports, key2, {
  26842. enumerable: true,
  26843. get: function() {
  26844. return _expressions[key2];
  26845. }
  26846. });
  26847. });
  26848. var _statements = require_statements();
  26849. Object.keys(_statements).forEach(function(key2) {
  26850. if (key2 === "default" || key2 === "__esModule")
  26851. return;
  26852. if (key2 in exports && exports[key2] === _statements[key2])
  26853. return;
  26854. Object.defineProperty(exports, key2, {
  26855. enumerable: true,
  26856. get: function() {
  26857. return _statements[key2];
  26858. }
  26859. });
  26860. });
  26861. var _classes = require_classes();
  26862. Object.keys(_classes).forEach(function(key2) {
  26863. if (key2 === "default" || key2 === "__esModule")
  26864. return;
  26865. if (key2 in exports && exports[key2] === _classes[key2])
  26866. return;
  26867. Object.defineProperty(exports, key2, {
  26868. enumerable: true,
  26869. get: function() {
  26870. return _classes[key2];
  26871. }
  26872. });
  26873. });
  26874. var _methods = require_methods();
  26875. Object.keys(_methods).forEach(function(key2) {
  26876. if (key2 === "default" || key2 === "__esModule")
  26877. return;
  26878. if (key2 in exports && exports[key2] === _methods[key2])
  26879. return;
  26880. Object.defineProperty(exports, key2, {
  26881. enumerable: true,
  26882. get: function() {
  26883. return _methods[key2];
  26884. }
  26885. });
  26886. });
  26887. var _modules = require_modules();
  26888. Object.keys(_modules).forEach(function(key2) {
  26889. if (key2 === "default" || key2 === "__esModule")
  26890. return;
  26891. if (key2 in exports && exports[key2] === _modules[key2])
  26892. return;
  26893. Object.defineProperty(exports, key2, {
  26894. enumerable: true,
  26895. get: function() {
  26896. return _modules[key2];
  26897. }
  26898. });
  26899. });
  26900. var _types = require_types();
  26901. Object.keys(_types).forEach(function(key2) {
  26902. if (key2 === "default" || key2 === "__esModule")
  26903. return;
  26904. if (key2 in exports && exports[key2] === _types[key2])
  26905. return;
  26906. Object.defineProperty(exports, key2, {
  26907. enumerable: true,
  26908. get: function() {
  26909. return _types[key2];
  26910. }
  26911. });
  26912. });
  26913. var _flow = require_flow2();
  26914. Object.keys(_flow).forEach(function(key2) {
  26915. if (key2 === "default" || key2 === "__esModule")
  26916. return;
  26917. if (key2 in exports && exports[key2] === _flow[key2])
  26918. return;
  26919. Object.defineProperty(exports, key2, {
  26920. enumerable: true,
  26921. get: function() {
  26922. return _flow[key2];
  26923. }
  26924. });
  26925. });
  26926. var _base = require_base();
  26927. Object.keys(_base).forEach(function(key2) {
  26928. if (key2 === "default" || key2 === "__esModule")
  26929. return;
  26930. if (key2 in exports && exports[key2] === _base[key2])
  26931. return;
  26932. Object.defineProperty(exports, key2, {
  26933. enumerable: true,
  26934. get: function() {
  26935. return _base[key2];
  26936. }
  26937. });
  26938. });
  26939. var _jsx = require_jsx2();
  26940. Object.keys(_jsx).forEach(function(key2) {
  26941. if (key2 === "default" || key2 === "__esModule")
  26942. return;
  26943. if (key2 in exports && exports[key2] === _jsx[key2])
  26944. return;
  26945. Object.defineProperty(exports, key2, {
  26946. enumerable: true,
  26947. get: function() {
  26948. return _jsx[key2];
  26949. }
  26950. });
  26951. });
  26952. var _typescript = require_typescript2();
  26953. Object.keys(_typescript).forEach(function(key2) {
  26954. if (key2 === "default" || key2 === "__esModule")
  26955. return;
  26956. if (key2 in exports && exports[key2] === _typescript[key2])
  26957. return;
  26958. Object.defineProperty(exports, key2, {
  26959. enumerable: true,
  26960. get: function() {
  26961. return _typescript[key2];
  26962. }
  26963. });
  26964. });
  26965. }
  26966. });
  26967. // node_modules/@babel/generator/lib/printer.js
  26968. var require_printer = __commonJS({
  26969. "node_modules/@babel/generator/lib/printer.js"(exports) {
  26970. "use strict";
  26971. Object.defineProperty(exports, "__esModule", {
  26972. value: true
  26973. });
  26974. exports.default = void 0;
  26975. var _buffer = require_buffer();
  26976. var n = require_node();
  26977. var _t = require_lib3();
  26978. var generatorFunctions = require_generators();
  26979. require_trace_mapping_umd();
  26980. var {
  26981. isFunction,
  26982. isStatement,
  26983. isClassBody,
  26984. isTSInterfaceBody,
  26985. isTSEnumDeclaration
  26986. } = _t;
  26987. var SCIENTIFIC_NOTATION = /e/i;
  26988. var ZERO_DECIMAL_INTEGER = /\.0+$/;
  26989. var NON_DECIMAL_LITERAL = /^0[box]/;
  26990. var PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/;
  26991. var HAS_NEWLINE = /[\n\r\u2028\u2029]/;
  26992. var HAS_BlOCK_COMMENT_END = /\*\//;
  26993. var {
  26994. needsParens
  26995. } = n;
  26996. var Printer = class {
  26997. constructor(format, map) {
  26998. this.inForStatementInitCounter = 0;
  26999. this._printStack = [];
  27000. this._indent = 0;
  27001. this._indentChar = 0;
  27002. this._indentRepeat = 0;
  27003. this._insideAux = false;
  27004. this._parenPushNewlineState = null;
  27005. this._noLineTerminator = false;
  27006. this._printAuxAfterOnNextUserNode = false;
  27007. this._printedComments = /* @__PURE__ */ new Set();
  27008. this._endsWithInteger = false;
  27009. this._endsWithWord = false;
  27010. this._lastCommentLine = 0;
  27011. this._endsWithInnerRaw = false;
  27012. this._indentInnerComments = true;
  27013. this.format = format;
  27014. this._buf = new _buffer.default(map);
  27015. this._indentChar = format.indent.style.charCodeAt(0);
  27016. this._indentRepeat = format.indent.style.length;
  27017. this._inputMap = map == null ? void 0 : map._inputMap;
  27018. }
  27019. generate(ast) {
  27020. this.print(ast);
  27021. this._maybeAddAuxComment();
  27022. return this._buf.get();
  27023. }
  27024. indent() {
  27025. if (this.format.compact || this.format.concise)
  27026. return;
  27027. this._indent++;
  27028. }
  27029. dedent() {
  27030. if (this.format.compact || this.format.concise)
  27031. return;
  27032. this._indent--;
  27033. }
  27034. semicolon(force = false) {
  27035. this._maybeAddAuxComment();
  27036. if (force) {
  27037. this._appendChar(59);
  27038. } else {
  27039. this._queue(59);
  27040. }
  27041. this._noLineTerminator = false;
  27042. }
  27043. rightBrace() {
  27044. if (this.format.minified) {
  27045. this._buf.removeLastSemicolon();
  27046. }
  27047. this.tokenChar(125);
  27048. }
  27049. space(force = false) {
  27050. if (this.format.compact)
  27051. return;
  27052. if (force) {
  27053. this._space();
  27054. } else if (this._buf.hasContent()) {
  27055. const lastCp = this.getLastChar();
  27056. if (lastCp !== 32 && lastCp !== 10) {
  27057. this._space();
  27058. }
  27059. }
  27060. }
  27061. word(str, noLineTerminatorAfter = false) {
  27062. this._maybePrintInnerComments();
  27063. if (this._endsWithWord || str.charCodeAt(0) === 47 && this.endsWith(47)) {
  27064. this._space();
  27065. }
  27066. this._maybeAddAuxComment();
  27067. this._append(str, false);
  27068. this._endsWithWord = true;
  27069. this._noLineTerminator = noLineTerminatorAfter;
  27070. }
  27071. number(str) {
  27072. this.word(str);
  27073. this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str.charCodeAt(str.length - 1) !== 46;
  27074. }
  27075. token(str, maybeNewline = false) {
  27076. this._maybePrintInnerComments();
  27077. const lastChar = this.getLastChar();
  27078. const strFirst = str.charCodeAt(0);
  27079. if (lastChar === 33 && (str === "--" || strFirst === 61) || strFirst === 43 && lastChar === 43 || strFirst === 45 && lastChar === 45 || strFirst === 46 && this._endsWithInteger) {
  27080. this._space();
  27081. }
  27082. this._maybeAddAuxComment();
  27083. this._append(str, maybeNewline);
  27084. this._noLineTerminator = false;
  27085. }
  27086. tokenChar(char) {
  27087. this._maybePrintInnerComments();
  27088. const lastChar = this.getLastChar();
  27089. if (char === 43 && lastChar === 43 || char === 45 && lastChar === 45 || char === 46 && this._endsWithInteger) {
  27090. this._space();
  27091. }
  27092. this._maybeAddAuxComment();
  27093. this._appendChar(char);
  27094. this._noLineTerminator = false;
  27095. }
  27096. newline(i = 1, force) {
  27097. if (i <= 0)
  27098. return;
  27099. if (!force) {
  27100. if (this.format.retainLines || this.format.compact)
  27101. return;
  27102. if (this.format.concise) {
  27103. this.space();
  27104. return;
  27105. }
  27106. }
  27107. if (i > 2)
  27108. i = 2;
  27109. i -= this._buf.getNewlineCount();
  27110. for (let j = 0; j < i; j++) {
  27111. this._newline();
  27112. }
  27113. return;
  27114. }
  27115. endsWith(char) {
  27116. return this.getLastChar() === char;
  27117. }
  27118. getLastChar() {
  27119. return this._buf.getLastChar();
  27120. }
  27121. endsWithCharAndNewline() {
  27122. return this._buf.endsWithCharAndNewline();
  27123. }
  27124. removeTrailingNewline() {
  27125. this._buf.removeTrailingNewline();
  27126. }
  27127. exactSource(loc, cb) {
  27128. if (!loc) {
  27129. cb();
  27130. return;
  27131. }
  27132. this._catchUp("start", loc);
  27133. this._buf.exactSource(loc, cb);
  27134. }
  27135. source(prop, loc) {
  27136. if (!loc)
  27137. return;
  27138. this._catchUp(prop, loc);
  27139. this._buf.source(prop, loc);
  27140. }
  27141. sourceWithOffset(prop, loc, lineOffset, columnOffset) {
  27142. if (!loc)
  27143. return;
  27144. this._catchUp(prop, loc);
  27145. this._buf.sourceWithOffset(prop, loc, lineOffset, columnOffset);
  27146. }
  27147. withSource(prop, loc, cb) {
  27148. if (!loc) {
  27149. cb();
  27150. return;
  27151. }
  27152. this._catchUp(prop, loc);
  27153. this._buf.withSource(prop, loc, cb);
  27154. }
  27155. sourceIdentifierName(identifierName, pos2) {
  27156. if (!this._buf._canMarkIdName)
  27157. return;
  27158. const sourcePosition = this._buf._sourcePosition;
  27159. sourcePosition.identifierNamePos = pos2;
  27160. sourcePosition.identifierName = identifierName;
  27161. }
  27162. _space() {
  27163. this._queue(32);
  27164. }
  27165. _newline() {
  27166. this._queue(10);
  27167. }
  27168. _append(str, maybeNewline) {
  27169. this._maybeAddParen(str);
  27170. this._maybeIndent(str.charCodeAt(0));
  27171. this._buf.append(str, maybeNewline);
  27172. this._endsWithWord = false;
  27173. this._endsWithInteger = false;
  27174. }
  27175. _appendChar(char) {
  27176. this._maybeAddParenChar(char);
  27177. this._maybeIndent(char);
  27178. this._buf.appendChar(char);
  27179. this._endsWithWord = false;
  27180. this._endsWithInteger = false;
  27181. }
  27182. _queue(char) {
  27183. this._maybeAddParenChar(char);
  27184. this._maybeIndent(char);
  27185. this._buf.queue(char);
  27186. this._endsWithWord = false;
  27187. this._endsWithInteger = false;
  27188. }
  27189. _maybeIndent(firstChar) {
  27190. if (this._indent && firstChar !== 10 && this.endsWith(10)) {
  27191. this._buf.queueIndentation(this._indentChar, this._getIndent());
  27192. }
  27193. }
  27194. _shouldIndent(firstChar) {
  27195. if (this._indent && firstChar !== 10 && this.endsWith(10)) {
  27196. return true;
  27197. }
  27198. }
  27199. _maybeAddParenChar(char) {
  27200. const parenPushNewlineState = this._parenPushNewlineState;
  27201. if (!parenPushNewlineState)
  27202. return;
  27203. if (char === 32) {
  27204. return;
  27205. }
  27206. if (char !== 10) {
  27207. this._parenPushNewlineState = null;
  27208. return;
  27209. }
  27210. this.tokenChar(40);
  27211. this.indent();
  27212. parenPushNewlineState.printed = true;
  27213. }
  27214. _maybeAddParen(str) {
  27215. const parenPushNewlineState = this._parenPushNewlineState;
  27216. if (!parenPushNewlineState)
  27217. return;
  27218. const len = str.length;
  27219. let i;
  27220. for (i = 0; i < len && str.charCodeAt(i) === 32; i++)
  27221. continue;
  27222. if (i === len) {
  27223. return;
  27224. }
  27225. const cha = str.charCodeAt(i);
  27226. if (cha !== 10) {
  27227. if (cha !== 47 || i + 1 === len) {
  27228. this._parenPushNewlineState = null;
  27229. return;
  27230. }
  27231. const chaPost = str.charCodeAt(i + 1);
  27232. if (chaPost === 42) {
  27233. if (PURE_ANNOTATION_RE.test(str.slice(i + 2, len - 2))) {
  27234. return;
  27235. }
  27236. } else if (chaPost !== 47) {
  27237. this._parenPushNewlineState = null;
  27238. return;
  27239. }
  27240. }
  27241. this.tokenChar(40);
  27242. this.indent();
  27243. parenPushNewlineState.printed = true;
  27244. }
  27245. catchUp(line2) {
  27246. if (!this.format.retainLines)
  27247. return;
  27248. const count = line2 - this._buf.getCurrentLine();
  27249. for (let i = 0; i < count; i++) {
  27250. this._newline();
  27251. }
  27252. }
  27253. _catchUp(prop, loc) {
  27254. if (!this.format.retainLines)
  27255. return;
  27256. const pos2 = loc ? loc[prop] : null;
  27257. if ((pos2 == null ? void 0 : pos2.line) != null) {
  27258. const count = pos2.line - this._buf.getCurrentLine();
  27259. for (let i = 0; i < count; i++) {
  27260. this._newline();
  27261. }
  27262. }
  27263. }
  27264. _getIndent() {
  27265. return this._indentRepeat * this._indent;
  27266. }
  27267. printTerminatorless(node2, parent, isLabel) {
  27268. if (isLabel) {
  27269. this._noLineTerminator = true;
  27270. this.print(node2, parent);
  27271. } else {
  27272. const terminatorState = {
  27273. printed: false
  27274. };
  27275. this._parenPushNewlineState = terminatorState;
  27276. this.print(node2, parent);
  27277. if (terminatorState.printed) {
  27278. this.dedent();
  27279. this.newline();
  27280. this.tokenChar(41);
  27281. }
  27282. }
  27283. }
  27284. print(node2, parent, noLineTerminatorAfter, trailingCommentsLineOffset, forceParens) {
  27285. if (!node2)
  27286. return;
  27287. this._endsWithInnerRaw = false;
  27288. const nodeType = node2.type;
  27289. const format = this.format;
  27290. const oldConcise = format.concise;
  27291. if (node2._compact) {
  27292. format.concise = true;
  27293. }
  27294. const printMethod = this[nodeType];
  27295. if (printMethod === void 0) {
  27296. throw new ReferenceError(`unknown node of type ${JSON.stringify(nodeType)} with constructor ${JSON.stringify(node2.constructor.name)}`);
  27297. }
  27298. this._printStack.push(node2);
  27299. const oldInAux = this._insideAux;
  27300. this._insideAux = node2.loc == void 0;
  27301. this._maybeAddAuxComment(this._insideAux && !oldInAux);
  27302. let shouldPrintParens = false;
  27303. if (forceParens) {
  27304. shouldPrintParens = true;
  27305. } else if (format.retainFunctionParens && nodeType === "FunctionExpression" && node2.extra && node2.extra.parenthesized) {
  27306. shouldPrintParens = true;
  27307. } else {
  27308. shouldPrintParens = needsParens(node2, parent, this._printStack);
  27309. }
  27310. if (shouldPrintParens) {
  27311. this.tokenChar(40);
  27312. this._endsWithInnerRaw = false;
  27313. }
  27314. this._lastCommentLine = 0;
  27315. this._printLeadingComments(node2, parent);
  27316. const loc = nodeType === "Program" || nodeType === "File" ? null : node2.loc;
  27317. this.exactSource(loc, printMethod.bind(this, node2, parent));
  27318. if (shouldPrintParens) {
  27319. this._printTrailingComments(node2, parent);
  27320. this.tokenChar(41);
  27321. this._noLineTerminator = noLineTerminatorAfter;
  27322. } else if (noLineTerminatorAfter && !this._noLineTerminator) {
  27323. this._noLineTerminator = true;
  27324. this._printTrailingComments(node2, parent);
  27325. } else {
  27326. this._printTrailingComments(node2, parent, trailingCommentsLineOffset);
  27327. }
  27328. this._printStack.pop();
  27329. format.concise = oldConcise;
  27330. this._insideAux = oldInAux;
  27331. this._endsWithInnerRaw = false;
  27332. }
  27333. _maybeAddAuxComment(enteredPositionlessNode) {
  27334. if (enteredPositionlessNode)
  27335. this._printAuxBeforeComment();
  27336. if (!this._insideAux)
  27337. this._printAuxAfterComment();
  27338. }
  27339. _printAuxBeforeComment() {
  27340. if (this._printAuxAfterOnNextUserNode)
  27341. return;
  27342. this._printAuxAfterOnNextUserNode = true;
  27343. const comment2 = this.format.auxiliaryCommentBefore;
  27344. if (comment2) {
  27345. this._printComment({
  27346. type: "CommentBlock",
  27347. value: comment2
  27348. }, 0);
  27349. }
  27350. }
  27351. _printAuxAfterComment() {
  27352. if (!this._printAuxAfterOnNextUserNode)
  27353. return;
  27354. this._printAuxAfterOnNextUserNode = false;
  27355. const comment2 = this.format.auxiliaryCommentAfter;
  27356. if (comment2) {
  27357. this._printComment({
  27358. type: "CommentBlock",
  27359. value: comment2
  27360. }, 0);
  27361. }
  27362. }
  27363. getPossibleRaw(node2) {
  27364. const extra = node2.extra;
  27365. if (extra && extra.raw != null && extra.rawValue != null && node2.value === extra.rawValue) {
  27366. return extra.raw;
  27367. }
  27368. }
  27369. printJoin(nodes, parent, opts = {}) {
  27370. if (!(nodes != null && nodes.length))
  27371. return;
  27372. if (opts.indent)
  27373. this.indent();
  27374. const newlineOpts = {
  27375. addNewlines: opts.addNewlines,
  27376. nextNodeStartLine: 0
  27377. };
  27378. const separator = opts.separator ? opts.separator.bind(this) : null;
  27379. const len = nodes.length;
  27380. for (let i = 0; i < len; i++) {
  27381. const node2 = nodes[i];
  27382. if (!node2)
  27383. continue;
  27384. if (opts.statement)
  27385. this._printNewline(i === 0, newlineOpts);
  27386. this.print(node2, parent, void 0, opts.trailingCommentsLineOffset || 0);
  27387. opts.iterator == null ? void 0 : opts.iterator(node2, i);
  27388. if (i < len - 1)
  27389. separator == null ? void 0 : separator();
  27390. if (opts.statement) {
  27391. if (i + 1 === len) {
  27392. this.newline(1);
  27393. } else {
  27394. var _nextNode$loc;
  27395. const nextNode = nodes[i + 1];
  27396. newlineOpts.nextNodeStartLine = ((_nextNode$loc = nextNode.loc) == null ? void 0 : _nextNode$loc.start.line) || 0;
  27397. this._printNewline(true, newlineOpts);
  27398. }
  27399. }
  27400. }
  27401. if (opts.indent)
  27402. this.dedent();
  27403. }
  27404. printAndIndentOnComments(node2, parent) {
  27405. const indent = node2.leadingComments && node2.leadingComments.length > 0;
  27406. if (indent)
  27407. this.indent();
  27408. this.print(node2, parent);
  27409. if (indent)
  27410. this.dedent();
  27411. }
  27412. printBlock(parent) {
  27413. const node2 = parent.body;
  27414. if (node2.type !== "EmptyStatement") {
  27415. this.space();
  27416. }
  27417. this.print(node2, parent);
  27418. }
  27419. _printTrailingComments(node2, parent, lineOffset) {
  27420. const {
  27421. innerComments,
  27422. trailingComments
  27423. } = node2;
  27424. if (innerComments != null && innerComments.length) {
  27425. this._printComments(2, innerComments, node2, parent, lineOffset);
  27426. }
  27427. if (trailingComments != null && trailingComments.length) {
  27428. this._printComments(2, trailingComments, node2, parent, lineOffset);
  27429. }
  27430. }
  27431. _printLeadingComments(node2, parent) {
  27432. const comments = node2.leadingComments;
  27433. if (!(comments != null && comments.length))
  27434. return;
  27435. this._printComments(0, comments, node2, parent);
  27436. }
  27437. _maybePrintInnerComments() {
  27438. if (this._endsWithInnerRaw)
  27439. this.printInnerComments();
  27440. this._endsWithInnerRaw = true;
  27441. this._indentInnerComments = true;
  27442. }
  27443. printInnerComments() {
  27444. const node2 = this._printStack[this._printStack.length - 1];
  27445. const comments = node2.innerComments;
  27446. if (!(comments != null && comments.length))
  27447. return;
  27448. const hasSpace = this.endsWith(32);
  27449. const indent = this._indentInnerComments;
  27450. const printedCommentsCount = this._printedComments.size;
  27451. if (indent)
  27452. this.indent();
  27453. this._printComments(1, comments, node2);
  27454. if (hasSpace && printedCommentsCount !== this._printedComments.size) {
  27455. this.space();
  27456. }
  27457. if (indent)
  27458. this.dedent();
  27459. }
  27460. noIndentInnerCommentsHere() {
  27461. this._indentInnerComments = false;
  27462. }
  27463. printSequence(nodes, parent, opts = {}) {
  27464. opts.statement = true;
  27465. this.printJoin(nodes, parent, opts);
  27466. }
  27467. printList(items, parent, opts = {}) {
  27468. if (opts.separator == null) {
  27469. opts.separator = commaSeparator;
  27470. }
  27471. this.printJoin(items, parent, opts);
  27472. }
  27473. _printNewline(newLine, opts) {
  27474. if (this.format.retainLines || this.format.compact)
  27475. return;
  27476. if (this.format.concise) {
  27477. this.space();
  27478. return;
  27479. }
  27480. if (!newLine) {
  27481. return;
  27482. }
  27483. const startLine = opts.nextNodeStartLine;
  27484. const lastCommentLine = this._lastCommentLine;
  27485. if (startLine > 0 && lastCommentLine > 0) {
  27486. const offset3 = startLine - lastCommentLine;
  27487. if (offset3 >= 0) {
  27488. this.newline(offset3 || 1);
  27489. return;
  27490. }
  27491. }
  27492. if (this._buf.hasContent()) {
  27493. this.newline(1);
  27494. }
  27495. }
  27496. _shouldPrintComment(comment2) {
  27497. if (comment2.ignore)
  27498. return 0;
  27499. if (this._printedComments.has(comment2))
  27500. return 0;
  27501. if (this._noLineTerminator && (HAS_NEWLINE.test(comment2.value) || HAS_BlOCK_COMMENT_END.test(comment2.value))) {
  27502. return 2;
  27503. }
  27504. this._printedComments.add(comment2);
  27505. if (!this.format.shouldPrintComment(comment2.value)) {
  27506. return 0;
  27507. }
  27508. return 1;
  27509. }
  27510. _printComment(comment2, skipNewLines) {
  27511. const noLineTerminator = this._noLineTerminator;
  27512. const isBlockComment = comment2.type === "CommentBlock";
  27513. const printNewLines = isBlockComment && skipNewLines !== 1 && !this._noLineTerminator;
  27514. if (printNewLines && this._buf.hasContent() && skipNewLines !== 2) {
  27515. this.newline(1);
  27516. }
  27517. const lastCharCode = this.getLastChar();
  27518. if (lastCharCode !== 91 && lastCharCode !== 123) {
  27519. this.space();
  27520. }
  27521. let val;
  27522. if (isBlockComment) {
  27523. val = `/*${comment2.value}*/`;
  27524. if (this.format.indent.adjustMultilineComment) {
  27525. var _comment$loc;
  27526. const offset3 = (_comment$loc = comment2.loc) == null ? void 0 : _comment$loc.start.column;
  27527. if (offset3) {
  27528. const newlineRegex = new RegExp("\\n\\s{1," + offset3 + "}", "g");
  27529. val = val.replace(newlineRegex, "\n");
  27530. }
  27531. let indentSize = this.format.retainLines ? 0 : this._buf.getCurrentColumn();
  27532. if (this._shouldIndent(47) || this.format.retainLines) {
  27533. indentSize += this._getIndent();
  27534. }
  27535. val = val.replace(/\n(?!$)/g, `
  27536. ${" ".repeat(indentSize)}`);
  27537. }
  27538. } else if (!noLineTerminator) {
  27539. val = `//${comment2.value}`;
  27540. } else {
  27541. val = `/*${comment2.value}*/`;
  27542. }
  27543. if (this.endsWith(47))
  27544. this._space();
  27545. this.source("start", comment2.loc);
  27546. this._append(val, isBlockComment);
  27547. if (!isBlockComment && !noLineTerminator) {
  27548. this.newline(1, true);
  27549. }
  27550. if (printNewLines && skipNewLines !== 3) {
  27551. this.newline(1);
  27552. }
  27553. }
  27554. _printComments(type, comments, node2, parent, lineOffset = 0) {
  27555. const nodeLoc = node2.loc;
  27556. const len = comments.length;
  27557. let hasLoc = !!nodeLoc;
  27558. const nodeStartLine = hasLoc ? nodeLoc.start.line : 0;
  27559. const nodeEndLine = hasLoc ? nodeLoc.end.line : 0;
  27560. let lastLine = 0;
  27561. let leadingCommentNewline = 0;
  27562. const maybeNewline = this._noLineTerminator ? function() {
  27563. } : this.newline.bind(this);
  27564. for (let i = 0; i < len; i++) {
  27565. const comment2 = comments[i];
  27566. const shouldPrint = this._shouldPrintComment(comment2);
  27567. if (shouldPrint === 2) {
  27568. hasLoc = false;
  27569. break;
  27570. }
  27571. if (hasLoc && comment2.loc && shouldPrint === 1) {
  27572. const commentStartLine = comment2.loc.start.line;
  27573. const commentEndLine = comment2.loc.end.line;
  27574. if (type === 0) {
  27575. let offset3 = 0;
  27576. if (i === 0) {
  27577. if (this._buf.hasContent() && (comment2.type === "CommentLine" || commentStartLine != commentEndLine)) {
  27578. offset3 = leadingCommentNewline = 1;
  27579. }
  27580. } else {
  27581. offset3 = commentStartLine - lastLine;
  27582. }
  27583. lastLine = commentEndLine;
  27584. maybeNewline(offset3);
  27585. this._printComment(comment2, 1);
  27586. if (i + 1 === len) {
  27587. maybeNewline(Math.max(nodeStartLine - lastLine, leadingCommentNewline));
  27588. lastLine = nodeStartLine;
  27589. }
  27590. } else if (type === 1) {
  27591. const offset3 = commentStartLine - (i === 0 ? nodeStartLine : lastLine);
  27592. lastLine = commentEndLine;
  27593. maybeNewline(offset3);
  27594. this._printComment(comment2, 1);
  27595. if (i + 1 === len) {
  27596. maybeNewline(Math.min(1, nodeEndLine - lastLine));
  27597. lastLine = nodeEndLine;
  27598. }
  27599. } else {
  27600. const offset3 = commentStartLine - (i === 0 ? nodeEndLine - lineOffset : lastLine);
  27601. lastLine = commentEndLine;
  27602. maybeNewline(offset3);
  27603. this._printComment(comment2, 1);
  27604. }
  27605. } else {
  27606. hasLoc = false;
  27607. if (shouldPrint !== 1) {
  27608. continue;
  27609. }
  27610. if (len === 1) {
  27611. const singleLine = comment2.loc ? comment2.loc.start.line === comment2.loc.end.line : !HAS_NEWLINE.test(comment2.value);
  27612. const shouldSkipNewline = singleLine && !isStatement(node2) && !isClassBody(parent) && !isTSInterfaceBody(parent) && !isTSEnumDeclaration(parent);
  27613. if (type === 0) {
  27614. this._printComment(comment2, shouldSkipNewline && node2.type !== "ObjectExpression" || singleLine && isFunction(parent, {
  27615. body: node2
  27616. }) ? 1 : 0);
  27617. } else if (shouldSkipNewline && type === 2) {
  27618. this._printComment(comment2, 1);
  27619. } else {
  27620. this._printComment(comment2, 0);
  27621. }
  27622. } else if (type === 1 && !(node2.type === "ObjectExpression" && node2.properties.length > 1) && node2.type !== "ClassBody" && node2.type !== "TSInterfaceBody") {
  27623. this._printComment(comment2, i === 0 ? 2 : i === len - 1 ? 3 : 0);
  27624. } else {
  27625. this._printComment(comment2, 0);
  27626. }
  27627. }
  27628. }
  27629. if (type === 2 && hasLoc && lastLine) {
  27630. this._lastCommentLine = lastLine;
  27631. }
  27632. }
  27633. };
  27634. Object.assign(Printer.prototype, generatorFunctions);
  27635. {
  27636. Printer.prototype.Noop = function Noop() {
  27637. };
  27638. }
  27639. var _default = Printer;
  27640. exports.default = _default;
  27641. function commaSeparator() {
  27642. this.tokenChar(44);
  27643. this.space();
  27644. }
  27645. }
  27646. });
  27647. // node_modules/@babel/generator/lib/index.js
  27648. var require_lib4 = __commonJS({
  27649. "node_modules/@babel/generator/lib/index.js"(exports) {
  27650. "use strict";
  27651. Object.defineProperty(exports, "__esModule", {
  27652. value: true
  27653. });
  27654. exports.CodeGenerator = void 0;
  27655. exports.default = generate5;
  27656. var _sourceMap = require_source_map();
  27657. var _printer = require_printer();
  27658. var Generator = class extends _printer.default {
  27659. constructor(ast, opts = {}, code2) {
  27660. const format = normalizeOptions(code2, opts);
  27661. const map = opts.sourceMaps ? new _sourceMap.default(opts, code2) : null;
  27662. super(format, map);
  27663. this.ast = void 0;
  27664. this.ast = ast;
  27665. }
  27666. generate() {
  27667. return super.generate(this.ast);
  27668. }
  27669. };
  27670. function normalizeOptions(code2, opts) {
  27671. const format = {
  27672. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  27673. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  27674. shouldPrintComment: opts.shouldPrintComment,
  27675. retainLines: opts.retainLines,
  27676. retainFunctionParens: opts.retainFunctionParens,
  27677. comments: opts.comments == null || opts.comments,
  27678. compact: opts.compact,
  27679. minified: opts.minified,
  27680. concise: opts.concise,
  27681. indent: {
  27682. adjustMultilineComment: true,
  27683. style: " "
  27684. },
  27685. jsescOption: Object.assign({
  27686. quotes: "double",
  27687. wrap: true,
  27688. minimal: false
  27689. }, opts.jsescOption),
  27690. recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType,
  27691. topicToken: opts.topicToken
  27692. };
  27693. {
  27694. format.decoratorsBeforeExport = opts.decoratorsBeforeExport;
  27695. format.jsescOption.json = opts.jsonCompatibleStrings;
  27696. }
  27697. if (format.minified) {
  27698. format.compact = true;
  27699. format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
  27700. } else {
  27701. format.shouldPrintComment = format.shouldPrintComment || ((value2) => format.comments || value2.includes("@license") || value2.includes("@preserve"));
  27702. }
  27703. if (format.compact === "auto") {
  27704. format.compact = typeof code2 === "string" && code2.length > 5e5;
  27705. if (format.compact) {
  27706. console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${opts.filename} as it exceeds the max of ${"500KB"}.`);
  27707. }
  27708. }
  27709. if (format.compact) {
  27710. format.indent.adjustMultilineComment = false;
  27711. }
  27712. const {
  27713. auxiliaryCommentBefore,
  27714. auxiliaryCommentAfter,
  27715. shouldPrintComment
  27716. } = format;
  27717. if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) {
  27718. format.auxiliaryCommentBefore = void 0;
  27719. }
  27720. if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) {
  27721. format.auxiliaryCommentAfter = void 0;
  27722. }
  27723. return format;
  27724. }
  27725. var CodeGenerator = class {
  27726. constructor(ast, opts, code2) {
  27727. this._generator = void 0;
  27728. this._generator = new Generator(ast, opts, code2);
  27729. }
  27730. generate() {
  27731. return this._generator.generate();
  27732. }
  27733. };
  27734. exports.CodeGenerator = CodeGenerator;
  27735. function generate5(ast, opts, code2) {
  27736. const gen = new Generator(ast, opts, code2);
  27737. return gen.generate();
  27738. }
  27739. }
  27740. });
  27741. // node_modules/lodash/_listCacheClear.js
  27742. var require_listCacheClear = __commonJS({
  27743. "node_modules/lodash/_listCacheClear.js"(exports, module) {
  27744. function listCacheClear() {
  27745. this.__data__ = [];
  27746. this.size = 0;
  27747. }
  27748. module.exports = listCacheClear;
  27749. }
  27750. });
  27751. // node_modules/lodash/eq.js
  27752. var require_eq = __commonJS({
  27753. "node_modules/lodash/eq.js"(exports, module) {
  27754. function eq(value2, other) {
  27755. return value2 === other || value2 !== value2 && other !== other;
  27756. }
  27757. module.exports = eq;
  27758. }
  27759. });
  27760. // node_modules/lodash/_assocIndexOf.js
  27761. var require_assocIndexOf = __commonJS({
  27762. "node_modules/lodash/_assocIndexOf.js"(exports, module) {
  27763. var eq = require_eq();
  27764. function assocIndexOf(array, key2) {
  27765. var length = array.length;
  27766. while (length--) {
  27767. if (eq(array[length][0], key2)) {
  27768. return length;
  27769. }
  27770. }
  27771. return -1;
  27772. }
  27773. module.exports = assocIndexOf;
  27774. }
  27775. });
  27776. // node_modules/lodash/_listCacheDelete.js
  27777. var require_listCacheDelete = __commonJS({
  27778. "node_modules/lodash/_listCacheDelete.js"(exports, module) {
  27779. var assocIndexOf = require_assocIndexOf();
  27780. var arrayProto = Array.prototype;
  27781. var splice2 = arrayProto.splice;
  27782. function listCacheDelete(key2) {
  27783. var data3 = this.__data__, index2 = assocIndexOf(data3, key2);
  27784. if (index2 < 0) {
  27785. return false;
  27786. }
  27787. var lastIndex = data3.length - 1;
  27788. if (index2 == lastIndex) {
  27789. data3.pop();
  27790. } else {
  27791. splice2.call(data3, index2, 1);
  27792. }
  27793. --this.size;
  27794. return true;
  27795. }
  27796. module.exports = listCacheDelete;
  27797. }
  27798. });
  27799. // node_modules/lodash/_listCacheGet.js
  27800. var require_listCacheGet = __commonJS({
  27801. "node_modules/lodash/_listCacheGet.js"(exports, module) {
  27802. var assocIndexOf = require_assocIndexOf();
  27803. function listCacheGet(key2) {
  27804. var data3 = this.__data__, index2 = assocIndexOf(data3, key2);
  27805. return index2 < 0 ? void 0 : data3[index2][1];
  27806. }
  27807. module.exports = listCacheGet;
  27808. }
  27809. });
  27810. // node_modules/lodash/_listCacheHas.js
  27811. var require_listCacheHas = __commonJS({
  27812. "node_modules/lodash/_listCacheHas.js"(exports, module) {
  27813. var assocIndexOf = require_assocIndexOf();
  27814. function listCacheHas(key2) {
  27815. return assocIndexOf(this.__data__, key2) > -1;
  27816. }
  27817. module.exports = listCacheHas;
  27818. }
  27819. });
  27820. // node_modules/lodash/_listCacheSet.js
  27821. var require_listCacheSet = __commonJS({
  27822. "node_modules/lodash/_listCacheSet.js"(exports, module) {
  27823. var assocIndexOf = require_assocIndexOf();
  27824. function listCacheSet(key2, value2) {
  27825. var data3 = this.__data__, index2 = assocIndexOf(data3, key2);
  27826. if (index2 < 0) {
  27827. ++this.size;
  27828. data3.push([key2, value2]);
  27829. } else {
  27830. data3[index2][1] = value2;
  27831. }
  27832. return this;
  27833. }
  27834. module.exports = listCacheSet;
  27835. }
  27836. });
  27837. // node_modules/lodash/_ListCache.js
  27838. var require_ListCache = __commonJS({
  27839. "node_modules/lodash/_ListCache.js"(exports, module) {
  27840. var listCacheClear = require_listCacheClear();
  27841. var listCacheDelete = require_listCacheDelete();
  27842. var listCacheGet = require_listCacheGet();
  27843. var listCacheHas = require_listCacheHas();
  27844. var listCacheSet = require_listCacheSet();
  27845. function ListCache(entries) {
  27846. var index2 = -1, length = entries == null ? 0 : entries.length;
  27847. this.clear();
  27848. while (++index2 < length) {
  27849. var entry = entries[index2];
  27850. this.set(entry[0], entry[1]);
  27851. }
  27852. }
  27853. ListCache.prototype.clear = listCacheClear;
  27854. ListCache.prototype["delete"] = listCacheDelete;
  27855. ListCache.prototype.get = listCacheGet;
  27856. ListCache.prototype.has = listCacheHas;
  27857. ListCache.prototype.set = listCacheSet;
  27858. module.exports = ListCache;
  27859. }
  27860. });
  27861. // node_modules/lodash/_stackClear.js
  27862. var require_stackClear = __commonJS({
  27863. "node_modules/lodash/_stackClear.js"(exports, module) {
  27864. var ListCache = require_ListCache();
  27865. function stackClear() {
  27866. this.__data__ = new ListCache();
  27867. this.size = 0;
  27868. }
  27869. module.exports = stackClear;
  27870. }
  27871. });
  27872. // node_modules/lodash/_stackDelete.js
  27873. var require_stackDelete = __commonJS({
  27874. "node_modules/lodash/_stackDelete.js"(exports, module) {
  27875. function stackDelete(key2) {
  27876. var data3 = this.__data__, result = data3["delete"](key2);
  27877. this.size = data3.size;
  27878. return result;
  27879. }
  27880. module.exports = stackDelete;
  27881. }
  27882. });
  27883. // node_modules/lodash/_stackGet.js
  27884. var require_stackGet = __commonJS({
  27885. "node_modules/lodash/_stackGet.js"(exports, module) {
  27886. function stackGet(key2) {
  27887. return this.__data__.get(key2);
  27888. }
  27889. module.exports = stackGet;
  27890. }
  27891. });
  27892. // node_modules/lodash/_stackHas.js
  27893. var require_stackHas = __commonJS({
  27894. "node_modules/lodash/_stackHas.js"(exports, module) {
  27895. function stackHas(key2) {
  27896. return this.__data__.has(key2);
  27897. }
  27898. module.exports = stackHas;
  27899. }
  27900. });
  27901. // node_modules/lodash/_freeGlobal.js
  27902. var require_freeGlobal = __commonJS({
  27903. "node_modules/lodash/_freeGlobal.js"(exports, module) {
  27904. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  27905. module.exports = freeGlobal;
  27906. }
  27907. });
  27908. // node_modules/lodash/_root.js
  27909. var require_root = __commonJS({
  27910. "node_modules/lodash/_root.js"(exports, module) {
  27911. var freeGlobal = require_freeGlobal();
  27912. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  27913. var root4 = freeGlobal || freeSelf || Function("return this")();
  27914. module.exports = root4;
  27915. }
  27916. });
  27917. // node_modules/lodash/_Symbol.js
  27918. var require_Symbol = __commonJS({
  27919. "node_modules/lodash/_Symbol.js"(exports, module) {
  27920. var root4 = require_root();
  27921. var Symbol2 = root4.Symbol;
  27922. module.exports = Symbol2;
  27923. }
  27924. });
  27925. // node_modules/lodash/_getRawTag.js
  27926. var require_getRawTag = __commonJS({
  27927. "node_modules/lodash/_getRawTag.js"(exports, module) {
  27928. var Symbol2 = require_Symbol();
  27929. var objectProto = Object.prototype;
  27930. var hasOwnProperty4 = objectProto.hasOwnProperty;
  27931. var nativeObjectToString = objectProto.toString;
  27932. var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
  27933. function getRawTag(value2) {
  27934. var isOwn = hasOwnProperty4.call(value2, symToStringTag), tag = value2[symToStringTag];
  27935. try {
  27936. value2[symToStringTag] = void 0;
  27937. var unmasked = true;
  27938. } catch (e) {
  27939. }
  27940. var result = nativeObjectToString.call(value2);
  27941. if (unmasked) {
  27942. if (isOwn) {
  27943. value2[symToStringTag] = tag;
  27944. } else {
  27945. delete value2[symToStringTag];
  27946. }
  27947. }
  27948. return result;
  27949. }
  27950. module.exports = getRawTag;
  27951. }
  27952. });
  27953. // node_modules/lodash/_objectToString.js
  27954. var require_objectToString = __commonJS({
  27955. "node_modules/lodash/_objectToString.js"(exports, module) {
  27956. var objectProto = Object.prototype;
  27957. var nativeObjectToString = objectProto.toString;
  27958. function objectToString(value2) {
  27959. return nativeObjectToString.call(value2);
  27960. }
  27961. module.exports = objectToString;
  27962. }
  27963. });
  27964. // node_modules/lodash/_baseGetTag.js
  27965. var require_baseGetTag = __commonJS({
  27966. "node_modules/lodash/_baseGetTag.js"(exports, module) {
  27967. var Symbol2 = require_Symbol();
  27968. var getRawTag = require_getRawTag();
  27969. var objectToString = require_objectToString();
  27970. var nullTag = "[object Null]";
  27971. var undefinedTag = "[object Undefined]";
  27972. var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
  27973. function baseGetTag(value2) {
  27974. if (value2 == null) {
  27975. return value2 === void 0 ? undefinedTag : nullTag;
  27976. }
  27977. return symToStringTag && symToStringTag in Object(value2) ? getRawTag(value2) : objectToString(value2);
  27978. }
  27979. module.exports = baseGetTag;
  27980. }
  27981. });
  27982. // node_modules/lodash/isObject.js
  27983. var require_isObject = __commonJS({
  27984. "node_modules/lodash/isObject.js"(exports, module) {
  27985. function isObject(value2) {
  27986. var type = typeof value2;
  27987. return value2 != null && (type == "object" || type == "function");
  27988. }
  27989. module.exports = isObject;
  27990. }
  27991. });
  27992. // node_modules/lodash/isFunction.js
  27993. var require_isFunction = __commonJS({
  27994. "node_modules/lodash/isFunction.js"(exports, module) {
  27995. var baseGetTag = require_baseGetTag();
  27996. var isObject = require_isObject();
  27997. var asyncTag = "[object AsyncFunction]";
  27998. var funcTag = "[object Function]";
  27999. var genTag = "[object GeneratorFunction]";
  28000. var proxyTag = "[object Proxy]";
  28001. function isFunction(value2) {
  28002. if (!isObject(value2)) {
  28003. return false;
  28004. }
  28005. var tag = baseGetTag(value2);
  28006. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  28007. }
  28008. module.exports = isFunction;
  28009. }
  28010. });
  28011. // node_modules/lodash/_coreJsData.js
  28012. var require_coreJsData = __commonJS({
  28013. "node_modules/lodash/_coreJsData.js"(exports, module) {
  28014. var root4 = require_root();
  28015. var coreJsData = root4["__core-js_shared__"];
  28016. module.exports = coreJsData;
  28017. }
  28018. });
  28019. // node_modules/lodash/_isMasked.js
  28020. var require_isMasked = __commonJS({
  28021. "node_modules/lodash/_isMasked.js"(exports, module) {
  28022. var coreJsData = require_coreJsData();
  28023. var maskSrcKey = function() {
  28024. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  28025. return uid ? "Symbol(src)_1." + uid : "";
  28026. }();
  28027. function isMasked(func) {
  28028. return !!maskSrcKey && maskSrcKey in func;
  28029. }
  28030. module.exports = isMasked;
  28031. }
  28032. });
  28033. // node_modules/lodash/_toSource.js
  28034. var require_toSource = __commonJS({
  28035. "node_modules/lodash/_toSource.js"(exports, module) {
  28036. var funcProto = Function.prototype;
  28037. var funcToString = funcProto.toString;
  28038. function toSource(func) {
  28039. if (func != null) {
  28040. try {
  28041. return funcToString.call(func);
  28042. } catch (e) {
  28043. }
  28044. try {
  28045. return func + "";
  28046. } catch (e) {
  28047. }
  28048. }
  28049. return "";
  28050. }
  28051. module.exports = toSource;
  28052. }
  28053. });
  28054. // node_modules/lodash/_baseIsNative.js
  28055. var require_baseIsNative = __commonJS({
  28056. "node_modules/lodash/_baseIsNative.js"(exports, module) {
  28057. var isFunction = require_isFunction();
  28058. var isMasked = require_isMasked();
  28059. var isObject = require_isObject();
  28060. var toSource = require_toSource();
  28061. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  28062. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  28063. var funcProto = Function.prototype;
  28064. var objectProto = Object.prototype;
  28065. var funcToString = funcProto.toString;
  28066. var hasOwnProperty4 = objectProto.hasOwnProperty;
  28067. var reIsNative = RegExp(
  28068. "^" + funcToString.call(hasOwnProperty4).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  28069. );
  28070. function baseIsNative(value2) {
  28071. if (!isObject(value2) || isMasked(value2)) {
  28072. return false;
  28073. }
  28074. var pattern = isFunction(value2) ? reIsNative : reIsHostCtor;
  28075. return pattern.test(toSource(value2));
  28076. }
  28077. module.exports = baseIsNative;
  28078. }
  28079. });
  28080. // node_modules/lodash/_getValue.js
  28081. var require_getValue = __commonJS({
  28082. "node_modules/lodash/_getValue.js"(exports, module) {
  28083. function getValue(object, key2) {
  28084. return object == null ? void 0 : object[key2];
  28085. }
  28086. module.exports = getValue;
  28087. }
  28088. });
  28089. // node_modules/lodash/_getNative.js
  28090. var require_getNative = __commonJS({
  28091. "node_modules/lodash/_getNative.js"(exports, module) {
  28092. var baseIsNative = require_baseIsNative();
  28093. var getValue = require_getValue();
  28094. function getNative(object, key2) {
  28095. var value2 = getValue(object, key2);
  28096. return baseIsNative(value2) ? value2 : void 0;
  28097. }
  28098. module.exports = getNative;
  28099. }
  28100. });
  28101. // node_modules/lodash/_Map.js
  28102. var require_Map = __commonJS({
  28103. "node_modules/lodash/_Map.js"(exports, module) {
  28104. var getNative = require_getNative();
  28105. var root4 = require_root();
  28106. var Map2 = getNative(root4, "Map");
  28107. module.exports = Map2;
  28108. }
  28109. });
  28110. // node_modules/lodash/_nativeCreate.js
  28111. var require_nativeCreate = __commonJS({
  28112. "node_modules/lodash/_nativeCreate.js"(exports, module) {
  28113. var getNative = require_getNative();
  28114. var nativeCreate = getNative(Object, "create");
  28115. module.exports = nativeCreate;
  28116. }
  28117. });
  28118. // node_modules/lodash/_hashClear.js
  28119. var require_hashClear = __commonJS({
  28120. "node_modules/lodash/_hashClear.js"(exports, module) {
  28121. var nativeCreate = require_nativeCreate();
  28122. function hashClear() {
  28123. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  28124. this.size = 0;
  28125. }
  28126. module.exports = hashClear;
  28127. }
  28128. });
  28129. // node_modules/lodash/_hashDelete.js
  28130. var require_hashDelete = __commonJS({
  28131. "node_modules/lodash/_hashDelete.js"(exports, module) {
  28132. function hashDelete(key2) {
  28133. var result = this.has(key2) && delete this.__data__[key2];
  28134. this.size -= result ? 1 : 0;
  28135. return result;
  28136. }
  28137. module.exports = hashDelete;
  28138. }
  28139. });
  28140. // node_modules/lodash/_hashGet.js
  28141. var require_hashGet = __commonJS({
  28142. "node_modules/lodash/_hashGet.js"(exports, module) {
  28143. var nativeCreate = require_nativeCreate();
  28144. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  28145. var objectProto = Object.prototype;
  28146. var hasOwnProperty4 = objectProto.hasOwnProperty;
  28147. function hashGet(key2) {
  28148. var data3 = this.__data__;
  28149. if (nativeCreate) {
  28150. var result = data3[key2];
  28151. return result === HASH_UNDEFINED ? void 0 : result;
  28152. }
  28153. return hasOwnProperty4.call(data3, key2) ? data3[key2] : void 0;
  28154. }
  28155. module.exports = hashGet;
  28156. }
  28157. });
  28158. // node_modules/lodash/_hashHas.js
  28159. var require_hashHas = __commonJS({
  28160. "node_modules/lodash/_hashHas.js"(exports, module) {
  28161. var nativeCreate = require_nativeCreate();
  28162. var objectProto = Object.prototype;
  28163. var hasOwnProperty4 = objectProto.hasOwnProperty;
  28164. function hashHas(key2) {
  28165. var data3 = this.__data__;
  28166. return nativeCreate ? data3[key2] !== void 0 : hasOwnProperty4.call(data3, key2);
  28167. }
  28168. module.exports = hashHas;
  28169. }
  28170. });
  28171. // node_modules/lodash/_hashSet.js
  28172. var require_hashSet = __commonJS({
  28173. "node_modules/lodash/_hashSet.js"(exports, module) {
  28174. var nativeCreate = require_nativeCreate();
  28175. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  28176. function hashSet(key2, value2) {
  28177. var data3 = this.__data__;
  28178. this.size += this.has(key2) ? 0 : 1;
  28179. data3[key2] = nativeCreate && value2 === void 0 ? HASH_UNDEFINED : value2;
  28180. return this;
  28181. }
  28182. module.exports = hashSet;
  28183. }
  28184. });
  28185. // node_modules/lodash/_Hash.js
  28186. var require_Hash = __commonJS({
  28187. "node_modules/lodash/_Hash.js"(exports, module) {
  28188. var hashClear = require_hashClear();
  28189. var hashDelete = require_hashDelete();
  28190. var hashGet = require_hashGet();
  28191. var hashHas = require_hashHas();
  28192. var hashSet = require_hashSet();
  28193. function Hash(entries) {
  28194. var index2 = -1, length = entries == null ? 0 : entries.length;
  28195. this.clear();
  28196. while (++index2 < length) {
  28197. var entry = entries[index2];
  28198. this.set(entry[0], entry[1]);
  28199. }
  28200. }
  28201. Hash.prototype.clear = hashClear;
  28202. Hash.prototype["delete"] = hashDelete;
  28203. Hash.prototype.get = hashGet;
  28204. Hash.prototype.has = hashHas;
  28205. Hash.prototype.set = hashSet;
  28206. module.exports = Hash;
  28207. }
  28208. });
  28209. // node_modules/lodash/_mapCacheClear.js
  28210. var require_mapCacheClear = __commonJS({
  28211. "node_modules/lodash/_mapCacheClear.js"(exports, module) {
  28212. var Hash = require_Hash();
  28213. var ListCache = require_ListCache();
  28214. var Map2 = require_Map();
  28215. function mapCacheClear() {
  28216. this.size = 0;
  28217. this.__data__ = {
  28218. "hash": new Hash(),
  28219. "map": new (Map2 || ListCache)(),
  28220. "string": new Hash()
  28221. };
  28222. }
  28223. module.exports = mapCacheClear;
  28224. }
  28225. });
  28226. // node_modules/lodash/_isKeyable.js
  28227. var require_isKeyable = __commonJS({
  28228. "node_modules/lodash/_isKeyable.js"(exports, module) {
  28229. function isKeyable(value2) {
  28230. var type = typeof value2;
  28231. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value2 !== "__proto__" : value2 === null;
  28232. }
  28233. module.exports = isKeyable;
  28234. }
  28235. });
  28236. // node_modules/lodash/_getMapData.js
  28237. var require_getMapData = __commonJS({
  28238. "node_modules/lodash/_getMapData.js"(exports, module) {
  28239. var isKeyable = require_isKeyable();
  28240. function getMapData(map, key2) {
  28241. var data3 = map.__data__;
  28242. return isKeyable(key2) ? data3[typeof key2 == "string" ? "string" : "hash"] : data3.map;
  28243. }
  28244. module.exports = getMapData;
  28245. }
  28246. });
  28247. // node_modules/lodash/_mapCacheDelete.js
  28248. var require_mapCacheDelete = __commonJS({
  28249. "node_modules/lodash/_mapCacheDelete.js"(exports, module) {
  28250. var getMapData = require_getMapData();
  28251. function mapCacheDelete(key2) {
  28252. var result = getMapData(this, key2)["delete"](key2);
  28253. this.size -= result ? 1 : 0;
  28254. return result;
  28255. }
  28256. module.exports = mapCacheDelete;
  28257. }
  28258. });
  28259. // node_modules/lodash/_mapCacheGet.js
  28260. var require_mapCacheGet = __commonJS({
  28261. "node_modules/lodash/_mapCacheGet.js"(exports, module) {
  28262. var getMapData = require_getMapData();
  28263. function mapCacheGet(key2) {
  28264. return getMapData(this, key2).get(key2);
  28265. }
  28266. module.exports = mapCacheGet;
  28267. }
  28268. });
  28269. // node_modules/lodash/_mapCacheHas.js
  28270. var require_mapCacheHas = __commonJS({
  28271. "node_modules/lodash/_mapCacheHas.js"(exports, module) {
  28272. var getMapData = require_getMapData();
  28273. function mapCacheHas(key2) {
  28274. return getMapData(this, key2).has(key2);
  28275. }
  28276. module.exports = mapCacheHas;
  28277. }
  28278. });
  28279. // node_modules/lodash/_mapCacheSet.js
  28280. var require_mapCacheSet = __commonJS({
  28281. "node_modules/lodash/_mapCacheSet.js"(exports, module) {
  28282. var getMapData = require_getMapData();
  28283. function mapCacheSet(key2, value2) {
  28284. var data3 = getMapData(this, key2), size = data3.size;
  28285. data3.set(key2, value2);
  28286. this.size += data3.size == size ? 0 : 1;
  28287. return this;
  28288. }
  28289. module.exports = mapCacheSet;
  28290. }
  28291. });
  28292. // node_modules/lodash/_MapCache.js
  28293. var require_MapCache = __commonJS({
  28294. "node_modules/lodash/_MapCache.js"(exports, module) {
  28295. var mapCacheClear = require_mapCacheClear();
  28296. var mapCacheDelete = require_mapCacheDelete();
  28297. var mapCacheGet = require_mapCacheGet();
  28298. var mapCacheHas = require_mapCacheHas();
  28299. var mapCacheSet = require_mapCacheSet();
  28300. function MapCache(entries) {
  28301. var index2 = -1, length = entries == null ? 0 : entries.length;
  28302. this.clear();
  28303. while (++index2 < length) {
  28304. var entry = entries[index2];
  28305. this.set(entry[0], entry[1]);
  28306. }
  28307. }
  28308. MapCache.prototype.clear = mapCacheClear;
  28309. MapCache.prototype["delete"] = mapCacheDelete;
  28310. MapCache.prototype.get = mapCacheGet;
  28311. MapCache.prototype.has = mapCacheHas;
  28312. MapCache.prototype.set = mapCacheSet;
  28313. module.exports = MapCache;
  28314. }
  28315. });
  28316. // node_modules/lodash/_stackSet.js
  28317. var require_stackSet = __commonJS({
  28318. "node_modules/lodash/_stackSet.js"(exports, module) {
  28319. var ListCache = require_ListCache();
  28320. var Map2 = require_Map();
  28321. var MapCache = require_MapCache();
  28322. var LARGE_ARRAY_SIZE = 200;
  28323. function stackSet(key2, value2) {
  28324. var data3 = this.__data__;
  28325. if (data3 instanceof ListCache) {
  28326. var pairs = data3.__data__;
  28327. if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
  28328. pairs.push([key2, value2]);
  28329. this.size = ++data3.size;
  28330. return this;
  28331. }
  28332. data3 = this.__data__ = new MapCache(pairs);
  28333. }
  28334. data3.set(key2, value2);
  28335. this.size = data3.size;
  28336. return this;
  28337. }
  28338. module.exports = stackSet;
  28339. }
  28340. });
  28341. // node_modules/lodash/_Stack.js
  28342. var require_Stack = __commonJS({
  28343. "node_modules/lodash/_Stack.js"(exports, module) {
  28344. var ListCache = require_ListCache();
  28345. var stackClear = require_stackClear();
  28346. var stackDelete = require_stackDelete();
  28347. var stackGet = require_stackGet();
  28348. var stackHas = require_stackHas();
  28349. var stackSet = require_stackSet();
  28350. function Stack(entries) {
  28351. var data3 = this.__data__ = new ListCache(entries);
  28352. this.size = data3.size;
  28353. }
  28354. Stack.prototype.clear = stackClear;
  28355. Stack.prototype["delete"] = stackDelete;
  28356. Stack.prototype.get = stackGet;
  28357. Stack.prototype.has = stackHas;
  28358. Stack.prototype.set = stackSet;
  28359. module.exports = Stack;
  28360. }
  28361. });
  28362. // node_modules/lodash/_arrayEach.js
  28363. var require_arrayEach = __commonJS({
  28364. "node_modules/lodash/_arrayEach.js"(exports, module) {
  28365. function arrayEach(array, iteratee) {
  28366. var index2 = -1, length = array == null ? 0 : array.length;
  28367. while (++index2 < length) {
  28368. if (iteratee(array[index2], index2, array) === false) {
  28369. break;
  28370. }
  28371. }
  28372. return array;
  28373. }
  28374. module.exports = arrayEach;
  28375. }
  28376. });
  28377. // node_modules/lodash/_defineProperty.js
  28378. var require_defineProperty = __commonJS({
  28379. "node_modules/lodash/_defineProperty.js"(exports, module) {
  28380. var getNative = require_getNative();
  28381. var defineProperty = function() {
  28382. try {
  28383. var func = getNative(Object, "defineProperty");
  28384. func({}, "", {});
  28385. return func;
  28386. } catch (e) {
  28387. }
  28388. }();
  28389. module.exports = defineProperty;
  28390. }
  28391. });
  28392. // node_modules/lodash/_baseAssignValue.js
  28393. var require_baseAssignValue = __commonJS({
  28394. "node_modules/lodash/_baseAssignValue.js"(exports, module) {
  28395. var defineProperty = require_defineProperty();
  28396. function baseAssignValue(object, key2, value2) {
  28397. if (key2 == "__proto__" && defineProperty) {
  28398. defineProperty(object, key2, {
  28399. "configurable": true,
  28400. "enumerable": true,
  28401. "value": value2,
  28402. "writable": true
  28403. });
  28404. } else {
  28405. object[key2] = value2;
  28406. }
  28407. }
  28408. module.exports = baseAssignValue;
  28409. }
  28410. });
  28411. // node_modules/lodash/_assignValue.js
  28412. var require_assignValue = __commonJS({
  28413. "node_modules/lodash/_assignValue.js"(exports, module) {
  28414. var baseAssignValue = require_baseAssignValue();
  28415. var eq = require_eq();
  28416. var objectProto = Object.prototype;
  28417. var hasOwnProperty4 = objectProto.hasOwnProperty;
  28418. function assignValue(object, key2, value2) {
  28419. var objValue = object[key2];
  28420. if (!(hasOwnProperty4.call(object, key2) && eq(objValue, value2)) || value2 === void 0 && !(key2 in object)) {
  28421. baseAssignValue(object, key2, value2);
  28422. }
  28423. }
  28424. module.exports = assignValue;
  28425. }
  28426. });
  28427. // node_modules/lodash/_copyObject.js
  28428. var require_copyObject = __commonJS({
  28429. "node_modules/lodash/_copyObject.js"(exports, module) {
  28430. var assignValue = require_assignValue();
  28431. var baseAssignValue = require_baseAssignValue();
  28432. function copyObject(source2, props, object, customizer) {
  28433. var isNew = !object;
  28434. object || (object = {});
  28435. var index2 = -1, length = props.length;
  28436. while (++index2 < length) {
  28437. var key2 = props[index2];
  28438. var newValue = customizer ? customizer(object[key2], source2[key2], key2, object, source2) : void 0;
  28439. if (newValue === void 0) {
  28440. newValue = source2[key2];
  28441. }
  28442. if (isNew) {
  28443. baseAssignValue(object, key2, newValue);
  28444. } else {
  28445. assignValue(object, key2, newValue);
  28446. }
  28447. }
  28448. return object;
  28449. }
  28450. module.exports = copyObject;
  28451. }
  28452. });
  28453. // node_modules/lodash/_baseTimes.js
  28454. var require_baseTimes = __commonJS({
  28455. "node_modules/lodash/_baseTimes.js"(exports, module) {
  28456. function baseTimes(n, iteratee) {
  28457. var index2 = -1, result = Array(n);
  28458. while (++index2 < n) {
  28459. result[index2] = iteratee(index2);
  28460. }
  28461. return result;
  28462. }
  28463. module.exports = baseTimes;
  28464. }
  28465. });
  28466. // node_modules/lodash/isObjectLike.js
  28467. var require_isObjectLike = __commonJS({
  28468. "node_modules/lodash/isObjectLike.js"(exports, module) {
  28469. function isObjectLike(value2) {
  28470. return value2 != null && typeof value2 == "object";
  28471. }
  28472. module.exports = isObjectLike;
  28473. }
  28474. });
  28475. // node_modules/lodash/_baseIsArguments.js
  28476. var require_baseIsArguments = __commonJS({
  28477. "node_modules/lodash/_baseIsArguments.js"(exports, module) {
  28478. var baseGetTag = require_baseGetTag();
  28479. var isObjectLike = require_isObjectLike();
  28480. var argsTag = "[object Arguments]";
  28481. function baseIsArguments(value2) {
  28482. return isObjectLike(value2) && baseGetTag(value2) == argsTag;
  28483. }
  28484. module.exports = baseIsArguments;
  28485. }
  28486. });
  28487. // node_modules/lodash/isArguments.js
  28488. var require_isArguments = __commonJS({
  28489. "node_modules/lodash/isArguments.js"(exports, module) {
  28490. var baseIsArguments = require_baseIsArguments();
  28491. var isObjectLike = require_isObjectLike();
  28492. var objectProto = Object.prototype;
  28493. var hasOwnProperty4 = objectProto.hasOwnProperty;
  28494. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  28495. var isArguments = baseIsArguments(function() {
  28496. return arguments;
  28497. }()) ? baseIsArguments : function(value2) {
  28498. return isObjectLike(value2) && hasOwnProperty4.call(value2, "callee") && !propertyIsEnumerable.call(value2, "callee");
  28499. };
  28500. module.exports = isArguments;
  28501. }
  28502. });
  28503. // node_modules/lodash/isArray.js
  28504. var require_isArray = __commonJS({
  28505. "node_modules/lodash/isArray.js"(exports, module) {
  28506. var isArray3 = Array.isArray;
  28507. module.exports = isArray3;
  28508. }
  28509. });
  28510. // node_modules/lodash/stubFalse.js
  28511. var require_stubFalse = __commonJS({
  28512. "node_modules/lodash/stubFalse.js"(exports, module) {
  28513. function stubFalse() {
  28514. return false;
  28515. }
  28516. module.exports = stubFalse;
  28517. }
  28518. });
  28519. // node_modules/lodash/isBuffer.js
  28520. var require_isBuffer = __commonJS({
  28521. "node_modules/lodash/isBuffer.js"(exports, module) {
  28522. var root4 = require_root();
  28523. var stubFalse = require_stubFalse();
  28524. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  28525. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  28526. var moduleExports = freeModule && freeModule.exports === freeExports;
  28527. var Buffer2 = moduleExports ? root4.Buffer : void 0;
  28528. var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
  28529. var isBuffer2 = nativeIsBuffer || stubFalse;
  28530. module.exports = isBuffer2;
  28531. }
  28532. });
  28533. // node_modules/lodash/_isIndex.js
  28534. var require_isIndex = __commonJS({
  28535. "node_modules/lodash/_isIndex.js"(exports, module) {
  28536. var MAX_SAFE_INTEGER = 9007199254740991;
  28537. var reIsUint = /^(?:0|[1-9]\d*)$/;
  28538. function isIndex(value2, length) {
  28539. var type = typeof value2;
  28540. length = length == null ? MAX_SAFE_INTEGER : length;
  28541. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value2)) && (value2 > -1 && value2 % 1 == 0 && value2 < length);
  28542. }
  28543. module.exports = isIndex;
  28544. }
  28545. });
  28546. // node_modules/lodash/isLength.js
  28547. var require_isLength = __commonJS({
  28548. "node_modules/lodash/isLength.js"(exports, module) {
  28549. var MAX_SAFE_INTEGER = 9007199254740991;
  28550. function isLength(value2) {
  28551. return typeof value2 == "number" && value2 > -1 && value2 % 1 == 0 && value2 <= MAX_SAFE_INTEGER;
  28552. }
  28553. module.exports = isLength;
  28554. }
  28555. });
  28556. // node_modules/lodash/_baseIsTypedArray.js
  28557. var require_baseIsTypedArray = __commonJS({
  28558. "node_modules/lodash/_baseIsTypedArray.js"(exports, module) {
  28559. var baseGetTag = require_baseGetTag();
  28560. var isLength = require_isLength();
  28561. var isObjectLike = require_isObjectLike();
  28562. var argsTag = "[object Arguments]";
  28563. var arrayTag = "[object Array]";
  28564. var boolTag = "[object Boolean]";
  28565. var dateTag = "[object Date]";
  28566. var errorTag = "[object Error]";
  28567. var funcTag = "[object Function]";
  28568. var mapTag = "[object Map]";
  28569. var numberTag = "[object Number]";
  28570. var objectTag = "[object Object]";
  28571. var regexpTag = "[object RegExp]";
  28572. var setTag = "[object Set]";
  28573. var stringTag = "[object String]";
  28574. var weakMapTag = "[object WeakMap]";
  28575. var arrayBufferTag = "[object ArrayBuffer]";
  28576. var dataViewTag = "[object DataView]";
  28577. var float32Tag = "[object Float32Array]";
  28578. var float64Tag = "[object Float64Array]";
  28579. var int8Tag = "[object Int8Array]";
  28580. var int16Tag = "[object Int16Array]";
  28581. var int32Tag = "[object Int32Array]";
  28582. var uint8Tag = "[object Uint8Array]";
  28583. var uint8ClampedTag = "[object Uint8ClampedArray]";
  28584. var uint16Tag = "[object Uint16Array]";
  28585. var uint32Tag = "[object Uint32Array]";
  28586. var typedArrayTags = {};
  28587. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  28588. typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  28589. function baseIsTypedArray(value2) {
  28590. return isObjectLike(value2) && isLength(value2.length) && !!typedArrayTags[baseGetTag(value2)];
  28591. }
  28592. module.exports = baseIsTypedArray;
  28593. }
  28594. });
  28595. // node_modules/lodash/_baseUnary.js
  28596. var require_baseUnary = __commonJS({
  28597. "node_modules/lodash/_baseUnary.js"(exports, module) {
  28598. function baseUnary(func) {
  28599. return function(value2) {
  28600. return func(value2);
  28601. };
  28602. }
  28603. module.exports = baseUnary;
  28604. }
  28605. });
  28606. // node_modules/lodash/_nodeUtil.js
  28607. var require_nodeUtil = __commonJS({
  28608. "node_modules/lodash/_nodeUtil.js"(exports, module) {
  28609. var freeGlobal = require_freeGlobal();
  28610. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  28611. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  28612. var moduleExports = freeModule && freeModule.exports === freeExports;
  28613. var freeProcess = moduleExports && freeGlobal.process;
  28614. var nodeUtil = function() {
  28615. try {
  28616. var types3 = freeModule && freeModule.require && freeModule.require("util").types;
  28617. if (types3) {
  28618. return types3;
  28619. }
  28620. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  28621. } catch (e) {
  28622. }
  28623. }();
  28624. module.exports = nodeUtil;
  28625. }
  28626. });
  28627. // node_modules/lodash/isTypedArray.js
  28628. var require_isTypedArray = __commonJS({
  28629. "node_modules/lodash/isTypedArray.js"(exports, module) {
  28630. var baseIsTypedArray = require_baseIsTypedArray();
  28631. var baseUnary = require_baseUnary();
  28632. var nodeUtil = require_nodeUtil();
  28633. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  28634. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  28635. module.exports = isTypedArray;
  28636. }
  28637. });
  28638. // node_modules/lodash/_arrayLikeKeys.js
  28639. var require_arrayLikeKeys = __commonJS({
  28640. "node_modules/lodash/_arrayLikeKeys.js"(exports, module) {
  28641. var baseTimes = require_baseTimes();
  28642. var isArguments = require_isArguments();
  28643. var isArray3 = require_isArray();
  28644. var isBuffer2 = require_isBuffer();
  28645. var isIndex = require_isIndex();
  28646. var isTypedArray = require_isTypedArray();
  28647. var objectProto = Object.prototype;
  28648. var hasOwnProperty4 = objectProto.hasOwnProperty;
  28649. function arrayLikeKeys(value2, inherited) {
  28650. var isArr = isArray3(value2), isArg = !isArr && isArguments(value2), isBuff = !isArr && !isArg && isBuffer2(value2), isType = !isArr && !isArg && !isBuff && isTypedArray(value2), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value2.length, String) : [], length = result.length;
  28651. for (var key2 in value2) {
  28652. if ((inherited || hasOwnProperty4.call(value2, key2)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
  28653. (key2 == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  28654. isBuff && (key2 == "offset" || key2 == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  28655. isType && (key2 == "buffer" || key2 == "byteLength" || key2 == "byteOffset") || // Skip index properties.
  28656. isIndex(key2, length)))) {
  28657. result.push(key2);
  28658. }
  28659. }
  28660. return result;
  28661. }
  28662. module.exports = arrayLikeKeys;
  28663. }
  28664. });
  28665. // node_modules/lodash/_isPrototype.js
  28666. var require_isPrototype = __commonJS({
  28667. "node_modules/lodash/_isPrototype.js"(exports, module) {
  28668. var objectProto = Object.prototype;
  28669. function isPrototype(value2) {
  28670. var Ctor = value2 && value2.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
  28671. return value2 === proto;
  28672. }
  28673. module.exports = isPrototype;
  28674. }
  28675. });
  28676. // node_modules/lodash/_overArg.js
  28677. var require_overArg = __commonJS({
  28678. "node_modules/lodash/_overArg.js"(exports, module) {
  28679. function overArg(func, transform) {
  28680. return function(arg) {
  28681. return func(transform(arg));
  28682. };
  28683. }
  28684. module.exports = overArg;
  28685. }
  28686. });
  28687. // node_modules/lodash/_nativeKeys.js
  28688. var require_nativeKeys = __commonJS({
  28689. "node_modules/lodash/_nativeKeys.js"(exports, module) {
  28690. var overArg = require_overArg();
  28691. var nativeKeys = overArg(Object.keys, Object);
  28692. module.exports = nativeKeys;
  28693. }
  28694. });
  28695. // node_modules/lodash/_baseKeys.js
  28696. var require_baseKeys = __commonJS({
  28697. "node_modules/lodash/_baseKeys.js"(exports, module) {
  28698. var isPrototype = require_isPrototype();
  28699. var nativeKeys = require_nativeKeys();
  28700. var objectProto = Object.prototype;
  28701. var hasOwnProperty4 = objectProto.hasOwnProperty;
  28702. function baseKeys(object) {
  28703. if (!isPrototype(object)) {
  28704. return nativeKeys(object);
  28705. }
  28706. var result = [];
  28707. for (var key2 in Object(object)) {
  28708. if (hasOwnProperty4.call(object, key2) && key2 != "constructor") {
  28709. result.push(key2);
  28710. }
  28711. }
  28712. return result;
  28713. }
  28714. module.exports = baseKeys;
  28715. }
  28716. });
  28717. // node_modules/lodash/isArrayLike.js
  28718. var require_isArrayLike = __commonJS({
  28719. "node_modules/lodash/isArrayLike.js"(exports, module) {
  28720. var isFunction = require_isFunction();
  28721. var isLength = require_isLength();
  28722. function isArrayLike(value2) {
  28723. return value2 != null && isLength(value2.length) && !isFunction(value2);
  28724. }
  28725. module.exports = isArrayLike;
  28726. }
  28727. });
  28728. // node_modules/lodash/keys.js
  28729. var require_keys = __commonJS({
  28730. "node_modules/lodash/keys.js"(exports, module) {
  28731. var arrayLikeKeys = require_arrayLikeKeys();
  28732. var baseKeys = require_baseKeys();
  28733. var isArrayLike = require_isArrayLike();
  28734. function keys2(object) {
  28735. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  28736. }
  28737. module.exports = keys2;
  28738. }
  28739. });
  28740. // node_modules/lodash/_baseAssign.js
  28741. var require_baseAssign = __commonJS({
  28742. "node_modules/lodash/_baseAssign.js"(exports, module) {
  28743. var copyObject = require_copyObject();
  28744. var keys2 = require_keys();
  28745. function baseAssign(object, source2) {
  28746. return object && copyObject(source2, keys2(source2), object);
  28747. }
  28748. module.exports = baseAssign;
  28749. }
  28750. });
  28751. // node_modules/lodash/_nativeKeysIn.js
  28752. var require_nativeKeysIn = __commonJS({
  28753. "node_modules/lodash/_nativeKeysIn.js"(exports, module) {
  28754. function nativeKeysIn(object) {
  28755. var result = [];
  28756. if (object != null) {
  28757. for (var key2 in Object(object)) {
  28758. result.push(key2);
  28759. }
  28760. }
  28761. return result;
  28762. }
  28763. module.exports = nativeKeysIn;
  28764. }
  28765. });
  28766. // node_modules/lodash/_baseKeysIn.js
  28767. var require_baseKeysIn = __commonJS({
  28768. "node_modules/lodash/_baseKeysIn.js"(exports, module) {
  28769. var isObject = require_isObject();
  28770. var isPrototype = require_isPrototype();
  28771. var nativeKeysIn = require_nativeKeysIn();
  28772. var objectProto = Object.prototype;
  28773. var hasOwnProperty4 = objectProto.hasOwnProperty;
  28774. function baseKeysIn(object) {
  28775. if (!isObject(object)) {
  28776. return nativeKeysIn(object);
  28777. }
  28778. var isProto = isPrototype(object), result = [];
  28779. for (var key2 in object) {
  28780. if (!(key2 == "constructor" && (isProto || !hasOwnProperty4.call(object, key2)))) {
  28781. result.push(key2);
  28782. }
  28783. }
  28784. return result;
  28785. }
  28786. module.exports = baseKeysIn;
  28787. }
  28788. });
  28789. // node_modules/lodash/keysIn.js
  28790. var require_keysIn = __commonJS({
  28791. "node_modules/lodash/keysIn.js"(exports, module) {
  28792. var arrayLikeKeys = require_arrayLikeKeys();
  28793. var baseKeysIn = require_baseKeysIn();
  28794. var isArrayLike = require_isArrayLike();
  28795. function keysIn(object) {
  28796. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  28797. }
  28798. module.exports = keysIn;
  28799. }
  28800. });
  28801. // node_modules/lodash/_baseAssignIn.js
  28802. var require_baseAssignIn = __commonJS({
  28803. "node_modules/lodash/_baseAssignIn.js"(exports, module) {
  28804. var copyObject = require_copyObject();
  28805. var keysIn = require_keysIn();
  28806. function baseAssignIn(object, source2) {
  28807. return object && copyObject(source2, keysIn(source2), object);
  28808. }
  28809. module.exports = baseAssignIn;
  28810. }
  28811. });
  28812. // node_modules/lodash/_cloneBuffer.js
  28813. var require_cloneBuffer = __commonJS({
  28814. "node_modules/lodash/_cloneBuffer.js"(exports, module) {
  28815. var root4 = require_root();
  28816. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  28817. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  28818. var moduleExports = freeModule && freeModule.exports === freeExports;
  28819. var Buffer2 = moduleExports ? root4.Buffer : void 0;
  28820. var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
  28821. function cloneBuffer(buffer3, isDeep) {
  28822. if (isDeep) {
  28823. return buffer3.slice();
  28824. }
  28825. var length = buffer3.length, result = allocUnsafe ? allocUnsafe(length) : new buffer3.constructor(length);
  28826. buffer3.copy(result);
  28827. return result;
  28828. }
  28829. module.exports = cloneBuffer;
  28830. }
  28831. });
  28832. // node_modules/lodash/_copyArray.js
  28833. var require_copyArray = __commonJS({
  28834. "node_modules/lodash/_copyArray.js"(exports, module) {
  28835. function copyArray(source2, array) {
  28836. var index2 = -1, length = source2.length;
  28837. array || (array = Array(length));
  28838. while (++index2 < length) {
  28839. array[index2] = source2[index2];
  28840. }
  28841. return array;
  28842. }
  28843. module.exports = copyArray;
  28844. }
  28845. });
  28846. // node_modules/lodash/_arrayFilter.js
  28847. var require_arrayFilter = __commonJS({
  28848. "node_modules/lodash/_arrayFilter.js"(exports, module) {
  28849. function arrayFilter(array, predicate) {
  28850. var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
  28851. while (++index2 < length) {
  28852. var value2 = array[index2];
  28853. if (predicate(value2, index2, array)) {
  28854. result[resIndex++] = value2;
  28855. }
  28856. }
  28857. return result;
  28858. }
  28859. module.exports = arrayFilter;
  28860. }
  28861. });
  28862. // node_modules/lodash/stubArray.js
  28863. var require_stubArray = __commonJS({
  28864. "node_modules/lodash/stubArray.js"(exports, module) {
  28865. function stubArray() {
  28866. return [];
  28867. }
  28868. module.exports = stubArray;
  28869. }
  28870. });
  28871. // node_modules/lodash/_getSymbols.js
  28872. var require_getSymbols = __commonJS({
  28873. "node_modules/lodash/_getSymbols.js"(exports, module) {
  28874. var arrayFilter = require_arrayFilter();
  28875. var stubArray = require_stubArray();
  28876. var objectProto = Object.prototype;
  28877. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  28878. var nativeGetSymbols = Object.getOwnPropertySymbols;
  28879. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  28880. if (object == null) {
  28881. return [];
  28882. }
  28883. object = Object(object);
  28884. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  28885. return propertyIsEnumerable.call(object, symbol);
  28886. });
  28887. };
  28888. module.exports = getSymbols;
  28889. }
  28890. });
  28891. // node_modules/lodash/_copySymbols.js
  28892. var require_copySymbols = __commonJS({
  28893. "node_modules/lodash/_copySymbols.js"(exports, module) {
  28894. var copyObject = require_copyObject();
  28895. var getSymbols = require_getSymbols();
  28896. function copySymbols(source2, object) {
  28897. return copyObject(source2, getSymbols(source2), object);
  28898. }
  28899. module.exports = copySymbols;
  28900. }
  28901. });
  28902. // node_modules/lodash/_arrayPush.js
  28903. var require_arrayPush = __commonJS({
  28904. "node_modules/lodash/_arrayPush.js"(exports, module) {
  28905. function arrayPush(array, values) {
  28906. var index2 = -1, length = values.length, offset3 = array.length;
  28907. while (++index2 < length) {
  28908. array[offset3 + index2] = values[index2];
  28909. }
  28910. return array;
  28911. }
  28912. module.exports = arrayPush;
  28913. }
  28914. });
  28915. // node_modules/lodash/_getPrototype.js
  28916. var require_getPrototype = __commonJS({
  28917. "node_modules/lodash/_getPrototype.js"(exports, module) {
  28918. var overArg = require_overArg();
  28919. var getPrototype = overArg(Object.getPrototypeOf, Object);
  28920. module.exports = getPrototype;
  28921. }
  28922. });
  28923. // node_modules/lodash/_getSymbolsIn.js
  28924. var require_getSymbolsIn = __commonJS({
  28925. "node_modules/lodash/_getSymbolsIn.js"(exports, module) {
  28926. var arrayPush = require_arrayPush();
  28927. var getPrototype = require_getPrototype();
  28928. var getSymbols = require_getSymbols();
  28929. var stubArray = require_stubArray();
  28930. var nativeGetSymbols = Object.getOwnPropertySymbols;
  28931. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  28932. var result = [];
  28933. while (object) {
  28934. arrayPush(result, getSymbols(object));
  28935. object = getPrototype(object);
  28936. }
  28937. return result;
  28938. };
  28939. module.exports = getSymbolsIn;
  28940. }
  28941. });
  28942. // node_modules/lodash/_copySymbolsIn.js
  28943. var require_copySymbolsIn = __commonJS({
  28944. "node_modules/lodash/_copySymbolsIn.js"(exports, module) {
  28945. var copyObject = require_copyObject();
  28946. var getSymbolsIn = require_getSymbolsIn();
  28947. function copySymbolsIn(source2, object) {
  28948. return copyObject(source2, getSymbolsIn(source2), object);
  28949. }
  28950. module.exports = copySymbolsIn;
  28951. }
  28952. });
  28953. // node_modules/lodash/_baseGetAllKeys.js
  28954. var require_baseGetAllKeys = __commonJS({
  28955. "node_modules/lodash/_baseGetAllKeys.js"(exports, module) {
  28956. var arrayPush = require_arrayPush();
  28957. var isArray3 = require_isArray();
  28958. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  28959. var result = keysFunc(object);
  28960. return isArray3(object) ? result : arrayPush(result, symbolsFunc(object));
  28961. }
  28962. module.exports = baseGetAllKeys;
  28963. }
  28964. });
  28965. // node_modules/lodash/_getAllKeys.js
  28966. var require_getAllKeys = __commonJS({
  28967. "node_modules/lodash/_getAllKeys.js"(exports, module) {
  28968. var baseGetAllKeys = require_baseGetAllKeys();
  28969. var getSymbols = require_getSymbols();
  28970. var keys2 = require_keys();
  28971. function getAllKeys(object) {
  28972. return baseGetAllKeys(object, keys2, getSymbols);
  28973. }
  28974. module.exports = getAllKeys;
  28975. }
  28976. });
  28977. // node_modules/lodash/_getAllKeysIn.js
  28978. var require_getAllKeysIn = __commonJS({
  28979. "node_modules/lodash/_getAllKeysIn.js"(exports, module) {
  28980. var baseGetAllKeys = require_baseGetAllKeys();
  28981. var getSymbolsIn = require_getSymbolsIn();
  28982. var keysIn = require_keysIn();
  28983. function getAllKeysIn(object) {
  28984. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  28985. }
  28986. module.exports = getAllKeysIn;
  28987. }
  28988. });
  28989. // node_modules/lodash/_DataView.js
  28990. var require_DataView = __commonJS({
  28991. "node_modules/lodash/_DataView.js"(exports, module) {
  28992. var getNative = require_getNative();
  28993. var root4 = require_root();
  28994. var DataView = getNative(root4, "DataView");
  28995. module.exports = DataView;
  28996. }
  28997. });
  28998. // node_modules/lodash/_Promise.js
  28999. var require_Promise = __commonJS({
  29000. "node_modules/lodash/_Promise.js"(exports, module) {
  29001. var getNative = require_getNative();
  29002. var root4 = require_root();
  29003. var Promise2 = getNative(root4, "Promise");
  29004. module.exports = Promise2;
  29005. }
  29006. });
  29007. // node_modules/lodash/_Set.js
  29008. var require_Set = __commonJS({
  29009. "node_modules/lodash/_Set.js"(exports, module) {
  29010. var getNative = require_getNative();
  29011. var root4 = require_root();
  29012. var Set2 = getNative(root4, "Set");
  29013. module.exports = Set2;
  29014. }
  29015. });
  29016. // node_modules/lodash/_WeakMap.js
  29017. var require_WeakMap = __commonJS({
  29018. "node_modules/lodash/_WeakMap.js"(exports, module) {
  29019. var getNative = require_getNative();
  29020. var root4 = require_root();
  29021. var WeakMap2 = getNative(root4, "WeakMap");
  29022. module.exports = WeakMap2;
  29023. }
  29024. });
  29025. // node_modules/lodash/_getTag.js
  29026. var require_getTag = __commonJS({
  29027. "node_modules/lodash/_getTag.js"(exports, module) {
  29028. var DataView = require_DataView();
  29029. var Map2 = require_Map();
  29030. var Promise2 = require_Promise();
  29031. var Set2 = require_Set();
  29032. var WeakMap2 = require_WeakMap();
  29033. var baseGetTag = require_baseGetTag();
  29034. var toSource = require_toSource();
  29035. var mapTag = "[object Map]";
  29036. var objectTag = "[object Object]";
  29037. var promiseTag = "[object Promise]";
  29038. var setTag = "[object Set]";
  29039. var weakMapTag = "[object WeakMap]";
  29040. var dataViewTag = "[object DataView]";
  29041. var dataViewCtorString = toSource(DataView);
  29042. var mapCtorString = toSource(Map2);
  29043. var promiseCtorString = toSource(Promise2);
  29044. var setCtorString = toSource(Set2);
  29045. var weakMapCtorString = toSource(WeakMap2);
  29046. var getTag = baseGetTag;
  29047. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
  29048. getTag = function(value2) {
  29049. var result = baseGetTag(value2), Ctor = result == objectTag ? value2.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
  29050. if (ctorString) {
  29051. switch (ctorString) {
  29052. case dataViewCtorString:
  29053. return dataViewTag;
  29054. case mapCtorString:
  29055. return mapTag;
  29056. case promiseCtorString:
  29057. return promiseTag;
  29058. case setCtorString:
  29059. return setTag;
  29060. case weakMapCtorString:
  29061. return weakMapTag;
  29062. }
  29063. }
  29064. return result;
  29065. };
  29066. }
  29067. module.exports = getTag;
  29068. }
  29069. });
  29070. // node_modules/lodash/_initCloneArray.js
  29071. var require_initCloneArray = __commonJS({
  29072. "node_modules/lodash/_initCloneArray.js"(exports, module) {
  29073. var objectProto = Object.prototype;
  29074. var hasOwnProperty4 = objectProto.hasOwnProperty;
  29075. function initCloneArray(array) {
  29076. var length = array.length, result = new array.constructor(length);
  29077. if (length && typeof array[0] == "string" && hasOwnProperty4.call(array, "index")) {
  29078. result.index = array.index;
  29079. result.input = array.input;
  29080. }
  29081. return result;
  29082. }
  29083. module.exports = initCloneArray;
  29084. }
  29085. });
  29086. // node_modules/lodash/_Uint8Array.js
  29087. var require_Uint8Array = __commonJS({
  29088. "node_modules/lodash/_Uint8Array.js"(exports, module) {
  29089. var root4 = require_root();
  29090. var Uint8Array2 = root4.Uint8Array;
  29091. module.exports = Uint8Array2;
  29092. }
  29093. });
  29094. // node_modules/lodash/_cloneArrayBuffer.js
  29095. var require_cloneArrayBuffer = __commonJS({
  29096. "node_modules/lodash/_cloneArrayBuffer.js"(exports, module) {
  29097. var Uint8Array2 = require_Uint8Array();
  29098. function cloneArrayBuffer(arrayBuffer) {
  29099. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  29100. new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
  29101. return result;
  29102. }
  29103. module.exports = cloneArrayBuffer;
  29104. }
  29105. });
  29106. // node_modules/lodash/_cloneDataView.js
  29107. var require_cloneDataView = __commonJS({
  29108. "node_modules/lodash/_cloneDataView.js"(exports, module) {
  29109. var cloneArrayBuffer = require_cloneArrayBuffer();
  29110. function cloneDataView(dataView, isDeep) {
  29111. var buffer3 = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  29112. return new dataView.constructor(buffer3, dataView.byteOffset, dataView.byteLength);
  29113. }
  29114. module.exports = cloneDataView;
  29115. }
  29116. });
  29117. // node_modules/lodash/_cloneRegExp.js
  29118. var require_cloneRegExp = __commonJS({
  29119. "node_modules/lodash/_cloneRegExp.js"(exports, module) {
  29120. var reFlags = /\w*$/;
  29121. function cloneRegExp(regexp) {
  29122. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  29123. result.lastIndex = regexp.lastIndex;
  29124. return result;
  29125. }
  29126. module.exports = cloneRegExp;
  29127. }
  29128. });
  29129. // node_modules/lodash/_cloneSymbol.js
  29130. var require_cloneSymbol = __commonJS({
  29131. "node_modules/lodash/_cloneSymbol.js"(exports, module) {
  29132. var Symbol2 = require_Symbol();
  29133. var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
  29134. var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
  29135. function cloneSymbol(symbol) {
  29136. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  29137. }
  29138. module.exports = cloneSymbol;
  29139. }
  29140. });
  29141. // node_modules/lodash/_cloneTypedArray.js
  29142. var require_cloneTypedArray = __commonJS({
  29143. "node_modules/lodash/_cloneTypedArray.js"(exports, module) {
  29144. var cloneArrayBuffer = require_cloneArrayBuffer();
  29145. function cloneTypedArray(typedArray, isDeep) {
  29146. var buffer3 = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  29147. return new typedArray.constructor(buffer3, typedArray.byteOffset, typedArray.length);
  29148. }
  29149. module.exports = cloneTypedArray;
  29150. }
  29151. });
  29152. // node_modules/lodash/_initCloneByTag.js
  29153. var require_initCloneByTag = __commonJS({
  29154. "node_modules/lodash/_initCloneByTag.js"(exports, module) {
  29155. var cloneArrayBuffer = require_cloneArrayBuffer();
  29156. var cloneDataView = require_cloneDataView();
  29157. var cloneRegExp = require_cloneRegExp();
  29158. var cloneSymbol = require_cloneSymbol();
  29159. var cloneTypedArray = require_cloneTypedArray();
  29160. var boolTag = "[object Boolean]";
  29161. var dateTag = "[object Date]";
  29162. var mapTag = "[object Map]";
  29163. var numberTag = "[object Number]";
  29164. var regexpTag = "[object RegExp]";
  29165. var setTag = "[object Set]";
  29166. var stringTag = "[object String]";
  29167. var symbolTag = "[object Symbol]";
  29168. var arrayBufferTag = "[object ArrayBuffer]";
  29169. var dataViewTag = "[object DataView]";
  29170. var float32Tag = "[object Float32Array]";
  29171. var float64Tag = "[object Float64Array]";
  29172. var int8Tag = "[object Int8Array]";
  29173. var int16Tag = "[object Int16Array]";
  29174. var int32Tag = "[object Int32Array]";
  29175. var uint8Tag = "[object Uint8Array]";
  29176. var uint8ClampedTag = "[object Uint8ClampedArray]";
  29177. var uint16Tag = "[object Uint16Array]";
  29178. var uint32Tag = "[object Uint32Array]";
  29179. function initCloneByTag(object, tag, isDeep) {
  29180. var Ctor = object.constructor;
  29181. switch (tag) {
  29182. case arrayBufferTag:
  29183. return cloneArrayBuffer(object);
  29184. case boolTag:
  29185. case dateTag:
  29186. return new Ctor(+object);
  29187. case dataViewTag:
  29188. return cloneDataView(object, isDeep);
  29189. case float32Tag:
  29190. case float64Tag:
  29191. case int8Tag:
  29192. case int16Tag:
  29193. case int32Tag:
  29194. case uint8Tag:
  29195. case uint8ClampedTag:
  29196. case uint16Tag:
  29197. case uint32Tag:
  29198. return cloneTypedArray(object, isDeep);
  29199. case mapTag:
  29200. return new Ctor();
  29201. case numberTag:
  29202. case stringTag:
  29203. return new Ctor(object);
  29204. case regexpTag:
  29205. return cloneRegExp(object);
  29206. case setTag:
  29207. return new Ctor();
  29208. case symbolTag:
  29209. return cloneSymbol(object);
  29210. }
  29211. }
  29212. module.exports = initCloneByTag;
  29213. }
  29214. });
  29215. // node_modules/lodash/_baseCreate.js
  29216. var require_baseCreate = __commonJS({
  29217. "node_modules/lodash/_baseCreate.js"(exports, module) {
  29218. var isObject = require_isObject();
  29219. var objectCreate = Object.create;
  29220. var baseCreate = function() {
  29221. function object() {
  29222. }
  29223. return function(proto) {
  29224. if (!isObject(proto)) {
  29225. return {};
  29226. }
  29227. if (objectCreate) {
  29228. return objectCreate(proto);
  29229. }
  29230. object.prototype = proto;
  29231. var result = new object();
  29232. object.prototype = void 0;
  29233. return result;
  29234. };
  29235. }();
  29236. module.exports = baseCreate;
  29237. }
  29238. });
  29239. // node_modules/lodash/_initCloneObject.js
  29240. var require_initCloneObject = __commonJS({
  29241. "node_modules/lodash/_initCloneObject.js"(exports, module) {
  29242. var baseCreate = require_baseCreate();
  29243. var getPrototype = require_getPrototype();
  29244. var isPrototype = require_isPrototype();
  29245. function initCloneObject(object) {
  29246. return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  29247. }
  29248. module.exports = initCloneObject;
  29249. }
  29250. });
  29251. // node_modules/lodash/_baseIsMap.js
  29252. var require_baseIsMap = __commonJS({
  29253. "node_modules/lodash/_baseIsMap.js"(exports, module) {
  29254. var getTag = require_getTag();
  29255. var isObjectLike = require_isObjectLike();
  29256. var mapTag = "[object Map]";
  29257. function baseIsMap(value2) {
  29258. return isObjectLike(value2) && getTag(value2) == mapTag;
  29259. }
  29260. module.exports = baseIsMap;
  29261. }
  29262. });
  29263. // node_modules/lodash/isMap.js
  29264. var require_isMap = __commonJS({
  29265. "node_modules/lodash/isMap.js"(exports, module) {
  29266. var baseIsMap = require_baseIsMap();
  29267. var baseUnary = require_baseUnary();
  29268. var nodeUtil = require_nodeUtil();
  29269. var nodeIsMap = nodeUtil && nodeUtil.isMap;
  29270. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  29271. module.exports = isMap;
  29272. }
  29273. });
  29274. // node_modules/lodash/_baseIsSet.js
  29275. var require_baseIsSet = __commonJS({
  29276. "node_modules/lodash/_baseIsSet.js"(exports, module) {
  29277. var getTag = require_getTag();
  29278. var isObjectLike = require_isObjectLike();
  29279. var setTag = "[object Set]";
  29280. function baseIsSet(value2) {
  29281. return isObjectLike(value2) && getTag(value2) == setTag;
  29282. }
  29283. module.exports = baseIsSet;
  29284. }
  29285. });
  29286. // node_modules/lodash/isSet.js
  29287. var require_isSet = __commonJS({
  29288. "node_modules/lodash/isSet.js"(exports, module) {
  29289. var baseIsSet = require_baseIsSet();
  29290. var baseUnary = require_baseUnary();
  29291. var nodeUtil = require_nodeUtil();
  29292. var nodeIsSet = nodeUtil && nodeUtil.isSet;
  29293. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  29294. module.exports = isSet;
  29295. }
  29296. });
  29297. // node_modules/lodash/_baseClone.js
  29298. var require_baseClone = __commonJS({
  29299. "node_modules/lodash/_baseClone.js"(exports, module) {
  29300. var Stack = require_Stack();
  29301. var arrayEach = require_arrayEach();
  29302. var assignValue = require_assignValue();
  29303. var baseAssign = require_baseAssign();
  29304. var baseAssignIn = require_baseAssignIn();
  29305. var cloneBuffer = require_cloneBuffer();
  29306. var copyArray = require_copyArray();
  29307. var copySymbols = require_copySymbols();
  29308. var copySymbolsIn = require_copySymbolsIn();
  29309. var getAllKeys = require_getAllKeys();
  29310. var getAllKeysIn = require_getAllKeysIn();
  29311. var getTag = require_getTag();
  29312. var initCloneArray = require_initCloneArray();
  29313. var initCloneByTag = require_initCloneByTag();
  29314. var initCloneObject = require_initCloneObject();
  29315. var isArray3 = require_isArray();
  29316. var isBuffer2 = require_isBuffer();
  29317. var isMap = require_isMap();
  29318. var isObject = require_isObject();
  29319. var isSet = require_isSet();
  29320. var keys2 = require_keys();
  29321. var keysIn = require_keysIn();
  29322. var CLONE_DEEP_FLAG = 1;
  29323. var CLONE_FLAT_FLAG = 2;
  29324. var CLONE_SYMBOLS_FLAG = 4;
  29325. var argsTag = "[object Arguments]";
  29326. var arrayTag = "[object Array]";
  29327. var boolTag = "[object Boolean]";
  29328. var dateTag = "[object Date]";
  29329. var errorTag = "[object Error]";
  29330. var funcTag = "[object Function]";
  29331. var genTag = "[object GeneratorFunction]";
  29332. var mapTag = "[object Map]";
  29333. var numberTag = "[object Number]";
  29334. var objectTag = "[object Object]";
  29335. var regexpTag = "[object RegExp]";
  29336. var setTag = "[object Set]";
  29337. var stringTag = "[object String]";
  29338. var symbolTag = "[object Symbol]";
  29339. var weakMapTag = "[object WeakMap]";
  29340. var arrayBufferTag = "[object ArrayBuffer]";
  29341. var dataViewTag = "[object DataView]";
  29342. var float32Tag = "[object Float32Array]";
  29343. var float64Tag = "[object Float64Array]";
  29344. var int8Tag = "[object Int8Array]";
  29345. var int16Tag = "[object Int16Array]";
  29346. var int32Tag = "[object Int32Array]";
  29347. var uint8Tag = "[object Uint8Array]";
  29348. var uint8ClampedTag = "[object Uint8ClampedArray]";
  29349. var uint16Tag = "[object Uint16Array]";
  29350. var uint32Tag = "[object Uint32Array]";
  29351. var cloneableTags = {};
  29352. cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  29353. cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  29354. function baseClone(value2, bitmask, customizer, key2, object, stack2) {
  29355. var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
  29356. if (customizer) {
  29357. result = object ? customizer(value2, key2, object, stack2) : customizer(value2);
  29358. }
  29359. if (result !== void 0) {
  29360. return result;
  29361. }
  29362. if (!isObject(value2)) {
  29363. return value2;
  29364. }
  29365. var isArr = isArray3(value2);
  29366. if (isArr) {
  29367. result = initCloneArray(value2);
  29368. if (!isDeep) {
  29369. return copyArray(value2, result);
  29370. }
  29371. } else {
  29372. var tag = getTag(value2), isFunc = tag == funcTag || tag == genTag;
  29373. if (isBuffer2(value2)) {
  29374. return cloneBuffer(value2, isDeep);
  29375. }
  29376. if (tag == objectTag || tag == argsTag || isFunc && !object) {
  29377. result = isFlat || isFunc ? {} : initCloneObject(value2);
  29378. if (!isDeep) {
  29379. return isFlat ? copySymbolsIn(value2, baseAssignIn(result, value2)) : copySymbols(value2, baseAssign(result, value2));
  29380. }
  29381. } else {
  29382. if (!cloneableTags[tag]) {
  29383. return object ? value2 : {};
  29384. }
  29385. result = initCloneByTag(value2, tag, isDeep);
  29386. }
  29387. }
  29388. stack2 || (stack2 = new Stack());
  29389. var stacked = stack2.get(value2);
  29390. if (stacked) {
  29391. return stacked;
  29392. }
  29393. stack2.set(value2, result);
  29394. if (isSet(value2)) {
  29395. value2.forEach(function(subValue) {
  29396. result.add(baseClone(subValue, bitmask, customizer, subValue, value2, stack2));
  29397. });
  29398. } else if (isMap(value2)) {
  29399. value2.forEach(function(subValue, key3) {
  29400. result.set(key3, baseClone(subValue, bitmask, customizer, key3, value2, stack2));
  29401. });
  29402. }
  29403. var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys2;
  29404. var props = isArr ? void 0 : keysFunc(value2);
  29405. arrayEach(props || value2, function(subValue, key3) {
  29406. if (props) {
  29407. key3 = subValue;
  29408. subValue = value2[key3];
  29409. }
  29410. assignValue(result, key3, baseClone(subValue, bitmask, customizer, key3, value2, stack2));
  29411. });
  29412. return result;
  29413. }
  29414. module.exports = baseClone;
  29415. }
  29416. });
  29417. // node_modules/lodash/cloneDeep.js
  29418. var require_cloneDeep2 = __commonJS({
  29419. "node_modules/lodash/cloneDeep.js"(exports, module) {
  29420. var baseClone = require_baseClone();
  29421. var CLONE_DEEP_FLAG = 1;
  29422. var CLONE_SYMBOLS_FLAG = 4;
  29423. function cloneDeep2(value2) {
  29424. return baseClone(value2, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  29425. }
  29426. module.exports = cloneDeep2;
  29427. }
  29428. });
  29429. // node_modules/@babel/traverse/lib/path/lib/virtual-types.js
  29430. var require_virtual_types = __commonJS({
  29431. "node_modules/@babel/traverse/lib/path/lib/virtual-types.js"(exports) {
  29432. "use strict";
  29433. Object.defineProperty(exports, "__esModule", {
  29434. value: true
  29435. });
  29436. exports.Var = exports.User = exports.Statement = exports.SpreadProperty = exports.Scope = exports.RestProperty = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = exports.Referenced = exports.Pure = exports.NumericLiteralTypeAnnotation = exports.Generated = exports.ForAwaitStatement = exports.Flow = exports.Expression = exports.ExistentialTypeParam = exports.BlockScoped = exports.BindingIdentifier = void 0;
  29437. var ReferencedIdentifier = ["Identifier", "JSXIdentifier"];
  29438. exports.ReferencedIdentifier = ReferencedIdentifier;
  29439. var ReferencedMemberExpression = ["MemberExpression"];
  29440. exports.ReferencedMemberExpression = ReferencedMemberExpression;
  29441. var BindingIdentifier = ["Identifier"];
  29442. exports.BindingIdentifier = BindingIdentifier;
  29443. var Statement = ["Statement"];
  29444. exports.Statement = Statement;
  29445. var Expression = ["Expression"];
  29446. exports.Expression = Expression;
  29447. var Scope6 = ["Scopable", "Pattern"];
  29448. exports.Scope = Scope6;
  29449. var Referenced = null;
  29450. exports.Referenced = Referenced;
  29451. var BlockScoped = null;
  29452. exports.BlockScoped = BlockScoped;
  29453. var Var = ["VariableDeclaration"];
  29454. exports.Var = Var;
  29455. var User = null;
  29456. exports.User = User;
  29457. var Generated = null;
  29458. exports.Generated = Generated;
  29459. var Pure = null;
  29460. exports.Pure = Pure;
  29461. var Flow = ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"];
  29462. exports.Flow = Flow;
  29463. var RestProperty = ["RestElement"];
  29464. exports.RestProperty = RestProperty;
  29465. var SpreadProperty = ["RestElement"];
  29466. exports.SpreadProperty = SpreadProperty;
  29467. var ExistentialTypeParam = ["ExistsTypeAnnotation"];
  29468. exports.ExistentialTypeParam = ExistentialTypeParam;
  29469. var NumericLiteralTypeAnnotation = ["NumberLiteralTypeAnnotation"];
  29470. exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation;
  29471. var ForAwaitStatement = ["ForOfStatement"];
  29472. exports.ForAwaitStatement = ForAwaitStatement;
  29473. }
  29474. });
  29475. // node_modules/@babel/traverse/lib/visitors.js
  29476. var require_visitors = __commonJS({
  29477. "node_modules/@babel/traverse/lib/visitors.js"(exports) {
  29478. "use strict";
  29479. Object.defineProperty(exports, "__esModule", {
  29480. value: true
  29481. });
  29482. exports.explode = explode;
  29483. exports.merge = merge2;
  29484. exports.verify = verify;
  29485. var virtualTypes = require_virtual_types();
  29486. var _t = require_lib3();
  29487. var {
  29488. DEPRECATED_KEYS,
  29489. DEPRECATED_ALIASES,
  29490. FLIPPED_ALIAS_KEYS,
  29491. TYPES,
  29492. __internal__deprecationWarning: deprecationWarning
  29493. } = _t;
  29494. function isVirtualType(type) {
  29495. return type in virtualTypes;
  29496. }
  29497. function explode(visitor) {
  29498. if (visitor._exploded)
  29499. return visitor;
  29500. visitor._exploded = true;
  29501. for (const nodeType of Object.keys(visitor)) {
  29502. if (shouldIgnoreKey(nodeType))
  29503. continue;
  29504. const parts = nodeType.split("|");
  29505. if (parts.length === 1)
  29506. continue;
  29507. const fns = visitor[nodeType];
  29508. delete visitor[nodeType];
  29509. for (const part of parts) {
  29510. visitor[part] = fns;
  29511. }
  29512. }
  29513. verify(visitor);
  29514. delete visitor.__esModule;
  29515. ensureEntranceObjects(visitor);
  29516. ensureCallbackArrays(visitor);
  29517. for (const nodeType of Object.keys(visitor)) {
  29518. if (shouldIgnoreKey(nodeType))
  29519. continue;
  29520. if (!isVirtualType(nodeType))
  29521. continue;
  29522. const fns = visitor[nodeType];
  29523. for (const type of Object.keys(fns)) {
  29524. fns[type] = wrapCheck(nodeType, fns[type]);
  29525. }
  29526. delete visitor[nodeType];
  29527. const types3 = virtualTypes[nodeType];
  29528. if (types3 !== null) {
  29529. for (const type of types3) {
  29530. if (visitor[type]) {
  29531. mergePair(visitor[type], fns);
  29532. } else {
  29533. visitor[type] = fns;
  29534. }
  29535. }
  29536. } else {
  29537. mergePair(visitor, fns);
  29538. }
  29539. }
  29540. for (const nodeType of Object.keys(visitor)) {
  29541. if (shouldIgnoreKey(nodeType))
  29542. continue;
  29543. let aliases = FLIPPED_ALIAS_KEYS[nodeType];
  29544. if (nodeType in DEPRECATED_KEYS) {
  29545. const deprecatedKey = DEPRECATED_KEYS[nodeType];
  29546. deprecationWarning(nodeType, deprecatedKey, "Visitor ");
  29547. aliases = [deprecatedKey];
  29548. } else if (nodeType in DEPRECATED_ALIASES) {
  29549. const deprecatedAlias = DEPRECATED_ALIASES[nodeType];
  29550. deprecationWarning(nodeType, deprecatedAlias, "Visitor ");
  29551. aliases = FLIPPED_ALIAS_KEYS[deprecatedAlias];
  29552. }
  29553. if (!aliases)
  29554. continue;
  29555. const fns = visitor[nodeType];
  29556. delete visitor[nodeType];
  29557. for (const alias of aliases) {
  29558. const existing = visitor[alias];
  29559. if (existing) {
  29560. mergePair(existing, fns);
  29561. } else {
  29562. visitor[alias] = Object.assign({}, fns);
  29563. }
  29564. }
  29565. }
  29566. for (const nodeType of Object.keys(visitor)) {
  29567. if (shouldIgnoreKey(nodeType))
  29568. continue;
  29569. ensureCallbackArrays(visitor[nodeType]);
  29570. }
  29571. return visitor;
  29572. }
  29573. function verify(visitor) {
  29574. if (visitor._verified)
  29575. return;
  29576. if (typeof visitor === "function") {
  29577. throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");
  29578. }
  29579. for (const nodeType of Object.keys(visitor)) {
  29580. if (nodeType === "enter" || nodeType === "exit") {
  29581. validateVisitorMethods(nodeType, visitor[nodeType]);
  29582. }
  29583. if (shouldIgnoreKey(nodeType))
  29584. continue;
  29585. if (TYPES.indexOf(nodeType) < 0) {
  29586. throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`);
  29587. }
  29588. const visitors = visitor[nodeType];
  29589. if (typeof visitors === "object") {
  29590. for (const visitorKey of Object.keys(visitors)) {
  29591. if (visitorKey === "enter" || visitorKey === "exit") {
  29592. validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
  29593. } else {
  29594. throw new Error(`You passed \`traverse()\` a visitor object with the property ${nodeType} that has the invalid property ${visitorKey}`);
  29595. }
  29596. }
  29597. }
  29598. }
  29599. visitor._verified = true;
  29600. }
  29601. function validateVisitorMethods(path, val) {
  29602. const fns = [].concat(val);
  29603. for (const fn of fns) {
  29604. if (typeof fn !== "function") {
  29605. throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
  29606. }
  29607. }
  29608. }
  29609. function merge2(visitors, states = [], wrapper) {
  29610. const rootVisitor = {};
  29611. for (let i = 0; i < visitors.length; i++) {
  29612. const visitor = visitors[i];
  29613. const state = states[i];
  29614. explode(visitor);
  29615. for (const type of Object.keys(visitor)) {
  29616. let visitorType = visitor[type];
  29617. if (state || wrapper) {
  29618. visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
  29619. }
  29620. const nodeVisitor = rootVisitor[type] || (rootVisitor[type] = {});
  29621. mergePair(nodeVisitor, visitorType);
  29622. }
  29623. }
  29624. return rootVisitor;
  29625. }
  29626. function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
  29627. const newVisitor = {};
  29628. for (const key2 of Object.keys(oldVisitor)) {
  29629. let fns = oldVisitor[key2];
  29630. if (!Array.isArray(fns))
  29631. continue;
  29632. fns = fns.map(function(fn) {
  29633. let newFn = fn;
  29634. if (state) {
  29635. newFn = function(path) {
  29636. return fn.call(state, path, state);
  29637. };
  29638. }
  29639. if (wrapper) {
  29640. newFn = wrapper(state.key, key2, newFn);
  29641. }
  29642. if (newFn !== fn) {
  29643. newFn.toString = () => fn.toString();
  29644. }
  29645. return newFn;
  29646. });
  29647. newVisitor[key2] = fns;
  29648. }
  29649. return newVisitor;
  29650. }
  29651. function ensureEntranceObjects(obj) {
  29652. for (const key2 of Object.keys(obj)) {
  29653. if (shouldIgnoreKey(key2))
  29654. continue;
  29655. const fns = obj[key2];
  29656. if (typeof fns === "function") {
  29657. obj[key2] = {
  29658. enter: fns
  29659. };
  29660. }
  29661. }
  29662. }
  29663. function ensureCallbackArrays(obj) {
  29664. if (obj.enter && !Array.isArray(obj.enter))
  29665. obj.enter = [obj.enter];
  29666. if (obj.exit && !Array.isArray(obj.exit))
  29667. obj.exit = [obj.exit];
  29668. }
  29669. function wrapCheck(nodeType, fn) {
  29670. const newFn = function(path) {
  29671. if (path[`is${nodeType}`]()) {
  29672. return fn.apply(this, arguments);
  29673. }
  29674. };
  29675. newFn.toString = () => fn.toString();
  29676. return newFn;
  29677. }
  29678. function shouldIgnoreKey(key2) {
  29679. if (key2[0] === "_")
  29680. return true;
  29681. if (key2 === "enter" || key2 === "exit" || key2 === "shouldSkip")
  29682. return true;
  29683. if (key2 === "denylist" || key2 === "noScope" || key2 === "skipKeys" || key2 === "blacklist") {
  29684. return true;
  29685. }
  29686. return false;
  29687. }
  29688. function mergePair(dest, src) {
  29689. for (const key2 of Object.keys(src)) {
  29690. dest[key2] = [].concat(dest[key2] || [], src[key2]);
  29691. }
  29692. }
  29693. }
  29694. });
  29695. // node_modules/@babel/traverse/lib/cache.js
  29696. var require_cache = __commonJS({
  29697. "node_modules/@babel/traverse/lib/cache.js"(exports) {
  29698. "use strict";
  29699. Object.defineProperty(exports, "__esModule", {
  29700. value: true
  29701. });
  29702. exports.clear = clear;
  29703. exports.clearPath = clearPath;
  29704. exports.clearScope = clearScope;
  29705. exports.scope = exports.path = void 0;
  29706. var path = /* @__PURE__ */ new WeakMap();
  29707. exports.path = path;
  29708. var scope = /* @__PURE__ */ new WeakMap();
  29709. exports.scope = scope;
  29710. function clear() {
  29711. clearPath();
  29712. clearScope();
  29713. }
  29714. function clearPath() {
  29715. exports.path = path = /* @__PURE__ */ new WeakMap();
  29716. }
  29717. function clearScope() {
  29718. exports.scope = scope = /* @__PURE__ */ new WeakMap();
  29719. }
  29720. }
  29721. });
  29722. // node_modules/ms/index.js
  29723. var require_ms = __commonJS({
  29724. "node_modules/ms/index.js"(exports, module) {
  29725. var s = 1e3;
  29726. var m = s * 60;
  29727. var h = m * 60;
  29728. var d = h * 24;
  29729. var w = d * 7;
  29730. var y = d * 365.25;
  29731. module.exports = function(val, options) {
  29732. options = options || {};
  29733. var type = typeof val;
  29734. if (type === "string" && val.length > 0) {
  29735. return parse9(val);
  29736. } else if (type === "number" && isFinite(val)) {
  29737. return options.long ? fmtLong(val) : fmtShort(val);
  29738. }
  29739. throw new Error(
  29740. "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
  29741. );
  29742. };
  29743. function parse9(str) {
  29744. str = String(str);
  29745. if (str.length > 100) {
  29746. return;
  29747. }
  29748. var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
  29749. str
  29750. );
  29751. if (!match) {
  29752. return;
  29753. }
  29754. var n = parseFloat(match[1]);
  29755. var type = (match[2] || "ms").toLowerCase();
  29756. switch (type) {
  29757. case "years":
  29758. case "year":
  29759. case "yrs":
  29760. case "yr":
  29761. case "y":
  29762. return n * y;
  29763. case "weeks":
  29764. case "week":
  29765. case "w":
  29766. return n * w;
  29767. case "days":
  29768. case "day":
  29769. case "d":
  29770. return n * d;
  29771. case "hours":
  29772. case "hour":
  29773. case "hrs":
  29774. case "hr":
  29775. case "h":
  29776. return n * h;
  29777. case "minutes":
  29778. case "minute":
  29779. case "mins":
  29780. case "min":
  29781. case "m":
  29782. return n * m;
  29783. case "seconds":
  29784. case "second":
  29785. case "secs":
  29786. case "sec":
  29787. case "s":
  29788. return n * s;
  29789. case "milliseconds":
  29790. case "millisecond":
  29791. case "msecs":
  29792. case "msec":
  29793. case "ms":
  29794. return n;
  29795. default:
  29796. return void 0;
  29797. }
  29798. }
  29799. function fmtShort(ms) {
  29800. var msAbs = Math.abs(ms);
  29801. if (msAbs >= d) {
  29802. return Math.round(ms / d) + "d";
  29803. }
  29804. if (msAbs >= h) {
  29805. return Math.round(ms / h) + "h";
  29806. }
  29807. if (msAbs >= m) {
  29808. return Math.round(ms / m) + "m";
  29809. }
  29810. if (msAbs >= s) {
  29811. return Math.round(ms / s) + "s";
  29812. }
  29813. return ms + "ms";
  29814. }
  29815. function fmtLong(ms) {
  29816. var msAbs = Math.abs(ms);
  29817. if (msAbs >= d) {
  29818. return plural(ms, msAbs, d, "day");
  29819. }
  29820. if (msAbs >= h) {
  29821. return plural(ms, msAbs, h, "hour");
  29822. }
  29823. if (msAbs >= m) {
  29824. return plural(ms, msAbs, m, "minute");
  29825. }
  29826. if (msAbs >= s) {
  29827. return plural(ms, msAbs, s, "second");
  29828. }
  29829. return ms + " ms";
  29830. }
  29831. function plural(ms, msAbs, n, name2) {
  29832. var isPlural = msAbs >= n * 1.5;
  29833. return Math.round(ms / n) + " " + name2 + (isPlural ? "s" : "");
  29834. }
  29835. }
  29836. });
  29837. // node_modules/debug/src/common.js
  29838. var require_common = __commonJS({
  29839. "node_modules/debug/src/common.js"(exports, module) {
  29840. function setup(env) {
  29841. createDebug.debug = createDebug;
  29842. createDebug.default = createDebug;
  29843. createDebug.coerce = coerce;
  29844. createDebug.disable = disable2;
  29845. createDebug.enable = enable;
  29846. createDebug.enabled = enabled;
  29847. createDebug.humanize = require_ms();
  29848. createDebug.destroy = destroy;
  29849. Object.keys(env).forEach((key2) => {
  29850. createDebug[key2] = env[key2];
  29851. });
  29852. createDebug.names = [];
  29853. createDebug.skips = [];
  29854. createDebug.formatters = {};
  29855. function selectColor(namespace) {
  29856. let hash = 0;
  29857. for (let i = 0; i < namespace.length; i++) {
  29858. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  29859. hash |= 0;
  29860. }
  29861. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  29862. }
  29863. createDebug.selectColor = selectColor;
  29864. function createDebug(namespace) {
  29865. let prevTime;
  29866. let enableOverride = null;
  29867. let namespacesCache;
  29868. let enabledCache;
  29869. function debug(...args) {
  29870. if (!debug.enabled) {
  29871. return;
  29872. }
  29873. const self2 = debug;
  29874. const curr = Number(/* @__PURE__ */ new Date());
  29875. const ms = curr - (prevTime || curr);
  29876. self2.diff = ms;
  29877. self2.prev = prevTime;
  29878. self2.curr = curr;
  29879. prevTime = curr;
  29880. args[0] = createDebug.coerce(args[0]);
  29881. if (typeof args[0] !== "string") {
  29882. args.unshift("%O");
  29883. }
  29884. let index2 = 0;
  29885. args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
  29886. if (match === "%%") {
  29887. return "%";
  29888. }
  29889. index2++;
  29890. const formatter = createDebug.formatters[format];
  29891. if (typeof formatter === "function") {
  29892. const val = args[index2];
  29893. match = formatter.call(self2, val);
  29894. args.splice(index2, 1);
  29895. index2--;
  29896. }
  29897. return match;
  29898. });
  29899. createDebug.formatArgs.call(self2, args);
  29900. const logFn = self2.log || createDebug.log;
  29901. logFn.apply(self2, args);
  29902. }
  29903. debug.namespace = namespace;
  29904. debug.useColors = createDebug.useColors();
  29905. debug.color = createDebug.selectColor(namespace);
  29906. debug.extend = extend4;
  29907. debug.destroy = createDebug.destroy;
  29908. Object.defineProperty(debug, "enabled", {
  29909. enumerable: true,
  29910. configurable: false,
  29911. get: () => {
  29912. if (enableOverride !== null) {
  29913. return enableOverride;
  29914. }
  29915. if (namespacesCache !== createDebug.namespaces) {
  29916. namespacesCache = createDebug.namespaces;
  29917. enabledCache = createDebug.enabled(namespace);
  29918. }
  29919. return enabledCache;
  29920. },
  29921. set: (v) => {
  29922. enableOverride = v;
  29923. }
  29924. });
  29925. if (typeof createDebug.init === "function") {
  29926. createDebug.init(debug);
  29927. }
  29928. return debug;
  29929. }
  29930. function extend4(namespace, delimiter) {
  29931. const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
  29932. newDebug.log = this.log;
  29933. return newDebug;
  29934. }
  29935. function enable(namespaces) {
  29936. createDebug.save(namespaces);
  29937. createDebug.namespaces = namespaces;
  29938. createDebug.names = [];
  29939. createDebug.skips = [];
  29940. let i;
  29941. const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
  29942. const len = split.length;
  29943. for (i = 0; i < len; i++) {
  29944. if (!split[i]) {
  29945. continue;
  29946. }
  29947. namespaces = split[i].replace(/\*/g, ".*?");
  29948. if (namespaces[0] === "-") {
  29949. createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
  29950. } else {
  29951. createDebug.names.push(new RegExp("^" + namespaces + "$"));
  29952. }
  29953. }
  29954. }
  29955. function disable2() {
  29956. const namespaces = [
  29957. ...createDebug.names.map(toNamespace),
  29958. ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
  29959. ].join(",");
  29960. createDebug.enable("");
  29961. return namespaces;
  29962. }
  29963. function enabled(name2) {
  29964. if (name2[name2.length - 1] === "*") {
  29965. return true;
  29966. }
  29967. let i;
  29968. let len;
  29969. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  29970. if (createDebug.skips[i].test(name2)) {
  29971. return false;
  29972. }
  29973. }
  29974. for (i = 0, len = createDebug.names.length; i < len; i++) {
  29975. if (createDebug.names[i].test(name2)) {
  29976. return true;
  29977. }
  29978. }
  29979. return false;
  29980. }
  29981. function toNamespace(regexp) {
  29982. return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
  29983. }
  29984. function coerce(val) {
  29985. if (val instanceof Error) {
  29986. return val.stack || val.message;
  29987. }
  29988. return val;
  29989. }
  29990. function destroy() {
  29991. console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
  29992. }
  29993. createDebug.enable(createDebug.load());
  29994. return createDebug;
  29995. }
  29996. module.exports = setup;
  29997. }
  29998. });
  29999. // node_modules/debug/src/browser.js
  30000. var require_browser = __commonJS({
  30001. "node_modules/debug/src/browser.js"(exports, module) {
  30002. exports.formatArgs = formatArgs;
  30003. exports.save = save;
  30004. exports.load = load;
  30005. exports.useColors = useColors;
  30006. exports.storage = localstorage();
  30007. exports.destroy = (() => {
  30008. let warned = false;
  30009. return () => {
  30010. if (!warned) {
  30011. warned = true;
  30012. console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
  30013. }
  30014. };
  30015. })();
  30016. exports.colors = [
  30017. "#0000CC",
  30018. "#0000FF",
  30019. "#0033CC",
  30020. "#0033FF",
  30021. "#0066CC",
  30022. "#0066FF",
  30023. "#0099CC",
  30024. "#0099FF",
  30025. "#00CC00",
  30026. "#00CC33",
  30027. "#00CC66",
  30028. "#00CC99",
  30029. "#00CCCC",
  30030. "#00CCFF",
  30031. "#3300CC",
  30032. "#3300FF",
  30033. "#3333CC",
  30034. "#3333FF",
  30035. "#3366CC",
  30036. "#3366FF",
  30037. "#3399CC",
  30038. "#3399FF",
  30039. "#33CC00",
  30040. "#33CC33",
  30041. "#33CC66",
  30042. "#33CC99",
  30043. "#33CCCC",
  30044. "#33CCFF",
  30045. "#6600CC",
  30046. "#6600FF",
  30047. "#6633CC",
  30048. "#6633FF",
  30049. "#66CC00",
  30050. "#66CC33",
  30051. "#9900CC",
  30052. "#9900FF",
  30053. "#9933CC",
  30054. "#9933FF",
  30055. "#99CC00",
  30056. "#99CC33",
  30057. "#CC0000",
  30058. "#CC0033",
  30059. "#CC0066",
  30060. "#CC0099",
  30061. "#CC00CC",
  30062. "#CC00FF",
  30063. "#CC3300",
  30064. "#CC3333",
  30065. "#CC3366",
  30066. "#CC3399",
  30067. "#CC33CC",
  30068. "#CC33FF",
  30069. "#CC6600",
  30070. "#CC6633",
  30071. "#CC9900",
  30072. "#CC9933",
  30073. "#CCCC00",
  30074. "#CCCC33",
  30075. "#FF0000",
  30076. "#FF0033",
  30077. "#FF0066",
  30078. "#FF0099",
  30079. "#FF00CC",
  30080. "#FF00FF",
  30081. "#FF3300",
  30082. "#FF3333",
  30083. "#FF3366",
  30084. "#FF3399",
  30085. "#FF33CC",
  30086. "#FF33FF",
  30087. "#FF6600",
  30088. "#FF6633",
  30089. "#FF9900",
  30090. "#FF9933",
  30091. "#FFCC00",
  30092. "#FFCC33"
  30093. ];
  30094. function useColors() {
  30095. if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
  30096. return true;
  30097. }
  30098. if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  30099. return false;
  30100. }
  30101. return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
  30102. typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
  30103. // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
  30104. typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
  30105. typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
  30106. }
  30107. function formatArgs(args) {
  30108. args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
  30109. if (!this.useColors) {
  30110. return;
  30111. }
  30112. const c2 = "color: " + this.color;
  30113. args.splice(1, 0, c2, "color: inherit");
  30114. let index2 = 0;
  30115. let lastC = 0;
  30116. args[0].replace(/%[a-zA-Z%]/g, (match) => {
  30117. if (match === "%%") {
  30118. return;
  30119. }
  30120. index2++;
  30121. if (match === "%c") {
  30122. lastC = index2;
  30123. }
  30124. });
  30125. args.splice(lastC, 0, c2);
  30126. }
  30127. exports.log = console.debug || console.log || (() => {
  30128. });
  30129. function save(namespaces) {
  30130. try {
  30131. if (namespaces) {
  30132. exports.storage.setItem("debug", namespaces);
  30133. } else {
  30134. exports.storage.removeItem("debug");
  30135. }
  30136. } catch (error) {
  30137. }
  30138. }
  30139. function load() {
  30140. let r;
  30141. try {
  30142. r = exports.storage.getItem("debug");
  30143. } catch (error) {
  30144. }
  30145. if (!r && typeof process !== "undefined" && "env" in process) {
  30146. r = process.env.DEBUG;
  30147. }
  30148. return r;
  30149. }
  30150. function localstorage() {
  30151. try {
  30152. return localStorage;
  30153. } catch (error) {
  30154. }
  30155. }
  30156. module.exports = require_common()(exports);
  30157. var { formatters } = module.exports;
  30158. formatters.j = function(v) {
  30159. try {
  30160. return JSON.stringify(v);
  30161. } catch (error) {
  30162. return "[UnexpectedJSONParseError]: " + error.message;
  30163. }
  30164. };
  30165. }
  30166. });
  30167. // node_modules/has-flag/index.js
  30168. var require_has_flag = __commonJS({
  30169. "node_modules/has-flag/index.js"(exports, module) {
  30170. "use strict";
  30171. module.exports = (flag, argv = process.argv) => {
  30172. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  30173. const position3 = argv.indexOf(prefix + flag);
  30174. const terminatorPosition = argv.indexOf("--");
  30175. return position3 !== -1 && (terminatorPosition === -1 || position3 < terminatorPosition);
  30176. };
  30177. }
  30178. });
  30179. // node_modules/supports-color/index.js
  30180. var require_supports_color = __commonJS({
  30181. "node_modules/supports-color/index.js"(exports, module) {
  30182. "use strict";
  30183. var os = __require("os");
  30184. var tty = __require("tty");
  30185. var hasFlag = require_has_flag();
  30186. var { env } = process;
  30187. var forceColor;
  30188. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
  30189. forceColor = 0;
  30190. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  30191. forceColor = 1;
  30192. }
  30193. if ("FORCE_COLOR" in env) {
  30194. if (env.FORCE_COLOR === "true") {
  30195. forceColor = 1;
  30196. } else if (env.FORCE_COLOR === "false") {
  30197. forceColor = 0;
  30198. } else {
  30199. forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
  30200. }
  30201. }
  30202. function translateLevel(level) {
  30203. if (level === 0) {
  30204. return false;
  30205. }
  30206. return {
  30207. level,
  30208. hasBasic: true,
  30209. has256: level >= 2,
  30210. has16m: level >= 3
  30211. };
  30212. }
  30213. function supportsColor(haveStream, streamIsTTY) {
  30214. if (forceColor === 0) {
  30215. return 0;
  30216. }
  30217. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  30218. return 3;
  30219. }
  30220. if (hasFlag("color=256")) {
  30221. return 2;
  30222. }
  30223. if (haveStream && !streamIsTTY && forceColor === void 0) {
  30224. return 0;
  30225. }
  30226. const min = forceColor || 0;
  30227. if (env.TERM === "dumb") {
  30228. return min;
  30229. }
  30230. if (process.platform === "win32") {
  30231. const osRelease = os.release().split(".");
  30232. if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  30233. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  30234. }
  30235. return 1;
  30236. }
  30237. if ("CI" in env) {
  30238. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign2) => sign2 in env) || env.CI_NAME === "codeship") {
  30239. return 1;
  30240. }
  30241. return min;
  30242. }
  30243. if ("TEAMCITY_VERSION" in env) {
  30244. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  30245. }
  30246. if (env.COLORTERM === "truecolor") {
  30247. return 3;
  30248. }
  30249. if ("TERM_PROGRAM" in env) {
  30250. const version3 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  30251. switch (env.TERM_PROGRAM) {
  30252. case "iTerm.app":
  30253. return version3 >= 3 ? 3 : 2;
  30254. case "Apple_Terminal":
  30255. return 2;
  30256. }
  30257. }
  30258. if (/-256(color)?$/i.test(env.TERM)) {
  30259. return 2;
  30260. }
  30261. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  30262. return 1;
  30263. }
  30264. if ("COLORTERM" in env) {
  30265. return 1;
  30266. }
  30267. return min;
  30268. }
  30269. function getSupportLevel(stream) {
  30270. const level = supportsColor(stream, stream && stream.isTTY);
  30271. return translateLevel(level);
  30272. }
  30273. module.exports = {
  30274. supportsColor: getSupportLevel,
  30275. stdout: translateLevel(supportsColor(true, tty.isatty(1))),
  30276. stderr: translateLevel(supportsColor(true, tty.isatty(2)))
  30277. };
  30278. }
  30279. });
  30280. // node_modules/debug/src/node.js
  30281. var require_node2 = __commonJS({
  30282. "node_modules/debug/src/node.js"(exports, module) {
  30283. var tty = __require("tty");
  30284. var util2 = __require("util");
  30285. exports.init = init;
  30286. exports.log = log;
  30287. exports.formatArgs = formatArgs;
  30288. exports.save = save;
  30289. exports.load = load;
  30290. exports.useColors = useColors;
  30291. exports.destroy = util2.deprecate(
  30292. () => {
  30293. },
  30294. "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
  30295. );
  30296. exports.colors = [6, 2, 3, 4, 5, 1];
  30297. try {
  30298. const supportsColor = require_supports_color();
  30299. if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
  30300. exports.colors = [
  30301. 20,
  30302. 21,
  30303. 26,
  30304. 27,
  30305. 32,
  30306. 33,
  30307. 38,
  30308. 39,
  30309. 40,
  30310. 41,
  30311. 42,
  30312. 43,
  30313. 44,
  30314. 45,
  30315. 56,
  30316. 57,
  30317. 62,
  30318. 63,
  30319. 68,
  30320. 69,
  30321. 74,
  30322. 75,
  30323. 76,
  30324. 77,
  30325. 78,
  30326. 79,
  30327. 80,
  30328. 81,
  30329. 92,
  30330. 93,
  30331. 98,
  30332. 99,
  30333. 112,
  30334. 113,
  30335. 128,
  30336. 129,
  30337. 134,
  30338. 135,
  30339. 148,
  30340. 149,
  30341. 160,
  30342. 161,
  30343. 162,
  30344. 163,
  30345. 164,
  30346. 165,
  30347. 166,
  30348. 167,
  30349. 168,
  30350. 169,
  30351. 170,
  30352. 171,
  30353. 172,
  30354. 173,
  30355. 178,
  30356. 179,
  30357. 184,
  30358. 185,
  30359. 196,
  30360. 197,
  30361. 198,
  30362. 199,
  30363. 200,
  30364. 201,
  30365. 202,
  30366. 203,
  30367. 204,
  30368. 205,
  30369. 206,
  30370. 207,
  30371. 208,
  30372. 209,
  30373. 214,
  30374. 215,
  30375. 220,
  30376. 221
  30377. ];
  30378. }
  30379. } catch (error) {
  30380. }
  30381. exports.inspectOpts = Object.keys(process.env).filter((key2) => {
  30382. return /^debug_/i.test(key2);
  30383. }).reduce((obj, key2) => {
  30384. const prop = key2.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
  30385. return k.toUpperCase();
  30386. });
  30387. let val = process.env[key2];
  30388. if (/^(yes|on|true|enabled)$/i.test(val)) {
  30389. val = true;
  30390. } else if (/^(no|off|false|disabled)$/i.test(val)) {
  30391. val = false;
  30392. } else if (val === "null") {
  30393. val = null;
  30394. } else {
  30395. val = Number(val);
  30396. }
  30397. obj[prop] = val;
  30398. return obj;
  30399. }, {});
  30400. function useColors() {
  30401. return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
  30402. }
  30403. function formatArgs(args) {
  30404. const { namespace: name2, useColors: useColors2 } = this;
  30405. if (useColors2) {
  30406. const c2 = this.color;
  30407. const colorCode = "\x1B[3" + (c2 < 8 ? c2 : "8;5;" + c2);
  30408. const prefix = ` ${colorCode};1m${name2} \x1B[0m`;
  30409. args[0] = prefix + args[0].split("\n").join("\n" + prefix);
  30410. args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
  30411. } else {
  30412. args[0] = getDate() + name2 + " " + args[0];
  30413. }
  30414. }
  30415. function getDate() {
  30416. if (exports.inspectOpts.hideDate) {
  30417. return "";
  30418. }
  30419. return (/* @__PURE__ */ new Date()).toISOString() + " ";
  30420. }
  30421. function log(...args) {
  30422. return process.stderr.write(util2.format(...args) + "\n");
  30423. }
  30424. function save(namespaces) {
  30425. if (namespaces) {
  30426. process.env.DEBUG = namespaces;
  30427. } else {
  30428. delete process.env.DEBUG;
  30429. }
  30430. }
  30431. function load() {
  30432. return process.env.DEBUG;
  30433. }
  30434. function init(debug) {
  30435. debug.inspectOpts = {};
  30436. const keys2 = Object.keys(exports.inspectOpts);
  30437. for (let i = 0; i < keys2.length; i++) {
  30438. debug.inspectOpts[keys2[i]] = exports.inspectOpts[keys2[i]];
  30439. }
  30440. }
  30441. module.exports = require_common()(exports);
  30442. var { formatters } = module.exports;
  30443. formatters.o = function(v) {
  30444. this.inspectOpts.colors = this.useColors;
  30445. return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
  30446. };
  30447. formatters.O = function(v) {
  30448. this.inspectOpts.colors = this.useColors;
  30449. return util2.inspect(v, this.inspectOpts);
  30450. };
  30451. }
  30452. });
  30453. // node_modules/debug/src/index.js
  30454. var require_src = __commonJS({
  30455. "node_modules/debug/src/index.js"(exports, module) {
  30456. if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
  30457. module.exports = require_browser();
  30458. } else {
  30459. module.exports = require_node2();
  30460. }
  30461. }
  30462. });
  30463. // node_modules/@babel/helper-split-export-declaration/lib/index.js
  30464. var require_lib5 = __commonJS({
  30465. "node_modules/@babel/helper-split-export-declaration/lib/index.js"(exports) {
  30466. "use strict";
  30467. Object.defineProperty(exports, "__esModule", {
  30468. value: true
  30469. });
  30470. exports.default = splitExportDeclaration;
  30471. var _t = require_lib3();
  30472. var {
  30473. cloneNode,
  30474. exportNamedDeclaration,
  30475. exportSpecifier,
  30476. identifier,
  30477. variableDeclaration,
  30478. variableDeclarator
  30479. } = _t;
  30480. function splitExportDeclaration(exportDeclaration) {
  30481. if (!exportDeclaration.isExportDeclaration() || exportDeclaration.isExportAllDeclaration()) {
  30482. throw new Error("Only default and named export declarations can be split.");
  30483. }
  30484. if (exportDeclaration.isExportDefaultDeclaration()) {
  30485. const declaration2 = exportDeclaration.get("declaration");
  30486. const standaloneDeclaration = declaration2.isFunctionDeclaration() || declaration2.isClassDeclaration();
  30487. const scope = declaration2.isScope() ? declaration2.scope.parent : declaration2.scope;
  30488. let id = declaration2.node.id;
  30489. let needBindingRegistration = false;
  30490. if (!id) {
  30491. needBindingRegistration = true;
  30492. id = scope.generateUidIdentifier("default");
  30493. if (standaloneDeclaration || declaration2.isFunctionExpression() || declaration2.isClassExpression()) {
  30494. declaration2.node.id = cloneNode(id);
  30495. }
  30496. }
  30497. const updatedDeclaration = standaloneDeclaration ? declaration2.node : variableDeclaration("var", [variableDeclarator(cloneNode(id), declaration2.node)]);
  30498. const updatedExportDeclaration = exportNamedDeclaration(null, [exportSpecifier(cloneNode(id), identifier("default"))]);
  30499. exportDeclaration.insertAfter(updatedExportDeclaration);
  30500. exportDeclaration.replaceWith(updatedDeclaration);
  30501. if (needBindingRegistration) {
  30502. scope.registerDeclaration(exportDeclaration);
  30503. }
  30504. return exportDeclaration;
  30505. } else if (exportDeclaration.get("specifiers").length > 0) {
  30506. throw new Error("It doesn't make sense to split exported specifiers.");
  30507. }
  30508. const declaration = exportDeclaration.get("declaration");
  30509. const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
  30510. const specifiers = Object.keys(bindingIdentifiers).map((name2) => {
  30511. return exportSpecifier(identifier(name2), identifier(name2));
  30512. });
  30513. const aliasDeclar = exportNamedDeclaration(null, specifiers);
  30514. exportDeclaration.insertAfter(aliasDeclar);
  30515. exportDeclaration.replaceWith(declaration.node);
  30516. return exportDeclaration;
  30517. }
  30518. }
  30519. });
  30520. // node_modules/@babel/helper-environment-visitor/lib/index.js
  30521. var require_lib6 = __commonJS({
  30522. "node_modules/@babel/helper-environment-visitor/lib/index.js"(exports) {
  30523. "use strict";
  30524. Object.defineProperty(exports, "__esModule", {
  30525. value: true
  30526. });
  30527. exports.default = void 0;
  30528. exports.requeueComputedKeyAndDecorators = requeueComputedKeyAndDecorators;
  30529. exports.skipAllButComputedKey = skipAllButComputedKey;
  30530. function skipAllButComputedKey(path) {
  30531. path.skip();
  30532. if (path.node.computed) {
  30533. path.context.maybeQueue(path.get("key"));
  30534. }
  30535. }
  30536. function requeueComputedKeyAndDecorators(path) {
  30537. const {
  30538. context,
  30539. node: node2
  30540. } = path;
  30541. if (node2.computed) {
  30542. context.maybeQueue(path.get("key"));
  30543. }
  30544. if (node2.decorators) {
  30545. for (const decorator of path.get("decorators")) {
  30546. context.maybeQueue(decorator);
  30547. }
  30548. }
  30549. }
  30550. var visitor = {
  30551. FunctionParent(path) {
  30552. if (path.isArrowFunctionExpression()) {
  30553. return;
  30554. } else {
  30555. path.skip();
  30556. if (path.isMethod()) {
  30557. requeueComputedKeyAndDecorators(path);
  30558. }
  30559. }
  30560. },
  30561. Property(path) {
  30562. if (path.isObjectProperty()) {
  30563. return;
  30564. }
  30565. path.skip();
  30566. requeueComputedKeyAndDecorators(path);
  30567. }
  30568. };
  30569. var _default = visitor;
  30570. exports.default = _default;
  30571. }
  30572. });
  30573. // node_modules/@babel/traverse/lib/scope/lib/renamer.js
  30574. var require_renamer = __commonJS({
  30575. "node_modules/@babel/traverse/lib/scope/lib/renamer.js"(exports) {
  30576. "use strict";
  30577. Object.defineProperty(exports, "__esModule", {
  30578. value: true
  30579. });
  30580. exports.default = void 0;
  30581. var _helperSplitExportDeclaration = require_lib5();
  30582. var t3 = require_lib3();
  30583. var _helperEnvironmentVisitor = require_lib6();
  30584. var _traverseNode = require_traverse_node();
  30585. var _visitors = require_visitors();
  30586. var renameVisitor = {
  30587. ReferencedIdentifier({
  30588. node: node2
  30589. }, state) {
  30590. if (node2.name === state.oldName) {
  30591. node2.name = state.newName;
  30592. }
  30593. },
  30594. Scope(path, state) {
  30595. if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
  30596. path.skip();
  30597. if (path.isMethod()) {
  30598. (0, _helperEnvironmentVisitor.requeueComputedKeyAndDecorators)(path);
  30599. }
  30600. }
  30601. },
  30602. "AssignmentExpression|Declaration|VariableDeclarator"(path, state) {
  30603. if (path.isVariableDeclaration())
  30604. return;
  30605. const ids = path.getOuterBindingIdentifiers();
  30606. for (const name2 in ids) {
  30607. if (name2 === state.oldName)
  30608. ids[name2].name = state.newName;
  30609. }
  30610. }
  30611. };
  30612. var Renamer = class {
  30613. constructor(binding, oldName, newName) {
  30614. this.newName = newName;
  30615. this.oldName = oldName;
  30616. this.binding = binding;
  30617. }
  30618. maybeConvertFromExportDeclaration(parentDeclar) {
  30619. const maybeExportDeclar = parentDeclar.parentPath;
  30620. if (!maybeExportDeclar.isExportDeclaration()) {
  30621. return;
  30622. }
  30623. if (maybeExportDeclar.isExportDefaultDeclaration()) {
  30624. const {
  30625. declaration
  30626. } = maybeExportDeclar.node;
  30627. if (t3.isDeclaration(declaration) && !declaration.id) {
  30628. return;
  30629. }
  30630. }
  30631. if (maybeExportDeclar.isExportAllDeclaration()) {
  30632. return;
  30633. }
  30634. (0, _helperSplitExportDeclaration.default)(maybeExportDeclar);
  30635. }
  30636. maybeConvertFromClassFunctionDeclaration(path) {
  30637. return path;
  30638. }
  30639. maybeConvertFromClassFunctionExpression(path) {
  30640. return path;
  30641. }
  30642. rename() {
  30643. const {
  30644. binding,
  30645. oldName,
  30646. newName
  30647. } = this;
  30648. const {
  30649. scope,
  30650. path
  30651. } = binding;
  30652. const parentDeclar = path.find((path2) => path2.isDeclaration() || path2.isFunctionExpression() || path2.isClassExpression());
  30653. if (parentDeclar) {
  30654. const bindingIds = parentDeclar.getOuterBindingIdentifiers();
  30655. if (bindingIds[oldName] === binding.identifier) {
  30656. this.maybeConvertFromExportDeclaration(parentDeclar);
  30657. }
  30658. }
  30659. const blockToTraverse = arguments[0] || scope.block;
  30660. (0, _traverseNode.traverseNode)(blockToTraverse, (0, _visitors.explode)(renameVisitor), scope, this, scope.path, {
  30661. discriminant: true
  30662. });
  30663. if (!arguments[0]) {
  30664. scope.removeOwnBinding(oldName);
  30665. scope.bindings[newName] = binding;
  30666. this.binding.identifier.name = newName;
  30667. }
  30668. if (parentDeclar) {
  30669. this.maybeConvertFromClassFunctionDeclaration(path);
  30670. this.maybeConvertFromClassFunctionExpression(path);
  30671. }
  30672. }
  30673. };
  30674. exports.default = Renamer;
  30675. }
  30676. });
  30677. // node_modules/@babel/traverse/lib/scope/binding.js
  30678. var require_binding = __commonJS({
  30679. "node_modules/@babel/traverse/lib/scope/binding.js"(exports) {
  30680. "use strict";
  30681. Object.defineProperty(exports, "__esModule", {
  30682. value: true
  30683. });
  30684. exports.default = void 0;
  30685. var Binding = class {
  30686. constructor({
  30687. identifier,
  30688. scope,
  30689. path,
  30690. kind
  30691. }) {
  30692. this.identifier = void 0;
  30693. this.scope = void 0;
  30694. this.path = void 0;
  30695. this.kind = void 0;
  30696. this.constantViolations = [];
  30697. this.constant = true;
  30698. this.referencePaths = [];
  30699. this.referenced = false;
  30700. this.references = 0;
  30701. this.identifier = identifier;
  30702. this.scope = scope;
  30703. this.path = path;
  30704. this.kind = kind;
  30705. if ((kind === "var" || kind === "hoisted") && isDeclaredInLoop(path || (() => {
  30706. throw new Error("Internal Babel error: unreachable ");
  30707. })())) {
  30708. this.reassign(path);
  30709. }
  30710. this.clearValue();
  30711. }
  30712. deoptValue() {
  30713. this.clearValue();
  30714. this.hasDeoptedValue = true;
  30715. }
  30716. setValue(value2) {
  30717. if (this.hasDeoptedValue)
  30718. return;
  30719. this.hasValue = true;
  30720. this.value = value2;
  30721. }
  30722. clearValue() {
  30723. this.hasDeoptedValue = false;
  30724. this.hasValue = false;
  30725. this.value = null;
  30726. }
  30727. reassign(path) {
  30728. this.constant = false;
  30729. if (this.constantViolations.indexOf(path) !== -1) {
  30730. return;
  30731. }
  30732. this.constantViolations.push(path);
  30733. }
  30734. reference(path) {
  30735. if (this.referencePaths.indexOf(path) !== -1) {
  30736. return;
  30737. }
  30738. this.referenced = true;
  30739. this.references++;
  30740. this.referencePaths.push(path);
  30741. }
  30742. dereference() {
  30743. this.references--;
  30744. this.referenced = !!this.references;
  30745. }
  30746. };
  30747. exports.default = Binding;
  30748. function isDeclaredInLoop(path) {
  30749. for (let {
  30750. parentPath,
  30751. key: key2
  30752. } = path; parentPath; {
  30753. parentPath,
  30754. key: key2
  30755. } = parentPath) {
  30756. if (parentPath.isFunctionParent())
  30757. return false;
  30758. if (parentPath.isWhile() || parentPath.isForXStatement() || parentPath.isForStatement() && key2 === "body") {
  30759. return true;
  30760. }
  30761. }
  30762. return false;
  30763. }
  30764. }
  30765. });
  30766. // node_modules/globals/globals.json
  30767. var require_globals = __commonJS({
  30768. "node_modules/globals/globals.json"(exports, module) {
  30769. module.exports = {
  30770. builtin: {
  30771. Array: false,
  30772. ArrayBuffer: false,
  30773. Atomics: false,
  30774. BigInt: false,
  30775. BigInt64Array: false,
  30776. BigUint64Array: false,
  30777. Boolean: false,
  30778. constructor: false,
  30779. DataView: false,
  30780. Date: false,
  30781. decodeURI: false,
  30782. decodeURIComponent: false,
  30783. encodeURI: false,
  30784. encodeURIComponent: false,
  30785. Error: false,
  30786. escape: false,
  30787. eval: false,
  30788. EvalError: false,
  30789. Float32Array: false,
  30790. Float64Array: false,
  30791. Function: false,
  30792. globalThis: false,
  30793. hasOwnProperty: false,
  30794. Infinity: false,
  30795. Int16Array: false,
  30796. Int32Array: false,
  30797. Int8Array: false,
  30798. isFinite: false,
  30799. isNaN: false,
  30800. isPrototypeOf: false,
  30801. JSON: false,
  30802. Map: false,
  30803. Math: false,
  30804. NaN: false,
  30805. Number: false,
  30806. Object: false,
  30807. parseFloat: false,
  30808. parseInt: false,
  30809. Promise: false,
  30810. propertyIsEnumerable: false,
  30811. Proxy: false,
  30812. RangeError: false,
  30813. ReferenceError: false,
  30814. Reflect: false,
  30815. RegExp: false,
  30816. Set: false,
  30817. SharedArrayBuffer: false,
  30818. String: false,
  30819. Symbol: false,
  30820. SyntaxError: false,
  30821. toLocaleString: false,
  30822. toString: false,
  30823. TypeError: false,
  30824. Uint16Array: false,
  30825. Uint32Array: false,
  30826. Uint8Array: false,
  30827. Uint8ClampedArray: false,
  30828. undefined: false,
  30829. unescape: false,
  30830. URIError: false,
  30831. valueOf: false,
  30832. WeakMap: false,
  30833. WeakSet: false
  30834. },
  30835. es5: {
  30836. Array: false,
  30837. Boolean: false,
  30838. constructor: false,
  30839. Date: false,
  30840. decodeURI: false,
  30841. decodeURIComponent: false,
  30842. encodeURI: false,
  30843. encodeURIComponent: false,
  30844. Error: false,
  30845. escape: false,
  30846. eval: false,
  30847. EvalError: false,
  30848. Function: false,
  30849. hasOwnProperty: false,
  30850. Infinity: false,
  30851. isFinite: false,
  30852. isNaN: false,
  30853. isPrototypeOf: false,
  30854. JSON: false,
  30855. Math: false,
  30856. NaN: false,
  30857. Number: false,
  30858. Object: false,
  30859. parseFloat: false,
  30860. parseInt: false,
  30861. propertyIsEnumerable: false,
  30862. RangeError: false,
  30863. ReferenceError: false,
  30864. RegExp: false,
  30865. String: false,
  30866. SyntaxError: false,
  30867. toLocaleString: false,
  30868. toString: false,
  30869. TypeError: false,
  30870. undefined: false,
  30871. unescape: false,
  30872. URIError: false,
  30873. valueOf: false
  30874. },
  30875. es2015: {
  30876. Array: false,
  30877. ArrayBuffer: false,
  30878. Boolean: false,
  30879. constructor: false,
  30880. DataView: false,
  30881. Date: false,
  30882. decodeURI: false,
  30883. decodeURIComponent: false,
  30884. encodeURI: false,
  30885. encodeURIComponent: false,
  30886. Error: false,
  30887. escape: false,
  30888. eval: false,
  30889. EvalError: false,
  30890. Float32Array: false,
  30891. Float64Array: false,
  30892. Function: false,
  30893. hasOwnProperty: false,
  30894. Infinity: false,
  30895. Int16Array: false,
  30896. Int32Array: false,
  30897. Int8Array: false,
  30898. isFinite: false,
  30899. isNaN: false,
  30900. isPrototypeOf: false,
  30901. JSON: false,
  30902. Map: false,
  30903. Math: false,
  30904. NaN: false,
  30905. Number: false,
  30906. Object: false,
  30907. parseFloat: false,
  30908. parseInt: false,
  30909. Promise: false,
  30910. propertyIsEnumerable: false,
  30911. Proxy: false,
  30912. RangeError: false,
  30913. ReferenceError: false,
  30914. Reflect: false,
  30915. RegExp: false,
  30916. Set: false,
  30917. String: false,
  30918. Symbol: false,
  30919. SyntaxError: false,
  30920. toLocaleString: false,
  30921. toString: false,
  30922. TypeError: false,
  30923. Uint16Array: false,
  30924. Uint32Array: false,
  30925. Uint8Array: false,
  30926. Uint8ClampedArray: false,
  30927. undefined: false,
  30928. unescape: false,
  30929. URIError: false,
  30930. valueOf: false,
  30931. WeakMap: false,
  30932. WeakSet: false
  30933. },
  30934. es2017: {
  30935. Array: false,
  30936. ArrayBuffer: false,
  30937. Atomics: false,
  30938. Boolean: false,
  30939. constructor: false,
  30940. DataView: false,
  30941. Date: false,
  30942. decodeURI: false,
  30943. decodeURIComponent: false,
  30944. encodeURI: false,
  30945. encodeURIComponent: false,
  30946. Error: false,
  30947. escape: false,
  30948. eval: false,
  30949. EvalError: false,
  30950. Float32Array: false,
  30951. Float64Array: false,
  30952. Function: false,
  30953. hasOwnProperty: false,
  30954. Infinity: false,
  30955. Int16Array: false,
  30956. Int32Array: false,
  30957. Int8Array: false,
  30958. isFinite: false,
  30959. isNaN: false,
  30960. isPrototypeOf: false,
  30961. JSON: false,
  30962. Map: false,
  30963. Math: false,
  30964. NaN: false,
  30965. Number: false,
  30966. Object: false,
  30967. parseFloat: false,
  30968. parseInt: false,
  30969. Promise: false,
  30970. propertyIsEnumerable: false,
  30971. Proxy: false,
  30972. RangeError: false,
  30973. ReferenceError: false,
  30974. Reflect: false,
  30975. RegExp: false,
  30976. Set: false,
  30977. SharedArrayBuffer: false,
  30978. String: false,
  30979. Symbol: false,
  30980. SyntaxError: false,
  30981. toLocaleString: false,
  30982. toString: false,
  30983. TypeError: false,
  30984. Uint16Array: false,
  30985. Uint32Array: false,
  30986. Uint8Array: false,
  30987. Uint8ClampedArray: false,
  30988. undefined: false,
  30989. unescape: false,
  30990. URIError: false,
  30991. valueOf: false,
  30992. WeakMap: false,
  30993. WeakSet: false
  30994. },
  30995. browser: {
  30996. AbortController: false,
  30997. AbortSignal: false,
  30998. addEventListener: false,
  30999. alert: false,
  31000. AnalyserNode: false,
  31001. Animation: false,
  31002. AnimationEffectReadOnly: false,
  31003. AnimationEffectTiming: false,
  31004. AnimationEffectTimingReadOnly: false,
  31005. AnimationEvent: false,
  31006. AnimationPlaybackEvent: false,
  31007. AnimationTimeline: false,
  31008. applicationCache: false,
  31009. ApplicationCache: false,
  31010. ApplicationCacheErrorEvent: false,
  31011. atob: false,
  31012. Attr: false,
  31013. Audio: false,
  31014. AudioBuffer: false,
  31015. AudioBufferSourceNode: false,
  31016. AudioContext: false,
  31017. AudioDestinationNode: false,
  31018. AudioListener: false,
  31019. AudioNode: false,
  31020. AudioParam: false,
  31021. AudioProcessingEvent: false,
  31022. AudioScheduledSourceNode: false,
  31023. "AudioWorkletGlobalScope ": false,
  31024. AudioWorkletNode: false,
  31025. AudioWorkletProcessor: false,
  31026. BarProp: false,
  31027. BaseAudioContext: false,
  31028. BatteryManager: false,
  31029. BeforeUnloadEvent: false,
  31030. BiquadFilterNode: false,
  31031. Blob: false,
  31032. BlobEvent: false,
  31033. blur: false,
  31034. BroadcastChannel: false,
  31035. btoa: false,
  31036. BudgetService: false,
  31037. ByteLengthQueuingStrategy: false,
  31038. Cache: false,
  31039. caches: false,
  31040. CacheStorage: false,
  31041. cancelAnimationFrame: false,
  31042. cancelIdleCallback: false,
  31043. CanvasCaptureMediaStreamTrack: false,
  31044. CanvasGradient: false,
  31045. CanvasPattern: false,
  31046. CanvasRenderingContext2D: false,
  31047. ChannelMergerNode: false,
  31048. ChannelSplitterNode: false,
  31049. CharacterData: false,
  31050. clearInterval: false,
  31051. clearTimeout: false,
  31052. clientInformation: false,
  31053. ClipboardEvent: false,
  31054. close: false,
  31055. closed: false,
  31056. CloseEvent: false,
  31057. Comment: false,
  31058. CompositionEvent: false,
  31059. confirm: false,
  31060. console: false,
  31061. ConstantSourceNode: false,
  31062. ConvolverNode: false,
  31063. CountQueuingStrategy: false,
  31064. createImageBitmap: false,
  31065. Credential: false,
  31066. CredentialsContainer: false,
  31067. crypto: false,
  31068. Crypto: false,
  31069. CryptoKey: false,
  31070. CSS: false,
  31071. CSSConditionRule: false,
  31072. CSSFontFaceRule: false,
  31073. CSSGroupingRule: false,
  31074. CSSImportRule: false,
  31075. CSSKeyframeRule: false,
  31076. CSSKeyframesRule: false,
  31077. CSSMediaRule: false,
  31078. CSSNamespaceRule: false,
  31079. CSSPageRule: false,
  31080. CSSRule: false,
  31081. CSSRuleList: false,
  31082. CSSStyleDeclaration: false,
  31083. CSSStyleRule: false,
  31084. CSSStyleSheet: false,
  31085. CSSSupportsRule: false,
  31086. CustomElementRegistry: false,
  31087. customElements: false,
  31088. CustomEvent: false,
  31089. DataTransfer: false,
  31090. DataTransferItem: false,
  31091. DataTransferItemList: false,
  31092. defaultstatus: false,
  31093. defaultStatus: false,
  31094. DelayNode: false,
  31095. DeviceMotionEvent: false,
  31096. DeviceOrientationEvent: false,
  31097. devicePixelRatio: false,
  31098. dispatchEvent: false,
  31099. document: false,
  31100. Document: false,
  31101. DocumentFragment: false,
  31102. DocumentType: false,
  31103. DOMError: false,
  31104. DOMException: false,
  31105. DOMImplementation: false,
  31106. DOMMatrix: false,
  31107. DOMMatrixReadOnly: false,
  31108. DOMParser: false,
  31109. DOMPoint: false,
  31110. DOMPointReadOnly: false,
  31111. DOMQuad: false,
  31112. DOMRect: false,
  31113. DOMRectReadOnly: false,
  31114. DOMStringList: false,
  31115. DOMStringMap: false,
  31116. DOMTokenList: false,
  31117. DragEvent: false,
  31118. DynamicsCompressorNode: false,
  31119. Element: false,
  31120. ErrorEvent: false,
  31121. event: false,
  31122. Event: false,
  31123. EventSource: false,
  31124. EventTarget: false,
  31125. external: false,
  31126. fetch: false,
  31127. File: false,
  31128. FileList: false,
  31129. FileReader: false,
  31130. find: false,
  31131. focus: false,
  31132. FocusEvent: false,
  31133. FontFace: false,
  31134. FontFaceSetLoadEvent: false,
  31135. FormData: false,
  31136. frameElement: false,
  31137. frames: false,
  31138. GainNode: false,
  31139. Gamepad: false,
  31140. GamepadButton: false,
  31141. GamepadEvent: false,
  31142. getComputedStyle: false,
  31143. getSelection: false,
  31144. HashChangeEvent: false,
  31145. Headers: false,
  31146. history: false,
  31147. History: false,
  31148. HTMLAllCollection: false,
  31149. HTMLAnchorElement: false,
  31150. HTMLAreaElement: false,
  31151. HTMLAudioElement: false,
  31152. HTMLBaseElement: false,
  31153. HTMLBodyElement: false,
  31154. HTMLBRElement: false,
  31155. HTMLButtonElement: false,
  31156. HTMLCanvasElement: false,
  31157. HTMLCollection: false,
  31158. HTMLContentElement: false,
  31159. HTMLDataElement: false,
  31160. HTMLDataListElement: false,
  31161. HTMLDetailsElement: false,
  31162. HTMLDialogElement: false,
  31163. HTMLDirectoryElement: false,
  31164. HTMLDivElement: false,
  31165. HTMLDListElement: false,
  31166. HTMLDocument: false,
  31167. HTMLElement: false,
  31168. HTMLEmbedElement: false,
  31169. HTMLFieldSetElement: false,
  31170. HTMLFontElement: false,
  31171. HTMLFormControlsCollection: false,
  31172. HTMLFormElement: false,
  31173. HTMLFrameElement: false,
  31174. HTMLFrameSetElement: false,
  31175. HTMLHeadElement: false,
  31176. HTMLHeadingElement: false,
  31177. HTMLHRElement: false,
  31178. HTMLHtmlElement: false,
  31179. HTMLIFrameElement: false,
  31180. HTMLImageElement: false,
  31181. HTMLInputElement: false,
  31182. HTMLLabelElement: false,
  31183. HTMLLegendElement: false,
  31184. HTMLLIElement: false,
  31185. HTMLLinkElement: false,
  31186. HTMLMapElement: false,
  31187. HTMLMarqueeElement: false,
  31188. HTMLMediaElement: false,
  31189. HTMLMenuElement: false,
  31190. HTMLMetaElement: false,
  31191. HTMLMeterElement: false,
  31192. HTMLModElement: false,
  31193. HTMLObjectElement: false,
  31194. HTMLOListElement: false,
  31195. HTMLOptGroupElement: false,
  31196. HTMLOptionElement: false,
  31197. HTMLOptionsCollection: false,
  31198. HTMLOutputElement: false,
  31199. HTMLParagraphElement: false,
  31200. HTMLParamElement: false,
  31201. HTMLPictureElement: false,
  31202. HTMLPreElement: false,
  31203. HTMLProgressElement: false,
  31204. HTMLQuoteElement: false,
  31205. HTMLScriptElement: false,
  31206. HTMLSelectElement: false,
  31207. HTMLShadowElement: false,
  31208. HTMLSlotElement: false,
  31209. HTMLSourceElement: false,
  31210. HTMLSpanElement: false,
  31211. HTMLStyleElement: false,
  31212. HTMLTableCaptionElement: false,
  31213. HTMLTableCellElement: false,
  31214. HTMLTableColElement: false,
  31215. HTMLTableElement: false,
  31216. HTMLTableRowElement: false,
  31217. HTMLTableSectionElement: false,
  31218. HTMLTemplateElement: false,
  31219. HTMLTextAreaElement: false,
  31220. HTMLTimeElement: false,
  31221. HTMLTitleElement: false,
  31222. HTMLTrackElement: false,
  31223. HTMLUListElement: false,
  31224. HTMLUnknownElement: false,
  31225. HTMLVideoElement: false,
  31226. IDBCursor: false,
  31227. IDBCursorWithValue: false,
  31228. IDBDatabase: false,
  31229. IDBFactory: false,
  31230. IDBIndex: false,
  31231. IDBKeyRange: false,
  31232. IDBObjectStore: false,
  31233. IDBOpenDBRequest: false,
  31234. IDBRequest: false,
  31235. IDBTransaction: false,
  31236. IDBVersionChangeEvent: false,
  31237. IdleDeadline: false,
  31238. IIRFilterNode: false,
  31239. Image: false,
  31240. ImageBitmap: false,
  31241. ImageBitmapRenderingContext: false,
  31242. ImageCapture: false,
  31243. ImageData: false,
  31244. indexedDB: false,
  31245. innerHeight: false,
  31246. innerWidth: false,
  31247. InputEvent: false,
  31248. IntersectionObserver: false,
  31249. IntersectionObserverEntry: false,
  31250. Intl: false,
  31251. isSecureContext: false,
  31252. KeyboardEvent: false,
  31253. KeyframeEffect: false,
  31254. KeyframeEffectReadOnly: false,
  31255. length: false,
  31256. localStorage: false,
  31257. location: true,
  31258. Location: false,
  31259. locationbar: false,
  31260. matchMedia: false,
  31261. MediaDeviceInfo: false,
  31262. MediaDevices: false,
  31263. MediaElementAudioSourceNode: false,
  31264. MediaEncryptedEvent: false,
  31265. MediaError: false,
  31266. MediaKeyMessageEvent: false,
  31267. MediaKeySession: false,
  31268. MediaKeyStatusMap: false,
  31269. MediaKeySystemAccess: false,
  31270. MediaList: false,
  31271. MediaQueryList: false,
  31272. MediaQueryListEvent: false,
  31273. MediaRecorder: false,
  31274. MediaSettingsRange: false,
  31275. MediaSource: false,
  31276. MediaStream: false,
  31277. MediaStreamAudioDestinationNode: false,
  31278. MediaStreamAudioSourceNode: false,
  31279. MediaStreamEvent: false,
  31280. MediaStreamTrack: false,
  31281. MediaStreamTrackEvent: false,
  31282. menubar: false,
  31283. MessageChannel: false,
  31284. MessageEvent: false,
  31285. MessagePort: false,
  31286. MIDIAccess: false,
  31287. MIDIConnectionEvent: false,
  31288. MIDIInput: false,
  31289. MIDIInputMap: false,
  31290. MIDIMessageEvent: false,
  31291. MIDIOutput: false,
  31292. MIDIOutputMap: false,
  31293. MIDIPort: false,
  31294. MimeType: false,
  31295. MimeTypeArray: false,
  31296. MouseEvent: false,
  31297. moveBy: false,
  31298. moveTo: false,
  31299. MutationEvent: false,
  31300. MutationObserver: false,
  31301. MutationRecord: false,
  31302. name: false,
  31303. NamedNodeMap: false,
  31304. NavigationPreloadManager: false,
  31305. navigator: false,
  31306. Navigator: false,
  31307. NetworkInformation: false,
  31308. Node: false,
  31309. NodeFilter: false,
  31310. NodeIterator: false,
  31311. NodeList: false,
  31312. Notification: false,
  31313. OfflineAudioCompletionEvent: false,
  31314. OfflineAudioContext: false,
  31315. offscreenBuffering: false,
  31316. OffscreenCanvas: true,
  31317. onabort: true,
  31318. onafterprint: true,
  31319. onanimationend: true,
  31320. onanimationiteration: true,
  31321. onanimationstart: true,
  31322. onappinstalled: true,
  31323. onauxclick: true,
  31324. onbeforeinstallprompt: true,
  31325. onbeforeprint: true,
  31326. onbeforeunload: true,
  31327. onblur: true,
  31328. oncancel: true,
  31329. oncanplay: true,
  31330. oncanplaythrough: true,
  31331. onchange: true,
  31332. onclick: true,
  31333. onclose: true,
  31334. oncontextmenu: true,
  31335. oncuechange: true,
  31336. ondblclick: true,
  31337. ondevicemotion: true,
  31338. ondeviceorientation: true,
  31339. ondeviceorientationabsolute: true,
  31340. ondrag: true,
  31341. ondragend: true,
  31342. ondragenter: true,
  31343. ondragleave: true,
  31344. ondragover: true,
  31345. ondragstart: true,
  31346. ondrop: true,
  31347. ondurationchange: true,
  31348. onemptied: true,
  31349. onended: true,
  31350. onerror: true,
  31351. onfocus: true,
  31352. ongotpointercapture: true,
  31353. onhashchange: true,
  31354. oninput: true,
  31355. oninvalid: true,
  31356. onkeydown: true,
  31357. onkeypress: true,
  31358. onkeyup: true,
  31359. onlanguagechange: true,
  31360. onload: true,
  31361. onloadeddata: true,
  31362. onloadedmetadata: true,
  31363. onloadstart: true,
  31364. onlostpointercapture: true,
  31365. onmessage: true,
  31366. onmessageerror: true,
  31367. onmousedown: true,
  31368. onmouseenter: true,
  31369. onmouseleave: true,
  31370. onmousemove: true,
  31371. onmouseout: true,
  31372. onmouseover: true,
  31373. onmouseup: true,
  31374. onmousewheel: true,
  31375. onoffline: true,
  31376. ononline: true,
  31377. onpagehide: true,
  31378. onpageshow: true,
  31379. onpause: true,
  31380. onplay: true,
  31381. onplaying: true,
  31382. onpointercancel: true,
  31383. onpointerdown: true,
  31384. onpointerenter: true,
  31385. onpointerleave: true,
  31386. onpointermove: true,
  31387. onpointerout: true,
  31388. onpointerover: true,
  31389. onpointerup: true,
  31390. onpopstate: true,
  31391. onprogress: true,
  31392. onratechange: true,
  31393. onrejectionhandled: true,
  31394. onreset: true,
  31395. onresize: true,
  31396. onscroll: true,
  31397. onsearch: true,
  31398. onseeked: true,
  31399. onseeking: true,
  31400. onselect: true,
  31401. onstalled: true,
  31402. onstorage: true,
  31403. onsubmit: true,
  31404. onsuspend: true,
  31405. ontimeupdate: true,
  31406. ontoggle: true,
  31407. ontransitionend: true,
  31408. onunhandledrejection: true,
  31409. onunload: true,
  31410. onvolumechange: true,
  31411. onwaiting: true,
  31412. onwheel: true,
  31413. open: false,
  31414. openDatabase: false,
  31415. opener: false,
  31416. Option: false,
  31417. origin: false,
  31418. OscillatorNode: false,
  31419. outerHeight: false,
  31420. outerWidth: false,
  31421. PageTransitionEvent: false,
  31422. pageXOffset: false,
  31423. pageYOffset: false,
  31424. PannerNode: false,
  31425. parent: false,
  31426. Path2D: false,
  31427. PaymentAddress: false,
  31428. PaymentRequest: false,
  31429. PaymentRequestUpdateEvent: false,
  31430. PaymentResponse: false,
  31431. performance: false,
  31432. Performance: false,
  31433. PerformanceEntry: false,
  31434. PerformanceLongTaskTiming: false,
  31435. PerformanceMark: false,
  31436. PerformanceMeasure: false,
  31437. PerformanceNavigation: false,
  31438. PerformanceNavigationTiming: false,
  31439. PerformanceObserver: false,
  31440. PerformanceObserverEntryList: false,
  31441. PerformancePaintTiming: false,
  31442. PerformanceResourceTiming: false,
  31443. PerformanceTiming: false,
  31444. PeriodicWave: false,
  31445. Permissions: false,
  31446. PermissionStatus: false,
  31447. personalbar: false,
  31448. PhotoCapabilities: false,
  31449. Plugin: false,
  31450. PluginArray: false,
  31451. PointerEvent: false,
  31452. PopStateEvent: false,
  31453. postMessage: false,
  31454. Presentation: false,
  31455. PresentationAvailability: false,
  31456. PresentationConnection: false,
  31457. PresentationConnectionAvailableEvent: false,
  31458. PresentationConnectionCloseEvent: false,
  31459. PresentationConnectionList: false,
  31460. PresentationReceiver: false,
  31461. PresentationRequest: false,
  31462. print: false,
  31463. ProcessingInstruction: false,
  31464. ProgressEvent: false,
  31465. PromiseRejectionEvent: false,
  31466. prompt: false,
  31467. PushManager: false,
  31468. PushSubscription: false,
  31469. PushSubscriptionOptions: false,
  31470. queueMicrotask: false,
  31471. RadioNodeList: false,
  31472. Range: false,
  31473. ReadableStream: false,
  31474. registerProcessor: false,
  31475. RemotePlayback: false,
  31476. removeEventListener: false,
  31477. Request: false,
  31478. requestAnimationFrame: false,
  31479. requestIdleCallback: false,
  31480. resizeBy: false,
  31481. ResizeObserver: false,
  31482. ResizeObserverEntry: false,
  31483. resizeTo: false,
  31484. Response: false,
  31485. RTCCertificate: false,
  31486. RTCDataChannel: false,
  31487. RTCDataChannelEvent: false,
  31488. RTCDtlsTransport: false,
  31489. RTCIceCandidate: false,
  31490. RTCIceGatherer: false,
  31491. RTCIceTransport: false,
  31492. RTCPeerConnection: false,
  31493. RTCPeerConnectionIceEvent: false,
  31494. RTCRtpContributingSource: false,
  31495. RTCRtpReceiver: false,
  31496. RTCRtpSender: false,
  31497. RTCSctpTransport: false,
  31498. RTCSessionDescription: false,
  31499. RTCStatsReport: false,
  31500. RTCTrackEvent: false,
  31501. screen: false,
  31502. Screen: false,
  31503. screenLeft: false,
  31504. ScreenOrientation: false,
  31505. screenTop: false,
  31506. screenX: false,
  31507. screenY: false,
  31508. ScriptProcessorNode: false,
  31509. scroll: false,
  31510. scrollbars: false,
  31511. scrollBy: false,
  31512. scrollTo: false,
  31513. scrollX: false,
  31514. scrollY: false,
  31515. SecurityPolicyViolationEvent: false,
  31516. Selection: false,
  31517. self: false,
  31518. ServiceWorker: false,
  31519. ServiceWorkerContainer: false,
  31520. ServiceWorkerRegistration: false,
  31521. sessionStorage: false,
  31522. setInterval: false,
  31523. setTimeout: false,
  31524. ShadowRoot: false,
  31525. SharedWorker: false,
  31526. SourceBuffer: false,
  31527. SourceBufferList: false,
  31528. speechSynthesis: false,
  31529. SpeechSynthesisEvent: false,
  31530. SpeechSynthesisUtterance: false,
  31531. StaticRange: false,
  31532. status: false,
  31533. statusbar: false,
  31534. StereoPannerNode: false,
  31535. stop: false,
  31536. Storage: false,
  31537. StorageEvent: false,
  31538. StorageManager: false,
  31539. styleMedia: false,
  31540. StyleSheet: false,
  31541. StyleSheetList: false,
  31542. SubtleCrypto: false,
  31543. SVGAElement: false,
  31544. SVGAngle: false,
  31545. SVGAnimatedAngle: false,
  31546. SVGAnimatedBoolean: false,
  31547. SVGAnimatedEnumeration: false,
  31548. SVGAnimatedInteger: false,
  31549. SVGAnimatedLength: false,
  31550. SVGAnimatedLengthList: false,
  31551. SVGAnimatedNumber: false,
  31552. SVGAnimatedNumberList: false,
  31553. SVGAnimatedPreserveAspectRatio: false,
  31554. SVGAnimatedRect: false,
  31555. SVGAnimatedString: false,
  31556. SVGAnimatedTransformList: false,
  31557. SVGAnimateElement: false,
  31558. SVGAnimateMotionElement: false,
  31559. SVGAnimateTransformElement: false,
  31560. SVGAnimationElement: false,
  31561. SVGCircleElement: false,
  31562. SVGClipPathElement: false,
  31563. SVGComponentTransferFunctionElement: false,
  31564. SVGDefsElement: false,
  31565. SVGDescElement: false,
  31566. SVGDiscardElement: false,
  31567. SVGElement: false,
  31568. SVGEllipseElement: false,
  31569. SVGFEBlendElement: false,
  31570. SVGFEColorMatrixElement: false,
  31571. SVGFEComponentTransferElement: false,
  31572. SVGFECompositeElement: false,
  31573. SVGFEConvolveMatrixElement: false,
  31574. SVGFEDiffuseLightingElement: false,
  31575. SVGFEDisplacementMapElement: false,
  31576. SVGFEDistantLightElement: false,
  31577. SVGFEDropShadowElement: false,
  31578. SVGFEFloodElement: false,
  31579. SVGFEFuncAElement: false,
  31580. SVGFEFuncBElement: false,
  31581. SVGFEFuncGElement: false,
  31582. SVGFEFuncRElement: false,
  31583. SVGFEGaussianBlurElement: false,
  31584. SVGFEImageElement: false,
  31585. SVGFEMergeElement: false,
  31586. SVGFEMergeNodeElement: false,
  31587. SVGFEMorphologyElement: false,
  31588. SVGFEOffsetElement: false,
  31589. SVGFEPointLightElement: false,
  31590. SVGFESpecularLightingElement: false,
  31591. SVGFESpotLightElement: false,
  31592. SVGFETileElement: false,
  31593. SVGFETurbulenceElement: false,
  31594. SVGFilterElement: false,
  31595. SVGForeignObjectElement: false,
  31596. SVGGElement: false,
  31597. SVGGeometryElement: false,
  31598. SVGGradientElement: false,
  31599. SVGGraphicsElement: false,
  31600. SVGImageElement: false,
  31601. SVGLength: false,
  31602. SVGLengthList: false,
  31603. SVGLinearGradientElement: false,
  31604. SVGLineElement: false,
  31605. SVGMarkerElement: false,
  31606. SVGMaskElement: false,
  31607. SVGMatrix: false,
  31608. SVGMetadataElement: false,
  31609. SVGMPathElement: false,
  31610. SVGNumber: false,
  31611. SVGNumberList: false,
  31612. SVGPathElement: false,
  31613. SVGPatternElement: false,
  31614. SVGPoint: false,
  31615. SVGPointList: false,
  31616. SVGPolygonElement: false,
  31617. SVGPolylineElement: false,
  31618. SVGPreserveAspectRatio: false,
  31619. SVGRadialGradientElement: false,
  31620. SVGRect: false,
  31621. SVGRectElement: false,
  31622. SVGScriptElement: false,
  31623. SVGSetElement: false,
  31624. SVGStopElement: false,
  31625. SVGStringList: false,
  31626. SVGStyleElement: false,
  31627. SVGSVGElement: false,
  31628. SVGSwitchElement: false,
  31629. SVGSymbolElement: false,
  31630. SVGTextContentElement: false,
  31631. SVGTextElement: false,
  31632. SVGTextPathElement: false,
  31633. SVGTextPositioningElement: false,
  31634. SVGTitleElement: false,
  31635. SVGTransform: false,
  31636. SVGTransformList: false,
  31637. SVGTSpanElement: false,
  31638. SVGUnitTypes: false,
  31639. SVGUseElement: false,
  31640. SVGViewElement: false,
  31641. TaskAttributionTiming: false,
  31642. Text: false,
  31643. TextDecoder: false,
  31644. TextEncoder: false,
  31645. TextEvent: false,
  31646. TextMetrics: false,
  31647. TextTrack: false,
  31648. TextTrackCue: false,
  31649. TextTrackCueList: false,
  31650. TextTrackList: false,
  31651. TimeRanges: false,
  31652. toolbar: false,
  31653. top: false,
  31654. Touch: false,
  31655. TouchEvent: false,
  31656. TouchList: false,
  31657. TrackEvent: false,
  31658. TransitionEvent: false,
  31659. TreeWalker: false,
  31660. UIEvent: false,
  31661. URL: false,
  31662. URLSearchParams: false,
  31663. ValidityState: false,
  31664. visualViewport: false,
  31665. VisualViewport: false,
  31666. VTTCue: false,
  31667. WaveShaperNode: false,
  31668. WebAssembly: false,
  31669. WebGL2RenderingContext: false,
  31670. WebGLActiveInfo: false,
  31671. WebGLBuffer: false,
  31672. WebGLContextEvent: false,
  31673. WebGLFramebuffer: false,
  31674. WebGLProgram: false,
  31675. WebGLQuery: false,
  31676. WebGLRenderbuffer: false,
  31677. WebGLRenderingContext: false,
  31678. WebGLSampler: false,
  31679. WebGLShader: false,
  31680. WebGLShaderPrecisionFormat: false,
  31681. WebGLSync: false,
  31682. WebGLTexture: false,
  31683. WebGLTransformFeedback: false,
  31684. WebGLUniformLocation: false,
  31685. WebGLVertexArrayObject: false,
  31686. WebSocket: false,
  31687. WheelEvent: false,
  31688. window: false,
  31689. Window: false,
  31690. Worker: false,
  31691. WritableStream: false,
  31692. XMLDocument: false,
  31693. XMLHttpRequest: false,
  31694. XMLHttpRequestEventTarget: false,
  31695. XMLHttpRequestUpload: false,
  31696. XMLSerializer: false,
  31697. XPathEvaluator: false,
  31698. XPathExpression: false,
  31699. XPathResult: false,
  31700. XSLTProcessor: false
  31701. },
  31702. worker: {
  31703. addEventListener: false,
  31704. applicationCache: false,
  31705. atob: false,
  31706. Blob: false,
  31707. BroadcastChannel: false,
  31708. btoa: false,
  31709. Cache: false,
  31710. caches: false,
  31711. clearInterval: false,
  31712. clearTimeout: false,
  31713. close: true,
  31714. console: false,
  31715. fetch: false,
  31716. FileReaderSync: false,
  31717. FormData: false,
  31718. Headers: false,
  31719. IDBCursor: false,
  31720. IDBCursorWithValue: false,
  31721. IDBDatabase: false,
  31722. IDBFactory: false,
  31723. IDBIndex: false,
  31724. IDBKeyRange: false,
  31725. IDBObjectStore: false,
  31726. IDBOpenDBRequest: false,
  31727. IDBRequest: false,
  31728. IDBTransaction: false,
  31729. IDBVersionChangeEvent: false,
  31730. ImageData: false,
  31731. importScripts: true,
  31732. indexedDB: false,
  31733. location: false,
  31734. MessageChannel: false,
  31735. MessagePort: false,
  31736. name: false,
  31737. navigator: false,
  31738. Notification: false,
  31739. onclose: true,
  31740. onconnect: true,
  31741. onerror: true,
  31742. onlanguagechange: true,
  31743. onmessage: true,
  31744. onoffline: true,
  31745. ononline: true,
  31746. onrejectionhandled: true,
  31747. onunhandledrejection: true,
  31748. performance: false,
  31749. Performance: false,
  31750. PerformanceEntry: false,
  31751. PerformanceMark: false,
  31752. PerformanceMeasure: false,
  31753. PerformanceNavigation: false,
  31754. PerformanceResourceTiming: false,
  31755. PerformanceTiming: false,
  31756. postMessage: true,
  31757. Promise: false,
  31758. queueMicrotask: false,
  31759. removeEventListener: false,
  31760. Request: false,
  31761. Response: false,
  31762. self: true,
  31763. ServiceWorkerRegistration: false,
  31764. setInterval: false,
  31765. setTimeout: false,
  31766. TextDecoder: false,
  31767. TextEncoder: false,
  31768. URL: false,
  31769. URLSearchParams: false,
  31770. WebSocket: false,
  31771. Worker: false,
  31772. WorkerGlobalScope: false,
  31773. XMLHttpRequest: false
  31774. },
  31775. node: {
  31776. __dirname: false,
  31777. __filename: false,
  31778. Buffer: false,
  31779. clearImmediate: false,
  31780. clearInterval: false,
  31781. clearTimeout: false,
  31782. console: false,
  31783. exports: true,
  31784. global: false,
  31785. Intl: false,
  31786. module: false,
  31787. process: false,
  31788. queueMicrotask: false,
  31789. require: false,
  31790. setImmediate: false,
  31791. setInterval: false,
  31792. setTimeout: false,
  31793. TextDecoder: false,
  31794. TextEncoder: false,
  31795. URL: false,
  31796. URLSearchParams: false
  31797. },
  31798. commonjs: {
  31799. exports: true,
  31800. global: false,
  31801. module: false,
  31802. require: false
  31803. },
  31804. amd: {
  31805. define: false,
  31806. require: false
  31807. },
  31808. mocha: {
  31809. after: false,
  31810. afterEach: false,
  31811. before: false,
  31812. beforeEach: false,
  31813. context: false,
  31814. describe: false,
  31815. it: false,
  31816. mocha: false,
  31817. run: false,
  31818. setup: false,
  31819. specify: false,
  31820. suite: false,
  31821. suiteSetup: false,
  31822. suiteTeardown: false,
  31823. teardown: false,
  31824. test: false,
  31825. xcontext: false,
  31826. xdescribe: false,
  31827. xit: false,
  31828. xspecify: false
  31829. },
  31830. jasmine: {
  31831. afterAll: false,
  31832. afterEach: false,
  31833. beforeAll: false,
  31834. beforeEach: false,
  31835. describe: false,
  31836. expect: false,
  31837. fail: false,
  31838. fdescribe: false,
  31839. fit: false,
  31840. it: false,
  31841. jasmine: false,
  31842. pending: false,
  31843. runs: false,
  31844. spyOn: false,
  31845. spyOnProperty: false,
  31846. waits: false,
  31847. waitsFor: false,
  31848. xdescribe: false,
  31849. xit: false
  31850. },
  31851. jest: {
  31852. afterAll: false,
  31853. afterEach: false,
  31854. beforeAll: false,
  31855. beforeEach: false,
  31856. describe: false,
  31857. expect: false,
  31858. fdescribe: false,
  31859. fit: false,
  31860. it: false,
  31861. jest: false,
  31862. pit: false,
  31863. require: false,
  31864. test: false,
  31865. xdescribe: false,
  31866. xit: false,
  31867. xtest: false
  31868. },
  31869. qunit: {
  31870. asyncTest: false,
  31871. deepEqual: false,
  31872. equal: false,
  31873. expect: false,
  31874. module: false,
  31875. notDeepEqual: false,
  31876. notEqual: false,
  31877. notOk: false,
  31878. notPropEqual: false,
  31879. notStrictEqual: false,
  31880. ok: false,
  31881. propEqual: false,
  31882. QUnit: false,
  31883. raises: false,
  31884. start: false,
  31885. stop: false,
  31886. strictEqual: false,
  31887. test: false,
  31888. throws: false
  31889. },
  31890. phantomjs: {
  31891. console: true,
  31892. exports: true,
  31893. phantom: true,
  31894. require: true,
  31895. WebPage: true
  31896. },
  31897. couch: {
  31898. emit: false,
  31899. exports: false,
  31900. getRow: false,
  31901. log: false,
  31902. module: false,
  31903. provides: false,
  31904. require: false,
  31905. respond: false,
  31906. send: false,
  31907. start: false,
  31908. sum: false
  31909. },
  31910. rhino: {
  31911. defineClass: false,
  31912. deserialize: false,
  31913. gc: false,
  31914. help: false,
  31915. importClass: false,
  31916. importPackage: false,
  31917. java: false,
  31918. load: false,
  31919. loadClass: false,
  31920. Packages: false,
  31921. print: false,
  31922. quit: false,
  31923. readFile: false,
  31924. readUrl: false,
  31925. runCommand: false,
  31926. seal: false,
  31927. serialize: false,
  31928. spawn: false,
  31929. sync: false,
  31930. toint32: false,
  31931. version: false
  31932. },
  31933. nashorn: {
  31934. __DIR__: false,
  31935. __FILE__: false,
  31936. __LINE__: false,
  31937. com: false,
  31938. edu: false,
  31939. exit: false,
  31940. java: false,
  31941. Java: false,
  31942. javafx: false,
  31943. JavaImporter: false,
  31944. javax: false,
  31945. JSAdapter: false,
  31946. load: false,
  31947. loadWithNewGlobal: false,
  31948. org: false,
  31949. Packages: false,
  31950. print: false,
  31951. quit: false
  31952. },
  31953. wsh: {
  31954. ActiveXObject: true,
  31955. Enumerator: true,
  31956. GetObject: true,
  31957. ScriptEngine: true,
  31958. ScriptEngineBuildVersion: true,
  31959. ScriptEngineMajorVersion: true,
  31960. ScriptEngineMinorVersion: true,
  31961. VBArray: true,
  31962. WScript: true,
  31963. WSH: true,
  31964. XDomainRequest: true
  31965. },
  31966. jquery: {
  31967. $: false,
  31968. jQuery: false
  31969. },
  31970. yui: {
  31971. YAHOO: false,
  31972. YAHOO_config: false,
  31973. YUI: false,
  31974. YUI_config: false
  31975. },
  31976. shelljs: {
  31977. cat: false,
  31978. cd: false,
  31979. chmod: false,
  31980. config: false,
  31981. cp: false,
  31982. dirs: false,
  31983. echo: false,
  31984. env: false,
  31985. error: false,
  31986. exec: false,
  31987. exit: false,
  31988. find: false,
  31989. grep: false,
  31990. ln: false,
  31991. ls: false,
  31992. mkdir: false,
  31993. mv: false,
  31994. popd: false,
  31995. pushd: false,
  31996. pwd: false,
  31997. rm: false,
  31998. sed: false,
  31999. set: false,
  32000. target: false,
  32001. tempdir: false,
  32002. test: false,
  32003. touch: false,
  32004. which: false
  32005. },
  32006. prototypejs: {
  32007. $: false,
  32008. $$: false,
  32009. $A: false,
  32010. $break: false,
  32011. $continue: false,
  32012. $F: false,
  32013. $H: false,
  32014. $R: false,
  32015. $w: false,
  32016. Abstract: false,
  32017. Ajax: false,
  32018. Autocompleter: false,
  32019. Builder: false,
  32020. Class: false,
  32021. Control: false,
  32022. Draggable: false,
  32023. Draggables: false,
  32024. Droppables: false,
  32025. Effect: false,
  32026. Element: false,
  32027. Enumerable: false,
  32028. Event: false,
  32029. Field: false,
  32030. Form: false,
  32031. Hash: false,
  32032. Insertion: false,
  32033. ObjectRange: false,
  32034. PeriodicalExecuter: false,
  32035. Position: false,
  32036. Prototype: false,
  32037. Scriptaculous: false,
  32038. Selector: false,
  32039. Sortable: false,
  32040. SortableObserver: false,
  32041. Sound: false,
  32042. Template: false,
  32043. Toggle: false,
  32044. Try: false
  32045. },
  32046. meteor: {
  32047. _: false,
  32048. $: false,
  32049. Accounts: false,
  32050. AccountsClient: false,
  32051. AccountsCommon: false,
  32052. AccountsServer: false,
  32053. App: false,
  32054. Assets: false,
  32055. Blaze: false,
  32056. check: false,
  32057. Cordova: false,
  32058. DDP: false,
  32059. DDPRateLimiter: false,
  32060. DDPServer: false,
  32061. Deps: false,
  32062. EJSON: false,
  32063. Email: false,
  32064. HTTP: false,
  32065. Log: false,
  32066. Match: false,
  32067. Meteor: false,
  32068. Mongo: false,
  32069. MongoInternals: false,
  32070. Npm: false,
  32071. Package: false,
  32072. Plugin: false,
  32073. process: false,
  32074. Random: false,
  32075. ReactiveDict: false,
  32076. ReactiveVar: false,
  32077. Router: false,
  32078. ServiceConfiguration: false,
  32079. Session: false,
  32080. share: false,
  32081. Spacebars: false,
  32082. Template: false,
  32083. Tinytest: false,
  32084. Tracker: false,
  32085. UI: false,
  32086. Utils: false,
  32087. WebApp: false,
  32088. WebAppInternals: false
  32089. },
  32090. mongo: {
  32091. _isWindows: false,
  32092. _rand: false,
  32093. BulkWriteResult: false,
  32094. cat: false,
  32095. cd: false,
  32096. connect: false,
  32097. db: false,
  32098. getHostName: false,
  32099. getMemInfo: false,
  32100. hostname: false,
  32101. ISODate: false,
  32102. listFiles: false,
  32103. load: false,
  32104. ls: false,
  32105. md5sumFile: false,
  32106. mkdir: false,
  32107. Mongo: false,
  32108. NumberInt: false,
  32109. NumberLong: false,
  32110. ObjectId: false,
  32111. PlanCache: false,
  32112. print: false,
  32113. printjson: false,
  32114. pwd: false,
  32115. quit: false,
  32116. removeFile: false,
  32117. rs: false,
  32118. sh: false,
  32119. UUID: false,
  32120. version: false,
  32121. WriteResult: false
  32122. },
  32123. applescript: {
  32124. $: false,
  32125. Application: false,
  32126. Automation: false,
  32127. console: false,
  32128. delay: false,
  32129. Library: false,
  32130. ObjC: false,
  32131. ObjectSpecifier: false,
  32132. Path: false,
  32133. Progress: false,
  32134. Ref: false
  32135. },
  32136. serviceworker: {
  32137. addEventListener: false,
  32138. applicationCache: false,
  32139. atob: false,
  32140. Blob: false,
  32141. BroadcastChannel: false,
  32142. btoa: false,
  32143. Cache: false,
  32144. caches: false,
  32145. CacheStorage: false,
  32146. clearInterval: false,
  32147. clearTimeout: false,
  32148. Client: false,
  32149. clients: false,
  32150. Clients: false,
  32151. close: true,
  32152. console: false,
  32153. ExtendableEvent: false,
  32154. ExtendableMessageEvent: false,
  32155. fetch: false,
  32156. FetchEvent: false,
  32157. FileReaderSync: false,
  32158. FormData: false,
  32159. Headers: false,
  32160. IDBCursor: false,
  32161. IDBCursorWithValue: false,
  32162. IDBDatabase: false,
  32163. IDBFactory: false,
  32164. IDBIndex: false,
  32165. IDBKeyRange: false,
  32166. IDBObjectStore: false,
  32167. IDBOpenDBRequest: false,
  32168. IDBRequest: false,
  32169. IDBTransaction: false,
  32170. IDBVersionChangeEvent: false,
  32171. ImageData: false,
  32172. importScripts: false,
  32173. indexedDB: false,
  32174. location: false,
  32175. MessageChannel: false,
  32176. MessagePort: false,
  32177. name: false,
  32178. navigator: false,
  32179. Notification: false,
  32180. onclose: true,
  32181. onconnect: true,
  32182. onerror: true,
  32183. onfetch: true,
  32184. oninstall: true,
  32185. onlanguagechange: true,
  32186. onmessage: true,
  32187. onmessageerror: true,
  32188. onnotificationclick: true,
  32189. onnotificationclose: true,
  32190. onoffline: true,
  32191. ononline: true,
  32192. onpush: true,
  32193. onpushsubscriptionchange: true,
  32194. onrejectionhandled: true,
  32195. onsync: true,
  32196. onunhandledrejection: true,
  32197. performance: false,
  32198. Performance: false,
  32199. PerformanceEntry: false,
  32200. PerformanceMark: false,
  32201. PerformanceMeasure: false,
  32202. PerformanceNavigation: false,
  32203. PerformanceResourceTiming: false,
  32204. PerformanceTiming: false,
  32205. postMessage: true,
  32206. Promise: false,
  32207. queueMicrotask: false,
  32208. registration: false,
  32209. removeEventListener: false,
  32210. Request: false,
  32211. Response: false,
  32212. self: false,
  32213. ServiceWorker: false,
  32214. ServiceWorkerContainer: false,
  32215. ServiceWorkerGlobalScope: false,
  32216. ServiceWorkerMessageEvent: false,
  32217. ServiceWorkerRegistration: false,
  32218. setInterval: false,
  32219. setTimeout: false,
  32220. skipWaiting: false,
  32221. TextDecoder: false,
  32222. TextEncoder: false,
  32223. URL: false,
  32224. URLSearchParams: false,
  32225. WebSocket: false,
  32226. WindowClient: false,
  32227. Worker: false,
  32228. WorkerGlobalScope: false,
  32229. XMLHttpRequest: false
  32230. },
  32231. atomtest: {
  32232. advanceClock: false,
  32233. fakeClearInterval: false,
  32234. fakeClearTimeout: false,
  32235. fakeSetInterval: false,
  32236. fakeSetTimeout: false,
  32237. resetTimeouts: false,
  32238. waitsForPromise: false
  32239. },
  32240. embertest: {
  32241. andThen: false,
  32242. click: false,
  32243. currentPath: false,
  32244. currentRouteName: false,
  32245. currentURL: false,
  32246. fillIn: false,
  32247. find: false,
  32248. findAll: false,
  32249. findWithAssert: false,
  32250. keyEvent: false,
  32251. pauseTest: false,
  32252. resumeTest: false,
  32253. triggerEvent: false,
  32254. visit: false,
  32255. wait: false
  32256. },
  32257. protractor: {
  32258. $: false,
  32259. $$: false,
  32260. browser: false,
  32261. by: false,
  32262. By: false,
  32263. DartObject: false,
  32264. element: false,
  32265. protractor: false
  32266. },
  32267. "shared-node-browser": {
  32268. clearInterval: false,
  32269. clearTimeout: false,
  32270. console: false,
  32271. setInterval: false,
  32272. setTimeout: false,
  32273. URL: false,
  32274. URLSearchParams: false
  32275. },
  32276. webextensions: {
  32277. browser: false,
  32278. chrome: false,
  32279. opr: false
  32280. },
  32281. greasemonkey: {
  32282. cloneInto: false,
  32283. createObjectIn: false,
  32284. exportFunction: false,
  32285. GM: false,
  32286. GM_addStyle: false,
  32287. GM_deleteValue: false,
  32288. GM_getResourceText: false,
  32289. GM_getResourceURL: false,
  32290. GM_getValue: false,
  32291. GM_info: false,
  32292. GM_listValues: false,
  32293. GM_log: false,
  32294. GM_openInTab: false,
  32295. GM_registerMenuCommand: false,
  32296. GM_setClipboard: false,
  32297. GM_setValue: false,
  32298. GM_xmlhttpRequest: false,
  32299. unsafeWindow: false
  32300. },
  32301. devtools: {
  32302. $: false,
  32303. $_: false,
  32304. $$: false,
  32305. $0: false,
  32306. $1: false,
  32307. $2: false,
  32308. $3: false,
  32309. $4: false,
  32310. $x: false,
  32311. chrome: false,
  32312. clear: false,
  32313. copy: false,
  32314. debug: false,
  32315. dir: false,
  32316. dirxml: false,
  32317. getEventListeners: false,
  32318. inspect: false,
  32319. keys: false,
  32320. monitor: false,
  32321. monitorEvents: false,
  32322. profile: false,
  32323. profileEnd: false,
  32324. queryObjects: false,
  32325. table: false,
  32326. undebug: false,
  32327. unmonitor: false,
  32328. unmonitorEvents: false,
  32329. values: false
  32330. }
  32331. };
  32332. }
  32333. });
  32334. // node_modules/globals/index.js
  32335. var require_globals2 = __commonJS({
  32336. "node_modules/globals/index.js"(exports, module) {
  32337. "use strict";
  32338. module.exports = require_globals();
  32339. }
  32340. });
  32341. // node_modules/@babel/traverse/lib/scope/index.js
  32342. var require_scope = __commonJS({
  32343. "node_modules/@babel/traverse/lib/scope/index.js"(exports) {
  32344. "use strict";
  32345. Object.defineProperty(exports, "__esModule", {
  32346. value: true
  32347. });
  32348. exports.default = void 0;
  32349. var _renamer = require_renamer();
  32350. var _index = require_lib13();
  32351. var _binding = require_binding();
  32352. var _globals = require_globals2();
  32353. var _t = require_lib3();
  32354. var _cache = require_cache();
  32355. var {
  32356. NOT_LOCAL_BINDING,
  32357. callExpression,
  32358. cloneNode,
  32359. getBindingIdentifiers,
  32360. identifier,
  32361. isArrayExpression,
  32362. isBinary,
  32363. isClass,
  32364. isClassBody,
  32365. isClassDeclaration,
  32366. isExportAllDeclaration,
  32367. isExportDefaultDeclaration,
  32368. isExportNamedDeclaration: isExportNamedDeclaration2,
  32369. isFunctionDeclaration,
  32370. isIdentifier: isIdentifier3,
  32371. isImportDeclaration,
  32372. isLiteral,
  32373. isMethod,
  32374. isModuleSpecifier,
  32375. isNullLiteral,
  32376. isObjectExpression: isObjectExpression2,
  32377. isProperty,
  32378. isPureish,
  32379. isRegExpLiteral,
  32380. isSuper,
  32381. isTaggedTemplateExpression,
  32382. isTemplateLiteral,
  32383. isThisExpression,
  32384. isUnaryExpression,
  32385. isVariableDeclaration: isVariableDeclaration2,
  32386. matchesPattern,
  32387. memberExpression,
  32388. numericLiteral,
  32389. toIdentifier: toIdentifier2,
  32390. unaryExpression,
  32391. variableDeclaration,
  32392. variableDeclarator,
  32393. isRecordExpression,
  32394. isTupleExpression,
  32395. isObjectProperty,
  32396. isTopicReference,
  32397. isMetaProperty,
  32398. isPrivateName,
  32399. isExportDeclaration
  32400. } = _t;
  32401. function gatherNodeParts(node2, parts) {
  32402. switch (node2 == null ? void 0 : node2.type) {
  32403. default:
  32404. if (isImportDeclaration(node2) || isExportDeclaration(node2)) {
  32405. if ((isExportAllDeclaration(node2) || isExportNamedDeclaration2(node2) || isImportDeclaration(node2)) && node2.source) {
  32406. gatherNodeParts(node2.source, parts);
  32407. } else if ((isExportNamedDeclaration2(node2) || isImportDeclaration(node2)) && node2.specifiers && node2.specifiers.length) {
  32408. for (const e of node2.specifiers)
  32409. gatherNodeParts(e, parts);
  32410. } else if ((isExportDefaultDeclaration(node2) || isExportNamedDeclaration2(node2)) && node2.declaration) {
  32411. gatherNodeParts(node2.declaration, parts);
  32412. }
  32413. } else if (isModuleSpecifier(node2)) {
  32414. gatherNodeParts(node2.local, parts);
  32415. } else if (isLiteral(node2) && !isNullLiteral(node2) && !isRegExpLiteral(node2) && !isTemplateLiteral(node2)) {
  32416. parts.push(node2.value);
  32417. }
  32418. break;
  32419. case "MemberExpression":
  32420. case "OptionalMemberExpression":
  32421. case "JSXMemberExpression":
  32422. gatherNodeParts(node2.object, parts);
  32423. gatherNodeParts(node2.property, parts);
  32424. break;
  32425. case "Identifier":
  32426. case "JSXIdentifier":
  32427. parts.push(node2.name);
  32428. break;
  32429. case "CallExpression":
  32430. case "OptionalCallExpression":
  32431. case "NewExpression":
  32432. gatherNodeParts(node2.callee, parts);
  32433. break;
  32434. case "ObjectExpression":
  32435. case "ObjectPattern":
  32436. for (const e of node2.properties) {
  32437. gatherNodeParts(e, parts);
  32438. }
  32439. break;
  32440. case "SpreadElement":
  32441. case "RestElement":
  32442. gatherNodeParts(node2.argument, parts);
  32443. break;
  32444. case "ObjectProperty":
  32445. case "ObjectMethod":
  32446. case "ClassProperty":
  32447. case "ClassMethod":
  32448. case "ClassPrivateProperty":
  32449. case "ClassPrivateMethod":
  32450. gatherNodeParts(node2.key, parts);
  32451. break;
  32452. case "ThisExpression":
  32453. parts.push("this");
  32454. break;
  32455. case "Super":
  32456. parts.push("super");
  32457. break;
  32458. case "Import":
  32459. parts.push("import");
  32460. break;
  32461. case "DoExpression":
  32462. parts.push("do");
  32463. break;
  32464. case "YieldExpression":
  32465. parts.push("yield");
  32466. gatherNodeParts(node2.argument, parts);
  32467. break;
  32468. case "AwaitExpression":
  32469. parts.push("await");
  32470. gatherNodeParts(node2.argument, parts);
  32471. break;
  32472. case "AssignmentExpression":
  32473. gatherNodeParts(node2.left, parts);
  32474. break;
  32475. case "VariableDeclarator":
  32476. gatherNodeParts(node2.id, parts);
  32477. break;
  32478. case "FunctionExpression":
  32479. case "FunctionDeclaration":
  32480. case "ClassExpression":
  32481. case "ClassDeclaration":
  32482. gatherNodeParts(node2.id, parts);
  32483. break;
  32484. case "PrivateName":
  32485. gatherNodeParts(node2.id, parts);
  32486. break;
  32487. case "ParenthesizedExpression":
  32488. gatherNodeParts(node2.expression, parts);
  32489. break;
  32490. case "UnaryExpression":
  32491. case "UpdateExpression":
  32492. gatherNodeParts(node2.argument, parts);
  32493. break;
  32494. case "MetaProperty":
  32495. gatherNodeParts(node2.meta, parts);
  32496. gatherNodeParts(node2.property, parts);
  32497. break;
  32498. case "JSXElement":
  32499. gatherNodeParts(node2.openingElement, parts);
  32500. break;
  32501. case "JSXOpeningElement":
  32502. gatherNodeParts(node2.name, parts);
  32503. break;
  32504. case "JSXFragment":
  32505. gatherNodeParts(node2.openingFragment, parts);
  32506. break;
  32507. case "JSXOpeningFragment":
  32508. parts.push("Fragment");
  32509. break;
  32510. case "JSXNamespacedName":
  32511. gatherNodeParts(node2.namespace, parts);
  32512. gatherNodeParts(node2.name, parts);
  32513. break;
  32514. }
  32515. }
  32516. var collectorVisitor = {
  32517. ForStatement(path) {
  32518. const declar = path.get("init");
  32519. if (declar.isVar()) {
  32520. const {
  32521. scope
  32522. } = path;
  32523. const parentScope = scope.getFunctionParent() || scope.getProgramParent();
  32524. parentScope.registerBinding("var", declar);
  32525. }
  32526. },
  32527. Declaration(path) {
  32528. if (path.isBlockScoped())
  32529. return;
  32530. if (path.isImportDeclaration())
  32531. return;
  32532. if (path.isExportDeclaration())
  32533. return;
  32534. const parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
  32535. parent.registerDeclaration(path);
  32536. },
  32537. ImportDeclaration(path) {
  32538. const parent = path.scope.getBlockParent();
  32539. parent.registerDeclaration(path);
  32540. },
  32541. ReferencedIdentifier(path, state) {
  32542. state.references.push(path);
  32543. },
  32544. ForXStatement(path, state) {
  32545. const left = path.get("left");
  32546. if (left.isPattern() || left.isIdentifier()) {
  32547. state.constantViolations.push(path);
  32548. } else if (left.isVar()) {
  32549. const {
  32550. scope
  32551. } = path;
  32552. const parentScope = scope.getFunctionParent() || scope.getProgramParent();
  32553. parentScope.registerBinding("var", left);
  32554. }
  32555. },
  32556. ExportDeclaration: {
  32557. exit(path) {
  32558. const {
  32559. node: node2,
  32560. scope
  32561. } = path;
  32562. if (isExportAllDeclaration(node2))
  32563. return;
  32564. const declar = node2.declaration;
  32565. if (isClassDeclaration(declar) || isFunctionDeclaration(declar)) {
  32566. const id = declar.id;
  32567. if (!id)
  32568. return;
  32569. const binding = scope.getBinding(id.name);
  32570. binding == null ? void 0 : binding.reference(path);
  32571. } else if (isVariableDeclaration2(declar)) {
  32572. for (const decl of declar.declarations) {
  32573. for (const name2 of Object.keys(getBindingIdentifiers(decl))) {
  32574. const binding = scope.getBinding(name2);
  32575. binding == null ? void 0 : binding.reference(path);
  32576. }
  32577. }
  32578. }
  32579. }
  32580. },
  32581. LabeledStatement(path) {
  32582. path.scope.getBlockParent().registerDeclaration(path);
  32583. },
  32584. AssignmentExpression(path, state) {
  32585. state.assignments.push(path);
  32586. },
  32587. UpdateExpression(path, state) {
  32588. state.constantViolations.push(path);
  32589. },
  32590. UnaryExpression(path, state) {
  32591. if (path.node.operator === "delete") {
  32592. state.constantViolations.push(path);
  32593. }
  32594. },
  32595. BlockScoped(path) {
  32596. let scope = path.scope;
  32597. if (scope.path === path)
  32598. scope = scope.parent;
  32599. const parent = scope.getBlockParent();
  32600. parent.registerDeclaration(path);
  32601. if (path.isClassDeclaration() && path.node.id) {
  32602. const id = path.node.id;
  32603. const name2 = id.name;
  32604. path.scope.bindings[name2] = path.scope.parent.getBinding(name2);
  32605. }
  32606. },
  32607. CatchClause(path) {
  32608. path.scope.registerBinding("let", path);
  32609. },
  32610. Function(path) {
  32611. const params = path.get("params");
  32612. for (const param of params) {
  32613. path.scope.registerBinding("param", param);
  32614. }
  32615. if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING]) {
  32616. path.scope.registerBinding("local", path.get("id"), path);
  32617. }
  32618. },
  32619. ClassExpression(path) {
  32620. if (path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING]) {
  32621. path.scope.registerBinding("local", path);
  32622. }
  32623. }
  32624. };
  32625. var uid = 0;
  32626. var Scope6 = class {
  32627. constructor(path) {
  32628. this.uid = void 0;
  32629. this.path = void 0;
  32630. this.block = void 0;
  32631. this.labels = void 0;
  32632. this.inited = void 0;
  32633. this.bindings = void 0;
  32634. this.references = void 0;
  32635. this.globals = void 0;
  32636. this.uids = void 0;
  32637. this.data = void 0;
  32638. this.crawling = void 0;
  32639. const {
  32640. node: node2
  32641. } = path;
  32642. const cached = _cache.scope.get(node2);
  32643. if ((cached == null ? void 0 : cached.path) === path) {
  32644. return cached;
  32645. }
  32646. _cache.scope.set(node2, this);
  32647. this.uid = uid++;
  32648. this.block = node2;
  32649. this.path = path;
  32650. this.labels = /* @__PURE__ */ new Map();
  32651. this.inited = false;
  32652. }
  32653. get parent() {
  32654. var _parent;
  32655. let parent, path = this.path;
  32656. do {
  32657. const shouldSkip = path.key === "key" || path.listKey === "decorators";
  32658. path = path.parentPath;
  32659. if (shouldSkip && path.isMethod())
  32660. path = path.parentPath;
  32661. if (path && path.isScope())
  32662. parent = path;
  32663. } while (path && !parent);
  32664. return (_parent = parent) == null ? void 0 : _parent.scope;
  32665. }
  32666. get parentBlock() {
  32667. return this.path.parent;
  32668. }
  32669. get hub() {
  32670. return this.path.hub;
  32671. }
  32672. traverse(node2, opts, state) {
  32673. (0, _index.default)(node2, opts, this, state, this.path);
  32674. }
  32675. generateDeclaredUidIdentifier(name2) {
  32676. const id = this.generateUidIdentifier(name2);
  32677. this.push({
  32678. id
  32679. });
  32680. return cloneNode(id);
  32681. }
  32682. generateUidIdentifier(name2) {
  32683. return identifier(this.generateUid(name2));
  32684. }
  32685. generateUid(name2 = "temp") {
  32686. name2 = toIdentifier2(name2).replace(/^_+/, "").replace(/[0-9]+$/g, "");
  32687. let uid2;
  32688. let i = 1;
  32689. do {
  32690. uid2 = this._generateUid(name2, i);
  32691. i++;
  32692. } while (this.hasLabel(uid2) || this.hasBinding(uid2) || this.hasGlobal(uid2) || this.hasReference(uid2));
  32693. const program = this.getProgramParent();
  32694. program.references[uid2] = true;
  32695. program.uids[uid2] = true;
  32696. return uid2;
  32697. }
  32698. _generateUid(name2, i) {
  32699. let id = name2;
  32700. if (i > 1)
  32701. id += i;
  32702. return `_${id}`;
  32703. }
  32704. generateUidBasedOnNode(node2, defaultName) {
  32705. const parts = [];
  32706. gatherNodeParts(node2, parts);
  32707. let id = parts.join("$");
  32708. id = id.replace(/^_/, "") || defaultName || "ref";
  32709. return this.generateUid(id.slice(0, 20));
  32710. }
  32711. generateUidIdentifierBasedOnNode(node2, defaultName) {
  32712. return identifier(this.generateUidBasedOnNode(node2, defaultName));
  32713. }
  32714. isStatic(node2) {
  32715. if (isThisExpression(node2) || isSuper(node2) || isTopicReference(node2)) {
  32716. return true;
  32717. }
  32718. if (isIdentifier3(node2)) {
  32719. const binding = this.getBinding(node2.name);
  32720. if (binding) {
  32721. return binding.constant;
  32722. } else {
  32723. return this.hasBinding(node2.name);
  32724. }
  32725. }
  32726. return false;
  32727. }
  32728. maybeGenerateMemoised(node2, dontPush) {
  32729. if (this.isStatic(node2)) {
  32730. return null;
  32731. } else {
  32732. const id = this.generateUidIdentifierBasedOnNode(node2);
  32733. if (!dontPush) {
  32734. this.push({
  32735. id
  32736. });
  32737. return cloneNode(id);
  32738. }
  32739. return id;
  32740. }
  32741. }
  32742. checkBlockScopedCollisions(local, kind, name2, id) {
  32743. if (kind === "param")
  32744. return;
  32745. if (local.kind === "local")
  32746. return;
  32747. const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && kind === "const";
  32748. if (duplicate) {
  32749. throw this.hub.buildError(id, `Duplicate declaration "${name2}"`, TypeError);
  32750. }
  32751. }
  32752. rename(oldName, newName) {
  32753. const binding = this.getBinding(oldName);
  32754. if (binding) {
  32755. newName || (newName = this.generateUidIdentifier(oldName).name);
  32756. const renamer = new _renamer.default(binding, oldName, newName);
  32757. {
  32758. renamer.rename(arguments[2]);
  32759. }
  32760. }
  32761. }
  32762. _renameFromMap(map, oldName, newName, value2) {
  32763. if (map[oldName]) {
  32764. map[newName] = value2;
  32765. map[oldName] = null;
  32766. }
  32767. }
  32768. dump() {
  32769. const sep = "-".repeat(60);
  32770. console.log(sep);
  32771. let scope = this;
  32772. do {
  32773. console.log("#", scope.block.type);
  32774. for (const name2 of Object.keys(scope.bindings)) {
  32775. const binding = scope.bindings[name2];
  32776. console.log(" -", name2, {
  32777. constant: binding.constant,
  32778. references: binding.references,
  32779. violations: binding.constantViolations.length,
  32780. kind: binding.kind
  32781. });
  32782. }
  32783. } while (scope = scope.parent);
  32784. console.log(sep);
  32785. }
  32786. toArray(node2, i, arrayLikeIsIterable) {
  32787. if (isIdentifier3(node2)) {
  32788. const binding = this.getBinding(node2.name);
  32789. if (binding != null && binding.constant && binding.path.isGenericType("Array")) {
  32790. return node2;
  32791. }
  32792. }
  32793. if (isArrayExpression(node2)) {
  32794. return node2;
  32795. }
  32796. if (isIdentifier3(node2, {
  32797. name: "arguments"
  32798. })) {
  32799. return callExpression(memberExpression(memberExpression(memberExpression(identifier("Array"), identifier("prototype")), identifier("slice")), identifier("call")), [node2]);
  32800. }
  32801. let helperName;
  32802. const args = [node2];
  32803. if (i === true) {
  32804. helperName = "toConsumableArray";
  32805. } else if (typeof i === "number") {
  32806. args.push(numericLiteral(i));
  32807. helperName = "slicedToArray";
  32808. } else {
  32809. helperName = "toArray";
  32810. }
  32811. if (arrayLikeIsIterable) {
  32812. args.unshift(this.hub.addHelper(helperName));
  32813. helperName = "maybeArrayLike";
  32814. }
  32815. return callExpression(this.hub.addHelper(helperName), args);
  32816. }
  32817. hasLabel(name2) {
  32818. return !!this.getLabel(name2);
  32819. }
  32820. getLabel(name2) {
  32821. return this.labels.get(name2);
  32822. }
  32823. registerLabel(path) {
  32824. this.labels.set(path.node.label.name, path);
  32825. }
  32826. registerDeclaration(path) {
  32827. if (path.isLabeledStatement()) {
  32828. this.registerLabel(path);
  32829. } else if (path.isFunctionDeclaration()) {
  32830. this.registerBinding("hoisted", path.get("id"), path);
  32831. } else if (path.isVariableDeclaration()) {
  32832. const declarations = path.get("declarations");
  32833. const {
  32834. kind
  32835. } = path.node;
  32836. for (const declar of declarations) {
  32837. this.registerBinding(kind === "using" ? "const" : kind, declar);
  32838. }
  32839. } else if (path.isClassDeclaration()) {
  32840. if (path.node.declare)
  32841. return;
  32842. this.registerBinding("let", path);
  32843. } else if (path.isImportDeclaration()) {
  32844. const isTypeDeclaration = path.node.importKind === "type" || path.node.importKind === "typeof";
  32845. const specifiers = path.get("specifiers");
  32846. for (const specifier of specifiers) {
  32847. const isTypeSpecifier = isTypeDeclaration || specifier.isImportSpecifier() && (specifier.node.importKind === "type" || specifier.node.importKind === "typeof");
  32848. this.registerBinding(isTypeSpecifier ? "unknown" : "module", specifier);
  32849. }
  32850. } else if (path.isExportDeclaration()) {
  32851. const declar = path.get("declaration");
  32852. if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
  32853. this.registerDeclaration(declar);
  32854. }
  32855. } else {
  32856. this.registerBinding("unknown", path);
  32857. }
  32858. }
  32859. buildUndefinedNode() {
  32860. return unaryExpression("void", numericLiteral(0), true);
  32861. }
  32862. registerConstantViolation(path) {
  32863. const ids = path.getBindingIdentifiers();
  32864. for (const name2 of Object.keys(ids)) {
  32865. const binding = this.getBinding(name2);
  32866. if (binding)
  32867. binding.reassign(path);
  32868. }
  32869. }
  32870. registerBinding(kind, path, bindingPath = path) {
  32871. if (!kind)
  32872. throw new ReferenceError("no `kind`");
  32873. if (path.isVariableDeclaration()) {
  32874. const declarators = path.get("declarations");
  32875. for (const declar of declarators) {
  32876. this.registerBinding(kind, declar);
  32877. }
  32878. return;
  32879. }
  32880. const parent = this.getProgramParent();
  32881. const ids = path.getOuterBindingIdentifiers(true);
  32882. for (const name2 of Object.keys(ids)) {
  32883. parent.references[name2] = true;
  32884. for (const id of ids[name2]) {
  32885. const local = this.getOwnBinding(name2);
  32886. if (local) {
  32887. if (local.identifier === id)
  32888. continue;
  32889. this.checkBlockScopedCollisions(local, kind, name2, id);
  32890. }
  32891. if (local) {
  32892. this.registerConstantViolation(bindingPath);
  32893. } else {
  32894. this.bindings[name2] = new _binding.default({
  32895. identifier: id,
  32896. scope: this,
  32897. path: bindingPath,
  32898. kind
  32899. });
  32900. }
  32901. }
  32902. }
  32903. }
  32904. addGlobal(node2) {
  32905. this.globals[node2.name] = node2;
  32906. }
  32907. hasUid(name2) {
  32908. let scope = this;
  32909. do {
  32910. if (scope.uids[name2])
  32911. return true;
  32912. } while (scope = scope.parent);
  32913. return false;
  32914. }
  32915. hasGlobal(name2) {
  32916. let scope = this;
  32917. do {
  32918. if (scope.globals[name2])
  32919. return true;
  32920. } while (scope = scope.parent);
  32921. return false;
  32922. }
  32923. hasReference(name2) {
  32924. return !!this.getProgramParent().references[name2];
  32925. }
  32926. isPure(node2, constantsOnly) {
  32927. if (isIdentifier3(node2)) {
  32928. const binding = this.getBinding(node2.name);
  32929. if (!binding)
  32930. return false;
  32931. if (constantsOnly)
  32932. return binding.constant;
  32933. return true;
  32934. } else if (isThisExpression(node2) || isMetaProperty(node2) || isTopicReference(node2) || isPrivateName(node2)) {
  32935. return true;
  32936. } else if (isClass(node2)) {
  32937. var _node$decorators;
  32938. if (node2.superClass && !this.isPure(node2.superClass, constantsOnly)) {
  32939. return false;
  32940. }
  32941. if (((_node$decorators = node2.decorators) == null ? void 0 : _node$decorators.length) > 0) {
  32942. return false;
  32943. }
  32944. return this.isPure(node2.body, constantsOnly);
  32945. } else if (isClassBody(node2)) {
  32946. for (const method of node2.body) {
  32947. if (!this.isPure(method, constantsOnly))
  32948. return false;
  32949. }
  32950. return true;
  32951. } else if (isBinary(node2)) {
  32952. return this.isPure(node2.left, constantsOnly) && this.isPure(node2.right, constantsOnly);
  32953. } else if (isArrayExpression(node2) || isTupleExpression(node2)) {
  32954. for (const elem of node2.elements) {
  32955. if (elem !== null && !this.isPure(elem, constantsOnly))
  32956. return false;
  32957. }
  32958. return true;
  32959. } else if (isObjectExpression2(node2) || isRecordExpression(node2)) {
  32960. for (const prop of node2.properties) {
  32961. if (!this.isPure(prop, constantsOnly))
  32962. return false;
  32963. }
  32964. return true;
  32965. } else if (isMethod(node2)) {
  32966. var _node$decorators2;
  32967. if (node2.computed && !this.isPure(node2.key, constantsOnly))
  32968. return false;
  32969. if (((_node$decorators2 = node2.decorators) == null ? void 0 : _node$decorators2.length) > 0) {
  32970. return false;
  32971. }
  32972. return true;
  32973. } else if (isProperty(node2)) {
  32974. var _node$decorators3;
  32975. if (node2.computed && !this.isPure(node2.key, constantsOnly))
  32976. return false;
  32977. if (((_node$decorators3 = node2.decorators) == null ? void 0 : _node$decorators3.length) > 0) {
  32978. return false;
  32979. }
  32980. if (isObjectProperty(node2) || node2.static) {
  32981. if (node2.value !== null && !this.isPure(node2.value, constantsOnly)) {
  32982. return false;
  32983. }
  32984. }
  32985. return true;
  32986. } else if (isUnaryExpression(node2)) {
  32987. return this.isPure(node2.argument, constantsOnly);
  32988. } else if (isTaggedTemplateExpression(node2)) {
  32989. return matchesPattern(node2.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node2.quasi, constantsOnly);
  32990. } else if (isTemplateLiteral(node2)) {
  32991. for (const expression of node2.expressions) {
  32992. if (!this.isPure(expression, constantsOnly))
  32993. return false;
  32994. }
  32995. return true;
  32996. } else {
  32997. return isPureish(node2);
  32998. }
  32999. }
  33000. setData(key2, val) {
  33001. return this.data[key2] = val;
  33002. }
  33003. getData(key2) {
  33004. let scope = this;
  33005. do {
  33006. const data3 = scope.data[key2];
  33007. if (data3 != null)
  33008. return data3;
  33009. } while (scope = scope.parent);
  33010. }
  33011. removeData(key2) {
  33012. let scope = this;
  33013. do {
  33014. const data3 = scope.data[key2];
  33015. if (data3 != null)
  33016. scope.data[key2] = null;
  33017. } while (scope = scope.parent);
  33018. }
  33019. init() {
  33020. if (!this.inited) {
  33021. this.inited = true;
  33022. this.crawl();
  33023. }
  33024. }
  33025. crawl() {
  33026. const path = this.path;
  33027. this.references = /* @__PURE__ */ Object.create(null);
  33028. this.bindings = /* @__PURE__ */ Object.create(null);
  33029. this.globals = /* @__PURE__ */ Object.create(null);
  33030. this.uids = /* @__PURE__ */ Object.create(null);
  33031. this.data = /* @__PURE__ */ Object.create(null);
  33032. const programParent = this.getProgramParent();
  33033. if (programParent.crawling)
  33034. return;
  33035. const state = {
  33036. references: [],
  33037. constantViolations: [],
  33038. assignments: []
  33039. };
  33040. this.crawling = true;
  33041. if (path.type !== "Program" && collectorVisitor._exploded) {
  33042. for (const visit3 of collectorVisitor.enter) {
  33043. visit3(path, state);
  33044. }
  33045. const typeVisitors = collectorVisitor[path.type];
  33046. if (typeVisitors) {
  33047. for (const visit3 of typeVisitors.enter) {
  33048. visit3(path, state);
  33049. }
  33050. }
  33051. }
  33052. path.traverse(collectorVisitor, state);
  33053. this.crawling = false;
  33054. for (const path2 of state.assignments) {
  33055. const ids = path2.getBindingIdentifiers();
  33056. for (const name2 of Object.keys(ids)) {
  33057. if (path2.scope.getBinding(name2))
  33058. continue;
  33059. programParent.addGlobal(ids[name2]);
  33060. }
  33061. path2.scope.registerConstantViolation(path2);
  33062. }
  33063. for (const ref3 of state.references) {
  33064. const binding = ref3.scope.getBinding(ref3.node.name);
  33065. if (binding) {
  33066. binding.reference(ref3);
  33067. } else {
  33068. programParent.addGlobal(ref3.node);
  33069. }
  33070. }
  33071. for (const path2 of state.constantViolations) {
  33072. path2.scope.registerConstantViolation(path2);
  33073. }
  33074. }
  33075. push(opts) {
  33076. let path = this.path;
  33077. if (path.isPattern()) {
  33078. path = this.getPatternParent().path;
  33079. } else if (!path.isBlockStatement() && !path.isProgram()) {
  33080. path = this.getBlockParent().path;
  33081. }
  33082. if (path.isSwitchStatement()) {
  33083. path = (this.getFunctionParent() || this.getProgramParent()).path;
  33084. }
  33085. if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
  33086. path.ensureBlock();
  33087. path = path.get("body");
  33088. }
  33089. const unique = opts.unique;
  33090. const kind = opts.kind || "var";
  33091. const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
  33092. const dataKey = `declaration:${kind}:${blockHoist}`;
  33093. let declarPath = !unique && path.getData(dataKey);
  33094. if (!declarPath) {
  33095. const declar = variableDeclaration(kind, []);
  33096. declar._blockHoist = blockHoist;
  33097. [declarPath] = path.unshiftContainer("body", [declar]);
  33098. if (!unique)
  33099. path.setData(dataKey, declarPath);
  33100. }
  33101. const declarator = variableDeclarator(opts.id, opts.init);
  33102. const len = declarPath.node.declarations.push(declarator);
  33103. path.scope.registerBinding(kind, declarPath.get("declarations")[len - 1]);
  33104. }
  33105. getProgramParent() {
  33106. let scope = this;
  33107. do {
  33108. if (scope.path.isProgram()) {
  33109. return scope;
  33110. }
  33111. } while (scope = scope.parent);
  33112. throw new Error("Couldn't find a Program");
  33113. }
  33114. getFunctionParent() {
  33115. let scope = this;
  33116. do {
  33117. if (scope.path.isFunctionParent()) {
  33118. return scope;
  33119. }
  33120. } while (scope = scope.parent);
  33121. return null;
  33122. }
  33123. getBlockParent() {
  33124. let scope = this;
  33125. do {
  33126. if (scope.path.isBlockParent()) {
  33127. return scope;
  33128. }
  33129. } while (scope = scope.parent);
  33130. throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
  33131. }
  33132. getPatternParent() {
  33133. let scope = this;
  33134. do {
  33135. if (!scope.path.isPattern()) {
  33136. return scope.getBlockParent();
  33137. }
  33138. } while (scope = scope.parent.parent);
  33139. throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
  33140. }
  33141. getAllBindings() {
  33142. const ids = /* @__PURE__ */ Object.create(null);
  33143. let scope = this;
  33144. do {
  33145. for (const key2 of Object.keys(scope.bindings)) {
  33146. if (key2 in ids === false) {
  33147. ids[key2] = scope.bindings[key2];
  33148. }
  33149. }
  33150. scope = scope.parent;
  33151. } while (scope);
  33152. return ids;
  33153. }
  33154. getAllBindingsOfKind(...kinds) {
  33155. const ids = /* @__PURE__ */ Object.create(null);
  33156. for (const kind of kinds) {
  33157. let scope = this;
  33158. do {
  33159. for (const name2 of Object.keys(scope.bindings)) {
  33160. const binding = scope.bindings[name2];
  33161. if (binding.kind === kind)
  33162. ids[name2] = binding;
  33163. }
  33164. scope = scope.parent;
  33165. } while (scope);
  33166. }
  33167. return ids;
  33168. }
  33169. bindingIdentifierEquals(name2, node2) {
  33170. return this.getBindingIdentifier(name2) === node2;
  33171. }
  33172. getBinding(name2) {
  33173. let scope = this;
  33174. let previousPath;
  33175. do {
  33176. const binding = scope.getOwnBinding(name2);
  33177. if (binding) {
  33178. var _previousPath;
  33179. if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== "param" && binding.kind !== "local") {
  33180. } else {
  33181. return binding;
  33182. }
  33183. } else if (!binding && name2 === "arguments" && scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
  33184. break;
  33185. }
  33186. previousPath = scope.path;
  33187. } while (scope = scope.parent);
  33188. }
  33189. getOwnBinding(name2) {
  33190. return this.bindings[name2];
  33191. }
  33192. getBindingIdentifier(name2) {
  33193. var _this$getBinding;
  33194. return (_this$getBinding = this.getBinding(name2)) == null ? void 0 : _this$getBinding.identifier;
  33195. }
  33196. getOwnBindingIdentifier(name2) {
  33197. const binding = this.bindings[name2];
  33198. return binding == null ? void 0 : binding.identifier;
  33199. }
  33200. hasOwnBinding(name2) {
  33201. return !!this.getOwnBinding(name2);
  33202. }
  33203. hasBinding(name2, opts) {
  33204. var _opts, _opts2, _opts3;
  33205. if (!name2)
  33206. return false;
  33207. if (this.hasOwnBinding(name2))
  33208. return true;
  33209. {
  33210. if (typeof opts === "boolean")
  33211. opts = {
  33212. noGlobals: opts
  33213. };
  33214. }
  33215. if (this.parentHasBinding(name2, opts))
  33216. return true;
  33217. if (!((_opts = opts) != null && _opts.noUids) && this.hasUid(name2))
  33218. return true;
  33219. if (!((_opts2 = opts) != null && _opts2.noGlobals) && Scope6.globals.includes(name2))
  33220. return true;
  33221. if (!((_opts3 = opts) != null && _opts3.noGlobals) && Scope6.contextVariables.includes(name2))
  33222. return true;
  33223. return false;
  33224. }
  33225. parentHasBinding(name2, opts) {
  33226. var _this$parent;
  33227. return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name2, opts);
  33228. }
  33229. moveBindingTo(name2, scope) {
  33230. const info = this.getBinding(name2);
  33231. if (info) {
  33232. info.scope.removeOwnBinding(name2);
  33233. info.scope = scope;
  33234. scope.bindings[name2] = info;
  33235. }
  33236. }
  33237. removeOwnBinding(name2) {
  33238. delete this.bindings[name2];
  33239. }
  33240. removeBinding(name2) {
  33241. var _this$getBinding2;
  33242. (_this$getBinding2 = this.getBinding(name2)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name2);
  33243. let scope = this;
  33244. do {
  33245. if (scope.uids[name2]) {
  33246. scope.uids[name2] = false;
  33247. }
  33248. } while (scope = scope.parent);
  33249. }
  33250. };
  33251. exports.default = Scope6;
  33252. Scope6.globals = Object.keys(_globals.builtin);
  33253. Scope6.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
  33254. }
  33255. });
  33256. // node_modules/@babel/traverse/lib/path/ancestry.js
  33257. var require_ancestry = __commonJS({
  33258. "node_modules/@babel/traverse/lib/path/ancestry.js"(exports) {
  33259. "use strict";
  33260. Object.defineProperty(exports, "__esModule", {
  33261. value: true
  33262. });
  33263. exports.find = find2;
  33264. exports.findParent = findParent;
  33265. exports.getAncestry = getAncestry;
  33266. exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
  33267. exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
  33268. exports.getFunctionParent = getFunctionParent;
  33269. exports.getStatementParent = getStatementParent;
  33270. exports.inType = inType;
  33271. exports.isAncestor = isAncestor;
  33272. exports.isDescendant = isDescendant;
  33273. var _t = require_lib3();
  33274. var {
  33275. VISITOR_KEYS
  33276. } = _t;
  33277. function findParent(callback) {
  33278. let path = this;
  33279. while (path = path.parentPath) {
  33280. if (callback(path))
  33281. return path;
  33282. }
  33283. return null;
  33284. }
  33285. function find2(callback) {
  33286. let path = this;
  33287. do {
  33288. if (callback(path))
  33289. return path;
  33290. } while (path = path.parentPath);
  33291. return null;
  33292. }
  33293. function getFunctionParent() {
  33294. return this.findParent((p) => p.isFunction());
  33295. }
  33296. function getStatementParent() {
  33297. let path = this;
  33298. do {
  33299. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  33300. break;
  33301. } else {
  33302. path = path.parentPath;
  33303. }
  33304. } while (path);
  33305. if (path && (path.isProgram() || path.isFile())) {
  33306. throw new Error("File/Program node, we can't possibly find a statement parent to this");
  33307. }
  33308. return path;
  33309. }
  33310. function getEarliestCommonAncestorFrom(paths) {
  33311. return this.getDeepestCommonAncestorFrom(paths, function(deepest, i, ancestries) {
  33312. let earliest;
  33313. const keys2 = VISITOR_KEYS[deepest.type];
  33314. for (const ancestry of ancestries) {
  33315. const path = ancestry[i + 1];
  33316. if (!earliest) {
  33317. earliest = path;
  33318. continue;
  33319. }
  33320. if (path.listKey && earliest.listKey === path.listKey) {
  33321. if (path.key < earliest.key) {
  33322. earliest = path;
  33323. continue;
  33324. }
  33325. }
  33326. const earliestKeyIndex = keys2.indexOf(earliest.parentKey);
  33327. const currentKeyIndex = keys2.indexOf(path.parentKey);
  33328. if (earliestKeyIndex > currentKeyIndex) {
  33329. earliest = path;
  33330. }
  33331. }
  33332. return earliest;
  33333. });
  33334. }
  33335. function getDeepestCommonAncestorFrom(paths, filter) {
  33336. if (!paths.length) {
  33337. return this;
  33338. }
  33339. if (paths.length === 1) {
  33340. return paths[0];
  33341. }
  33342. let minDepth = Infinity;
  33343. let lastCommonIndex, lastCommon;
  33344. const ancestries = paths.map((path) => {
  33345. const ancestry = [];
  33346. do {
  33347. ancestry.unshift(path);
  33348. } while ((path = path.parentPath) && path !== this);
  33349. if (ancestry.length < minDepth) {
  33350. minDepth = ancestry.length;
  33351. }
  33352. return ancestry;
  33353. });
  33354. const first = ancestries[0];
  33355. depthLoop:
  33356. for (let i = 0; i < minDepth; i++) {
  33357. const shouldMatch = first[i];
  33358. for (const ancestry of ancestries) {
  33359. if (ancestry[i] !== shouldMatch) {
  33360. break depthLoop;
  33361. }
  33362. }
  33363. lastCommonIndex = i;
  33364. lastCommon = shouldMatch;
  33365. }
  33366. if (lastCommon) {
  33367. if (filter) {
  33368. return filter(lastCommon, lastCommonIndex, ancestries);
  33369. } else {
  33370. return lastCommon;
  33371. }
  33372. } else {
  33373. throw new Error("Couldn't find intersection");
  33374. }
  33375. }
  33376. function getAncestry() {
  33377. let path = this;
  33378. const paths = [];
  33379. do {
  33380. paths.push(path);
  33381. } while (path = path.parentPath);
  33382. return paths;
  33383. }
  33384. function isAncestor(maybeDescendant) {
  33385. return maybeDescendant.isDescendant(this);
  33386. }
  33387. function isDescendant(maybeAncestor) {
  33388. return !!this.findParent((parent) => parent === maybeAncestor);
  33389. }
  33390. function inType(...candidateTypes) {
  33391. let path = this;
  33392. while (path) {
  33393. for (const type of candidateTypes) {
  33394. if (path.node.type === type)
  33395. return true;
  33396. }
  33397. path = path.parentPath;
  33398. }
  33399. return false;
  33400. }
  33401. }
  33402. });
  33403. // node_modules/@babel/traverse/lib/path/inference/util.js
  33404. var require_util = __commonJS({
  33405. "node_modules/@babel/traverse/lib/path/inference/util.js"(exports) {
  33406. "use strict";
  33407. Object.defineProperty(exports, "__esModule", {
  33408. value: true
  33409. });
  33410. exports.createUnionType = createUnionType;
  33411. var _t = require_lib3();
  33412. var {
  33413. createFlowUnionType,
  33414. createTSUnionType,
  33415. createUnionTypeAnnotation,
  33416. isFlowType,
  33417. isTSType
  33418. } = _t;
  33419. function createUnionType(types3) {
  33420. {
  33421. if (isFlowType(types3[0])) {
  33422. if (createFlowUnionType) {
  33423. return createFlowUnionType(types3);
  33424. }
  33425. return createUnionTypeAnnotation(types3);
  33426. } else {
  33427. if (createTSUnionType) {
  33428. return createTSUnionType(types3);
  33429. }
  33430. }
  33431. }
  33432. }
  33433. }
  33434. });
  33435. // node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
  33436. var require_inferer_reference = __commonJS({
  33437. "node_modules/@babel/traverse/lib/path/inference/inferer-reference.js"(exports) {
  33438. "use strict";
  33439. Object.defineProperty(exports, "__esModule", {
  33440. value: true
  33441. });
  33442. exports.default = _default;
  33443. var _t = require_lib3();
  33444. var _util = require_util();
  33445. var {
  33446. BOOLEAN_NUMBER_BINARY_OPERATORS,
  33447. createTypeAnnotationBasedOnTypeof,
  33448. numberTypeAnnotation,
  33449. voidTypeAnnotation
  33450. } = _t;
  33451. function _default(node2) {
  33452. if (!this.isReferenced())
  33453. return;
  33454. const binding = this.scope.getBinding(node2.name);
  33455. if (binding) {
  33456. if (binding.identifier.typeAnnotation) {
  33457. return binding.identifier.typeAnnotation;
  33458. } else {
  33459. return getTypeAnnotationBindingConstantViolations(binding, this, node2.name);
  33460. }
  33461. }
  33462. if (node2.name === "undefined") {
  33463. return voidTypeAnnotation();
  33464. } else if (node2.name === "NaN" || node2.name === "Infinity") {
  33465. return numberTypeAnnotation();
  33466. } else if (node2.name === "arguments") {
  33467. }
  33468. }
  33469. function getTypeAnnotationBindingConstantViolations(binding, path, name2) {
  33470. const types3 = [];
  33471. const functionConstantViolations = [];
  33472. let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
  33473. const testType = getConditionalAnnotation(binding, path, name2);
  33474. if (testType) {
  33475. const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
  33476. constantViolations = constantViolations.filter((path2) => testConstantViolations.indexOf(path2) < 0);
  33477. types3.push(testType.typeAnnotation);
  33478. }
  33479. if (constantViolations.length) {
  33480. constantViolations.push(...functionConstantViolations);
  33481. for (const violation of constantViolations) {
  33482. types3.push(violation.getTypeAnnotation());
  33483. }
  33484. }
  33485. if (!types3.length) {
  33486. return;
  33487. }
  33488. return (0, _util.createUnionType)(types3);
  33489. }
  33490. function getConstantViolationsBefore(binding, path, functions) {
  33491. const violations = binding.constantViolations.slice();
  33492. violations.unshift(binding.path);
  33493. return violations.filter((violation) => {
  33494. violation = violation.resolve();
  33495. const status = violation._guessExecutionStatusRelativeTo(path);
  33496. if (functions && status === "unknown")
  33497. functions.push(violation);
  33498. return status === "before";
  33499. });
  33500. }
  33501. function inferAnnotationFromBinaryExpression(name2, path) {
  33502. const operator = path.node.operator;
  33503. const right = path.get("right").resolve();
  33504. const left = path.get("left").resolve();
  33505. let target;
  33506. if (left.isIdentifier({
  33507. name: name2
  33508. })) {
  33509. target = right;
  33510. } else if (right.isIdentifier({
  33511. name: name2
  33512. })) {
  33513. target = left;
  33514. }
  33515. if (target) {
  33516. if (operator === "===") {
  33517. return target.getTypeAnnotation();
  33518. }
  33519. if (BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  33520. return numberTypeAnnotation();
  33521. }
  33522. return;
  33523. }
  33524. if (operator !== "===" && operator !== "==")
  33525. return;
  33526. let typeofPath;
  33527. let typePath;
  33528. if (left.isUnaryExpression({
  33529. operator: "typeof"
  33530. })) {
  33531. typeofPath = left;
  33532. typePath = right;
  33533. } else if (right.isUnaryExpression({
  33534. operator: "typeof"
  33535. })) {
  33536. typeofPath = right;
  33537. typePath = left;
  33538. }
  33539. if (!typeofPath)
  33540. return;
  33541. if (!typeofPath.get("argument").isIdentifier({
  33542. name: name2
  33543. }))
  33544. return;
  33545. typePath = typePath.resolve();
  33546. if (!typePath.isLiteral())
  33547. return;
  33548. const typeValue = typePath.node.value;
  33549. if (typeof typeValue !== "string")
  33550. return;
  33551. return createTypeAnnotationBasedOnTypeof(typeValue);
  33552. }
  33553. function getParentConditionalPath(binding, path, name2) {
  33554. let parentPath;
  33555. while (parentPath = path.parentPath) {
  33556. if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
  33557. if (path.key === "test") {
  33558. return;
  33559. }
  33560. return parentPath;
  33561. }
  33562. if (parentPath.isFunction()) {
  33563. if (parentPath.parentPath.scope.getBinding(name2) !== binding)
  33564. return;
  33565. }
  33566. path = parentPath;
  33567. }
  33568. }
  33569. function getConditionalAnnotation(binding, path, name2) {
  33570. const ifStatement = getParentConditionalPath(binding, path, name2);
  33571. if (!ifStatement)
  33572. return;
  33573. const test = ifStatement.get("test");
  33574. const paths = [test];
  33575. const types3 = [];
  33576. for (let i = 0; i < paths.length; i++) {
  33577. const path2 = paths[i];
  33578. if (path2.isLogicalExpression()) {
  33579. if (path2.node.operator === "&&") {
  33580. paths.push(path2.get("left"));
  33581. paths.push(path2.get("right"));
  33582. }
  33583. } else if (path2.isBinaryExpression()) {
  33584. const type = inferAnnotationFromBinaryExpression(name2, path2);
  33585. if (type)
  33586. types3.push(type);
  33587. }
  33588. }
  33589. if (types3.length) {
  33590. return {
  33591. typeAnnotation: (0, _util.createUnionType)(types3),
  33592. ifStatement
  33593. };
  33594. }
  33595. return getConditionalAnnotation(binding, ifStatement, name2);
  33596. }
  33597. }
  33598. });
  33599. // node_modules/@babel/traverse/lib/path/inference/inferers.js
  33600. var require_inferers = __commonJS({
  33601. "node_modules/@babel/traverse/lib/path/inference/inferers.js"(exports) {
  33602. "use strict";
  33603. Object.defineProperty(exports, "__esModule", {
  33604. value: true
  33605. });
  33606. exports.ArrayExpression = ArrayExpression2;
  33607. exports.AssignmentExpression = AssignmentExpression;
  33608. exports.BinaryExpression = BinaryExpression2;
  33609. exports.BooleanLiteral = BooleanLiteral;
  33610. exports.CallExpression = CallExpression;
  33611. exports.ConditionalExpression = ConditionalExpression;
  33612. exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
  33613. Object.defineProperty(exports, "Identifier", {
  33614. enumerable: true,
  33615. get: function() {
  33616. return _infererReference.default;
  33617. }
  33618. });
  33619. exports.LogicalExpression = LogicalExpression;
  33620. exports.NewExpression = NewExpression;
  33621. exports.NullLiteral = NullLiteral;
  33622. exports.NumericLiteral = NumericLiteral;
  33623. exports.ObjectExpression = ObjectExpression;
  33624. exports.ParenthesizedExpression = ParenthesizedExpression;
  33625. exports.RegExpLiteral = RegExpLiteral;
  33626. exports.RestElement = RestElement2;
  33627. exports.SequenceExpression = SequenceExpression;
  33628. exports.StringLiteral = StringLiteral;
  33629. exports.TSAsExpression = TSAsExpression;
  33630. exports.TSNonNullExpression = TSNonNullExpression;
  33631. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  33632. exports.TemplateLiteral = TemplateLiteral;
  33633. exports.TypeCastExpression = TypeCastExpression;
  33634. exports.UnaryExpression = UnaryExpression;
  33635. exports.UpdateExpression = UpdateExpression;
  33636. exports.VariableDeclarator = VariableDeclarator;
  33637. var _t = require_lib3();
  33638. var _infererReference = require_inferer_reference();
  33639. var _util = require_util();
  33640. var {
  33641. BOOLEAN_BINARY_OPERATORS,
  33642. BOOLEAN_UNARY_OPERATORS,
  33643. NUMBER_BINARY_OPERATORS,
  33644. NUMBER_UNARY_OPERATORS,
  33645. STRING_UNARY_OPERATORS,
  33646. anyTypeAnnotation,
  33647. arrayTypeAnnotation,
  33648. booleanTypeAnnotation,
  33649. buildMatchMemberExpression,
  33650. genericTypeAnnotation,
  33651. identifier,
  33652. nullLiteralTypeAnnotation,
  33653. numberTypeAnnotation,
  33654. stringTypeAnnotation,
  33655. tupleTypeAnnotation,
  33656. unionTypeAnnotation,
  33657. voidTypeAnnotation,
  33658. isIdentifier: isIdentifier3
  33659. } = _t;
  33660. function VariableDeclarator() {
  33661. if (!this.get("id").isIdentifier())
  33662. return;
  33663. return this.get("init").getTypeAnnotation();
  33664. }
  33665. function TypeCastExpression(node2) {
  33666. return node2.typeAnnotation;
  33667. }
  33668. TypeCastExpression.validParent = true;
  33669. function TSAsExpression(node2) {
  33670. return node2.typeAnnotation;
  33671. }
  33672. TSAsExpression.validParent = true;
  33673. function TSNonNullExpression() {
  33674. return this.get("expression").getTypeAnnotation();
  33675. }
  33676. function NewExpression(node2) {
  33677. if (node2.callee.type === "Identifier") {
  33678. return genericTypeAnnotation(node2.callee);
  33679. }
  33680. }
  33681. function TemplateLiteral() {
  33682. return stringTypeAnnotation();
  33683. }
  33684. function UnaryExpression(node2) {
  33685. const operator = node2.operator;
  33686. if (operator === "void") {
  33687. return voidTypeAnnotation();
  33688. } else if (NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
  33689. return numberTypeAnnotation();
  33690. } else if (STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
  33691. return stringTypeAnnotation();
  33692. } else if (BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
  33693. return booleanTypeAnnotation();
  33694. }
  33695. }
  33696. function BinaryExpression2(node2) {
  33697. const operator = node2.operator;
  33698. if (NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  33699. return numberTypeAnnotation();
  33700. } else if (BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
  33701. return booleanTypeAnnotation();
  33702. } else if (operator === "+") {
  33703. const right = this.get("right");
  33704. const left = this.get("left");
  33705. if (left.isBaseType("number") && right.isBaseType("number")) {
  33706. return numberTypeAnnotation();
  33707. } else if (left.isBaseType("string") || right.isBaseType("string")) {
  33708. return stringTypeAnnotation();
  33709. }
  33710. return unionTypeAnnotation([stringTypeAnnotation(), numberTypeAnnotation()]);
  33711. }
  33712. }
  33713. function LogicalExpression() {
  33714. const argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
  33715. return (0, _util.createUnionType)(argumentTypes);
  33716. }
  33717. function ConditionalExpression() {
  33718. const argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
  33719. return (0, _util.createUnionType)(argumentTypes);
  33720. }
  33721. function SequenceExpression() {
  33722. return this.get("expressions").pop().getTypeAnnotation();
  33723. }
  33724. function ParenthesizedExpression() {
  33725. return this.get("expression").getTypeAnnotation();
  33726. }
  33727. function AssignmentExpression() {
  33728. return this.get("right").getTypeAnnotation();
  33729. }
  33730. function UpdateExpression(node2) {
  33731. const operator = node2.operator;
  33732. if (operator === "++" || operator === "--") {
  33733. return numberTypeAnnotation();
  33734. }
  33735. }
  33736. function StringLiteral() {
  33737. return stringTypeAnnotation();
  33738. }
  33739. function NumericLiteral() {
  33740. return numberTypeAnnotation();
  33741. }
  33742. function BooleanLiteral() {
  33743. return booleanTypeAnnotation();
  33744. }
  33745. function NullLiteral() {
  33746. return nullLiteralTypeAnnotation();
  33747. }
  33748. function RegExpLiteral() {
  33749. return genericTypeAnnotation(identifier("RegExp"));
  33750. }
  33751. function ObjectExpression() {
  33752. return genericTypeAnnotation(identifier("Object"));
  33753. }
  33754. function ArrayExpression2() {
  33755. return genericTypeAnnotation(identifier("Array"));
  33756. }
  33757. function RestElement2() {
  33758. return ArrayExpression2();
  33759. }
  33760. RestElement2.validParent = true;
  33761. function Func() {
  33762. return genericTypeAnnotation(identifier("Function"));
  33763. }
  33764. var isArrayFrom = buildMatchMemberExpression("Array.from");
  33765. var isObjectKeys = buildMatchMemberExpression("Object.keys");
  33766. var isObjectValues = buildMatchMemberExpression("Object.values");
  33767. var isObjectEntries = buildMatchMemberExpression("Object.entries");
  33768. function CallExpression() {
  33769. const {
  33770. callee
  33771. } = this.node;
  33772. if (isObjectKeys(callee)) {
  33773. return arrayTypeAnnotation(stringTypeAnnotation());
  33774. } else if (isArrayFrom(callee) || isObjectValues(callee) || isIdentifier3(callee, {
  33775. name: "Array"
  33776. })) {
  33777. return arrayTypeAnnotation(anyTypeAnnotation());
  33778. } else if (isObjectEntries(callee)) {
  33779. return arrayTypeAnnotation(tupleTypeAnnotation([stringTypeAnnotation(), anyTypeAnnotation()]));
  33780. }
  33781. return resolveCall(this.get("callee"));
  33782. }
  33783. function TaggedTemplateExpression() {
  33784. return resolveCall(this.get("tag"));
  33785. }
  33786. function resolveCall(callee) {
  33787. callee = callee.resolve();
  33788. if (callee.isFunction()) {
  33789. const {
  33790. node: node2
  33791. } = callee;
  33792. if (node2.async) {
  33793. if (node2.generator) {
  33794. return genericTypeAnnotation(identifier("AsyncIterator"));
  33795. } else {
  33796. return genericTypeAnnotation(identifier("Promise"));
  33797. }
  33798. } else {
  33799. if (node2.generator) {
  33800. return genericTypeAnnotation(identifier("Iterator"));
  33801. } else if (callee.node.returnType) {
  33802. return callee.node.returnType;
  33803. } else {
  33804. }
  33805. }
  33806. }
  33807. }
  33808. }
  33809. });
  33810. // node_modules/@babel/traverse/lib/path/inference/index.js
  33811. var require_inference = __commonJS({
  33812. "node_modules/@babel/traverse/lib/path/inference/index.js"(exports) {
  33813. "use strict";
  33814. Object.defineProperty(exports, "__esModule", {
  33815. value: true
  33816. });
  33817. exports._getTypeAnnotation = _getTypeAnnotation;
  33818. exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
  33819. exports.couldBeBaseType = couldBeBaseType;
  33820. exports.getTypeAnnotation = getTypeAnnotation;
  33821. exports.isBaseType = isBaseType;
  33822. exports.isGenericType = isGenericType;
  33823. var inferers = require_inferers();
  33824. var _t = require_lib3();
  33825. var {
  33826. anyTypeAnnotation,
  33827. isAnyTypeAnnotation,
  33828. isArrayTypeAnnotation,
  33829. isBooleanTypeAnnotation,
  33830. isEmptyTypeAnnotation,
  33831. isFlowBaseAnnotation,
  33832. isGenericTypeAnnotation,
  33833. isIdentifier: isIdentifier3,
  33834. isMixedTypeAnnotation,
  33835. isNumberTypeAnnotation,
  33836. isStringTypeAnnotation,
  33837. isTSArrayType,
  33838. isTSTypeAnnotation,
  33839. isTSTypeReference,
  33840. isTupleTypeAnnotation,
  33841. isTypeAnnotation,
  33842. isUnionTypeAnnotation,
  33843. isVoidTypeAnnotation,
  33844. stringTypeAnnotation,
  33845. voidTypeAnnotation
  33846. } = _t;
  33847. function getTypeAnnotation() {
  33848. let type = this.getData("typeAnnotation");
  33849. if (type != null) {
  33850. return type;
  33851. }
  33852. type = this._getTypeAnnotation() || anyTypeAnnotation();
  33853. if (isTypeAnnotation(type) || isTSTypeAnnotation(type)) {
  33854. type = type.typeAnnotation;
  33855. }
  33856. this.setData("typeAnnotation", type);
  33857. return type;
  33858. }
  33859. var typeAnnotationInferringNodes = /* @__PURE__ */ new WeakSet();
  33860. function _getTypeAnnotation() {
  33861. const node2 = this.node;
  33862. if (!node2) {
  33863. if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
  33864. const declar = this.parentPath.parentPath;
  33865. const declarParent = declar.parentPath;
  33866. if (declar.key === "left" && declarParent.isForInStatement()) {
  33867. return stringTypeAnnotation();
  33868. }
  33869. if (declar.key === "left" && declarParent.isForOfStatement()) {
  33870. return anyTypeAnnotation();
  33871. }
  33872. return voidTypeAnnotation();
  33873. } else {
  33874. return;
  33875. }
  33876. }
  33877. if (node2.typeAnnotation) {
  33878. return node2.typeAnnotation;
  33879. }
  33880. if (typeAnnotationInferringNodes.has(node2)) {
  33881. return;
  33882. }
  33883. typeAnnotationInferringNodes.add(node2);
  33884. try {
  33885. var _inferer;
  33886. let inferer = inferers[node2.type];
  33887. if (inferer) {
  33888. return inferer.call(this, node2);
  33889. }
  33890. inferer = inferers[this.parentPath.type];
  33891. if ((_inferer = inferer) != null && _inferer.validParent) {
  33892. return this.parentPath.getTypeAnnotation();
  33893. }
  33894. } finally {
  33895. typeAnnotationInferringNodes.delete(node2);
  33896. }
  33897. }
  33898. function isBaseType(baseName, soft) {
  33899. return _isBaseType(baseName, this.getTypeAnnotation(), soft);
  33900. }
  33901. function _isBaseType(baseName, type, soft) {
  33902. if (baseName === "string") {
  33903. return isStringTypeAnnotation(type);
  33904. } else if (baseName === "number") {
  33905. return isNumberTypeAnnotation(type);
  33906. } else if (baseName === "boolean") {
  33907. return isBooleanTypeAnnotation(type);
  33908. } else if (baseName === "any") {
  33909. return isAnyTypeAnnotation(type);
  33910. } else if (baseName === "mixed") {
  33911. return isMixedTypeAnnotation(type);
  33912. } else if (baseName === "empty") {
  33913. return isEmptyTypeAnnotation(type);
  33914. } else if (baseName === "void") {
  33915. return isVoidTypeAnnotation(type);
  33916. } else {
  33917. if (soft) {
  33918. return false;
  33919. } else {
  33920. throw new Error(`Unknown base type ${baseName}`);
  33921. }
  33922. }
  33923. }
  33924. function couldBeBaseType(name2) {
  33925. const type = this.getTypeAnnotation();
  33926. if (isAnyTypeAnnotation(type))
  33927. return true;
  33928. if (isUnionTypeAnnotation(type)) {
  33929. for (const type2 of type.types) {
  33930. if (isAnyTypeAnnotation(type2) || _isBaseType(name2, type2, true)) {
  33931. return true;
  33932. }
  33933. }
  33934. return false;
  33935. } else {
  33936. return _isBaseType(name2, type, true);
  33937. }
  33938. }
  33939. function baseTypeStrictlyMatches(rightArg) {
  33940. const left = this.getTypeAnnotation();
  33941. const right = rightArg.getTypeAnnotation();
  33942. if (!isAnyTypeAnnotation(left) && isFlowBaseAnnotation(left)) {
  33943. return right.type === left.type;
  33944. }
  33945. return false;
  33946. }
  33947. function isGenericType(genericName) {
  33948. const type = this.getTypeAnnotation();
  33949. if (genericName === "Array") {
  33950. if (isTSArrayType(type) || isArrayTypeAnnotation(type) || isTupleTypeAnnotation(type)) {
  33951. return true;
  33952. }
  33953. }
  33954. return isGenericTypeAnnotation(type) && isIdentifier3(type.id, {
  33955. name: genericName
  33956. }) || isTSTypeReference(type) && isIdentifier3(type.typeName, {
  33957. name: genericName
  33958. });
  33959. }
  33960. }
  33961. });
  33962. // node_modules/js-tokens/index.js
  33963. var require_js_tokens = __commonJS({
  33964. "node_modules/js-tokens/index.js"(exports) {
  33965. Object.defineProperty(exports, "__esModule", {
  33966. value: true
  33967. });
  33968. exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
  33969. exports.matchToToken = function(match) {
  33970. var token2 = { type: "invalid", value: match[0], closed: void 0 };
  33971. if (match[1])
  33972. token2.type = "string", token2.closed = !!(match[3] || match[4]);
  33973. else if (match[5])
  33974. token2.type = "comment";
  33975. else if (match[6])
  33976. token2.type = "comment", token2.closed = !!match[7];
  33977. else if (match[8])
  33978. token2.type = "regex";
  33979. else if (match[9])
  33980. token2.type = "number";
  33981. else if (match[10])
  33982. token2.type = "name";
  33983. else if (match[11])
  33984. token2.type = "punctuator";
  33985. else if (match[12])
  33986. token2.type = "whitespace";
  33987. return token2;
  33988. };
  33989. }
  33990. });
  33991. // node_modules/escape-string-regexp/index.js
  33992. var require_escape_string_regexp = __commonJS({
  33993. "node_modules/escape-string-regexp/index.js"(exports, module) {
  33994. "use strict";
  33995. var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
  33996. module.exports = function(str) {
  33997. if (typeof str !== "string") {
  33998. throw new TypeError("Expected a string");
  33999. }
  34000. return str.replace(matchOperatorsRe, "\\$&");
  34001. };
  34002. }
  34003. });
  34004. // node_modules/@babel/highlight/node_modules/color-name/index.js
  34005. var require_color_name = __commonJS({
  34006. "node_modules/@babel/highlight/node_modules/color-name/index.js"(exports, module) {
  34007. "use strict";
  34008. module.exports = {
  34009. "aliceblue": [240, 248, 255],
  34010. "antiquewhite": [250, 235, 215],
  34011. "aqua": [0, 255, 255],
  34012. "aquamarine": [127, 255, 212],
  34013. "azure": [240, 255, 255],
  34014. "beige": [245, 245, 220],
  34015. "bisque": [255, 228, 196],
  34016. "black": [0, 0, 0],
  34017. "blanchedalmond": [255, 235, 205],
  34018. "blue": [0, 0, 255],
  34019. "blueviolet": [138, 43, 226],
  34020. "brown": [165, 42, 42],
  34021. "burlywood": [222, 184, 135],
  34022. "cadetblue": [95, 158, 160],
  34023. "chartreuse": [127, 255, 0],
  34024. "chocolate": [210, 105, 30],
  34025. "coral": [255, 127, 80],
  34026. "cornflowerblue": [100, 149, 237],
  34027. "cornsilk": [255, 248, 220],
  34028. "crimson": [220, 20, 60],
  34029. "cyan": [0, 255, 255],
  34030. "darkblue": [0, 0, 139],
  34031. "darkcyan": [0, 139, 139],
  34032. "darkgoldenrod": [184, 134, 11],
  34033. "darkgray": [169, 169, 169],
  34034. "darkgreen": [0, 100, 0],
  34035. "darkgrey": [169, 169, 169],
  34036. "darkkhaki": [189, 183, 107],
  34037. "darkmagenta": [139, 0, 139],
  34038. "darkolivegreen": [85, 107, 47],
  34039. "darkorange": [255, 140, 0],
  34040. "darkorchid": [153, 50, 204],
  34041. "darkred": [139, 0, 0],
  34042. "darksalmon": [233, 150, 122],
  34043. "darkseagreen": [143, 188, 143],
  34044. "darkslateblue": [72, 61, 139],
  34045. "darkslategray": [47, 79, 79],
  34046. "darkslategrey": [47, 79, 79],
  34047. "darkturquoise": [0, 206, 209],
  34048. "darkviolet": [148, 0, 211],
  34049. "deeppink": [255, 20, 147],
  34050. "deepskyblue": [0, 191, 255],
  34051. "dimgray": [105, 105, 105],
  34052. "dimgrey": [105, 105, 105],
  34053. "dodgerblue": [30, 144, 255],
  34054. "firebrick": [178, 34, 34],
  34055. "floralwhite": [255, 250, 240],
  34056. "forestgreen": [34, 139, 34],
  34057. "fuchsia": [255, 0, 255],
  34058. "gainsboro": [220, 220, 220],
  34059. "ghostwhite": [248, 248, 255],
  34060. "gold": [255, 215, 0],
  34061. "goldenrod": [218, 165, 32],
  34062. "gray": [128, 128, 128],
  34063. "green": [0, 128, 0],
  34064. "greenyellow": [173, 255, 47],
  34065. "grey": [128, 128, 128],
  34066. "honeydew": [240, 255, 240],
  34067. "hotpink": [255, 105, 180],
  34068. "indianred": [205, 92, 92],
  34069. "indigo": [75, 0, 130],
  34070. "ivory": [255, 255, 240],
  34071. "khaki": [240, 230, 140],
  34072. "lavender": [230, 230, 250],
  34073. "lavenderblush": [255, 240, 245],
  34074. "lawngreen": [124, 252, 0],
  34075. "lemonchiffon": [255, 250, 205],
  34076. "lightblue": [173, 216, 230],
  34077. "lightcoral": [240, 128, 128],
  34078. "lightcyan": [224, 255, 255],
  34079. "lightgoldenrodyellow": [250, 250, 210],
  34080. "lightgray": [211, 211, 211],
  34081. "lightgreen": [144, 238, 144],
  34082. "lightgrey": [211, 211, 211],
  34083. "lightpink": [255, 182, 193],
  34084. "lightsalmon": [255, 160, 122],
  34085. "lightseagreen": [32, 178, 170],
  34086. "lightskyblue": [135, 206, 250],
  34087. "lightslategray": [119, 136, 153],
  34088. "lightslategrey": [119, 136, 153],
  34089. "lightsteelblue": [176, 196, 222],
  34090. "lightyellow": [255, 255, 224],
  34091. "lime": [0, 255, 0],
  34092. "limegreen": [50, 205, 50],
  34093. "linen": [250, 240, 230],
  34094. "magenta": [255, 0, 255],
  34095. "maroon": [128, 0, 0],
  34096. "mediumaquamarine": [102, 205, 170],
  34097. "mediumblue": [0, 0, 205],
  34098. "mediumorchid": [186, 85, 211],
  34099. "mediumpurple": [147, 112, 219],
  34100. "mediumseagreen": [60, 179, 113],
  34101. "mediumslateblue": [123, 104, 238],
  34102. "mediumspringgreen": [0, 250, 154],
  34103. "mediumturquoise": [72, 209, 204],
  34104. "mediumvioletred": [199, 21, 133],
  34105. "midnightblue": [25, 25, 112],
  34106. "mintcream": [245, 255, 250],
  34107. "mistyrose": [255, 228, 225],
  34108. "moccasin": [255, 228, 181],
  34109. "navajowhite": [255, 222, 173],
  34110. "navy": [0, 0, 128],
  34111. "oldlace": [253, 245, 230],
  34112. "olive": [128, 128, 0],
  34113. "olivedrab": [107, 142, 35],
  34114. "orange": [255, 165, 0],
  34115. "orangered": [255, 69, 0],
  34116. "orchid": [218, 112, 214],
  34117. "palegoldenrod": [238, 232, 170],
  34118. "palegreen": [152, 251, 152],
  34119. "paleturquoise": [175, 238, 238],
  34120. "palevioletred": [219, 112, 147],
  34121. "papayawhip": [255, 239, 213],
  34122. "peachpuff": [255, 218, 185],
  34123. "peru": [205, 133, 63],
  34124. "pink": [255, 192, 203],
  34125. "plum": [221, 160, 221],
  34126. "powderblue": [176, 224, 230],
  34127. "purple": [128, 0, 128],
  34128. "rebeccapurple": [102, 51, 153],
  34129. "red": [255, 0, 0],
  34130. "rosybrown": [188, 143, 143],
  34131. "royalblue": [65, 105, 225],
  34132. "saddlebrown": [139, 69, 19],
  34133. "salmon": [250, 128, 114],
  34134. "sandybrown": [244, 164, 96],
  34135. "seagreen": [46, 139, 87],
  34136. "seashell": [255, 245, 238],
  34137. "sienna": [160, 82, 45],
  34138. "silver": [192, 192, 192],
  34139. "skyblue": [135, 206, 235],
  34140. "slateblue": [106, 90, 205],
  34141. "slategray": [112, 128, 144],
  34142. "slategrey": [112, 128, 144],
  34143. "snow": [255, 250, 250],
  34144. "springgreen": [0, 255, 127],
  34145. "steelblue": [70, 130, 180],
  34146. "tan": [210, 180, 140],
  34147. "teal": [0, 128, 128],
  34148. "thistle": [216, 191, 216],
  34149. "tomato": [255, 99, 71],
  34150. "turquoise": [64, 224, 208],
  34151. "violet": [238, 130, 238],
  34152. "wheat": [245, 222, 179],
  34153. "white": [255, 255, 255],
  34154. "whitesmoke": [245, 245, 245],
  34155. "yellow": [255, 255, 0],
  34156. "yellowgreen": [154, 205, 50]
  34157. };
  34158. }
  34159. });
  34160. // node_modules/@babel/highlight/node_modules/color-convert/conversions.js
  34161. var require_conversions = __commonJS({
  34162. "node_modules/@babel/highlight/node_modules/color-convert/conversions.js"(exports, module) {
  34163. var cssKeywords = require_color_name();
  34164. var reverseKeywords = {};
  34165. for (key2 in cssKeywords) {
  34166. if (cssKeywords.hasOwnProperty(key2)) {
  34167. reverseKeywords[cssKeywords[key2]] = key2;
  34168. }
  34169. }
  34170. var key2;
  34171. var convert2 = module.exports = {
  34172. rgb: { channels: 3, labels: "rgb" },
  34173. hsl: { channels: 3, labels: "hsl" },
  34174. hsv: { channels: 3, labels: "hsv" },
  34175. hwb: { channels: 3, labels: "hwb" },
  34176. cmyk: { channels: 4, labels: "cmyk" },
  34177. xyz: { channels: 3, labels: "xyz" },
  34178. lab: { channels: 3, labels: "lab" },
  34179. lch: { channels: 3, labels: "lch" },
  34180. hex: { channels: 1, labels: ["hex"] },
  34181. keyword: { channels: 1, labels: ["keyword"] },
  34182. ansi16: { channels: 1, labels: ["ansi16"] },
  34183. ansi256: { channels: 1, labels: ["ansi256"] },
  34184. hcg: { channels: 3, labels: ["h", "c", "g"] },
  34185. apple: { channels: 3, labels: ["r16", "g16", "b16"] },
  34186. gray: { channels: 1, labels: ["gray"] }
  34187. };
  34188. for (model in convert2) {
  34189. if (convert2.hasOwnProperty(model)) {
  34190. if (!("channels" in convert2[model])) {
  34191. throw new Error("missing channels property: " + model);
  34192. }
  34193. if (!("labels" in convert2[model])) {
  34194. throw new Error("missing channel labels property: " + model);
  34195. }
  34196. if (convert2[model].labels.length !== convert2[model].channels) {
  34197. throw new Error("channel and label counts mismatch: " + model);
  34198. }
  34199. channels = convert2[model].channels;
  34200. labels = convert2[model].labels;
  34201. delete convert2[model].channels;
  34202. delete convert2[model].labels;
  34203. Object.defineProperty(convert2[model], "channels", { value: channels });
  34204. Object.defineProperty(convert2[model], "labels", { value: labels });
  34205. }
  34206. }
  34207. var channels;
  34208. var labels;
  34209. var model;
  34210. convert2.rgb.hsl = function(rgb) {
  34211. var r = rgb[0] / 255;
  34212. var g = rgb[1] / 255;
  34213. var b = rgb[2] / 255;
  34214. var min = Math.min(r, g, b);
  34215. var max = Math.max(r, g, b);
  34216. var delta = max - min;
  34217. var h;
  34218. var s;
  34219. var l;
  34220. if (max === min) {
  34221. h = 0;
  34222. } else if (r === max) {
  34223. h = (g - b) / delta;
  34224. } else if (g === max) {
  34225. h = 2 + (b - r) / delta;
  34226. } else if (b === max) {
  34227. h = 4 + (r - g) / delta;
  34228. }
  34229. h = Math.min(h * 60, 360);
  34230. if (h < 0) {
  34231. h += 360;
  34232. }
  34233. l = (min + max) / 2;
  34234. if (max === min) {
  34235. s = 0;
  34236. } else if (l <= 0.5) {
  34237. s = delta / (max + min);
  34238. } else {
  34239. s = delta / (2 - max - min);
  34240. }
  34241. return [h, s * 100, l * 100];
  34242. };
  34243. convert2.rgb.hsv = function(rgb) {
  34244. var rdif;
  34245. var gdif;
  34246. var bdif;
  34247. var h;
  34248. var s;
  34249. var r = rgb[0] / 255;
  34250. var g = rgb[1] / 255;
  34251. var b = rgb[2] / 255;
  34252. var v = Math.max(r, g, b);
  34253. var diff = v - Math.min(r, g, b);
  34254. var diffc = function(c2) {
  34255. return (v - c2) / 6 / diff + 1 / 2;
  34256. };
  34257. if (diff === 0) {
  34258. h = s = 0;
  34259. } else {
  34260. s = diff / v;
  34261. rdif = diffc(r);
  34262. gdif = diffc(g);
  34263. bdif = diffc(b);
  34264. if (r === v) {
  34265. h = bdif - gdif;
  34266. } else if (g === v) {
  34267. h = 1 / 3 + rdif - bdif;
  34268. } else if (b === v) {
  34269. h = 2 / 3 + gdif - rdif;
  34270. }
  34271. if (h < 0) {
  34272. h += 1;
  34273. } else if (h > 1) {
  34274. h -= 1;
  34275. }
  34276. }
  34277. return [
  34278. h * 360,
  34279. s * 100,
  34280. v * 100
  34281. ];
  34282. };
  34283. convert2.rgb.hwb = function(rgb) {
  34284. var r = rgb[0];
  34285. var g = rgb[1];
  34286. var b = rgb[2];
  34287. var h = convert2.rgb.hsl(rgb)[0];
  34288. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  34289. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  34290. return [h, w * 100, b * 100];
  34291. };
  34292. convert2.rgb.cmyk = function(rgb) {
  34293. var r = rgb[0] / 255;
  34294. var g = rgb[1] / 255;
  34295. var b = rgb[2] / 255;
  34296. var c2;
  34297. var m;
  34298. var y;
  34299. var k;
  34300. k = Math.min(1 - r, 1 - g, 1 - b);
  34301. c2 = (1 - r - k) / (1 - k) || 0;
  34302. m = (1 - g - k) / (1 - k) || 0;
  34303. y = (1 - b - k) / (1 - k) || 0;
  34304. return [c2 * 100, m * 100, y * 100, k * 100];
  34305. };
  34306. function comparativeDistance(x, y) {
  34307. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  34308. }
  34309. convert2.rgb.keyword = function(rgb) {
  34310. var reversed = reverseKeywords[rgb];
  34311. if (reversed) {
  34312. return reversed;
  34313. }
  34314. var currentClosestDistance = Infinity;
  34315. var currentClosestKeyword;
  34316. for (var keyword in cssKeywords) {
  34317. if (cssKeywords.hasOwnProperty(keyword)) {
  34318. var value2 = cssKeywords[keyword];
  34319. var distance = comparativeDistance(rgb, value2);
  34320. if (distance < currentClosestDistance) {
  34321. currentClosestDistance = distance;
  34322. currentClosestKeyword = keyword;
  34323. }
  34324. }
  34325. }
  34326. return currentClosestKeyword;
  34327. };
  34328. convert2.keyword.rgb = function(keyword) {
  34329. return cssKeywords[keyword];
  34330. };
  34331. convert2.rgb.xyz = function(rgb) {
  34332. var r = rgb[0] / 255;
  34333. var g = rgb[1] / 255;
  34334. var b = rgb[2] / 255;
  34335. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  34336. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  34337. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  34338. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  34339. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  34340. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  34341. return [x * 100, y * 100, z * 100];
  34342. };
  34343. convert2.rgb.lab = function(rgb) {
  34344. var xyz = convert2.rgb.xyz(rgb);
  34345. var x = xyz[0];
  34346. var y = xyz[1];
  34347. var z = xyz[2];
  34348. var l;
  34349. var a;
  34350. var b;
  34351. x /= 95.047;
  34352. y /= 100;
  34353. z /= 108.883;
  34354. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  34355. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  34356. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  34357. l = 116 * y - 16;
  34358. a = 500 * (x - y);
  34359. b = 200 * (y - z);
  34360. return [l, a, b];
  34361. };
  34362. convert2.hsl.rgb = function(hsl) {
  34363. var h = hsl[0] / 360;
  34364. var s = hsl[1] / 100;
  34365. var l = hsl[2] / 100;
  34366. var t1;
  34367. var t22;
  34368. var t3;
  34369. var rgb;
  34370. var val;
  34371. if (s === 0) {
  34372. val = l * 255;
  34373. return [val, val, val];
  34374. }
  34375. if (l < 0.5) {
  34376. t22 = l * (1 + s);
  34377. } else {
  34378. t22 = l + s - l * s;
  34379. }
  34380. t1 = 2 * l - t22;
  34381. rgb = [0, 0, 0];
  34382. for (var i = 0; i < 3; i++) {
  34383. t3 = h + 1 / 3 * -(i - 1);
  34384. if (t3 < 0) {
  34385. t3++;
  34386. }
  34387. if (t3 > 1) {
  34388. t3--;
  34389. }
  34390. if (6 * t3 < 1) {
  34391. val = t1 + (t22 - t1) * 6 * t3;
  34392. } else if (2 * t3 < 1) {
  34393. val = t22;
  34394. } else if (3 * t3 < 2) {
  34395. val = t1 + (t22 - t1) * (2 / 3 - t3) * 6;
  34396. } else {
  34397. val = t1;
  34398. }
  34399. rgb[i] = val * 255;
  34400. }
  34401. return rgb;
  34402. };
  34403. convert2.hsl.hsv = function(hsl) {
  34404. var h = hsl[0];
  34405. var s = hsl[1] / 100;
  34406. var l = hsl[2] / 100;
  34407. var smin = s;
  34408. var lmin = Math.max(l, 0.01);
  34409. var sv;
  34410. var v;
  34411. l *= 2;
  34412. s *= l <= 1 ? l : 2 - l;
  34413. smin *= lmin <= 1 ? lmin : 2 - lmin;
  34414. v = (l + s) / 2;
  34415. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  34416. return [h, sv * 100, v * 100];
  34417. };
  34418. convert2.hsv.rgb = function(hsv) {
  34419. var h = hsv[0] / 60;
  34420. var s = hsv[1] / 100;
  34421. var v = hsv[2] / 100;
  34422. var hi = Math.floor(h) % 6;
  34423. var f = h - Math.floor(h);
  34424. var p = 255 * v * (1 - s);
  34425. var q = 255 * v * (1 - s * f);
  34426. var t3 = 255 * v * (1 - s * (1 - f));
  34427. v *= 255;
  34428. switch (hi) {
  34429. case 0:
  34430. return [v, t3, p];
  34431. case 1:
  34432. return [q, v, p];
  34433. case 2:
  34434. return [p, v, t3];
  34435. case 3:
  34436. return [p, q, v];
  34437. case 4:
  34438. return [t3, p, v];
  34439. case 5:
  34440. return [v, p, q];
  34441. }
  34442. };
  34443. convert2.hsv.hsl = function(hsv) {
  34444. var h = hsv[0];
  34445. var s = hsv[1] / 100;
  34446. var v = hsv[2] / 100;
  34447. var vmin = Math.max(v, 0.01);
  34448. var lmin;
  34449. var sl;
  34450. var l;
  34451. l = (2 - s) * v;
  34452. lmin = (2 - s) * vmin;
  34453. sl = s * vmin;
  34454. sl /= lmin <= 1 ? lmin : 2 - lmin;
  34455. sl = sl || 0;
  34456. l /= 2;
  34457. return [h, sl * 100, l * 100];
  34458. };
  34459. convert2.hwb.rgb = function(hwb) {
  34460. var h = hwb[0] / 360;
  34461. var wh = hwb[1] / 100;
  34462. var bl = hwb[2] / 100;
  34463. var ratio = wh + bl;
  34464. var i;
  34465. var v;
  34466. var f;
  34467. var n;
  34468. if (ratio > 1) {
  34469. wh /= ratio;
  34470. bl /= ratio;
  34471. }
  34472. i = Math.floor(6 * h);
  34473. v = 1 - bl;
  34474. f = 6 * h - i;
  34475. if ((i & 1) !== 0) {
  34476. f = 1 - f;
  34477. }
  34478. n = wh + f * (v - wh);
  34479. var r;
  34480. var g;
  34481. var b;
  34482. switch (i) {
  34483. default:
  34484. case 6:
  34485. case 0:
  34486. r = v;
  34487. g = n;
  34488. b = wh;
  34489. break;
  34490. case 1:
  34491. r = n;
  34492. g = v;
  34493. b = wh;
  34494. break;
  34495. case 2:
  34496. r = wh;
  34497. g = v;
  34498. b = n;
  34499. break;
  34500. case 3:
  34501. r = wh;
  34502. g = n;
  34503. b = v;
  34504. break;
  34505. case 4:
  34506. r = n;
  34507. g = wh;
  34508. b = v;
  34509. break;
  34510. case 5:
  34511. r = v;
  34512. g = wh;
  34513. b = n;
  34514. break;
  34515. }
  34516. return [r * 255, g * 255, b * 255];
  34517. };
  34518. convert2.cmyk.rgb = function(cmyk) {
  34519. var c2 = cmyk[0] / 100;
  34520. var m = cmyk[1] / 100;
  34521. var y = cmyk[2] / 100;
  34522. var k = cmyk[3] / 100;
  34523. var r;
  34524. var g;
  34525. var b;
  34526. r = 1 - Math.min(1, c2 * (1 - k) + k);
  34527. g = 1 - Math.min(1, m * (1 - k) + k);
  34528. b = 1 - Math.min(1, y * (1 - k) + k);
  34529. return [r * 255, g * 255, b * 255];
  34530. };
  34531. convert2.xyz.rgb = function(xyz) {
  34532. var x = xyz[0] / 100;
  34533. var y = xyz[1] / 100;
  34534. var z = xyz[2] / 100;
  34535. var r;
  34536. var g;
  34537. var b;
  34538. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  34539. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  34540. b = x * 0.0557 + y * -0.204 + z * 1.057;
  34541. r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
  34542. g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
  34543. b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
  34544. r = Math.min(Math.max(0, r), 1);
  34545. g = Math.min(Math.max(0, g), 1);
  34546. b = Math.min(Math.max(0, b), 1);
  34547. return [r * 255, g * 255, b * 255];
  34548. };
  34549. convert2.xyz.lab = function(xyz) {
  34550. var x = xyz[0];
  34551. var y = xyz[1];
  34552. var z = xyz[2];
  34553. var l;
  34554. var a;
  34555. var b;
  34556. x /= 95.047;
  34557. y /= 100;
  34558. z /= 108.883;
  34559. x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  34560. y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  34561. z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  34562. l = 116 * y - 16;
  34563. a = 500 * (x - y);
  34564. b = 200 * (y - z);
  34565. return [l, a, b];
  34566. };
  34567. convert2.lab.xyz = function(lab) {
  34568. var l = lab[0];
  34569. var a = lab[1];
  34570. var b = lab[2];
  34571. var x;
  34572. var y;
  34573. var z;
  34574. y = (l + 16) / 116;
  34575. x = a / 500 + y;
  34576. z = y - b / 200;
  34577. var y2 = Math.pow(y, 3);
  34578. var x2 = Math.pow(x, 3);
  34579. var z2 = Math.pow(z, 3);
  34580. y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
  34581. x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
  34582. z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
  34583. x *= 95.047;
  34584. y *= 100;
  34585. z *= 108.883;
  34586. return [x, y, z];
  34587. };
  34588. convert2.lab.lch = function(lab) {
  34589. var l = lab[0];
  34590. var a = lab[1];
  34591. var b = lab[2];
  34592. var hr;
  34593. var h;
  34594. var c2;
  34595. hr = Math.atan2(b, a);
  34596. h = hr * 360 / 2 / Math.PI;
  34597. if (h < 0) {
  34598. h += 360;
  34599. }
  34600. c2 = Math.sqrt(a * a + b * b);
  34601. return [l, c2, h];
  34602. };
  34603. convert2.lch.lab = function(lch) {
  34604. var l = lch[0];
  34605. var c2 = lch[1];
  34606. var h = lch[2];
  34607. var a;
  34608. var b;
  34609. var hr;
  34610. hr = h / 360 * 2 * Math.PI;
  34611. a = c2 * Math.cos(hr);
  34612. b = c2 * Math.sin(hr);
  34613. return [l, a, b];
  34614. };
  34615. convert2.rgb.ansi16 = function(args) {
  34616. var r = args[0];
  34617. var g = args[1];
  34618. var b = args[2];
  34619. var value2 = 1 in arguments ? arguments[1] : convert2.rgb.hsv(args)[2];
  34620. value2 = Math.round(value2 / 50);
  34621. if (value2 === 0) {
  34622. return 30;
  34623. }
  34624. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  34625. if (value2 === 2) {
  34626. ansi += 60;
  34627. }
  34628. return ansi;
  34629. };
  34630. convert2.hsv.ansi16 = function(args) {
  34631. return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]);
  34632. };
  34633. convert2.rgb.ansi256 = function(args) {
  34634. var r = args[0];
  34635. var g = args[1];
  34636. var b = args[2];
  34637. if (r === g && g === b) {
  34638. if (r < 8) {
  34639. return 16;
  34640. }
  34641. if (r > 248) {
  34642. return 231;
  34643. }
  34644. return Math.round((r - 8) / 247 * 24) + 232;
  34645. }
  34646. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  34647. return ansi;
  34648. };
  34649. convert2.ansi16.rgb = function(args) {
  34650. var color3 = args % 10;
  34651. if (color3 === 0 || color3 === 7) {
  34652. if (args > 50) {
  34653. color3 += 3.5;
  34654. }
  34655. color3 = color3 / 10.5 * 255;
  34656. return [color3, color3, color3];
  34657. }
  34658. var mult = (~~(args > 50) + 1) * 0.5;
  34659. var r = (color3 & 1) * mult * 255;
  34660. var g = (color3 >> 1 & 1) * mult * 255;
  34661. var b = (color3 >> 2 & 1) * mult * 255;
  34662. return [r, g, b];
  34663. };
  34664. convert2.ansi256.rgb = function(args) {
  34665. if (args >= 232) {
  34666. var c2 = (args - 232) * 10 + 8;
  34667. return [c2, c2, c2];
  34668. }
  34669. args -= 16;
  34670. var rem;
  34671. var r = Math.floor(args / 36) / 5 * 255;
  34672. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  34673. var b = rem % 6 / 5 * 255;
  34674. return [r, g, b];
  34675. };
  34676. convert2.rgb.hex = function(args) {
  34677. var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
  34678. var string3 = integer.toString(16).toUpperCase();
  34679. return "000000".substring(string3.length) + string3;
  34680. };
  34681. convert2.hex.rgb = function(args) {
  34682. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  34683. if (!match) {
  34684. return [0, 0, 0];
  34685. }
  34686. var colorString = match[0];
  34687. if (match[0].length === 3) {
  34688. colorString = colorString.split("").map(function(char) {
  34689. return char + char;
  34690. }).join("");
  34691. }
  34692. var integer = parseInt(colorString, 16);
  34693. var r = integer >> 16 & 255;
  34694. var g = integer >> 8 & 255;
  34695. var b = integer & 255;
  34696. return [r, g, b];
  34697. };
  34698. convert2.rgb.hcg = function(rgb) {
  34699. var r = rgb[0] / 255;
  34700. var g = rgb[1] / 255;
  34701. var b = rgb[2] / 255;
  34702. var max = Math.max(Math.max(r, g), b);
  34703. var min = Math.min(Math.min(r, g), b);
  34704. var chroma = max - min;
  34705. var grayscale;
  34706. var hue;
  34707. if (chroma < 1) {
  34708. grayscale = min / (1 - chroma);
  34709. } else {
  34710. grayscale = 0;
  34711. }
  34712. if (chroma <= 0) {
  34713. hue = 0;
  34714. } else if (max === r) {
  34715. hue = (g - b) / chroma % 6;
  34716. } else if (max === g) {
  34717. hue = 2 + (b - r) / chroma;
  34718. } else {
  34719. hue = 4 + (r - g) / chroma + 4;
  34720. }
  34721. hue /= 6;
  34722. hue %= 1;
  34723. return [hue * 360, chroma * 100, grayscale * 100];
  34724. };
  34725. convert2.hsl.hcg = function(hsl) {
  34726. var s = hsl[1] / 100;
  34727. var l = hsl[2] / 100;
  34728. var c2 = 1;
  34729. var f = 0;
  34730. if (l < 0.5) {
  34731. c2 = 2 * s * l;
  34732. } else {
  34733. c2 = 2 * s * (1 - l);
  34734. }
  34735. if (c2 < 1) {
  34736. f = (l - 0.5 * c2) / (1 - c2);
  34737. }
  34738. return [hsl[0], c2 * 100, f * 100];
  34739. };
  34740. convert2.hsv.hcg = function(hsv) {
  34741. var s = hsv[1] / 100;
  34742. var v = hsv[2] / 100;
  34743. var c2 = s * v;
  34744. var f = 0;
  34745. if (c2 < 1) {
  34746. f = (v - c2) / (1 - c2);
  34747. }
  34748. return [hsv[0], c2 * 100, f * 100];
  34749. };
  34750. convert2.hcg.rgb = function(hcg) {
  34751. var h = hcg[0] / 360;
  34752. var c2 = hcg[1] / 100;
  34753. var g = hcg[2] / 100;
  34754. if (c2 === 0) {
  34755. return [g * 255, g * 255, g * 255];
  34756. }
  34757. var pure = [0, 0, 0];
  34758. var hi = h % 1 * 6;
  34759. var v = hi % 1;
  34760. var w = 1 - v;
  34761. var mg = 0;
  34762. switch (Math.floor(hi)) {
  34763. case 0:
  34764. pure[0] = 1;
  34765. pure[1] = v;
  34766. pure[2] = 0;
  34767. break;
  34768. case 1:
  34769. pure[0] = w;
  34770. pure[1] = 1;
  34771. pure[2] = 0;
  34772. break;
  34773. case 2:
  34774. pure[0] = 0;
  34775. pure[1] = 1;
  34776. pure[2] = v;
  34777. break;
  34778. case 3:
  34779. pure[0] = 0;
  34780. pure[1] = w;
  34781. pure[2] = 1;
  34782. break;
  34783. case 4:
  34784. pure[0] = v;
  34785. pure[1] = 0;
  34786. pure[2] = 1;
  34787. break;
  34788. default:
  34789. pure[0] = 1;
  34790. pure[1] = 0;
  34791. pure[2] = w;
  34792. }
  34793. mg = (1 - c2) * g;
  34794. return [
  34795. (c2 * pure[0] + mg) * 255,
  34796. (c2 * pure[1] + mg) * 255,
  34797. (c2 * pure[2] + mg) * 255
  34798. ];
  34799. };
  34800. convert2.hcg.hsv = function(hcg) {
  34801. var c2 = hcg[1] / 100;
  34802. var g = hcg[2] / 100;
  34803. var v = c2 + g * (1 - c2);
  34804. var f = 0;
  34805. if (v > 0) {
  34806. f = c2 / v;
  34807. }
  34808. return [hcg[0], f * 100, v * 100];
  34809. };
  34810. convert2.hcg.hsl = function(hcg) {
  34811. var c2 = hcg[1] / 100;
  34812. var g = hcg[2] / 100;
  34813. var l = g * (1 - c2) + 0.5 * c2;
  34814. var s = 0;
  34815. if (l > 0 && l < 0.5) {
  34816. s = c2 / (2 * l);
  34817. } else if (l >= 0.5 && l < 1) {
  34818. s = c2 / (2 * (1 - l));
  34819. }
  34820. return [hcg[0], s * 100, l * 100];
  34821. };
  34822. convert2.hcg.hwb = function(hcg) {
  34823. var c2 = hcg[1] / 100;
  34824. var g = hcg[2] / 100;
  34825. var v = c2 + g * (1 - c2);
  34826. return [hcg[0], (v - c2) * 100, (1 - v) * 100];
  34827. };
  34828. convert2.hwb.hcg = function(hwb) {
  34829. var w = hwb[1] / 100;
  34830. var b = hwb[2] / 100;
  34831. var v = 1 - b;
  34832. var c2 = v - w;
  34833. var g = 0;
  34834. if (c2 < 1) {
  34835. g = (v - c2) / (1 - c2);
  34836. }
  34837. return [hwb[0], c2 * 100, g * 100];
  34838. };
  34839. convert2.apple.rgb = function(apple) {
  34840. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  34841. };
  34842. convert2.rgb.apple = function(rgb) {
  34843. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  34844. };
  34845. convert2.gray.rgb = function(args) {
  34846. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  34847. };
  34848. convert2.gray.hsl = convert2.gray.hsv = function(args) {
  34849. return [0, 0, args[0]];
  34850. };
  34851. convert2.gray.hwb = function(gray) {
  34852. return [0, 100, gray[0]];
  34853. };
  34854. convert2.gray.cmyk = function(gray) {
  34855. return [0, 0, 0, gray[0]];
  34856. };
  34857. convert2.gray.lab = function(gray) {
  34858. return [gray[0], 0, 0];
  34859. };
  34860. convert2.gray.hex = function(gray) {
  34861. var val = Math.round(gray[0] / 100 * 255) & 255;
  34862. var integer = (val << 16) + (val << 8) + val;
  34863. var string3 = integer.toString(16).toUpperCase();
  34864. return "000000".substring(string3.length) + string3;
  34865. };
  34866. convert2.rgb.gray = function(rgb) {
  34867. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  34868. return [val / 255 * 100];
  34869. };
  34870. }
  34871. });
  34872. // node_modules/@babel/highlight/node_modules/color-convert/route.js
  34873. var require_route = __commonJS({
  34874. "node_modules/@babel/highlight/node_modules/color-convert/route.js"(exports, module) {
  34875. var conversions = require_conversions();
  34876. function buildGraph() {
  34877. var graph = {};
  34878. var models = Object.keys(conversions);
  34879. for (var len = models.length, i = 0; i < len; i++) {
  34880. graph[models[i]] = {
  34881. // http://jsperf.com/1-vs-infinity
  34882. // micro-opt, but this is simple.
  34883. distance: -1,
  34884. parent: null
  34885. };
  34886. }
  34887. return graph;
  34888. }
  34889. function deriveBFS(fromModel) {
  34890. var graph = buildGraph();
  34891. var queue = [fromModel];
  34892. graph[fromModel].distance = 0;
  34893. while (queue.length) {
  34894. var current3 = queue.pop();
  34895. var adjacents = Object.keys(conversions[current3]);
  34896. for (var len = adjacents.length, i = 0; i < len; i++) {
  34897. var adjacent = adjacents[i];
  34898. var node2 = graph[adjacent];
  34899. if (node2.distance === -1) {
  34900. node2.distance = graph[current3].distance + 1;
  34901. node2.parent = current3;
  34902. queue.unshift(adjacent);
  34903. }
  34904. }
  34905. }
  34906. return graph;
  34907. }
  34908. function link2(from, to) {
  34909. return function(args) {
  34910. return to(from(args));
  34911. };
  34912. }
  34913. function wrapConversion(toModel, graph) {
  34914. var path = [graph[toModel].parent, toModel];
  34915. var fn = conversions[graph[toModel].parent][toModel];
  34916. var cur = graph[toModel].parent;
  34917. while (graph[cur].parent) {
  34918. path.unshift(graph[cur].parent);
  34919. fn = link2(conversions[graph[cur].parent][cur], fn);
  34920. cur = graph[cur].parent;
  34921. }
  34922. fn.conversion = path;
  34923. return fn;
  34924. }
  34925. module.exports = function(fromModel) {
  34926. var graph = deriveBFS(fromModel);
  34927. var conversion = {};
  34928. var models = Object.keys(graph);
  34929. for (var len = models.length, i = 0; i < len; i++) {
  34930. var toModel = models[i];
  34931. var node2 = graph[toModel];
  34932. if (node2.parent === null) {
  34933. continue;
  34934. }
  34935. conversion[toModel] = wrapConversion(toModel, graph);
  34936. }
  34937. return conversion;
  34938. };
  34939. }
  34940. });
  34941. // node_modules/@babel/highlight/node_modules/color-convert/index.js
  34942. var require_color_convert = __commonJS({
  34943. "node_modules/@babel/highlight/node_modules/color-convert/index.js"(exports, module) {
  34944. var conversions = require_conversions();
  34945. var route = require_route();
  34946. var convert2 = {};
  34947. var models = Object.keys(conversions);
  34948. function wrapRaw(fn) {
  34949. var wrappedFn = function(args) {
  34950. if (args === void 0 || args === null) {
  34951. return args;
  34952. }
  34953. if (arguments.length > 1) {
  34954. args = Array.prototype.slice.call(arguments);
  34955. }
  34956. return fn(args);
  34957. };
  34958. if ("conversion" in fn) {
  34959. wrappedFn.conversion = fn.conversion;
  34960. }
  34961. return wrappedFn;
  34962. }
  34963. function wrapRounded(fn) {
  34964. var wrappedFn = function(args) {
  34965. if (args === void 0 || args === null) {
  34966. return args;
  34967. }
  34968. if (arguments.length > 1) {
  34969. args = Array.prototype.slice.call(arguments);
  34970. }
  34971. var result = fn(args);
  34972. if (typeof result === "object") {
  34973. for (var len = result.length, i = 0; i < len; i++) {
  34974. result[i] = Math.round(result[i]);
  34975. }
  34976. }
  34977. return result;
  34978. };
  34979. if ("conversion" in fn) {
  34980. wrappedFn.conversion = fn.conversion;
  34981. }
  34982. return wrappedFn;
  34983. }
  34984. models.forEach(function(fromModel) {
  34985. convert2[fromModel] = {};
  34986. Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels });
  34987. Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels });
  34988. var routes = route(fromModel);
  34989. var routeModels = Object.keys(routes);
  34990. routeModels.forEach(function(toModel) {
  34991. var fn = routes[toModel];
  34992. convert2[fromModel][toModel] = wrapRounded(fn);
  34993. convert2[fromModel][toModel].raw = wrapRaw(fn);
  34994. });
  34995. });
  34996. module.exports = convert2;
  34997. }
  34998. });
  34999. // node_modules/@babel/highlight/node_modules/ansi-styles/index.js
  35000. var require_ansi_styles = __commonJS({
  35001. "node_modules/@babel/highlight/node_modules/ansi-styles/index.js"(exports, module) {
  35002. "use strict";
  35003. var colorConvert = require_color_convert();
  35004. var wrapAnsi16 = (fn, offset3) => function() {
  35005. const code2 = fn.apply(colorConvert, arguments);
  35006. return `\x1B[${code2 + offset3}m`;
  35007. };
  35008. var wrapAnsi256 = (fn, offset3) => function() {
  35009. const code2 = fn.apply(colorConvert, arguments);
  35010. return `\x1B[${38 + offset3};5;${code2}m`;
  35011. };
  35012. var wrapAnsi16m = (fn, offset3) => function() {
  35013. const rgb = fn.apply(colorConvert, arguments);
  35014. return `\x1B[${38 + offset3};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  35015. };
  35016. function assembleStyles() {
  35017. const codes = /* @__PURE__ */ new Map();
  35018. const styles = {
  35019. modifier: {
  35020. reset: [0, 0],
  35021. // 21 isn't widely supported and 22 does the same thing
  35022. bold: [1, 22],
  35023. dim: [2, 22],
  35024. italic: [3, 23],
  35025. underline: [4, 24],
  35026. inverse: [7, 27],
  35027. hidden: [8, 28],
  35028. strikethrough: [9, 29]
  35029. },
  35030. color: {
  35031. black: [30, 39],
  35032. red: [31, 39],
  35033. green: [32, 39],
  35034. yellow: [33, 39],
  35035. blue: [34, 39],
  35036. magenta: [35, 39],
  35037. cyan: [36, 39],
  35038. white: [37, 39],
  35039. gray: [90, 39],
  35040. // Bright color
  35041. redBright: [91, 39],
  35042. greenBright: [92, 39],
  35043. yellowBright: [93, 39],
  35044. blueBright: [94, 39],
  35045. magentaBright: [95, 39],
  35046. cyanBright: [96, 39],
  35047. whiteBright: [97, 39]
  35048. },
  35049. bgColor: {
  35050. bgBlack: [40, 49],
  35051. bgRed: [41, 49],
  35052. bgGreen: [42, 49],
  35053. bgYellow: [43, 49],
  35054. bgBlue: [44, 49],
  35055. bgMagenta: [45, 49],
  35056. bgCyan: [46, 49],
  35057. bgWhite: [47, 49],
  35058. // Bright color
  35059. bgBlackBright: [100, 49],
  35060. bgRedBright: [101, 49],
  35061. bgGreenBright: [102, 49],
  35062. bgYellowBright: [103, 49],
  35063. bgBlueBright: [104, 49],
  35064. bgMagentaBright: [105, 49],
  35065. bgCyanBright: [106, 49],
  35066. bgWhiteBright: [107, 49]
  35067. }
  35068. };
  35069. styles.color.grey = styles.color.gray;
  35070. for (const groupName of Object.keys(styles)) {
  35071. const group = styles[groupName];
  35072. for (const styleName of Object.keys(group)) {
  35073. const style = group[styleName];
  35074. styles[styleName] = {
  35075. open: `\x1B[${style[0]}m`,
  35076. close: `\x1B[${style[1]}m`
  35077. };
  35078. group[styleName] = styles[styleName];
  35079. codes.set(style[0], style[1]);
  35080. }
  35081. Object.defineProperty(styles, groupName, {
  35082. value: group,
  35083. enumerable: false
  35084. });
  35085. Object.defineProperty(styles, "codes", {
  35086. value: codes,
  35087. enumerable: false
  35088. });
  35089. }
  35090. const ansi2ansi = (n) => n;
  35091. const rgb2rgb = (r, g, b) => [r, g, b];
  35092. styles.color.close = "\x1B[39m";
  35093. styles.bgColor.close = "\x1B[49m";
  35094. styles.color.ansi = {
  35095. ansi: wrapAnsi16(ansi2ansi, 0)
  35096. };
  35097. styles.color.ansi256 = {
  35098. ansi256: wrapAnsi256(ansi2ansi, 0)
  35099. };
  35100. styles.color.ansi16m = {
  35101. rgb: wrapAnsi16m(rgb2rgb, 0)
  35102. };
  35103. styles.bgColor.ansi = {
  35104. ansi: wrapAnsi16(ansi2ansi, 10)
  35105. };
  35106. styles.bgColor.ansi256 = {
  35107. ansi256: wrapAnsi256(ansi2ansi, 10)
  35108. };
  35109. styles.bgColor.ansi16m = {
  35110. rgb: wrapAnsi16m(rgb2rgb, 10)
  35111. };
  35112. for (let key2 of Object.keys(colorConvert)) {
  35113. if (typeof colorConvert[key2] !== "object") {
  35114. continue;
  35115. }
  35116. const suite = colorConvert[key2];
  35117. if (key2 === "ansi16") {
  35118. key2 = "ansi";
  35119. }
  35120. if ("ansi16" in suite) {
  35121. styles.color.ansi[key2] = wrapAnsi16(suite.ansi16, 0);
  35122. styles.bgColor.ansi[key2] = wrapAnsi16(suite.ansi16, 10);
  35123. }
  35124. if ("ansi256" in suite) {
  35125. styles.color.ansi256[key2] = wrapAnsi256(suite.ansi256, 0);
  35126. styles.bgColor.ansi256[key2] = wrapAnsi256(suite.ansi256, 10);
  35127. }
  35128. if ("rgb" in suite) {
  35129. styles.color.ansi16m[key2] = wrapAnsi16m(suite.rgb, 0);
  35130. styles.bgColor.ansi16m[key2] = wrapAnsi16m(suite.rgb, 10);
  35131. }
  35132. }
  35133. return styles;
  35134. }
  35135. Object.defineProperty(module, "exports", {
  35136. enumerable: true,
  35137. get: assembleStyles
  35138. });
  35139. }
  35140. });
  35141. // node_modules/@babel/highlight/node_modules/has-flag/index.js
  35142. var require_has_flag2 = __commonJS({
  35143. "node_modules/@babel/highlight/node_modules/has-flag/index.js"(exports, module) {
  35144. "use strict";
  35145. module.exports = (flag, argv) => {
  35146. argv = argv || process.argv;
  35147. const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
  35148. const pos2 = argv.indexOf(prefix + flag);
  35149. const terminatorPos = argv.indexOf("--");
  35150. return pos2 !== -1 && (terminatorPos === -1 ? true : pos2 < terminatorPos);
  35151. };
  35152. }
  35153. });
  35154. // node_modules/@babel/highlight/node_modules/supports-color/index.js
  35155. var require_supports_color2 = __commonJS({
  35156. "node_modules/@babel/highlight/node_modules/supports-color/index.js"(exports, module) {
  35157. "use strict";
  35158. var os = __require("os");
  35159. var hasFlag = require_has_flag2();
  35160. var env = process.env;
  35161. var forceColor;
  35162. if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
  35163. forceColor = false;
  35164. } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
  35165. forceColor = true;
  35166. }
  35167. if ("FORCE_COLOR" in env) {
  35168. forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
  35169. }
  35170. function translateLevel(level) {
  35171. if (level === 0) {
  35172. return false;
  35173. }
  35174. return {
  35175. level,
  35176. hasBasic: true,
  35177. has256: level >= 2,
  35178. has16m: level >= 3
  35179. };
  35180. }
  35181. function supportsColor(stream) {
  35182. if (forceColor === false) {
  35183. return 0;
  35184. }
  35185. if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
  35186. return 3;
  35187. }
  35188. if (hasFlag("color=256")) {
  35189. return 2;
  35190. }
  35191. if (stream && !stream.isTTY && forceColor !== true) {
  35192. return 0;
  35193. }
  35194. const min = forceColor ? 1 : 0;
  35195. if (process.platform === "win32") {
  35196. const osRelease = os.release().split(".");
  35197. if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
  35198. return Number(osRelease[2]) >= 14931 ? 3 : 2;
  35199. }
  35200. return 1;
  35201. }
  35202. if ("CI" in env) {
  35203. if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign2) => sign2 in env) || env.CI_NAME === "codeship") {
  35204. return 1;
  35205. }
  35206. return min;
  35207. }
  35208. if ("TEAMCITY_VERSION" in env) {
  35209. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  35210. }
  35211. if (env.COLORTERM === "truecolor") {
  35212. return 3;
  35213. }
  35214. if ("TERM_PROGRAM" in env) {
  35215. const version3 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
  35216. switch (env.TERM_PROGRAM) {
  35217. case "iTerm.app":
  35218. return version3 >= 3 ? 3 : 2;
  35219. case "Apple_Terminal":
  35220. return 2;
  35221. }
  35222. }
  35223. if (/-256(color)?$/i.test(env.TERM)) {
  35224. return 2;
  35225. }
  35226. if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  35227. return 1;
  35228. }
  35229. if ("COLORTERM" in env) {
  35230. return 1;
  35231. }
  35232. if (env.TERM === "dumb") {
  35233. return min;
  35234. }
  35235. return min;
  35236. }
  35237. function getSupportLevel(stream) {
  35238. const level = supportsColor(stream);
  35239. return translateLevel(level);
  35240. }
  35241. module.exports = {
  35242. supportsColor: getSupportLevel,
  35243. stdout: getSupportLevel(process.stdout),
  35244. stderr: getSupportLevel(process.stderr)
  35245. };
  35246. }
  35247. });
  35248. // node_modules/@babel/highlight/node_modules/chalk/templates.js
  35249. var require_templates = __commonJS({
  35250. "node_modules/@babel/highlight/node_modules/chalk/templates.js"(exports, module) {
  35251. "use strict";
  35252. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  35253. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  35254. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  35255. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  35256. var ESCAPES = /* @__PURE__ */ new Map([
  35257. ["n", "\n"],
  35258. ["r", "\r"],
  35259. ["t", " "],
  35260. ["b", "\b"],
  35261. ["f", "\f"],
  35262. ["v", "\v"],
  35263. ["0", "\0"],
  35264. ["\\", "\\"],
  35265. ["e", "\x1B"],
  35266. ["a", "\x07"]
  35267. ]);
  35268. function unescape2(c2) {
  35269. if (c2[0] === "u" && c2.length === 5 || c2[0] === "x" && c2.length === 3) {
  35270. return String.fromCharCode(parseInt(c2.slice(1), 16));
  35271. }
  35272. return ESCAPES.get(c2) || c2;
  35273. }
  35274. function parseArguments(name2, args) {
  35275. const results = [];
  35276. const chunks = args.trim().split(/\s*,\s*/g);
  35277. let matches;
  35278. for (const chunk of chunks) {
  35279. if (!isNaN(chunk)) {
  35280. results.push(Number(chunk));
  35281. } else if (matches = chunk.match(STRING_REGEX)) {
  35282. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape3, chr) => escape3 ? unescape2(escape3) : chr));
  35283. } else {
  35284. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
  35285. }
  35286. }
  35287. return results;
  35288. }
  35289. function parseStyle2(style) {
  35290. STYLE_REGEX.lastIndex = 0;
  35291. const results = [];
  35292. let matches;
  35293. while ((matches = STYLE_REGEX.exec(style)) !== null) {
  35294. const name2 = matches[1];
  35295. if (matches[2]) {
  35296. const args = parseArguments(name2, matches[2]);
  35297. results.push([name2].concat(args));
  35298. } else {
  35299. results.push([name2]);
  35300. }
  35301. }
  35302. return results;
  35303. }
  35304. function buildStyle(chalk, styles) {
  35305. const enabled = {};
  35306. for (const layer of styles) {
  35307. for (const style of layer.styles) {
  35308. enabled[style[0]] = layer.inverse ? null : style.slice(1);
  35309. }
  35310. }
  35311. let current3 = chalk;
  35312. for (const styleName of Object.keys(enabled)) {
  35313. if (Array.isArray(enabled[styleName])) {
  35314. if (!(styleName in current3)) {
  35315. throw new Error(`Unknown Chalk style: ${styleName}`);
  35316. }
  35317. if (enabled[styleName].length > 0) {
  35318. current3 = current3[styleName].apply(current3, enabled[styleName]);
  35319. } else {
  35320. current3 = current3[styleName];
  35321. }
  35322. }
  35323. }
  35324. return current3;
  35325. }
  35326. module.exports = (chalk, tmp) => {
  35327. const styles = [];
  35328. const chunks = [];
  35329. let chunk = [];
  35330. tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
  35331. if (escapeChar) {
  35332. chunk.push(unescape2(escapeChar));
  35333. } else if (style) {
  35334. const str = chunk.join("");
  35335. chunk = [];
  35336. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  35337. styles.push({ inverse, styles: parseStyle2(style) });
  35338. } else if (close) {
  35339. if (styles.length === 0) {
  35340. throw new Error("Found extraneous } in Chalk template literal");
  35341. }
  35342. chunks.push(buildStyle(chalk, styles)(chunk.join("")));
  35343. chunk = [];
  35344. styles.pop();
  35345. } else {
  35346. chunk.push(chr);
  35347. }
  35348. });
  35349. chunks.push(chunk.join(""));
  35350. if (styles.length > 0) {
  35351. const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
  35352. throw new Error(errMsg);
  35353. }
  35354. return chunks.join("");
  35355. };
  35356. }
  35357. });
  35358. // node_modules/@babel/highlight/node_modules/chalk/index.js
  35359. var require_chalk = __commonJS({
  35360. "node_modules/@babel/highlight/node_modules/chalk/index.js"(exports, module) {
  35361. "use strict";
  35362. var escapeStringRegexp = require_escape_string_regexp();
  35363. var ansiStyles = require_ansi_styles();
  35364. var stdoutColor = require_supports_color2().stdout;
  35365. var template = require_templates();
  35366. var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
  35367. var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
  35368. var skipModels = /* @__PURE__ */ new Set(["gray"]);
  35369. var styles = /* @__PURE__ */ Object.create(null);
  35370. function applyOptions(obj, options) {
  35371. options = options || {};
  35372. const scLevel = stdoutColor ? stdoutColor.level : 0;
  35373. obj.level = options.level === void 0 ? scLevel : options.level;
  35374. obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
  35375. }
  35376. function Chalk(options) {
  35377. if (!this || !(this instanceof Chalk) || this.template) {
  35378. const chalk = {};
  35379. applyOptions(chalk, options);
  35380. chalk.template = function() {
  35381. const args = [].slice.call(arguments);
  35382. return chalkTag.apply(null, [chalk.template].concat(args));
  35383. };
  35384. Object.setPrototypeOf(chalk, Chalk.prototype);
  35385. Object.setPrototypeOf(chalk.template, chalk);
  35386. chalk.template.constructor = Chalk;
  35387. return chalk.template;
  35388. }
  35389. applyOptions(this, options);
  35390. }
  35391. if (isSimpleWindowsTerm) {
  35392. ansiStyles.blue.open = "\x1B[94m";
  35393. }
  35394. for (const key2 of Object.keys(ansiStyles)) {
  35395. ansiStyles[key2].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key2].close), "g");
  35396. styles[key2] = {
  35397. get() {
  35398. const codes = ansiStyles[key2];
  35399. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key2);
  35400. }
  35401. };
  35402. }
  35403. styles.visible = {
  35404. get() {
  35405. return build.call(this, this._styles || [], true, "visible");
  35406. }
  35407. };
  35408. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
  35409. for (const model of Object.keys(ansiStyles.color.ansi)) {
  35410. if (skipModels.has(model)) {
  35411. continue;
  35412. }
  35413. styles[model] = {
  35414. get() {
  35415. const level = this.level;
  35416. return function() {
  35417. const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  35418. const codes = {
  35419. open,
  35420. close: ansiStyles.color.close,
  35421. closeRe: ansiStyles.color.closeRe
  35422. };
  35423. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  35424. };
  35425. }
  35426. };
  35427. }
  35428. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
  35429. for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  35430. if (skipModels.has(model)) {
  35431. continue;
  35432. }
  35433. const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
  35434. styles[bgModel] = {
  35435. get() {
  35436. const level = this.level;
  35437. return function() {
  35438. const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  35439. const codes = {
  35440. open,
  35441. close: ansiStyles.bgColor.close,
  35442. closeRe: ansiStyles.bgColor.closeRe
  35443. };
  35444. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  35445. };
  35446. }
  35447. };
  35448. }
  35449. var proto = Object.defineProperties(() => {
  35450. }, styles);
  35451. function build(_styles, _empty, key2) {
  35452. const builder = function() {
  35453. return applyStyle.apply(builder, arguments);
  35454. };
  35455. builder._styles = _styles;
  35456. builder._empty = _empty;
  35457. const self2 = this;
  35458. Object.defineProperty(builder, "level", {
  35459. enumerable: true,
  35460. get() {
  35461. return self2.level;
  35462. },
  35463. set(level) {
  35464. self2.level = level;
  35465. }
  35466. });
  35467. Object.defineProperty(builder, "enabled", {
  35468. enumerable: true,
  35469. get() {
  35470. return self2.enabled;
  35471. },
  35472. set(enabled) {
  35473. self2.enabled = enabled;
  35474. }
  35475. });
  35476. builder.hasGrey = this.hasGrey || key2 === "gray" || key2 === "grey";
  35477. builder.__proto__ = proto;
  35478. return builder;
  35479. }
  35480. function applyStyle() {
  35481. const args = arguments;
  35482. const argsLen = args.length;
  35483. let str = String(arguments[0]);
  35484. if (argsLen === 0) {
  35485. return "";
  35486. }
  35487. if (argsLen > 1) {
  35488. for (let a = 1; a < argsLen; a++) {
  35489. str += " " + args[a];
  35490. }
  35491. }
  35492. if (!this.enabled || this.level <= 0 || !str) {
  35493. return this._empty ? "" : str;
  35494. }
  35495. const originalDim = ansiStyles.dim.open;
  35496. if (isSimpleWindowsTerm && this.hasGrey) {
  35497. ansiStyles.dim.open = "";
  35498. }
  35499. for (const code2 of this._styles.slice().reverse()) {
  35500. str = code2.open + str.replace(code2.closeRe, code2.open) + code2.close;
  35501. str = str.replace(/\r?\n/g, `${code2.close}$&${code2.open}`);
  35502. }
  35503. ansiStyles.dim.open = originalDim;
  35504. return str;
  35505. }
  35506. function chalkTag(chalk, strings) {
  35507. if (!Array.isArray(strings)) {
  35508. return [].slice.call(arguments, 1).join(" ");
  35509. }
  35510. const args = [].slice.call(arguments, 2);
  35511. const parts = [strings.raw[0]];
  35512. for (let i = 1; i < strings.length; i++) {
  35513. parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
  35514. parts.push(String(strings.raw[i]));
  35515. }
  35516. return template(chalk, parts.join(""));
  35517. }
  35518. Object.defineProperties(Chalk.prototype, styles);
  35519. module.exports = Chalk();
  35520. module.exports.supportsColor = stdoutColor;
  35521. module.exports.default = module.exports;
  35522. }
  35523. });
  35524. // node_modules/@babel/highlight/lib/index.js
  35525. var require_lib7 = __commonJS({
  35526. "node_modules/@babel/highlight/lib/index.js"(exports) {
  35527. "use strict";
  35528. Object.defineProperty(exports, "__esModule", {
  35529. value: true
  35530. });
  35531. exports.default = highlight;
  35532. exports.getChalk = getChalk;
  35533. exports.shouldHighlight = shouldHighlight;
  35534. var _jsTokens = require_js_tokens();
  35535. var _helperValidatorIdentifier = require_lib();
  35536. var _chalk = require_chalk();
  35537. var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
  35538. function getDefs(chalk) {
  35539. return {
  35540. keyword: chalk.cyan,
  35541. capitalized: chalk.yellow,
  35542. jsxIdentifier: chalk.yellow,
  35543. punctuator: chalk.yellow,
  35544. number: chalk.magenta,
  35545. string: chalk.green,
  35546. regex: chalk.magenta,
  35547. comment: chalk.grey,
  35548. invalid: chalk.white.bgRed.bold
  35549. };
  35550. }
  35551. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  35552. var BRACKET = /^[()[\]{}]$/;
  35553. var tokenize;
  35554. {
  35555. const JSX_TAG = /^[a-z][\w-]*$/i;
  35556. const getTokenType = function(token2, offset3, text5) {
  35557. if (token2.type === "name") {
  35558. if ((0, _helperValidatorIdentifier.isKeyword)(token2.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token2.value, true) || sometimesKeywords.has(token2.value)) {
  35559. return "keyword";
  35560. }
  35561. if (JSX_TAG.test(token2.value) && (text5[offset3 - 1] === "<" || text5.slice(offset3 - 2, offset3) == "</")) {
  35562. return "jsxIdentifier";
  35563. }
  35564. if (token2.value[0] !== token2.value[0].toLowerCase()) {
  35565. return "capitalized";
  35566. }
  35567. }
  35568. if (token2.type === "punctuator" && BRACKET.test(token2.value)) {
  35569. return "bracket";
  35570. }
  35571. if (token2.type === "invalid" && (token2.value === "@" || token2.value === "#")) {
  35572. return "punctuator";
  35573. }
  35574. return token2.type;
  35575. };
  35576. tokenize = function* (text5) {
  35577. let match;
  35578. while (match = _jsTokens.default.exec(text5)) {
  35579. const token2 = _jsTokens.matchToToken(match);
  35580. yield {
  35581. type: getTokenType(token2, match.index, text5),
  35582. value: token2.value
  35583. };
  35584. }
  35585. };
  35586. }
  35587. function highlightTokens(defs, text5) {
  35588. let highlighted = "";
  35589. for (const {
  35590. type,
  35591. value: value2
  35592. } of tokenize(text5)) {
  35593. const colorize = defs[type];
  35594. if (colorize) {
  35595. highlighted += value2.split(NEWLINE).map((str) => colorize(str)).join("\n");
  35596. } else {
  35597. highlighted += value2;
  35598. }
  35599. }
  35600. return highlighted;
  35601. }
  35602. function shouldHighlight(options) {
  35603. return !!_chalk.supportsColor || options.forceColor;
  35604. }
  35605. function getChalk(options) {
  35606. return options.forceColor ? new _chalk.constructor({
  35607. enabled: true,
  35608. level: 1
  35609. }) : _chalk;
  35610. }
  35611. function highlight(code2, options = {}) {
  35612. if (code2 !== "" && shouldHighlight(options)) {
  35613. const chalk = getChalk(options);
  35614. const defs = getDefs(chalk);
  35615. return highlightTokens(defs, code2);
  35616. } else {
  35617. return code2;
  35618. }
  35619. }
  35620. }
  35621. });
  35622. // node_modules/@babel/code-frame/lib/index.js
  35623. var require_lib8 = __commonJS({
  35624. "node_modules/@babel/code-frame/lib/index.js"(exports) {
  35625. "use strict";
  35626. Object.defineProperty(exports, "__esModule", {
  35627. value: true
  35628. });
  35629. exports.codeFrameColumns = codeFrameColumns;
  35630. exports.default = _default;
  35631. var _highlight = require_lib7();
  35632. var deprecationWarningShown = false;
  35633. function getDefs(chalk) {
  35634. return {
  35635. gutter: chalk.grey,
  35636. marker: chalk.red.bold,
  35637. message: chalk.red.bold
  35638. };
  35639. }
  35640. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  35641. function getMarkerLines(loc, source2, opts) {
  35642. const startLoc = Object.assign({
  35643. column: 0,
  35644. line: -1
  35645. }, loc.start);
  35646. const endLoc = Object.assign({}, startLoc, loc.end);
  35647. const {
  35648. linesAbove = 2,
  35649. linesBelow = 3
  35650. } = opts || {};
  35651. const startLine = startLoc.line;
  35652. const startColumn = startLoc.column;
  35653. const endLine = endLoc.line;
  35654. const endColumn = endLoc.column;
  35655. let start3 = Math.max(startLine - (linesAbove + 1), 0);
  35656. let end = Math.min(source2.length, endLine + linesBelow);
  35657. if (startLine === -1) {
  35658. start3 = 0;
  35659. }
  35660. if (endLine === -1) {
  35661. end = source2.length;
  35662. }
  35663. const lineDiff = endLine - startLine;
  35664. const markerLines = {};
  35665. if (lineDiff) {
  35666. for (let i = 0; i <= lineDiff; i++) {
  35667. const lineNumber = i + startLine;
  35668. if (!startColumn) {
  35669. markerLines[lineNumber] = true;
  35670. } else if (i === 0) {
  35671. const sourceLength = source2[lineNumber - 1].length;
  35672. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  35673. } else if (i === lineDiff) {
  35674. markerLines[lineNumber] = [0, endColumn];
  35675. } else {
  35676. const sourceLength = source2[lineNumber - i].length;
  35677. markerLines[lineNumber] = [0, sourceLength];
  35678. }
  35679. }
  35680. } else {
  35681. if (startColumn === endColumn) {
  35682. if (startColumn) {
  35683. markerLines[startLine] = [startColumn, 0];
  35684. } else {
  35685. markerLines[startLine] = true;
  35686. }
  35687. } else {
  35688. markerLines[startLine] = [startColumn, endColumn - startColumn];
  35689. }
  35690. }
  35691. return {
  35692. start: start3,
  35693. end,
  35694. markerLines
  35695. };
  35696. }
  35697. function codeFrameColumns(rawLines, loc, opts = {}) {
  35698. const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
  35699. const chalk = (0, _highlight.getChalk)(opts);
  35700. const defs = getDefs(chalk);
  35701. const maybeHighlight = (chalkFn, string3) => {
  35702. return highlighted ? chalkFn(string3) : string3;
  35703. };
  35704. const lines = rawLines.split(NEWLINE);
  35705. const {
  35706. start: start3,
  35707. end,
  35708. markerLines
  35709. } = getMarkerLines(loc, lines, opts);
  35710. const hasColumns = loc.start && typeof loc.start.column === "number";
  35711. const numberMaxWidth = String(end).length;
  35712. const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
  35713. let frame = highlightedLines.split(NEWLINE, end).slice(start3, end).map((line2, index2) => {
  35714. const number2 = start3 + 1 + index2;
  35715. const paddedNumber = ` ${number2}`.slice(-numberMaxWidth);
  35716. const gutter = ` ${paddedNumber} |`;
  35717. const hasMarker = markerLines[number2];
  35718. const lastMarkerLine = !markerLines[number2 + 1];
  35719. if (hasMarker) {
  35720. let markerLine = "";
  35721. if (Array.isArray(hasMarker)) {
  35722. const markerSpacing = line2.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  35723. const numberOfMarkers = hasMarker[1] || 1;
  35724. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  35725. if (lastMarkerLine && opts.message) {
  35726. markerLine += " " + maybeHighlight(defs.message, opts.message);
  35727. }
  35728. }
  35729. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line2.length > 0 ? ` ${line2}` : "", markerLine].join("");
  35730. } else {
  35731. return ` ${maybeHighlight(defs.gutter, gutter)}${line2.length > 0 ? ` ${line2}` : ""}`;
  35732. }
  35733. }).join("\n");
  35734. if (opts.message && !hasColumns) {
  35735. frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
  35736. ${frame}`;
  35737. }
  35738. if (highlighted) {
  35739. return chalk.reset(frame);
  35740. } else {
  35741. return frame;
  35742. }
  35743. }
  35744. function _default(rawLines, lineNumber, colNumber, opts = {}) {
  35745. if (!deprecationWarningShown) {
  35746. deprecationWarningShown = true;
  35747. const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
  35748. if (process.emitWarning) {
  35749. process.emitWarning(message, "DeprecationWarning");
  35750. } else {
  35751. const deprecationError = new Error(message);
  35752. deprecationError.name = "DeprecationWarning";
  35753. console.warn(new Error(message));
  35754. }
  35755. }
  35756. colNumber = Math.max(colNumber, 0);
  35757. const location2 = {
  35758. start: {
  35759. column: colNumber,
  35760. line: lineNumber
  35761. }
  35762. };
  35763. return codeFrameColumns(rawLines, location2, opts);
  35764. }
  35765. }
  35766. });
  35767. // node_modules/@babel/parser/lib/index.js
  35768. var require_lib9 = __commonJS({
  35769. "node_modules/@babel/parser/lib/index.js"(exports) {
  35770. "use strict";
  35771. Object.defineProperty(exports, "__esModule", {
  35772. value: true
  35773. });
  35774. var defaultOptions3 = {
  35775. sourceType: "script",
  35776. sourceFilename: void 0,
  35777. startColumn: 0,
  35778. startLine: 1,
  35779. allowAwaitOutsideFunction: false,
  35780. allowReturnOutsideFunction: false,
  35781. allowNewTargetOutsideFunction: false,
  35782. allowImportExportEverywhere: false,
  35783. allowSuperOutsideMethod: false,
  35784. allowUndeclaredExports: false,
  35785. plugins: [],
  35786. strictMode: null,
  35787. ranges: false,
  35788. tokens: false,
  35789. createParenthesizedExpressions: false,
  35790. errorRecovery: false,
  35791. attachComment: true,
  35792. annexB: true
  35793. };
  35794. function getOptions3(opts) {
  35795. if (opts && opts.annexB != null && opts.annexB !== false) {
  35796. throw new Error("The `annexB` option can only be set to `false`.");
  35797. }
  35798. const options = {};
  35799. for (const key2 of Object.keys(defaultOptions3)) {
  35800. options[key2] = opts && opts[key2] != null ? opts[key2] : defaultOptions3[key2];
  35801. }
  35802. return options;
  35803. }
  35804. var TokContext5 = class {
  35805. constructor(token2, preserveSpace) {
  35806. this.token = void 0;
  35807. this.preserveSpace = void 0;
  35808. this.token = token2;
  35809. this.preserveSpace = !!preserveSpace;
  35810. }
  35811. };
  35812. var types3 = {
  35813. brace: new TokContext5("{"),
  35814. j_oTag: new TokContext5("<tag"),
  35815. j_cTag: new TokContext5("</tag"),
  35816. j_expr: new TokContext5("<tag>...</tag>", true)
  35817. };
  35818. {
  35819. types3.template = new TokContext5("`", true);
  35820. }
  35821. var beforeExpr3 = true;
  35822. var startsExpr3 = true;
  35823. var isLoop = true;
  35824. var isAssign = true;
  35825. var prefix = true;
  35826. var postfix = true;
  35827. var ExportedTokenType = class {
  35828. constructor(label, conf = {}) {
  35829. this.label = void 0;
  35830. this.keyword = void 0;
  35831. this.beforeExpr = void 0;
  35832. this.startsExpr = void 0;
  35833. this.rightAssociative = void 0;
  35834. this.isLoop = void 0;
  35835. this.isAssign = void 0;
  35836. this.prefix = void 0;
  35837. this.postfix = void 0;
  35838. this.binop = void 0;
  35839. this.label = label;
  35840. this.keyword = conf.keyword;
  35841. this.beforeExpr = !!conf.beforeExpr;
  35842. this.startsExpr = !!conf.startsExpr;
  35843. this.rightAssociative = !!conf.rightAssociative;
  35844. this.isLoop = !!conf.isLoop;
  35845. this.isAssign = !!conf.isAssign;
  35846. this.prefix = !!conf.prefix;
  35847. this.postfix = !!conf.postfix;
  35848. this.binop = conf.binop != null ? conf.binop : null;
  35849. {
  35850. this.updateContext = null;
  35851. }
  35852. }
  35853. };
  35854. var keywords$13 = /* @__PURE__ */ new Map();
  35855. function createKeyword(name2, options = {}) {
  35856. options.keyword = name2;
  35857. const token2 = createToken(name2, options);
  35858. keywords$13.set(name2, token2);
  35859. return token2;
  35860. }
  35861. function createBinop(name2, binop3) {
  35862. return createToken(name2, {
  35863. beforeExpr: beforeExpr3,
  35864. binop: binop3
  35865. });
  35866. }
  35867. var tokenTypeCounter = -1;
  35868. var tokenTypes = [];
  35869. var tokenLabels = [];
  35870. var tokenBinops = [];
  35871. var tokenBeforeExprs = [];
  35872. var tokenStartsExprs = [];
  35873. var tokenPrefixes = [];
  35874. function createToken(name2, options = {}) {
  35875. var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix;
  35876. ++tokenTypeCounter;
  35877. tokenLabels.push(name2);
  35878. tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1);
  35879. tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false);
  35880. tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false);
  35881. tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false);
  35882. tokenTypes.push(new ExportedTokenType(name2, options));
  35883. return tokenTypeCounter;
  35884. }
  35885. function createKeywordLike(name2, options = {}) {
  35886. var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2;
  35887. ++tokenTypeCounter;
  35888. keywords$13.set(name2, tokenTypeCounter);
  35889. tokenLabels.push(name2);
  35890. tokenBinops.push((_options$binop2 = options.binop) != null ? _options$binop2 : -1);
  35891. tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false);
  35892. tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false);
  35893. tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false);
  35894. tokenTypes.push(new ExportedTokenType("name", options));
  35895. return tokenTypeCounter;
  35896. }
  35897. var tt = {
  35898. bracketL: createToken("[", {
  35899. beforeExpr: beforeExpr3,
  35900. startsExpr: startsExpr3
  35901. }),
  35902. bracketHashL: createToken("#[", {
  35903. beforeExpr: beforeExpr3,
  35904. startsExpr: startsExpr3
  35905. }),
  35906. bracketBarL: createToken("[|", {
  35907. beforeExpr: beforeExpr3,
  35908. startsExpr: startsExpr3
  35909. }),
  35910. bracketR: createToken("]"),
  35911. bracketBarR: createToken("|]"),
  35912. braceL: createToken("{", {
  35913. beforeExpr: beforeExpr3,
  35914. startsExpr: startsExpr3
  35915. }),
  35916. braceBarL: createToken("{|", {
  35917. beforeExpr: beforeExpr3,
  35918. startsExpr: startsExpr3
  35919. }),
  35920. braceHashL: createToken("#{", {
  35921. beforeExpr: beforeExpr3,
  35922. startsExpr: startsExpr3
  35923. }),
  35924. braceR: createToken("}"),
  35925. braceBarR: createToken("|}"),
  35926. parenL: createToken("(", {
  35927. beforeExpr: beforeExpr3,
  35928. startsExpr: startsExpr3
  35929. }),
  35930. parenR: createToken(")"),
  35931. comma: createToken(",", {
  35932. beforeExpr: beforeExpr3
  35933. }),
  35934. semi: createToken(";", {
  35935. beforeExpr: beforeExpr3
  35936. }),
  35937. colon: createToken(":", {
  35938. beforeExpr: beforeExpr3
  35939. }),
  35940. doubleColon: createToken("::", {
  35941. beforeExpr: beforeExpr3
  35942. }),
  35943. dot: createToken("."),
  35944. question: createToken("?", {
  35945. beforeExpr: beforeExpr3
  35946. }),
  35947. questionDot: createToken("?."),
  35948. arrow: createToken("=>", {
  35949. beforeExpr: beforeExpr3
  35950. }),
  35951. template: createToken("template"),
  35952. ellipsis: createToken("...", {
  35953. beforeExpr: beforeExpr3
  35954. }),
  35955. backQuote: createToken("`", {
  35956. startsExpr: startsExpr3
  35957. }),
  35958. dollarBraceL: createToken("${", {
  35959. beforeExpr: beforeExpr3,
  35960. startsExpr: startsExpr3
  35961. }),
  35962. templateTail: createToken("...`", {
  35963. startsExpr: startsExpr3
  35964. }),
  35965. templateNonTail: createToken("...${", {
  35966. beforeExpr: beforeExpr3,
  35967. startsExpr: startsExpr3
  35968. }),
  35969. at: createToken("@"),
  35970. hash: createToken("#", {
  35971. startsExpr: startsExpr3
  35972. }),
  35973. interpreterDirective: createToken("#!..."),
  35974. eq: createToken("=", {
  35975. beforeExpr: beforeExpr3,
  35976. isAssign
  35977. }),
  35978. assign: createToken("_=", {
  35979. beforeExpr: beforeExpr3,
  35980. isAssign
  35981. }),
  35982. slashAssign: createToken("_=", {
  35983. beforeExpr: beforeExpr3,
  35984. isAssign
  35985. }),
  35986. xorAssign: createToken("_=", {
  35987. beforeExpr: beforeExpr3,
  35988. isAssign
  35989. }),
  35990. moduloAssign: createToken("_=", {
  35991. beforeExpr: beforeExpr3,
  35992. isAssign
  35993. }),
  35994. incDec: createToken("++/--", {
  35995. prefix,
  35996. postfix,
  35997. startsExpr: startsExpr3
  35998. }),
  35999. bang: createToken("!", {
  36000. beforeExpr: beforeExpr3,
  36001. prefix,
  36002. startsExpr: startsExpr3
  36003. }),
  36004. tilde: createToken("~", {
  36005. beforeExpr: beforeExpr3,
  36006. prefix,
  36007. startsExpr: startsExpr3
  36008. }),
  36009. doubleCaret: createToken("^^", {
  36010. startsExpr: startsExpr3
  36011. }),
  36012. doubleAt: createToken("@@", {
  36013. startsExpr: startsExpr3
  36014. }),
  36015. pipeline: createBinop("|>", 0),
  36016. nullishCoalescing: createBinop("??", 1),
  36017. logicalOR: createBinop("||", 1),
  36018. logicalAND: createBinop("&&", 2),
  36019. bitwiseOR: createBinop("|", 3),
  36020. bitwiseXOR: createBinop("^", 4),
  36021. bitwiseAND: createBinop("&", 5),
  36022. equality: createBinop("==/!=/===/!==", 6),
  36023. lt: createBinop("</>/<=/>=", 7),
  36024. gt: createBinop("</>/<=/>=", 7),
  36025. relational: createBinop("</>/<=/>=", 7),
  36026. bitShift: createBinop("<</>>/>>>", 8),
  36027. bitShiftL: createBinop("<</>>/>>>", 8),
  36028. bitShiftR: createBinop("<</>>/>>>", 8),
  36029. plusMin: createToken("+/-", {
  36030. beforeExpr: beforeExpr3,
  36031. binop: 9,
  36032. prefix,
  36033. startsExpr: startsExpr3
  36034. }),
  36035. modulo: createToken("%", {
  36036. binop: 10,
  36037. startsExpr: startsExpr3
  36038. }),
  36039. star: createToken("*", {
  36040. binop: 10
  36041. }),
  36042. slash: createBinop("/", 10),
  36043. exponent: createToken("**", {
  36044. beforeExpr: beforeExpr3,
  36045. binop: 11,
  36046. rightAssociative: true
  36047. }),
  36048. _in: createKeyword("in", {
  36049. beforeExpr: beforeExpr3,
  36050. binop: 7
  36051. }),
  36052. _instanceof: createKeyword("instanceof", {
  36053. beforeExpr: beforeExpr3,
  36054. binop: 7
  36055. }),
  36056. _break: createKeyword("break"),
  36057. _case: createKeyword("case", {
  36058. beforeExpr: beforeExpr3
  36059. }),
  36060. _catch: createKeyword("catch"),
  36061. _continue: createKeyword("continue"),
  36062. _debugger: createKeyword("debugger"),
  36063. _default: createKeyword("default", {
  36064. beforeExpr: beforeExpr3
  36065. }),
  36066. _else: createKeyword("else", {
  36067. beforeExpr: beforeExpr3
  36068. }),
  36069. _finally: createKeyword("finally"),
  36070. _function: createKeyword("function", {
  36071. startsExpr: startsExpr3
  36072. }),
  36073. _if: createKeyword("if"),
  36074. _return: createKeyword("return", {
  36075. beforeExpr: beforeExpr3
  36076. }),
  36077. _switch: createKeyword("switch"),
  36078. _throw: createKeyword("throw", {
  36079. beforeExpr: beforeExpr3,
  36080. prefix,
  36081. startsExpr: startsExpr3
  36082. }),
  36083. _try: createKeyword("try"),
  36084. _var: createKeyword("var"),
  36085. _const: createKeyword("const"),
  36086. _with: createKeyword("with"),
  36087. _new: createKeyword("new", {
  36088. beforeExpr: beforeExpr3,
  36089. startsExpr: startsExpr3
  36090. }),
  36091. _this: createKeyword("this", {
  36092. startsExpr: startsExpr3
  36093. }),
  36094. _super: createKeyword("super", {
  36095. startsExpr: startsExpr3
  36096. }),
  36097. _class: createKeyword("class", {
  36098. startsExpr: startsExpr3
  36099. }),
  36100. _extends: createKeyword("extends", {
  36101. beforeExpr: beforeExpr3
  36102. }),
  36103. _export: createKeyword("export"),
  36104. _import: createKeyword("import", {
  36105. startsExpr: startsExpr3
  36106. }),
  36107. _null: createKeyword("null", {
  36108. startsExpr: startsExpr3
  36109. }),
  36110. _true: createKeyword("true", {
  36111. startsExpr: startsExpr3
  36112. }),
  36113. _false: createKeyword("false", {
  36114. startsExpr: startsExpr3
  36115. }),
  36116. _typeof: createKeyword("typeof", {
  36117. beforeExpr: beforeExpr3,
  36118. prefix,
  36119. startsExpr: startsExpr3
  36120. }),
  36121. _void: createKeyword("void", {
  36122. beforeExpr: beforeExpr3,
  36123. prefix,
  36124. startsExpr: startsExpr3
  36125. }),
  36126. _delete: createKeyword("delete", {
  36127. beforeExpr: beforeExpr3,
  36128. prefix,
  36129. startsExpr: startsExpr3
  36130. }),
  36131. _do: createKeyword("do", {
  36132. isLoop,
  36133. beforeExpr: beforeExpr3
  36134. }),
  36135. _for: createKeyword("for", {
  36136. isLoop
  36137. }),
  36138. _while: createKeyword("while", {
  36139. isLoop
  36140. }),
  36141. _as: createKeywordLike("as", {
  36142. startsExpr: startsExpr3
  36143. }),
  36144. _assert: createKeywordLike("assert", {
  36145. startsExpr: startsExpr3
  36146. }),
  36147. _async: createKeywordLike("async", {
  36148. startsExpr: startsExpr3
  36149. }),
  36150. _await: createKeywordLike("await", {
  36151. startsExpr: startsExpr3
  36152. }),
  36153. _from: createKeywordLike("from", {
  36154. startsExpr: startsExpr3
  36155. }),
  36156. _get: createKeywordLike("get", {
  36157. startsExpr: startsExpr3
  36158. }),
  36159. _let: createKeywordLike("let", {
  36160. startsExpr: startsExpr3
  36161. }),
  36162. _meta: createKeywordLike("meta", {
  36163. startsExpr: startsExpr3
  36164. }),
  36165. _of: createKeywordLike("of", {
  36166. startsExpr: startsExpr3
  36167. }),
  36168. _sent: createKeywordLike("sent", {
  36169. startsExpr: startsExpr3
  36170. }),
  36171. _set: createKeywordLike("set", {
  36172. startsExpr: startsExpr3
  36173. }),
  36174. _static: createKeywordLike("static", {
  36175. startsExpr: startsExpr3
  36176. }),
  36177. _using: createKeywordLike("using", {
  36178. startsExpr: startsExpr3
  36179. }),
  36180. _yield: createKeywordLike("yield", {
  36181. startsExpr: startsExpr3
  36182. }),
  36183. _asserts: createKeywordLike("asserts", {
  36184. startsExpr: startsExpr3
  36185. }),
  36186. _checks: createKeywordLike("checks", {
  36187. startsExpr: startsExpr3
  36188. }),
  36189. _exports: createKeywordLike("exports", {
  36190. startsExpr: startsExpr3
  36191. }),
  36192. _global: createKeywordLike("global", {
  36193. startsExpr: startsExpr3
  36194. }),
  36195. _implements: createKeywordLike("implements", {
  36196. startsExpr: startsExpr3
  36197. }),
  36198. _intrinsic: createKeywordLike("intrinsic", {
  36199. startsExpr: startsExpr3
  36200. }),
  36201. _infer: createKeywordLike("infer", {
  36202. startsExpr: startsExpr3
  36203. }),
  36204. _is: createKeywordLike("is", {
  36205. startsExpr: startsExpr3
  36206. }),
  36207. _mixins: createKeywordLike("mixins", {
  36208. startsExpr: startsExpr3
  36209. }),
  36210. _proto: createKeywordLike("proto", {
  36211. startsExpr: startsExpr3
  36212. }),
  36213. _require: createKeywordLike("require", {
  36214. startsExpr: startsExpr3
  36215. }),
  36216. _satisfies: createKeywordLike("satisfies", {
  36217. startsExpr: startsExpr3
  36218. }),
  36219. _keyof: createKeywordLike("keyof", {
  36220. startsExpr: startsExpr3
  36221. }),
  36222. _readonly: createKeywordLike("readonly", {
  36223. startsExpr: startsExpr3
  36224. }),
  36225. _unique: createKeywordLike("unique", {
  36226. startsExpr: startsExpr3
  36227. }),
  36228. _abstract: createKeywordLike("abstract", {
  36229. startsExpr: startsExpr3
  36230. }),
  36231. _declare: createKeywordLike("declare", {
  36232. startsExpr: startsExpr3
  36233. }),
  36234. _enum: createKeywordLike("enum", {
  36235. startsExpr: startsExpr3
  36236. }),
  36237. _module: createKeywordLike("module", {
  36238. startsExpr: startsExpr3
  36239. }),
  36240. _namespace: createKeywordLike("namespace", {
  36241. startsExpr: startsExpr3
  36242. }),
  36243. _interface: createKeywordLike("interface", {
  36244. startsExpr: startsExpr3
  36245. }),
  36246. _type: createKeywordLike("type", {
  36247. startsExpr: startsExpr3
  36248. }),
  36249. _opaque: createKeywordLike("opaque", {
  36250. startsExpr: startsExpr3
  36251. }),
  36252. name: createToken("name", {
  36253. startsExpr: startsExpr3
  36254. }),
  36255. string: createToken("string", {
  36256. startsExpr: startsExpr3
  36257. }),
  36258. num: createToken("num", {
  36259. startsExpr: startsExpr3
  36260. }),
  36261. bigint: createToken("bigint", {
  36262. startsExpr: startsExpr3
  36263. }),
  36264. decimal: createToken("decimal", {
  36265. startsExpr: startsExpr3
  36266. }),
  36267. regexp: createToken("regexp", {
  36268. startsExpr: startsExpr3
  36269. }),
  36270. privateName: createToken("#name", {
  36271. startsExpr: startsExpr3
  36272. }),
  36273. eof: createToken("eof"),
  36274. jsxName: createToken("jsxName"),
  36275. jsxText: createToken("jsxText", {
  36276. beforeExpr: true
  36277. }),
  36278. jsxTagStart: createToken("jsxTagStart", {
  36279. startsExpr: true
  36280. }),
  36281. jsxTagEnd: createToken("jsxTagEnd"),
  36282. placeholder: createToken("%%", {
  36283. startsExpr: true
  36284. })
  36285. };
  36286. function tokenIsIdentifier(token2) {
  36287. return token2 >= 93 && token2 <= 130;
  36288. }
  36289. function tokenKeywordOrIdentifierIsKeyword(token2) {
  36290. return token2 <= 92;
  36291. }
  36292. function tokenIsKeywordOrIdentifier(token2) {
  36293. return token2 >= 58 && token2 <= 130;
  36294. }
  36295. function tokenIsLiteralPropertyName(token2) {
  36296. return token2 >= 58 && token2 <= 134;
  36297. }
  36298. function tokenComesBeforeExpression(token2) {
  36299. return tokenBeforeExprs[token2];
  36300. }
  36301. function tokenCanStartExpression(token2) {
  36302. return tokenStartsExprs[token2];
  36303. }
  36304. function tokenIsAssignment(token2) {
  36305. return token2 >= 29 && token2 <= 33;
  36306. }
  36307. function tokenIsFlowInterfaceOrTypeOrOpaque(token2) {
  36308. return token2 >= 127 && token2 <= 129;
  36309. }
  36310. function tokenIsLoop(token2) {
  36311. return token2 >= 90 && token2 <= 92;
  36312. }
  36313. function tokenIsKeyword(token2) {
  36314. return token2 >= 58 && token2 <= 92;
  36315. }
  36316. function tokenIsOperator(token2) {
  36317. return token2 >= 39 && token2 <= 59;
  36318. }
  36319. function tokenIsPostfix(token2) {
  36320. return token2 === 34;
  36321. }
  36322. function tokenIsPrefix(token2) {
  36323. return tokenPrefixes[token2];
  36324. }
  36325. function tokenIsTSTypeOperator(token2) {
  36326. return token2 >= 119 && token2 <= 121;
  36327. }
  36328. function tokenIsTSDeclarationStart(token2) {
  36329. return token2 >= 122 && token2 <= 128;
  36330. }
  36331. function tokenLabelName(token2) {
  36332. return tokenLabels[token2];
  36333. }
  36334. function tokenOperatorPrecedence(token2) {
  36335. return tokenBinops[token2];
  36336. }
  36337. function tokenIsRightAssociative(token2) {
  36338. return token2 === 57;
  36339. }
  36340. function tokenIsTemplate(token2) {
  36341. return token2 >= 24 && token2 <= 25;
  36342. }
  36343. function getExportedToken(token2) {
  36344. return tokenTypes[token2];
  36345. }
  36346. {
  36347. tokenTypes[8].updateContext = (context) => {
  36348. context.pop();
  36349. };
  36350. tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
  36351. context.push(types3.brace);
  36352. };
  36353. tokenTypes[22].updateContext = (context) => {
  36354. if (context[context.length - 1] === types3.template) {
  36355. context.pop();
  36356. } else {
  36357. context.push(types3.template);
  36358. }
  36359. };
  36360. tokenTypes[140].updateContext = (context) => {
  36361. context.push(types3.j_expr, types3.j_oTag);
  36362. };
  36363. }
  36364. function _objectWithoutPropertiesLoose(source2, excluded) {
  36365. if (source2 == null)
  36366. return {};
  36367. var target = {};
  36368. var sourceKeys = Object.keys(source2);
  36369. var key2, i;
  36370. for (i = 0; i < sourceKeys.length; i++) {
  36371. key2 = sourceKeys[i];
  36372. if (excluded.indexOf(key2) >= 0)
  36373. continue;
  36374. target[key2] = source2[key2];
  36375. }
  36376. return target;
  36377. }
  36378. var Position5 = class {
  36379. constructor(line2, col, index2) {
  36380. this.line = void 0;
  36381. this.column = void 0;
  36382. this.index = void 0;
  36383. this.line = line2;
  36384. this.column = col;
  36385. this.index = index2;
  36386. }
  36387. };
  36388. var SourceLocation5 = class {
  36389. constructor(start3, end) {
  36390. this.start = void 0;
  36391. this.end = void 0;
  36392. this.filename = void 0;
  36393. this.identifierName = void 0;
  36394. this.start = start3;
  36395. this.end = end;
  36396. }
  36397. };
  36398. function createPositionWithColumnOffset(position3, columnOffset) {
  36399. const {
  36400. line: line2,
  36401. column: column2,
  36402. index: index2
  36403. } = position3;
  36404. return new Position5(line2, column2 + columnOffset, index2 + columnOffset);
  36405. }
  36406. var ParseErrorCode = {
  36407. SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
  36408. SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  36409. };
  36410. var reflect = (keys2, last = keys2.length - 1) => ({
  36411. get() {
  36412. return keys2.reduce((object, key2) => object[key2], this);
  36413. },
  36414. set(value2) {
  36415. keys2.reduce((item, key2, i) => i === last ? item[key2] = value2 : item[key2], this);
  36416. }
  36417. });
  36418. var instantiate = (constructor, properties, descriptors) => Object.keys(descriptors).map((key2) => [key2, descriptors[key2]]).filter(([, descriptor]) => !!descriptor).map(([key2, descriptor]) => [key2, typeof descriptor === "function" ? {
  36419. value: descriptor,
  36420. enumerable: false
  36421. } : typeof descriptor.reflect === "string" ? Object.assign({}, descriptor, reflect(descriptor.reflect.split("."))) : descriptor]).reduce((instance, [key2, descriptor]) => Object.defineProperty(instance, key2, Object.assign({
  36422. configurable: true
  36423. }, descriptor)), Object.assign(new constructor(), properties));
  36424. var ModuleErrors = {
  36425. ImportMetaOutsideModule: {
  36426. message: `import.meta may appear only with 'sourceType: "module"'`,
  36427. code: ParseErrorCode.SourceTypeModuleError
  36428. },
  36429. ImportOutsideModule: {
  36430. message: `'import' and 'export' may appear only with 'sourceType: "module"'`,
  36431. code: ParseErrorCode.SourceTypeModuleError
  36432. }
  36433. };
  36434. var NodeDescriptions = {
  36435. ArrayPattern: "array destructuring pattern",
  36436. AssignmentExpression: "assignment expression",
  36437. AssignmentPattern: "assignment expression",
  36438. ArrowFunctionExpression: "arrow function expression",
  36439. ConditionalExpression: "conditional expression",
  36440. CatchClause: "catch clause",
  36441. ForOfStatement: "for-of statement",
  36442. ForInStatement: "for-in statement",
  36443. ForStatement: "for-loop",
  36444. FormalParameters: "function parameter list",
  36445. Identifier: "identifier",
  36446. ImportSpecifier: "import specifier",
  36447. ImportDefaultSpecifier: "import default specifier",
  36448. ImportNamespaceSpecifier: "import namespace specifier",
  36449. ObjectPattern: "object destructuring pattern",
  36450. ParenthesizedExpression: "parenthesized expression",
  36451. RestElement: "rest element",
  36452. UpdateExpression: {
  36453. true: "prefix operation",
  36454. false: "postfix operation"
  36455. },
  36456. VariableDeclarator: "variable declaration",
  36457. YieldExpression: "yield expression"
  36458. };
  36459. var toNodeDescription = ({
  36460. type,
  36461. prefix: prefix2
  36462. }) => type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[String(prefix2)] : NodeDescriptions[type];
  36463. var StandardErrors = {
  36464. AccessorIsGenerator: ({
  36465. kind
  36466. }) => `A ${kind}ter cannot be a generator.`,
  36467. ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
  36468. AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
  36469. AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
  36470. AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
  36471. AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
  36472. AwaitInUsingBinding: "'await' is not allowed to be used as a name in 'using' declarations.",
  36473. AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
  36474. AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
  36475. BadGetterArity: "A 'get' accessor must not have any formal parameters.",
  36476. BadSetterArity: "A 'set' accessor must have exactly one formal parameter.",
  36477. BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.",
  36478. ConstructorClassField: "Classes may not have a field named 'constructor'.",
  36479. ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
  36480. ConstructorIsAccessor: "Class constructor may not be an accessor.",
  36481. ConstructorIsAsync: "Constructor can't be an async function.",
  36482. ConstructorIsGenerator: "Constructor can't be a generator.",
  36483. DeclarationMissingInitializer: ({
  36484. kind
  36485. }) => `Missing initializer in ${kind} declaration.`,
  36486. DecoratorArgumentsOutsideParentheses: "Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",
  36487. DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",
  36488. DecoratorsBeforeAfterExport: "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",
  36489. DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
  36490. DecoratorExportClass: "Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",
  36491. DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
  36492. DecoratorStaticBlock: "Decorators can't be used with a static block.",
  36493. DeletePrivateField: "Deleting a private field is not allowed.",
  36494. DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
  36495. DuplicateConstructor: "Duplicate constructor in the same class.",
  36496. DuplicateDefaultExport: "Only one default export allowed per module.",
  36497. DuplicateExport: ({
  36498. exportName
  36499. }) => `\`${exportName}\` has already been exported. Exported identifiers must be unique.`,
  36500. DuplicateProto: "Redefinition of __proto__ property.",
  36501. DuplicateRegExpFlags: "Duplicate regular expression flag.",
  36502. ElementAfterRest: "Rest element must be last element.",
  36503. EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
  36504. ExportBindingIsString: ({
  36505. localName,
  36506. exportName
  36507. }) => `A string literal cannot be used as an exported binding without \`from\`.
  36508. - Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`,
  36509. ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
  36510. ForInOfLoopInitializer: ({
  36511. type
  36512. }) => `'${type === "ForInStatement" ? "for-in" : "for-of"}' loop variable declaration may not have an initializer.`,
  36513. ForInUsing: "For-in loop may not start with 'using' declaration.",
  36514. ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
  36515. ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
  36516. GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
  36517. IllegalBreakContinue: ({
  36518. type
  36519. }) => `Unsyntactic ${type === "BreakStatement" ? "break" : "continue"}.`,
  36520. IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
  36521. IllegalReturn: "'return' outside of function.",
  36522. ImportBindingIsString: ({
  36523. importName
  36524. }) => `A string literal cannot be used as an imported binding.
  36525. - Did you mean \`import { "${importName}" as foo }\`?`,
  36526. ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.",
  36527. ImportCallArity: ({
  36528. maxArgumentCount
  36529. }) => `\`import()\` requires exactly ${maxArgumentCount === 1 ? "one argument" : "one or two arguments"}.`,
  36530. ImportCallNotNewExpression: "Cannot use new with import(...).",
  36531. ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
  36532. ImportJSONBindingNotDefault: "A JSON module can only be imported with `default`.",
  36533. ImportReflectionHasAssertion: "`import module x` cannot have assertions.",
  36534. ImportReflectionNotBinding: 'Only `import module x from "./module"` is valid.',
  36535. IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.",
  36536. InvalidBigIntLiteral: "Invalid BigIntLiteral.",
  36537. InvalidCodePoint: "Code point out of bounds.",
  36538. InvalidCoverInitializedName: "Invalid shorthand property initializer.",
  36539. InvalidDecimal: "Invalid decimal.",
  36540. InvalidDigit: ({
  36541. radix
  36542. }) => `Expected number in radix ${radix}.`,
  36543. InvalidEscapeSequence: "Bad character escape sequence.",
  36544. InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
  36545. InvalidEscapedReservedWord: ({
  36546. reservedWord
  36547. }) => `Escape sequence in keyword ${reservedWord}.`,
  36548. InvalidIdentifier: ({
  36549. identifierName
  36550. }) => `Invalid identifier ${identifierName}.`,
  36551. InvalidLhs: ({
  36552. ancestor
  36553. }) => `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,
  36554. InvalidLhsBinding: ({
  36555. ancestor
  36556. }) => `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,
  36557. InvalidNumber: "Invalid number.",
  36558. InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
  36559. InvalidOrUnexpectedToken: ({
  36560. unexpected
  36561. }) => `Unexpected character '${unexpected}'.`,
  36562. InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
  36563. InvalidPrivateFieldResolution: ({
  36564. identifierName
  36565. }) => `Private name #${identifierName} is not defined.`,
  36566. InvalidPropertyBindingPattern: "Binding member expression.",
  36567. InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
  36568. InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
  36569. LabelRedeclaration: ({
  36570. labelName
  36571. }) => `Label '${labelName}' is already declared.`,
  36572. LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
  36573. LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
  36574. MalformedRegExpFlags: "Invalid regular expression flag.",
  36575. MissingClassName: "A class name is required.",
  36576. MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
  36577. MissingSemicolon: "Missing semicolon.",
  36578. MissingPlugin: ({
  36579. missingPlugin
  36580. }) => `This experimental syntax requires enabling the parser plugin: ${missingPlugin.map((name2) => JSON.stringify(name2)).join(", ")}.`,
  36581. MissingOneOfPlugins: ({
  36582. missingPlugin
  36583. }) => `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin.map((name2) => JSON.stringify(name2)).join(", ")}.`,
  36584. MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
  36585. MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",
  36586. ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",
  36587. ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",
  36588. ModuleAttributesWithDuplicateKeys: ({
  36589. key: key2
  36590. }) => `Duplicate key "${key2}" is not allowed in module attributes.`,
  36591. ModuleExportNameHasLoneSurrogate: ({
  36592. surrogateCharCode
  36593. }) => `An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`,
  36594. ModuleExportUndefined: ({
  36595. localName
  36596. }) => `Export '${localName}' is not defined.`,
  36597. MultipleDefaultsInSwitch: "Multiple default clauses.",
  36598. NewlineAfterThrow: "Illegal newline after throw.",
  36599. NoCatchOrFinally: "Missing catch or finally clause.",
  36600. NumberIdentifier: "Identifier directly after number.",
  36601. NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
  36602. ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
  36603. OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
  36604. OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
  36605. OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
  36606. ParamDupe: "Argument name clash.",
  36607. PatternHasAccessor: "Object pattern can't contain getter or setter.",
  36608. PatternHasMethod: "Object pattern can't contain methods.",
  36609. PrivateInExpectedIn: ({
  36610. identifierName
  36611. }) => `Private names are only allowed in property accesses (\`obj.#${identifierName}\`) or in \`in\` expressions (\`#${identifierName} in obj\`).`,
  36612. PrivateNameRedeclaration: ({
  36613. identifierName
  36614. }) => `Duplicate private name #${identifierName}.`,
  36615. RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  36616. RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  36617. RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  36618. RecordNoProto: "'__proto__' is not allowed in Record expressions.",
  36619. RestTrailingComma: "Unexpected trailing comma after rest element.",
  36620. SloppyFunction: "In non-strict mode code, functions can only be declared at top level or inside a block.",
  36621. SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
  36622. StaticPrototype: "Classes may not have static property named prototype.",
  36623. SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
  36624. SuperPrivateField: "Private fields can't be accessed on super.",
  36625. TrailingDecorator: "Decorators must be attached to a class element.",
  36626. TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  36627. TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  36628. TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  36629. UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
  36630. UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
  36631. UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
  36632. UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",
  36633. UnexpectedKeyword: ({
  36634. keyword
  36635. }) => `Unexpected keyword '${keyword}'.`,
  36636. UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",
  36637. UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",
  36638. UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",
  36639. UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",
  36640. UnexpectedPrivateField: "Unexpected private name.",
  36641. UnexpectedReservedWord: ({
  36642. reservedWord
  36643. }) => `Unexpected reserved word '${reservedWord}'.`,
  36644. UnexpectedSuper: "'super' is only allowed in object methods and classes.",
  36645. UnexpectedToken: ({
  36646. expected,
  36647. unexpected
  36648. }) => `Unexpected token${unexpected ? ` '${unexpected}'.` : ""}${expected ? `, expected "${expected}"` : ""}`,
  36649. UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
  36650. UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script`.",
  36651. UnsupportedBind: "Binding should be performed on object property.",
  36652. UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
  36653. UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
  36654. UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
  36655. UnsupportedMetaProperty: ({
  36656. target,
  36657. onlyValidPropertyName
  36658. }) => `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,
  36659. UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
  36660. UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
  36661. UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
  36662. UnterminatedComment: "Unterminated comment.",
  36663. UnterminatedRegExp: "Unterminated regular expression.",
  36664. UnterminatedString: "Unterminated string constant.",
  36665. UnterminatedTemplate: "Unterminated template.",
  36666. UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.",
  36667. VarRedeclaration: ({
  36668. identifierName
  36669. }) => `Identifier '${identifierName}' has already been declared.`,
  36670. YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
  36671. YieldInParameter: "Yield expression is not allowed in formal parameters.",
  36672. ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
  36673. };
  36674. var StrictModeErrors = {
  36675. StrictDelete: "Deleting local variable in strict mode.",
  36676. StrictEvalArguments: ({
  36677. referenceName
  36678. }) => `Assigning to '${referenceName}' in strict mode.`,
  36679. StrictEvalArgumentsBinding: ({
  36680. bindingName
  36681. }) => `Binding '${bindingName}' in strict mode.`,
  36682. StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",
  36683. StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
  36684. StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
  36685. StrictWith: "'with' in strict mode."
  36686. };
  36687. var UnparenthesizedPipeBodyDescriptions = /* @__PURE__ */ new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]);
  36688. var PipelineOperatorErrors = {
  36689. PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",
  36690. PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',
  36691. PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",
  36692. PipeTopicUnconfiguredToken: ({
  36693. token: token2
  36694. }) => `Invalid topic token ${token2}. In order to use ${token2} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${token2}" }.`,
  36695. PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",
  36696. PipeUnparenthesizedBody: ({
  36697. type
  36698. }) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({
  36699. type
  36700. })}; please wrap it in parentheses.`,
  36701. PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
  36702. PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
  36703. PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
  36704. PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
  36705. PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
  36706. PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'
  36707. };
  36708. var _excluded$1 = ["toMessage"];
  36709. var _excluded2$1 = ["message"];
  36710. function toParseErrorConstructor(_ref) {
  36711. let {
  36712. toMessage
  36713. } = _ref, properties = _objectWithoutPropertiesLoose(_ref, _excluded$1);
  36714. return function constructor({
  36715. loc,
  36716. details
  36717. }) {
  36718. return instantiate(SyntaxError, Object.assign({}, properties, {
  36719. loc
  36720. }), {
  36721. clone(overrides = {}) {
  36722. const loc2 = overrides.loc || {};
  36723. return constructor({
  36724. loc: new Position5("line" in loc2 ? loc2.line : this.loc.line, "column" in loc2 ? loc2.column : this.loc.column, "index" in loc2 ? loc2.index : this.loc.index),
  36725. details: Object.assign({}, this.details, overrides.details)
  36726. });
  36727. },
  36728. details: {
  36729. value: details,
  36730. enumerable: false
  36731. },
  36732. message: {
  36733. get() {
  36734. return `${toMessage(this.details)} (${this.loc.line}:${this.loc.column})`;
  36735. },
  36736. set(value2) {
  36737. Object.defineProperty(this, "message", {
  36738. value: value2
  36739. });
  36740. }
  36741. },
  36742. pos: {
  36743. reflect: "loc.index",
  36744. enumerable: true
  36745. },
  36746. missingPlugin: "missingPlugin" in details && {
  36747. reflect: "details.missingPlugin",
  36748. enumerable: true
  36749. }
  36750. });
  36751. };
  36752. }
  36753. function ParseErrorEnum(argument, syntaxPlugin) {
  36754. if (Array.isArray(argument)) {
  36755. return (parseErrorTemplates) => ParseErrorEnum(parseErrorTemplates, argument[0]);
  36756. }
  36757. const ParseErrorConstructors = {};
  36758. for (const reasonCode of Object.keys(argument)) {
  36759. const template = argument[reasonCode];
  36760. const _ref2 = typeof template === "string" ? {
  36761. message: () => template
  36762. } : typeof template === "function" ? {
  36763. message: template
  36764. } : template, {
  36765. message
  36766. } = _ref2, rest = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
  36767. const toMessage = typeof message === "string" ? () => message : message;
  36768. ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({
  36769. code: ParseErrorCode.SyntaxError,
  36770. reasonCode,
  36771. toMessage
  36772. }, syntaxPlugin ? {
  36773. syntaxPlugin
  36774. } : {}, rest));
  36775. }
  36776. return ParseErrorConstructors;
  36777. }
  36778. var Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors));
  36779. var {
  36780. defineProperty
  36781. } = Object;
  36782. var toUnenumerable = (object, key2) => defineProperty(object, key2, {
  36783. enumerable: false,
  36784. value: object[key2]
  36785. });
  36786. function toESTreeLocation(node2) {
  36787. node2.loc.start && toUnenumerable(node2.loc.start, "index");
  36788. node2.loc.end && toUnenumerable(node2.loc.end, "index");
  36789. return node2;
  36790. }
  36791. var estree = (superClass) => class ESTreeParserMixin extends superClass {
  36792. parse() {
  36793. const file = toESTreeLocation(super.parse());
  36794. if (this.options.tokens) {
  36795. file.tokens = file.tokens.map(toESTreeLocation);
  36796. }
  36797. return file;
  36798. }
  36799. parseRegExpLiteral({
  36800. pattern,
  36801. flags
  36802. }) {
  36803. let regex2 = null;
  36804. try {
  36805. regex2 = new RegExp(pattern, flags);
  36806. } catch (e) {
  36807. }
  36808. const node2 = this.estreeParseLiteral(regex2);
  36809. node2.regex = {
  36810. pattern,
  36811. flags
  36812. };
  36813. return node2;
  36814. }
  36815. parseBigIntLiteral(value2) {
  36816. let bigInt;
  36817. try {
  36818. bigInt = BigInt(value2);
  36819. } catch (_unused) {
  36820. bigInt = null;
  36821. }
  36822. const node2 = this.estreeParseLiteral(bigInt);
  36823. node2.bigint = String(node2.value || value2);
  36824. return node2;
  36825. }
  36826. parseDecimalLiteral(value2) {
  36827. const decimal = null;
  36828. const node2 = this.estreeParseLiteral(decimal);
  36829. node2.decimal = String(node2.value || value2);
  36830. return node2;
  36831. }
  36832. estreeParseLiteral(value2) {
  36833. return this.parseLiteral(value2, "Literal");
  36834. }
  36835. parseStringLiteral(value2) {
  36836. return this.estreeParseLiteral(value2);
  36837. }
  36838. parseNumericLiteral(value2) {
  36839. return this.estreeParseLiteral(value2);
  36840. }
  36841. parseNullLiteral() {
  36842. return this.estreeParseLiteral(null);
  36843. }
  36844. parseBooleanLiteral(value2) {
  36845. return this.estreeParseLiteral(value2);
  36846. }
  36847. directiveToStmt(directive) {
  36848. const expression = directive.value;
  36849. delete directive.value;
  36850. expression.type = "Literal";
  36851. expression.raw = expression.extra.raw;
  36852. expression.value = expression.extra.expressionValue;
  36853. const stmt = directive;
  36854. stmt.type = "ExpressionStatement";
  36855. stmt.expression = expression;
  36856. stmt.directive = expression.extra.rawValue;
  36857. delete expression.extra;
  36858. return stmt;
  36859. }
  36860. initFunction(node2, isAsync) {
  36861. super.initFunction(node2, isAsync);
  36862. node2.expression = false;
  36863. }
  36864. checkDeclaration(node2) {
  36865. if (node2 != null && this.isObjectProperty(node2)) {
  36866. this.checkDeclaration(node2.value);
  36867. } else {
  36868. super.checkDeclaration(node2);
  36869. }
  36870. }
  36871. getObjectOrClassMethodParams(method) {
  36872. return method.value.params;
  36873. }
  36874. isValidDirective(stmt) {
  36875. var _stmt$expression$extr;
  36876. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);
  36877. }
  36878. parseBlockBody(node2, allowDirectives, topLevel, end, afterBlockParse) {
  36879. super.parseBlockBody(node2, allowDirectives, topLevel, end, afterBlockParse);
  36880. const directiveStatements = node2.directives.map((d) => this.directiveToStmt(d));
  36881. node2.body = directiveStatements.concat(node2.body);
  36882. delete node2.directives;
  36883. }
  36884. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  36885. this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
  36886. if (method.typeParameters) {
  36887. method.value.typeParameters = method.typeParameters;
  36888. delete method.typeParameters;
  36889. }
  36890. classBody.body.push(method);
  36891. }
  36892. parsePrivateName() {
  36893. const node2 = super.parsePrivateName();
  36894. {
  36895. if (!this.getPluginOption("estree", "classFeatures")) {
  36896. return node2;
  36897. }
  36898. }
  36899. return this.convertPrivateNameToPrivateIdentifier(node2);
  36900. }
  36901. convertPrivateNameToPrivateIdentifier(node2) {
  36902. const name2 = super.getPrivateNameSV(node2);
  36903. node2 = node2;
  36904. delete node2.id;
  36905. node2.name = name2;
  36906. node2.type = "PrivateIdentifier";
  36907. return node2;
  36908. }
  36909. isPrivateName(node2) {
  36910. {
  36911. if (!this.getPluginOption("estree", "classFeatures")) {
  36912. return super.isPrivateName(node2);
  36913. }
  36914. }
  36915. return node2.type === "PrivateIdentifier";
  36916. }
  36917. getPrivateNameSV(node2) {
  36918. {
  36919. if (!this.getPluginOption("estree", "classFeatures")) {
  36920. return super.getPrivateNameSV(node2);
  36921. }
  36922. }
  36923. return node2.name;
  36924. }
  36925. parseLiteral(value2, type) {
  36926. const node2 = super.parseLiteral(value2, type);
  36927. node2.raw = node2.extra.raw;
  36928. delete node2.extra;
  36929. return node2;
  36930. }
  36931. parseFunctionBody(node2, allowExpression, isMethod = false) {
  36932. super.parseFunctionBody(node2, allowExpression, isMethod);
  36933. node2.expression = node2.body.type !== "BlockStatement";
  36934. }
  36935. parseMethod(node2, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  36936. let funcNode = this.startNode();
  36937. funcNode.kind = node2.kind;
  36938. funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  36939. funcNode.type = "FunctionExpression";
  36940. delete funcNode.kind;
  36941. node2.value = funcNode;
  36942. if (type === "ClassPrivateMethod") {
  36943. node2.computed = false;
  36944. }
  36945. return this.finishNode(node2, "MethodDefinition");
  36946. }
  36947. parseClassProperty(...args) {
  36948. const propertyNode = super.parseClassProperty(...args);
  36949. {
  36950. if (!this.getPluginOption("estree", "classFeatures")) {
  36951. return propertyNode;
  36952. }
  36953. }
  36954. propertyNode.type = "PropertyDefinition";
  36955. return propertyNode;
  36956. }
  36957. parseClassPrivateProperty(...args) {
  36958. const propertyNode = super.parseClassPrivateProperty(...args);
  36959. {
  36960. if (!this.getPluginOption("estree", "classFeatures")) {
  36961. return propertyNode;
  36962. }
  36963. }
  36964. propertyNode.type = "PropertyDefinition";
  36965. propertyNode.computed = false;
  36966. return propertyNode;
  36967. }
  36968. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  36969. const node2 = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor);
  36970. if (node2) {
  36971. node2.type = "Property";
  36972. if (node2.kind === "method") {
  36973. node2.kind = "init";
  36974. }
  36975. node2.shorthand = false;
  36976. }
  36977. return node2;
  36978. }
  36979. parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) {
  36980. const node2 = super.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors);
  36981. if (node2) {
  36982. node2.kind = "init";
  36983. node2.type = "Property";
  36984. }
  36985. return node2;
  36986. }
  36987. isValidLVal(type, isUnparenthesizedInAssign, binding) {
  36988. return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding);
  36989. }
  36990. isAssignable(node2, isBinding) {
  36991. if (node2 != null && this.isObjectProperty(node2)) {
  36992. return this.isAssignable(node2.value, isBinding);
  36993. }
  36994. return super.isAssignable(node2, isBinding);
  36995. }
  36996. toAssignable(node2, isLHS = false) {
  36997. if (node2 != null && this.isObjectProperty(node2)) {
  36998. const {
  36999. key: key2,
  37000. value: value2
  37001. } = node2;
  37002. if (this.isPrivateName(key2)) {
  37003. this.classScope.usePrivateName(this.getPrivateNameSV(key2), key2.loc.start);
  37004. }
  37005. this.toAssignable(value2, isLHS);
  37006. } else {
  37007. super.toAssignable(node2, isLHS);
  37008. }
  37009. }
  37010. toAssignableObjectExpressionProp(prop, isLast, isLHS) {
  37011. if (prop.kind === "get" || prop.kind === "set") {
  37012. this.raise(Errors.PatternHasAccessor, {
  37013. at: prop.key
  37014. });
  37015. } else if (prop.method) {
  37016. this.raise(Errors.PatternHasMethod, {
  37017. at: prop.key
  37018. });
  37019. } else {
  37020. super.toAssignableObjectExpressionProp(prop, isLast, isLHS);
  37021. }
  37022. }
  37023. finishCallExpression(unfinished, optional) {
  37024. const node2 = super.finishCallExpression(unfinished, optional);
  37025. if (node2.callee.type === "Import") {
  37026. node2.type = "ImportExpression";
  37027. node2.source = node2.arguments[0];
  37028. if (this.hasPlugin("importAssertions")) {
  37029. var _node$arguments$;
  37030. node2.attributes = (_node$arguments$ = node2.arguments[1]) != null ? _node$arguments$ : null;
  37031. }
  37032. delete node2.arguments;
  37033. delete node2.callee;
  37034. }
  37035. return node2;
  37036. }
  37037. toReferencedArguments(node2) {
  37038. if (node2.type === "ImportExpression") {
  37039. return;
  37040. }
  37041. super.toReferencedArguments(node2);
  37042. }
  37043. parseExport(unfinished, decorators) {
  37044. const exportStartLoc = this.state.lastTokStartLoc;
  37045. const node2 = super.parseExport(unfinished, decorators);
  37046. switch (node2.type) {
  37047. case "ExportAllDeclaration":
  37048. node2.exported = null;
  37049. break;
  37050. case "ExportNamedDeclaration":
  37051. if (node2.specifiers.length === 1 && node2.specifiers[0].type === "ExportNamespaceSpecifier") {
  37052. node2.type = "ExportAllDeclaration";
  37053. node2.exported = node2.specifiers[0].exported;
  37054. delete node2.specifiers;
  37055. }
  37056. case "ExportDefaultDeclaration":
  37057. {
  37058. var _declaration$decorato;
  37059. const {
  37060. declaration
  37061. } = node2;
  37062. if ((declaration == null ? void 0 : declaration.type) === "ClassDeclaration" && ((_declaration$decorato = declaration.decorators) == null ? void 0 : _declaration$decorato.length) > 0 && declaration.start === node2.start) {
  37063. this.resetStartLocation(node2, exportStartLoc);
  37064. }
  37065. }
  37066. break;
  37067. }
  37068. return node2;
  37069. }
  37070. parseSubscript(base2, startLoc, noCalls, state) {
  37071. const node2 = super.parseSubscript(base2, startLoc, noCalls, state);
  37072. if (state.optionalChainMember) {
  37073. if (node2.type === "OptionalMemberExpression" || node2.type === "OptionalCallExpression") {
  37074. node2.type = node2.type.substring(8);
  37075. }
  37076. if (state.stop) {
  37077. const chain = this.startNodeAtNode(node2);
  37078. chain.expression = node2;
  37079. return this.finishNode(chain, "ChainExpression");
  37080. }
  37081. } else if (node2.type === "MemberExpression" || node2.type === "CallExpression") {
  37082. node2.optional = false;
  37083. }
  37084. return node2;
  37085. }
  37086. hasPropertyAsPrivateName(node2) {
  37087. if (node2.type === "ChainExpression") {
  37088. node2 = node2.expression;
  37089. }
  37090. return super.hasPropertyAsPrivateName(node2);
  37091. }
  37092. isObjectProperty(node2) {
  37093. return node2.type === "Property" && node2.kind === "init" && !node2.method;
  37094. }
  37095. isObjectMethod(node2) {
  37096. return node2.method || node2.kind === "get" || node2.kind === "set";
  37097. }
  37098. finishNodeAt(node2, type, endLoc) {
  37099. return toESTreeLocation(super.finishNodeAt(node2, type, endLoc));
  37100. }
  37101. resetStartLocation(node2, startLoc) {
  37102. super.resetStartLocation(node2, startLoc);
  37103. toESTreeLocation(node2);
  37104. }
  37105. resetEndLocation(node2, endLoc = this.state.lastTokEndLoc) {
  37106. super.resetEndLocation(node2, endLoc);
  37107. toESTreeLocation(node2);
  37108. }
  37109. };
  37110. var nonASCIIidentifierStartChars3 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  37111. var nonASCIIidentifierChars3 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  37112. var nonASCIIidentifierStart3 = new RegExp("[" + nonASCIIidentifierStartChars3 + "]");
  37113. var nonASCIIidentifier3 = new RegExp("[" + nonASCIIidentifierStartChars3 + nonASCIIidentifierChars3 + "]");
  37114. nonASCIIidentifierStartChars3 = nonASCIIidentifierChars3 = null;
  37115. var astralIdentifierStartCodes3 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191];
  37116. var astralIdentifierCodes3 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  37117. function isInAstralSet3(code2, set) {
  37118. let pos2 = 65536;
  37119. for (let i = 0, length = set.length; i < length; i += 2) {
  37120. pos2 += set[i];
  37121. if (pos2 > code2)
  37122. return false;
  37123. pos2 += set[i + 1];
  37124. if (pos2 >= code2)
  37125. return true;
  37126. }
  37127. return false;
  37128. }
  37129. function isIdentifierStart3(code2) {
  37130. if (code2 < 65)
  37131. return code2 === 36;
  37132. if (code2 <= 90)
  37133. return true;
  37134. if (code2 < 97)
  37135. return code2 === 95;
  37136. if (code2 <= 122)
  37137. return true;
  37138. if (code2 <= 65535) {
  37139. return code2 >= 170 && nonASCIIidentifierStart3.test(String.fromCharCode(code2));
  37140. }
  37141. return isInAstralSet3(code2, astralIdentifierStartCodes3);
  37142. }
  37143. function isIdentifierChar3(code2) {
  37144. if (code2 < 48)
  37145. return code2 === 36;
  37146. if (code2 < 58)
  37147. return true;
  37148. if (code2 < 65)
  37149. return false;
  37150. if (code2 <= 90)
  37151. return true;
  37152. if (code2 < 97)
  37153. return code2 === 95;
  37154. if (code2 <= 122)
  37155. return true;
  37156. if (code2 <= 65535) {
  37157. return code2 >= 170 && nonASCIIidentifier3.test(String.fromCharCode(code2));
  37158. }
  37159. return isInAstralSet3(code2, astralIdentifierStartCodes3) || isInAstralSet3(code2, astralIdentifierCodes3);
  37160. }
  37161. var reservedWords3 = {
  37162. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  37163. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  37164. strictBind: ["eval", "arguments"]
  37165. };
  37166. var keywords3 = new Set(reservedWords3.keyword);
  37167. var reservedWordsStrictSet = new Set(reservedWords3.strict);
  37168. var reservedWordsStrictBindSet = new Set(reservedWords3.strictBind);
  37169. function isReservedWord(word, inModule) {
  37170. return inModule && word === "await" || word === "enum";
  37171. }
  37172. function isStrictReservedWord(word, inModule) {
  37173. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  37174. }
  37175. function isStrictBindOnlyReservedWord(word) {
  37176. return reservedWordsStrictBindSet.has(word);
  37177. }
  37178. function isStrictBindReservedWord(word, inModule) {
  37179. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  37180. }
  37181. function isKeyword(word) {
  37182. return keywords3.has(word);
  37183. }
  37184. function isIteratorStart(current3, next, next2) {
  37185. return current3 === 64 && next === 64 && isIdentifierStart3(next2);
  37186. }
  37187. var reservedWordLikeSet = /* @__PURE__ */ new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
  37188. function canBeReservedWord(word) {
  37189. return reservedWordLikeSet.has(word);
  37190. }
  37191. var SCOPE_OTHER = 0;
  37192. var SCOPE_PROGRAM = 1;
  37193. var SCOPE_FUNCTION3 = 2;
  37194. var SCOPE_ARROW3 = 4;
  37195. var SCOPE_SIMPLE_CATCH3 = 8;
  37196. var SCOPE_SUPER3 = 16;
  37197. var SCOPE_DIRECT_SUPER3 = 32;
  37198. var SCOPE_CLASS = 64;
  37199. var SCOPE_STATIC_BLOCK = 128;
  37200. var SCOPE_TS_MODULE = 256;
  37201. var SCOPE_VAR3 = SCOPE_PROGRAM | SCOPE_FUNCTION3 | SCOPE_STATIC_BLOCK | SCOPE_TS_MODULE;
  37202. var BIND_KIND_VALUE = 1;
  37203. var BIND_KIND_TYPE = 2;
  37204. var BIND_SCOPE_VAR = 4;
  37205. var BIND_SCOPE_LEXICAL = 8;
  37206. var BIND_SCOPE_FUNCTION = 16;
  37207. var BIND_FLAGS_NONE = 64;
  37208. var BIND_FLAGS_CLASS = 128;
  37209. var BIND_FLAGS_TS_ENUM = 256;
  37210. var BIND_FLAGS_TS_CONST_ENUM = 512;
  37211. var BIND_FLAGS_TS_EXPORT_ONLY = 1024;
  37212. var BIND_FLAGS_FLOW_DECLARE_FN = 2048;
  37213. var BIND_FLAGS_TS_IMPORT = 4096;
  37214. var BIND_FLAGS_NO_LET_IN_LEXICAL = 8192;
  37215. var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS | BIND_FLAGS_NO_LET_IN_LEXICAL;
  37216. var BIND_LEXICAL3 = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | BIND_FLAGS_NO_LET_IN_LEXICAL;
  37217. var BIND_CATCH_PARAM = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0;
  37218. var BIND_VAR3 = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0;
  37219. var BIND_FUNCTION3 = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0;
  37220. var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS;
  37221. var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0;
  37222. var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM | BIND_FLAGS_NO_LET_IN_LEXICAL;
  37223. var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  37224. var BIND_NONE3 = 0 | 0 | 0 | BIND_FLAGS_NONE;
  37225. var BIND_OUTSIDE3 = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE;
  37226. var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM;
  37227. var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  37228. var BIND_TS_TYPE_IMPORT = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_TS_IMPORT;
  37229. var BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;
  37230. var CLASS_ELEMENT_FLAG_STATIC = 4;
  37231. var CLASS_ELEMENT_KIND_GETTER = 2;
  37232. var CLASS_ELEMENT_KIND_SETTER = 1;
  37233. var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
  37234. var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC;
  37235. var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC;
  37236. var CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER;
  37237. var CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER;
  37238. var CLASS_ELEMENT_OTHER = 0;
  37239. var Scope6 = class {
  37240. constructor(flags) {
  37241. this.var = /* @__PURE__ */ new Set();
  37242. this.lexical = /* @__PURE__ */ new Set();
  37243. this.functions = /* @__PURE__ */ new Set();
  37244. this.flags = flags;
  37245. }
  37246. };
  37247. var ScopeHandler = class {
  37248. constructor(parser, inModule) {
  37249. this.parser = void 0;
  37250. this.scopeStack = [];
  37251. this.inModule = void 0;
  37252. this.undefinedExports = /* @__PURE__ */ new Map();
  37253. this.parser = parser;
  37254. this.inModule = inModule;
  37255. }
  37256. get inTopLevel() {
  37257. return (this.currentScope().flags & SCOPE_PROGRAM) > 0;
  37258. }
  37259. get inFunction() {
  37260. return (this.currentVarScopeFlags() & SCOPE_FUNCTION3) > 0;
  37261. }
  37262. get allowSuper() {
  37263. return (this.currentThisScopeFlags() & SCOPE_SUPER3) > 0;
  37264. }
  37265. get allowDirectSuper() {
  37266. return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER3) > 0;
  37267. }
  37268. get inClass() {
  37269. return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0;
  37270. }
  37271. get inClassAndNotInNonArrowFunction() {
  37272. const flags = this.currentThisScopeFlags();
  37273. return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION3) === 0;
  37274. }
  37275. get inStaticBlock() {
  37276. for (let i = this.scopeStack.length - 1; ; i--) {
  37277. const {
  37278. flags
  37279. } = this.scopeStack[i];
  37280. if (flags & SCOPE_STATIC_BLOCK) {
  37281. return true;
  37282. }
  37283. if (flags & (SCOPE_VAR3 | SCOPE_CLASS)) {
  37284. return false;
  37285. }
  37286. }
  37287. }
  37288. get inNonArrowFunction() {
  37289. return (this.currentThisScopeFlags() & SCOPE_FUNCTION3) > 0;
  37290. }
  37291. get treatFunctionsAsVar() {
  37292. return this.treatFunctionsAsVarInScope(this.currentScope());
  37293. }
  37294. createScope(flags) {
  37295. return new Scope6(flags);
  37296. }
  37297. enter(flags) {
  37298. this.scopeStack.push(this.createScope(flags));
  37299. }
  37300. exit() {
  37301. const scope = this.scopeStack.pop();
  37302. return scope.flags;
  37303. }
  37304. treatFunctionsAsVarInScope(scope) {
  37305. return !!(scope.flags & (SCOPE_FUNCTION3 | SCOPE_STATIC_BLOCK) || !this.parser.inModule && scope.flags & SCOPE_PROGRAM);
  37306. }
  37307. declareName(name2, bindingType, loc) {
  37308. let scope = this.currentScope();
  37309. if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
  37310. this.checkRedeclarationInScope(scope, name2, bindingType, loc);
  37311. if (bindingType & BIND_SCOPE_FUNCTION) {
  37312. scope.functions.add(name2);
  37313. } else {
  37314. scope.lexical.add(name2);
  37315. }
  37316. if (bindingType & BIND_SCOPE_LEXICAL) {
  37317. this.maybeExportDefined(scope, name2);
  37318. }
  37319. } else if (bindingType & BIND_SCOPE_VAR) {
  37320. for (let i = this.scopeStack.length - 1; i >= 0; --i) {
  37321. scope = this.scopeStack[i];
  37322. this.checkRedeclarationInScope(scope, name2, bindingType, loc);
  37323. scope.var.add(name2);
  37324. this.maybeExportDefined(scope, name2);
  37325. if (scope.flags & SCOPE_VAR3)
  37326. break;
  37327. }
  37328. }
  37329. if (this.parser.inModule && scope.flags & SCOPE_PROGRAM) {
  37330. this.undefinedExports.delete(name2);
  37331. }
  37332. }
  37333. maybeExportDefined(scope, name2) {
  37334. if (this.parser.inModule && scope.flags & SCOPE_PROGRAM) {
  37335. this.undefinedExports.delete(name2);
  37336. }
  37337. }
  37338. checkRedeclarationInScope(scope, name2, bindingType, loc) {
  37339. if (this.isRedeclaredInScope(scope, name2, bindingType)) {
  37340. this.parser.raise(Errors.VarRedeclaration, {
  37341. at: loc,
  37342. identifierName: name2
  37343. });
  37344. }
  37345. }
  37346. isRedeclaredInScope(scope, name2, bindingType) {
  37347. if (!(bindingType & BIND_KIND_VALUE))
  37348. return false;
  37349. if (bindingType & BIND_SCOPE_LEXICAL) {
  37350. return scope.lexical.has(name2) || scope.functions.has(name2) || scope.var.has(name2);
  37351. }
  37352. if (bindingType & BIND_SCOPE_FUNCTION) {
  37353. return scope.lexical.has(name2) || !this.treatFunctionsAsVarInScope(scope) && scope.var.has(name2);
  37354. }
  37355. return scope.lexical.has(name2) && !(scope.flags & SCOPE_SIMPLE_CATCH3 && scope.lexical.values().next().value === name2) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name2);
  37356. }
  37357. checkLocalExport(id) {
  37358. const {
  37359. name: name2
  37360. } = id;
  37361. const topLevelScope = this.scopeStack[0];
  37362. if (!topLevelScope.lexical.has(name2) && !topLevelScope.var.has(name2) && !topLevelScope.functions.has(name2)) {
  37363. this.undefinedExports.set(name2, id.loc.start);
  37364. }
  37365. }
  37366. currentScope() {
  37367. return this.scopeStack[this.scopeStack.length - 1];
  37368. }
  37369. currentVarScopeFlags() {
  37370. for (let i = this.scopeStack.length - 1; ; i--) {
  37371. const {
  37372. flags
  37373. } = this.scopeStack[i];
  37374. if (flags & SCOPE_VAR3) {
  37375. return flags;
  37376. }
  37377. }
  37378. }
  37379. currentThisScopeFlags() {
  37380. for (let i = this.scopeStack.length - 1; ; i--) {
  37381. const {
  37382. flags
  37383. } = this.scopeStack[i];
  37384. if (flags & (SCOPE_VAR3 | SCOPE_CLASS) && !(flags & SCOPE_ARROW3)) {
  37385. return flags;
  37386. }
  37387. }
  37388. }
  37389. };
  37390. var FlowScope = class extends Scope6 {
  37391. constructor(...args) {
  37392. super(...args);
  37393. this.declareFunctions = /* @__PURE__ */ new Set();
  37394. }
  37395. };
  37396. var FlowScopeHandler = class extends ScopeHandler {
  37397. createScope(flags) {
  37398. return new FlowScope(flags);
  37399. }
  37400. declareName(name2, bindingType, loc) {
  37401. const scope = this.currentScope();
  37402. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  37403. this.checkRedeclarationInScope(scope, name2, bindingType, loc);
  37404. this.maybeExportDefined(scope, name2);
  37405. scope.declareFunctions.add(name2);
  37406. return;
  37407. }
  37408. super.declareName(name2, bindingType, loc);
  37409. }
  37410. isRedeclaredInScope(scope, name2, bindingType) {
  37411. if (super.isRedeclaredInScope(scope, name2, bindingType))
  37412. return true;
  37413. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  37414. return !scope.declareFunctions.has(name2) && (scope.lexical.has(name2) || scope.functions.has(name2));
  37415. }
  37416. return false;
  37417. }
  37418. checkLocalExport(id) {
  37419. if (!this.scopeStack[0].declareFunctions.has(id.name)) {
  37420. super.checkLocalExport(id);
  37421. }
  37422. }
  37423. };
  37424. var BaseParser = class {
  37425. constructor() {
  37426. this.sawUnambiguousESM = false;
  37427. this.ambiguousScriptDifferentAst = false;
  37428. }
  37429. hasPlugin(pluginConfig) {
  37430. if (typeof pluginConfig === "string") {
  37431. return this.plugins.has(pluginConfig);
  37432. } else {
  37433. const [pluginName, pluginOptions] = pluginConfig;
  37434. if (!this.hasPlugin(pluginName)) {
  37435. return false;
  37436. }
  37437. const actualOptions = this.plugins.get(pluginName);
  37438. for (const key2 of Object.keys(pluginOptions)) {
  37439. if ((actualOptions == null ? void 0 : actualOptions[key2]) !== pluginOptions[key2]) {
  37440. return false;
  37441. }
  37442. }
  37443. return true;
  37444. }
  37445. }
  37446. getPluginOption(plugin2, name2) {
  37447. var _this$plugins$get;
  37448. return (_this$plugins$get = this.plugins.get(plugin2)) == null ? void 0 : _this$plugins$get[name2];
  37449. }
  37450. };
  37451. function setTrailingComments(node2, comments) {
  37452. if (node2.trailingComments === void 0) {
  37453. node2.trailingComments = comments;
  37454. } else {
  37455. node2.trailingComments.unshift(...comments);
  37456. }
  37457. }
  37458. function setLeadingComments(node2, comments) {
  37459. if (node2.leadingComments === void 0) {
  37460. node2.leadingComments = comments;
  37461. } else {
  37462. node2.leadingComments.unshift(...comments);
  37463. }
  37464. }
  37465. function setInnerComments(node2, comments) {
  37466. if (node2.innerComments === void 0) {
  37467. node2.innerComments = comments;
  37468. } else {
  37469. node2.innerComments.unshift(...comments);
  37470. }
  37471. }
  37472. function adjustInnerComments(node2, elements, commentWS) {
  37473. let lastElement = null;
  37474. let i = elements.length;
  37475. while (lastElement === null && i > 0) {
  37476. lastElement = elements[--i];
  37477. }
  37478. if (lastElement === null || lastElement.start > commentWS.start) {
  37479. setInnerComments(node2, commentWS.comments);
  37480. } else {
  37481. setTrailingComments(lastElement, commentWS.comments);
  37482. }
  37483. }
  37484. var CommentsParser = class extends BaseParser {
  37485. addComment(comment2) {
  37486. if (this.filename)
  37487. comment2.loc.filename = this.filename;
  37488. this.state.comments.push(comment2);
  37489. }
  37490. processComment(node2) {
  37491. const {
  37492. commentStack
  37493. } = this.state;
  37494. const commentStackLength = commentStack.length;
  37495. if (commentStackLength === 0)
  37496. return;
  37497. let i = commentStackLength - 1;
  37498. const lastCommentWS = commentStack[i];
  37499. if (lastCommentWS.start === node2.end) {
  37500. lastCommentWS.leadingNode = node2;
  37501. i--;
  37502. }
  37503. const {
  37504. start: nodeStart
  37505. } = node2;
  37506. for (; i >= 0; i--) {
  37507. const commentWS = commentStack[i];
  37508. const commentEnd = commentWS.end;
  37509. if (commentEnd > nodeStart) {
  37510. commentWS.containingNode = node2;
  37511. this.finalizeComment(commentWS);
  37512. commentStack.splice(i, 1);
  37513. } else {
  37514. if (commentEnd === nodeStart) {
  37515. commentWS.trailingNode = node2;
  37516. }
  37517. break;
  37518. }
  37519. }
  37520. }
  37521. finalizeComment(commentWS) {
  37522. const {
  37523. comments
  37524. } = commentWS;
  37525. if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {
  37526. if (commentWS.leadingNode !== null) {
  37527. setTrailingComments(commentWS.leadingNode, comments);
  37528. }
  37529. if (commentWS.trailingNode !== null) {
  37530. setLeadingComments(commentWS.trailingNode, comments);
  37531. }
  37532. } else {
  37533. const {
  37534. containingNode: node2,
  37535. start: commentStart
  37536. } = commentWS;
  37537. if (this.input.charCodeAt(commentStart - 1) === 44) {
  37538. switch (node2.type) {
  37539. case "ObjectExpression":
  37540. case "ObjectPattern":
  37541. case "RecordExpression":
  37542. adjustInnerComments(node2, node2.properties, commentWS);
  37543. break;
  37544. case "CallExpression":
  37545. case "OptionalCallExpression":
  37546. adjustInnerComments(node2, node2.arguments, commentWS);
  37547. break;
  37548. case "FunctionDeclaration":
  37549. case "FunctionExpression":
  37550. case "ArrowFunctionExpression":
  37551. case "ObjectMethod":
  37552. case "ClassMethod":
  37553. case "ClassPrivateMethod":
  37554. adjustInnerComments(node2, node2.params, commentWS);
  37555. break;
  37556. case "ArrayExpression":
  37557. case "ArrayPattern":
  37558. case "TupleExpression":
  37559. adjustInnerComments(node2, node2.elements, commentWS);
  37560. break;
  37561. case "ExportNamedDeclaration":
  37562. case "ImportDeclaration":
  37563. adjustInnerComments(node2, node2.specifiers, commentWS);
  37564. break;
  37565. default: {
  37566. setInnerComments(node2, comments);
  37567. }
  37568. }
  37569. } else {
  37570. setInnerComments(node2, comments);
  37571. }
  37572. }
  37573. }
  37574. finalizeRemainingComments() {
  37575. const {
  37576. commentStack
  37577. } = this.state;
  37578. for (let i = commentStack.length - 1; i >= 0; i--) {
  37579. this.finalizeComment(commentStack[i]);
  37580. }
  37581. this.state.commentStack = [];
  37582. }
  37583. resetPreviousNodeTrailingComments(node2) {
  37584. const {
  37585. commentStack
  37586. } = this.state;
  37587. const {
  37588. length
  37589. } = commentStack;
  37590. if (length === 0)
  37591. return;
  37592. const commentWS = commentStack[length - 1];
  37593. if (commentWS.leadingNode === node2) {
  37594. commentWS.leadingNode = null;
  37595. }
  37596. }
  37597. takeSurroundingComments(node2, start3, end) {
  37598. const {
  37599. commentStack
  37600. } = this.state;
  37601. const commentStackLength = commentStack.length;
  37602. if (commentStackLength === 0)
  37603. return;
  37604. let i = commentStackLength - 1;
  37605. for (; i >= 0; i--) {
  37606. const commentWS = commentStack[i];
  37607. const commentEnd = commentWS.end;
  37608. const commentStart = commentWS.start;
  37609. if (commentStart === end) {
  37610. commentWS.leadingNode = node2;
  37611. } else if (commentEnd === start3) {
  37612. commentWS.trailingNode = node2;
  37613. } else if (commentEnd < start3) {
  37614. break;
  37615. }
  37616. }
  37617. }
  37618. };
  37619. var lineBreak3 = /\r\n?|[\n\u2028\u2029]/;
  37620. var lineBreakG3 = new RegExp(lineBreak3.source, "g");
  37621. function isNewLine3(code2) {
  37622. switch (code2) {
  37623. case 10:
  37624. case 13:
  37625. case 8232:
  37626. case 8233:
  37627. return true;
  37628. default:
  37629. return false;
  37630. }
  37631. }
  37632. var skipWhiteSpace3 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  37633. var skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
  37634. var skipWhiteSpaceToLineBreak = new RegExp("(?=(" + skipWhiteSpaceInLine.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y");
  37635. function isWhitespace(code2) {
  37636. switch (code2) {
  37637. case 9:
  37638. case 11:
  37639. case 12:
  37640. case 32:
  37641. case 160:
  37642. case 5760:
  37643. case 8192:
  37644. case 8193:
  37645. case 8194:
  37646. case 8195:
  37647. case 8196:
  37648. case 8197:
  37649. case 8198:
  37650. case 8199:
  37651. case 8200:
  37652. case 8201:
  37653. case 8202:
  37654. case 8239:
  37655. case 8287:
  37656. case 12288:
  37657. case 65279:
  37658. return true;
  37659. default:
  37660. return false;
  37661. }
  37662. }
  37663. var State2 = class {
  37664. constructor() {
  37665. this.strict = void 0;
  37666. this.curLine = void 0;
  37667. this.lineStart = void 0;
  37668. this.startLoc = void 0;
  37669. this.endLoc = void 0;
  37670. this.errors = [];
  37671. this.potentialArrowAt = -1;
  37672. this.noArrowAt = [];
  37673. this.noArrowParamsConversionAt = [];
  37674. this.maybeInArrowParameters = false;
  37675. this.inType = false;
  37676. this.noAnonFunctionType = false;
  37677. this.hasFlowComment = false;
  37678. this.isAmbientContext = false;
  37679. this.inAbstractClass = false;
  37680. this.inDisallowConditionalTypesContext = false;
  37681. this.topicContext = {
  37682. maxNumOfResolvableTopics: 0,
  37683. maxTopicIndex: null
  37684. };
  37685. this.soloAwait = false;
  37686. this.inFSharpPipelineDirectBody = false;
  37687. this.labels = [];
  37688. this.comments = [];
  37689. this.commentStack = [];
  37690. this.pos = 0;
  37691. this.type = 137;
  37692. this.value = null;
  37693. this.start = 0;
  37694. this.end = 0;
  37695. this.lastTokEndLoc = null;
  37696. this.lastTokStartLoc = null;
  37697. this.lastTokStart = 0;
  37698. this.context = [types3.brace];
  37699. this.canStartJSXElement = true;
  37700. this.containsEsc = false;
  37701. this.firstInvalidTemplateEscapePos = null;
  37702. this.strictErrors = /* @__PURE__ */ new Map();
  37703. this.tokensLength = 0;
  37704. }
  37705. init({
  37706. strictMode,
  37707. sourceType,
  37708. startLine,
  37709. startColumn
  37710. }) {
  37711. this.strict = strictMode === false ? false : strictMode === true ? true : sourceType === "module";
  37712. this.curLine = startLine;
  37713. this.lineStart = -startColumn;
  37714. this.startLoc = this.endLoc = new Position5(startLine, startColumn, 0);
  37715. }
  37716. curPosition() {
  37717. return new Position5(this.curLine, this.pos - this.lineStart, this.pos);
  37718. }
  37719. clone(skipArrays) {
  37720. const state = new State2();
  37721. const keys2 = Object.keys(this);
  37722. for (let i = 0, length = keys2.length; i < length; i++) {
  37723. const key2 = keys2[i];
  37724. let val = this[key2];
  37725. if (!skipArrays && Array.isArray(val)) {
  37726. val = val.slice();
  37727. }
  37728. state[key2] = val;
  37729. }
  37730. return state;
  37731. }
  37732. };
  37733. var _isDigit = function isDigit(code2) {
  37734. return code2 >= 48 && code2 <= 57;
  37735. };
  37736. var forbiddenNumericSeparatorSiblings = {
  37737. decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
  37738. hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
  37739. };
  37740. var isAllowedNumericSeparatorSibling = {
  37741. bin: (ch) => ch === 48 || ch === 49,
  37742. oct: (ch) => ch >= 48 && ch <= 55,
  37743. dec: (ch) => ch >= 48 && ch <= 57,
  37744. hex: (ch) => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
  37745. };
  37746. function readStringContents(type, input, pos2, lineStart, curLine, errors) {
  37747. const initialPos = pos2;
  37748. const initialLineStart = lineStart;
  37749. const initialCurLine = curLine;
  37750. let out = "";
  37751. let firstInvalidLoc = null;
  37752. let chunkStart = pos2;
  37753. const {
  37754. length
  37755. } = input;
  37756. for (; ; ) {
  37757. if (pos2 >= length) {
  37758. errors.unterminated(initialPos, initialLineStart, initialCurLine);
  37759. out += input.slice(chunkStart, pos2);
  37760. break;
  37761. }
  37762. const ch = input.charCodeAt(pos2);
  37763. if (isStringEnd(type, ch, input, pos2)) {
  37764. out += input.slice(chunkStart, pos2);
  37765. break;
  37766. }
  37767. if (ch === 92) {
  37768. out += input.slice(chunkStart, pos2);
  37769. const res = readEscapedChar(input, pos2, lineStart, curLine, type === "template", errors);
  37770. if (res.ch === null && !firstInvalidLoc) {
  37771. firstInvalidLoc = {
  37772. pos: pos2,
  37773. lineStart,
  37774. curLine
  37775. };
  37776. } else {
  37777. out += res.ch;
  37778. }
  37779. ({
  37780. pos: pos2,
  37781. lineStart,
  37782. curLine
  37783. } = res);
  37784. chunkStart = pos2;
  37785. } else if (ch === 8232 || ch === 8233) {
  37786. ++pos2;
  37787. ++curLine;
  37788. lineStart = pos2;
  37789. } else if (ch === 10 || ch === 13) {
  37790. if (type === "template") {
  37791. out += input.slice(chunkStart, pos2) + "\n";
  37792. ++pos2;
  37793. if (ch === 13 && input.charCodeAt(pos2) === 10) {
  37794. ++pos2;
  37795. }
  37796. ++curLine;
  37797. chunkStart = lineStart = pos2;
  37798. } else {
  37799. errors.unterminated(initialPos, initialLineStart, initialCurLine);
  37800. }
  37801. } else {
  37802. ++pos2;
  37803. }
  37804. }
  37805. return {
  37806. pos: pos2,
  37807. str: out,
  37808. firstInvalidLoc,
  37809. lineStart,
  37810. curLine,
  37811. containsInvalid: !!firstInvalidLoc
  37812. };
  37813. }
  37814. function isStringEnd(type, ch, input, pos2) {
  37815. if (type === "template") {
  37816. return ch === 96 || ch === 36 && input.charCodeAt(pos2 + 1) === 123;
  37817. }
  37818. return ch === (type === "double" ? 34 : 39);
  37819. }
  37820. function readEscapedChar(input, pos2, lineStart, curLine, inTemplate, errors) {
  37821. const throwOnInvalid = !inTemplate;
  37822. pos2++;
  37823. const res = (ch2) => ({
  37824. pos: pos2,
  37825. ch: ch2,
  37826. lineStart,
  37827. curLine
  37828. });
  37829. const ch = input.charCodeAt(pos2++);
  37830. switch (ch) {
  37831. case 110:
  37832. return res("\n");
  37833. case 114:
  37834. return res("\r");
  37835. case 120: {
  37836. let code2;
  37837. ({
  37838. code: code2,
  37839. pos: pos2
  37840. } = readHexChar(input, pos2, lineStart, curLine, 2, false, throwOnInvalid, errors));
  37841. return res(code2 === null ? null : String.fromCharCode(code2));
  37842. }
  37843. case 117: {
  37844. let code2;
  37845. ({
  37846. code: code2,
  37847. pos: pos2
  37848. } = readCodePoint(input, pos2, lineStart, curLine, throwOnInvalid, errors));
  37849. return res(code2 === null ? null : String.fromCodePoint(code2));
  37850. }
  37851. case 116:
  37852. return res(" ");
  37853. case 98:
  37854. return res("\b");
  37855. case 118:
  37856. return res("\v");
  37857. case 102:
  37858. return res("\f");
  37859. case 13:
  37860. if (input.charCodeAt(pos2) === 10) {
  37861. ++pos2;
  37862. }
  37863. case 10:
  37864. lineStart = pos2;
  37865. ++curLine;
  37866. case 8232:
  37867. case 8233:
  37868. return res("");
  37869. case 56:
  37870. case 57:
  37871. if (inTemplate) {
  37872. return res(null);
  37873. } else {
  37874. errors.strictNumericEscape(pos2 - 1, lineStart, curLine);
  37875. }
  37876. default:
  37877. if (ch >= 48 && ch <= 55) {
  37878. const startPos = pos2 - 1;
  37879. const match = input.slice(startPos, pos2 + 2).match(/^[0-7]+/);
  37880. let octalStr = match[0];
  37881. let octal = parseInt(octalStr, 8);
  37882. if (octal > 255) {
  37883. octalStr = octalStr.slice(0, -1);
  37884. octal = parseInt(octalStr, 8);
  37885. }
  37886. pos2 += octalStr.length - 1;
  37887. const next = input.charCodeAt(pos2);
  37888. if (octalStr !== "0" || next === 56 || next === 57) {
  37889. if (inTemplate) {
  37890. return res(null);
  37891. } else {
  37892. errors.strictNumericEscape(startPos, lineStart, curLine);
  37893. }
  37894. }
  37895. return res(String.fromCharCode(octal));
  37896. }
  37897. return res(String.fromCharCode(ch));
  37898. }
  37899. }
  37900. function readHexChar(input, pos2, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
  37901. const initialPos = pos2;
  37902. let n;
  37903. ({
  37904. n,
  37905. pos: pos2
  37906. } = readInt(input, pos2, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
  37907. if (n === null) {
  37908. if (throwOnInvalid) {
  37909. errors.invalidEscapeSequence(initialPos, lineStart, curLine);
  37910. } else {
  37911. pos2 = initialPos - 1;
  37912. }
  37913. }
  37914. return {
  37915. code: n,
  37916. pos: pos2
  37917. };
  37918. }
  37919. function readInt(input, pos2, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
  37920. const start3 = pos2;
  37921. const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  37922. const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
  37923. let invalid2 = false;
  37924. let total = 0;
  37925. for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  37926. const code2 = input.charCodeAt(pos2);
  37927. let val;
  37928. if (code2 === 95 && allowNumSeparator !== "bail") {
  37929. const prev = input.charCodeAt(pos2 - 1);
  37930. const next = input.charCodeAt(pos2 + 1);
  37931. if (!allowNumSeparator) {
  37932. if (bailOnError)
  37933. return {
  37934. n: null,
  37935. pos: pos2
  37936. };
  37937. errors.numericSeparatorInEscapeSequence(pos2, lineStart, curLine);
  37938. } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
  37939. if (bailOnError)
  37940. return {
  37941. n: null,
  37942. pos: pos2
  37943. };
  37944. errors.unexpectedNumericSeparator(pos2, lineStart, curLine);
  37945. }
  37946. ++pos2;
  37947. continue;
  37948. }
  37949. if (code2 >= 97) {
  37950. val = code2 - 97 + 10;
  37951. } else if (code2 >= 65) {
  37952. val = code2 - 65 + 10;
  37953. } else if (_isDigit(code2)) {
  37954. val = code2 - 48;
  37955. } else {
  37956. val = Infinity;
  37957. }
  37958. if (val >= radix) {
  37959. if (val <= 9 && bailOnError) {
  37960. return {
  37961. n: null,
  37962. pos: pos2
  37963. };
  37964. } else if (val <= 9 && errors.invalidDigit(pos2, lineStart, curLine, radix)) {
  37965. val = 0;
  37966. } else if (forceLen) {
  37967. val = 0;
  37968. invalid2 = true;
  37969. } else {
  37970. break;
  37971. }
  37972. }
  37973. ++pos2;
  37974. total = total * radix + val;
  37975. }
  37976. if (pos2 === start3 || len != null && pos2 - start3 !== len || invalid2) {
  37977. return {
  37978. n: null,
  37979. pos: pos2
  37980. };
  37981. }
  37982. return {
  37983. n: total,
  37984. pos: pos2
  37985. };
  37986. }
  37987. function readCodePoint(input, pos2, lineStart, curLine, throwOnInvalid, errors) {
  37988. const ch = input.charCodeAt(pos2);
  37989. let code2;
  37990. if (ch === 123) {
  37991. ++pos2;
  37992. ({
  37993. code: code2,
  37994. pos: pos2
  37995. } = readHexChar(input, pos2, lineStart, curLine, input.indexOf("}", pos2) - pos2, true, throwOnInvalid, errors));
  37996. ++pos2;
  37997. if (code2 !== null && code2 > 1114111) {
  37998. if (throwOnInvalid) {
  37999. errors.invalidCodePoint(pos2, lineStart, curLine);
  38000. } else {
  38001. return {
  38002. code: null,
  38003. pos: pos2
  38004. };
  38005. }
  38006. }
  38007. } else {
  38008. ({
  38009. code: code2,
  38010. pos: pos2
  38011. } = readHexChar(input, pos2, lineStart, curLine, 4, false, throwOnInvalid, errors));
  38012. }
  38013. return {
  38014. code: code2,
  38015. pos: pos2
  38016. };
  38017. }
  38018. var _excluded = ["at"];
  38019. var _excluded2 = ["at"];
  38020. function buildPosition(pos2, lineStart, curLine) {
  38021. return new Position5(curLine, pos2 - lineStart, pos2);
  38022. }
  38023. var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]);
  38024. var Token5 = class {
  38025. constructor(state) {
  38026. this.type = state.type;
  38027. this.value = state.value;
  38028. this.start = state.start;
  38029. this.end = state.end;
  38030. this.loc = new SourceLocation5(state.startLoc, state.endLoc);
  38031. }
  38032. };
  38033. var Tokenizer = class extends CommentsParser {
  38034. constructor(options, input) {
  38035. super();
  38036. this.isLookahead = void 0;
  38037. this.tokens = [];
  38038. this.errorHandlers_readInt = {
  38039. invalidDigit: (pos2, lineStart, curLine, radix) => {
  38040. if (!this.options.errorRecovery)
  38041. return false;
  38042. this.raise(Errors.InvalidDigit, {
  38043. at: buildPosition(pos2, lineStart, curLine),
  38044. radix
  38045. });
  38046. return true;
  38047. },
  38048. numericSeparatorInEscapeSequence: this.errorBuilder(Errors.NumericSeparatorInEscapeSequence),
  38049. unexpectedNumericSeparator: this.errorBuilder(Errors.UnexpectedNumericSeparator)
  38050. };
  38051. this.errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, {
  38052. invalidEscapeSequence: this.errorBuilder(Errors.InvalidEscapeSequence),
  38053. invalidCodePoint: this.errorBuilder(Errors.InvalidCodePoint)
  38054. });
  38055. this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, {
  38056. strictNumericEscape: (pos2, lineStart, curLine) => {
  38057. this.recordStrictModeErrors(Errors.StrictNumericEscape, {
  38058. at: buildPosition(pos2, lineStart, curLine)
  38059. });
  38060. },
  38061. unterminated: (pos2, lineStart, curLine) => {
  38062. throw this.raise(Errors.UnterminatedString, {
  38063. at: buildPosition(pos2 - 1, lineStart, curLine)
  38064. });
  38065. }
  38066. });
  38067. this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, {
  38068. strictNumericEscape: this.errorBuilder(Errors.StrictNumericEscape),
  38069. unterminated: (pos2, lineStart, curLine) => {
  38070. throw this.raise(Errors.UnterminatedTemplate, {
  38071. at: buildPosition(pos2, lineStart, curLine)
  38072. });
  38073. }
  38074. });
  38075. this.state = new State2();
  38076. this.state.init(options);
  38077. this.input = input;
  38078. this.length = input.length;
  38079. this.isLookahead = false;
  38080. }
  38081. pushToken(token2) {
  38082. this.tokens.length = this.state.tokensLength;
  38083. this.tokens.push(token2);
  38084. ++this.state.tokensLength;
  38085. }
  38086. next() {
  38087. this.checkKeywordEscapes();
  38088. if (this.options.tokens) {
  38089. this.pushToken(new Token5(this.state));
  38090. }
  38091. this.state.lastTokStart = this.state.start;
  38092. this.state.lastTokEndLoc = this.state.endLoc;
  38093. this.state.lastTokStartLoc = this.state.startLoc;
  38094. this.nextToken();
  38095. }
  38096. eat(type) {
  38097. if (this.match(type)) {
  38098. this.next();
  38099. return true;
  38100. } else {
  38101. return false;
  38102. }
  38103. }
  38104. match(type) {
  38105. return this.state.type === type;
  38106. }
  38107. createLookaheadState(state) {
  38108. return {
  38109. pos: state.pos,
  38110. value: null,
  38111. type: state.type,
  38112. start: state.start,
  38113. end: state.end,
  38114. context: [this.curContext()],
  38115. inType: state.inType,
  38116. startLoc: state.startLoc,
  38117. lastTokEndLoc: state.lastTokEndLoc,
  38118. curLine: state.curLine,
  38119. lineStart: state.lineStart,
  38120. curPosition: state.curPosition
  38121. };
  38122. }
  38123. lookahead() {
  38124. const old = this.state;
  38125. this.state = this.createLookaheadState(old);
  38126. this.isLookahead = true;
  38127. this.nextToken();
  38128. this.isLookahead = false;
  38129. const curr = this.state;
  38130. this.state = old;
  38131. return curr;
  38132. }
  38133. nextTokenStart() {
  38134. return this.nextTokenStartSince(this.state.pos);
  38135. }
  38136. nextTokenStartSince(pos2) {
  38137. skipWhiteSpace3.lastIndex = pos2;
  38138. return skipWhiteSpace3.test(this.input) ? skipWhiteSpace3.lastIndex : pos2;
  38139. }
  38140. lookaheadCharCode() {
  38141. return this.input.charCodeAt(this.nextTokenStart());
  38142. }
  38143. nextTokenInLineStart() {
  38144. return this.nextTokenInLineStartSince(this.state.pos);
  38145. }
  38146. nextTokenInLineStartSince(pos2) {
  38147. skipWhiteSpaceInLine.lastIndex = pos2;
  38148. return skipWhiteSpaceInLine.test(this.input) ? skipWhiteSpaceInLine.lastIndex : pos2;
  38149. }
  38150. lookaheadInLineCharCode() {
  38151. return this.input.charCodeAt(this.nextTokenInLineStart());
  38152. }
  38153. codePointAtPos(pos2) {
  38154. let cp = this.input.charCodeAt(pos2);
  38155. if ((cp & 64512) === 55296 && ++pos2 < this.input.length) {
  38156. const trail = this.input.charCodeAt(pos2);
  38157. if ((trail & 64512) === 56320) {
  38158. cp = 65536 + ((cp & 1023) << 10) + (trail & 1023);
  38159. }
  38160. }
  38161. return cp;
  38162. }
  38163. setStrict(strict) {
  38164. this.state.strict = strict;
  38165. if (strict) {
  38166. this.state.strictErrors.forEach(([toParseError, at3]) => this.raise(toParseError, {
  38167. at: at3
  38168. }));
  38169. this.state.strictErrors.clear();
  38170. }
  38171. }
  38172. curContext() {
  38173. return this.state.context[this.state.context.length - 1];
  38174. }
  38175. nextToken() {
  38176. this.skipSpace();
  38177. this.state.start = this.state.pos;
  38178. if (!this.isLookahead)
  38179. this.state.startLoc = this.state.curPosition();
  38180. if (this.state.pos >= this.length) {
  38181. this.finishToken(137);
  38182. return;
  38183. }
  38184. this.getTokenFromCode(this.codePointAtPos(this.state.pos));
  38185. }
  38186. skipBlockComment(commentEnd) {
  38187. let startLoc;
  38188. if (!this.isLookahead)
  38189. startLoc = this.state.curPosition();
  38190. const start3 = this.state.pos;
  38191. const end = this.input.indexOf(commentEnd, start3 + 2);
  38192. if (end === -1) {
  38193. throw this.raise(Errors.UnterminatedComment, {
  38194. at: this.state.curPosition()
  38195. });
  38196. }
  38197. this.state.pos = end + commentEnd.length;
  38198. lineBreakG3.lastIndex = start3 + 2;
  38199. while (lineBreakG3.test(this.input) && lineBreakG3.lastIndex <= end) {
  38200. ++this.state.curLine;
  38201. this.state.lineStart = lineBreakG3.lastIndex;
  38202. }
  38203. if (this.isLookahead)
  38204. return;
  38205. const comment2 = {
  38206. type: "CommentBlock",
  38207. value: this.input.slice(start3 + 2, end),
  38208. start: start3,
  38209. end: end + commentEnd.length,
  38210. loc: new SourceLocation5(startLoc, this.state.curPosition())
  38211. };
  38212. if (this.options.tokens)
  38213. this.pushToken(comment2);
  38214. return comment2;
  38215. }
  38216. skipLineComment(startSkip) {
  38217. const start3 = this.state.pos;
  38218. let startLoc;
  38219. if (!this.isLookahead)
  38220. startLoc = this.state.curPosition();
  38221. let ch = this.input.charCodeAt(this.state.pos += startSkip);
  38222. if (this.state.pos < this.length) {
  38223. while (!isNewLine3(ch) && ++this.state.pos < this.length) {
  38224. ch = this.input.charCodeAt(this.state.pos);
  38225. }
  38226. }
  38227. if (this.isLookahead)
  38228. return;
  38229. const end = this.state.pos;
  38230. const value2 = this.input.slice(start3 + startSkip, end);
  38231. const comment2 = {
  38232. type: "CommentLine",
  38233. value: value2,
  38234. start: start3,
  38235. end,
  38236. loc: new SourceLocation5(startLoc, this.state.curPosition())
  38237. };
  38238. if (this.options.tokens)
  38239. this.pushToken(comment2);
  38240. return comment2;
  38241. }
  38242. skipSpace() {
  38243. const spaceStart = this.state.pos;
  38244. const comments = [];
  38245. loop:
  38246. while (this.state.pos < this.length) {
  38247. const ch = this.input.charCodeAt(this.state.pos);
  38248. switch (ch) {
  38249. case 32:
  38250. case 160:
  38251. case 9:
  38252. ++this.state.pos;
  38253. break;
  38254. case 13:
  38255. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  38256. ++this.state.pos;
  38257. }
  38258. case 10:
  38259. case 8232:
  38260. case 8233:
  38261. ++this.state.pos;
  38262. ++this.state.curLine;
  38263. this.state.lineStart = this.state.pos;
  38264. break;
  38265. case 47:
  38266. switch (this.input.charCodeAt(this.state.pos + 1)) {
  38267. case 42: {
  38268. const comment2 = this.skipBlockComment("*/");
  38269. if (comment2 !== void 0) {
  38270. this.addComment(comment2);
  38271. if (this.options.attachComment)
  38272. comments.push(comment2);
  38273. }
  38274. break;
  38275. }
  38276. case 47: {
  38277. const comment2 = this.skipLineComment(2);
  38278. if (comment2 !== void 0) {
  38279. this.addComment(comment2);
  38280. if (this.options.attachComment)
  38281. comments.push(comment2);
  38282. }
  38283. break;
  38284. }
  38285. default:
  38286. break loop;
  38287. }
  38288. break;
  38289. default:
  38290. if (isWhitespace(ch)) {
  38291. ++this.state.pos;
  38292. } else if (ch === 45 && !this.inModule && this.options.annexB) {
  38293. const pos2 = this.state.pos;
  38294. if (this.input.charCodeAt(pos2 + 1) === 45 && this.input.charCodeAt(pos2 + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) {
  38295. const comment2 = this.skipLineComment(3);
  38296. if (comment2 !== void 0) {
  38297. this.addComment(comment2);
  38298. if (this.options.attachComment)
  38299. comments.push(comment2);
  38300. }
  38301. } else {
  38302. break loop;
  38303. }
  38304. } else if (ch === 60 && !this.inModule && this.options.annexB) {
  38305. const pos2 = this.state.pos;
  38306. if (this.input.charCodeAt(pos2 + 1) === 33 && this.input.charCodeAt(pos2 + 2) === 45 && this.input.charCodeAt(pos2 + 3) === 45) {
  38307. const comment2 = this.skipLineComment(4);
  38308. if (comment2 !== void 0) {
  38309. this.addComment(comment2);
  38310. if (this.options.attachComment)
  38311. comments.push(comment2);
  38312. }
  38313. } else {
  38314. break loop;
  38315. }
  38316. } else {
  38317. break loop;
  38318. }
  38319. }
  38320. }
  38321. if (comments.length > 0) {
  38322. const end = this.state.pos;
  38323. const commentWhitespace = {
  38324. start: spaceStart,
  38325. end,
  38326. comments,
  38327. leadingNode: null,
  38328. trailingNode: null,
  38329. containingNode: null
  38330. };
  38331. this.state.commentStack.push(commentWhitespace);
  38332. }
  38333. }
  38334. finishToken(type, val) {
  38335. this.state.end = this.state.pos;
  38336. this.state.endLoc = this.state.curPosition();
  38337. const prevType = this.state.type;
  38338. this.state.type = type;
  38339. this.state.value = val;
  38340. if (!this.isLookahead) {
  38341. this.updateContext(prevType);
  38342. }
  38343. }
  38344. replaceToken(type) {
  38345. this.state.type = type;
  38346. this.updateContext();
  38347. }
  38348. readToken_numberSign() {
  38349. if (this.state.pos === 0 && this.readToken_interpreter()) {
  38350. return;
  38351. }
  38352. const nextPos = this.state.pos + 1;
  38353. const next = this.codePointAtPos(nextPos);
  38354. if (next >= 48 && next <= 57) {
  38355. throw this.raise(Errors.UnexpectedDigitAfterHash, {
  38356. at: this.state.curPosition()
  38357. });
  38358. }
  38359. if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
  38360. this.expectPlugin("recordAndTuple");
  38361. if (this.getPluginOption("recordAndTuple", "syntaxType") === "bar") {
  38362. throw this.raise(next === 123 ? Errors.RecordExpressionHashIncorrectStartSyntaxType : Errors.TupleExpressionHashIncorrectStartSyntaxType, {
  38363. at: this.state.curPosition()
  38364. });
  38365. }
  38366. this.state.pos += 2;
  38367. if (next === 123) {
  38368. this.finishToken(7);
  38369. } else {
  38370. this.finishToken(1);
  38371. }
  38372. } else if (isIdentifierStart3(next)) {
  38373. ++this.state.pos;
  38374. this.finishToken(136, this.readWord1(next));
  38375. } else if (next === 92) {
  38376. ++this.state.pos;
  38377. this.finishToken(136, this.readWord1());
  38378. } else {
  38379. this.finishOp(27, 1);
  38380. }
  38381. }
  38382. readToken_dot() {
  38383. const next = this.input.charCodeAt(this.state.pos + 1);
  38384. if (next >= 48 && next <= 57) {
  38385. this.readNumber(true);
  38386. return;
  38387. }
  38388. if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
  38389. this.state.pos += 3;
  38390. this.finishToken(21);
  38391. } else {
  38392. ++this.state.pos;
  38393. this.finishToken(16);
  38394. }
  38395. }
  38396. readToken_slash() {
  38397. const next = this.input.charCodeAt(this.state.pos + 1);
  38398. if (next === 61) {
  38399. this.finishOp(31, 2);
  38400. } else {
  38401. this.finishOp(56, 1);
  38402. }
  38403. }
  38404. readToken_interpreter() {
  38405. if (this.state.pos !== 0 || this.length < 2)
  38406. return false;
  38407. let ch = this.input.charCodeAt(this.state.pos + 1);
  38408. if (ch !== 33)
  38409. return false;
  38410. const start3 = this.state.pos;
  38411. this.state.pos += 1;
  38412. while (!isNewLine3(ch) && ++this.state.pos < this.length) {
  38413. ch = this.input.charCodeAt(this.state.pos);
  38414. }
  38415. const value2 = this.input.slice(start3 + 2, this.state.pos);
  38416. this.finishToken(28, value2);
  38417. return true;
  38418. }
  38419. readToken_mult_modulo(code2) {
  38420. let type = code2 === 42 ? 55 : 54;
  38421. let width = 1;
  38422. let next = this.input.charCodeAt(this.state.pos + 1);
  38423. if (code2 === 42 && next === 42) {
  38424. width++;
  38425. next = this.input.charCodeAt(this.state.pos + 2);
  38426. type = 57;
  38427. }
  38428. if (next === 61 && !this.state.inType) {
  38429. width++;
  38430. type = code2 === 37 ? 33 : 30;
  38431. }
  38432. this.finishOp(type, width);
  38433. }
  38434. readToken_pipe_amp(code2) {
  38435. const next = this.input.charCodeAt(this.state.pos + 1);
  38436. if (next === code2) {
  38437. if (this.input.charCodeAt(this.state.pos + 2) === 61) {
  38438. this.finishOp(30, 3);
  38439. } else {
  38440. this.finishOp(code2 === 124 ? 41 : 42, 2);
  38441. }
  38442. return;
  38443. }
  38444. if (code2 === 124) {
  38445. if (next === 62) {
  38446. this.finishOp(39, 2);
  38447. return;
  38448. }
  38449. if (this.hasPlugin("recordAndTuple") && next === 125) {
  38450. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  38451. throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, {
  38452. at: this.state.curPosition()
  38453. });
  38454. }
  38455. this.state.pos += 2;
  38456. this.finishToken(9);
  38457. return;
  38458. }
  38459. if (this.hasPlugin("recordAndTuple") && next === 93) {
  38460. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  38461. throw this.raise(Errors.TupleExpressionBarIncorrectEndSyntaxType, {
  38462. at: this.state.curPosition()
  38463. });
  38464. }
  38465. this.state.pos += 2;
  38466. this.finishToken(4);
  38467. return;
  38468. }
  38469. }
  38470. if (next === 61) {
  38471. this.finishOp(30, 2);
  38472. return;
  38473. }
  38474. this.finishOp(code2 === 124 ? 43 : 45, 1);
  38475. }
  38476. readToken_caret() {
  38477. const next = this.input.charCodeAt(this.state.pos + 1);
  38478. if (next === 61 && !this.state.inType) {
  38479. this.finishOp(32, 2);
  38480. } else if (next === 94 && this.hasPlugin(["pipelineOperator", {
  38481. proposal: "hack",
  38482. topicToken: "^^"
  38483. }])) {
  38484. this.finishOp(37, 2);
  38485. const lookaheadCh = this.input.codePointAt(this.state.pos);
  38486. if (lookaheadCh === 94) {
  38487. this.unexpected();
  38488. }
  38489. } else {
  38490. this.finishOp(44, 1);
  38491. }
  38492. }
  38493. readToken_atSign() {
  38494. const next = this.input.charCodeAt(this.state.pos + 1);
  38495. if (next === 64 && this.hasPlugin(["pipelineOperator", {
  38496. proposal: "hack",
  38497. topicToken: "@@"
  38498. }])) {
  38499. this.finishOp(38, 2);
  38500. } else {
  38501. this.finishOp(26, 1);
  38502. }
  38503. }
  38504. readToken_plus_min(code2) {
  38505. const next = this.input.charCodeAt(this.state.pos + 1);
  38506. if (next === code2) {
  38507. this.finishOp(34, 2);
  38508. return;
  38509. }
  38510. if (next === 61) {
  38511. this.finishOp(30, 2);
  38512. } else {
  38513. this.finishOp(53, 1);
  38514. }
  38515. }
  38516. readToken_lt() {
  38517. const {
  38518. pos: pos2
  38519. } = this.state;
  38520. const next = this.input.charCodeAt(pos2 + 1);
  38521. if (next === 60) {
  38522. if (this.input.charCodeAt(pos2 + 2) === 61) {
  38523. this.finishOp(30, 3);
  38524. return;
  38525. }
  38526. this.finishOp(51, 2);
  38527. return;
  38528. }
  38529. if (next === 61) {
  38530. this.finishOp(49, 2);
  38531. return;
  38532. }
  38533. this.finishOp(47, 1);
  38534. }
  38535. readToken_gt() {
  38536. const {
  38537. pos: pos2
  38538. } = this.state;
  38539. const next = this.input.charCodeAt(pos2 + 1);
  38540. if (next === 62) {
  38541. const size = this.input.charCodeAt(pos2 + 2) === 62 ? 3 : 2;
  38542. if (this.input.charCodeAt(pos2 + size) === 61) {
  38543. this.finishOp(30, size + 1);
  38544. return;
  38545. }
  38546. this.finishOp(52, size);
  38547. return;
  38548. }
  38549. if (next === 61) {
  38550. this.finishOp(49, 2);
  38551. return;
  38552. }
  38553. this.finishOp(48, 1);
  38554. }
  38555. readToken_eq_excl(code2) {
  38556. const next = this.input.charCodeAt(this.state.pos + 1);
  38557. if (next === 61) {
  38558. this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  38559. return;
  38560. }
  38561. if (code2 === 61 && next === 62) {
  38562. this.state.pos += 2;
  38563. this.finishToken(19);
  38564. return;
  38565. }
  38566. this.finishOp(code2 === 61 ? 29 : 35, 1);
  38567. }
  38568. readToken_question() {
  38569. const next = this.input.charCodeAt(this.state.pos + 1);
  38570. const next2 = this.input.charCodeAt(this.state.pos + 2);
  38571. if (next === 63) {
  38572. if (next2 === 61) {
  38573. this.finishOp(30, 3);
  38574. } else {
  38575. this.finishOp(40, 2);
  38576. }
  38577. } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
  38578. this.state.pos += 2;
  38579. this.finishToken(18);
  38580. } else {
  38581. ++this.state.pos;
  38582. this.finishToken(17);
  38583. }
  38584. }
  38585. getTokenFromCode(code2) {
  38586. switch (code2) {
  38587. case 46:
  38588. this.readToken_dot();
  38589. return;
  38590. case 40:
  38591. ++this.state.pos;
  38592. this.finishToken(10);
  38593. return;
  38594. case 41:
  38595. ++this.state.pos;
  38596. this.finishToken(11);
  38597. return;
  38598. case 59:
  38599. ++this.state.pos;
  38600. this.finishToken(13);
  38601. return;
  38602. case 44:
  38603. ++this.state.pos;
  38604. this.finishToken(12);
  38605. return;
  38606. case 91:
  38607. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  38608. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  38609. throw this.raise(Errors.TupleExpressionBarIncorrectStartSyntaxType, {
  38610. at: this.state.curPosition()
  38611. });
  38612. }
  38613. this.state.pos += 2;
  38614. this.finishToken(2);
  38615. } else {
  38616. ++this.state.pos;
  38617. this.finishToken(0);
  38618. }
  38619. return;
  38620. case 93:
  38621. ++this.state.pos;
  38622. this.finishToken(3);
  38623. return;
  38624. case 123:
  38625. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  38626. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  38627. throw this.raise(Errors.RecordExpressionBarIncorrectStartSyntaxType, {
  38628. at: this.state.curPosition()
  38629. });
  38630. }
  38631. this.state.pos += 2;
  38632. this.finishToken(6);
  38633. } else {
  38634. ++this.state.pos;
  38635. this.finishToken(5);
  38636. }
  38637. return;
  38638. case 125:
  38639. ++this.state.pos;
  38640. this.finishToken(8);
  38641. return;
  38642. case 58:
  38643. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  38644. this.finishOp(15, 2);
  38645. } else {
  38646. ++this.state.pos;
  38647. this.finishToken(14);
  38648. }
  38649. return;
  38650. case 63:
  38651. this.readToken_question();
  38652. return;
  38653. case 96:
  38654. this.readTemplateToken();
  38655. return;
  38656. case 48: {
  38657. const next = this.input.charCodeAt(this.state.pos + 1);
  38658. if (next === 120 || next === 88) {
  38659. this.readRadixNumber(16);
  38660. return;
  38661. }
  38662. if (next === 111 || next === 79) {
  38663. this.readRadixNumber(8);
  38664. return;
  38665. }
  38666. if (next === 98 || next === 66) {
  38667. this.readRadixNumber(2);
  38668. return;
  38669. }
  38670. }
  38671. case 49:
  38672. case 50:
  38673. case 51:
  38674. case 52:
  38675. case 53:
  38676. case 54:
  38677. case 55:
  38678. case 56:
  38679. case 57:
  38680. this.readNumber(false);
  38681. return;
  38682. case 34:
  38683. case 39:
  38684. this.readString(code2);
  38685. return;
  38686. case 47:
  38687. this.readToken_slash();
  38688. return;
  38689. case 37:
  38690. case 42:
  38691. this.readToken_mult_modulo(code2);
  38692. return;
  38693. case 124:
  38694. case 38:
  38695. this.readToken_pipe_amp(code2);
  38696. return;
  38697. case 94:
  38698. this.readToken_caret();
  38699. return;
  38700. case 43:
  38701. case 45:
  38702. this.readToken_plus_min(code2);
  38703. return;
  38704. case 60:
  38705. this.readToken_lt();
  38706. return;
  38707. case 62:
  38708. this.readToken_gt();
  38709. return;
  38710. case 61:
  38711. case 33:
  38712. this.readToken_eq_excl(code2);
  38713. return;
  38714. case 126:
  38715. this.finishOp(36, 1);
  38716. return;
  38717. case 64:
  38718. this.readToken_atSign();
  38719. return;
  38720. case 35:
  38721. this.readToken_numberSign();
  38722. return;
  38723. case 92:
  38724. this.readWord();
  38725. return;
  38726. default:
  38727. if (isIdentifierStart3(code2)) {
  38728. this.readWord(code2);
  38729. return;
  38730. }
  38731. }
  38732. throw this.raise(Errors.InvalidOrUnexpectedToken, {
  38733. at: this.state.curPosition(),
  38734. unexpected: String.fromCodePoint(code2)
  38735. });
  38736. }
  38737. finishOp(type, size) {
  38738. const str = this.input.slice(this.state.pos, this.state.pos + size);
  38739. this.state.pos += size;
  38740. this.finishToken(type, str);
  38741. }
  38742. readRegexp() {
  38743. const startLoc = this.state.startLoc;
  38744. const start3 = this.state.start + 1;
  38745. let escaped, inClass;
  38746. let {
  38747. pos: pos2
  38748. } = this.state;
  38749. for (; ; ++pos2) {
  38750. if (pos2 >= this.length) {
  38751. throw this.raise(Errors.UnterminatedRegExp, {
  38752. at: createPositionWithColumnOffset(startLoc, 1)
  38753. });
  38754. }
  38755. const ch = this.input.charCodeAt(pos2);
  38756. if (isNewLine3(ch)) {
  38757. throw this.raise(Errors.UnterminatedRegExp, {
  38758. at: createPositionWithColumnOffset(startLoc, 1)
  38759. });
  38760. }
  38761. if (escaped) {
  38762. escaped = false;
  38763. } else {
  38764. if (ch === 91) {
  38765. inClass = true;
  38766. } else if (ch === 93 && inClass) {
  38767. inClass = false;
  38768. } else if (ch === 47 && !inClass) {
  38769. break;
  38770. }
  38771. escaped = ch === 92;
  38772. }
  38773. }
  38774. const content3 = this.input.slice(start3, pos2);
  38775. ++pos2;
  38776. let mods = "";
  38777. const nextPos = () => createPositionWithColumnOffset(startLoc, pos2 + 2 - start3);
  38778. while (pos2 < this.length) {
  38779. const cp = this.codePointAtPos(pos2);
  38780. const char = String.fromCharCode(cp);
  38781. if (VALID_REGEX_FLAGS.has(cp)) {
  38782. if (cp === 118) {
  38783. this.expectPlugin("regexpUnicodeSets", nextPos());
  38784. if (mods.includes("u")) {
  38785. this.raise(Errors.IncompatibleRegExpUVFlags, {
  38786. at: nextPos()
  38787. });
  38788. }
  38789. } else if (cp === 117) {
  38790. if (mods.includes("v")) {
  38791. this.raise(Errors.IncompatibleRegExpUVFlags, {
  38792. at: nextPos()
  38793. });
  38794. }
  38795. }
  38796. if (mods.includes(char)) {
  38797. this.raise(Errors.DuplicateRegExpFlags, {
  38798. at: nextPos()
  38799. });
  38800. }
  38801. } else if (isIdentifierChar3(cp) || cp === 92) {
  38802. this.raise(Errors.MalformedRegExpFlags, {
  38803. at: nextPos()
  38804. });
  38805. } else {
  38806. break;
  38807. }
  38808. ++pos2;
  38809. mods += char;
  38810. }
  38811. this.state.pos = pos2;
  38812. this.finishToken(135, {
  38813. pattern: content3,
  38814. flags: mods
  38815. });
  38816. }
  38817. readInt(radix, len, forceLen = false, allowNumSeparator = true) {
  38818. const {
  38819. n,
  38820. pos: pos2
  38821. } = readInt(this.input, this.state.pos, this.state.lineStart, this.state.curLine, radix, len, forceLen, allowNumSeparator, this.errorHandlers_readInt, false);
  38822. this.state.pos = pos2;
  38823. return n;
  38824. }
  38825. readRadixNumber(radix) {
  38826. const startLoc = this.state.curPosition();
  38827. let isBigInt = false;
  38828. this.state.pos += 2;
  38829. const val = this.readInt(radix);
  38830. if (val == null) {
  38831. this.raise(Errors.InvalidDigit, {
  38832. at: createPositionWithColumnOffset(startLoc, 2),
  38833. radix
  38834. });
  38835. }
  38836. const next = this.input.charCodeAt(this.state.pos);
  38837. if (next === 110) {
  38838. ++this.state.pos;
  38839. isBigInt = true;
  38840. } else if (next === 109) {
  38841. throw this.raise(Errors.InvalidDecimal, {
  38842. at: startLoc
  38843. });
  38844. }
  38845. if (isIdentifierStart3(this.codePointAtPos(this.state.pos))) {
  38846. throw this.raise(Errors.NumberIdentifier, {
  38847. at: this.state.curPosition()
  38848. });
  38849. }
  38850. if (isBigInt) {
  38851. const str = this.input.slice(startLoc.index, this.state.pos).replace(/[_n]/g, "");
  38852. this.finishToken(133, str);
  38853. return;
  38854. }
  38855. this.finishToken(132, val);
  38856. }
  38857. readNumber(startsWithDot) {
  38858. const start3 = this.state.pos;
  38859. const startLoc = this.state.curPosition();
  38860. let isFloat = false;
  38861. let isBigInt = false;
  38862. let isDecimal2 = false;
  38863. let hasExponent = false;
  38864. let isOctal = false;
  38865. if (!startsWithDot && this.readInt(10) === null) {
  38866. this.raise(Errors.InvalidNumber, {
  38867. at: this.state.curPosition()
  38868. });
  38869. }
  38870. const hasLeadingZero = this.state.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  38871. if (hasLeadingZero) {
  38872. const integer = this.input.slice(start3, this.state.pos);
  38873. this.recordStrictModeErrors(Errors.StrictOctalLiteral, {
  38874. at: startLoc
  38875. });
  38876. if (!this.state.strict) {
  38877. const underscorePos = integer.indexOf("_");
  38878. if (underscorePos > 0) {
  38879. this.raise(Errors.ZeroDigitNumericSeparator, {
  38880. at: createPositionWithColumnOffset(startLoc, underscorePos)
  38881. });
  38882. }
  38883. }
  38884. isOctal = hasLeadingZero && !/[89]/.test(integer);
  38885. }
  38886. let next = this.input.charCodeAt(this.state.pos);
  38887. if (next === 46 && !isOctal) {
  38888. ++this.state.pos;
  38889. this.readInt(10);
  38890. isFloat = true;
  38891. next = this.input.charCodeAt(this.state.pos);
  38892. }
  38893. if ((next === 69 || next === 101) && !isOctal) {
  38894. next = this.input.charCodeAt(++this.state.pos);
  38895. if (next === 43 || next === 45) {
  38896. ++this.state.pos;
  38897. }
  38898. if (this.readInt(10) === null) {
  38899. this.raise(Errors.InvalidOrMissingExponent, {
  38900. at: startLoc
  38901. });
  38902. }
  38903. isFloat = true;
  38904. hasExponent = true;
  38905. next = this.input.charCodeAt(this.state.pos);
  38906. }
  38907. if (next === 110) {
  38908. if (isFloat || hasLeadingZero) {
  38909. this.raise(Errors.InvalidBigIntLiteral, {
  38910. at: startLoc
  38911. });
  38912. }
  38913. ++this.state.pos;
  38914. isBigInt = true;
  38915. }
  38916. if (next === 109) {
  38917. this.expectPlugin("decimal", this.state.curPosition());
  38918. if (hasExponent || hasLeadingZero) {
  38919. this.raise(Errors.InvalidDecimal, {
  38920. at: startLoc
  38921. });
  38922. }
  38923. ++this.state.pos;
  38924. isDecimal2 = true;
  38925. }
  38926. if (isIdentifierStart3(this.codePointAtPos(this.state.pos))) {
  38927. throw this.raise(Errors.NumberIdentifier, {
  38928. at: this.state.curPosition()
  38929. });
  38930. }
  38931. const str = this.input.slice(start3, this.state.pos).replace(/[_mn]/g, "");
  38932. if (isBigInt) {
  38933. this.finishToken(133, str);
  38934. return;
  38935. }
  38936. if (isDecimal2) {
  38937. this.finishToken(134, str);
  38938. return;
  38939. }
  38940. const val = isOctal ? parseInt(str, 8) : parseFloat(str);
  38941. this.finishToken(132, val);
  38942. }
  38943. readCodePoint(throwOnInvalid) {
  38944. const {
  38945. code: code2,
  38946. pos: pos2
  38947. } = readCodePoint(this.input, this.state.pos, this.state.lineStart, this.state.curLine, throwOnInvalid, this.errorHandlers_readCodePoint);
  38948. this.state.pos = pos2;
  38949. return code2;
  38950. }
  38951. readString(quote) {
  38952. const {
  38953. str,
  38954. pos: pos2,
  38955. curLine,
  38956. lineStart
  38957. } = readStringContents(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string);
  38958. this.state.pos = pos2 + 1;
  38959. this.state.lineStart = lineStart;
  38960. this.state.curLine = curLine;
  38961. this.finishToken(131, str);
  38962. }
  38963. readTemplateContinuation() {
  38964. if (!this.match(8)) {
  38965. this.unexpected(null, 8);
  38966. }
  38967. this.state.pos--;
  38968. this.readTemplateToken();
  38969. }
  38970. readTemplateToken() {
  38971. const opening = this.input[this.state.pos];
  38972. const {
  38973. str,
  38974. firstInvalidLoc,
  38975. pos: pos2,
  38976. curLine,
  38977. lineStart
  38978. } = readStringContents("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template);
  38979. this.state.pos = pos2 + 1;
  38980. this.state.lineStart = lineStart;
  38981. this.state.curLine = curLine;
  38982. if (firstInvalidLoc) {
  38983. this.state.firstInvalidTemplateEscapePos = new Position5(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, firstInvalidLoc.pos);
  38984. }
  38985. if (this.input.codePointAt(pos2) === 96) {
  38986. this.finishToken(24, firstInvalidLoc ? null : opening + str + "`");
  38987. } else {
  38988. this.state.pos++;
  38989. this.finishToken(25, firstInvalidLoc ? null : opening + str + "${");
  38990. }
  38991. }
  38992. recordStrictModeErrors(toParseError, {
  38993. at: at3
  38994. }) {
  38995. const index2 = at3.index;
  38996. if (this.state.strict && !this.state.strictErrors.has(index2)) {
  38997. this.raise(toParseError, {
  38998. at: at3
  38999. });
  39000. } else {
  39001. this.state.strictErrors.set(index2, [toParseError, at3]);
  39002. }
  39003. }
  39004. readWord1(firstCode) {
  39005. this.state.containsEsc = false;
  39006. let word = "";
  39007. const start3 = this.state.pos;
  39008. let chunkStart = this.state.pos;
  39009. if (firstCode !== void 0) {
  39010. this.state.pos += firstCode <= 65535 ? 1 : 2;
  39011. }
  39012. while (this.state.pos < this.length) {
  39013. const ch = this.codePointAtPos(this.state.pos);
  39014. if (isIdentifierChar3(ch)) {
  39015. this.state.pos += ch <= 65535 ? 1 : 2;
  39016. } else if (ch === 92) {
  39017. this.state.containsEsc = true;
  39018. word += this.input.slice(chunkStart, this.state.pos);
  39019. const escStart = this.state.curPosition();
  39020. const identifierCheck = this.state.pos === start3 ? isIdentifierStart3 : isIdentifierChar3;
  39021. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  39022. this.raise(Errors.MissingUnicodeEscape, {
  39023. at: this.state.curPosition()
  39024. });
  39025. chunkStart = this.state.pos - 1;
  39026. continue;
  39027. }
  39028. ++this.state.pos;
  39029. const esc = this.readCodePoint(true);
  39030. if (esc !== null) {
  39031. if (!identifierCheck(esc)) {
  39032. this.raise(Errors.EscapedCharNotAnIdentifier, {
  39033. at: escStart
  39034. });
  39035. }
  39036. word += String.fromCodePoint(esc);
  39037. }
  39038. chunkStart = this.state.pos;
  39039. } else {
  39040. break;
  39041. }
  39042. }
  39043. return word + this.input.slice(chunkStart, this.state.pos);
  39044. }
  39045. readWord(firstCode) {
  39046. const word = this.readWord1(firstCode);
  39047. const type = keywords$13.get(word);
  39048. if (type !== void 0) {
  39049. this.finishToken(type, tokenLabelName(type));
  39050. } else {
  39051. this.finishToken(130, word);
  39052. }
  39053. }
  39054. checkKeywordEscapes() {
  39055. const {
  39056. type
  39057. } = this.state;
  39058. if (tokenIsKeyword(type) && this.state.containsEsc) {
  39059. this.raise(Errors.InvalidEscapedReservedWord, {
  39060. at: this.state.startLoc,
  39061. reservedWord: tokenLabelName(type)
  39062. });
  39063. }
  39064. }
  39065. raise(toParseError, raiseProperties) {
  39066. const {
  39067. at: at3
  39068. } = raiseProperties, details = _objectWithoutPropertiesLoose(raiseProperties, _excluded);
  39069. const loc = at3 instanceof Position5 ? at3 : at3.loc.start;
  39070. const error = toParseError({
  39071. loc,
  39072. details
  39073. });
  39074. if (!this.options.errorRecovery)
  39075. throw error;
  39076. if (!this.isLookahead)
  39077. this.state.errors.push(error);
  39078. return error;
  39079. }
  39080. raiseOverwrite(toParseError, raiseProperties) {
  39081. const {
  39082. at: at3
  39083. } = raiseProperties, details = _objectWithoutPropertiesLoose(raiseProperties, _excluded2);
  39084. const loc = at3 instanceof Position5 ? at3 : at3.loc.start;
  39085. const pos2 = loc.index;
  39086. const errors = this.state.errors;
  39087. for (let i = errors.length - 1; i >= 0; i--) {
  39088. const error = errors[i];
  39089. if (error.loc.index === pos2) {
  39090. return errors[i] = toParseError({
  39091. loc,
  39092. details
  39093. });
  39094. }
  39095. if (error.loc.index < pos2)
  39096. break;
  39097. }
  39098. return this.raise(toParseError, raiseProperties);
  39099. }
  39100. updateContext(prevType) {
  39101. }
  39102. unexpected(loc, type) {
  39103. throw this.raise(Errors.UnexpectedToken, {
  39104. expected: type ? tokenLabelName(type) : null,
  39105. at: loc != null ? loc : this.state.startLoc
  39106. });
  39107. }
  39108. expectPlugin(pluginName, loc) {
  39109. if (this.hasPlugin(pluginName)) {
  39110. return true;
  39111. }
  39112. throw this.raise(Errors.MissingPlugin, {
  39113. at: loc != null ? loc : this.state.startLoc,
  39114. missingPlugin: [pluginName]
  39115. });
  39116. }
  39117. expectOnePlugin(pluginNames) {
  39118. if (!pluginNames.some((name2) => this.hasPlugin(name2))) {
  39119. throw this.raise(Errors.MissingOneOfPlugins, {
  39120. at: this.state.startLoc,
  39121. missingPlugin: pluginNames
  39122. });
  39123. }
  39124. }
  39125. errorBuilder(error) {
  39126. return (pos2, lineStart, curLine) => {
  39127. this.raise(error, {
  39128. at: buildPosition(pos2, lineStart, curLine)
  39129. });
  39130. };
  39131. }
  39132. };
  39133. var ClassScope = class {
  39134. constructor() {
  39135. this.privateNames = /* @__PURE__ */ new Set();
  39136. this.loneAccessors = /* @__PURE__ */ new Map();
  39137. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  39138. }
  39139. };
  39140. var ClassScopeHandler = class {
  39141. constructor(parser) {
  39142. this.parser = void 0;
  39143. this.stack = [];
  39144. this.undefinedPrivateNames = /* @__PURE__ */ new Map();
  39145. this.parser = parser;
  39146. }
  39147. current() {
  39148. return this.stack[this.stack.length - 1];
  39149. }
  39150. enter() {
  39151. this.stack.push(new ClassScope());
  39152. }
  39153. exit() {
  39154. const oldClassScope = this.stack.pop();
  39155. const current3 = this.current();
  39156. for (const [name2, loc] of Array.from(oldClassScope.undefinedPrivateNames)) {
  39157. if (current3) {
  39158. if (!current3.undefinedPrivateNames.has(name2)) {
  39159. current3.undefinedPrivateNames.set(name2, loc);
  39160. }
  39161. } else {
  39162. this.parser.raise(Errors.InvalidPrivateFieldResolution, {
  39163. at: loc,
  39164. identifierName: name2
  39165. });
  39166. }
  39167. }
  39168. }
  39169. declarePrivateName(name2, elementType, loc) {
  39170. const {
  39171. privateNames,
  39172. loneAccessors,
  39173. undefinedPrivateNames
  39174. } = this.current();
  39175. let redefined = privateNames.has(name2);
  39176. if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
  39177. const accessor = redefined && loneAccessors.get(name2);
  39178. if (accessor) {
  39179. const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
  39180. const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
  39181. const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
  39182. const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
  39183. redefined = oldKind === newKind || oldStatic !== newStatic;
  39184. if (!redefined)
  39185. loneAccessors.delete(name2);
  39186. } else if (!redefined) {
  39187. loneAccessors.set(name2, elementType);
  39188. }
  39189. }
  39190. if (redefined) {
  39191. this.parser.raise(Errors.PrivateNameRedeclaration, {
  39192. at: loc,
  39193. identifierName: name2
  39194. });
  39195. }
  39196. privateNames.add(name2);
  39197. undefinedPrivateNames.delete(name2);
  39198. }
  39199. usePrivateName(name2, loc) {
  39200. let classScope;
  39201. for (classScope of this.stack) {
  39202. if (classScope.privateNames.has(name2))
  39203. return;
  39204. }
  39205. if (classScope) {
  39206. classScope.undefinedPrivateNames.set(name2, loc);
  39207. } else {
  39208. this.parser.raise(Errors.InvalidPrivateFieldResolution, {
  39209. at: loc,
  39210. identifierName: name2
  39211. });
  39212. }
  39213. }
  39214. };
  39215. var kExpression = 0;
  39216. var kMaybeArrowParameterDeclaration = 1;
  39217. var kMaybeAsyncArrowParameterDeclaration = 2;
  39218. var kParameterDeclaration = 3;
  39219. var ExpressionScope = class {
  39220. constructor(type = kExpression) {
  39221. this.type = void 0;
  39222. this.type = type;
  39223. }
  39224. canBeArrowParameterDeclaration() {
  39225. return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
  39226. }
  39227. isCertainlyParameterDeclaration() {
  39228. return this.type === kParameterDeclaration;
  39229. }
  39230. };
  39231. var ArrowHeadParsingScope = class extends ExpressionScope {
  39232. constructor(type) {
  39233. super(type);
  39234. this.declarationErrors = /* @__PURE__ */ new Map();
  39235. }
  39236. recordDeclarationError(ParsingErrorClass, {
  39237. at: at3
  39238. }) {
  39239. const index2 = at3.index;
  39240. this.declarationErrors.set(index2, [ParsingErrorClass, at3]);
  39241. }
  39242. clearDeclarationError(index2) {
  39243. this.declarationErrors.delete(index2);
  39244. }
  39245. iterateErrors(iterator) {
  39246. this.declarationErrors.forEach(iterator);
  39247. }
  39248. };
  39249. var ExpressionScopeHandler = class {
  39250. constructor(parser) {
  39251. this.parser = void 0;
  39252. this.stack = [new ExpressionScope()];
  39253. this.parser = parser;
  39254. }
  39255. enter(scope) {
  39256. this.stack.push(scope);
  39257. }
  39258. exit() {
  39259. this.stack.pop();
  39260. }
  39261. recordParameterInitializerError(toParseError, {
  39262. at: node2
  39263. }) {
  39264. const origin = {
  39265. at: node2.loc.start
  39266. };
  39267. const {
  39268. stack: stack2
  39269. } = this;
  39270. let i = stack2.length - 1;
  39271. let scope = stack2[i];
  39272. while (!scope.isCertainlyParameterDeclaration()) {
  39273. if (scope.canBeArrowParameterDeclaration()) {
  39274. scope.recordDeclarationError(toParseError, origin);
  39275. } else {
  39276. return;
  39277. }
  39278. scope = stack2[--i];
  39279. }
  39280. this.parser.raise(toParseError, origin);
  39281. }
  39282. recordArrowParameterBindingError(error, {
  39283. at: node2
  39284. }) {
  39285. const {
  39286. stack: stack2
  39287. } = this;
  39288. const scope = stack2[stack2.length - 1];
  39289. const origin = {
  39290. at: node2.loc.start
  39291. };
  39292. if (scope.isCertainlyParameterDeclaration()) {
  39293. this.parser.raise(error, origin);
  39294. } else if (scope.canBeArrowParameterDeclaration()) {
  39295. scope.recordDeclarationError(error, origin);
  39296. } else {
  39297. return;
  39298. }
  39299. }
  39300. recordAsyncArrowParametersError({
  39301. at: at3
  39302. }) {
  39303. const {
  39304. stack: stack2
  39305. } = this;
  39306. let i = stack2.length - 1;
  39307. let scope = stack2[i];
  39308. while (scope.canBeArrowParameterDeclaration()) {
  39309. if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
  39310. scope.recordDeclarationError(Errors.AwaitBindingIdentifier, {
  39311. at: at3
  39312. });
  39313. }
  39314. scope = stack2[--i];
  39315. }
  39316. }
  39317. validateAsPattern() {
  39318. const {
  39319. stack: stack2
  39320. } = this;
  39321. const currentScope = stack2[stack2.length - 1];
  39322. if (!currentScope.canBeArrowParameterDeclaration())
  39323. return;
  39324. currentScope.iterateErrors(([toParseError, loc]) => {
  39325. this.parser.raise(toParseError, {
  39326. at: loc
  39327. });
  39328. let i = stack2.length - 2;
  39329. let scope = stack2[i];
  39330. while (scope.canBeArrowParameterDeclaration()) {
  39331. scope.clearDeclarationError(loc.index);
  39332. scope = stack2[--i];
  39333. }
  39334. });
  39335. }
  39336. };
  39337. function newParameterDeclarationScope() {
  39338. return new ExpressionScope(kParameterDeclaration);
  39339. }
  39340. function newArrowHeadScope() {
  39341. return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
  39342. }
  39343. function newAsyncArrowScope() {
  39344. return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
  39345. }
  39346. function newExpressionScope() {
  39347. return new ExpressionScope();
  39348. }
  39349. var PARAM = 0;
  39350. var PARAM_YIELD = 1;
  39351. var PARAM_AWAIT = 2;
  39352. var PARAM_RETURN = 4;
  39353. var PARAM_IN = 8;
  39354. var ProductionParameterHandler = class {
  39355. constructor() {
  39356. this.stacks = [];
  39357. }
  39358. enter(flags) {
  39359. this.stacks.push(flags);
  39360. }
  39361. exit() {
  39362. this.stacks.pop();
  39363. }
  39364. currentFlags() {
  39365. return this.stacks[this.stacks.length - 1];
  39366. }
  39367. get hasAwait() {
  39368. return (this.currentFlags() & PARAM_AWAIT) > 0;
  39369. }
  39370. get hasYield() {
  39371. return (this.currentFlags() & PARAM_YIELD) > 0;
  39372. }
  39373. get hasReturn() {
  39374. return (this.currentFlags() & PARAM_RETURN) > 0;
  39375. }
  39376. get hasIn() {
  39377. return (this.currentFlags() & PARAM_IN) > 0;
  39378. }
  39379. };
  39380. function functionFlags3(isAsync, isGenerator) {
  39381. return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
  39382. }
  39383. var UtilParser = class extends Tokenizer {
  39384. addExtra(node2, key2, value2, enumerable = true) {
  39385. if (!node2)
  39386. return;
  39387. const extra = node2.extra = node2.extra || {};
  39388. if (enumerable) {
  39389. extra[key2] = value2;
  39390. } else {
  39391. Object.defineProperty(extra, key2, {
  39392. enumerable,
  39393. value: value2
  39394. });
  39395. }
  39396. }
  39397. isContextual(token2) {
  39398. return this.state.type === token2 && !this.state.containsEsc;
  39399. }
  39400. isUnparsedContextual(nameStart, name2) {
  39401. const nameEnd = nameStart + name2.length;
  39402. if (this.input.slice(nameStart, nameEnd) === name2) {
  39403. const nextCh = this.input.charCodeAt(nameEnd);
  39404. return !(isIdentifierChar3(nextCh) || (nextCh & 64512) === 55296);
  39405. }
  39406. return false;
  39407. }
  39408. isLookaheadContextual(name2) {
  39409. const next = this.nextTokenStart();
  39410. return this.isUnparsedContextual(next, name2);
  39411. }
  39412. eatContextual(token2) {
  39413. if (this.isContextual(token2)) {
  39414. this.next();
  39415. return true;
  39416. }
  39417. return false;
  39418. }
  39419. expectContextual(token2, toParseError) {
  39420. if (!this.eatContextual(token2)) {
  39421. if (toParseError != null) {
  39422. throw this.raise(toParseError, {
  39423. at: this.state.startLoc
  39424. });
  39425. }
  39426. this.unexpected(null, token2);
  39427. }
  39428. }
  39429. canInsertSemicolon() {
  39430. return this.match(137) || this.match(8) || this.hasPrecedingLineBreak();
  39431. }
  39432. hasPrecedingLineBreak() {
  39433. return lineBreak3.test(this.input.slice(this.state.lastTokEndLoc.index, this.state.start));
  39434. }
  39435. hasFollowingLineBreak() {
  39436. skipWhiteSpaceToLineBreak.lastIndex = this.state.end;
  39437. return skipWhiteSpaceToLineBreak.test(this.input);
  39438. }
  39439. isLineTerminator() {
  39440. return this.eat(13) || this.canInsertSemicolon();
  39441. }
  39442. semicolon(allowAsi = true) {
  39443. if (allowAsi ? this.isLineTerminator() : this.eat(13))
  39444. return;
  39445. this.raise(Errors.MissingSemicolon, {
  39446. at: this.state.lastTokEndLoc
  39447. });
  39448. }
  39449. expect(type, loc) {
  39450. this.eat(type) || this.unexpected(loc, type);
  39451. }
  39452. tryParse(fn, oldState = this.state.clone()) {
  39453. const abortSignal = {
  39454. node: null
  39455. };
  39456. try {
  39457. const node2 = fn((node3 = null) => {
  39458. abortSignal.node = node3;
  39459. throw abortSignal;
  39460. });
  39461. if (this.state.errors.length > oldState.errors.length) {
  39462. const failState = this.state;
  39463. this.state = oldState;
  39464. this.state.tokensLength = failState.tokensLength;
  39465. return {
  39466. node: node2,
  39467. error: failState.errors[oldState.errors.length],
  39468. thrown: false,
  39469. aborted: false,
  39470. failState
  39471. };
  39472. }
  39473. return {
  39474. node: node2,
  39475. error: null,
  39476. thrown: false,
  39477. aborted: false,
  39478. failState: null
  39479. };
  39480. } catch (error) {
  39481. const failState = this.state;
  39482. this.state = oldState;
  39483. if (error instanceof SyntaxError) {
  39484. return {
  39485. node: null,
  39486. error,
  39487. thrown: true,
  39488. aborted: false,
  39489. failState
  39490. };
  39491. }
  39492. if (error === abortSignal) {
  39493. return {
  39494. node: abortSignal.node,
  39495. error: null,
  39496. thrown: false,
  39497. aborted: true,
  39498. failState
  39499. };
  39500. }
  39501. throw error;
  39502. }
  39503. }
  39504. checkExpressionErrors(refExpressionErrors, andThrow) {
  39505. if (!refExpressionErrors)
  39506. return false;
  39507. const {
  39508. shorthandAssignLoc,
  39509. doubleProtoLoc,
  39510. privateKeyLoc,
  39511. optionalParametersLoc
  39512. } = refExpressionErrors;
  39513. const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc;
  39514. if (!andThrow) {
  39515. return hasErrors;
  39516. }
  39517. if (shorthandAssignLoc != null) {
  39518. this.raise(Errors.InvalidCoverInitializedName, {
  39519. at: shorthandAssignLoc
  39520. });
  39521. }
  39522. if (doubleProtoLoc != null) {
  39523. this.raise(Errors.DuplicateProto, {
  39524. at: doubleProtoLoc
  39525. });
  39526. }
  39527. if (privateKeyLoc != null) {
  39528. this.raise(Errors.UnexpectedPrivateField, {
  39529. at: privateKeyLoc
  39530. });
  39531. }
  39532. if (optionalParametersLoc != null) {
  39533. this.unexpected(optionalParametersLoc);
  39534. }
  39535. }
  39536. isLiteralPropertyName() {
  39537. return tokenIsLiteralPropertyName(this.state.type);
  39538. }
  39539. isPrivateName(node2) {
  39540. return node2.type === "PrivateName";
  39541. }
  39542. getPrivateNameSV(node2) {
  39543. return node2.id.name;
  39544. }
  39545. hasPropertyAsPrivateName(node2) {
  39546. return (node2.type === "MemberExpression" || node2.type === "OptionalMemberExpression") && this.isPrivateName(node2.property);
  39547. }
  39548. isObjectProperty(node2) {
  39549. return node2.type === "ObjectProperty";
  39550. }
  39551. isObjectMethod(node2) {
  39552. return node2.type === "ObjectMethod";
  39553. }
  39554. initializeScopes(inModule = this.options.sourceType === "module") {
  39555. const oldLabels = this.state.labels;
  39556. this.state.labels = [];
  39557. const oldExportedIdentifiers = this.exportedIdentifiers;
  39558. this.exportedIdentifiers = /* @__PURE__ */ new Set();
  39559. const oldInModule = this.inModule;
  39560. this.inModule = inModule;
  39561. const oldScope = this.scope;
  39562. const ScopeHandler2 = this.getScopeHandler();
  39563. this.scope = new ScopeHandler2(this, inModule);
  39564. const oldProdParam = this.prodParam;
  39565. this.prodParam = new ProductionParameterHandler();
  39566. const oldClassScope = this.classScope;
  39567. this.classScope = new ClassScopeHandler(this);
  39568. const oldExpressionScope = this.expressionScope;
  39569. this.expressionScope = new ExpressionScopeHandler(this);
  39570. return () => {
  39571. this.state.labels = oldLabels;
  39572. this.exportedIdentifiers = oldExportedIdentifiers;
  39573. this.inModule = oldInModule;
  39574. this.scope = oldScope;
  39575. this.prodParam = oldProdParam;
  39576. this.classScope = oldClassScope;
  39577. this.expressionScope = oldExpressionScope;
  39578. };
  39579. }
  39580. enterInitialScopes() {
  39581. let paramFlags = PARAM;
  39582. if (this.inModule) {
  39583. paramFlags |= PARAM_AWAIT;
  39584. }
  39585. this.scope.enter(SCOPE_PROGRAM);
  39586. this.prodParam.enter(paramFlags);
  39587. }
  39588. checkDestructuringPrivate(refExpressionErrors) {
  39589. const {
  39590. privateKeyLoc
  39591. } = refExpressionErrors;
  39592. if (privateKeyLoc !== null) {
  39593. this.expectPlugin("destructuringPrivate", privateKeyLoc);
  39594. }
  39595. }
  39596. };
  39597. var ExpressionErrors = class {
  39598. constructor() {
  39599. this.shorthandAssignLoc = null;
  39600. this.doubleProtoLoc = null;
  39601. this.privateKeyLoc = null;
  39602. this.optionalParametersLoc = null;
  39603. }
  39604. };
  39605. var Node5 = class {
  39606. constructor(parser, pos2, loc) {
  39607. this.type = "";
  39608. this.start = pos2;
  39609. this.end = 0;
  39610. this.loc = new SourceLocation5(loc);
  39611. if (parser != null && parser.options.ranges)
  39612. this.range = [pos2, 0];
  39613. if (parser != null && parser.filename)
  39614. this.loc.filename = parser.filename;
  39615. }
  39616. };
  39617. var NodePrototype = Node5.prototype;
  39618. {
  39619. NodePrototype.__clone = function() {
  39620. const newNode = new Node5(void 0, this.start, this.loc.start);
  39621. const keys2 = Object.keys(this);
  39622. for (let i = 0, length = keys2.length; i < length; i++) {
  39623. const key2 = keys2[i];
  39624. if (key2 !== "leadingComments" && key2 !== "trailingComments" && key2 !== "innerComments") {
  39625. newNode[key2] = this[key2];
  39626. }
  39627. }
  39628. return newNode;
  39629. };
  39630. }
  39631. function clonePlaceholder(node2) {
  39632. return cloneIdentifier(node2);
  39633. }
  39634. function cloneIdentifier(node2) {
  39635. const {
  39636. type,
  39637. start: start3,
  39638. end,
  39639. loc,
  39640. range,
  39641. extra,
  39642. name: name2
  39643. } = node2;
  39644. const cloned = Object.create(NodePrototype);
  39645. cloned.type = type;
  39646. cloned.start = start3;
  39647. cloned.end = end;
  39648. cloned.loc = loc;
  39649. cloned.range = range;
  39650. cloned.extra = extra;
  39651. cloned.name = name2;
  39652. if (type === "Placeholder") {
  39653. cloned.expectedNode = node2.expectedNode;
  39654. }
  39655. return cloned;
  39656. }
  39657. function cloneStringLiteral(node2) {
  39658. const {
  39659. type,
  39660. start: start3,
  39661. end,
  39662. loc,
  39663. range,
  39664. extra
  39665. } = node2;
  39666. if (type === "Placeholder") {
  39667. return clonePlaceholder(node2);
  39668. }
  39669. const cloned = Object.create(NodePrototype);
  39670. cloned.type = type;
  39671. cloned.start = start3;
  39672. cloned.end = end;
  39673. cloned.loc = loc;
  39674. cloned.range = range;
  39675. if (node2.raw !== void 0) {
  39676. cloned.raw = node2.raw;
  39677. } else {
  39678. cloned.extra = extra;
  39679. }
  39680. cloned.value = node2.value;
  39681. return cloned;
  39682. }
  39683. var NodeUtils = class extends UtilParser {
  39684. startNode() {
  39685. return new Node5(this, this.state.start, this.state.startLoc);
  39686. }
  39687. startNodeAt(loc) {
  39688. return new Node5(this, loc.index, loc);
  39689. }
  39690. startNodeAtNode(type) {
  39691. return this.startNodeAt(type.loc.start);
  39692. }
  39693. finishNode(node2, type) {
  39694. return this.finishNodeAt(node2, type, this.state.lastTokEndLoc);
  39695. }
  39696. finishNodeAt(node2, type, endLoc) {
  39697. node2.type = type;
  39698. node2.end = endLoc.index;
  39699. node2.loc.end = endLoc;
  39700. if (this.options.ranges)
  39701. node2.range[1] = endLoc.index;
  39702. if (this.options.attachComment)
  39703. this.processComment(node2);
  39704. return node2;
  39705. }
  39706. resetStartLocation(node2, startLoc) {
  39707. node2.start = startLoc.index;
  39708. node2.loc.start = startLoc;
  39709. if (this.options.ranges)
  39710. node2.range[0] = startLoc.index;
  39711. }
  39712. resetEndLocation(node2, endLoc = this.state.lastTokEndLoc) {
  39713. node2.end = endLoc.index;
  39714. node2.loc.end = endLoc;
  39715. if (this.options.ranges)
  39716. node2.range[1] = endLoc.index;
  39717. }
  39718. resetStartLocationFromNode(node2, locationNode) {
  39719. this.resetStartLocation(node2, locationNode.loc.start);
  39720. }
  39721. };
  39722. var reservedTypes = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
  39723. var FlowErrors = ParseErrorEnum`flow`({
  39724. AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
  39725. AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
  39726. AssignReservedType: ({
  39727. reservedType
  39728. }) => `Cannot overwrite reserved type ${reservedType}.`,
  39729. DeclareClassElement: "The `declare` modifier can only appear on class fields.",
  39730. DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
  39731. DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
  39732. EnumBooleanMemberNotInitialized: ({
  39733. memberName,
  39734. enumName
  39735. }) => `Boolean enum members need to be initialized. Use either \`${memberName} = true,\` or \`${memberName} = false,\` in enum \`${enumName}\`.`,
  39736. EnumDuplicateMemberName: ({
  39737. memberName,
  39738. enumName
  39739. }) => `Enum member names need to be unique, but the name \`${memberName}\` has already been used before in enum \`${enumName}\`.`,
  39740. EnumInconsistentMemberValues: ({
  39741. enumName
  39742. }) => `Enum \`${enumName}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,
  39743. EnumInvalidExplicitType: ({
  39744. invalidEnumType,
  39745. enumName
  39746. }) => `Enum type \`${invalidEnumType}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`,
  39747. EnumInvalidExplicitTypeUnknownSupplied: ({
  39748. enumName
  39749. }) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`,
  39750. EnumInvalidMemberInitializerPrimaryType: ({
  39751. enumName,
  39752. memberName,
  39753. explicitType
  39754. }) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName}\` needs to be a ${explicitType} literal.`,
  39755. EnumInvalidMemberInitializerSymbolType: ({
  39756. enumName,
  39757. memberName
  39758. }) => `Symbol enum members cannot be initialized. Use \`${memberName},\` in enum \`${enumName}\`.`,
  39759. EnumInvalidMemberInitializerUnknownType: ({
  39760. enumName,
  39761. memberName
  39762. }) => `The enum member initializer for \`${memberName}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`,
  39763. EnumInvalidMemberName: ({
  39764. enumName,
  39765. memberName,
  39766. suggestion
  39767. }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`,
  39768. EnumNumberMemberNotInitialized: ({
  39769. enumName,
  39770. memberName
  39771. }) => `Number enum members need to be initialized, e.g. \`${memberName} = 1\` in enum \`${enumName}\`.`,
  39772. EnumStringMemberInconsistentlyInitailized: ({
  39773. enumName
  39774. }) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${enumName}\`.`,
  39775. GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
  39776. ImportReflectionHasImportType: "An `import module` declaration can not use `type` or `typeof` keyword.",
  39777. ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
  39778. InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
  39779. InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
  39780. InexactVariance: "Explicit inexact syntax cannot have variance.",
  39781. InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
  39782. MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
  39783. NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
  39784. NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
  39785. PatternIsOptional: Object.assign({
  39786. message: "A binding pattern parameter cannot be optional in an implementation signature."
  39787. }, {
  39788. reasonCode: "OptionalBindingPattern"
  39789. }),
  39790. SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
  39791. SpreadVariance: "Spread properties cannot have variance.",
  39792. ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
  39793. ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
  39794. ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
  39795. ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
  39796. ThisParamNoDefault: "The `this` parameter may not have a default value.",
  39797. TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  39798. TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
  39799. UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
  39800. UnexpectedReservedType: ({
  39801. reservedType
  39802. }) => `Unexpected reserved type ${reservedType}.`,
  39803. UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
  39804. UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
  39805. UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
  39806. UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
  39807. UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
  39808. UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
  39809. UnsupportedDeclareExportKind: ({
  39810. unsupportedExportKind,
  39811. suggestion
  39812. }) => `\`declare export ${unsupportedExportKind}\` is not supported. Use \`${suggestion}\` instead.`,
  39813. UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
  39814. UnterminatedFlowComment: "Unterminated flow-comment."
  39815. });
  39816. function isEsModuleType(bodyElement) {
  39817. return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
  39818. }
  39819. function hasTypeImportKind(node2) {
  39820. return node2.importKind === "type" || node2.importKind === "typeof";
  39821. }
  39822. function isMaybeDefaultImport(type) {
  39823. return tokenIsKeywordOrIdentifier(type) && type !== 97;
  39824. }
  39825. var exportSuggestions = {
  39826. const: "declare export var",
  39827. let: "declare export var",
  39828. type: "export type",
  39829. interface: "export interface"
  39830. };
  39831. function partition(list3, test) {
  39832. const list1 = [];
  39833. const list22 = [];
  39834. for (let i = 0; i < list3.length; i++) {
  39835. (test(list3[i], i, list3) ? list1 : list22).push(list3[i]);
  39836. }
  39837. return [list1, list22];
  39838. }
  39839. var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
  39840. var flow3 = (superClass) => class FlowParserMixin extends superClass {
  39841. constructor(...args) {
  39842. super(...args);
  39843. this.flowPragma = void 0;
  39844. }
  39845. getScopeHandler() {
  39846. return FlowScopeHandler;
  39847. }
  39848. shouldParseTypes() {
  39849. return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
  39850. }
  39851. shouldParseEnums() {
  39852. return !!this.getPluginOption("flow", "enums");
  39853. }
  39854. finishToken(type, val) {
  39855. if (type !== 131 && type !== 13 && type !== 28) {
  39856. if (this.flowPragma === void 0) {
  39857. this.flowPragma = null;
  39858. }
  39859. }
  39860. super.finishToken(type, val);
  39861. }
  39862. addComment(comment2) {
  39863. if (this.flowPragma === void 0) {
  39864. const matches = FLOW_PRAGMA_REGEX.exec(comment2.value);
  39865. if (!matches)
  39866. ;
  39867. else if (matches[1] === "flow") {
  39868. this.flowPragma = "flow";
  39869. } else if (matches[1] === "noflow") {
  39870. this.flowPragma = "noflow";
  39871. } else {
  39872. throw new Error("Unexpected flow pragma");
  39873. }
  39874. }
  39875. super.addComment(comment2);
  39876. }
  39877. flowParseTypeInitialiser(tok) {
  39878. const oldInType = this.state.inType;
  39879. this.state.inType = true;
  39880. this.expect(tok || 14);
  39881. const type = this.flowParseType();
  39882. this.state.inType = oldInType;
  39883. return type;
  39884. }
  39885. flowParsePredicate() {
  39886. const node2 = this.startNode();
  39887. const moduloLoc = this.state.startLoc;
  39888. this.next();
  39889. this.expectContextual(108);
  39890. if (this.state.lastTokStart > moduloLoc.index + 1) {
  39891. this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, {
  39892. at: moduloLoc
  39893. });
  39894. }
  39895. if (this.eat(10)) {
  39896. node2.value = super.parseExpression();
  39897. this.expect(11);
  39898. return this.finishNode(node2, "DeclaredPredicate");
  39899. } else {
  39900. return this.finishNode(node2, "InferredPredicate");
  39901. }
  39902. }
  39903. flowParseTypeAndPredicateInitialiser() {
  39904. const oldInType = this.state.inType;
  39905. this.state.inType = true;
  39906. this.expect(14);
  39907. let type = null;
  39908. let predicate = null;
  39909. if (this.match(54)) {
  39910. this.state.inType = oldInType;
  39911. predicate = this.flowParsePredicate();
  39912. } else {
  39913. type = this.flowParseType();
  39914. this.state.inType = oldInType;
  39915. if (this.match(54)) {
  39916. predicate = this.flowParsePredicate();
  39917. }
  39918. }
  39919. return [type, predicate];
  39920. }
  39921. flowParseDeclareClass(node2) {
  39922. this.next();
  39923. this.flowParseInterfaceish(node2, true);
  39924. return this.finishNode(node2, "DeclareClass");
  39925. }
  39926. flowParseDeclareFunction(node2) {
  39927. this.next();
  39928. const id = node2.id = this.parseIdentifier();
  39929. const typeNode = this.startNode();
  39930. const typeContainer = this.startNode();
  39931. if (this.match(47)) {
  39932. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  39933. } else {
  39934. typeNode.typeParameters = null;
  39935. }
  39936. this.expect(10);
  39937. const tmp = this.flowParseFunctionTypeParams();
  39938. typeNode.params = tmp.params;
  39939. typeNode.rest = tmp.rest;
  39940. typeNode.this = tmp._this;
  39941. this.expect(11);
  39942. [typeNode.returnType, node2.predicate] = this.flowParseTypeAndPredicateInitialiser();
  39943. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  39944. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  39945. this.resetEndLocation(id);
  39946. this.semicolon();
  39947. this.scope.declareName(node2.id.name, BIND_FLOW_DECLARE_FN, node2.id.loc.start);
  39948. return this.finishNode(node2, "DeclareFunction");
  39949. }
  39950. flowParseDeclare(node2, insideModule) {
  39951. if (this.match(80)) {
  39952. return this.flowParseDeclareClass(node2);
  39953. } else if (this.match(68)) {
  39954. return this.flowParseDeclareFunction(node2);
  39955. } else if (this.match(74)) {
  39956. return this.flowParseDeclareVariable(node2);
  39957. } else if (this.eatContextual(125)) {
  39958. if (this.match(16)) {
  39959. return this.flowParseDeclareModuleExports(node2);
  39960. } else {
  39961. if (insideModule) {
  39962. this.raise(FlowErrors.NestedDeclareModule, {
  39963. at: this.state.lastTokStartLoc
  39964. });
  39965. }
  39966. return this.flowParseDeclareModule(node2);
  39967. }
  39968. } else if (this.isContextual(128)) {
  39969. return this.flowParseDeclareTypeAlias(node2);
  39970. } else if (this.isContextual(129)) {
  39971. return this.flowParseDeclareOpaqueType(node2);
  39972. } else if (this.isContextual(127)) {
  39973. return this.flowParseDeclareInterface(node2);
  39974. } else if (this.match(82)) {
  39975. return this.flowParseDeclareExportDeclaration(node2, insideModule);
  39976. } else {
  39977. this.unexpected();
  39978. }
  39979. }
  39980. flowParseDeclareVariable(node2) {
  39981. this.next();
  39982. node2.id = this.flowParseTypeAnnotatableIdentifier(true);
  39983. this.scope.declareName(node2.id.name, BIND_VAR3, node2.id.loc.start);
  39984. this.semicolon();
  39985. return this.finishNode(node2, "DeclareVariable");
  39986. }
  39987. flowParseDeclareModule(node2) {
  39988. this.scope.enter(SCOPE_OTHER);
  39989. if (this.match(131)) {
  39990. node2.id = super.parseExprAtom();
  39991. } else {
  39992. node2.id = this.parseIdentifier();
  39993. }
  39994. const bodyNode = node2.body = this.startNode();
  39995. const body = bodyNode.body = [];
  39996. this.expect(5);
  39997. while (!this.match(8)) {
  39998. let bodyNode2 = this.startNode();
  39999. if (this.match(83)) {
  40000. this.next();
  40001. if (!this.isContextual(128) && !this.match(87)) {
  40002. this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, {
  40003. at: this.state.lastTokStartLoc
  40004. });
  40005. }
  40006. super.parseImport(bodyNode2);
  40007. } else {
  40008. this.expectContextual(123, FlowErrors.UnsupportedStatementInDeclareModule);
  40009. bodyNode2 = this.flowParseDeclare(bodyNode2, true);
  40010. }
  40011. body.push(bodyNode2);
  40012. }
  40013. this.scope.exit();
  40014. this.expect(8);
  40015. this.finishNode(bodyNode, "BlockStatement");
  40016. let kind = null;
  40017. let hasModuleExport = false;
  40018. body.forEach((bodyElement) => {
  40019. if (isEsModuleType(bodyElement)) {
  40020. if (kind === "CommonJS") {
  40021. this.raise(FlowErrors.AmbiguousDeclareModuleKind, {
  40022. at: bodyElement
  40023. });
  40024. }
  40025. kind = "ES";
  40026. } else if (bodyElement.type === "DeclareModuleExports") {
  40027. if (hasModuleExport) {
  40028. this.raise(FlowErrors.DuplicateDeclareModuleExports, {
  40029. at: bodyElement
  40030. });
  40031. }
  40032. if (kind === "ES") {
  40033. this.raise(FlowErrors.AmbiguousDeclareModuleKind, {
  40034. at: bodyElement
  40035. });
  40036. }
  40037. kind = "CommonJS";
  40038. hasModuleExport = true;
  40039. }
  40040. });
  40041. node2.kind = kind || "CommonJS";
  40042. return this.finishNode(node2, "DeclareModule");
  40043. }
  40044. flowParseDeclareExportDeclaration(node2, insideModule) {
  40045. this.expect(82);
  40046. if (this.eat(65)) {
  40047. if (this.match(68) || this.match(80)) {
  40048. node2.declaration = this.flowParseDeclare(this.startNode());
  40049. } else {
  40050. node2.declaration = this.flowParseType();
  40051. this.semicolon();
  40052. }
  40053. node2.default = true;
  40054. return this.finishNode(node2, "DeclareExportDeclaration");
  40055. } else {
  40056. if (this.match(75) || this.isLet() || (this.isContextual(128) || this.isContextual(127)) && !insideModule) {
  40057. const label = this.state.value;
  40058. throw this.raise(FlowErrors.UnsupportedDeclareExportKind, {
  40059. at: this.state.startLoc,
  40060. unsupportedExportKind: label,
  40061. suggestion: exportSuggestions[label]
  40062. });
  40063. }
  40064. if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(129)) {
  40065. node2.declaration = this.flowParseDeclare(this.startNode());
  40066. node2.default = false;
  40067. return this.finishNode(node2, "DeclareExportDeclaration");
  40068. } else if (this.match(55) || this.match(5) || this.isContextual(127) || this.isContextual(128) || this.isContextual(129)) {
  40069. node2 = this.parseExport(node2, null);
  40070. if (node2.type === "ExportNamedDeclaration") {
  40071. node2.type = "ExportDeclaration";
  40072. node2.default = false;
  40073. delete node2.exportKind;
  40074. }
  40075. node2.type = "Declare" + node2.type;
  40076. return node2;
  40077. }
  40078. }
  40079. this.unexpected();
  40080. }
  40081. flowParseDeclareModuleExports(node2) {
  40082. this.next();
  40083. this.expectContextual(109);
  40084. node2.typeAnnotation = this.flowParseTypeAnnotation();
  40085. this.semicolon();
  40086. return this.finishNode(node2, "DeclareModuleExports");
  40087. }
  40088. flowParseDeclareTypeAlias(node2) {
  40089. this.next();
  40090. const finished = this.flowParseTypeAlias(node2);
  40091. finished.type = "DeclareTypeAlias";
  40092. return finished;
  40093. }
  40094. flowParseDeclareOpaqueType(node2) {
  40095. this.next();
  40096. const finished = this.flowParseOpaqueType(node2, true);
  40097. finished.type = "DeclareOpaqueType";
  40098. return finished;
  40099. }
  40100. flowParseDeclareInterface(node2) {
  40101. this.next();
  40102. this.flowParseInterfaceish(node2, false);
  40103. return this.finishNode(node2, "DeclareInterface");
  40104. }
  40105. flowParseInterfaceish(node2, isClass) {
  40106. node2.id = this.flowParseRestrictedIdentifier(!isClass, true);
  40107. this.scope.declareName(node2.id.name, isClass ? BIND_FUNCTION3 : BIND_LEXICAL3, node2.id.loc.start);
  40108. if (this.match(47)) {
  40109. node2.typeParameters = this.flowParseTypeParameterDeclaration();
  40110. } else {
  40111. node2.typeParameters = null;
  40112. }
  40113. node2.extends = [];
  40114. node2.implements = [];
  40115. node2.mixins = [];
  40116. if (this.eat(81)) {
  40117. do {
  40118. node2.extends.push(this.flowParseInterfaceExtends());
  40119. } while (!isClass && this.eat(12));
  40120. }
  40121. if (isClass) {
  40122. if (this.eatContextual(115)) {
  40123. do {
  40124. node2.mixins.push(this.flowParseInterfaceExtends());
  40125. } while (this.eat(12));
  40126. }
  40127. if (this.eatContextual(111)) {
  40128. do {
  40129. node2.implements.push(this.flowParseInterfaceExtends());
  40130. } while (this.eat(12));
  40131. }
  40132. }
  40133. node2.body = this.flowParseObjectType({
  40134. allowStatic: isClass,
  40135. allowExact: false,
  40136. allowSpread: false,
  40137. allowProto: isClass,
  40138. allowInexact: false
  40139. });
  40140. }
  40141. flowParseInterfaceExtends() {
  40142. const node2 = this.startNode();
  40143. node2.id = this.flowParseQualifiedTypeIdentifier();
  40144. if (this.match(47)) {
  40145. node2.typeParameters = this.flowParseTypeParameterInstantiation();
  40146. } else {
  40147. node2.typeParameters = null;
  40148. }
  40149. return this.finishNode(node2, "InterfaceExtends");
  40150. }
  40151. flowParseInterface(node2) {
  40152. this.flowParseInterfaceish(node2, false);
  40153. return this.finishNode(node2, "InterfaceDeclaration");
  40154. }
  40155. checkNotUnderscore(word) {
  40156. if (word === "_") {
  40157. this.raise(FlowErrors.UnexpectedReservedUnderscore, {
  40158. at: this.state.startLoc
  40159. });
  40160. }
  40161. }
  40162. checkReservedType(word, startLoc, declaration) {
  40163. if (!reservedTypes.has(word))
  40164. return;
  40165. this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, {
  40166. at: startLoc,
  40167. reservedType: word
  40168. });
  40169. }
  40170. flowParseRestrictedIdentifier(liberal, declaration) {
  40171. this.checkReservedType(this.state.value, this.state.startLoc, declaration);
  40172. return this.parseIdentifier(liberal);
  40173. }
  40174. flowParseTypeAlias(node2) {
  40175. node2.id = this.flowParseRestrictedIdentifier(false, true);
  40176. this.scope.declareName(node2.id.name, BIND_LEXICAL3, node2.id.loc.start);
  40177. if (this.match(47)) {
  40178. node2.typeParameters = this.flowParseTypeParameterDeclaration();
  40179. } else {
  40180. node2.typeParameters = null;
  40181. }
  40182. node2.right = this.flowParseTypeInitialiser(29);
  40183. this.semicolon();
  40184. return this.finishNode(node2, "TypeAlias");
  40185. }
  40186. flowParseOpaqueType(node2, declare) {
  40187. this.expectContextual(128);
  40188. node2.id = this.flowParseRestrictedIdentifier(true, true);
  40189. this.scope.declareName(node2.id.name, BIND_LEXICAL3, node2.id.loc.start);
  40190. if (this.match(47)) {
  40191. node2.typeParameters = this.flowParseTypeParameterDeclaration();
  40192. } else {
  40193. node2.typeParameters = null;
  40194. }
  40195. node2.supertype = null;
  40196. if (this.match(14)) {
  40197. node2.supertype = this.flowParseTypeInitialiser(14);
  40198. }
  40199. node2.impltype = null;
  40200. if (!declare) {
  40201. node2.impltype = this.flowParseTypeInitialiser(29);
  40202. }
  40203. this.semicolon();
  40204. return this.finishNode(node2, "OpaqueType");
  40205. }
  40206. flowParseTypeParameter(requireDefault = false) {
  40207. const nodeStartLoc = this.state.startLoc;
  40208. const node2 = this.startNode();
  40209. const variance = this.flowParseVariance();
  40210. const ident = this.flowParseTypeAnnotatableIdentifier();
  40211. node2.name = ident.name;
  40212. node2.variance = variance;
  40213. node2.bound = ident.typeAnnotation;
  40214. if (this.match(29)) {
  40215. this.eat(29);
  40216. node2.default = this.flowParseType();
  40217. } else {
  40218. if (requireDefault) {
  40219. this.raise(FlowErrors.MissingTypeParamDefault, {
  40220. at: nodeStartLoc
  40221. });
  40222. }
  40223. }
  40224. return this.finishNode(node2, "TypeParameter");
  40225. }
  40226. flowParseTypeParameterDeclaration() {
  40227. const oldInType = this.state.inType;
  40228. const node2 = this.startNode();
  40229. node2.params = [];
  40230. this.state.inType = true;
  40231. if (this.match(47) || this.match(140)) {
  40232. this.next();
  40233. } else {
  40234. this.unexpected();
  40235. }
  40236. let defaultRequired = false;
  40237. do {
  40238. const typeParameter = this.flowParseTypeParameter(defaultRequired);
  40239. node2.params.push(typeParameter);
  40240. if (typeParameter.default) {
  40241. defaultRequired = true;
  40242. }
  40243. if (!this.match(48)) {
  40244. this.expect(12);
  40245. }
  40246. } while (!this.match(48));
  40247. this.expect(48);
  40248. this.state.inType = oldInType;
  40249. return this.finishNode(node2, "TypeParameterDeclaration");
  40250. }
  40251. flowParseTypeParameterInstantiation() {
  40252. const node2 = this.startNode();
  40253. const oldInType = this.state.inType;
  40254. node2.params = [];
  40255. this.state.inType = true;
  40256. this.expect(47);
  40257. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  40258. this.state.noAnonFunctionType = false;
  40259. while (!this.match(48)) {
  40260. node2.params.push(this.flowParseType());
  40261. if (!this.match(48)) {
  40262. this.expect(12);
  40263. }
  40264. }
  40265. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  40266. this.expect(48);
  40267. this.state.inType = oldInType;
  40268. return this.finishNode(node2, "TypeParameterInstantiation");
  40269. }
  40270. flowParseTypeParameterInstantiationCallOrNew() {
  40271. const node2 = this.startNode();
  40272. const oldInType = this.state.inType;
  40273. node2.params = [];
  40274. this.state.inType = true;
  40275. this.expect(47);
  40276. while (!this.match(48)) {
  40277. node2.params.push(this.flowParseTypeOrImplicitInstantiation());
  40278. if (!this.match(48)) {
  40279. this.expect(12);
  40280. }
  40281. }
  40282. this.expect(48);
  40283. this.state.inType = oldInType;
  40284. return this.finishNode(node2, "TypeParameterInstantiation");
  40285. }
  40286. flowParseInterfaceType() {
  40287. const node2 = this.startNode();
  40288. this.expectContextual(127);
  40289. node2.extends = [];
  40290. if (this.eat(81)) {
  40291. do {
  40292. node2.extends.push(this.flowParseInterfaceExtends());
  40293. } while (this.eat(12));
  40294. }
  40295. node2.body = this.flowParseObjectType({
  40296. allowStatic: false,
  40297. allowExact: false,
  40298. allowSpread: false,
  40299. allowProto: false,
  40300. allowInexact: false
  40301. });
  40302. return this.finishNode(node2, "InterfaceTypeAnnotation");
  40303. }
  40304. flowParseObjectPropertyKey() {
  40305. return this.match(132) || this.match(131) ? super.parseExprAtom() : this.parseIdentifier(true);
  40306. }
  40307. flowParseObjectTypeIndexer(node2, isStatic, variance) {
  40308. node2.static = isStatic;
  40309. if (this.lookahead().type === 14) {
  40310. node2.id = this.flowParseObjectPropertyKey();
  40311. node2.key = this.flowParseTypeInitialiser();
  40312. } else {
  40313. node2.id = null;
  40314. node2.key = this.flowParseType();
  40315. }
  40316. this.expect(3);
  40317. node2.value = this.flowParseTypeInitialiser();
  40318. node2.variance = variance;
  40319. return this.finishNode(node2, "ObjectTypeIndexer");
  40320. }
  40321. flowParseObjectTypeInternalSlot(node2, isStatic) {
  40322. node2.static = isStatic;
  40323. node2.id = this.flowParseObjectPropertyKey();
  40324. this.expect(3);
  40325. this.expect(3);
  40326. if (this.match(47) || this.match(10)) {
  40327. node2.method = true;
  40328. node2.optional = false;
  40329. node2.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node2.loc.start));
  40330. } else {
  40331. node2.method = false;
  40332. if (this.eat(17)) {
  40333. node2.optional = true;
  40334. }
  40335. node2.value = this.flowParseTypeInitialiser();
  40336. }
  40337. return this.finishNode(node2, "ObjectTypeInternalSlot");
  40338. }
  40339. flowParseObjectTypeMethodish(node2) {
  40340. node2.params = [];
  40341. node2.rest = null;
  40342. node2.typeParameters = null;
  40343. node2.this = null;
  40344. if (this.match(47)) {
  40345. node2.typeParameters = this.flowParseTypeParameterDeclaration();
  40346. }
  40347. this.expect(10);
  40348. if (this.match(78)) {
  40349. node2.this = this.flowParseFunctionTypeParam(true);
  40350. node2.this.name = null;
  40351. if (!this.match(11)) {
  40352. this.expect(12);
  40353. }
  40354. }
  40355. while (!this.match(11) && !this.match(21)) {
  40356. node2.params.push(this.flowParseFunctionTypeParam(false));
  40357. if (!this.match(11)) {
  40358. this.expect(12);
  40359. }
  40360. }
  40361. if (this.eat(21)) {
  40362. node2.rest = this.flowParseFunctionTypeParam(false);
  40363. }
  40364. this.expect(11);
  40365. node2.returnType = this.flowParseTypeInitialiser();
  40366. return this.finishNode(node2, "FunctionTypeAnnotation");
  40367. }
  40368. flowParseObjectTypeCallProperty(node2, isStatic) {
  40369. const valueNode = this.startNode();
  40370. node2.static = isStatic;
  40371. node2.value = this.flowParseObjectTypeMethodish(valueNode);
  40372. return this.finishNode(node2, "ObjectTypeCallProperty");
  40373. }
  40374. flowParseObjectType({
  40375. allowStatic,
  40376. allowExact,
  40377. allowSpread,
  40378. allowProto,
  40379. allowInexact
  40380. }) {
  40381. const oldInType = this.state.inType;
  40382. this.state.inType = true;
  40383. const nodeStart = this.startNode();
  40384. nodeStart.callProperties = [];
  40385. nodeStart.properties = [];
  40386. nodeStart.indexers = [];
  40387. nodeStart.internalSlots = [];
  40388. let endDelim;
  40389. let exact;
  40390. let inexact = false;
  40391. if (allowExact && this.match(6)) {
  40392. this.expect(6);
  40393. endDelim = 9;
  40394. exact = true;
  40395. } else {
  40396. this.expect(5);
  40397. endDelim = 8;
  40398. exact = false;
  40399. }
  40400. nodeStart.exact = exact;
  40401. while (!this.match(endDelim)) {
  40402. let isStatic = false;
  40403. let protoStartLoc = null;
  40404. let inexactStartLoc = null;
  40405. const node2 = this.startNode();
  40406. if (allowProto && this.isContextual(116)) {
  40407. const lookahead3 = this.lookahead();
  40408. if (lookahead3.type !== 14 && lookahead3.type !== 17) {
  40409. this.next();
  40410. protoStartLoc = this.state.startLoc;
  40411. allowStatic = false;
  40412. }
  40413. }
  40414. if (allowStatic && this.isContextual(104)) {
  40415. const lookahead3 = this.lookahead();
  40416. if (lookahead3.type !== 14 && lookahead3.type !== 17) {
  40417. this.next();
  40418. isStatic = true;
  40419. }
  40420. }
  40421. const variance = this.flowParseVariance();
  40422. if (this.eat(0)) {
  40423. if (protoStartLoc != null) {
  40424. this.unexpected(protoStartLoc);
  40425. }
  40426. if (this.eat(0)) {
  40427. if (variance) {
  40428. this.unexpected(variance.loc.start);
  40429. }
  40430. nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node2, isStatic));
  40431. } else {
  40432. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node2, isStatic, variance));
  40433. }
  40434. } else if (this.match(10) || this.match(47)) {
  40435. if (protoStartLoc != null) {
  40436. this.unexpected(protoStartLoc);
  40437. }
  40438. if (variance) {
  40439. this.unexpected(variance.loc.start);
  40440. }
  40441. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node2, isStatic));
  40442. } else {
  40443. let kind = "init";
  40444. if (this.isContextual(98) || this.isContextual(103)) {
  40445. const lookahead3 = this.lookahead();
  40446. if (tokenIsLiteralPropertyName(lookahead3.type)) {
  40447. kind = this.state.value;
  40448. this.next();
  40449. }
  40450. }
  40451. const propOrInexact = this.flowParseObjectTypeProperty(node2, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
  40452. if (propOrInexact === null) {
  40453. inexact = true;
  40454. inexactStartLoc = this.state.lastTokStartLoc;
  40455. } else {
  40456. nodeStart.properties.push(propOrInexact);
  40457. }
  40458. }
  40459. this.flowObjectTypeSemicolon();
  40460. if (inexactStartLoc && !this.match(8) && !this.match(9)) {
  40461. this.raise(FlowErrors.UnexpectedExplicitInexactInObject, {
  40462. at: inexactStartLoc
  40463. });
  40464. }
  40465. }
  40466. this.expect(endDelim);
  40467. if (allowSpread) {
  40468. nodeStart.inexact = inexact;
  40469. }
  40470. const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  40471. this.state.inType = oldInType;
  40472. return out;
  40473. }
  40474. flowParseObjectTypeProperty(node2, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact) {
  40475. if (this.eat(21)) {
  40476. const isInexactToken = this.match(12) || this.match(13) || this.match(8) || this.match(9);
  40477. if (isInexactToken) {
  40478. if (!allowSpread) {
  40479. this.raise(FlowErrors.InexactInsideNonObject, {
  40480. at: this.state.lastTokStartLoc
  40481. });
  40482. } else if (!allowInexact) {
  40483. this.raise(FlowErrors.InexactInsideExact, {
  40484. at: this.state.lastTokStartLoc
  40485. });
  40486. }
  40487. if (variance) {
  40488. this.raise(FlowErrors.InexactVariance, {
  40489. at: variance
  40490. });
  40491. }
  40492. return null;
  40493. }
  40494. if (!allowSpread) {
  40495. this.raise(FlowErrors.UnexpectedSpreadType, {
  40496. at: this.state.lastTokStartLoc
  40497. });
  40498. }
  40499. if (protoStartLoc != null) {
  40500. this.unexpected(protoStartLoc);
  40501. }
  40502. if (variance) {
  40503. this.raise(FlowErrors.SpreadVariance, {
  40504. at: variance
  40505. });
  40506. }
  40507. node2.argument = this.flowParseType();
  40508. return this.finishNode(node2, "ObjectTypeSpreadProperty");
  40509. } else {
  40510. node2.key = this.flowParseObjectPropertyKey();
  40511. node2.static = isStatic;
  40512. node2.proto = protoStartLoc != null;
  40513. node2.kind = kind;
  40514. let optional = false;
  40515. if (this.match(47) || this.match(10)) {
  40516. node2.method = true;
  40517. if (protoStartLoc != null) {
  40518. this.unexpected(protoStartLoc);
  40519. }
  40520. if (variance) {
  40521. this.unexpected(variance.loc.start);
  40522. }
  40523. node2.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node2.loc.start));
  40524. if (kind === "get" || kind === "set") {
  40525. this.flowCheckGetterSetterParams(node2);
  40526. }
  40527. if (!allowSpread && node2.key.name === "constructor" && node2.value.this) {
  40528. this.raise(FlowErrors.ThisParamBannedInConstructor, {
  40529. at: node2.value.this
  40530. });
  40531. }
  40532. } else {
  40533. if (kind !== "init")
  40534. this.unexpected();
  40535. node2.method = false;
  40536. if (this.eat(17)) {
  40537. optional = true;
  40538. }
  40539. node2.value = this.flowParseTypeInitialiser();
  40540. node2.variance = variance;
  40541. }
  40542. node2.optional = optional;
  40543. return this.finishNode(node2, "ObjectTypeProperty");
  40544. }
  40545. }
  40546. flowCheckGetterSetterParams(property) {
  40547. const paramCount = property.kind === "get" ? 0 : 1;
  40548. const length = property.value.params.length + (property.value.rest ? 1 : 0);
  40549. if (property.value.this) {
  40550. this.raise(property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam, {
  40551. at: property.value.this
  40552. });
  40553. }
  40554. if (length !== paramCount) {
  40555. this.raise(property.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, {
  40556. at: property
  40557. });
  40558. }
  40559. if (property.kind === "set" && property.value.rest) {
  40560. this.raise(Errors.BadSetterRestParameter, {
  40561. at: property
  40562. });
  40563. }
  40564. }
  40565. flowObjectTypeSemicolon() {
  40566. if (!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9)) {
  40567. this.unexpected();
  40568. }
  40569. }
  40570. flowParseQualifiedTypeIdentifier(startLoc, id) {
  40571. var _startLoc;
  40572. (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc;
  40573. let node2 = id || this.flowParseRestrictedIdentifier(true);
  40574. while (this.eat(16)) {
  40575. const node22 = this.startNodeAt(startLoc);
  40576. node22.qualification = node2;
  40577. node22.id = this.flowParseRestrictedIdentifier(true);
  40578. node2 = this.finishNode(node22, "QualifiedTypeIdentifier");
  40579. }
  40580. return node2;
  40581. }
  40582. flowParseGenericType(startLoc, id) {
  40583. const node2 = this.startNodeAt(startLoc);
  40584. node2.typeParameters = null;
  40585. node2.id = this.flowParseQualifiedTypeIdentifier(startLoc, id);
  40586. if (this.match(47)) {
  40587. node2.typeParameters = this.flowParseTypeParameterInstantiation();
  40588. }
  40589. return this.finishNode(node2, "GenericTypeAnnotation");
  40590. }
  40591. flowParseTypeofType() {
  40592. const node2 = this.startNode();
  40593. this.expect(87);
  40594. node2.argument = this.flowParsePrimaryType();
  40595. return this.finishNode(node2, "TypeofTypeAnnotation");
  40596. }
  40597. flowParseTupleType() {
  40598. const node2 = this.startNode();
  40599. node2.types = [];
  40600. this.expect(0);
  40601. while (this.state.pos < this.length && !this.match(3)) {
  40602. node2.types.push(this.flowParseType());
  40603. if (this.match(3))
  40604. break;
  40605. this.expect(12);
  40606. }
  40607. this.expect(3);
  40608. return this.finishNode(node2, "TupleTypeAnnotation");
  40609. }
  40610. flowParseFunctionTypeParam(first) {
  40611. let name2 = null;
  40612. let optional = false;
  40613. let typeAnnotation = null;
  40614. const node2 = this.startNode();
  40615. const lh = this.lookahead();
  40616. const isThis = this.state.type === 78;
  40617. if (lh.type === 14 || lh.type === 17) {
  40618. if (isThis && !first) {
  40619. this.raise(FlowErrors.ThisParamMustBeFirst, {
  40620. at: node2
  40621. });
  40622. }
  40623. name2 = this.parseIdentifier(isThis);
  40624. if (this.eat(17)) {
  40625. optional = true;
  40626. if (isThis) {
  40627. this.raise(FlowErrors.ThisParamMayNotBeOptional, {
  40628. at: node2
  40629. });
  40630. }
  40631. }
  40632. typeAnnotation = this.flowParseTypeInitialiser();
  40633. } else {
  40634. typeAnnotation = this.flowParseType();
  40635. }
  40636. node2.name = name2;
  40637. node2.optional = optional;
  40638. node2.typeAnnotation = typeAnnotation;
  40639. return this.finishNode(node2, "FunctionTypeParam");
  40640. }
  40641. reinterpretTypeAsFunctionTypeParam(type) {
  40642. const node2 = this.startNodeAt(type.loc.start);
  40643. node2.name = null;
  40644. node2.optional = false;
  40645. node2.typeAnnotation = type;
  40646. return this.finishNode(node2, "FunctionTypeParam");
  40647. }
  40648. flowParseFunctionTypeParams(params = []) {
  40649. let rest = null;
  40650. let _this = null;
  40651. if (this.match(78)) {
  40652. _this = this.flowParseFunctionTypeParam(true);
  40653. _this.name = null;
  40654. if (!this.match(11)) {
  40655. this.expect(12);
  40656. }
  40657. }
  40658. while (!this.match(11) && !this.match(21)) {
  40659. params.push(this.flowParseFunctionTypeParam(false));
  40660. if (!this.match(11)) {
  40661. this.expect(12);
  40662. }
  40663. }
  40664. if (this.eat(21)) {
  40665. rest = this.flowParseFunctionTypeParam(false);
  40666. }
  40667. return {
  40668. params,
  40669. rest,
  40670. _this
  40671. };
  40672. }
  40673. flowIdentToTypeAnnotation(startLoc, node2, id) {
  40674. switch (id.name) {
  40675. case "any":
  40676. return this.finishNode(node2, "AnyTypeAnnotation");
  40677. case "bool":
  40678. case "boolean":
  40679. return this.finishNode(node2, "BooleanTypeAnnotation");
  40680. case "mixed":
  40681. return this.finishNode(node2, "MixedTypeAnnotation");
  40682. case "empty":
  40683. return this.finishNode(node2, "EmptyTypeAnnotation");
  40684. case "number":
  40685. return this.finishNode(node2, "NumberTypeAnnotation");
  40686. case "string":
  40687. return this.finishNode(node2, "StringTypeAnnotation");
  40688. case "symbol":
  40689. return this.finishNode(node2, "SymbolTypeAnnotation");
  40690. default:
  40691. this.checkNotUnderscore(id.name);
  40692. return this.flowParseGenericType(startLoc, id);
  40693. }
  40694. }
  40695. flowParsePrimaryType() {
  40696. const startLoc = this.state.startLoc;
  40697. const node2 = this.startNode();
  40698. let tmp;
  40699. let type;
  40700. let isGroupedType = false;
  40701. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  40702. switch (this.state.type) {
  40703. case 5:
  40704. return this.flowParseObjectType({
  40705. allowStatic: false,
  40706. allowExact: false,
  40707. allowSpread: true,
  40708. allowProto: false,
  40709. allowInexact: true
  40710. });
  40711. case 6:
  40712. return this.flowParseObjectType({
  40713. allowStatic: false,
  40714. allowExact: true,
  40715. allowSpread: true,
  40716. allowProto: false,
  40717. allowInexact: false
  40718. });
  40719. case 0:
  40720. this.state.noAnonFunctionType = false;
  40721. type = this.flowParseTupleType();
  40722. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  40723. return type;
  40724. case 47:
  40725. node2.typeParameters = this.flowParseTypeParameterDeclaration();
  40726. this.expect(10);
  40727. tmp = this.flowParseFunctionTypeParams();
  40728. node2.params = tmp.params;
  40729. node2.rest = tmp.rest;
  40730. node2.this = tmp._this;
  40731. this.expect(11);
  40732. this.expect(19);
  40733. node2.returnType = this.flowParseType();
  40734. return this.finishNode(node2, "FunctionTypeAnnotation");
  40735. case 10:
  40736. this.next();
  40737. if (!this.match(11) && !this.match(21)) {
  40738. if (tokenIsIdentifier(this.state.type) || this.match(78)) {
  40739. const token2 = this.lookahead().type;
  40740. isGroupedType = token2 !== 17 && token2 !== 14;
  40741. } else {
  40742. isGroupedType = true;
  40743. }
  40744. }
  40745. if (isGroupedType) {
  40746. this.state.noAnonFunctionType = false;
  40747. type = this.flowParseType();
  40748. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  40749. if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) {
  40750. this.expect(11);
  40751. return type;
  40752. } else {
  40753. this.eat(12);
  40754. }
  40755. }
  40756. if (type) {
  40757. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  40758. } else {
  40759. tmp = this.flowParseFunctionTypeParams();
  40760. }
  40761. node2.params = tmp.params;
  40762. node2.rest = tmp.rest;
  40763. node2.this = tmp._this;
  40764. this.expect(11);
  40765. this.expect(19);
  40766. node2.returnType = this.flowParseType();
  40767. node2.typeParameters = null;
  40768. return this.finishNode(node2, "FunctionTypeAnnotation");
  40769. case 131:
  40770. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  40771. case 85:
  40772. case 86:
  40773. node2.value = this.match(85);
  40774. this.next();
  40775. return this.finishNode(node2, "BooleanLiteralTypeAnnotation");
  40776. case 53:
  40777. if (this.state.value === "-") {
  40778. this.next();
  40779. if (this.match(132)) {
  40780. return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node2);
  40781. }
  40782. if (this.match(133)) {
  40783. return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node2);
  40784. }
  40785. throw this.raise(FlowErrors.UnexpectedSubtractionOperand, {
  40786. at: this.state.startLoc
  40787. });
  40788. }
  40789. this.unexpected();
  40790. return;
  40791. case 132:
  40792. return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
  40793. case 133:
  40794. return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
  40795. case 88:
  40796. this.next();
  40797. return this.finishNode(node2, "VoidTypeAnnotation");
  40798. case 84:
  40799. this.next();
  40800. return this.finishNode(node2, "NullLiteralTypeAnnotation");
  40801. case 78:
  40802. this.next();
  40803. return this.finishNode(node2, "ThisTypeAnnotation");
  40804. case 55:
  40805. this.next();
  40806. return this.finishNode(node2, "ExistsTypeAnnotation");
  40807. case 87:
  40808. return this.flowParseTypeofType();
  40809. default:
  40810. if (tokenIsKeyword(this.state.type)) {
  40811. const label = tokenLabelName(this.state.type);
  40812. this.next();
  40813. return super.createIdentifier(node2, label);
  40814. } else if (tokenIsIdentifier(this.state.type)) {
  40815. if (this.isContextual(127)) {
  40816. return this.flowParseInterfaceType();
  40817. }
  40818. return this.flowIdentToTypeAnnotation(startLoc, node2, this.parseIdentifier());
  40819. }
  40820. }
  40821. this.unexpected();
  40822. }
  40823. flowParsePostfixType() {
  40824. const startLoc = this.state.startLoc;
  40825. let type = this.flowParsePrimaryType();
  40826. let seenOptionalIndexedAccess = false;
  40827. while ((this.match(0) || this.match(18)) && !this.canInsertSemicolon()) {
  40828. const node2 = this.startNodeAt(startLoc);
  40829. const optional = this.eat(18);
  40830. seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;
  40831. this.expect(0);
  40832. if (!optional && this.match(3)) {
  40833. node2.elementType = type;
  40834. this.next();
  40835. type = this.finishNode(node2, "ArrayTypeAnnotation");
  40836. } else {
  40837. node2.objectType = type;
  40838. node2.indexType = this.flowParseType();
  40839. this.expect(3);
  40840. if (seenOptionalIndexedAccess) {
  40841. node2.optional = optional;
  40842. type = this.finishNode(node2, "OptionalIndexedAccessType");
  40843. } else {
  40844. type = this.finishNode(node2, "IndexedAccessType");
  40845. }
  40846. }
  40847. }
  40848. return type;
  40849. }
  40850. flowParsePrefixType() {
  40851. const node2 = this.startNode();
  40852. if (this.eat(17)) {
  40853. node2.typeAnnotation = this.flowParsePrefixType();
  40854. return this.finishNode(node2, "NullableTypeAnnotation");
  40855. } else {
  40856. return this.flowParsePostfixType();
  40857. }
  40858. }
  40859. flowParseAnonFunctionWithoutParens() {
  40860. const param = this.flowParsePrefixType();
  40861. if (!this.state.noAnonFunctionType && this.eat(19)) {
  40862. const node2 = this.startNodeAt(param.loc.start);
  40863. node2.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  40864. node2.rest = null;
  40865. node2.this = null;
  40866. node2.returnType = this.flowParseType();
  40867. node2.typeParameters = null;
  40868. return this.finishNode(node2, "FunctionTypeAnnotation");
  40869. }
  40870. return param;
  40871. }
  40872. flowParseIntersectionType() {
  40873. const node2 = this.startNode();
  40874. this.eat(45);
  40875. const type = this.flowParseAnonFunctionWithoutParens();
  40876. node2.types = [type];
  40877. while (this.eat(45)) {
  40878. node2.types.push(this.flowParseAnonFunctionWithoutParens());
  40879. }
  40880. return node2.types.length === 1 ? type : this.finishNode(node2, "IntersectionTypeAnnotation");
  40881. }
  40882. flowParseUnionType() {
  40883. const node2 = this.startNode();
  40884. this.eat(43);
  40885. const type = this.flowParseIntersectionType();
  40886. node2.types = [type];
  40887. while (this.eat(43)) {
  40888. node2.types.push(this.flowParseIntersectionType());
  40889. }
  40890. return node2.types.length === 1 ? type : this.finishNode(node2, "UnionTypeAnnotation");
  40891. }
  40892. flowParseType() {
  40893. const oldInType = this.state.inType;
  40894. this.state.inType = true;
  40895. const type = this.flowParseUnionType();
  40896. this.state.inType = oldInType;
  40897. return type;
  40898. }
  40899. flowParseTypeOrImplicitInstantiation() {
  40900. if (this.state.type === 130 && this.state.value === "_") {
  40901. const startLoc = this.state.startLoc;
  40902. const node2 = this.parseIdentifier();
  40903. return this.flowParseGenericType(startLoc, node2);
  40904. } else {
  40905. return this.flowParseType();
  40906. }
  40907. }
  40908. flowParseTypeAnnotation() {
  40909. const node2 = this.startNode();
  40910. node2.typeAnnotation = this.flowParseTypeInitialiser();
  40911. return this.finishNode(node2, "TypeAnnotation");
  40912. }
  40913. flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
  40914. const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
  40915. if (this.match(14)) {
  40916. ident.typeAnnotation = this.flowParseTypeAnnotation();
  40917. this.resetEndLocation(ident);
  40918. }
  40919. return ident;
  40920. }
  40921. typeCastToParameter(node2) {
  40922. node2.expression.typeAnnotation = node2.typeAnnotation;
  40923. this.resetEndLocation(node2.expression, node2.typeAnnotation.loc.end);
  40924. return node2.expression;
  40925. }
  40926. flowParseVariance() {
  40927. let variance = null;
  40928. if (this.match(53)) {
  40929. variance = this.startNode();
  40930. if (this.state.value === "+") {
  40931. variance.kind = "plus";
  40932. } else {
  40933. variance.kind = "minus";
  40934. }
  40935. this.next();
  40936. return this.finishNode(variance, "Variance");
  40937. }
  40938. return variance;
  40939. }
  40940. parseFunctionBody(node2, allowExpressionBody, isMethod = false) {
  40941. if (allowExpressionBody) {
  40942. this.forwardNoArrowParamsConversionAt(node2, () => super.parseFunctionBody(node2, true, isMethod));
  40943. return;
  40944. }
  40945. super.parseFunctionBody(node2, false, isMethod);
  40946. }
  40947. parseFunctionBodyAndFinish(node2, type, isMethod = false) {
  40948. if (this.match(14)) {
  40949. const typeNode = this.startNode();
  40950. [typeNode.typeAnnotation, node2.predicate] = this.flowParseTypeAndPredicateInitialiser();
  40951. node2.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
  40952. }
  40953. return super.parseFunctionBodyAndFinish(node2, type, isMethod);
  40954. }
  40955. parseStatementLike(flags) {
  40956. if (this.state.strict && this.isContextual(127)) {
  40957. const lookahead3 = this.lookahead();
  40958. if (tokenIsKeywordOrIdentifier(lookahead3.type)) {
  40959. const node2 = this.startNode();
  40960. this.next();
  40961. return this.flowParseInterface(node2);
  40962. }
  40963. } else if (this.shouldParseEnums() && this.isContextual(124)) {
  40964. const node2 = this.startNode();
  40965. this.next();
  40966. return this.flowParseEnumDeclaration(node2);
  40967. }
  40968. const stmt = super.parseStatementLike(flags);
  40969. if (this.flowPragma === void 0 && !this.isValidDirective(stmt)) {
  40970. this.flowPragma = null;
  40971. }
  40972. return stmt;
  40973. }
  40974. parseExpressionStatement(node2, expr, decorators) {
  40975. if (expr.type === "Identifier") {
  40976. if (expr.name === "declare") {
  40977. if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) {
  40978. return this.flowParseDeclare(node2);
  40979. }
  40980. } else if (tokenIsIdentifier(this.state.type)) {
  40981. if (expr.name === "interface") {
  40982. return this.flowParseInterface(node2);
  40983. } else if (expr.name === "type") {
  40984. return this.flowParseTypeAlias(node2);
  40985. } else if (expr.name === "opaque") {
  40986. return this.flowParseOpaqueType(node2, false);
  40987. }
  40988. }
  40989. }
  40990. return super.parseExpressionStatement(node2, expr, decorators);
  40991. }
  40992. shouldParseExportDeclaration() {
  40993. const {
  40994. type
  40995. } = this.state;
  40996. if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 124) {
  40997. return !this.state.containsEsc;
  40998. }
  40999. return super.shouldParseExportDeclaration();
  41000. }
  41001. isExportDefaultSpecifier() {
  41002. const {
  41003. type
  41004. } = this.state;
  41005. if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 124) {
  41006. return this.state.containsEsc;
  41007. }
  41008. return super.isExportDefaultSpecifier();
  41009. }
  41010. parseExportDefaultExpression() {
  41011. if (this.shouldParseEnums() && this.isContextual(124)) {
  41012. const node2 = this.startNode();
  41013. this.next();
  41014. return this.flowParseEnumDeclaration(node2);
  41015. }
  41016. return super.parseExportDefaultExpression();
  41017. }
  41018. parseConditional(expr, startLoc, refExpressionErrors) {
  41019. if (!this.match(17))
  41020. return expr;
  41021. if (this.state.maybeInArrowParameters) {
  41022. const nextCh = this.lookaheadCharCode();
  41023. if (nextCh === 44 || nextCh === 61 || nextCh === 58 || nextCh === 41) {
  41024. this.setOptionalParametersError(refExpressionErrors);
  41025. return expr;
  41026. }
  41027. }
  41028. this.expect(17);
  41029. const state = this.state.clone();
  41030. const originalNoArrowAt = this.state.noArrowAt;
  41031. const node2 = this.startNodeAt(startLoc);
  41032. let {
  41033. consequent,
  41034. failed
  41035. } = this.tryParseConditionalConsequent();
  41036. let [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  41037. if (failed || invalid2.length > 0) {
  41038. const noArrowAt = [...originalNoArrowAt];
  41039. if (invalid2.length > 0) {
  41040. this.state = state;
  41041. this.state.noArrowAt = noArrowAt;
  41042. for (let i = 0; i < invalid2.length; i++) {
  41043. noArrowAt.push(invalid2[i].start);
  41044. }
  41045. ({
  41046. consequent,
  41047. failed
  41048. } = this.tryParseConditionalConsequent());
  41049. [valid2, invalid2] = this.getArrowLikeExpressions(consequent);
  41050. }
  41051. if (failed && valid2.length > 1) {
  41052. this.raise(FlowErrors.AmbiguousConditionalArrow, {
  41053. at: state.startLoc
  41054. });
  41055. }
  41056. if (failed && valid2.length === 1) {
  41057. this.state = state;
  41058. noArrowAt.push(valid2[0].start);
  41059. this.state.noArrowAt = noArrowAt;
  41060. ({
  41061. consequent,
  41062. failed
  41063. } = this.tryParseConditionalConsequent());
  41064. }
  41065. }
  41066. this.getArrowLikeExpressions(consequent, true);
  41067. this.state.noArrowAt = originalNoArrowAt;
  41068. this.expect(14);
  41069. node2.test = expr;
  41070. node2.consequent = consequent;
  41071. node2.alternate = this.forwardNoArrowParamsConversionAt(node2, () => this.parseMaybeAssign(void 0, void 0));
  41072. return this.finishNode(node2, "ConditionalExpression");
  41073. }
  41074. tryParseConditionalConsequent() {
  41075. this.state.noArrowParamsConversionAt.push(this.state.start);
  41076. const consequent = this.parseMaybeAssignAllowIn();
  41077. const failed = !this.match(14);
  41078. this.state.noArrowParamsConversionAt.pop();
  41079. return {
  41080. consequent,
  41081. failed
  41082. };
  41083. }
  41084. getArrowLikeExpressions(node2, disallowInvalid) {
  41085. const stack2 = [node2];
  41086. const arrows = [];
  41087. while (stack2.length !== 0) {
  41088. const node3 = stack2.pop();
  41089. if (node3.type === "ArrowFunctionExpression") {
  41090. if (node3.typeParameters || !node3.returnType) {
  41091. this.finishArrowValidation(node3);
  41092. } else {
  41093. arrows.push(node3);
  41094. }
  41095. stack2.push(node3.body);
  41096. } else if (node3.type === "ConditionalExpression") {
  41097. stack2.push(node3.consequent);
  41098. stack2.push(node3.alternate);
  41099. }
  41100. }
  41101. if (disallowInvalid) {
  41102. arrows.forEach((node3) => this.finishArrowValidation(node3));
  41103. return [arrows, []];
  41104. }
  41105. return partition(arrows, (node3) => node3.params.every((param) => this.isAssignable(param, true)));
  41106. }
  41107. finishArrowValidation(node2) {
  41108. var _node$extra;
  41109. this.toAssignableList(node2.params, (_node$extra = node2.extra) == null ? void 0 : _node$extra.trailingCommaLoc, false);
  41110. this.scope.enter(SCOPE_FUNCTION3 | SCOPE_ARROW3);
  41111. super.checkParams(node2, false, true);
  41112. this.scope.exit();
  41113. }
  41114. forwardNoArrowParamsConversionAt(node2, parse10) {
  41115. let result;
  41116. if (this.state.noArrowParamsConversionAt.indexOf(node2.start) !== -1) {
  41117. this.state.noArrowParamsConversionAt.push(this.state.start);
  41118. result = parse10();
  41119. this.state.noArrowParamsConversionAt.pop();
  41120. } else {
  41121. result = parse10();
  41122. }
  41123. return result;
  41124. }
  41125. parseParenItem(node2, startLoc) {
  41126. node2 = super.parseParenItem(node2, startLoc);
  41127. if (this.eat(17)) {
  41128. node2.optional = true;
  41129. this.resetEndLocation(node2);
  41130. }
  41131. if (this.match(14)) {
  41132. const typeCastNode = this.startNodeAt(startLoc);
  41133. typeCastNode.expression = node2;
  41134. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  41135. return this.finishNode(typeCastNode, "TypeCastExpression");
  41136. }
  41137. return node2;
  41138. }
  41139. assertModuleNodeAllowed(node2) {
  41140. if (node2.type === "ImportDeclaration" && (node2.importKind === "type" || node2.importKind === "typeof") || node2.type === "ExportNamedDeclaration" && node2.exportKind === "type" || node2.type === "ExportAllDeclaration" && node2.exportKind === "type") {
  41141. return;
  41142. }
  41143. super.assertModuleNodeAllowed(node2);
  41144. }
  41145. parseExport(node2, decorators) {
  41146. const decl = super.parseExport(node2, decorators);
  41147. if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
  41148. decl.exportKind = decl.exportKind || "value";
  41149. }
  41150. return decl;
  41151. }
  41152. parseExportDeclaration(node2) {
  41153. if (this.isContextual(128)) {
  41154. node2.exportKind = "type";
  41155. const declarationNode = this.startNode();
  41156. this.next();
  41157. if (this.match(5)) {
  41158. node2.specifiers = this.parseExportSpecifiers(true);
  41159. super.parseExportFrom(node2);
  41160. return null;
  41161. } else {
  41162. return this.flowParseTypeAlias(declarationNode);
  41163. }
  41164. } else if (this.isContextual(129)) {
  41165. node2.exportKind = "type";
  41166. const declarationNode = this.startNode();
  41167. this.next();
  41168. return this.flowParseOpaqueType(declarationNode, false);
  41169. } else if (this.isContextual(127)) {
  41170. node2.exportKind = "type";
  41171. const declarationNode = this.startNode();
  41172. this.next();
  41173. return this.flowParseInterface(declarationNode);
  41174. } else if (this.shouldParseEnums() && this.isContextual(124)) {
  41175. node2.exportKind = "value";
  41176. const declarationNode = this.startNode();
  41177. this.next();
  41178. return this.flowParseEnumDeclaration(declarationNode);
  41179. } else {
  41180. return super.parseExportDeclaration(node2);
  41181. }
  41182. }
  41183. eatExportStar(node2) {
  41184. if (super.eatExportStar(node2))
  41185. return true;
  41186. if (this.isContextual(128) && this.lookahead().type === 55) {
  41187. node2.exportKind = "type";
  41188. this.next();
  41189. this.next();
  41190. return true;
  41191. }
  41192. return false;
  41193. }
  41194. maybeParseExportNamespaceSpecifier(node2) {
  41195. const {
  41196. startLoc
  41197. } = this.state;
  41198. const hasNamespace = super.maybeParseExportNamespaceSpecifier(node2);
  41199. if (hasNamespace && node2.exportKind === "type") {
  41200. this.unexpected(startLoc);
  41201. }
  41202. return hasNamespace;
  41203. }
  41204. parseClassId(node2, isStatement, optionalId) {
  41205. super.parseClassId(node2, isStatement, optionalId);
  41206. if (this.match(47)) {
  41207. node2.typeParameters = this.flowParseTypeParameterDeclaration();
  41208. }
  41209. }
  41210. parseClassMember(classBody, member, state) {
  41211. const {
  41212. startLoc
  41213. } = this.state;
  41214. if (this.isContextual(123)) {
  41215. if (super.parseClassMemberFromModifier(classBody, member)) {
  41216. return;
  41217. }
  41218. member.declare = true;
  41219. }
  41220. super.parseClassMember(classBody, member, state);
  41221. if (member.declare) {
  41222. if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") {
  41223. this.raise(FlowErrors.DeclareClassElement, {
  41224. at: startLoc
  41225. });
  41226. } else if (member.value) {
  41227. this.raise(FlowErrors.DeclareClassFieldInitializer, {
  41228. at: member.value
  41229. });
  41230. }
  41231. }
  41232. }
  41233. isIterator(word) {
  41234. return word === "iterator" || word === "asyncIterator";
  41235. }
  41236. readIterator() {
  41237. const word = super.readWord1();
  41238. const fullWord = "@@" + word;
  41239. if (!this.isIterator(word) || !this.state.inType) {
  41240. this.raise(Errors.InvalidIdentifier, {
  41241. at: this.state.curPosition(),
  41242. identifierName: fullWord
  41243. });
  41244. }
  41245. this.finishToken(130, fullWord);
  41246. }
  41247. getTokenFromCode(code2) {
  41248. const next = this.input.charCodeAt(this.state.pos + 1);
  41249. if (code2 === 123 && next === 124) {
  41250. this.finishOp(6, 2);
  41251. } else if (this.state.inType && (code2 === 62 || code2 === 60)) {
  41252. this.finishOp(code2 === 62 ? 48 : 47, 1);
  41253. } else if (this.state.inType && code2 === 63) {
  41254. if (next === 46) {
  41255. this.finishOp(18, 2);
  41256. } else {
  41257. this.finishOp(17, 1);
  41258. }
  41259. } else if (isIteratorStart(code2, next, this.input.charCodeAt(this.state.pos + 2))) {
  41260. this.state.pos += 2;
  41261. this.readIterator();
  41262. } else {
  41263. super.getTokenFromCode(code2);
  41264. }
  41265. }
  41266. isAssignable(node2, isBinding) {
  41267. if (node2.type === "TypeCastExpression") {
  41268. return this.isAssignable(node2.expression, isBinding);
  41269. } else {
  41270. return super.isAssignable(node2, isBinding);
  41271. }
  41272. }
  41273. toAssignable(node2, isLHS = false) {
  41274. if (!isLHS && node2.type === "AssignmentExpression" && node2.left.type === "TypeCastExpression") {
  41275. node2.left = this.typeCastToParameter(node2.left);
  41276. }
  41277. super.toAssignable(node2, isLHS);
  41278. }
  41279. toAssignableList(exprList, trailingCommaLoc, isLHS) {
  41280. for (let i = 0; i < exprList.length; i++) {
  41281. const expr = exprList[i];
  41282. if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
  41283. exprList[i] = this.typeCastToParameter(expr);
  41284. }
  41285. }
  41286. super.toAssignableList(exprList, trailingCommaLoc, isLHS);
  41287. }
  41288. toReferencedList(exprList, isParenthesizedExpr) {
  41289. for (let i = 0; i < exprList.length; i++) {
  41290. var _expr$extra;
  41291. const expr = exprList[i];
  41292. if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
  41293. this.raise(FlowErrors.TypeCastInPattern, {
  41294. at: expr.typeAnnotation
  41295. });
  41296. }
  41297. }
  41298. return exprList;
  41299. }
  41300. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  41301. const node2 = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
  41302. if (canBePattern && !this.state.maybeInArrowParameters) {
  41303. this.toReferencedList(node2.elements);
  41304. }
  41305. return node2;
  41306. }
  41307. isValidLVal(type, isParenthesized, binding) {
  41308. return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding);
  41309. }
  41310. parseClassProperty(node2) {
  41311. if (this.match(14)) {
  41312. node2.typeAnnotation = this.flowParseTypeAnnotation();
  41313. }
  41314. return super.parseClassProperty(node2);
  41315. }
  41316. parseClassPrivateProperty(node2) {
  41317. if (this.match(14)) {
  41318. node2.typeAnnotation = this.flowParseTypeAnnotation();
  41319. }
  41320. return super.parseClassPrivateProperty(node2);
  41321. }
  41322. isClassMethod() {
  41323. return this.match(47) || super.isClassMethod();
  41324. }
  41325. isClassProperty() {
  41326. return this.match(14) || super.isClassProperty();
  41327. }
  41328. isNonstaticConstructor(method) {
  41329. return !this.match(14) && super.isNonstaticConstructor(method);
  41330. }
  41331. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  41332. if (method.variance) {
  41333. this.unexpected(method.variance.loc.start);
  41334. }
  41335. delete method.variance;
  41336. if (this.match(47)) {
  41337. method.typeParameters = this.flowParseTypeParameterDeclaration();
  41338. }
  41339. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  41340. if (method.params && isConstructor) {
  41341. const params = method.params;
  41342. if (params.length > 0 && this.isThisParam(params[0])) {
  41343. this.raise(FlowErrors.ThisParamBannedInConstructor, {
  41344. at: method
  41345. });
  41346. }
  41347. } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) {
  41348. const params = method.value.params;
  41349. if (params.length > 0 && this.isThisParam(params[0])) {
  41350. this.raise(FlowErrors.ThisParamBannedInConstructor, {
  41351. at: method
  41352. });
  41353. }
  41354. }
  41355. }
  41356. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  41357. if (method.variance) {
  41358. this.unexpected(method.variance.loc.start);
  41359. }
  41360. delete method.variance;
  41361. if (this.match(47)) {
  41362. method.typeParameters = this.flowParseTypeParameterDeclaration();
  41363. }
  41364. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  41365. }
  41366. parseClassSuper(node2) {
  41367. super.parseClassSuper(node2);
  41368. if (node2.superClass && this.match(47)) {
  41369. node2.superTypeParameters = this.flowParseTypeParameterInstantiation();
  41370. }
  41371. if (this.isContextual(111)) {
  41372. this.next();
  41373. const implemented = node2.implements = [];
  41374. do {
  41375. const node3 = this.startNode();
  41376. node3.id = this.flowParseRestrictedIdentifier(true);
  41377. if (this.match(47)) {
  41378. node3.typeParameters = this.flowParseTypeParameterInstantiation();
  41379. } else {
  41380. node3.typeParameters = null;
  41381. }
  41382. implemented.push(this.finishNode(node3, "ClassImplements"));
  41383. } while (this.eat(12));
  41384. }
  41385. }
  41386. checkGetterSetterParams(method) {
  41387. super.checkGetterSetterParams(method);
  41388. const params = this.getObjectOrClassMethodParams(method);
  41389. if (params.length > 0) {
  41390. const param = params[0];
  41391. if (this.isThisParam(param) && method.kind === "get") {
  41392. this.raise(FlowErrors.GetterMayNotHaveThisParam, {
  41393. at: param
  41394. });
  41395. } else if (this.isThisParam(param)) {
  41396. this.raise(FlowErrors.SetterMayNotHaveThisParam, {
  41397. at: param
  41398. });
  41399. }
  41400. }
  41401. }
  41402. parsePropertyNamePrefixOperator(node2) {
  41403. node2.variance = this.flowParseVariance();
  41404. }
  41405. parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  41406. if (prop.variance) {
  41407. this.unexpected(prop.variance.loc.start);
  41408. }
  41409. delete prop.variance;
  41410. let typeParameters;
  41411. if (this.match(47) && !isAccessor) {
  41412. typeParameters = this.flowParseTypeParameterDeclaration();
  41413. if (!this.match(10))
  41414. this.unexpected();
  41415. }
  41416. const result = super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  41417. if (typeParameters) {
  41418. (result.value || result).typeParameters = typeParameters;
  41419. }
  41420. return result;
  41421. }
  41422. parseAssignableListItemTypes(param) {
  41423. if (this.eat(17)) {
  41424. if (param.type !== "Identifier") {
  41425. this.raise(FlowErrors.PatternIsOptional, {
  41426. at: param
  41427. });
  41428. }
  41429. if (this.isThisParam(param)) {
  41430. this.raise(FlowErrors.ThisParamMayNotBeOptional, {
  41431. at: param
  41432. });
  41433. }
  41434. param.optional = true;
  41435. }
  41436. if (this.match(14)) {
  41437. param.typeAnnotation = this.flowParseTypeAnnotation();
  41438. } else if (this.isThisParam(param)) {
  41439. this.raise(FlowErrors.ThisParamAnnotationRequired, {
  41440. at: param
  41441. });
  41442. }
  41443. if (this.match(29) && this.isThisParam(param)) {
  41444. this.raise(FlowErrors.ThisParamNoDefault, {
  41445. at: param
  41446. });
  41447. }
  41448. this.resetEndLocation(param);
  41449. return param;
  41450. }
  41451. parseMaybeDefault(startLoc, left) {
  41452. const node2 = super.parseMaybeDefault(startLoc, left);
  41453. if (node2.type === "AssignmentPattern" && node2.typeAnnotation && node2.right.start < node2.typeAnnotation.start) {
  41454. this.raise(FlowErrors.TypeBeforeInitializer, {
  41455. at: node2.typeAnnotation
  41456. });
  41457. }
  41458. return node2;
  41459. }
  41460. shouldParseDefaultImport(node2) {
  41461. if (!hasTypeImportKind(node2)) {
  41462. return super.shouldParseDefaultImport(node2);
  41463. }
  41464. return isMaybeDefaultImport(this.state.type);
  41465. }
  41466. checkImportReflection(node2) {
  41467. super.checkImportReflection(node2);
  41468. if (node2.module && node2.importKind !== "value") {
  41469. this.raise(FlowErrors.ImportReflectionHasImportType, {
  41470. at: node2.specifiers[0].loc.start
  41471. });
  41472. }
  41473. }
  41474. parseImportSpecifierLocal(node2, specifier, type) {
  41475. specifier.local = hasTypeImportKind(node2) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
  41476. node2.specifiers.push(this.finishImportSpecifier(specifier, type));
  41477. }
  41478. maybeParseDefaultImportSpecifier(node2) {
  41479. node2.importKind = "value";
  41480. let kind = null;
  41481. if (this.match(87)) {
  41482. kind = "typeof";
  41483. } else if (this.isContextual(128)) {
  41484. kind = "type";
  41485. }
  41486. if (kind) {
  41487. const lh = this.lookahead();
  41488. const {
  41489. type
  41490. } = lh;
  41491. if (kind === "type" && type === 55) {
  41492. this.unexpected(null, lh.type);
  41493. }
  41494. if (isMaybeDefaultImport(type) || type === 5 || type === 55) {
  41495. this.next();
  41496. node2.importKind = kind;
  41497. }
  41498. }
  41499. return super.maybeParseDefaultImportSpecifier(node2);
  41500. }
  41501. parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) {
  41502. const firstIdent = specifier.imported;
  41503. let specifierTypeKind = null;
  41504. if (firstIdent.type === "Identifier") {
  41505. if (firstIdent.name === "type") {
  41506. specifierTypeKind = "type";
  41507. } else if (firstIdent.name === "typeof") {
  41508. specifierTypeKind = "typeof";
  41509. }
  41510. }
  41511. let isBinding = false;
  41512. if (this.isContextual(93) && !this.isLookaheadContextual("as")) {
  41513. const as_ident = this.parseIdentifier(true);
  41514. if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) {
  41515. specifier.imported = as_ident;
  41516. specifier.importKind = specifierTypeKind;
  41517. specifier.local = cloneIdentifier(as_ident);
  41518. } else {
  41519. specifier.imported = firstIdent;
  41520. specifier.importKind = null;
  41521. specifier.local = this.parseIdentifier();
  41522. }
  41523. } else {
  41524. if (specifierTypeKind !== null && tokenIsKeywordOrIdentifier(this.state.type)) {
  41525. specifier.imported = this.parseIdentifier(true);
  41526. specifier.importKind = specifierTypeKind;
  41527. } else {
  41528. if (importedIsString) {
  41529. throw this.raise(Errors.ImportBindingIsString, {
  41530. at: specifier,
  41531. importName: firstIdent.value
  41532. });
  41533. }
  41534. specifier.imported = firstIdent;
  41535. specifier.importKind = null;
  41536. }
  41537. if (this.eatContextual(93)) {
  41538. specifier.local = this.parseIdentifier();
  41539. } else {
  41540. isBinding = true;
  41541. specifier.local = cloneIdentifier(specifier.imported);
  41542. }
  41543. }
  41544. const specifierIsTypeImport = hasTypeImportKind(specifier);
  41545. if (isInTypeOnlyImport && specifierIsTypeImport) {
  41546. this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, {
  41547. at: specifier
  41548. });
  41549. }
  41550. if (isInTypeOnlyImport || specifierIsTypeImport) {
  41551. this.checkReservedType(specifier.local.name, specifier.local.loc.start, true);
  41552. }
  41553. if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) {
  41554. this.checkReservedWord(specifier.local.name, specifier.loc.start, true, true);
  41555. }
  41556. return this.finishImportSpecifier(specifier, "ImportSpecifier");
  41557. }
  41558. parseBindingAtom() {
  41559. switch (this.state.type) {
  41560. case 78:
  41561. return this.parseIdentifier(true);
  41562. default:
  41563. return super.parseBindingAtom();
  41564. }
  41565. }
  41566. parseFunctionParams(node2, isConstructor) {
  41567. const kind = node2.kind;
  41568. if (kind !== "get" && kind !== "set" && this.match(47)) {
  41569. node2.typeParameters = this.flowParseTypeParameterDeclaration();
  41570. }
  41571. super.parseFunctionParams(node2, isConstructor);
  41572. }
  41573. parseVarId(decl, kind) {
  41574. super.parseVarId(decl, kind);
  41575. if (this.match(14)) {
  41576. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  41577. this.resetEndLocation(decl.id);
  41578. }
  41579. }
  41580. parseAsyncArrowFromCallExpression(node2, call) {
  41581. if (this.match(14)) {
  41582. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  41583. this.state.noAnonFunctionType = true;
  41584. node2.returnType = this.flowParseTypeAnnotation();
  41585. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  41586. }
  41587. return super.parseAsyncArrowFromCallExpression(node2, call);
  41588. }
  41589. shouldParseAsyncArrow() {
  41590. return this.match(14) || super.shouldParseAsyncArrow();
  41591. }
  41592. parseMaybeAssign(refExpressionErrors, afterLeftParse) {
  41593. var _jsx;
  41594. let state = null;
  41595. let jsx3;
  41596. if (this.hasPlugin("jsx") && (this.match(140) || this.match(47))) {
  41597. state = this.state.clone();
  41598. jsx3 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state);
  41599. if (!jsx3.error)
  41600. return jsx3.node;
  41601. const {
  41602. context
  41603. } = this.state;
  41604. const currentContext = context[context.length - 1];
  41605. if (currentContext === types3.j_oTag || currentContext === types3.j_expr) {
  41606. context.pop();
  41607. }
  41608. }
  41609. if ((_jsx = jsx3) != null && _jsx.error || this.match(47)) {
  41610. var _jsx2, _jsx3;
  41611. state = state || this.state.clone();
  41612. let typeParameters;
  41613. const arrow = this.tryParse((abort) => {
  41614. var _arrowExpression$extr;
  41615. typeParameters = this.flowParseTypeParameterDeclaration();
  41616. const arrowExpression2 = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
  41617. const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  41618. this.resetStartLocationFromNode(result, typeParameters);
  41619. return result;
  41620. });
  41621. if ((_arrowExpression$extr = arrowExpression2.extra) != null && _arrowExpression$extr.parenthesized)
  41622. abort();
  41623. const expr = this.maybeUnwrapTypeCastExpression(arrowExpression2);
  41624. if (expr.type !== "ArrowFunctionExpression")
  41625. abort();
  41626. expr.typeParameters = typeParameters;
  41627. this.resetStartLocationFromNode(expr, typeParameters);
  41628. return arrowExpression2;
  41629. }, state);
  41630. let arrowExpression = null;
  41631. if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
  41632. if (!arrow.error && !arrow.aborted) {
  41633. if (arrow.node.async) {
  41634. this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction, {
  41635. at: typeParameters
  41636. });
  41637. }
  41638. return arrow.node;
  41639. }
  41640. arrowExpression = arrow.node;
  41641. }
  41642. if ((_jsx2 = jsx3) != null && _jsx2.node) {
  41643. this.state = jsx3.failState;
  41644. return jsx3.node;
  41645. }
  41646. if (arrowExpression) {
  41647. this.state = arrow.failState;
  41648. return arrowExpression;
  41649. }
  41650. if ((_jsx3 = jsx3) != null && _jsx3.thrown)
  41651. throw jsx3.error;
  41652. if (arrow.thrown)
  41653. throw arrow.error;
  41654. throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, {
  41655. at: typeParameters
  41656. });
  41657. }
  41658. return super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  41659. }
  41660. parseArrow(node2) {
  41661. if (this.match(14)) {
  41662. const result = this.tryParse(() => {
  41663. const oldNoAnonFunctionType = this.state.noAnonFunctionType;
  41664. this.state.noAnonFunctionType = true;
  41665. const typeNode = this.startNode();
  41666. [typeNode.typeAnnotation, node2.predicate] = this.flowParseTypeAndPredicateInitialiser();
  41667. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  41668. if (this.canInsertSemicolon())
  41669. this.unexpected();
  41670. if (!this.match(19))
  41671. this.unexpected();
  41672. return typeNode;
  41673. });
  41674. if (result.thrown)
  41675. return null;
  41676. if (result.error)
  41677. this.state = result.failState;
  41678. node2.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
  41679. }
  41680. return super.parseArrow(node2);
  41681. }
  41682. shouldParseArrow(params) {
  41683. return this.match(14) || super.shouldParseArrow(params);
  41684. }
  41685. setArrowFunctionParameters(node2, params) {
  41686. if (this.state.noArrowParamsConversionAt.indexOf(node2.start) !== -1) {
  41687. node2.params = params;
  41688. } else {
  41689. super.setArrowFunctionParameters(node2, params);
  41690. }
  41691. }
  41692. checkParams(node2, allowDuplicates, isArrowFunction, strictModeChanged = true) {
  41693. if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node2.start) !== -1) {
  41694. return;
  41695. }
  41696. for (let i = 0; i < node2.params.length; i++) {
  41697. if (this.isThisParam(node2.params[i]) && i > 0) {
  41698. this.raise(FlowErrors.ThisParamMustBeFirst, {
  41699. at: node2.params[i]
  41700. });
  41701. }
  41702. }
  41703. super.checkParams(node2, allowDuplicates, isArrowFunction, strictModeChanged);
  41704. }
  41705. parseParenAndDistinguishExpression(canBeArrow) {
  41706. return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
  41707. }
  41708. parseSubscripts(base2, startLoc, noCalls) {
  41709. if (base2.type === "Identifier" && base2.name === "async" && this.state.noArrowAt.indexOf(startLoc.index) !== -1) {
  41710. this.next();
  41711. const node2 = this.startNodeAt(startLoc);
  41712. node2.callee = base2;
  41713. node2.arguments = super.parseCallExpressionArguments(11, false);
  41714. base2 = this.finishNode(node2, "CallExpression");
  41715. } else if (base2.type === "Identifier" && base2.name === "async" && this.match(47)) {
  41716. const state = this.state.clone();
  41717. const arrow = this.tryParse((abort) => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(), state);
  41718. if (!arrow.error && !arrow.aborted)
  41719. return arrow.node;
  41720. const result = this.tryParse(() => super.parseSubscripts(base2, startLoc, noCalls), state);
  41721. if (result.node && !result.error)
  41722. return result.node;
  41723. if (arrow.node) {
  41724. this.state = arrow.failState;
  41725. return arrow.node;
  41726. }
  41727. if (result.node) {
  41728. this.state = result.failState;
  41729. return result.node;
  41730. }
  41731. throw arrow.error || result.error;
  41732. }
  41733. return super.parseSubscripts(base2, startLoc, noCalls);
  41734. }
  41735. parseSubscript(base2, startLoc, noCalls, subscriptState) {
  41736. if (this.match(18) && this.isLookaheadToken_lt()) {
  41737. subscriptState.optionalChainMember = true;
  41738. if (noCalls) {
  41739. subscriptState.stop = true;
  41740. return base2;
  41741. }
  41742. this.next();
  41743. const node2 = this.startNodeAt(startLoc);
  41744. node2.callee = base2;
  41745. node2.typeArguments = this.flowParseTypeParameterInstantiation();
  41746. this.expect(10);
  41747. node2.arguments = this.parseCallExpressionArguments(11, false);
  41748. node2.optional = true;
  41749. return this.finishCallExpression(node2, true);
  41750. } else if (!noCalls && this.shouldParseTypes() && this.match(47)) {
  41751. const node2 = this.startNodeAt(startLoc);
  41752. node2.callee = base2;
  41753. const result = this.tryParse(() => {
  41754. node2.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
  41755. this.expect(10);
  41756. node2.arguments = super.parseCallExpressionArguments(11, false);
  41757. if (subscriptState.optionalChainMember) {
  41758. node2.optional = false;
  41759. }
  41760. return this.finishCallExpression(node2, subscriptState.optionalChainMember);
  41761. });
  41762. if (result.node) {
  41763. if (result.error)
  41764. this.state = result.failState;
  41765. return result.node;
  41766. }
  41767. }
  41768. return super.parseSubscript(base2, startLoc, noCalls, subscriptState);
  41769. }
  41770. parseNewCallee(node2) {
  41771. super.parseNewCallee(node2);
  41772. let targs = null;
  41773. if (this.shouldParseTypes() && this.match(47)) {
  41774. targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node;
  41775. }
  41776. node2.typeArguments = targs;
  41777. }
  41778. parseAsyncArrowWithTypeParameters(startLoc) {
  41779. const node2 = this.startNodeAt(startLoc);
  41780. this.parseFunctionParams(node2, false);
  41781. if (!this.parseArrow(node2))
  41782. return;
  41783. return super.parseArrowExpression(node2, void 0, true);
  41784. }
  41785. readToken_mult_modulo(code2) {
  41786. const next = this.input.charCodeAt(this.state.pos + 1);
  41787. if (code2 === 42 && next === 47 && this.state.hasFlowComment) {
  41788. this.state.hasFlowComment = false;
  41789. this.state.pos += 2;
  41790. this.nextToken();
  41791. return;
  41792. }
  41793. super.readToken_mult_modulo(code2);
  41794. }
  41795. readToken_pipe_amp(code2) {
  41796. const next = this.input.charCodeAt(this.state.pos + 1);
  41797. if (code2 === 124 && next === 125) {
  41798. this.finishOp(9, 2);
  41799. return;
  41800. }
  41801. super.readToken_pipe_amp(code2);
  41802. }
  41803. parseTopLevel(file, program) {
  41804. const fileNode = super.parseTopLevel(file, program);
  41805. if (this.state.hasFlowComment) {
  41806. this.raise(FlowErrors.UnterminatedFlowComment, {
  41807. at: this.state.curPosition()
  41808. });
  41809. }
  41810. return fileNode;
  41811. }
  41812. skipBlockComment() {
  41813. if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
  41814. if (this.state.hasFlowComment) {
  41815. throw this.raise(FlowErrors.NestedFlowComment, {
  41816. at: this.state.startLoc
  41817. });
  41818. }
  41819. this.hasFlowCommentCompletion();
  41820. const commentSkip = this.skipFlowComment();
  41821. if (commentSkip) {
  41822. this.state.pos += commentSkip;
  41823. this.state.hasFlowComment = true;
  41824. }
  41825. return;
  41826. }
  41827. return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/");
  41828. }
  41829. skipFlowComment() {
  41830. const {
  41831. pos: pos2
  41832. } = this.state;
  41833. let shiftToFirstNonWhiteSpace = 2;
  41834. while ([32, 9].includes(this.input.charCodeAt(pos2 + shiftToFirstNonWhiteSpace))) {
  41835. shiftToFirstNonWhiteSpace++;
  41836. }
  41837. const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos2);
  41838. const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos2 + 1);
  41839. if (ch2 === 58 && ch3 === 58) {
  41840. return shiftToFirstNonWhiteSpace + 2;
  41841. }
  41842. if (this.input.slice(shiftToFirstNonWhiteSpace + pos2, shiftToFirstNonWhiteSpace + pos2 + 12) === "flow-include") {
  41843. return shiftToFirstNonWhiteSpace + 12;
  41844. }
  41845. if (ch2 === 58 && ch3 !== 58) {
  41846. return shiftToFirstNonWhiteSpace;
  41847. }
  41848. return false;
  41849. }
  41850. hasFlowCommentCompletion() {
  41851. const end = this.input.indexOf("*/", this.state.pos);
  41852. if (end === -1) {
  41853. throw this.raise(Errors.UnterminatedComment, {
  41854. at: this.state.curPosition()
  41855. });
  41856. }
  41857. }
  41858. flowEnumErrorBooleanMemberNotInitialized(loc, {
  41859. enumName,
  41860. memberName
  41861. }) {
  41862. this.raise(FlowErrors.EnumBooleanMemberNotInitialized, {
  41863. at: loc,
  41864. memberName,
  41865. enumName
  41866. });
  41867. }
  41868. flowEnumErrorInvalidMemberInitializer(loc, enumContext) {
  41869. return this.raise(!enumContext.explicitType ? FlowErrors.EnumInvalidMemberInitializerUnknownType : enumContext.explicitType === "symbol" ? FlowErrors.EnumInvalidMemberInitializerSymbolType : FlowErrors.EnumInvalidMemberInitializerPrimaryType, Object.assign({
  41870. at: loc
  41871. }, enumContext));
  41872. }
  41873. flowEnumErrorNumberMemberNotInitialized(loc, {
  41874. enumName,
  41875. memberName
  41876. }) {
  41877. this.raise(FlowErrors.EnumNumberMemberNotInitialized, {
  41878. at: loc,
  41879. enumName,
  41880. memberName
  41881. });
  41882. }
  41883. flowEnumErrorStringMemberInconsistentlyInitailized(node2, {
  41884. enumName
  41885. }) {
  41886. this.raise(FlowErrors.EnumStringMemberInconsistentlyInitailized, {
  41887. at: node2,
  41888. enumName
  41889. });
  41890. }
  41891. flowEnumMemberInit() {
  41892. const startLoc = this.state.startLoc;
  41893. const endOfInit = () => this.match(12) || this.match(8);
  41894. switch (this.state.type) {
  41895. case 132: {
  41896. const literal4 = this.parseNumericLiteral(this.state.value);
  41897. if (endOfInit()) {
  41898. return {
  41899. type: "number",
  41900. loc: literal4.loc.start,
  41901. value: literal4
  41902. };
  41903. }
  41904. return {
  41905. type: "invalid",
  41906. loc: startLoc
  41907. };
  41908. }
  41909. case 131: {
  41910. const literal4 = this.parseStringLiteral(this.state.value);
  41911. if (endOfInit()) {
  41912. return {
  41913. type: "string",
  41914. loc: literal4.loc.start,
  41915. value: literal4
  41916. };
  41917. }
  41918. return {
  41919. type: "invalid",
  41920. loc: startLoc
  41921. };
  41922. }
  41923. case 85:
  41924. case 86: {
  41925. const literal4 = this.parseBooleanLiteral(this.match(85));
  41926. if (endOfInit()) {
  41927. return {
  41928. type: "boolean",
  41929. loc: literal4.loc.start,
  41930. value: literal4
  41931. };
  41932. }
  41933. return {
  41934. type: "invalid",
  41935. loc: startLoc
  41936. };
  41937. }
  41938. default:
  41939. return {
  41940. type: "invalid",
  41941. loc: startLoc
  41942. };
  41943. }
  41944. }
  41945. flowEnumMemberRaw() {
  41946. const loc = this.state.startLoc;
  41947. const id = this.parseIdentifier(true);
  41948. const init = this.eat(29) ? this.flowEnumMemberInit() : {
  41949. type: "none",
  41950. loc
  41951. };
  41952. return {
  41953. id,
  41954. init
  41955. };
  41956. }
  41957. flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) {
  41958. const {
  41959. explicitType
  41960. } = context;
  41961. if (explicitType === null) {
  41962. return;
  41963. }
  41964. if (explicitType !== expectedType) {
  41965. this.flowEnumErrorInvalidMemberInitializer(loc, context);
  41966. }
  41967. }
  41968. flowEnumMembers({
  41969. enumName,
  41970. explicitType
  41971. }) {
  41972. const seenNames = /* @__PURE__ */ new Set();
  41973. const members = {
  41974. booleanMembers: [],
  41975. numberMembers: [],
  41976. stringMembers: [],
  41977. defaultedMembers: []
  41978. };
  41979. let hasUnknownMembers = false;
  41980. while (!this.match(8)) {
  41981. if (this.eat(21)) {
  41982. hasUnknownMembers = true;
  41983. break;
  41984. }
  41985. const memberNode = this.startNode();
  41986. const {
  41987. id,
  41988. init
  41989. } = this.flowEnumMemberRaw();
  41990. const memberName = id.name;
  41991. if (memberName === "") {
  41992. continue;
  41993. }
  41994. if (/^[a-z]/.test(memberName)) {
  41995. this.raise(FlowErrors.EnumInvalidMemberName, {
  41996. at: id,
  41997. memberName,
  41998. suggestion: memberName[0].toUpperCase() + memberName.slice(1),
  41999. enumName
  42000. });
  42001. }
  42002. if (seenNames.has(memberName)) {
  42003. this.raise(FlowErrors.EnumDuplicateMemberName, {
  42004. at: id,
  42005. memberName,
  42006. enumName
  42007. });
  42008. }
  42009. seenNames.add(memberName);
  42010. const context = {
  42011. enumName,
  42012. explicitType,
  42013. memberName
  42014. };
  42015. memberNode.id = id;
  42016. switch (init.type) {
  42017. case "boolean": {
  42018. this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean");
  42019. memberNode.init = init.value;
  42020. members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
  42021. break;
  42022. }
  42023. case "number": {
  42024. this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number");
  42025. memberNode.init = init.value;
  42026. members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
  42027. break;
  42028. }
  42029. case "string": {
  42030. this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string");
  42031. memberNode.init = init.value;
  42032. members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
  42033. break;
  42034. }
  42035. case "invalid": {
  42036. throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context);
  42037. }
  42038. case "none": {
  42039. switch (explicitType) {
  42040. case "boolean":
  42041. this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context);
  42042. break;
  42043. case "number":
  42044. this.flowEnumErrorNumberMemberNotInitialized(init.loc, context);
  42045. break;
  42046. default:
  42047. members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
  42048. }
  42049. }
  42050. }
  42051. if (!this.match(8)) {
  42052. this.expect(12);
  42053. }
  42054. }
  42055. return {
  42056. members,
  42057. hasUnknownMembers
  42058. };
  42059. }
  42060. flowEnumStringMembers(initializedMembers, defaultedMembers, {
  42061. enumName
  42062. }) {
  42063. if (initializedMembers.length === 0) {
  42064. return defaultedMembers;
  42065. } else if (defaultedMembers.length === 0) {
  42066. return initializedMembers;
  42067. } else if (defaultedMembers.length > initializedMembers.length) {
  42068. for (const member of initializedMembers) {
  42069. this.flowEnumErrorStringMemberInconsistentlyInitailized(member, {
  42070. enumName
  42071. });
  42072. }
  42073. return defaultedMembers;
  42074. } else {
  42075. for (const member of defaultedMembers) {
  42076. this.flowEnumErrorStringMemberInconsistentlyInitailized(member, {
  42077. enumName
  42078. });
  42079. }
  42080. return initializedMembers;
  42081. }
  42082. }
  42083. flowEnumParseExplicitType({
  42084. enumName
  42085. }) {
  42086. if (!this.eatContextual(101))
  42087. return null;
  42088. if (!tokenIsIdentifier(this.state.type)) {
  42089. throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied, {
  42090. at: this.state.startLoc,
  42091. enumName
  42092. });
  42093. }
  42094. const {
  42095. value: value2
  42096. } = this.state;
  42097. this.next();
  42098. if (value2 !== "boolean" && value2 !== "number" && value2 !== "string" && value2 !== "symbol") {
  42099. this.raise(FlowErrors.EnumInvalidExplicitType, {
  42100. at: this.state.startLoc,
  42101. enumName,
  42102. invalidEnumType: value2
  42103. });
  42104. }
  42105. return value2;
  42106. }
  42107. flowEnumBody(node2, id) {
  42108. const enumName = id.name;
  42109. const nameLoc = id.loc.start;
  42110. const explicitType = this.flowEnumParseExplicitType({
  42111. enumName
  42112. });
  42113. this.expect(5);
  42114. const {
  42115. members,
  42116. hasUnknownMembers
  42117. } = this.flowEnumMembers({
  42118. enumName,
  42119. explicitType
  42120. });
  42121. node2.hasUnknownMembers = hasUnknownMembers;
  42122. switch (explicitType) {
  42123. case "boolean":
  42124. node2.explicitType = true;
  42125. node2.members = members.booleanMembers;
  42126. this.expect(8);
  42127. return this.finishNode(node2, "EnumBooleanBody");
  42128. case "number":
  42129. node2.explicitType = true;
  42130. node2.members = members.numberMembers;
  42131. this.expect(8);
  42132. return this.finishNode(node2, "EnumNumberBody");
  42133. case "string":
  42134. node2.explicitType = true;
  42135. node2.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  42136. enumName
  42137. });
  42138. this.expect(8);
  42139. return this.finishNode(node2, "EnumStringBody");
  42140. case "symbol":
  42141. node2.members = members.defaultedMembers;
  42142. this.expect(8);
  42143. return this.finishNode(node2, "EnumSymbolBody");
  42144. default: {
  42145. const empty4 = () => {
  42146. node2.members = [];
  42147. this.expect(8);
  42148. return this.finishNode(node2, "EnumStringBody");
  42149. };
  42150. node2.explicitType = false;
  42151. const boolsLen = members.booleanMembers.length;
  42152. const numsLen = members.numberMembers.length;
  42153. const strsLen = members.stringMembers.length;
  42154. const defaultedLen = members.defaultedMembers.length;
  42155. if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
  42156. return empty4();
  42157. } else if (!boolsLen && !numsLen) {
  42158. node2.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  42159. enumName
  42160. });
  42161. this.expect(8);
  42162. return this.finishNode(node2, "EnumStringBody");
  42163. } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
  42164. for (const member of members.defaultedMembers) {
  42165. this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, {
  42166. enumName,
  42167. memberName: member.id.name
  42168. });
  42169. }
  42170. node2.members = members.booleanMembers;
  42171. this.expect(8);
  42172. return this.finishNode(node2, "EnumBooleanBody");
  42173. } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
  42174. for (const member of members.defaultedMembers) {
  42175. this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, {
  42176. enumName,
  42177. memberName: member.id.name
  42178. });
  42179. }
  42180. node2.members = members.numberMembers;
  42181. this.expect(8);
  42182. return this.finishNode(node2, "EnumNumberBody");
  42183. } else {
  42184. this.raise(FlowErrors.EnumInconsistentMemberValues, {
  42185. at: nameLoc,
  42186. enumName
  42187. });
  42188. return empty4();
  42189. }
  42190. }
  42191. }
  42192. }
  42193. flowParseEnumDeclaration(node2) {
  42194. const id = this.parseIdentifier();
  42195. node2.id = id;
  42196. node2.body = this.flowEnumBody(this.startNode(), id);
  42197. return this.finishNode(node2, "EnumDeclaration");
  42198. }
  42199. isLookaheadToken_lt() {
  42200. const next = this.nextTokenStart();
  42201. if (this.input.charCodeAt(next) === 60) {
  42202. const afterNext = this.input.charCodeAt(next + 1);
  42203. return afterNext !== 60 && afterNext !== 61;
  42204. }
  42205. return false;
  42206. }
  42207. maybeUnwrapTypeCastExpression(node2) {
  42208. return node2.type === "TypeCastExpression" ? node2.expression : node2;
  42209. }
  42210. };
  42211. var entities = {
  42212. __proto__: null,
  42213. quot: '"',
  42214. amp: "&",
  42215. apos: "'",
  42216. lt: "<",
  42217. gt: ">",
  42218. nbsp: "\xA0",
  42219. iexcl: "\xA1",
  42220. cent: "\xA2",
  42221. pound: "\xA3",
  42222. curren: "\xA4",
  42223. yen: "\xA5",
  42224. brvbar: "\xA6",
  42225. sect: "\xA7",
  42226. uml: "\xA8",
  42227. copy: "\xA9",
  42228. ordf: "\xAA",
  42229. laquo: "\xAB",
  42230. not: "\xAC",
  42231. shy: "\xAD",
  42232. reg: "\xAE",
  42233. macr: "\xAF",
  42234. deg: "\xB0",
  42235. plusmn: "\xB1",
  42236. sup2: "\xB2",
  42237. sup3: "\xB3",
  42238. acute: "\xB4",
  42239. micro: "\xB5",
  42240. para: "\xB6",
  42241. middot: "\xB7",
  42242. cedil: "\xB8",
  42243. sup1: "\xB9",
  42244. ordm: "\xBA",
  42245. raquo: "\xBB",
  42246. frac14: "\xBC",
  42247. frac12: "\xBD",
  42248. frac34: "\xBE",
  42249. iquest: "\xBF",
  42250. Agrave: "\xC0",
  42251. Aacute: "\xC1",
  42252. Acirc: "\xC2",
  42253. Atilde: "\xC3",
  42254. Auml: "\xC4",
  42255. Aring: "\xC5",
  42256. AElig: "\xC6",
  42257. Ccedil: "\xC7",
  42258. Egrave: "\xC8",
  42259. Eacute: "\xC9",
  42260. Ecirc: "\xCA",
  42261. Euml: "\xCB",
  42262. Igrave: "\xCC",
  42263. Iacute: "\xCD",
  42264. Icirc: "\xCE",
  42265. Iuml: "\xCF",
  42266. ETH: "\xD0",
  42267. Ntilde: "\xD1",
  42268. Ograve: "\xD2",
  42269. Oacute: "\xD3",
  42270. Ocirc: "\xD4",
  42271. Otilde: "\xD5",
  42272. Ouml: "\xD6",
  42273. times: "\xD7",
  42274. Oslash: "\xD8",
  42275. Ugrave: "\xD9",
  42276. Uacute: "\xDA",
  42277. Ucirc: "\xDB",
  42278. Uuml: "\xDC",
  42279. Yacute: "\xDD",
  42280. THORN: "\xDE",
  42281. szlig: "\xDF",
  42282. agrave: "\xE0",
  42283. aacute: "\xE1",
  42284. acirc: "\xE2",
  42285. atilde: "\xE3",
  42286. auml: "\xE4",
  42287. aring: "\xE5",
  42288. aelig: "\xE6",
  42289. ccedil: "\xE7",
  42290. egrave: "\xE8",
  42291. eacute: "\xE9",
  42292. ecirc: "\xEA",
  42293. euml: "\xEB",
  42294. igrave: "\xEC",
  42295. iacute: "\xED",
  42296. icirc: "\xEE",
  42297. iuml: "\xEF",
  42298. eth: "\xF0",
  42299. ntilde: "\xF1",
  42300. ograve: "\xF2",
  42301. oacute: "\xF3",
  42302. ocirc: "\xF4",
  42303. otilde: "\xF5",
  42304. ouml: "\xF6",
  42305. divide: "\xF7",
  42306. oslash: "\xF8",
  42307. ugrave: "\xF9",
  42308. uacute: "\xFA",
  42309. ucirc: "\xFB",
  42310. uuml: "\xFC",
  42311. yacute: "\xFD",
  42312. thorn: "\xFE",
  42313. yuml: "\xFF",
  42314. OElig: "\u0152",
  42315. oelig: "\u0153",
  42316. Scaron: "\u0160",
  42317. scaron: "\u0161",
  42318. Yuml: "\u0178",
  42319. fnof: "\u0192",
  42320. circ: "\u02C6",
  42321. tilde: "\u02DC",
  42322. Alpha: "\u0391",
  42323. Beta: "\u0392",
  42324. Gamma: "\u0393",
  42325. Delta: "\u0394",
  42326. Epsilon: "\u0395",
  42327. Zeta: "\u0396",
  42328. Eta: "\u0397",
  42329. Theta: "\u0398",
  42330. Iota: "\u0399",
  42331. Kappa: "\u039A",
  42332. Lambda: "\u039B",
  42333. Mu: "\u039C",
  42334. Nu: "\u039D",
  42335. Xi: "\u039E",
  42336. Omicron: "\u039F",
  42337. Pi: "\u03A0",
  42338. Rho: "\u03A1",
  42339. Sigma: "\u03A3",
  42340. Tau: "\u03A4",
  42341. Upsilon: "\u03A5",
  42342. Phi: "\u03A6",
  42343. Chi: "\u03A7",
  42344. Psi: "\u03A8",
  42345. Omega: "\u03A9",
  42346. alpha: "\u03B1",
  42347. beta: "\u03B2",
  42348. gamma: "\u03B3",
  42349. delta: "\u03B4",
  42350. epsilon: "\u03B5",
  42351. zeta: "\u03B6",
  42352. eta: "\u03B7",
  42353. theta: "\u03B8",
  42354. iota: "\u03B9",
  42355. kappa: "\u03BA",
  42356. lambda: "\u03BB",
  42357. mu: "\u03BC",
  42358. nu: "\u03BD",
  42359. xi: "\u03BE",
  42360. omicron: "\u03BF",
  42361. pi: "\u03C0",
  42362. rho: "\u03C1",
  42363. sigmaf: "\u03C2",
  42364. sigma: "\u03C3",
  42365. tau: "\u03C4",
  42366. upsilon: "\u03C5",
  42367. phi: "\u03C6",
  42368. chi: "\u03C7",
  42369. psi: "\u03C8",
  42370. omega: "\u03C9",
  42371. thetasym: "\u03D1",
  42372. upsih: "\u03D2",
  42373. piv: "\u03D6",
  42374. ensp: "\u2002",
  42375. emsp: "\u2003",
  42376. thinsp: "\u2009",
  42377. zwnj: "\u200C",
  42378. zwj: "\u200D",
  42379. lrm: "\u200E",
  42380. rlm: "\u200F",
  42381. ndash: "\u2013",
  42382. mdash: "\u2014",
  42383. lsquo: "\u2018",
  42384. rsquo: "\u2019",
  42385. sbquo: "\u201A",
  42386. ldquo: "\u201C",
  42387. rdquo: "\u201D",
  42388. bdquo: "\u201E",
  42389. dagger: "\u2020",
  42390. Dagger: "\u2021",
  42391. bull: "\u2022",
  42392. hellip: "\u2026",
  42393. permil: "\u2030",
  42394. prime: "\u2032",
  42395. Prime: "\u2033",
  42396. lsaquo: "\u2039",
  42397. rsaquo: "\u203A",
  42398. oline: "\u203E",
  42399. frasl: "\u2044",
  42400. euro: "\u20AC",
  42401. image: "\u2111",
  42402. weierp: "\u2118",
  42403. real: "\u211C",
  42404. trade: "\u2122",
  42405. alefsym: "\u2135",
  42406. larr: "\u2190",
  42407. uarr: "\u2191",
  42408. rarr: "\u2192",
  42409. darr: "\u2193",
  42410. harr: "\u2194",
  42411. crarr: "\u21B5",
  42412. lArr: "\u21D0",
  42413. uArr: "\u21D1",
  42414. rArr: "\u21D2",
  42415. dArr: "\u21D3",
  42416. hArr: "\u21D4",
  42417. forall: "\u2200",
  42418. part: "\u2202",
  42419. exist: "\u2203",
  42420. empty: "\u2205",
  42421. nabla: "\u2207",
  42422. isin: "\u2208",
  42423. notin: "\u2209",
  42424. ni: "\u220B",
  42425. prod: "\u220F",
  42426. sum: "\u2211",
  42427. minus: "\u2212",
  42428. lowast: "\u2217",
  42429. radic: "\u221A",
  42430. prop: "\u221D",
  42431. infin: "\u221E",
  42432. ang: "\u2220",
  42433. and: "\u2227",
  42434. or: "\u2228",
  42435. cap: "\u2229",
  42436. cup: "\u222A",
  42437. int: "\u222B",
  42438. there4: "\u2234",
  42439. sim: "\u223C",
  42440. cong: "\u2245",
  42441. asymp: "\u2248",
  42442. ne: "\u2260",
  42443. equiv: "\u2261",
  42444. le: "\u2264",
  42445. ge: "\u2265",
  42446. sub: "\u2282",
  42447. sup: "\u2283",
  42448. nsub: "\u2284",
  42449. sube: "\u2286",
  42450. supe: "\u2287",
  42451. oplus: "\u2295",
  42452. otimes: "\u2297",
  42453. perp: "\u22A5",
  42454. sdot: "\u22C5",
  42455. lceil: "\u2308",
  42456. rceil: "\u2309",
  42457. lfloor: "\u230A",
  42458. rfloor: "\u230B",
  42459. lang: "\u2329",
  42460. rang: "\u232A",
  42461. loz: "\u25CA",
  42462. spades: "\u2660",
  42463. clubs: "\u2663",
  42464. hearts: "\u2665",
  42465. diams: "\u2666"
  42466. };
  42467. var JsxErrors = ParseErrorEnum`jsx`({
  42468. AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
  42469. MissingClosingTagElement: ({
  42470. openingTagName
  42471. }) => `Expected corresponding JSX closing tag for <${openingTagName}>.`,
  42472. MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
  42473. UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
  42474. UnexpectedToken: ({
  42475. unexpected,
  42476. HTMLEntity
  42477. }) => `Unexpected token \`${unexpected}\`. Did you mean \`${HTMLEntity}\` or \`{'${unexpected}'}\`?`,
  42478. UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
  42479. UnterminatedJsxContent: "Unterminated JSX contents.",
  42480. UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
  42481. });
  42482. function isFragment(object) {
  42483. return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
  42484. }
  42485. function getQualifiedJSXName(object) {
  42486. if (object.type === "JSXIdentifier") {
  42487. return object.name;
  42488. }
  42489. if (object.type === "JSXNamespacedName") {
  42490. return object.namespace.name + ":" + object.name.name;
  42491. }
  42492. if (object.type === "JSXMemberExpression") {
  42493. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  42494. }
  42495. throw new Error("Node had unexpected type: " + object.type);
  42496. }
  42497. var jsx2 = (superClass) => class JSXParserMixin extends superClass {
  42498. jsxReadToken() {
  42499. let out = "";
  42500. let chunkStart = this.state.pos;
  42501. for (; ; ) {
  42502. if (this.state.pos >= this.length) {
  42503. throw this.raise(JsxErrors.UnterminatedJsxContent, {
  42504. at: this.state.startLoc
  42505. });
  42506. }
  42507. const ch = this.input.charCodeAt(this.state.pos);
  42508. switch (ch) {
  42509. case 60:
  42510. case 123:
  42511. if (this.state.pos === this.state.start) {
  42512. if (ch === 60 && this.state.canStartJSXElement) {
  42513. ++this.state.pos;
  42514. this.finishToken(140);
  42515. } else {
  42516. super.getTokenFromCode(ch);
  42517. }
  42518. return;
  42519. }
  42520. out += this.input.slice(chunkStart, this.state.pos);
  42521. this.finishToken(139, out);
  42522. return;
  42523. case 38:
  42524. out += this.input.slice(chunkStart, this.state.pos);
  42525. out += this.jsxReadEntity();
  42526. chunkStart = this.state.pos;
  42527. break;
  42528. case 62:
  42529. case 125:
  42530. default:
  42531. if (isNewLine3(ch)) {
  42532. out += this.input.slice(chunkStart, this.state.pos);
  42533. out += this.jsxReadNewLine(true);
  42534. chunkStart = this.state.pos;
  42535. } else {
  42536. ++this.state.pos;
  42537. }
  42538. }
  42539. }
  42540. }
  42541. jsxReadNewLine(normalizeCRLF) {
  42542. const ch = this.input.charCodeAt(this.state.pos);
  42543. let out;
  42544. ++this.state.pos;
  42545. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  42546. ++this.state.pos;
  42547. out = normalizeCRLF ? "\n" : "\r\n";
  42548. } else {
  42549. out = String.fromCharCode(ch);
  42550. }
  42551. ++this.state.curLine;
  42552. this.state.lineStart = this.state.pos;
  42553. return out;
  42554. }
  42555. jsxReadString(quote) {
  42556. let out = "";
  42557. let chunkStart = ++this.state.pos;
  42558. for (; ; ) {
  42559. if (this.state.pos >= this.length) {
  42560. throw this.raise(Errors.UnterminatedString, {
  42561. at: this.state.startLoc
  42562. });
  42563. }
  42564. const ch = this.input.charCodeAt(this.state.pos);
  42565. if (ch === quote)
  42566. break;
  42567. if (ch === 38) {
  42568. out += this.input.slice(chunkStart, this.state.pos);
  42569. out += this.jsxReadEntity();
  42570. chunkStart = this.state.pos;
  42571. } else if (isNewLine3(ch)) {
  42572. out += this.input.slice(chunkStart, this.state.pos);
  42573. out += this.jsxReadNewLine(false);
  42574. chunkStart = this.state.pos;
  42575. } else {
  42576. ++this.state.pos;
  42577. }
  42578. }
  42579. out += this.input.slice(chunkStart, this.state.pos++);
  42580. this.finishToken(131, out);
  42581. }
  42582. jsxReadEntity() {
  42583. const startPos = ++this.state.pos;
  42584. if (this.codePointAtPos(this.state.pos) === 35) {
  42585. ++this.state.pos;
  42586. let radix = 10;
  42587. if (this.codePointAtPos(this.state.pos) === 120) {
  42588. radix = 16;
  42589. ++this.state.pos;
  42590. }
  42591. const codePoint = this.readInt(radix, void 0, false, "bail");
  42592. if (codePoint !== null && this.codePointAtPos(this.state.pos) === 59) {
  42593. ++this.state.pos;
  42594. return String.fromCodePoint(codePoint);
  42595. }
  42596. } else {
  42597. let count = 0;
  42598. let semi = false;
  42599. while (count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) == 59)) {
  42600. ++this.state.pos;
  42601. }
  42602. if (semi) {
  42603. const desc = this.input.slice(startPos, this.state.pos);
  42604. const entity = entities[desc];
  42605. ++this.state.pos;
  42606. if (entity) {
  42607. return entity;
  42608. }
  42609. }
  42610. }
  42611. this.state.pos = startPos;
  42612. return "&";
  42613. }
  42614. jsxReadWord() {
  42615. let ch;
  42616. const start3 = this.state.pos;
  42617. do {
  42618. ch = this.input.charCodeAt(++this.state.pos);
  42619. } while (isIdentifierChar3(ch) || ch === 45);
  42620. this.finishToken(138, this.input.slice(start3, this.state.pos));
  42621. }
  42622. jsxParseIdentifier() {
  42623. const node2 = this.startNode();
  42624. if (this.match(138)) {
  42625. node2.name = this.state.value;
  42626. } else if (tokenIsKeyword(this.state.type)) {
  42627. node2.name = tokenLabelName(this.state.type);
  42628. } else {
  42629. this.unexpected();
  42630. }
  42631. this.next();
  42632. return this.finishNode(node2, "JSXIdentifier");
  42633. }
  42634. jsxParseNamespacedName() {
  42635. const startLoc = this.state.startLoc;
  42636. const name2 = this.jsxParseIdentifier();
  42637. if (!this.eat(14))
  42638. return name2;
  42639. const node2 = this.startNodeAt(startLoc);
  42640. node2.namespace = name2;
  42641. node2.name = this.jsxParseIdentifier();
  42642. return this.finishNode(node2, "JSXNamespacedName");
  42643. }
  42644. jsxParseElementName() {
  42645. const startLoc = this.state.startLoc;
  42646. let node2 = this.jsxParseNamespacedName();
  42647. if (node2.type === "JSXNamespacedName") {
  42648. return node2;
  42649. }
  42650. while (this.eat(16)) {
  42651. const newNode = this.startNodeAt(startLoc);
  42652. newNode.object = node2;
  42653. newNode.property = this.jsxParseIdentifier();
  42654. node2 = this.finishNode(newNode, "JSXMemberExpression");
  42655. }
  42656. return node2;
  42657. }
  42658. jsxParseAttributeValue() {
  42659. let node2;
  42660. switch (this.state.type) {
  42661. case 5:
  42662. node2 = this.startNode();
  42663. this.setContext(types3.brace);
  42664. this.next();
  42665. node2 = this.jsxParseExpressionContainer(node2, types3.j_oTag);
  42666. if (node2.expression.type === "JSXEmptyExpression") {
  42667. this.raise(JsxErrors.AttributeIsEmpty, {
  42668. at: node2
  42669. });
  42670. }
  42671. return node2;
  42672. case 140:
  42673. case 131:
  42674. return this.parseExprAtom();
  42675. default:
  42676. throw this.raise(JsxErrors.UnsupportedJsxValue, {
  42677. at: this.state.startLoc
  42678. });
  42679. }
  42680. }
  42681. jsxParseEmptyExpression() {
  42682. const node2 = this.startNodeAt(this.state.lastTokEndLoc);
  42683. return this.finishNodeAt(node2, "JSXEmptyExpression", this.state.startLoc);
  42684. }
  42685. jsxParseSpreadChild(node2) {
  42686. this.next();
  42687. node2.expression = this.parseExpression();
  42688. this.setContext(types3.j_expr);
  42689. this.state.canStartJSXElement = true;
  42690. this.expect(8);
  42691. return this.finishNode(node2, "JSXSpreadChild");
  42692. }
  42693. jsxParseExpressionContainer(node2, previousContext) {
  42694. if (this.match(8)) {
  42695. node2.expression = this.jsxParseEmptyExpression();
  42696. } else {
  42697. const expression = this.parseExpression();
  42698. node2.expression = expression;
  42699. }
  42700. this.setContext(previousContext);
  42701. this.state.canStartJSXElement = true;
  42702. this.expect(8);
  42703. return this.finishNode(node2, "JSXExpressionContainer");
  42704. }
  42705. jsxParseAttribute() {
  42706. const node2 = this.startNode();
  42707. if (this.match(5)) {
  42708. this.setContext(types3.brace);
  42709. this.next();
  42710. this.expect(21);
  42711. node2.argument = this.parseMaybeAssignAllowIn();
  42712. this.setContext(types3.j_oTag);
  42713. this.state.canStartJSXElement = true;
  42714. this.expect(8);
  42715. return this.finishNode(node2, "JSXSpreadAttribute");
  42716. }
  42717. node2.name = this.jsxParseNamespacedName();
  42718. node2.value = this.eat(29) ? this.jsxParseAttributeValue() : null;
  42719. return this.finishNode(node2, "JSXAttribute");
  42720. }
  42721. jsxParseOpeningElementAt(startLoc) {
  42722. const node2 = this.startNodeAt(startLoc);
  42723. if (this.eat(141)) {
  42724. return this.finishNode(node2, "JSXOpeningFragment");
  42725. }
  42726. node2.name = this.jsxParseElementName();
  42727. return this.jsxParseOpeningElementAfterName(node2);
  42728. }
  42729. jsxParseOpeningElementAfterName(node2) {
  42730. const attributes = [];
  42731. while (!this.match(56) && !this.match(141)) {
  42732. attributes.push(this.jsxParseAttribute());
  42733. }
  42734. node2.attributes = attributes;
  42735. node2.selfClosing = this.eat(56);
  42736. this.expect(141);
  42737. return this.finishNode(node2, "JSXOpeningElement");
  42738. }
  42739. jsxParseClosingElementAt(startLoc) {
  42740. const node2 = this.startNodeAt(startLoc);
  42741. if (this.eat(141)) {
  42742. return this.finishNode(node2, "JSXClosingFragment");
  42743. }
  42744. node2.name = this.jsxParseElementName();
  42745. this.expect(141);
  42746. return this.finishNode(node2, "JSXClosingElement");
  42747. }
  42748. jsxParseElementAt(startLoc) {
  42749. const node2 = this.startNodeAt(startLoc);
  42750. const children = [];
  42751. const openingElement = this.jsxParseOpeningElementAt(startLoc);
  42752. let closingElement = null;
  42753. if (!openingElement.selfClosing) {
  42754. contents:
  42755. for (; ; ) {
  42756. switch (this.state.type) {
  42757. case 140:
  42758. startLoc = this.state.startLoc;
  42759. this.next();
  42760. if (this.eat(56)) {
  42761. closingElement = this.jsxParseClosingElementAt(startLoc);
  42762. break contents;
  42763. }
  42764. children.push(this.jsxParseElementAt(startLoc));
  42765. break;
  42766. case 139:
  42767. children.push(this.parseExprAtom());
  42768. break;
  42769. case 5: {
  42770. const node3 = this.startNode();
  42771. this.setContext(types3.brace);
  42772. this.next();
  42773. if (this.match(21)) {
  42774. children.push(this.jsxParseSpreadChild(node3));
  42775. } else {
  42776. children.push(this.jsxParseExpressionContainer(node3, types3.j_expr));
  42777. }
  42778. break;
  42779. }
  42780. default:
  42781. this.unexpected();
  42782. }
  42783. }
  42784. if (isFragment(openingElement) && !isFragment(closingElement) && closingElement !== null) {
  42785. this.raise(JsxErrors.MissingClosingTagFragment, {
  42786. at: closingElement
  42787. });
  42788. } else if (!isFragment(openingElement) && isFragment(closingElement)) {
  42789. this.raise(JsxErrors.MissingClosingTagElement, {
  42790. at: closingElement,
  42791. openingTagName: getQualifiedJSXName(openingElement.name)
  42792. });
  42793. } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
  42794. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  42795. this.raise(JsxErrors.MissingClosingTagElement, {
  42796. at: closingElement,
  42797. openingTagName: getQualifiedJSXName(openingElement.name)
  42798. });
  42799. }
  42800. }
  42801. }
  42802. if (isFragment(openingElement)) {
  42803. node2.openingFragment = openingElement;
  42804. node2.closingFragment = closingElement;
  42805. } else {
  42806. node2.openingElement = openingElement;
  42807. node2.closingElement = closingElement;
  42808. }
  42809. node2.children = children;
  42810. if (this.match(47)) {
  42811. throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, {
  42812. at: this.state.startLoc
  42813. });
  42814. }
  42815. return isFragment(openingElement) ? this.finishNode(node2, "JSXFragment") : this.finishNode(node2, "JSXElement");
  42816. }
  42817. jsxParseElement() {
  42818. const startLoc = this.state.startLoc;
  42819. this.next();
  42820. return this.jsxParseElementAt(startLoc);
  42821. }
  42822. setContext(newContext) {
  42823. const {
  42824. context
  42825. } = this.state;
  42826. context[context.length - 1] = newContext;
  42827. }
  42828. parseExprAtom(refExpressionErrors) {
  42829. if (this.match(139)) {
  42830. return this.parseLiteral(this.state.value, "JSXText");
  42831. } else if (this.match(140)) {
  42832. return this.jsxParseElement();
  42833. } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) {
  42834. this.replaceToken(140);
  42835. return this.jsxParseElement();
  42836. } else {
  42837. return super.parseExprAtom(refExpressionErrors);
  42838. }
  42839. }
  42840. skipSpace() {
  42841. const curContext = this.curContext();
  42842. if (!curContext.preserveSpace)
  42843. super.skipSpace();
  42844. }
  42845. getTokenFromCode(code2) {
  42846. const context = this.curContext();
  42847. if (context === types3.j_expr) {
  42848. this.jsxReadToken();
  42849. return;
  42850. }
  42851. if (context === types3.j_oTag || context === types3.j_cTag) {
  42852. if (isIdentifierStart3(code2)) {
  42853. this.jsxReadWord();
  42854. return;
  42855. }
  42856. if (code2 === 62) {
  42857. ++this.state.pos;
  42858. this.finishToken(141);
  42859. return;
  42860. }
  42861. if ((code2 === 34 || code2 === 39) && context === types3.j_oTag) {
  42862. this.jsxReadString(code2);
  42863. return;
  42864. }
  42865. }
  42866. if (code2 === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) {
  42867. ++this.state.pos;
  42868. this.finishToken(140);
  42869. return;
  42870. }
  42871. super.getTokenFromCode(code2);
  42872. }
  42873. updateContext(prevType) {
  42874. const {
  42875. context,
  42876. type
  42877. } = this.state;
  42878. if (type === 56 && prevType === 140) {
  42879. context.splice(-2, 2, types3.j_cTag);
  42880. this.state.canStartJSXElement = false;
  42881. } else if (type === 140) {
  42882. context.push(types3.j_oTag);
  42883. } else if (type === 141) {
  42884. const out = context[context.length - 1];
  42885. if (out === types3.j_oTag && prevType === 56 || out === types3.j_cTag) {
  42886. context.pop();
  42887. this.state.canStartJSXElement = context[context.length - 1] === types3.j_expr;
  42888. } else {
  42889. this.setContext(types3.j_expr);
  42890. this.state.canStartJSXElement = true;
  42891. }
  42892. } else {
  42893. this.state.canStartJSXElement = tokenComesBeforeExpression(type);
  42894. }
  42895. }
  42896. };
  42897. var TypeScriptScope = class extends Scope6 {
  42898. constructor(...args) {
  42899. super(...args);
  42900. this.types = /* @__PURE__ */ new Set();
  42901. this.enums = /* @__PURE__ */ new Set();
  42902. this.constEnums = /* @__PURE__ */ new Set();
  42903. this.classes = /* @__PURE__ */ new Set();
  42904. this.exportOnlyBindings = /* @__PURE__ */ new Set();
  42905. }
  42906. };
  42907. var TypeScriptScopeHandler = class extends ScopeHandler {
  42908. constructor(...args) {
  42909. super(...args);
  42910. this.importsStack = [];
  42911. }
  42912. createScope(flags) {
  42913. this.importsStack.push(/* @__PURE__ */ new Set());
  42914. return new TypeScriptScope(flags);
  42915. }
  42916. enter(flags) {
  42917. if (flags == SCOPE_TS_MODULE) {
  42918. this.importsStack.push(/* @__PURE__ */ new Set());
  42919. }
  42920. super.enter(flags);
  42921. }
  42922. exit() {
  42923. const flags = super.exit();
  42924. if (flags == SCOPE_TS_MODULE) {
  42925. this.importsStack.pop();
  42926. }
  42927. return flags;
  42928. }
  42929. hasImport(name2, allowShadow) {
  42930. const len = this.importsStack.length;
  42931. if (this.importsStack[len - 1].has(name2)) {
  42932. return true;
  42933. }
  42934. if (!allowShadow && len > 1) {
  42935. for (let i = 0; i < len - 1; i++) {
  42936. if (this.importsStack[i].has(name2))
  42937. return true;
  42938. }
  42939. }
  42940. return false;
  42941. }
  42942. declareName(name2, bindingType, loc) {
  42943. if (bindingType & BIND_FLAGS_TS_IMPORT) {
  42944. if (this.hasImport(name2, true)) {
  42945. this.parser.raise(Errors.VarRedeclaration, {
  42946. at: loc,
  42947. identifierName: name2
  42948. });
  42949. }
  42950. this.importsStack[this.importsStack.length - 1].add(name2);
  42951. return;
  42952. }
  42953. const scope = this.currentScope();
  42954. if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
  42955. this.maybeExportDefined(scope, name2);
  42956. scope.exportOnlyBindings.add(name2);
  42957. return;
  42958. }
  42959. super.declareName(name2, bindingType, loc);
  42960. if (bindingType & BIND_KIND_TYPE) {
  42961. if (!(bindingType & BIND_KIND_VALUE)) {
  42962. this.checkRedeclarationInScope(scope, name2, bindingType, loc);
  42963. this.maybeExportDefined(scope, name2);
  42964. }
  42965. scope.types.add(name2);
  42966. }
  42967. if (bindingType & BIND_FLAGS_TS_ENUM)
  42968. scope.enums.add(name2);
  42969. if (bindingType & BIND_FLAGS_TS_CONST_ENUM)
  42970. scope.constEnums.add(name2);
  42971. if (bindingType & BIND_FLAGS_CLASS)
  42972. scope.classes.add(name2);
  42973. }
  42974. isRedeclaredInScope(scope, name2, bindingType) {
  42975. if (scope.enums.has(name2)) {
  42976. if (bindingType & BIND_FLAGS_TS_ENUM) {
  42977. const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
  42978. const wasConst = scope.constEnums.has(name2);
  42979. return isConst !== wasConst;
  42980. }
  42981. return true;
  42982. }
  42983. if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name2)) {
  42984. if (scope.lexical.has(name2)) {
  42985. return !!(bindingType & BIND_KIND_VALUE);
  42986. } else {
  42987. return false;
  42988. }
  42989. }
  42990. if (bindingType & BIND_KIND_TYPE && scope.types.has(name2)) {
  42991. return true;
  42992. }
  42993. return super.isRedeclaredInScope(scope, name2, bindingType);
  42994. }
  42995. checkLocalExport(id) {
  42996. const {
  42997. name: name2
  42998. } = id;
  42999. if (this.hasImport(name2))
  43000. return;
  43001. const len = this.scopeStack.length;
  43002. for (let i = len - 1; i >= 0; i--) {
  43003. const scope = this.scopeStack[i];
  43004. if (scope.types.has(name2) || scope.exportOnlyBindings.has(name2))
  43005. return;
  43006. }
  43007. super.checkLocalExport(id);
  43008. }
  43009. };
  43010. var getOwn$1 = (object, key2) => Object.hasOwnProperty.call(object, key2) && object[key2];
  43011. var unwrapParenthesizedExpression = (node2) => {
  43012. return node2.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node2.expression) : node2;
  43013. };
  43014. var LValParser = class extends NodeUtils {
  43015. toAssignable(node2, isLHS = false) {
  43016. var _node$extra, _node$extra3;
  43017. let parenthesized = void 0;
  43018. if (node2.type === "ParenthesizedExpression" || (_node$extra = node2.extra) != null && _node$extra.parenthesized) {
  43019. parenthesized = unwrapParenthesizedExpression(node2);
  43020. if (isLHS) {
  43021. if (parenthesized.type === "Identifier") {
  43022. this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, {
  43023. at: node2
  43024. });
  43025. } else if (parenthesized.type !== "MemberExpression") {
  43026. this.raise(Errors.InvalidParenthesizedAssignment, {
  43027. at: node2
  43028. });
  43029. }
  43030. } else {
  43031. this.raise(Errors.InvalidParenthesizedAssignment, {
  43032. at: node2
  43033. });
  43034. }
  43035. }
  43036. switch (node2.type) {
  43037. case "Identifier":
  43038. case "ObjectPattern":
  43039. case "ArrayPattern":
  43040. case "AssignmentPattern":
  43041. case "RestElement":
  43042. break;
  43043. case "ObjectExpression":
  43044. node2.type = "ObjectPattern";
  43045. for (let i = 0, length = node2.properties.length, last = length - 1; i < length; i++) {
  43046. var _node$extra2;
  43047. const prop = node2.properties[i];
  43048. const isLast = i === last;
  43049. this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
  43050. if (isLast && prop.type === "RestElement" && (_node$extra2 = node2.extra) != null && _node$extra2.trailingCommaLoc) {
  43051. this.raise(Errors.RestTrailingComma, {
  43052. at: node2.extra.trailingCommaLoc
  43053. });
  43054. }
  43055. }
  43056. break;
  43057. case "ObjectProperty": {
  43058. const {
  43059. key: key2,
  43060. value: value2
  43061. } = node2;
  43062. if (this.isPrivateName(key2)) {
  43063. this.classScope.usePrivateName(this.getPrivateNameSV(key2), key2.loc.start);
  43064. }
  43065. this.toAssignable(value2, isLHS);
  43066. break;
  43067. }
  43068. case "SpreadElement": {
  43069. throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");
  43070. }
  43071. case "ArrayExpression":
  43072. node2.type = "ArrayPattern";
  43073. this.toAssignableList(node2.elements, (_node$extra3 = node2.extra) == null ? void 0 : _node$extra3.trailingCommaLoc, isLHS);
  43074. break;
  43075. case "AssignmentExpression":
  43076. if (node2.operator !== "=") {
  43077. this.raise(Errors.MissingEqInAssignment, {
  43078. at: node2.left.loc.end
  43079. });
  43080. }
  43081. node2.type = "AssignmentPattern";
  43082. delete node2.operator;
  43083. this.toAssignable(node2.left, isLHS);
  43084. break;
  43085. case "ParenthesizedExpression":
  43086. this.toAssignable(parenthesized, isLHS);
  43087. break;
  43088. }
  43089. }
  43090. toAssignableObjectExpressionProp(prop, isLast, isLHS) {
  43091. if (prop.type === "ObjectMethod") {
  43092. this.raise(prop.kind === "get" || prop.kind === "set" ? Errors.PatternHasAccessor : Errors.PatternHasMethod, {
  43093. at: prop.key
  43094. });
  43095. } else if (prop.type === "SpreadElement") {
  43096. prop.type = "RestElement";
  43097. const arg = prop.argument;
  43098. this.checkToRestConversion(arg, false);
  43099. this.toAssignable(arg, isLHS);
  43100. if (!isLast) {
  43101. this.raise(Errors.RestTrailingComma, {
  43102. at: prop
  43103. });
  43104. }
  43105. } else {
  43106. this.toAssignable(prop, isLHS);
  43107. }
  43108. }
  43109. toAssignableList(exprList, trailingCommaLoc, isLHS) {
  43110. const end = exprList.length - 1;
  43111. for (let i = 0; i <= end; i++) {
  43112. const elt = exprList[i];
  43113. if (!elt)
  43114. continue;
  43115. if (elt.type === "SpreadElement") {
  43116. elt.type = "RestElement";
  43117. const arg = elt.argument;
  43118. this.checkToRestConversion(arg, true);
  43119. this.toAssignable(arg, isLHS);
  43120. } else {
  43121. this.toAssignable(elt, isLHS);
  43122. }
  43123. if (elt.type === "RestElement") {
  43124. if (i < end) {
  43125. this.raise(Errors.RestTrailingComma, {
  43126. at: elt
  43127. });
  43128. } else if (trailingCommaLoc) {
  43129. this.raise(Errors.RestTrailingComma, {
  43130. at: trailingCommaLoc
  43131. });
  43132. }
  43133. }
  43134. }
  43135. }
  43136. isAssignable(node2, isBinding) {
  43137. switch (node2.type) {
  43138. case "Identifier":
  43139. case "ObjectPattern":
  43140. case "ArrayPattern":
  43141. case "AssignmentPattern":
  43142. case "RestElement":
  43143. return true;
  43144. case "ObjectExpression": {
  43145. const last = node2.properties.length - 1;
  43146. return node2.properties.every((prop, i) => {
  43147. return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop);
  43148. });
  43149. }
  43150. case "ObjectProperty":
  43151. return this.isAssignable(node2.value);
  43152. case "SpreadElement":
  43153. return this.isAssignable(node2.argument);
  43154. case "ArrayExpression":
  43155. return node2.elements.every((element2) => element2 === null || this.isAssignable(element2));
  43156. case "AssignmentExpression":
  43157. return node2.operator === "=";
  43158. case "ParenthesizedExpression":
  43159. return this.isAssignable(node2.expression);
  43160. case "MemberExpression":
  43161. case "OptionalMemberExpression":
  43162. return !isBinding;
  43163. default:
  43164. return false;
  43165. }
  43166. }
  43167. toReferencedList(exprList, isParenthesizedExpr) {
  43168. return exprList;
  43169. }
  43170. toReferencedListDeep(exprList, isParenthesizedExpr) {
  43171. this.toReferencedList(exprList, isParenthesizedExpr);
  43172. for (const expr of exprList) {
  43173. if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
  43174. this.toReferencedListDeep(expr.elements);
  43175. }
  43176. }
  43177. }
  43178. parseSpread(refExpressionErrors) {
  43179. const node2 = this.startNode();
  43180. this.next();
  43181. node2.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, void 0);
  43182. return this.finishNode(node2, "SpreadElement");
  43183. }
  43184. parseRestBinding() {
  43185. const node2 = this.startNode();
  43186. this.next();
  43187. node2.argument = this.parseBindingAtom();
  43188. return this.finishNode(node2, "RestElement");
  43189. }
  43190. parseBindingAtom() {
  43191. switch (this.state.type) {
  43192. case 0: {
  43193. const node2 = this.startNode();
  43194. this.next();
  43195. node2.elements = this.parseBindingList(3, 93, 1);
  43196. return this.finishNode(node2, "ArrayPattern");
  43197. }
  43198. case 5:
  43199. return this.parseObjectLike(8, true);
  43200. }
  43201. return this.parseIdentifier();
  43202. }
  43203. parseBindingList(close, closeCharCode, flags) {
  43204. const allowEmpty = flags & 1;
  43205. const elts = [];
  43206. let first = true;
  43207. while (!this.eat(close)) {
  43208. if (first) {
  43209. first = false;
  43210. } else {
  43211. this.expect(12);
  43212. }
  43213. if (allowEmpty && this.match(12)) {
  43214. elts.push(null);
  43215. } else if (this.eat(close)) {
  43216. break;
  43217. } else if (this.match(21)) {
  43218. elts.push(this.parseAssignableListItemTypes(this.parseRestBinding(), flags));
  43219. if (!this.checkCommaAfterRest(closeCharCode)) {
  43220. this.expect(close);
  43221. break;
  43222. }
  43223. } else {
  43224. const decorators = [];
  43225. if (this.match(26) && this.hasPlugin("decorators")) {
  43226. this.raise(Errors.UnsupportedParameterDecorator, {
  43227. at: this.state.startLoc
  43228. });
  43229. }
  43230. while (this.match(26)) {
  43231. decorators.push(this.parseDecorator());
  43232. }
  43233. elts.push(this.parseAssignableListItem(flags, decorators));
  43234. }
  43235. }
  43236. return elts;
  43237. }
  43238. parseBindingRestProperty(prop) {
  43239. this.next();
  43240. prop.argument = this.parseIdentifier();
  43241. this.checkCommaAfterRest(125);
  43242. return this.finishNode(prop, "RestElement");
  43243. }
  43244. parseBindingProperty() {
  43245. const prop = this.startNode();
  43246. const {
  43247. type,
  43248. startLoc
  43249. } = this.state;
  43250. if (type === 21) {
  43251. return this.parseBindingRestProperty(prop);
  43252. } else if (type === 136) {
  43253. this.expectPlugin("destructuringPrivate", startLoc);
  43254. this.classScope.usePrivateName(this.state.value, startLoc);
  43255. prop.key = this.parsePrivateName();
  43256. } else {
  43257. this.parsePropertyName(prop);
  43258. }
  43259. prop.method = false;
  43260. return this.parseObjPropValue(prop, startLoc, false, false, true, false);
  43261. }
  43262. parseAssignableListItem(flags, decorators) {
  43263. const left = this.parseMaybeDefault();
  43264. this.parseAssignableListItemTypes(left, flags);
  43265. const elt = this.parseMaybeDefault(left.loc.start, left);
  43266. if (decorators.length) {
  43267. left.decorators = decorators;
  43268. }
  43269. return elt;
  43270. }
  43271. parseAssignableListItemTypes(param, flags) {
  43272. return param;
  43273. }
  43274. parseMaybeDefault(startLoc, left) {
  43275. var _startLoc, _left;
  43276. (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc;
  43277. left = (_left = left) != null ? _left : this.parseBindingAtom();
  43278. if (!this.eat(29))
  43279. return left;
  43280. const node2 = this.startNodeAt(startLoc);
  43281. node2.left = left;
  43282. node2.right = this.parseMaybeAssignAllowIn();
  43283. return this.finishNode(node2, "AssignmentPattern");
  43284. }
  43285. isValidLVal(type, isUnparenthesizedInAssign, binding) {
  43286. return getOwn$1({
  43287. AssignmentPattern: "left",
  43288. RestElement: "argument",
  43289. ObjectProperty: "value",
  43290. ParenthesizedExpression: "expression",
  43291. ArrayPattern: "elements",
  43292. ObjectPattern: "properties"
  43293. }, type);
  43294. }
  43295. checkLVal(expression, {
  43296. in: ancestor,
  43297. binding = BIND_NONE3,
  43298. checkClashes = false,
  43299. strictModeChanged = false,
  43300. hasParenthesizedAncestor = false
  43301. }) {
  43302. var _expression$extra;
  43303. const type = expression.type;
  43304. if (this.isObjectMethod(expression))
  43305. return;
  43306. if (type === "MemberExpression") {
  43307. if (binding !== BIND_NONE3) {
  43308. this.raise(Errors.InvalidPropertyBindingPattern, {
  43309. at: expression
  43310. });
  43311. }
  43312. return;
  43313. }
  43314. if (type === "Identifier") {
  43315. this.checkIdentifier(expression, binding, strictModeChanged);
  43316. const {
  43317. name: name2
  43318. } = expression;
  43319. if (checkClashes) {
  43320. if (checkClashes.has(name2)) {
  43321. this.raise(Errors.ParamDupe, {
  43322. at: expression
  43323. });
  43324. } else {
  43325. checkClashes.add(name2);
  43326. }
  43327. }
  43328. return;
  43329. }
  43330. const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding);
  43331. if (validity === true)
  43332. return;
  43333. if (validity === false) {
  43334. const ParseErrorClass = binding === BIND_NONE3 ? Errors.InvalidLhs : Errors.InvalidLhsBinding;
  43335. this.raise(ParseErrorClass, {
  43336. at: expression,
  43337. ancestor
  43338. });
  43339. return;
  43340. }
  43341. const [key2, isParenthesizedExpression] = Array.isArray(validity) ? validity : [validity, type === "ParenthesizedExpression"];
  43342. const nextAncestor = type === "ArrayPattern" || type === "ObjectPattern" || type === "ParenthesizedExpression" ? {
  43343. type
  43344. } : ancestor;
  43345. for (const child of [].concat(expression[key2])) {
  43346. if (child) {
  43347. this.checkLVal(child, {
  43348. in: nextAncestor,
  43349. binding,
  43350. checkClashes,
  43351. strictModeChanged,
  43352. hasParenthesizedAncestor: isParenthesizedExpression
  43353. });
  43354. }
  43355. }
  43356. }
  43357. checkIdentifier(at3, bindingType, strictModeChanged = false) {
  43358. if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at3.name, this.inModule) : isStrictBindOnlyReservedWord(at3.name))) {
  43359. if (bindingType === BIND_NONE3) {
  43360. this.raise(Errors.StrictEvalArguments, {
  43361. at: at3,
  43362. referenceName: at3.name
  43363. });
  43364. } else {
  43365. this.raise(Errors.StrictEvalArgumentsBinding, {
  43366. at: at3,
  43367. bindingName: at3.name
  43368. });
  43369. }
  43370. }
  43371. if (bindingType & BIND_FLAGS_NO_LET_IN_LEXICAL && at3.name === "let") {
  43372. this.raise(Errors.LetInLexicalBinding, {
  43373. at: at3
  43374. });
  43375. }
  43376. if (!(bindingType & BIND_NONE3)) {
  43377. this.declareNameFromIdentifier(at3, bindingType);
  43378. }
  43379. }
  43380. declareNameFromIdentifier(identifier, binding) {
  43381. this.scope.declareName(identifier.name, binding, identifier.loc.start);
  43382. }
  43383. checkToRestConversion(node2, allowPattern) {
  43384. switch (node2.type) {
  43385. case "ParenthesizedExpression":
  43386. this.checkToRestConversion(node2.expression, allowPattern);
  43387. break;
  43388. case "Identifier":
  43389. case "MemberExpression":
  43390. break;
  43391. case "ArrayExpression":
  43392. case "ObjectExpression":
  43393. if (allowPattern)
  43394. break;
  43395. default:
  43396. this.raise(Errors.InvalidRestAssignmentPattern, {
  43397. at: node2
  43398. });
  43399. }
  43400. }
  43401. checkCommaAfterRest(close) {
  43402. if (!this.match(12)) {
  43403. return false;
  43404. }
  43405. this.raise(this.lookaheadCharCode() === close ? Errors.RestTrailingComma : Errors.ElementAfterRest, {
  43406. at: this.state.startLoc
  43407. });
  43408. return true;
  43409. }
  43410. };
  43411. var getOwn = (object, key2) => Object.hasOwnProperty.call(object, key2) && object[key2];
  43412. function nonNull(x) {
  43413. if (x == null) {
  43414. throw new Error(`Unexpected ${x} value.`);
  43415. }
  43416. return x;
  43417. }
  43418. function assert(x) {
  43419. if (!x) {
  43420. throw new Error("Assert fail");
  43421. }
  43422. }
  43423. var TSErrors = ParseErrorEnum`typescript`({
  43424. AbstractMethodHasImplementation: ({
  43425. methodName
  43426. }) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`,
  43427. AbstractPropertyHasInitializer: ({
  43428. propertyName
  43429. }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`,
  43430. AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
  43431. AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
  43432. AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.",
  43433. ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
  43434. ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
  43435. ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",
  43436. ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
  43437. DeclareAccessor: ({
  43438. kind
  43439. }) => `'declare' is not allowed in ${kind}ters.`,
  43440. DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
  43441. DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
  43442. DuplicateAccessibilityModifier: ({
  43443. modifier
  43444. }) => `Accessibility modifier already seen.`,
  43445. DuplicateModifier: ({
  43446. modifier
  43447. }) => `Duplicate modifier: '${modifier}'.`,
  43448. EmptyHeritageClauseType: ({
  43449. token: token2
  43450. }) => `'${token2}' list cannot be empty.`,
  43451. EmptyTypeArguments: "Type argument list cannot be empty.",
  43452. EmptyTypeParameters: "Type parameter list cannot be empty.",
  43453. ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
  43454. ImportAliasHasImportType: "An import alias can not use 'import type'.",
  43455. ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier",
  43456. IncompatibleModifiers: ({
  43457. modifiers
  43458. }) => `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`,
  43459. IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
  43460. IndexSignatureHasAccessibility: ({
  43461. modifier
  43462. }) => `Index signatures cannot have an accessibility modifier ('${modifier}').`,
  43463. IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
  43464. IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
  43465. IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
  43466. InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.",
  43467. InvalidModifierOnTypeMember: ({
  43468. modifier
  43469. }) => `'${modifier}' modifier cannot appear on a type member.`,
  43470. InvalidModifierOnTypeParameter: ({
  43471. modifier
  43472. }) => `'${modifier}' modifier cannot appear on a type parameter.`,
  43473. InvalidModifierOnTypeParameterPositions: ({
  43474. modifier
  43475. }) => `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`,
  43476. InvalidModifiersOrder: ({
  43477. orderedModifiers
  43478. }) => `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`,
  43479. InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",
  43480. InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
  43481. MissingInterfaceName: "'interface' declarations must be followed by an identifier.",
  43482. MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
  43483. NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
  43484. NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
  43485. OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
  43486. OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
  43487. PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
  43488. PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
  43489. PrivateElementHasAccessibility: ({
  43490. modifier
  43491. }) => `Private elements cannot have an accessibility modifier ('${modifier}').`,
  43492. ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
  43493. ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",
  43494. ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",
  43495. SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
  43496. SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
  43497. SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
  43498. SingleTypeParameterWithoutTrailingComma: ({
  43499. typeParameterName
  43500. }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`,
  43501. StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
  43502. TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",
  43503. TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  43504. TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
  43505. TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",
  43506. TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",
  43507. UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
  43508. UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
  43509. UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
  43510. UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
  43511. UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.",
  43512. UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
  43513. UnsupportedSignatureParameterKind: ({
  43514. type
  43515. }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.`
  43516. });
  43517. function keywordTypeFromName(value2) {
  43518. switch (value2) {
  43519. case "any":
  43520. return "TSAnyKeyword";
  43521. case "boolean":
  43522. return "TSBooleanKeyword";
  43523. case "bigint":
  43524. return "TSBigIntKeyword";
  43525. case "never":
  43526. return "TSNeverKeyword";
  43527. case "number":
  43528. return "TSNumberKeyword";
  43529. case "object":
  43530. return "TSObjectKeyword";
  43531. case "string":
  43532. return "TSStringKeyword";
  43533. case "symbol":
  43534. return "TSSymbolKeyword";
  43535. case "undefined":
  43536. return "TSUndefinedKeyword";
  43537. case "unknown":
  43538. return "TSUnknownKeyword";
  43539. default:
  43540. return void 0;
  43541. }
  43542. }
  43543. function tsIsAccessModifier(modifier) {
  43544. return modifier === "private" || modifier === "public" || modifier === "protected";
  43545. }
  43546. function tsIsVarianceAnnotations(modifier) {
  43547. return modifier === "in" || modifier === "out";
  43548. }
  43549. var typescript = (superClass) => class TypeScriptParserMixin extends superClass {
  43550. constructor(...args) {
  43551. super(...args);
  43552. this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, {
  43553. allowedModifiers: ["in", "out"],
  43554. disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"],
  43555. errorTemplate: TSErrors.InvalidModifierOnTypeParameter
  43556. });
  43557. this.tsParseConstModifier = this.tsParseModifiers.bind(this, {
  43558. allowedModifiers: ["const"],
  43559. disallowedModifiers: ["in", "out"],
  43560. errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions
  43561. });
  43562. this.tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, {
  43563. allowedModifiers: ["in", "out", "const"],
  43564. disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"],
  43565. errorTemplate: TSErrors.InvalidModifierOnTypeParameter
  43566. });
  43567. }
  43568. getScopeHandler() {
  43569. return TypeScriptScopeHandler;
  43570. }
  43571. tsIsIdentifier() {
  43572. return tokenIsIdentifier(this.state.type);
  43573. }
  43574. tsTokenCanFollowModifier() {
  43575. return (this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(136) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
  43576. }
  43577. tsNextTokenCanFollowModifier() {
  43578. this.next();
  43579. return this.tsTokenCanFollowModifier();
  43580. }
  43581. tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) {
  43582. if (!tokenIsIdentifier(this.state.type) && this.state.type !== 58 && this.state.type !== 75) {
  43583. return void 0;
  43584. }
  43585. const modifier = this.state.value;
  43586. if (allowedModifiers.indexOf(modifier) !== -1) {
  43587. if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) {
  43588. return void 0;
  43589. }
  43590. if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
  43591. return modifier;
  43592. }
  43593. }
  43594. return void 0;
  43595. }
  43596. tsParseModifiers({
  43597. allowedModifiers,
  43598. disallowedModifiers,
  43599. stopOnStartOfClassStaticBlock,
  43600. errorTemplate = TSErrors.InvalidModifierOnTypeMember
  43601. }, modified) {
  43602. const enforceOrder = (loc, modifier, before, after) => {
  43603. if (modifier === before && modified[after]) {
  43604. this.raise(TSErrors.InvalidModifiersOrder, {
  43605. at: loc,
  43606. orderedModifiers: [before, after]
  43607. });
  43608. }
  43609. };
  43610. const incompatible = (loc, modifier, mod1, mod2) => {
  43611. if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) {
  43612. this.raise(TSErrors.IncompatibleModifiers, {
  43613. at: loc,
  43614. modifiers: [mod1, mod2]
  43615. });
  43616. }
  43617. };
  43618. for (; ; ) {
  43619. const {
  43620. startLoc
  43621. } = this.state;
  43622. const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []), stopOnStartOfClassStaticBlock);
  43623. if (!modifier)
  43624. break;
  43625. if (tsIsAccessModifier(modifier)) {
  43626. if (modified.accessibility) {
  43627. this.raise(TSErrors.DuplicateAccessibilityModifier, {
  43628. at: startLoc,
  43629. modifier
  43630. });
  43631. } else {
  43632. enforceOrder(startLoc, modifier, modifier, "override");
  43633. enforceOrder(startLoc, modifier, modifier, "static");
  43634. enforceOrder(startLoc, modifier, modifier, "readonly");
  43635. modified.accessibility = modifier;
  43636. }
  43637. } else if (tsIsVarianceAnnotations(modifier)) {
  43638. if (modified[modifier]) {
  43639. this.raise(TSErrors.DuplicateModifier, {
  43640. at: startLoc,
  43641. modifier
  43642. });
  43643. }
  43644. modified[modifier] = true;
  43645. enforceOrder(startLoc, modifier, "in", "out");
  43646. } else {
  43647. if (Object.hasOwnProperty.call(modified, modifier)) {
  43648. this.raise(TSErrors.DuplicateModifier, {
  43649. at: startLoc,
  43650. modifier
  43651. });
  43652. } else {
  43653. enforceOrder(startLoc, modifier, "static", "readonly");
  43654. enforceOrder(startLoc, modifier, "static", "override");
  43655. enforceOrder(startLoc, modifier, "override", "readonly");
  43656. enforceOrder(startLoc, modifier, "abstract", "override");
  43657. incompatible(startLoc, modifier, "declare", "override");
  43658. incompatible(startLoc, modifier, "static", "abstract");
  43659. }
  43660. modified[modifier] = true;
  43661. }
  43662. if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) {
  43663. this.raise(errorTemplate, {
  43664. at: startLoc,
  43665. modifier
  43666. });
  43667. }
  43668. }
  43669. }
  43670. tsIsListTerminator(kind) {
  43671. switch (kind) {
  43672. case "EnumMembers":
  43673. case "TypeMembers":
  43674. return this.match(8);
  43675. case "HeritageClauseElement":
  43676. return this.match(5);
  43677. case "TupleElementTypes":
  43678. return this.match(3);
  43679. case "TypeParametersOrArguments":
  43680. return this.match(48);
  43681. }
  43682. }
  43683. tsParseList(kind, parseElement) {
  43684. const result = [];
  43685. while (!this.tsIsListTerminator(kind)) {
  43686. result.push(parseElement());
  43687. }
  43688. return result;
  43689. }
  43690. tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) {
  43691. return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true, refTrailingCommaPos));
  43692. }
  43693. tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) {
  43694. const result = [];
  43695. let trailingCommaPos = -1;
  43696. for (; ; ) {
  43697. if (this.tsIsListTerminator(kind)) {
  43698. break;
  43699. }
  43700. trailingCommaPos = -1;
  43701. const element2 = parseElement();
  43702. if (element2 == null) {
  43703. return void 0;
  43704. }
  43705. result.push(element2);
  43706. if (this.eat(12)) {
  43707. trailingCommaPos = this.state.lastTokStart;
  43708. continue;
  43709. }
  43710. if (this.tsIsListTerminator(kind)) {
  43711. break;
  43712. }
  43713. if (expectSuccess) {
  43714. this.expect(12);
  43715. }
  43716. return void 0;
  43717. }
  43718. if (refTrailingCommaPos) {
  43719. refTrailingCommaPos.value = trailingCommaPos;
  43720. }
  43721. return result;
  43722. }
  43723. tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) {
  43724. if (!skipFirstToken) {
  43725. if (bracket) {
  43726. this.expect(0);
  43727. } else {
  43728. this.expect(47);
  43729. }
  43730. }
  43731. const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos);
  43732. if (bracket) {
  43733. this.expect(3);
  43734. } else {
  43735. this.expect(48);
  43736. }
  43737. return result;
  43738. }
  43739. tsParseImportType() {
  43740. const node2 = this.startNode();
  43741. this.expect(83);
  43742. this.expect(10);
  43743. if (!this.match(131)) {
  43744. this.raise(TSErrors.UnsupportedImportTypeArgument, {
  43745. at: this.state.startLoc
  43746. });
  43747. }
  43748. node2.argument = super.parseExprAtom();
  43749. this.expect(11);
  43750. if (this.eat(16)) {
  43751. node2.qualifier = this.tsParseEntityName();
  43752. }
  43753. if (this.match(47)) {
  43754. node2.typeParameters = this.tsParseTypeArguments();
  43755. }
  43756. return this.finishNode(node2, "TSImportType");
  43757. }
  43758. tsParseEntityName(allowReservedWords = true) {
  43759. let entity = this.parseIdentifier(allowReservedWords);
  43760. while (this.eat(16)) {
  43761. const node2 = this.startNodeAtNode(entity);
  43762. node2.left = entity;
  43763. node2.right = this.parseIdentifier(allowReservedWords);
  43764. entity = this.finishNode(node2, "TSQualifiedName");
  43765. }
  43766. return entity;
  43767. }
  43768. tsParseTypeReference() {
  43769. const node2 = this.startNode();
  43770. node2.typeName = this.tsParseEntityName();
  43771. if (!this.hasPrecedingLineBreak() && this.match(47)) {
  43772. node2.typeParameters = this.tsParseTypeArguments();
  43773. }
  43774. return this.finishNode(node2, "TSTypeReference");
  43775. }
  43776. tsParseThisTypePredicate(lhs) {
  43777. this.next();
  43778. const node2 = this.startNodeAtNode(lhs);
  43779. node2.parameterName = lhs;
  43780. node2.typeAnnotation = this.tsParseTypeAnnotation(false);
  43781. node2.asserts = false;
  43782. return this.finishNode(node2, "TSTypePredicate");
  43783. }
  43784. tsParseThisTypeNode() {
  43785. const node2 = this.startNode();
  43786. this.next();
  43787. return this.finishNode(node2, "TSThisType");
  43788. }
  43789. tsParseTypeQuery() {
  43790. const node2 = this.startNode();
  43791. this.expect(87);
  43792. if (this.match(83)) {
  43793. node2.exprName = this.tsParseImportType();
  43794. } else {
  43795. node2.exprName = this.tsParseEntityName();
  43796. }
  43797. if (!this.hasPrecedingLineBreak() && this.match(47)) {
  43798. node2.typeParameters = this.tsParseTypeArguments();
  43799. }
  43800. return this.finishNode(node2, "TSTypeQuery");
  43801. }
  43802. tsParseTypeParameter(parseModifiers) {
  43803. const node2 = this.startNode();
  43804. parseModifiers(node2);
  43805. node2.name = this.tsParseTypeParameterName();
  43806. node2.constraint = this.tsEatThenParseType(81);
  43807. node2.default = this.tsEatThenParseType(29);
  43808. return this.finishNode(node2, "TSTypeParameter");
  43809. }
  43810. tsTryParseTypeParameters(parseModifiers) {
  43811. if (this.match(47)) {
  43812. return this.tsParseTypeParameters(parseModifiers);
  43813. }
  43814. }
  43815. tsParseTypeParameters(parseModifiers) {
  43816. const node2 = this.startNode();
  43817. if (this.match(47) || this.match(140)) {
  43818. this.next();
  43819. } else {
  43820. this.unexpected();
  43821. }
  43822. const refTrailingCommaPos = {
  43823. value: -1
  43824. };
  43825. node2.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, parseModifiers), false, true, refTrailingCommaPos);
  43826. if (node2.params.length === 0) {
  43827. this.raise(TSErrors.EmptyTypeParameters, {
  43828. at: node2
  43829. });
  43830. }
  43831. if (refTrailingCommaPos.value !== -1) {
  43832. this.addExtra(node2, "trailingComma", refTrailingCommaPos.value);
  43833. }
  43834. return this.finishNode(node2, "TSTypeParameterDeclaration");
  43835. }
  43836. tsFillSignature(returnToken, signature) {
  43837. const returnTokenRequired = returnToken === 19;
  43838. const paramsKey = "parameters";
  43839. const returnTypeKey = "typeAnnotation";
  43840. signature.typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier);
  43841. this.expect(10);
  43842. signature[paramsKey] = this.tsParseBindingListForSignature();
  43843. if (returnTokenRequired) {
  43844. signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  43845. } else if (this.match(returnToken)) {
  43846. signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  43847. }
  43848. }
  43849. tsParseBindingListForSignature() {
  43850. return super.parseBindingList(11, 41, 2).map((pattern) => {
  43851. if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
  43852. this.raise(TSErrors.UnsupportedSignatureParameterKind, {
  43853. at: pattern,
  43854. type: pattern.type
  43855. });
  43856. }
  43857. return pattern;
  43858. });
  43859. }
  43860. tsParseTypeMemberSemicolon() {
  43861. if (!this.eat(12) && !this.isLineTerminator()) {
  43862. this.expect(13);
  43863. }
  43864. }
  43865. tsParseSignatureMember(kind, node2) {
  43866. this.tsFillSignature(14, node2);
  43867. this.tsParseTypeMemberSemicolon();
  43868. return this.finishNode(node2, kind);
  43869. }
  43870. tsIsUnambiguouslyIndexSignature() {
  43871. this.next();
  43872. if (tokenIsIdentifier(this.state.type)) {
  43873. this.next();
  43874. return this.match(14);
  43875. }
  43876. return false;
  43877. }
  43878. tsTryParseIndexSignature(node2) {
  43879. if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
  43880. return void 0;
  43881. }
  43882. this.expect(0);
  43883. const id = this.parseIdentifier();
  43884. id.typeAnnotation = this.tsParseTypeAnnotation();
  43885. this.resetEndLocation(id);
  43886. this.expect(3);
  43887. node2.parameters = [id];
  43888. const type = this.tsTryParseTypeAnnotation();
  43889. if (type)
  43890. node2.typeAnnotation = type;
  43891. this.tsParseTypeMemberSemicolon();
  43892. return this.finishNode(node2, "TSIndexSignature");
  43893. }
  43894. tsParsePropertyOrMethodSignature(node2, readonly) {
  43895. if (this.eat(17))
  43896. node2.optional = true;
  43897. const nodeAny = node2;
  43898. if (this.match(10) || this.match(47)) {
  43899. if (readonly) {
  43900. this.raise(TSErrors.ReadonlyForMethodSignature, {
  43901. at: node2
  43902. });
  43903. }
  43904. const method = nodeAny;
  43905. if (method.kind && this.match(47)) {
  43906. this.raise(TSErrors.AccesorCannotHaveTypeParameters, {
  43907. at: this.state.curPosition()
  43908. });
  43909. }
  43910. this.tsFillSignature(14, method);
  43911. this.tsParseTypeMemberSemicolon();
  43912. const paramsKey = "parameters";
  43913. const returnTypeKey = "typeAnnotation";
  43914. if (method.kind === "get") {
  43915. if (method[paramsKey].length > 0) {
  43916. this.raise(Errors.BadGetterArity, {
  43917. at: this.state.curPosition()
  43918. });
  43919. if (this.isThisParam(method[paramsKey][0])) {
  43920. this.raise(TSErrors.AccesorCannotDeclareThisParameter, {
  43921. at: this.state.curPosition()
  43922. });
  43923. }
  43924. }
  43925. } else if (method.kind === "set") {
  43926. if (method[paramsKey].length !== 1) {
  43927. this.raise(Errors.BadSetterArity, {
  43928. at: this.state.curPosition()
  43929. });
  43930. } else {
  43931. const firstParameter = method[paramsKey][0];
  43932. if (this.isThisParam(firstParameter)) {
  43933. this.raise(TSErrors.AccesorCannotDeclareThisParameter, {
  43934. at: this.state.curPosition()
  43935. });
  43936. }
  43937. if (firstParameter.type === "Identifier" && firstParameter.optional) {
  43938. this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, {
  43939. at: this.state.curPosition()
  43940. });
  43941. }
  43942. if (firstParameter.type === "RestElement") {
  43943. this.raise(TSErrors.SetAccesorCannotHaveRestParameter, {
  43944. at: this.state.curPosition()
  43945. });
  43946. }
  43947. }
  43948. if (method[returnTypeKey]) {
  43949. this.raise(TSErrors.SetAccesorCannotHaveReturnType, {
  43950. at: method[returnTypeKey]
  43951. });
  43952. }
  43953. } else {
  43954. method.kind = "method";
  43955. }
  43956. return this.finishNode(method, "TSMethodSignature");
  43957. } else {
  43958. const property = nodeAny;
  43959. if (readonly)
  43960. property.readonly = true;
  43961. const type = this.tsTryParseTypeAnnotation();
  43962. if (type)
  43963. property.typeAnnotation = type;
  43964. this.tsParseTypeMemberSemicolon();
  43965. return this.finishNode(property, "TSPropertySignature");
  43966. }
  43967. }
  43968. tsParseTypeMember() {
  43969. const node2 = this.startNode();
  43970. if (this.match(10) || this.match(47)) {
  43971. return this.tsParseSignatureMember("TSCallSignatureDeclaration", node2);
  43972. }
  43973. if (this.match(77)) {
  43974. const id = this.startNode();
  43975. this.next();
  43976. if (this.match(10) || this.match(47)) {
  43977. return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node2);
  43978. } else {
  43979. node2.key = this.createIdentifier(id, "new");
  43980. return this.tsParsePropertyOrMethodSignature(node2, false);
  43981. }
  43982. }
  43983. this.tsParseModifiers({
  43984. allowedModifiers: ["readonly"],
  43985. disallowedModifiers: ["declare", "abstract", "private", "protected", "public", "static", "override"]
  43986. }, node2);
  43987. const idx = this.tsTryParseIndexSignature(node2);
  43988. if (idx) {
  43989. return idx;
  43990. }
  43991. super.parsePropertyName(node2);
  43992. if (!node2.computed && node2.key.type === "Identifier" && (node2.key.name === "get" || node2.key.name === "set") && this.tsTokenCanFollowModifier()) {
  43993. node2.kind = node2.key.name;
  43994. super.parsePropertyName(node2);
  43995. }
  43996. return this.tsParsePropertyOrMethodSignature(node2, !!node2.readonly);
  43997. }
  43998. tsParseTypeLiteral() {
  43999. const node2 = this.startNode();
  44000. node2.members = this.tsParseObjectTypeMembers();
  44001. return this.finishNode(node2, "TSTypeLiteral");
  44002. }
  44003. tsParseObjectTypeMembers() {
  44004. this.expect(5);
  44005. const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
  44006. this.expect(8);
  44007. return members;
  44008. }
  44009. tsIsStartOfMappedType() {
  44010. this.next();
  44011. if (this.eat(53)) {
  44012. return this.isContextual(120);
  44013. }
  44014. if (this.isContextual(120)) {
  44015. this.next();
  44016. }
  44017. if (!this.match(0)) {
  44018. return false;
  44019. }
  44020. this.next();
  44021. if (!this.tsIsIdentifier()) {
  44022. return false;
  44023. }
  44024. this.next();
  44025. return this.match(58);
  44026. }
  44027. tsParseMappedTypeParameter() {
  44028. const node2 = this.startNode();
  44029. node2.name = this.tsParseTypeParameterName();
  44030. node2.constraint = this.tsExpectThenParseType(58);
  44031. return this.finishNode(node2, "TSTypeParameter");
  44032. }
  44033. tsParseMappedType() {
  44034. const node2 = this.startNode();
  44035. this.expect(5);
  44036. if (this.match(53)) {
  44037. node2.readonly = this.state.value;
  44038. this.next();
  44039. this.expectContextual(120);
  44040. } else if (this.eatContextual(120)) {
  44041. node2.readonly = true;
  44042. }
  44043. this.expect(0);
  44044. node2.typeParameter = this.tsParseMappedTypeParameter();
  44045. node2.nameType = this.eatContextual(93) ? this.tsParseType() : null;
  44046. this.expect(3);
  44047. if (this.match(53)) {
  44048. node2.optional = this.state.value;
  44049. this.next();
  44050. this.expect(17);
  44051. } else if (this.eat(17)) {
  44052. node2.optional = true;
  44053. }
  44054. node2.typeAnnotation = this.tsTryParseType();
  44055. this.semicolon();
  44056. this.expect(8);
  44057. return this.finishNode(node2, "TSMappedType");
  44058. }
  44059. tsParseTupleType() {
  44060. const node2 = this.startNode();
  44061. node2.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
  44062. let seenOptionalElement = false;
  44063. let labeledElements = null;
  44064. node2.elementTypes.forEach((elementNode) => {
  44065. var _labeledElements;
  44066. const {
  44067. type
  44068. } = elementNode;
  44069. if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
  44070. this.raise(TSErrors.OptionalTypeBeforeRequired, {
  44071. at: elementNode
  44072. });
  44073. }
  44074. seenOptionalElement || (seenOptionalElement = type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType");
  44075. let checkType = type;
  44076. if (type === "TSRestType") {
  44077. elementNode = elementNode.typeAnnotation;
  44078. checkType = elementNode.type;
  44079. }
  44080. const isLabeled = checkType === "TSNamedTupleMember";
  44081. (_labeledElements = labeledElements) != null ? _labeledElements : labeledElements = isLabeled;
  44082. if (labeledElements !== isLabeled) {
  44083. this.raise(TSErrors.MixedLabeledAndUnlabeledElements, {
  44084. at: elementNode
  44085. });
  44086. }
  44087. });
  44088. return this.finishNode(node2, "TSTupleType");
  44089. }
  44090. tsParseTupleElementType() {
  44091. const {
  44092. startLoc
  44093. } = this.state;
  44094. const rest = this.eat(21);
  44095. let labeled;
  44096. let label;
  44097. let optional;
  44098. let type;
  44099. const isWord = tokenIsKeywordOrIdentifier(this.state.type);
  44100. const chAfterWord = isWord ? this.lookaheadCharCode() : null;
  44101. if (chAfterWord === 58) {
  44102. labeled = true;
  44103. optional = false;
  44104. label = this.parseIdentifier(true);
  44105. this.expect(14);
  44106. type = this.tsParseType();
  44107. } else if (chAfterWord === 63) {
  44108. optional = true;
  44109. const startLoc2 = this.state.startLoc;
  44110. const wordName = this.state.value;
  44111. const typeOrLabel = this.tsParseNonArrayType();
  44112. if (this.lookaheadCharCode() === 58) {
  44113. labeled = true;
  44114. label = this.createIdentifier(this.startNodeAt(startLoc2), wordName);
  44115. this.expect(17);
  44116. this.expect(14);
  44117. type = this.tsParseType();
  44118. } else {
  44119. labeled = false;
  44120. type = typeOrLabel;
  44121. this.expect(17);
  44122. }
  44123. } else {
  44124. type = this.tsParseType();
  44125. optional = this.eat(17);
  44126. labeled = this.eat(14);
  44127. }
  44128. if (labeled) {
  44129. let labeledNode;
  44130. if (label) {
  44131. labeledNode = this.startNodeAtNode(label);
  44132. labeledNode.optional = optional;
  44133. labeledNode.label = label;
  44134. labeledNode.elementType = type;
  44135. if (this.eat(17)) {
  44136. labeledNode.optional = true;
  44137. this.raise(TSErrors.TupleOptionalAfterType, {
  44138. at: this.state.lastTokStartLoc
  44139. });
  44140. }
  44141. } else {
  44142. labeledNode = this.startNodeAtNode(type);
  44143. labeledNode.optional = optional;
  44144. this.raise(TSErrors.InvalidTupleMemberLabel, {
  44145. at: type
  44146. });
  44147. labeledNode.label = type;
  44148. labeledNode.elementType = this.tsParseType();
  44149. }
  44150. type = this.finishNode(labeledNode, "TSNamedTupleMember");
  44151. } else if (optional) {
  44152. const optionalTypeNode = this.startNodeAtNode(type);
  44153. optionalTypeNode.typeAnnotation = type;
  44154. type = this.finishNode(optionalTypeNode, "TSOptionalType");
  44155. }
  44156. if (rest) {
  44157. const restNode = this.startNodeAt(startLoc);
  44158. restNode.typeAnnotation = type;
  44159. type = this.finishNode(restNode, "TSRestType");
  44160. }
  44161. return type;
  44162. }
  44163. tsParseParenthesizedType() {
  44164. const node2 = this.startNode();
  44165. this.expect(10);
  44166. node2.typeAnnotation = this.tsParseType();
  44167. this.expect(11);
  44168. return this.finishNode(node2, "TSParenthesizedType");
  44169. }
  44170. tsParseFunctionOrConstructorType(type, abstract) {
  44171. const node2 = this.startNode();
  44172. if (type === "TSConstructorType") {
  44173. node2.abstract = !!abstract;
  44174. if (abstract)
  44175. this.next();
  44176. this.next();
  44177. }
  44178. this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(19, node2));
  44179. return this.finishNode(node2, type);
  44180. }
  44181. tsParseLiteralTypeNode() {
  44182. const node2 = this.startNode();
  44183. node2.literal = (() => {
  44184. switch (this.state.type) {
  44185. case 132:
  44186. case 133:
  44187. case 131:
  44188. case 85:
  44189. case 86:
  44190. return super.parseExprAtom();
  44191. default:
  44192. this.unexpected();
  44193. }
  44194. })();
  44195. return this.finishNode(node2, "TSLiteralType");
  44196. }
  44197. tsParseTemplateLiteralType() {
  44198. const node2 = this.startNode();
  44199. node2.literal = super.parseTemplate(false);
  44200. return this.finishNode(node2, "TSLiteralType");
  44201. }
  44202. parseTemplateSubstitution() {
  44203. if (this.state.inType)
  44204. return this.tsParseType();
  44205. return super.parseTemplateSubstitution();
  44206. }
  44207. tsParseThisTypeOrThisTypePredicate() {
  44208. const thisKeyword = this.tsParseThisTypeNode();
  44209. if (this.isContextual(114) && !this.hasPrecedingLineBreak()) {
  44210. return this.tsParseThisTypePredicate(thisKeyword);
  44211. } else {
  44212. return thisKeyword;
  44213. }
  44214. }
  44215. tsParseNonArrayType() {
  44216. switch (this.state.type) {
  44217. case 131:
  44218. case 132:
  44219. case 133:
  44220. case 85:
  44221. case 86:
  44222. return this.tsParseLiteralTypeNode();
  44223. case 53:
  44224. if (this.state.value === "-") {
  44225. const node2 = this.startNode();
  44226. const nextToken = this.lookahead();
  44227. if (nextToken.type !== 132 && nextToken.type !== 133) {
  44228. this.unexpected();
  44229. }
  44230. node2.literal = this.parseMaybeUnary();
  44231. return this.finishNode(node2, "TSLiteralType");
  44232. }
  44233. break;
  44234. case 78:
  44235. return this.tsParseThisTypeOrThisTypePredicate();
  44236. case 87:
  44237. return this.tsParseTypeQuery();
  44238. case 83:
  44239. return this.tsParseImportType();
  44240. case 5:
  44241. return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
  44242. case 0:
  44243. return this.tsParseTupleType();
  44244. case 10:
  44245. return this.tsParseParenthesizedType();
  44246. case 25:
  44247. case 24:
  44248. return this.tsParseTemplateLiteralType();
  44249. default: {
  44250. const {
  44251. type
  44252. } = this.state;
  44253. if (tokenIsIdentifier(type) || type === 88 || type === 84) {
  44254. const nodeType = type === 88 ? "TSVoidKeyword" : type === 84 ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
  44255. if (nodeType !== void 0 && this.lookaheadCharCode() !== 46) {
  44256. const node2 = this.startNode();
  44257. this.next();
  44258. return this.finishNode(node2, nodeType);
  44259. }
  44260. return this.tsParseTypeReference();
  44261. }
  44262. }
  44263. }
  44264. this.unexpected();
  44265. }
  44266. tsParseArrayTypeOrHigher() {
  44267. let type = this.tsParseNonArrayType();
  44268. while (!this.hasPrecedingLineBreak() && this.eat(0)) {
  44269. if (this.match(3)) {
  44270. const node2 = this.startNodeAtNode(type);
  44271. node2.elementType = type;
  44272. this.expect(3);
  44273. type = this.finishNode(node2, "TSArrayType");
  44274. } else {
  44275. const node2 = this.startNodeAtNode(type);
  44276. node2.objectType = type;
  44277. node2.indexType = this.tsParseType();
  44278. this.expect(3);
  44279. type = this.finishNode(node2, "TSIndexedAccessType");
  44280. }
  44281. }
  44282. return type;
  44283. }
  44284. tsParseTypeOperator() {
  44285. const node2 = this.startNode();
  44286. const operator = this.state.value;
  44287. this.next();
  44288. node2.operator = operator;
  44289. node2.typeAnnotation = this.tsParseTypeOperatorOrHigher();
  44290. if (operator === "readonly") {
  44291. this.tsCheckTypeAnnotationForReadOnly(node2);
  44292. }
  44293. return this.finishNode(node2, "TSTypeOperator");
  44294. }
  44295. tsCheckTypeAnnotationForReadOnly(node2) {
  44296. switch (node2.typeAnnotation.type) {
  44297. case "TSTupleType":
  44298. case "TSArrayType":
  44299. return;
  44300. default:
  44301. this.raise(TSErrors.UnexpectedReadonly, {
  44302. at: node2
  44303. });
  44304. }
  44305. }
  44306. tsParseInferType() {
  44307. const node2 = this.startNode();
  44308. this.expectContextual(113);
  44309. const typeParameter = this.startNode();
  44310. typeParameter.name = this.tsParseTypeParameterName();
  44311. typeParameter.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType());
  44312. node2.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
  44313. return this.finishNode(node2, "TSInferType");
  44314. }
  44315. tsParseConstraintForInferType() {
  44316. if (this.eat(81)) {
  44317. const constraint = this.tsInDisallowConditionalTypesContext(() => this.tsParseType());
  44318. if (this.state.inDisallowConditionalTypesContext || !this.match(17)) {
  44319. return constraint;
  44320. }
  44321. }
  44322. }
  44323. tsParseTypeOperatorOrHigher() {
  44324. const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc;
  44325. return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(113) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher());
  44326. }
  44327. tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
  44328. const node2 = this.startNode();
  44329. const hasLeadingOperator = this.eat(operator);
  44330. const types4 = [];
  44331. do {
  44332. types4.push(parseConstituentType());
  44333. } while (this.eat(operator));
  44334. if (types4.length === 1 && !hasLeadingOperator) {
  44335. return types4[0];
  44336. }
  44337. node2.types = types4;
  44338. return this.finishNode(node2, kind);
  44339. }
  44340. tsParseIntersectionTypeOrHigher() {
  44341. return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45);
  44342. }
  44343. tsParseUnionTypeOrHigher() {
  44344. return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43);
  44345. }
  44346. tsIsStartOfFunctionType() {
  44347. if (this.match(47)) {
  44348. return true;
  44349. }
  44350. return this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
  44351. }
  44352. tsSkipParameterStart() {
  44353. if (tokenIsIdentifier(this.state.type) || this.match(78)) {
  44354. this.next();
  44355. return true;
  44356. }
  44357. if (this.match(5)) {
  44358. const {
  44359. errors
  44360. } = this.state;
  44361. const previousErrorCount = errors.length;
  44362. try {
  44363. this.parseObjectLike(8, true);
  44364. return errors.length === previousErrorCount;
  44365. } catch (_unused) {
  44366. return false;
  44367. }
  44368. }
  44369. if (this.match(0)) {
  44370. this.next();
  44371. const {
  44372. errors
  44373. } = this.state;
  44374. const previousErrorCount = errors.length;
  44375. try {
  44376. super.parseBindingList(3, 93, 1);
  44377. return errors.length === previousErrorCount;
  44378. } catch (_unused2) {
  44379. return false;
  44380. }
  44381. }
  44382. return false;
  44383. }
  44384. tsIsUnambiguouslyStartOfFunctionType() {
  44385. this.next();
  44386. if (this.match(11) || this.match(21)) {
  44387. return true;
  44388. }
  44389. if (this.tsSkipParameterStart()) {
  44390. if (this.match(14) || this.match(12) || this.match(17) || this.match(29)) {
  44391. return true;
  44392. }
  44393. if (this.match(11)) {
  44394. this.next();
  44395. if (this.match(19)) {
  44396. return true;
  44397. }
  44398. }
  44399. }
  44400. return false;
  44401. }
  44402. tsParseTypeOrTypePredicateAnnotation(returnToken) {
  44403. return this.tsInType(() => {
  44404. const t3 = this.startNode();
  44405. this.expect(returnToken);
  44406. const node2 = this.startNode();
  44407. const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
  44408. if (asserts && this.match(78)) {
  44409. let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();
  44410. if (thisTypePredicate.type === "TSThisType") {
  44411. node2.parameterName = thisTypePredicate;
  44412. node2.asserts = true;
  44413. node2.typeAnnotation = null;
  44414. thisTypePredicate = this.finishNode(node2, "TSTypePredicate");
  44415. } else {
  44416. this.resetStartLocationFromNode(thisTypePredicate, node2);
  44417. thisTypePredicate.asserts = true;
  44418. }
  44419. t3.typeAnnotation = thisTypePredicate;
  44420. return this.finishNode(t3, "TSTypeAnnotation");
  44421. }
  44422. const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
  44423. if (!typePredicateVariable) {
  44424. if (!asserts) {
  44425. return this.tsParseTypeAnnotation(false, t3);
  44426. }
  44427. node2.parameterName = this.parseIdentifier();
  44428. node2.asserts = asserts;
  44429. node2.typeAnnotation = null;
  44430. t3.typeAnnotation = this.finishNode(node2, "TSTypePredicate");
  44431. return this.finishNode(t3, "TSTypeAnnotation");
  44432. }
  44433. const type = this.tsParseTypeAnnotation(false);
  44434. node2.parameterName = typePredicateVariable;
  44435. node2.typeAnnotation = type;
  44436. node2.asserts = asserts;
  44437. t3.typeAnnotation = this.finishNode(node2, "TSTypePredicate");
  44438. return this.finishNode(t3, "TSTypeAnnotation");
  44439. });
  44440. }
  44441. tsTryParseTypeOrTypePredicateAnnotation() {
  44442. return this.match(14) ? this.tsParseTypeOrTypePredicateAnnotation(14) : void 0;
  44443. }
  44444. tsTryParseTypeAnnotation() {
  44445. return this.match(14) ? this.tsParseTypeAnnotation() : void 0;
  44446. }
  44447. tsTryParseType() {
  44448. return this.tsEatThenParseType(14);
  44449. }
  44450. tsParseTypePredicatePrefix() {
  44451. const id = this.parseIdentifier();
  44452. if (this.isContextual(114) && !this.hasPrecedingLineBreak()) {
  44453. this.next();
  44454. return id;
  44455. }
  44456. }
  44457. tsParseTypePredicateAsserts() {
  44458. if (this.state.type !== 107) {
  44459. return false;
  44460. }
  44461. const containsEsc = this.state.containsEsc;
  44462. this.next();
  44463. if (!tokenIsIdentifier(this.state.type) && !this.match(78)) {
  44464. return false;
  44465. }
  44466. if (containsEsc) {
  44467. this.raise(Errors.InvalidEscapedReservedWord, {
  44468. at: this.state.lastTokStartLoc,
  44469. reservedWord: "asserts"
  44470. });
  44471. }
  44472. return true;
  44473. }
  44474. tsParseTypeAnnotation(eatColon = true, t3 = this.startNode()) {
  44475. this.tsInType(() => {
  44476. if (eatColon)
  44477. this.expect(14);
  44478. t3.typeAnnotation = this.tsParseType();
  44479. });
  44480. return this.finishNode(t3, "TSTypeAnnotation");
  44481. }
  44482. tsParseType() {
  44483. assert(this.state.inType);
  44484. const type = this.tsParseNonConditionalType();
  44485. if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) {
  44486. return type;
  44487. }
  44488. const node2 = this.startNodeAtNode(type);
  44489. node2.checkType = type;
  44490. node2.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType());
  44491. this.expect(17);
  44492. node2.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType());
  44493. this.expect(14);
  44494. node2.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType());
  44495. return this.finishNode(node2, "TSConditionalType");
  44496. }
  44497. isAbstractConstructorSignature() {
  44498. return this.isContextual(122) && this.lookahead().type === 77;
  44499. }
  44500. tsParseNonConditionalType() {
  44501. if (this.tsIsStartOfFunctionType()) {
  44502. return this.tsParseFunctionOrConstructorType("TSFunctionType");
  44503. }
  44504. if (this.match(77)) {
  44505. return this.tsParseFunctionOrConstructorType("TSConstructorType");
  44506. } else if (this.isAbstractConstructorSignature()) {
  44507. return this.tsParseFunctionOrConstructorType("TSConstructorType", true);
  44508. }
  44509. return this.tsParseUnionTypeOrHigher();
  44510. }
  44511. tsParseTypeAssertion() {
  44512. if (this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) {
  44513. this.raise(TSErrors.ReservedTypeAssertion, {
  44514. at: this.state.startLoc
  44515. });
  44516. }
  44517. const node2 = this.startNode();
  44518. node2.typeAnnotation = this.tsInType(() => {
  44519. this.next();
  44520. return this.match(75) ? this.tsParseTypeReference() : this.tsParseType();
  44521. });
  44522. this.expect(48);
  44523. node2.expression = this.parseMaybeUnary();
  44524. return this.finishNode(node2, "TSTypeAssertion");
  44525. }
  44526. tsParseHeritageClause(token2) {
  44527. const originalStartLoc = this.state.startLoc;
  44528. const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => {
  44529. const node2 = this.startNode();
  44530. node2.expression = this.tsParseEntityName();
  44531. if (this.match(47)) {
  44532. node2.typeParameters = this.tsParseTypeArguments();
  44533. }
  44534. return this.finishNode(node2, "TSExpressionWithTypeArguments");
  44535. });
  44536. if (!delimitedList.length) {
  44537. this.raise(TSErrors.EmptyHeritageClauseType, {
  44538. at: originalStartLoc,
  44539. token: token2
  44540. });
  44541. }
  44542. return delimitedList;
  44543. }
  44544. tsParseInterfaceDeclaration(node2, properties = {}) {
  44545. if (this.hasFollowingLineBreak())
  44546. return null;
  44547. this.expectContextual(127);
  44548. if (properties.declare)
  44549. node2.declare = true;
  44550. if (tokenIsIdentifier(this.state.type)) {
  44551. node2.id = this.parseIdentifier();
  44552. this.checkIdentifier(node2.id, BIND_TS_INTERFACE);
  44553. } else {
  44554. node2.id = null;
  44555. this.raise(TSErrors.MissingInterfaceName, {
  44556. at: this.state.startLoc
  44557. });
  44558. }
  44559. node2.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);
  44560. if (this.eat(81)) {
  44561. node2.extends = this.tsParseHeritageClause("extends");
  44562. }
  44563. const body = this.startNode();
  44564. body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
  44565. node2.body = this.finishNode(body, "TSInterfaceBody");
  44566. return this.finishNode(node2, "TSInterfaceDeclaration");
  44567. }
  44568. tsParseTypeAliasDeclaration(node2) {
  44569. node2.id = this.parseIdentifier();
  44570. this.checkIdentifier(node2.id, BIND_TS_TYPE);
  44571. node2.typeAnnotation = this.tsInType(() => {
  44572. node2.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers);
  44573. this.expect(29);
  44574. if (this.isContextual(112) && this.lookahead().type !== 16) {
  44575. const node3 = this.startNode();
  44576. this.next();
  44577. return this.finishNode(node3, "TSIntrinsicKeyword");
  44578. }
  44579. return this.tsParseType();
  44580. });
  44581. this.semicolon();
  44582. return this.finishNode(node2, "TSTypeAliasDeclaration");
  44583. }
  44584. tsInNoContext(cb) {
  44585. const oldContext = this.state.context;
  44586. this.state.context = [oldContext[0]];
  44587. try {
  44588. return cb();
  44589. } finally {
  44590. this.state.context = oldContext;
  44591. }
  44592. }
  44593. tsInType(cb) {
  44594. const oldInType = this.state.inType;
  44595. this.state.inType = true;
  44596. try {
  44597. return cb();
  44598. } finally {
  44599. this.state.inType = oldInType;
  44600. }
  44601. }
  44602. tsInDisallowConditionalTypesContext(cb) {
  44603. const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext;
  44604. this.state.inDisallowConditionalTypesContext = true;
  44605. try {
  44606. return cb();
  44607. } finally {
  44608. this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext;
  44609. }
  44610. }
  44611. tsInAllowConditionalTypesContext(cb) {
  44612. const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext;
  44613. this.state.inDisallowConditionalTypesContext = false;
  44614. try {
  44615. return cb();
  44616. } finally {
  44617. this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext;
  44618. }
  44619. }
  44620. tsEatThenParseType(token2) {
  44621. return !this.match(token2) ? void 0 : this.tsNextThenParseType();
  44622. }
  44623. tsExpectThenParseType(token2) {
  44624. return this.tsDoThenParseType(() => this.expect(token2));
  44625. }
  44626. tsNextThenParseType() {
  44627. return this.tsDoThenParseType(() => this.next());
  44628. }
  44629. tsDoThenParseType(cb) {
  44630. return this.tsInType(() => {
  44631. cb();
  44632. return this.tsParseType();
  44633. });
  44634. }
  44635. tsParseEnumMember() {
  44636. const node2 = this.startNode();
  44637. node2.id = this.match(131) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true);
  44638. if (this.eat(29)) {
  44639. node2.initializer = super.parseMaybeAssignAllowIn();
  44640. }
  44641. return this.finishNode(node2, "TSEnumMember");
  44642. }
  44643. tsParseEnumDeclaration(node2, properties = {}) {
  44644. if (properties.const)
  44645. node2.const = true;
  44646. if (properties.declare)
  44647. node2.declare = true;
  44648. this.expectContextual(124);
  44649. node2.id = this.parseIdentifier();
  44650. this.checkIdentifier(node2.id, node2.const ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
  44651. this.expect(5);
  44652. node2.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
  44653. this.expect(8);
  44654. return this.finishNode(node2, "TSEnumDeclaration");
  44655. }
  44656. tsParseModuleBlock() {
  44657. const node2 = this.startNode();
  44658. this.scope.enter(SCOPE_OTHER);
  44659. this.expect(5);
  44660. super.parseBlockOrModuleBlockBody(node2.body = [], void 0, true, 8);
  44661. this.scope.exit();
  44662. return this.finishNode(node2, "TSModuleBlock");
  44663. }
  44664. tsParseModuleOrNamespaceDeclaration(node2, nested = false) {
  44665. node2.id = this.parseIdentifier();
  44666. if (!nested) {
  44667. this.checkIdentifier(node2.id, BIND_TS_NAMESPACE);
  44668. }
  44669. if (this.eat(16)) {
  44670. const inner = this.startNode();
  44671. this.tsParseModuleOrNamespaceDeclaration(inner, true);
  44672. node2.body = inner;
  44673. } else {
  44674. this.scope.enter(SCOPE_TS_MODULE);
  44675. this.prodParam.enter(PARAM);
  44676. node2.body = this.tsParseModuleBlock();
  44677. this.prodParam.exit();
  44678. this.scope.exit();
  44679. }
  44680. return this.finishNode(node2, "TSModuleDeclaration");
  44681. }
  44682. tsParseAmbientExternalModuleDeclaration(node2) {
  44683. if (this.isContextual(110)) {
  44684. node2.global = true;
  44685. node2.id = this.parseIdentifier();
  44686. } else if (this.match(131)) {
  44687. node2.id = super.parseStringLiteral(this.state.value);
  44688. } else {
  44689. this.unexpected();
  44690. }
  44691. if (this.match(5)) {
  44692. this.scope.enter(SCOPE_TS_MODULE);
  44693. this.prodParam.enter(PARAM);
  44694. node2.body = this.tsParseModuleBlock();
  44695. this.prodParam.exit();
  44696. this.scope.exit();
  44697. } else {
  44698. this.semicolon();
  44699. }
  44700. return this.finishNode(node2, "TSModuleDeclaration");
  44701. }
  44702. tsParseImportEqualsDeclaration(node2, isExport) {
  44703. node2.isExport = isExport || false;
  44704. node2.id = this.parseIdentifier();
  44705. this.checkIdentifier(node2.id, BIND_FLAGS_TS_IMPORT);
  44706. this.expect(29);
  44707. const moduleReference = this.tsParseModuleReference();
  44708. if (node2.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") {
  44709. this.raise(TSErrors.ImportAliasHasImportType, {
  44710. at: moduleReference
  44711. });
  44712. }
  44713. node2.moduleReference = moduleReference;
  44714. this.semicolon();
  44715. return this.finishNode(node2, "TSImportEqualsDeclaration");
  44716. }
  44717. tsIsExternalModuleReference() {
  44718. return this.isContextual(117) && this.lookaheadCharCode() === 40;
  44719. }
  44720. tsParseModuleReference() {
  44721. return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
  44722. }
  44723. tsParseExternalModuleReference() {
  44724. const node2 = this.startNode();
  44725. this.expectContextual(117);
  44726. this.expect(10);
  44727. if (!this.match(131)) {
  44728. this.unexpected();
  44729. }
  44730. node2.expression = super.parseExprAtom();
  44731. this.expect(11);
  44732. return this.finishNode(node2, "TSExternalModuleReference");
  44733. }
  44734. tsLookAhead(f) {
  44735. const state = this.state.clone();
  44736. const res = f();
  44737. this.state = state;
  44738. return res;
  44739. }
  44740. tsTryParseAndCatch(f) {
  44741. const result = this.tryParse((abort) => f() || abort());
  44742. if (result.aborted || !result.node)
  44743. return void 0;
  44744. if (result.error)
  44745. this.state = result.failState;
  44746. return result.node;
  44747. }
  44748. tsTryParse(f) {
  44749. const state = this.state.clone();
  44750. const result = f();
  44751. if (result !== void 0 && result !== false) {
  44752. return result;
  44753. } else {
  44754. this.state = state;
  44755. return void 0;
  44756. }
  44757. }
  44758. tsTryParseDeclare(nany) {
  44759. if (this.isLineTerminator()) {
  44760. return;
  44761. }
  44762. let starttype = this.state.type;
  44763. let kind;
  44764. if (this.isContextual(99)) {
  44765. starttype = 74;
  44766. kind = "let";
  44767. }
  44768. return this.tsInAmbientContext(() => {
  44769. if (starttype === 68) {
  44770. nany.declare = true;
  44771. return super.parseFunctionStatement(nany, false, false);
  44772. }
  44773. if (starttype === 80) {
  44774. nany.declare = true;
  44775. return this.parseClass(nany, true, false);
  44776. }
  44777. if (starttype === 124) {
  44778. return this.tsParseEnumDeclaration(nany, {
  44779. declare: true
  44780. });
  44781. }
  44782. if (starttype === 110) {
  44783. return this.tsParseAmbientExternalModuleDeclaration(nany);
  44784. }
  44785. if (starttype === 75 || starttype === 74) {
  44786. if (!this.match(75) || !this.isLookaheadContextual("enum")) {
  44787. nany.declare = true;
  44788. return this.parseVarStatement(nany, kind || this.state.value, true);
  44789. }
  44790. this.expect(75);
  44791. return this.tsParseEnumDeclaration(nany, {
  44792. const: true,
  44793. declare: true
  44794. });
  44795. }
  44796. if (starttype === 127) {
  44797. const result = this.tsParseInterfaceDeclaration(nany, {
  44798. declare: true
  44799. });
  44800. if (result)
  44801. return result;
  44802. }
  44803. if (tokenIsIdentifier(starttype)) {
  44804. return this.tsParseDeclaration(nany, this.state.value, true, null);
  44805. }
  44806. });
  44807. }
  44808. tsTryParseExportDeclaration() {
  44809. return this.tsParseDeclaration(this.startNode(), this.state.value, true, null);
  44810. }
  44811. tsParseExpressionStatement(node2, expr, decorators) {
  44812. switch (expr.name) {
  44813. case "declare": {
  44814. const declaration = this.tsTryParseDeclare(node2);
  44815. if (declaration) {
  44816. declaration.declare = true;
  44817. return declaration;
  44818. }
  44819. break;
  44820. }
  44821. case "global":
  44822. if (this.match(5)) {
  44823. this.scope.enter(SCOPE_TS_MODULE);
  44824. this.prodParam.enter(PARAM);
  44825. const mod = node2;
  44826. mod.global = true;
  44827. mod.id = expr;
  44828. mod.body = this.tsParseModuleBlock();
  44829. this.scope.exit();
  44830. this.prodParam.exit();
  44831. return this.finishNode(mod, "TSModuleDeclaration");
  44832. }
  44833. break;
  44834. default:
  44835. return this.tsParseDeclaration(node2, expr.name, false, decorators);
  44836. }
  44837. }
  44838. tsParseDeclaration(node2, value2, next, decorators) {
  44839. switch (value2) {
  44840. case "abstract":
  44841. if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) {
  44842. return this.tsParseAbstractDeclaration(node2, decorators);
  44843. }
  44844. break;
  44845. case "module":
  44846. if (this.tsCheckLineTerminator(next)) {
  44847. if (this.match(131)) {
  44848. return this.tsParseAmbientExternalModuleDeclaration(node2);
  44849. } else if (tokenIsIdentifier(this.state.type)) {
  44850. return this.tsParseModuleOrNamespaceDeclaration(node2);
  44851. }
  44852. }
  44853. break;
  44854. case "namespace":
  44855. if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
  44856. return this.tsParseModuleOrNamespaceDeclaration(node2);
  44857. }
  44858. break;
  44859. case "type":
  44860. if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
  44861. return this.tsParseTypeAliasDeclaration(node2);
  44862. }
  44863. break;
  44864. }
  44865. }
  44866. tsCheckLineTerminator(next) {
  44867. if (next) {
  44868. if (this.hasFollowingLineBreak())
  44869. return false;
  44870. this.next();
  44871. return true;
  44872. }
  44873. return !this.isLineTerminator();
  44874. }
  44875. tsTryParseGenericAsyncArrowFunction(startLoc) {
  44876. if (!this.match(47)) {
  44877. return void 0;
  44878. }
  44879. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  44880. this.state.maybeInArrowParameters = true;
  44881. const res = this.tsTryParseAndCatch(() => {
  44882. const node2 = this.startNodeAt(startLoc);
  44883. node2.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier);
  44884. super.parseFunctionParams(node2);
  44885. node2.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
  44886. this.expect(19);
  44887. return node2;
  44888. });
  44889. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  44890. if (!res) {
  44891. return void 0;
  44892. }
  44893. return super.parseArrowExpression(res, null, true);
  44894. }
  44895. tsParseTypeArgumentsInExpression() {
  44896. if (this.reScan_lt() !== 47) {
  44897. return void 0;
  44898. }
  44899. return this.tsParseTypeArguments();
  44900. }
  44901. tsParseTypeArguments() {
  44902. const node2 = this.startNode();
  44903. node2.params = this.tsInType(() => this.tsInNoContext(() => {
  44904. this.expect(47);
  44905. return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
  44906. }));
  44907. if (node2.params.length === 0) {
  44908. this.raise(TSErrors.EmptyTypeArguments, {
  44909. at: node2
  44910. });
  44911. }
  44912. this.expect(48);
  44913. return this.finishNode(node2, "TSTypeParameterInstantiation");
  44914. }
  44915. tsIsDeclarationStart() {
  44916. return tokenIsTSDeclarationStart(this.state.type);
  44917. }
  44918. isExportDefaultSpecifier() {
  44919. if (this.tsIsDeclarationStart())
  44920. return false;
  44921. return super.isExportDefaultSpecifier();
  44922. }
  44923. parseAssignableListItem(flags, decorators) {
  44924. const startLoc = this.state.startLoc;
  44925. const modified = {};
  44926. this.tsParseModifiers({
  44927. allowedModifiers: ["public", "private", "protected", "override", "readonly"]
  44928. }, modified);
  44929. const accessibility = modified.accessibility;
  44930. const override = modified.override;
  44931. const readonly = modified.readonly;
  44932. if (!(flags & 4) && (accessibility || readonly || override)) {
  44933. this.raise(TSErrors.UnexpectedParameterModifier, {
  44934. at: startLoc
  44935. });
  44936. }
  44937. const left = this.parseMaybeDefault();
  44938. this.parseAssignableListItemTypes(left, flags);
  44939. const elt = this.parseMaybeDefault(left.loc.start, left);
  44940. if (accessibility || readonly || override) {
  44941. const pp3 = this.startNodeAt(startLoc);
  44942. if (decorators.length) {
  44943. pp3.decorators = decorators;
  44944. }
  44945. if (accessibility)
  44946. pp3.accessibility = accessibility;
  44947. if (readonly)
  44948. pp3.readonly = readonly;
  44949. if (override)
  44950. pp3.override = override;
  44951. if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
  44952. this.raise(TSErrors.UnsupportedParameterPropertyKind, {
  44953. at: pp3
  44954. });
  44955. }
  44956. pp3.parameter = elt;
  44957. return this.finishNode(pp3, "TSParameterProperty");
  44958. }
  44959. if (decorators.length) {
  44960. left.decorators = decorators;
  44961. }
  44962. return elt;
  44963. }
  44964. isSimpleParameter(node2) {
  44965. return node2.type === "TSParameterProperty" && super.isSimpleParameter(node2.parameter) || super.isSimpleParameter(node2);
  44966. }
  44967. tsDisallowOptionalPattern(node2) {
  44968. for (const param of node2.params) {
  44969. if (param.type !== "Identifier" && param.optional && !this.state.isAmbientContext) {
  44970. this.raise(TSErrors.PatternIsOptional, {
  44971. at: param
  44972. });
  44973. }
  44974. }
  44975. }
  44976. setArrowFunctionParameters(node2, params, trailingCommaLoc) {
  44977. super.setArrowFunctionParameters(node2, params, trailingCommaLoc);
  44978. this.tsDisallowOptionalPattern(node2);
  44979. }
  44980. parseFunctionBodyAndFinish(node2, type, isMethod = false) {
  44981. if (this.match(14)) {
  44982. node2.returnType = this.tsParseTypeOrTypePredicateAnnotation(14);
  44983. }
  44984. const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" || type === "ClassPrivateMethod" ? "TSDeclareMethod" : void 0;
  44985. if (bodilessType && !this.match(5) && this.isLineTerminator()) {
  44986. return this.finishNode(node2, bodilessType);
  44987. }
  44988. if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) {
  44989. this.raise(TSErrors.DeclareFunctionHasImplementation, {
  44990. at: node2
  44991. });
  44992. if (node2.declare) {
  44993. return super.parseFunctionBodyAndFinish(node2, bodilessType, isMethod);
  44994. }
  44995. }
  44996. this.tsDisallowOptionalPattern(node2);
  44997. return super.parseFunctionBodyAndFinish(node2, type, isMethod);
  44998. }
  44999. registerFunctionStatementId(node2) {
  45000. if (!node2.body && node2.id) {
  45001. this.checkIdentifier(node2.id, BIND_TS_AMBIENT);
  45002. } else {
  45003. super.registerFunctionStatementId(node2);
  45004. }
  45005. }
  45006. tsCheckForInvalidTypeCasts(items) {
  45007. items.forEach((node2) => {
  45008. if ((node2 == null ? void 0 : node2.type) === "TSTypeCastExpression") {
  45009. this.raise(TSErrors.UnexpectedTypeAnnotation, {
  45010. at: node2.typeAnnotation
  45011. });
  45012. }
  45013. });
  45014. }
  45015. toReferencedList(exprList, isInParens) {
  45016. this.tsCheckForInvalidTypeCasts(exprList);
  45017. return exprList;
  45018. }
  45019. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  45020. const node2 = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
  45021. if (node2.type === "ArrayExpression") {
  45022. this.tsCheckForInvalidTypeCasts(node2.elements);
  45023. }
  45024. return node2;
  45025. }
  45026. parseSubscript(base2, startLoc, noCalls, state) {
  45027. if (!this.hasPrecedingLineBreak() && this.match(35)) {
  45028. this.state.canStartJSXElement = false;
  45029. this.next();
  45030. const nonNullExpression = this.startNodeAt(startLoc);
  45031. nonNullExpression.expression = base2;
  45032. return this.finishNode(nonNullExpression, "TSNonNullExpression");
  45033. }
  45034. let isOptionalCall = false;
  45035. if (this.match(18) && this.lookaheadCharCode() === 60) {
  45036. if (noCalls) {
  45037. state.stop = true;
  45038. return base2;
  45039. }
  45040. state.optionalChainMember = isOptionalCall = true;
  45041. this.next();
  45042. }
  45043. if (this.match(47) || this.match(51)) {
  45044. let missingParenErrorLoc;
  45045. const result = this.tsTryParseAndCatch(() => {
  45046. if (!noCalls && this.atPossibleAsyncArrow(base2)) {
  45047. const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startLoc);
  45048. if (asyncArrowFn) {
  45049. return asyncArrowFn;
  45050. }
  45051. }
  45052. const typeArguments = this.tsParseTypeArgumentsInExpression();
  45053. if (!typeArguments)
  45054. return;
  45055. if (isOptionalCall && !this.match(10)) {
  45056. missingParenErrorLoc = this.state.curPosition();
  45057. return;
  45058. }
  45059. if (tokenIsTemplate(this.state.type)) {
  45060. const result2 = super.parseTaggedTemplateExpression(base2, startLoc, state);
  45061. result2.typeParameters = typeArguments;
  45062. return result2;
  45063. }
  45064. if (!noCalls && this.eat(10)) {
  45065. const node3 = this.startNodeAt(startLoc);
  45066. node3.callee = base2;
  45067. node3.arguments = this.parseCallExpressionArguments(11, false);
  45068. this.tsCheckForInvalidTypeCasts(node3.arguments);
  45069. node3.typeParameters = typeArguments;
  45070. if (state.optionalChainMember) {
  45071. node3.optional = isOptionalCall;
  45072. }
  45073. return this.finishCallExpression(node3, state.optionalChainMember);
  45074. }
  45075. const tokenType = this.state.type;
  45076. if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) {
  45077. return;
  45078. }
  45079. const node2 = this.startNodeAt(startLoc);
  45080. node2.expression = base2;
  45081. node2.typeParameters = typeArguments;
  45082. return this.finishNode(node2, "TSInstantiationExpression");
  45083. });
  45084. if (missingParenErrorLoc) {
  45085. this.unexpected(missingParenErrorLoc, 10);
  45086. }
  45087. if (result) {
  45088. if (result.type === "TSInstantiationExpression" && (this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40)) {
  45089. this.raise(TSErrors.InvalidPropertyAccessAfterInstantiationExpression, {
  45090. at: this.state.startLoc
  45091. });
  45092. }
  45093. return result;
  45094. }
  45095. }
  45096. return super.parseSubscript(base2, startLoc, noCalls, state);
  45097. }
  45098. parseNewCallee(node2) {
  45099. var _callee$extra;
  45100. super.parseNewCallee(node2);
  45101. const {
  45102. callee
  45103. } = node2;
  45104. if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) {
  45105. node2.typeParameters = callee.typeParameters;
  45106. node2.callee = callee.expression;
  45107. }
  45108. }
  45109. parseExprOp(left, leftStartLoc, minPrec) {
  45110. let isSatisfies;
  45111. if (tokenOperatorPrecedence(58) > minPrec && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (isSatisfies = this.isContextual(118)))) {
  45112. const node2 = this.startNodeAt(leftStartLoc);
  45113. node2.expression = left;
  45114. node2.typeAnnotation = this.tsInType(() => {
  45115. this.next();
  45116. if (this.match(75)) {
  45117. if (isSatisfies) {
  45118. this.raise(Errors.UnexpectedKeyword, {
  45119. at: this.state.startLoc,
  45120. keyword: "const"
  45121. });
  45122. }
  45123. return this.tsParseTypeReference();
  45124. }
  45125. return this.tsParseType();
  45126. });
  45127. this.finishNode(node2, isSatisfies ? "TSSatisfiesExpression" : "TSAsExpression");
  45128. this.reScan_lt_gt();
  45129. return this.parseExprOp(node2, leftStartLoc, minPrec);
  45130. }
  45131. return super.parseExprOp(left, leftStartLoc, minPrec);
  45132. }
  45133. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  45134. if (!this.state.isAmbientContext) {
  45135. super.checkReservedWord(word, startLoc, checkKeywords, isBinding);
  45136. }
  45137. }
  45138. checkImportReflection(node2) {
  45139. super.checkImportReflection(node2);
  45140. if (node2.module && node2.importKind !== "value") {
  45141. this.raise(TSErrors.ImportReflectionHasImportType, {
  45142. at: node2.specifiers[0].loc.start
  45143. });
  45144. }
  45145. }
  45146. checkDuplicateExports() {
  45147. }
  45148. parseImport(node2) {
  45149. node2.importKind = "value";
  45150. if (tokenIsIdentifier(this.state.type) || this.match(55) || this.match(5)) {
  45151. let ahead = this.lookahead();
  45152. if (this.isContextual(128) && ahead.type !== 12 && ahead.type !== 97 && ahead.type !== 29) {
  45153. node2.importKind = "type";
  45154. this.next();
  45155. ahead = this.lookahead();
  45156. }
  45157. if (tokenIsIdentifier(this.state.type) && ahead.type === 29) {
  45158. return this.tsParseImportEqualsDeclaration(node2);
  45159. }
  45160. }
  45161. const importNode = super.parseImport(node2);
  45162. if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
  45163. this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, {
  45164. at: importNode
  45165. });
  45166. }
  45167. return importNode;
  45168. }
  45169. parseExport(node2, decorators) {
  45170. if (this.match(83)) {
  45171. this.next();
  45172. if (this.isContextual(128) && this.lookaheadCharCode() !== 61) {
  45173. node2.importKind = "type";
  45174. this.next();
  45175. } else {
  45176. node2.importKind = "value";
  45177. }
  45178. return this.tsParseImportEqualsDeclaration(node2, true);
  45179. } else if (this.eat(29)) {
  45180. const assign = node2;
  45181. assign.expression = super.parseExpression();
  45182. this.semicolon();
  45183. return this.finishNode(assign, "TSExportAssignment");
  45184. } else if (this.eatContextual(93)) {
  45185. const decl = node2;
  45186. this.expectContextual(126);
  45187. decl.id = this.parseIdentifier();
  45188. this.semicolon();
  45189. return this.finishNode(decl, "TSNamespaceExportDeclaration");
  45190. } else {
  45191. node2.exportKind = "value";
  45192. if (this.isContextual(128)) {
  45193. const ch = this.lookaheadCharCode();
  45194. if (ch === 123 || ch === 42) {
  45195. this.next();
  45196. node2.exportKind = "type";
  45197. }
  45198. }
  45199. return super.parseExport(node2, decorators);
  45200. }
  45201. }
  45202. isAbstractClass() {
  45203. return this.isContextual(122) && this.lookahead().type === 80;
  45204. }
  45205. parseExportDefaultExpression() {
  45206. if (this.isAbstractClass()) {
  45207. const cls = this.startNode();
  45208. this.next();
  45209. cls.abstract = true;
  45210. return this.parseClass(cls, true, true);
  45211. }
  45212. if (this.match(127)) {
  45213. const result = this.tsParseInterfaceDeclaration(this.startNode());
  45214. if (result)
  45215. return result;
  45216. }
  45217. return super.parseExportDefaultExpression();
  45218. }
  45219. parseVarStatement(node2, kind, allowMissingInitializer = false) {
  45220. const {
  45221. isAmbientContext
  45222. } = this.state;
  45223. const declaration = super.parseVarStatement(node2, kind, allowMissingInitializer || isAmbientContext);
  45224. if (!isAmbientContext)
  45225. return declaration;
  45226. for (const {
  45227. id,
  45228. init
  45229. } of declaration.declarations) {
  45230. if (!init)
  45231. continue;
  45232. if (kind !== "const" || !!id.typeAnnotation) {
  45233. this.raise(TSErrors.InitializerNotAllowedInAmbientContext, {
  45234. at: init
  45235. });
  45236. } else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) {
  45237. this.raise(TSErrors.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference, {
  45238. at: init
  45239. });
  45240. }
  45241. }
  45242. return declaration;
  45243. }
  45244. parseStatementContent(flags, decorators) {
  45245. if (this.match(75) && this.isLookaheadContextual("enum")) {
  45246. const node2 = this.startNode();
  45247. this.expect(75);
  45248. return this.tsParseEnumDeclaration(node2, {
  45249. const: true
  45250. });
  45251. }
  45252. if (this.isContextual(124)) {
  45253. return this.tsParseEnumDeclaration(this.startNode());
  45254. }
  45255. if (this.isContextual(127)) {
  45256. const result = this.tsParseInterfaceDeclaration(this.startNode());
  45257. if (result)
  45258. return result;
  45259. }
  45260. return super.parseStatementContent(flags, decorators);
  45261. }
  45262. parseAccessModifier() {
  45263. return this.tsParseModifier(["public", "protected", "private"]);
  45264. }
  45265. tsHasSomeModifiers(member, modifiers) {
  45266. return modifiers.some((modifier) => {
  45267. if (tsIsAccessModifier(modifier)) {
  45268. return member.accessibility === modifier;
  45269. }
  45270. return !!member[modifier];
  45271. });
  45272. }
  45273. tsIsStartOfStaticBlocks() {
  45274. return this.isContextual(104) && this.lookaheadCharCode() === 123;
  45275. }
  45276. parseClassMember(classBody, member, state) {
  45277. const modifiers = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"];
  45278. this.tsParseModifiers({
  45279. allowedModifiers: modifiers,
  45280. disallowedModifiers: ["in", "out"],
  45281. stopOnStartOfClassStaticBlock: true,
  45282. errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions
  45283. }, member);
  45284. const callParseClassMemberWithIsStatic = () => {
  45285. if (this.tsIsStartOfStaticBlocks()) {
  45286. this.next();
  45287. this.next();
  45288. if (this.tsHasSomeModifiers(member, modifiers)) {
  45289. this.raise(TSErrors.StaticBlockCannotHaveModifier, {
  45290. at: this.state.curPosition()
  45291. });
  45292. }
  45293. super.parseClassStaticBlock(classBody, member);
  45294. } else {
  45295. this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static);
  45296. }
  45297. };
  45298. if (member.declare) {
  45299. this.tsInAmbientContext(callParseClassMemberWithIsStatic);
  45300. } else {
  45301. callParseClassMemberWithIsStatic();
  45302. }
  45303. }
  45304. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  45305. const idx = this.tsTryParseIndexSignature(member);
  45306. if (idx) {
  45307. classBody.body.push(idx);
  45308. if (member.abstract) {
  45309. this.raise(TSErrors.IndexSignatureHasAbstract, {
  45310. at: member
  45311. });
  45312. }
  45313. if (member.accessibility) {
  45314. this.raise(TSErrors.IndexSignatureHasAccessibility, {
  45315. at: member,
  45316. modifier: member.accessibility
  45317. });
  45318. }
  45319. if (member.declare) {
  45320. this.raise(TSErrors.IndexSignatureHasDeclare, {
  45321. at: member
  45322. });
  45323. }
  45324. if (member.override) {
  45325. this.raise(TSErrors.IndexSignatureHasOverride, {
  45326. at: member
  45327. });
  45328. }
  45329. return;
  45330. }
  45331. if (!this.state.inAbstractClass && member.abstract) {
  45332. this.raise(TSErrors.NonAbstractClassHasAbstractMethod, {
  45333. at: member
  45334. });
  45335. }
  45336. if (member.override) {
  45337. if (!state.hadSuperClass) {
  45338. this.raise(TSErrors.OverrideNotInSubClass, {
  45339. at: member
  45340. });
  45341. }
  45342. }
  45343. super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  45344. }
  45345. parsePostMemberNameModifiers(methodOrProp) {
  45346. const optional = this.eat(17);
  45347. if (optional)
  45348. methodOrProp.optional = true;
  45349. if (methodOrProp.readonly && this.match(10)) {
  45350. this.raise(TSErrors.ClassMethodHasReadonly, {
  45351. at: methodOrProp
  45352. });
  45353. }
  45354. if (methodOrProp.declare && this.match(10)) {
  45355. this.raise(TSErrors.ClassMethodHasDeclare, {
  45356. at: methodOrProp
  45357. });
  45358. }
  45359. }
  45360. parseExpressionStatement(node2, expr, decorators) {
  45361. const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node2, expr, decorators) : void 0;
  45362. return decl || super.parseExpressionStatement(node2, expr, decorators);
  45363. }
  45364. shouldParseExportDeclaration() {
  45365. if (this.tsIsDeclarationStart())
  45366. return true;
  45367. return super.shouldParseExportDeclaration();
  45368. }
  45369. parseConditional(expr, startLoc, refExpressionErrors) {
  45370. if (!this.state.maybeInArrowParameters || !this.match(17)) {
  45371. return super.parseConditional(expr, startLoc, refExpressionErrors);
  45372. }
  45373. const result = this.tryParse(() => super.parseConditional(expr, startLoc));
  45374. if (!result.node) {
  45375. if (result.error) {
  45376. super.setOptionalParametersError(refExpressionErrors, result.error);
  45377. }
  45378. return expr;
  45379. }
  45380. if (result.error)
  45381. this.state = result.failState;
  45382. return result.node;
  45383. }
  45384. parseParenItem(node2, startLoc) {
  45385. node2 = super.parseParenItem(node2, startLoc);
  45386. if (this.eat(17)) {
  45387. node2.optional = true;
  45388. this.resetEndLocation(node2);
  45389. }
  45390. if (this.match(14)) {
  45391. const typeCastNode = this.startNodeAt(startLoc);
  45392. typeCastNode.expression = node2;
  45393. typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
  45394. return this.finishNode(typeCastNode, "TSTypeCastExpression");
  45395. }
  45396. return node2;
  45397. }
  45398. parseExportDeclaration(node2) {
  45399. if (!this.state.isAmbientContext && this.isContextual(123)) {
  45400. return this.tsInAmbientContext(() => this.parseExportDeclaration(node2));
  45401. }
  45402. const startLoc = this.state.startLoc;
  45403. const isDeclare = this.eatContextual(123);
  45404. if (isDeclare && (this.isContextual(123) || !this.shouldParseExportDeclaration())) {
  45405. throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, {
  45406. at: this.state.startLoc
  45407. });
  45408. }
  45409. const isIdentifier3 = tokenIsIdentifier(this.state.type);
  45410. const declaration = isIdentifier3 && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(node2);
  45411. if (!declaration)
  45412. return null;
  45413. if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) {
  45414. node2.exportKind = "type";
  45415. }
  45416. if (isDeclare) {
  45417. this.resetStartLocation(declaration, startLoc);
  45418. declaration.declare = true;
  45419. }
  45420. return declaration;
  45421. }
  45422. parseClassId(node2, isStatement, optionalId, bindingType) {
  45423. if ((!isStatement || optionalId) && this.isContextual(111)) {
  45424. return;
  45425. }
  45426. super.parseClassId(node2, isStatement, optionalId, node2.declare ? BIND_TS_AMBIENT : BIND_CLASS);
  45427. const typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);
  45428. if (typeParameters)
  45429. node2.typeParameters = typeParameters;
  45430. }
  45431. parseClassPropertyAnnotation(node2) {
  45432. if (!node2.optional) {
  45433. if (this.eat(35)) {
  45434. node2.definite = true;
  45435. } else if (this.eat(17)) {
  45436. node2.optional = true;
  45437. }
  45438. }
  45439. const type = this.tsTryParseTypeAnnotation();
  45440. if (type)
  45441. node2.typeAnnotation = type;
  45442. }
  45443. parseClassProperty(node2) {
  45444. this.parseClassPropertyAnnotation(node2);
  45445. if (this.state.isAmbientContext && !(node2.readonly && !node2.typeAnnotation) && this.match(29)) {
  45446. this.raise(TSErrors.DeclareClassFieldHasInitializer, {
  45447. at: this.state.startLoc
  45448. });
  45449. }
  45450. if (node2.abstract && this.match(29)) {
  45451. const {
  45452. key: key2
  45453. } = node2;
  45454. this.raise(TSErrors.AbstractPropertyHasInitializer, {
  45455. at: this.state.startLoc,
  45456. propertyName: key2.type === "Identifier" && !node2.computed ? key2.name : `[${this.input.slice(key2.start, key2.end)}]`
  45457. });
  45458. }
  45459. return super.parseClassProperty(node2);
  45460. }
  45461. parseClassPrivateProperty(node2) {
  45462. if (node2.abstract) {
  45463. this.raise(TSErrors.PrivateElementHasAbstract, {
  45464. at: node2
  45465. });
  45466. }
  45467. if (node2.accessibility) {
  45468. this.raise(TSErrors.PrivateElementHasAccessibility, {
  45469. at: node2,
  45470. modifier: node2.accessibility
  45471. });
  45472. }
  45473. this.parseClassPropertyAnnotation(node2);
  45474. return super.parseClassPrivateProperty(node2);
  45475. }
  45476. parseClassAccessorProperty(node2) {
  45477. this.parseClassPropertyAnnotation(node2);
  45478. if (node2.optional) {
  45479. this.raise(TSErrors.AccessorCannotBeOptional, {
  45480. at: node2
  45481. });
  45482. }
  45483. return super.parseClassAccessorProperty(node2);
  45484. }
  45485. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  45486. const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier);
  45487. if (typeParameters && isConstructor) {
  45488. this.raise(TSErrors.ConstructorHasTypeParameters, {
  45489. at: typeParameters
  45490. });
  45491. }
  45492. const {
  45493. declare = false,
  45494. kind
  45495. } = method;
  45496. if (declare && (kind === "get" || kind === "set")) {
  45497. this.raise(TSErrors.DeclareAccessor, {
  45498. at: method,
  45499. kind
  45500. });
  45501. }
  45502. if (typeParameters)
  45503. method.typeParameters = typeParameters;
  45504. super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  45505. }
  45506. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  45507. const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier);
  45508. if (typeParameters)
  45509. method.typeParameters = typeParameters;
  45510. super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
  45511. }
  45512. declareClassPrivateMethodInScope(node2, kind) {
  45513. if (node2.type === "TSDeclareMethod")
  45514. return;
  45515. if (node2.type === "MethodDefinition" && !node2.value.body)
  45516. return;
  45517. super.declareClassPrivateMethodInScope(node2, kind);
  45518. }
  45519. parseClassSuper(node2) {
  45520. super.parseClassSuper(node2);
  45521. if (node2.superClass && (this.match(47) || this.match(51))) {
  45522. node2.superTypeParameters = this.tsParseTypeArgumentsInExpression();
  45523. }
  45524. if (this.eatContextual(111)) {
  45525. node2.implements = this.tsParseHeritageClause("implements");
  45526. }
  45527. }
  45528. parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  45529. const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier);
  45530. if (typeParameters)
  45531. prop.typeParameters = typeParameters;
  45532. return super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  45533. }
  45534. parseFunctionParams(node2, isConstructor) {
  45535. const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier);
  45536. if (typeParameters)
  45537. node2.typeParameters = typeParameters;
  45538. super.parseFunctionParams(node2, isConstructor);
  45539. }
  45540. parseVarId(decl, kind) {
  45541. super.parseVarId(decl, kind);
  45542. if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35)) {
  45543. decl.definite = true;
  45544. }
  45545. const type = this.tsTryParseTypeAnnotation();
  45546. if (type) {
  45547. decl.id.typeAnnotation = type;
  45548. this.resetEndLocation(decl.id);
  45549. }
  45550. }
  45551. parseAsyncArrowFromCallExpression(node2, call) {
  45552. if (this.match(14)) {
  45553. node2.returnType = this.tsParseTypeAnnotation();
  45554. }
  45555. return super.parseAsyncArrowFromCallExpression(node2, call);
  45556. }
  45557. parseMaybeAssign(refExpressionErrors, afterLeftParse) {
  45558. var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3;
  45559. let state;
  45560. let jsx3;
  45561. let typeCast;
  45562. if (this.hasPlugin("jsx") && (this.match(140) || this.match(47))) {
  45563. state = this.state.clone();
  45564. jsx3 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state);
  45565. if (!jsx3.error)
  45566. return jsx3.node;
  45567. const {
  45568. context
  45569. } = this.state;
  45570. const currentContext = context[context.length - 1];
  45571. if (currentContext === types3.j_oTag || currentContext === types3.j_expr) {
  45572. context.pop();
  45573. }
  45574. }
  45575. if (!((_jsx = jsx3) != null && _jsx.error) && !this.match(47)) {
  45576. return super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  45577. }
  45578. if (!state || state === this.state)
  45579. state = this.state.clone();
  45580. let typeParameters;
  45581. const arrow = this.tryParse((abort) => {
  45582. var _expr$extra, _typeParameters;
  45583. typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier);
  45584. const expr = super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  45585. if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) {
  45586. abort();
  45587. }
  45588. if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
  45589. this.resetStartLocationFromNode(expr, typeParameters);
  45590. }
  45591. expr.typeParameters = typeParameters;
  45592. return expr;
  45593. }, state);
  45594. if (!arrow.error && !arrow.aborted) {
  45595. if (typeParameters)
  45596. this.reportReservedArrowTypeParam(typeParameters);
  45597. return arrow.node;
  45598. }
  45599. if (!jsx3) {
  45600. assert(!this.hasPlugin("jsx"));
  45601. typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state);
  45602. if (!typeCast.error)
  45603. return typeCast.node;
  45604. }
  45605. if ((_jsx2 = jsx3) != null && _jsx2.node) {
  45606. this.state = jsx3.failState;
  45607. return jsx3.node;
  45608. }
  45609. if (arrow.node) {
  45610. this.state = arrow.failState;
  45611. if (typeParameters)
  45612. this.reportReservedArrowTypeParam(typeParameters);
  45613. return arrow.node;
  45614. }
  45615. if ((_typeCast = typeCast) != null && _typeCast.node) {
  45616. this.state = typeCast.failState;
  45617. return typeCast.node;
  45618. }
  45619. if ((_jsx3 = jsx3) != null && _jsx3.thrown)
  45620. throw jsx3.error;
  45621. if (arrow.thrown)
  45622. throw arrow.error;
  45623. if ((_typeCast2 = typeCast) != null && _typeCast2.thrown)
  45624. throw typeCast.error;
  45625. throw ((_jsx4 = jsx3) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
  45626. }
  45627. reportReservedArrowTypeParam(node2) {
  45628. var _node$extra;
  45629. if (node2.params.length === 1 && !node2.params[0].constraint && !((_node$extra = node2.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) {
  45630. this.raise(TSErrors.ReservedArrowTypeParam, {
  45631. at: node2
  45632. });
  45633. }
  45634. }
  45635. parseMaybeUnary(refExpressionErrors, sawUnary) {
  45636. if (!this.hasPlugin("jsx") && this.match(47)) {
  45637. return this.tsParseTypeAssertion();
  45638. } else {
  45639. return super.parseMaybeUnary(refExpressionErrors, sawUnary);
  45640. }
  45641. }
  45642. parseArrow(node2) {
  45643. if (this.match(14)) {
  45644. const result = this.tryParse((abort) => {
  45645. const returnType = this.tsParseTypeOrTypePredicateAnnotation(14);
  45646. if (this.canInsertSemicolon() || !this.match(19))
  45647. abort();
  45648. return returnType;
  45649. });
  45650. if (result.aborted)
  45651. return;
  45652. if (!result.thrown) {
  45653. if (result.error)
  45654. this.state = result.failState;
  45655. node2.returnType = result.node;
  45656. }
  45657. }
  45658. return super.parseArrow(node2);
  45659. }
  45660. parseAssignableListItemTypes(param, flags) {
  45661. if (!(flags & 2))
  45662. return param;
  45663. if (this.eat(17)) {
  45664. param.optional = true;
  45665. }
  45666. const type = this.tsTryParseTypeAnnotation();
  45667. if (type)
  45668. param.typeAnnotation = type;
  45669. this.resetEndLocation(param);
  45670. return param;
  45671. }
  45672. isAssignable(node2, isBinding) {
  45673. switch (node2.type) {
  45674. case "TSTypeCastExpression":
  45675. return this.isAssignable(node2.expression, isBinding);
  45676. case "TSParameterProperty":
  45677. return true;
  45678. default:
  45679. return super.isAssignable(node2, isBinding);
  45680. }
  45681. }
  45682. toAssignable(node2, isLHS = false) {
  45683. switch (node2.type) {
  45684. case "ParenthesizedExpression":
  45685. this.toAssignableParenthesizedExpression(node2, isLHS);
  45686. break;
  45687. case "TSAsExpression":
  45688. case "TSSatisfiesExpression":
  45689. case "TSNonNullExpression":
  45690. case "TSTypeAssertion":
  45691. if (isLHS) {
  45692. this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter, {
  45693. at: node2
  45694. });
  45695. } else {
  45696. this.raise(TSErrors.UnexpectedTypeCastInParameter, {
  45697. at: node2
  45698. });
  45699. }
  45700. this.toAssignable(node2.expression, isLHS);
  45701. break;
  45702. case "AssignmentExpression":
  45703. if (!isLHS && node2.left.type === "TSTypeCastExpression") {
  45704. node2.left = this.typeCastToParameter(node2.left);
  45705. }
  45706. default:
  45707. super.toAssignable(node2, isLHS);
  45708. }
  45709. }
  45710. toAssignableParenthesizedExpression(node2, isLHS) {
  45711. switch (node2.expression.type) {
  45712. case "TSAsExpression":
  45713. case "TSSatisfiesExpression":
  45714. case "TSNonNullExpression":
  45715. case "TSTypeAssertion":
  45716. case "ParenthesizedExpression":
  45717. this.toAssignable(node2.expression, isLHS);
  45718. break;
  45719. default:
  45720. super.toAssignable(node2, isLHS);
  45721. }
  45722. }
  45723. checkToRestConversion(node2, allowPattern) {
  45724. switch (node2.type) {
  45725. case "TSAsExpression":
  45726. case "TSSatisfiesExpression":
  45727. case "TSTypeAssertion":
  45728. case "TSNonNullExpression":
  45729. this.checkToRestConversion(node2.expression, false);
  45730. break;
  45731. default:
  45732. super.checkToRestConversion(node2, allowPattern);
  45733. }
  45734. }
  45735. isValidLVal(type, isUnparenthesizedInAssign, binding) {
  45736. return getOwn({
  45737. TSTypeCastExpression: true,
  45738. TSParameterProperty: "parameter",
  45739. TSNonNullExpression: "expression",
  45740. TSAsExpression: (binding !== BIND_NONE3 || !isUnparenthesizedInAssign) && ["expression", true],
  45741. TSSatisfiesExpression: (binding !== BIND_NONE3 || !isUnparenthesizedInAssign) && ["expression", true],
  45742. TSTypeAssertion: (binding !== BIND_NONE3 || !isUnparenthesizedInAssign) && ["expression", true]
  45743. }, type) || super.isValidLVal(type, isUnparenthesizedInAssign, binding);
  45744. }
  45745. parseBindingAtom() {
  45746. switch (this.state.type) {
  45747. case 78:
  45748. return this.parseIdentifier(true);
  45749. default:
  45750. return super.parseBindingAtom();
  45751. }
  45752. }
  45753. parseMaybeDecoratorArguments(expr) {
  45754. if (this.match(47) || this.match(51)) {
  45755. const typeArguments = this.tsParseTypeArgumentsInExpression();
  45756. if (this.match(10)) {
  45757. const call = super.parseMaybeDecoratorArguments(expr);
  45758. call.typeParameters = typeArguments;
  45759. return call;
  45760. }
  45761. this.unexpected(null, 10);
  45762. }
  45763. return super.parseMaybeDecoratorArguments(expr);
  45764. }
  45765. checkCommaAfterRest(close) {
  45766. if (this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === close) {
  45767. this.next();
  45768. return false;
  45769. } else {
  45770. return super.checkCommaAfterRest(close);
  45771. }
  45772. }
  45773. isClassMethod() {
  45774. return this.match(47) || super.isClassMethod();
  45775. }
  45776. isClassProperty() {
  45777. return this.match(35) || this.match(14) || super.isClassProperty();
  45778. }
  45779. parseMaybeDefault(startLoc, left) {
  45780. const node2 = super.parseMaybeDefault(startLoc, left);
  45781. if (node2.type === "AssignmentPattern" && node2.typeAnnotation && node2.right.start < node2.typeAnnotation.start) {
  45782. this.raise(TSErrors.TypeAnnotationAfterAssign, {
  45783. at: node2.typeAnnotation
  45784. });
  45785. }
  45786. return node2;
  45787. }
  45788. getTokenFromCode(code2) {
  45789. if (this.state.inType) {
  45790. if (code2 === 62) {
  45791. this.finishOp(48, 1);
  45792. return;
  45793. }
  45794. if (code2 === 60) {
  45795. this.finishOp(47, 1);
  45796. return;
  45797. }
  45798. }
  45799. super.getTokenFromCode(code2);
  45800. }
  45801. reScan_lt_gt() {
  45802. const {
  45803. type
  45804. } = this.state;
  45805. if (type === 47) {
  45806. this.state.pos -= 1;
  45807. this.readToken_lt();
  45808. } else if (type === 48) {
  45809. this.state.pos -= 1;
  45810. this.readToken_gt();
  45811. }
  45812. }
  45813. reScan_lt() {
  45814. const {
  45815. type
  45816. } = this.state;
  45817. if (type === 51) {
  45818. this.state.pos -= 2;
  45819. this.finishOp(47, 1);
  45820. return 47;
  45821. }
  45822. return type;
  45823. }
  45824. toAssignableList(exprList, trailingCommaLoc, isLHS) {
  45825. for (let i = 0; i < exprList.length; i++) {
  45826. const expr = exprList[i];
  45827. if ((expr == null ? void 0 : expr.type) === "TSTypeCastExpression") {
  45828. exprList[i] = this.typeCastToParameter(expr);
  45829. }
  45830. }
  45831. super.toAssignableList(exprList, trailingCommaLoc, isLHS);
  45832. }
  45833. typeCastToParameter(node2) {
  45834. node2.expression.typeAnnotation = node2.typeAnnotation;
  45835. this.resetEndLocation(node2.expression, node2.typeAnnotation.loc.end);
  45836. return node2.expression;
  45837. }
  45838. shouldParseArrow(params) {
  45839. if (this.match(14)) {
  45840. return params.every((expr) => this.isAssignable(expr, true));
  45841. }
  45842. return super.shouldParseArrow(params);
  45843. }
  45844. shouldParseAsyncArrow() {
  45845. return this.match(14) || super.shouldParseAsyncArrow();
  45846. }
  45847. canHaveLeadingDecorator() {
  45848. return super.canHaveLeadingDecorator() || this.isAbstractClass();
  45849. }
  45850. jsxParseOpeningElementAfterName(node2) {
  45851. if (this.match(47) || this.match(51)) {
  45852. const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression());
  45853. if (typeArguments)
  45854. node2.typeParameters = typeArguments;
  45855. }
  45856. return super.jsxParseOpeningElementAfterName(node2);
  45857. }
  45858. getGetterSetterExpectedParamCount(method) {
  45859. const baseCount = super.getGetterSetterExpectedParamCount(method);
  45860. const params = this.getObjectOrClassMethodParams(method);
  45861. const firstParam = params[0];
  45862. const hasContextParam = firstParam && this.isThisParam(firstParam);
  45863. return hasContextParam ? baseCount + 1 : baseCount;
  45864. }
  45865. parseCatchClauseParam() {
  45866. const param = super.parseCatchClauseParam();
  45867. const type = this.tsTryParseTypeAnnotation();
  45868. if (type) {
  45869. param.typeAnnotation = type;
  45870. this.resetEndLocation(param);
  45871. }
  45872. return param;
  45873. }
  45874. tsInAmbientContext(cb) {
  45875. const oldIsAmbientContext = this.state.isAmbientContext;
  45876. this.state.isAmbientContext = true;
  45877. try {
  45878. return cb();
  45879. } finally {
  45880. this.state.isAmbientContext = oldIsAmbientContext;
  45881. }
  45882. }
  45883. parseClass(node2, isStatement, optionalId) {
  45884. const oldInAbstractClass = this.state.inAbstractClass;
  45885. this.state.inAbstractClass = !!node2.abstract;
  45886. try {
  45887. return super.parseClass(node2, isStatement, optionalId);
  45888. } finally {
  45889. this.state.inAbstractClass = oldInAbstractClass;
  45890. }
  45891. }
  45892. tsParseAbstractDeclaration(node2, decorators) {
  45893. if (this.match(80)) {
  45894. node2.abstract = true;
  45895. return this.maybeTakeDecorators(decorators, this.parseClass(node2, true, false));
  45896. } else if (this.isContextual(127)) {
  45897. if (!this.hasFollowingLineBreak()) {
  45898. node2.abstract = true;
  45899. this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, {
  45900. at: node2
  45901. });
  45902. return this.tsParseInterfaceDeclaration(node2);
  45903. }
  45904. } else {
  45905. this.unexpected(null, 80);
  45906. }
  45907. }
  45908. parseMethod(node2, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
  45909. const method = super.parseMethod(node2, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  45910. if (method.abstract) {
  45911. const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body;
  45912. if (hasBody) {
  45913. const {
  45914. key: key2
  45915. } = method;
  45916. this.raise(TSErrors.AbstractMethodHasImplementation, {
  45917. at: method,
  45918. methodName: key2.type === "Identifier" && !method.computed ? key2.name : `[${this.input.slice(key2.start, key2.end)}]`
  45919. });
  45920. }
  45921. }
  45922. return method;
  45923. }
  45924. tsParseTypeParameterName() {
  45925. const typeName = this.parseIdentifier();
  45926. return typeName.name;
  45927. }
  45928. shouldParseAsAmbientContext() {
  45929. return !!this.getPluginOption("typescript", "dts");
  45930. }
  45931. parse() {
  45932. if (this.shouldParseAsAmbientContext()) {
  45933. this.state.isAmbientContext = true;
  45934. }
  45935. return super.parse();
  45936. }
  45937. getExpression() {
  45938. if (this.shouldParseAsAmbientContext()) {
  45939. this.state.isAmbientContext = true;
  45940. }
  45941. return super.getExpression();
  45942. }
  45943. parseExportSpecifier(node2, isString, isInTypeExport, isMaybeTypeOnly) {
  45944. if (!isString && isMaybeTypeOnly) {
  45945. this.parseTypeOnlyImportExportSpecifier(node2, false, isInTypeExport);
  45946. return this.finishNode(node2, "ExportSpecifier");
  45947. }
  45948. node2.exportKind = "value";
  45949. return super.parseExportSpecifier(node2, isString, isInTypeExport, isMaybeTypeOnly);
  45950. }
  45951. parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) {
  45952. if (!importedIsString && isMaybeTypeOnly) {
  45953. this.parseTypeOnlyImportExportSpecifier(specifier, true, isInTypeOnlyImport);
  45954. return this.finishNode(specifier, "ImportSpecifier");
  45955. }
  45956. specifier.importKind = "value";
  45957. return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, isInTypeOnlyImport ? BIND_TS_TYPE_IMPORT : BIND_FLAGS_TS_IMPORT);
  45958. }
  45959. parseTypeOnlyImportExportSpecifier(node2, isImport, isInTypeOnlyImportExport) {
  45960. const leftOfAsKey = isImport ? "imported" : "local";
  45961. const rightOfAsKey = isImport ? "local" : "exported";
  45962. let leftOfAs = node2[leftOfAsKey];
  45963. let rightOfAs;
  45964. let hasTypeSpecifier = false;
  45965. let canParseAsKeyword = true;
  45966. const loc = leftOfAs.loc.start;
  45967. if (this.isContextual(93)) {
  45968. const firstAs = this.parseIdentifier();
  45969. if (this.isContextual(93)) {
  45970. const secondAs = this.parseIdentifier();
  45971. if (tokenIsKeywordOrIdentifier(this.state.type)) {
  45972. hasTypeSpecifier = true;
  45973. leftOfAs = firstAs;
  45974. rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName();
  45975. canParseAsKeyword = false;
  45976. } else {
  45977. rightOfAs = secondAs;
  45978. canParseAsKeyword = false;
  45979. }
  45980. } else if (tokenIsKeywordOrIdentifier(this.state.type)) {
  45981. canParseAsKeyword = false;
  45982. rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName();
  45983. } else {
  45984. hasTypeSpecifier = true;
  45985. leftOfAs = firstAs;
  45986. }
  45987. } else if (tokenIsKeywordOrIdentifier(this.state.type)) {
  45988. hasTypeSpecifier = true;
  45989. if (isImport) {
  45990. leftOfAs = this.parseIdentifier(true);
  45991. if (!this.isContextual(93)) {
  45992. this.checkReservedWord(leftOfAs.name, leftOfAs.loc.start, true, true);
  45993. }
  45994. } else {
  45995. leftOfAs = this.parseModuleExportName();
  45996. }
  45997. }
  45998. if (hasTypeSpecifier && isInTypeOnlyImportExport) {
  45999. this.raise(isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports, {
  46000. at: loc
  46001. });
  46002. }
  46003. node2[leftOfAsKey] = leftOfAs;
  46004. node2[rightOfAsKey] = rightOfAs;
  46005. const kindKey = isImport ? "importKind" : "exportKind";
  46006. node2[kindKey] = hasTypeSpecifier ? "type" : "value";
  46007. if (canParseAsKeyword && this.eatContextual(93)) {
  46008. node2[rightOfAsKey] = isImport ? this.parseIdentifier() : this.parseModuleExportName();
  46009. }
  46010. if (!node2[rightOfAsKey]) {
  46011. node2[rightOfAsKey] = cloneIdentifier(node2[leftOfAsKey]);
  46012. }
  46013. if (isImport) {
  46014. this.checkIdentifier(node2[rightOfAsKey], hasTypeSpecifier ? BIND_TS_TYPE_IMPORT : BIND_FLAGS_TS_IMPORT);
  46015. }
  46016. }
  46017. };
  46018. function isPossiblyLiteralEnum(expression) {
  46019. if (expression.type !== "MemberExpression")
  46020. return false;
  46021. const {
  46022. computed,
  46023. property
  46024. } = expression;
  46025. if (computed && property.type !== "StringLiteral" && (property.type !== "TemplateLiteral" || property.expressions.length > 0)) {
  46026. return false;
  46027. }
  46028. return isUncomputedMemberExpressionChain(expression.object);
  46029. }
  46030. function isValidAmbientConstInitializer(expression, estree2) {
  46031. var _expression$extra;
  46032. const {
  46033. type
  46034. } = expression;
  46035. if ((_expression$extra = expression.extra) != null && _expression$extra.parenthesized) {
  46036. return false;
  46037. }
  46038. if (estree2) {
  46039. if (type === "Literal") {
  46040. const {
  46041. value: value2
  46042. } = expression;
  46043. if (typeof value2 === "string" || typeof value2 === "boolean") {
  46044. return true;
  46045. }
  46046. }
  46047. } else {
  46048. if (type === "StringLiteral" || type === "BooleanLiteral") {
  46049. return true;
  46050. }
  46051. }
  46052. if (isNumber(expression, estree2) || isNegativeNumber(expression, estree2)) {
  46053. return true;
  46054. }
  46055. if (type === "TemplateLiteral" && expression.expressions.length === 0) {
  46056. return true;
  46057. }
  46058. if (isPossiblyLiteralEnum(expression)) {
  46059. return true;
  46060. }
  46061. return false;
  46062. }
  46063. function isNumber(expression, estree2) {
  46064. if (estree2) {
  46065. return expression.type === "Literal" && (typeof expression.value === "number" || "bigint" in expression);
  46066. } else {
  46067. return expression.type === "NumericLiteral" || expression.type === "BigIntLiteral";
  46068. }
  46069. }
  46070. function isNegativeNumber(expression, estree2) {
  46071. if (expression.type === "UnaryExpression") {
  46072. const {
  46073. operator,
  46074. argument
  46075. } = expression;
  46076. if (operator === "-" && isNumber(argument, estree2)) {
  46077. return true;
  46078. }
  46079. }
  46080. return false;
  46081. }
  46082. function isUncomputedMemberExpressionChain(expression) {
  46083. if (expression.type === "Identifier")
  46084. return true;
  46085. if (expression.type !== "MemberExpression")
  46086. return false;
  46087. if (expression.computed)
  46088. return false;
  46089. return isUncomputedMemberExpressionChain(expression.object);
  46090. }
  46091. var PlaceholderErrors = ParseErrorEnum`placeholders`({
  46092. ClassNameIsRequired: "A class name is required.",
  46093. UnexpectedSpace: "Unexpected space in placeholder."
  46094. });
  46095. var placeholders = (superClass) => class PlaceholdersParserMixin extends superClass {
  46096. parsePlaceholder(expectedNode) {
  46097. if (this.match(142)) {
  46098. const node2 = this.startNode();
  46099. this.next();
  46100. this.assertNoSpace();
  46101. node2.name = super.parseIdentifier(true);
  46102. this.assertNoSpace();
  46103. this.expect(142);
  46104. return this.finishPlaceholder(node2, expectedNode);
  46105. }
  46106. }
  46107. finishPlaceholder(node2, expectedNode) {
  46108. const isFinished = !!(node2.expectedNode && node2.type === "Placeholder");
  46109. node2.expectedNode = expectedNode;
  46110. return isFinished ? node2 : this.finishNode(node2, "Placeholder");
  46111. }
  46112. getTokenFromCode(code2) {
  46113. if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
  46114. this.finishOp(142, 2);
  46115. } else {
  46116. super.getTokenFromCode(code2);
  46117. }
  46118. }
  46119. parseExprAtom(refExpressionErrors) {
  46120. return this.parsePlaceholder("Expression") || super.parseExprAtom(refExpressionErrors);
  46121. }
  46122. parseIdentifier(liberal) {
  46123. return this.parsePlaceholder("Identifier") || super.parseIdentifier(liberal);
  46124. }
  46125. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  46126. if (word !== void 0) {
  46127. super.checkReservedWord(word, startLoc, checkKeywords, isBinding);
  46128. }
  46129. }
  46130. parseBindingAtom() {
  46131. return this.parsePlaceholder("Pattern") || super.parseBindingAtom();
  46132. }
  46133. isValidLVal(type, isParenthesized, binding) {
  46134. return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding);
  46135. }
  46136. toAssignable(node2, isLHS) {
  46137. if (node2 && node2.type === "Placeholder" && node2.expectedNode === "Expression") {
  46138. node2.expectedNode = "Pattern";
  46139. } else {
  46140. super.toAssignable(node2, isLHS);
  46141. }
  46142. }
  46143. chStartsBindingIdentifier(ch, pos2) {
  46144. if (super.chStartsBindingIdentifier(ch, pos2)) {
  46145. return true;
  46146. }
  46147. const nextToken = this.lookahead();
  46148. if (nextToken.type === 142) {
  46149. return true;
  46150. }
  46151. return false;
  46152. }
  46153. verifyBreakContinue(node2, isBreak) {
  46154. if (node2.label && node2.label.type === "Placeholder")
  46155. return;
  46156. super.verifyBreakContinue(node2, isBreak);
  46157. }
  46158. parseExpressionStatement(node2, expr) {
  46159. if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
  46160. return super.parseExpressionStatement(node2, expr);
  46161. }
  46162. if (this.match(14)) {
  46163. const stmt = node2;
  46164. stmt.label = this.finishPlaceholder(expr, "Identifier");
  46165. this.next();
  46166. stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration();
  46167. return this.finishNode(stmt, "LabeledStatement");
  46168. }
  46169. this.semicolon();
  46170. node2.name = expr.name;
  46171. return this.finishPlaceholder(node2, "Statement");
  46172. }
  46173. parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse) {
  46174. return this.parsePlaceholder("BlockStatement") || super.parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse);
  46175. }
  46176. parseFunctionId(requireId) {
  46177. return this.parsePlaceholder("Identifier") || super.parseFunctionId(requireId);
  46178. }
  46179. parseClass(node2, isStatement, optionalId) {
  46180. const type = isStatement ? "ClassDeclaration" : "ClassExpression";
  46181. this.next();
  46182. const oldStrict = this.state.strict;
  46183. const placeholder = this.parsePlaceholder("Identifier");
  46184. if (placeholder) {
  46185. if (this.match(81) || this.match(142) || this.match(5)) {
  46186. node2.id = placeholder;
  46187. } else if (optionalId || !isStatement) {
  46188. node2.id = null;
  46189. node2.body = this.finishPlaceholder(placeholder, "ClassBody");
  46190. return this.finishNode(node2, type);
  46191. } else {
  46192. throw this.raise(PlaceholderErrors.ClassNameIsRequired, {
  46193. at: this.state.startLoc
  46194. });
  46195. }
  46196. } else {
  46197. this.parseClassId(node2, isStatement, optionalId);
  46198. }
  46199. super.parseClassSuper(node2);
  46200. node2.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!node2.superClass, oldStrict);
  46201. return this.finishNode(node2, type);
  46202. }
  46203. parseExport(node2, decorators) {
  46204. const placeholder = this.parsePlaceholder("Identifier");
  46205. if (!placeholder)
  46206. return super.parseExport(node2, decorators);
  46207. if (!this.isContextual(97) && !this.match(12)) {
  46208. node2.specifiers = [];
  46209. node2.source = null;
  46210. node2.declaration = this.finishPlaceholder(placeholder, "Declaration");
  46211. return this.finishNode(node2, "ExportNamedDeclaration");
  46212. }
  46213. this.expectPlugin("exportDefaultFrom");
  46214. const specifier = this.startNode();
  46215. specifier.exported = placeholder;
  46216. node2.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  46217. return super.parseExport(node2, decorators);
  46218. }
  46219. isExportDefaultSpecifier() {
  46220. if (this.match(65)) {
  46221. const next = this.nextTokenStart();
  46222. if (this.isUnparsedContextual(next, "from")) {
  46223. if (this.input.startsWith(tokenLabelName(142), this.nextTokenStartSince(next + 4))) {
  46224. return true;
  46225. }
  46226. }
  46227. }
  46228. return super.isExportDefaultSpecifier();
  46229. }
  46230. maybeParseExportDefaultSpecifier(node2) {
  46231. if (node2.specifiers && node2.specifiers.length > 0) {
  46232. return true;
  46233. }
  46234. return super.maybeParseExportDefaultSpecifier(node2);
  46235. }
  46236. checkExport(node2) {
  46237. const {
  46238. specifiers
  46239. } = node2;
  46240. if (specifiers != null && specifiers.length) {
  46241. node2.specifiers = specifiers.filter((node3) => node3.exported.type === "Placeholder");
  46242. }
  46243. super.checkExport(node2);
  46244. node2.specifiers = specifiers;
  46245. }
  46246. parseImport(node2) {
  46247. const placeholder = this.parsePlaceholder("Identifier");
  46248. if (!placeholder)
  46249. return super.parseImport(node2);
  46250. node2.specifiers = [];
  46251. if (!this.isContextual(97) && !this.match(12)) {
  46252. node2.source = this.finishPlaceholder(placeholder, "StringLiteral");
  46253. this.semicolon();
  46254. return this.finishNode(node2, "ImportDeclaration");
  46255. }
  46256. const specifier = this.startNodeAtNode(placeholder);
  46257. specifier.local = placeholder;
  46258. node2.specifiers.push(this.finishNode(specifier, "ImportDefaultSpecifier"));
  46259. if (this.eat(12)) {
  46260. const hasStarImport = this.maybeParseStarImportSpecifier(node2);
  46261. if (!hasStarImport)
  46262. this.parseNamedImportSpecifiers(node2);
  46263. }
  46264. this.expectContextual(97);
  46265. node2.source = this.parseImportSource();
  46266. this.semicolon();
  46267. return this.finishNode(node2, "ImportDeclaration");
  46268. }
  46269. parseImportSource() {
  46270. return this.parsePlaceholder("StringLiteral") || super.parseImportSource();
  46271. }
  46272. assertNoSpace() {
  46273. if (this.state.start > this.state.lastTokEndLoc.index) {
  46274. this.raise(PlaceholderErrors.UnexpectedSpace, {
  46275. at: this.state.lastTokEndLoc
  46276. });
  46277. }
  46278. }
  46279. };
  46280. var v8intrinsic = (superClass) => class V8IntrinsicMixin extends superClass {
  46281. parseV8Intrinsic() {
  46282. if (this.match(54)) {
  46283. const v8IntrinsicStartLoc = this.state.startLoc;
  46284. const node2 = this.startNode();
  46285. this.next();
  46286. if (tokenIsIdentifier(this.state.type)) {
  46287. const name2 = this.parseIdentifierName();
  46288. const identifier = this.createIdentifier(node2, name2);
  46289. identifier.type = "V8IntrinsicIdentifier";
  46290. if (this.match(10)) {
  46291. return identifier;
  46292. }
  46293. }
  46294. this.unexpected(v8IntrinsicStartLoc);
  46295. }
  46296. }
  46297. parseExprAtom(refExpressionErrors) {
  46298. return this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors);
  46299. }
  46300. };
  46301. function hasPlugin(plugins, expectedConfig) {
  46302. const [expectedName, expectedOptions] = typeof expectedConfig === "string" ? [expectedConfig, {}] : expectedConfig;
  46303. const expectedKeys = Object.keys(expectedOptions);
  46304. const expectedOptionsIsEmpty = expectedKeys.length === 0;
  46305. return plugins.some((p) => {
  46306. if (typeof p === "string") {
  46307. return expectedOptionsIsEmpty && p === expectedName;
  46308. } else {
  46309. const [pluginName, pluginOptions] = p;
  46310. if (pluginName !== expectedName) {
  46311. return false;
  46312. }
  46313. for (const key2 of expectedKeys) {
  46314. if (pluginOptions[key2] !== expectedOptions[key2]) {
  46315. return false;
  46316. }
  46317. }
  46318. return true;
  46319. }
  46320. });
  46321. }
  46322. function getPluginOption(plugins, name2, option) {
  46323. const plugin2 = plugins.find((plugin3) => {
  46324. if (Array.isArray(plugin3)) {
  46325. return plugin3[0] === name2;
  46326. } else {
  46327. return plugin3 === name2;
  46328. }
  46329. });
  46330. if (plugin2 && Array.isArray(plugin2) && plugin2.length > 1) {
  46331. return plugin2[1][option];
  46332. }
  46333. return null;
  46334. }
  46335. var PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"];
  46336. var TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"];
  46337. var RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
  46338. function validatePlugins(plugins) {
  46339. if (hasPlugin(plugins, "decorators")) {
  46340. if (hasPlugin(plugins, "decorators-legacy")) {
  46341. throw new Error("Cannot use the decorators and decorators-legacy plugin together");
  46342. }
  46343. const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
  46344. if (decoratorsBeforeExport != null && typeof decoratorsBeforeExport !== "boolean") {
  46345. throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");
  46346. }
  46347. const allowCallParenthesized = getPluginOption(plugins, "decorators", "allowCallParenthesized");
  46348. if (allowCallParenthesized != null && typeof allowCallParenthesized !== "boolean") {
  46349. throw new Error("'allowCallParenthesized' must be a boolean.");
  46350. }
  46351. }
  46352. if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
  46353. throw new Error("Cannot combine flow and typescript plugins.");
  46354. }
  46355. if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
  46356. throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
  46357. }
  46358. if (hasPlugin(plugins, "pipelineOperator")) {
  46359. const proposal = getPluginOption(plugins, "pipelineOperator", "proposal");
  46360. if (!PIPELINE_PROPOSALS.includes(proposal)) {
  46361. const proposalList = PIPELINE_PROPOSALS.map((p) => `"${p}"`).join(", ");
  46362. throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`);
  46363. }
  46364. const tupleSyntaxIsHash = hasPlugin(plugins, ["recordAndTuple", {
  46365. syntaxType: "hash"
  46366. }]);
  46367. if (proposal === "hack") {
  46368. if (hasPlugin(plugins, "placeholders")) {
  46369. throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
  46370. }
  46371. if (hasPlugin(plugins, "v8intrinsic")) {
  46372. throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");
  46373. }
  46374. const topicToken = getPluginOption(plugins, "pipelineOperator", "topicToken");
  46375. if (!TOPIC_TOKENS.includes(topicToken)) {
  46376. const tokenList = TOPIC_TOKENS.map((t3) => `"${t3}"`).join(", ");
  46377. throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`);
  46378. }
  46379. if (topicToken === "#" && tupleSyntaxIsHash) {
  46380. throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.');
  46381. }
  46382. } else if (proposal === "smart" && tupleSyntaxIsHash) {
  46383. throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.');
  46384. }
  46385. }
  46386. if (hasPlugin(plugins, "moduleAttributes")) {
  46387. {
  46388. if (hasPlugin(plugins, "importAssertions")) {
  46389. throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
  46390. }
  46391. const moduleAttributesVersionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
  46392. if (moduleAttributesVersionPluginOption !== "may-2020") {
  46393. throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
  46394. }
  46395. }
  46396. }
  46397. if (hasPlugin(plugins, "recordAndTuple") && getPluginOption(plugins, "recordAndTuple", "syntaxType") != null && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
  46398. throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
  46399. }
  46400. if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
  46401. const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
  46402. error.missingPlugins = "doExpressions";
  46403. throw error;
  46404. }
  46405. }
  46406. var mixinPlugins = {
  46407. estree,
  46408. jsx: jsx2,
  46409. flow: flow3,
  46410. typescript,
  46411. v8intrinsic,
  46412. placeholders
  46413. };
  46414. var mixinPluginNames = Object.keys(mixinPlugins);
  46415. var ExpressionParser = class extends LValParser {
  46416. checkProto(prop, isRecord, protoRef, refExpressionErrors) {
  46417. if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
  46418. return;
  46419. }
  46420. const key2 = prop.key;
  46421. const name2 = key2.type === "Identifier" ? key2.name : key2.value;
  46422. if (name2 === "__proto__") {
  46423. if (isRecord) {
  46424. this.raise(Errors.RecordNoProto, {
  46425. at: key2
  46426. });
  46427. return;
  46428. }
  46429. if (protoRef.used) {
  46430. if (refExpressionErrors) {
  46431. if (refExpressionErrors.doubleProtoLoc === null) {
  46432. refExpressionErrors.doubleProtoLoc = key2.loc.start;
  46433. }
  46434. } else {
  46435. this.raise(Errors.DuplicateProto, {
  46436. at: key2
  46437. });
  46438. }
  46439. }
  46440. protoRef.used = true;
  46441. }
  46442. }
  46443. shouldExitDescending(expr, potentialArrowAt) {
  46444. return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
  46445. }
  46446. getExpression() {
  46447. this.enterInitialScopes();
  46448. this.nextToken();
  46449. const expr = this.parseExpression();
  46450. if (!this.match(137)) {
  46451. this.unexpected();
  46452. }
  46453. this.finalizeRemainingComments();
  46454. expr.comments = this.state.comments;
  46455. expr.errors = this.state.errors;
  46456. if (this.options.tokens) {
  46457. expr.tokens = this.tokens;
  46458. }
  46459. return expr;
  46460. }
  46461. parseExpression(disallowIn, refExpressionErrors) {
  46462. if (disallowIn) {
  46463. return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  46464. }
  46465. return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
  46466. }
  46467. parseExpressionBase(refExpressionErrors) {
  46468. const startLoc = this.state.startLoc;
  46469. const expr = this.parseMaybeAssign(refExpressionErrors);
  46470. if (this.match(12)) {
  46471. const node2 = this.startNodeAt(startLoc);
  46472. node2.expressions = [expr];
  46473. while (this.eat(12)) {
  46474. node2.expressions.push(this.parseMaybeAssign(refExpressionErrors));
  46475. }
  46476. this.toReferencedList(node2.expressions);
  46477. return this.finishNode(node2, "SequenceExpression");
  46478. }
  46479. return expr;
  46480. }
  46481. parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) {
  46482. return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
  46483. }
  46484. parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) {
  46485. return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
  46486. }
  46487. setOptionalParametersError(refExpressionErrors, resultError) {
  46488. var _resultError$loc;
  46489. refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc;
  46490. }
  46491. parseMaybeAssign(refExpressionErrors, afterLeftParse) {
  46492. const startLoc = this.state.startLoc;
  46493. if (this.isContextual(106)) {
  46494. if (this.prodParam.hasYield) {
  46495. let left2 = this.parseYield();
  46496. if (afterLeftParse) {
  46497. left2 = afterLeftParse.call(this, left2, startLoc);
  46498. }
  46499. return left2;
  46500. }
  46501. }
  46502. let ownExpressionErrors;
  46503. if (refExpressionErrors) {
  46504. ownExpressionErrors = false;
  46505. } else {
  46506. refExpressionErrors = new ExpressionErrors();
  46507. ownExpressionErrors = true;
  46508. }
  46509. const {
  46510. type
  46511. } = this.state;
  46512. if (type === 10 || tokenIsIdentifier(type)) {
  46513. this.state.potentialArrowAt = this.state.start;
  46514. }
  46515. let left = this.parseMaybeConditional(refExpressionErrors);
  46516. if (afterLeftParse) {
  46517. left = afterLeftParse.call(this, left, startLoc);
  46518. }
  46519. if (tokenIsAssignment(this.state.type)) {
  46520. const node2 = this.startNodeAt(startLoc);
  46521. const operator = this.state.value;
  46522. node2.operator = operator;
  46523. if (this.match(29)) {
  46524. this.toAssignable(left, true);
  46525. node2.left = left;
  46526. const startIndex = startLoc.index;
  46527. if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startIndex) {
  46528. refExpressionErrors.doubleProtoLoc = null;
  46529. }
  46530. if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startIndex) {
  46531. refExpressionErrors.shorthandAssignLoc = null;
  46532. }
  46533. if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startIndex) {
  46534. this.checkDestructuringPrivate(refExpressionErrors);
  46535. refExpressionErrors.privateKeyLoc = null;
  46536. }
  46537. } else {
  46538. node2.left = left;
  46539. }
  46540. this.next();
  46541. node2.right = this.parseMaybeAssign();
  46542. this.checkLVal(left, {
  46543. in: this.finishNode(node2, "AssignmentExpression")
  46544. });
  46545. return node2;
  46546. } else if (ownExpressionErrors) {
  46547. this.checkExpressionErrors(refExpressionErrors, true);
  46548. }
  46549. return left;
  46550. }
  46551. parseMaybeConditional(refExpressionErrors) {
  46552. const startLoc = this.state.startLoc;
  46553. const potentialArrowAt = this.state.potentialArrowAt;
  46554. const expr = this.parseExprOps(refExpressionErrors);
  46555. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  46556. return expr;
  46557. }
  46558. return this.parseConditional(expr, startLoc, refExpressionErrors);
  46559. }
  46560. parseConditional(expr, startLoc, refExpressionErrors) {
  46561. if (this.eat(17)) {
  46562. const node2 = this.startNodeAt(startLoc);
  46563. node2.test = expr;
  46564. node2.consequent = this.parseMaybeAssignAllowIn();
  46565. this.expect(14);
  46566. node2.alternate = this.parseMaybeAssign();
  46567. return this.finishNode(node2, "ConditionalExpression");
  46568. }
  46569. return expr;
  46570. }
  46571. parseMaybeUnaryOrPrivate(refExpressionErrors) {
  46572. return this.match(136) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors);
  46573. }
  46574. parseExprOps(refExpressionErrors) {
  46575. const startLoc = this.state.startLoc;
  46576. const potentialArrowAt = this.state.potentialArrowAt;
  46577. const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors);
  46578. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  46579. return expr;
  46580. }
  46581. return this.parseExprOp(expr, startLoc, -1);
  46582. }
  46583. parseExprOp(left, leftStartLoc, minPrec) {
  46584. if (this.isPrivateName(left)) {
  46585. const value2 = this.getPrivateNameSV(left);
  46586. if (minPrec >= tokenOperatorPrecedence(58) || !this.prodParam.hasIn || !this.match(58)) {
  46587. this.raise(Errors.PrivateInExpectedIn, {
  46588. at: left,
  46589. identifierName: value2
  46590. });
  46591. }
  46592. this.classScope.usePrivateName(value2, left.loc.start);
  46593. }
  46594. const op = this.state.type;
  46595. if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(58))) {
  46596. let prec = tokenOperatorPrecedence(op);
  46597. if (prec > minPrec) {
  46598. if (op === 39) {
  46599. this.expectPlugin("pipelineOperator");
  46600. if (this.state.inFSharpPipelineDirectBody) {
  46601. return left;
  46602. }
  46603. this.checkPipelineAtInfixOperator(left, leftStartLoc);
  46604. }
  46605. const node2 = this.startNodeAt(leftStartLoc);
  46606. node2.left = left;
  46607. node2.operator = this.state.value;
  46608. const logical = op === 41 || op === 42;
  46609. const coalesce = op === 40;
  46610. if (coalesce) {
  46611. prec = tokenOperatorPrecedence(42);
  46612. }
  46613. this.next();
  46614. if (op === 39 && this.hasPlugin(["pipelineOperator", {
  46615. proposal: "minimal"
  46616. }])) {
  46617. if (this.state.type === 96 && this.prodParam.hasAwait) {
  46618. throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, {
  46619. at: this.state.startLoc
  46620. });
  46621. }
  46622. }
  46623. node2.right = this.parseExprOpRightExpr(op, prec);
  46624. const finishedNode = this.finishNode(node2, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
  46625. const nextOp = this.state.type;
  46626. if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) {
  46627. throw this.raise(Errors.MixingCoalesceWithLogical, {
  46628. at: this.state.startLoc
  46629. });
  46630. }
  46631. return this.parseExprOp(finishedNode, leftStartLoc, minPrec);
  46632. }
  46633. }
  46634. return left;
  46635. }
  46636. parseExprOpRightExpr(op, prec) {
  46637. const startLoc = this.state.startLoc;
  46638. switch (op) {
  46639. case 39:
  46640. switch (this.getPluginOption("pipelineOperator", "proposal")) {
  46641. case "hack":
  46642. return this.withTopicBindingContext(() => {
  46643. return this.parseHackPipeBody();
  46644. });
  46645. case "smart":
  46646. return this.withTopicBindingContext(() => {
  46647. if (this.prodParam.hasYield && this.isContextual(106)) {
  46648. throw this.raise(Errors.PipeBodyIsTighter, {
  46649. at: this.state.startLoc
  46650. });
  46651. }
  46652. return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc);
  46653. });
  46654. case "fsharp":
  46655. return this.withSoloAwaitPermittingContext(() => {
  46656. return this.parseFSharpPipelineBody(prec);
  46657. });
  46658. }
  46659. default:
  46660. return this.parseExprOpBaseRightExpr(op, prec);
  46661. }
  46662. }
  46663. parseExprOpBaseRightExpr(op, prec) {
  46664. const startLoc = this.state.startLoc;
  46665. return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec);
  46666. }
  46667. parseHackPipeBody() {
  46668. var _body$extra;
  46669. const {
  46670. startLoc
  46671. } = this.state;
  46672. const body = this.parseMaybeAssign();
  46673. const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(body.type);
  46674. if (requiredParentheses && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) {
  46675. this.raise(Errors.PipeUnparenthesizedBody, {
  46676. at: startLoc,
  46677. type: body.type
  46678. });
  46679. }
  46680. if (!this.topicReferenceWasUsedInCurrentContext()) {
  46681. this.raise(Errors.PipeTopicUnused, {
  46682. at: startLoc
  46683. });
  46684. }
  46685. return body;
  46686. }
  46687. checkExponentialAfterUnary(node2) {
  46688. if (this.match(57)) {
  46689. this.raise(Errors.UnexpectedTokenUnaryExponentiation, {
  46690. at: node2.argument
  46691. });
  46692. }
  46693. }
  46694. parseMaybeUnary(refExpressionErrors, sawUnary) {
  46695. const startLoc = this.state.startLoc;
  46696. const isAwait = this.isContextual(96);
  46697. if (isAwait && this.isAwaitAllowed()) {
  46698. this.next();
  46699. const expr2 = this.parseAwait(startLoc);
  46700. if (!sawUnary)
  46701. this.checkExponentialAfterUnary(expr2);
  46702. return expr2;
  46703. }
  46704. const update = this.match(34);
  46705. const node2 = this.startNode();
  46706. if (tokenIsPrefix(this.state.type)) {
  46707. node2.operator = this.state.value;
  46708. node2.prefix = true;
  46709. if (this.match(72)) {
  46710. this.expectPlugin("throwExpressions");
  46711. }
  46712. const isDelete = this.match(89);
  46713. this.next();
  46714. node2.argument = this.parseMaybeUnary(null, true);
  46715. this.checkExpressionErrors(refExpressionErrors, true);
  46716. if (this.state.strict && isDelete) {
  46717. const arg = node2.argument;
  46718. if (arg.type === "Identifier") {
  46719. this.raise(Errors.StrictDelete, {
  46720. at: node2
  46721. });
  46722. } else if (this.hasPropertyAsPrivateName(arg)) {
  46723. this.raise(Errors.DeletePrivateField, {
  46724. at: node2
  46725. });
  46726. }
  46727. }
  46728. if (!update) {
  46729. if (!sawUnary) {
  46730. this.checkExponentialAfterUnary(node2);
  46731. }
  46732. return this.finishNode(node2, "UnaryExpression");
  46733. }
  46734. }
  46735. const expr = this.parseUpdate(node2, update, refExpressionErrors);
  46736. if (isAwait) {
  46737. const {
  46738. type
  46739. } = this.state;
  46740. const startsExpr4 = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(54);
  46741. if (startsExpr4 && !this.isAmbiguousAwait()) {
  46742. this.raiseOverwrite(Errors.AwaitNotInAsyncContext, {
  46743. at: startLoc
  46744. });
  46745. return this.parseAwait(startLoc);
  46746. }
  46747. }
  46748. return expr;
  46749. }
  46750. parseUpdate(node2, update, refExpressionErrors) {
  46751. if (update) {
  46752. const updateExpressionNode = node2;
  46753. this.checkLVal(updateExpressionNode.argument, {
  46754. in: this.finishNode(updateExpressionNode, "UpdateExpression")
  46755. });
  46756. return node2;
  46757. }
  46758. const startLoc = this.state.startLoc;
  46759. let expr = this.parseExprSubscripts(refExpressionErrors);
  46760. if (this.checkExpressionErrors(refExpressionErrors, false))
  46761. return expr;
  46762. while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) {
  46763. const node3 = this.startNodeAt(startLoc);
  46764. node3.operator = this.state.value;
  46765. node3.prefix = false;
  46766. node3.argument = expr;
  46767. this.next();
  46768. this.checkLVal(expr, {
  46769. in: expr = this.finishNode(node3, "UpdateExpression")
  46770. });
  46771. }
  46772. return expr;
  46773. }
  46774. parseExprSubscripts(refExpressionErrors) {
  46775. const startLoc = this.state.startLoc;
  46776. const potentialArrowAt = this.state.potentialArrowAt;
  46777. const expr = this.parseExprAtom(refExpressionErrors);
  46778. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  46779. return expr;
  46780. }
  46781. return this.parseSubscripts(expr, startLoc);
  46782. }
  46783. parseSubscripts(base2, startLoc, noCalls) {
  46784. const state = {
  46785. optionalChainMember: false,
  46786. maybeAsyncArrow: this.atPossibleAsyncArrow(base2),
  46787. stop: false
  46788. };
  46789. do {
  46790. base2 = this.parseSubscript(base2, startLoc, noCalls, state);
  46791. state.maybeAsyncArrow = false;
  46792. } while (!state.stop);
  46793. return base2;
  46794. }
  46795. parseSubscript(base2, startLoc, noCalls, state) {
  46796. const {
  46797. type
  46798. } = this.state;
  46799. if (!noCalls && type === 15) {
  46800. return this.parseBind(base2, startLoc, noCalls, state);
  46801. } else if (tokenIsTemplate(type)) {
  46802. return this.parseTaggedTemplateExpression(base2, startLoc, state);
  46803. }
  46804. let optional = false;
  46805. if (type === 18) {
  46806. if (noCalls) {
  46807. this.raise(Errors.OptionalChainingNoNew, {
  46808. at: this.state.startLoc
  46809. });
  46810. if (this.lookaheadCharCode() === 40) {
  46811. state.stop = true;
  46812. return base2;
  46813. }
  46814. }
  46815. state.optionalChainMember = optional = true;
  46816. this.next();
  46817. }
  46818. if (!noCalls && this.match(10)) {
  46819. return this.parseCoverCallAndAsyncArrowHead(base2, startLoc, state, optional);
  46820. } else {
  46821. const computed = this.eat(0);
  46822. if (computed || optional || this.eat(16)) {
  46823. return this.parseMember(base2, startLoc, state, computed, optional);
  46824. } else {
  46825. state.stop = true;
  46826. return base2;
  46827. }
  46828. }
  46829. }
  46830. parseMember(base2, startLoc, state, computed, optional) {
  46831. const node2 = this.startNodeAt(startLoc);
  46832. node2.object = base2;
  46833. node2.computed = computed;
  46834. if (computed) {
  46835. node2.property = this.parseExpression();
  46836. this.expect(3);
  46837. } else if (this.match(136)) {
  46838. if (base2.type === "Super") {
  46839. this.raise(Errors.SuperPrivateField, {
  46840. at: startLoc
  46841. });
  46842. }
  46843. this.classScope.usePrivateName(this.state.value, this.state.startLoc);
  46844. node2.property = this.parsePrivateName();
  46845. } else {
  46846. node2.property = this.parseIdentifier(true);
  46847. }
  46848. if (state.optionalChainMember) {
  46849. node2.optional = optional;
  46850. return this.finishNode(node2, "OptionalMemberExpression");
  46851. } else {
  46852. return this.finishNode(node2, "MemberExpression");
  46853. }
  46854. }
  46855. parseBind(base2, startLoc, noCalls, state) {
  46856. const node2 = this.startNodeAt(startLoc);
  46857. node2.object = base2;
  46858. this.next();
  46859. node2.callee = this.parseNoCallExpr();
  46860. state.stop = true;
  46861. return this.parseSubscripts(this.finishNode(node2, "BindExpression"), startLoc, noCalls);
  46862. }
  46863. parseCoverCallAndAsyncArrowHead(base2, startLoc, state, optional) {
  46864. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  46865. let refExpressionErrors = null;
  46866. this.state.maybeInArrowParameters = true;
  46867. this.next();
  46868. const node2 = this.startNodeAt(startLoc);
  46869. node2.callee = base2;
  46870. const {
  46871. maybeAsyncArrow,
  46872. optionalChainMember
  46873. } = state;
  46874. if (maybeAsyncArrow) {
  46875. this.expressionScope.enter(newAsyncArrowScope());
  46876. refExpressionErrors = new ExpressionErrors();
  46877. }
  46878. if (optionalChainMember) {
  46879. node2.optional = optional;
  46880. }
  46881. if (optional) {
  46882. node2.arguments = this.parseCallExpressionArguments(11);
  46883. } else {
  46884. node2.arguments = this.parseCallExpressionArguments(11, base2.type === "Import", base2.type !== "Super", node2, refExpressionErrors);
  46885. }
  46886. let finishedNode = this.finishCallExpression(node2, optionalChainMember);
  46887. if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
  46888. state.stop = true;
  46889. this.checkDestructuringPrivate(refExpressionErrors);
  46890. this.expressionScope.validateAsPattern();
  46891. this.expressionScope.exit();
  46892. finishedNode = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startLoc), finishedNode);
  46893. } else {
  46894. if (maybeAsyncArrow) {
  46895. this.checkExpressionErrors(refExpressionErrors, true);
  46896. this.expressionScope.exit();
  46897. }
  46898. this.toReferencedArguments(finishedNode);
  46899. }
  46900. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  46901. return finishedNode;
  46902. }
  46903. toReferencedArguments(node2, isParenthesizedExpr) {
  46904. this.toReferencedListDeep(node2.arguments, isParenthesizedExpr);
  46905. }
  46906. parseTaggedTemplateExpression(base2, startLoc, state) {
  46907. const node2 = this.startNodeAt(startLoc);
  46908. node2.tag = base2;
  46909. node2.quasi = this.parseTemplate(true);
  46910. if (state.optionalChainMember) {
  46911. this.raise(Errors.OptionalChainingNoTemplate, {
  46912. at: startLoc
  46913. });
  46914. }
  46915. return this.finishNode(node2, "TaggedTemplateExpression");
  46916. }
  46917. atPossibleAsyncArrow(base2) {
  46918. return base2.type === "Identifier" && base2.name === "async" && this.state.lastTokEndLoc.index === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && base2.start === this.state.potentialArrowAt;
  46919. }
  46920. finishCallExpression(node2, optional) {
  46921. if (node2.callee.type === "Import") {
  46922. if (node2.arguments.length === 2) {
  46923. {
  46924. if (!this.hasPlugin("moduleAttributes")) {
  46925. this.expectPlugin("importAssertions");
  46926. }
  46927. }
  46928. }
  46929. if (node2.arguments.length === 0 || node2.arguments.length > 2) {
  46930. this.raise(Errors.ImportCallArity, {
  46931. at: node2,
  46932. maxArgumentCount: this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? 2 : 1
  46933. });
  46934. } else {
  46935. for (const arg of node2.arguments) {
  46936. if (arg.type === "SpreadElement") {
  46937. this.raise(Errors.ImportCallSpreadArgument, {
  46938. at: arg
  46939. });
  46940. }
  46941. }
  46942. }
  46943. }
  46944. return this.finishNode(node2, optional ? "OptionalCallExpression" : "CallExpression");
  46945. }
  46946. parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) {
  46947. const elts = [];
  46948. let first = true;
  46949. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  46950. this.state.inFSharpPipelineDirectBody = false;
  46951. while (!this.eat(close)) {
  46952. if (first) {
  46953. first = false;
  46954. } else {
  46955. this.expect(12);
  46956. if (this.match(close)) {
  46957. if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
  46958. this.raise(Errors.ImportCallArgumentTrailingComma, {
  46959. at: this.state.lastTokStartLoc
  46960. });
  46961. }
  46962. if (nodeForExtra) {
  46963. this.addTrailingCommaExtraToNode(nodeForExtra);
  46964. }
  46965. this.next();
  46966. break;
  46967. }
  46968. }
  46969. elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder));
  46970. }
  46971. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  46972. return elts;
  46973. }
  46974. shouldParseAsyncArrow() {
  46975. return this.match(19) && !this.canInsertSemicolon();
  46976. }
  46977. parseAsyncArrowFromCallExpression(node2, call) {
  46978. var _call$extra;
  46979. this.resetPreviousNodeTrailingComments(call);
  46980. this.expect(19);
  46981. this.parseArrowExpression(node2, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc);
  46982. if (call.innerComments) {
  46983. setInnerComments(node2, call.innerComments);
  46984. }
  46985. if (call.callee.trailingComments) {
  46986. setInnerComments(node2, call.callee.trailingComments);
  46987. }
  46988. return node2;
  46989. }
  46990. parseNoCallExpr() {
  46991. const startLoc = this.state.startLoc;
  46992. return this.parseSubscripts(this.parseExprAtom(), startLoc, true);
  46993. }
  46994. parseExprAtom(refExpressionErrors) {
  46995. let node2;
  46996. let decorators = null;
  46997. const {
  46998. type
  46999. } = this.state;
  47000. switch (type) {
  47001. case 79:
  47002. return this.parseSuper();
  47003. case 83:
  47004. node2 = this.startNode();
  47005. this.next();
  47006. if (this.match(16)) {
  47007. return this.parseImportMetaProperty(node2);
  47008. }
  47009. if (!this.match(10)) {
  47010. this.raise(Errors.UnsupportedImport, {
  47011. at: this.state.lastTokStartLoc
  47012. });
  47013. }
  47014. return this.finishNode(node2, "Import");
  47015. case 78:
  47016. node2 = this.startNode();
  47017. this.next();
  47018. return this.finishNode(node2, "ThisExpression");
  47019. case 90: {
  47020. return this.parseDo(this.startNode(), false);
  47021. }
  47022. case 56:
  47023. case 31: {
  47024. this.readRegexp();
  47025. return this.parseRegExpLiteral(this.state.value);
  47026. }
  47027. case 132:
  47028. return this.parseNumericLiteral(this.state.value);
  47029. case 133:
  47030. return this.parseBigIntLiteral(this.state.value);
  47031. case 134:
  47032. return this.parseDecimalLiteral(this.state.value);
  47033. case 131:
  47034. return this.parseStringLiteral(this.state.value);
  47035. case 84:
  47036. return this.parseNullLiteral();
  47037. case 85:
  47038. return this.parseBooleanLiteral(true);
  47039. case 86:
  47040. return this.parseBooleanLiteral(false);
  47041. case 10: {
  47042. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  47043. return this.parseParenAndDistinguishExpression(canBeArrow);
  47044. }
  47045. case 2:
  47046. case 1: {
  47047. return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true);
  47048. }
  47049. case 0: {
  47050. return this.parseArrayLike(3, true, false, refExpressionErrors);
  47051. }
  47052. case 6:
  47053. case 7: {
  47054. return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
  47055. }
  47056. case 5: {
  47057. return this.parseObjectLike(8, false, false, refExpressionErrors);
  47058. }
  47059. case 68:
  47060. return this.parseFunctionOrFunctionSent();
  47061. case 26:
  47062. decorators = this.parseDecorators();
  47063. case 80:
  47064. return this.parseClass(this.maybeTakeDecorators(decorators, this.startNode()), false);
  47065. case 77:
  47066. return this.parseNewOrNewTarget();
  47067. case 25:
  47068. case 24:
  47069. return this.parseTemplate(false);
  47070. case 15: {
  47071. node2 = this.startNode();
  47072. this.next();
  47073. node2.object = null;
  47074. const callee = node2.callee = this.parseNoCallExpr();
  47075. if (callee.type === "MemberExpression") {
  47076. return this.finishNode(node2, "BindExpression");
  47077. } else {
  47078. throw this.raise(Errors.UnsupportedBind, {
  47079. at: callee
  47080. });
  47081. }
  47082. }
  47083. case 136: {
  47084. this.raise(Errors.PrivateInExpectedIn, {
  47085. at: this.state.startLoc,
  47086. identifierName: this.state.value
  47087. });
  47088. return this.parsePrivateName();
  47089. }
  47090. case 33: {
  47091. return this.parseTopicReferenceThenEqualsSign(54, "%");
  47092. }
  47093. case 32: {
  47094. return this.parseTopicReferenceThenEqualsSign(44, "^");
  47095. }
  47096. case 37:
  47097. case 38: {
  47098. return this.parseTopicReference("hack");
  47099. }
  47100. case 44:
  47101. case 54:
  47102. case 27: {
  47103. const pipeProposal = this.getPluginOption("pipelineOperator", "proposal");
  47104. if (pipeProposal) {
  47105. return this.parseTopicReference(pipeProposal);
  47106. }
  47107. this.unexpected();
  47108. break;
  47109. }
  47110. case 47: {
  47111. const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
  47112. if (isIdentifierStart3(lookaheadCh) || lookaheadCh === 62) {
  47113. this.expectOnePlugin(["jsx", "flow", "typescript"]);
  47114. } else {
  47115. this.unexpected();
  47116. }
  47117. break;
  47118. }
  47119. default:
  47120. if (tokenIsIdentifier(type)) {
  47121. if (this.isContextual(125) && this.lookaheadInLineCharCode() === 123) {
  47122. return this.parseModuleExpression();
  47123. }
  47124. const canBeArrow = this.state.potentialArrowAt === this.state.start;
  47125. const containsEsc = this.state.containsEsc;
  47126. const id = this.parseIdentifier();
  47127. if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
  47128. const {
  47129. type: type2
  47130. } = this.state;
  47131. if (type2 === 68) {
  47132. this.resetPreviousNodeTrailingComments(id);
  47133. this.next();
  47134. return this.parseAsyncFunctionExpression(this.startNodeAtNode(id));
  47135. } else if (tokenIsIdentifier(type2)) {
  47136. if (this.lookaheadCharCode() === 61) {
  47137. return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
  47138. } else {
  47139. return id;
  47140. }
  47141. } else if (type2 === 90) {
  47142. this.resetPreviousNodeTrailingComments(id);
  47143. return this.parseDo(this.startNodeAtNode(id), true);
  47144. }
  47145. }
  47146. if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) {
  47147. this.next();
  47148. return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
  47149. }
  47150. return id;
  47151. } else {
  47152. this.unexpected();
  47153. }
  47154. }
  47155. }
  47156. parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) {
  47157. const pipeProposal = this.getPluginOption("pipelineOperator", "proposal");
  47158. if (pipeProposal) {
  47159. this.state.type = topicTokenType;
  47160. this.state.value = topicTokenValue;
  47161. this.state.pos--;
  47162. this.state.end--;
  47163. this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);
  47164. return this.parseTopicReference(pipeProposal);
  47165. } else {
  47166. this.unexpected();
  47167. }
  47168. }
  47169. parseTopicReference(pipeProposal) {
  47170. const node2 = this.startNode();
  47171. const startLoc = this.state.startLoc;
  47172. const tokenType = this.state.type;
  47173. this.next();
  47174. return this.finishTopicReference(node2, startLoc, pipeProposal, tokenType);
  47175. }
  47176. finishTopicReference(node2, startLoc, pipeProposal, tokenType) {
  47177. if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) {
  47178. const nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference";
  47179. if (!this.topicReferenceIsAllowedInCurrentContext()) {
  47180. this.raise(pipeProposal === "smart" ? Errors.PrimaryTopicNotAllowed : Errors.PipeTopicUnbound, {
  47181. at: startLoc
  47182. });
  47183. }
  47184. this.registerTopicReference();
  47185. return this.finishNode(node2, nodeType);
  47186. } else {
  47187. throw this.raise(Errors.PipeTopicUnconfiguredToken, {
  47188. at: startLoc,
  47189. token: tokenLabelName(tokenType)
  47190. });
  47191. }
  47192. }
  47193. testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) {
  47194. switch (pipeProposal) {
  47195. case "hack": {
  47196. return this.hasPlugin(["pipelineOperator", {
  47197. topicToken: tokenLabelName(tokenType)
  47198. }]);
  47199. }
  47200. case "smart":
  47201. return tokenType === 27;
  47202. default:
  47203. throw this.raise(Errors.PipeTopicRequiresHackPipes, {
  47204. at: startLoc
  47205. });
  47206. }
  47207. }
  47208. parseAsyncArrowUnaryFunction(node2) {
  47209. this.prodParam.enter(functionFlags3(true, this.prodParam.hasYield));
  47210. const params = [this.parseIdentifier()];
  47211. this.prodParam.exit();
  47212. if (this.hasPrecedingLineBreak()) {
  47213. this.raise(Errors.LineTerminatorBeforeArrow, {
  47214. at: this.state.curPosition()
  47215. });
  47216. }
  47217. this.expect(19);
  47218. return this.parseArrowExpression(node2, params, true);
  47219. }
  47220. parseDo(node2, isAsync) {
  47221. this.expectPlugin("doExpressions");
  47222. if (isAsync) {
  47223. this.expectPlugin("asyncDoExpressions");
  47224. }
  47225. node2.async = isAsync;
  47226. this.next();
  47227. const oldLabels = this.state.labels;
  47228. this.state.labels = [];
  47229. if (isAsync) {
  47230. this.prodParam.enter(PARAM_AWAIT);
  47231. node2.body = this.parseBlock();
  47232. this.prodParam.exit();
  47233. } else {
  47234. node2.body = this.parseBlock();
  47235. }
  47236. this.state.labels = oldLabels;
  47237. return this.finishNode(node2, "DoExpression");
  47238. }
  47239. parseSuper() {
  47240. const node2 = this.startNode();
  47241. this.next();
  47242. if (this.match(10) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
  47243. this.raise(Errors.SuperNotAllowed, {
  47244. at: node2
  47245. });
  47246. } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
  47247. this.raise(Errors.UnexpectedSuper, {
  47248. at: node2
  47249. });
  47250. }
  47251. if (!this.match(10) && !this.match(0) && !this.match(16)) {
  47252. this.raise(Errors.UnsupportedSuper, {
  47253. at: node2
  47254. });
  47255. }
  47256. return this.finishNode(node2, "Super");
  47257. }
  47258. parsePrivateName() {
  47259. const node2 = this.startNode();
  47260. const id = this.startNodeAt(createPositionWithColumnOffset(this.state.startLoc, 1));
  47261. const name2 = this.state.value;
  47262. this.next();
  47263. node2.id = this.createIdentifier(id, name2);
  47264. return this.finishNode(node2, "PrivateName");
  47265. }
  47266. parseFunctionOrFunctionSent() {
  47267. const node2 = this.startNode();
  47268. this.next();
  47269. if (this.prodParam.hasYield && this.match(16)) {
  47270. const meta = this.createIdentifier(this.startNodeAtNode(node2), "function");
  47271. this.next();
  47272. if (this.match(102)) {
  47273. this.expectPlugin("functionSent");
  47274. } else if (!this.hasPlugin("functionSent")) {
  47275. this.unexpected();
  47276. }
  47277. return this.parseMetaProperty(node2, meta, "sent");
  47278. }
  47279. return this.parseFunction(node2);
  47280. }
  47281. parseMetaProperty(node2, meta, propertyName) {
  47282. node2.meta = meta;
  47283. const containsEsc = this.state.containsEsc;
  47284. node2.property = this.parseIdentifier(true);
  47285. if (node2.property.name !== propertyName || containsEsc) {
  47286. this.raise(Errors.UnsupportedMetaProperty, {
  47287. at: node2.property,
  47288. target: meta.name,
  47289. onlyValidPropertyName: propertyName
  47290. });
  47291. }
  47292. return this.finishNode(node2, "MetaProperty");
  47293. }
  47294. parseImportMetaProperty(node2) {
  47295. const id = this.createIdentifier(this.startNodeAtNode(node2), "import");
  47296. this.next();
  47297. if (this.isContextual(100)) {
  47298. if (!this.inModule) {
  47299. this.raise(Errors.ImportMetaOutsideModule, {
  47300. at: id
  47301. });
  47302. }
  47303. this.sawUnambiguousESM = true;
  47304. }
  47305. return this.parseMetaProperty(node2, id, "meta");
  47306. }
  47307. parseLiteralAtNode(value2, type, node2) {
  47308. this.addExtra(node2, "rawValue", value2);
  47309. this.addExtra(node2, "raw", this.input.slice(node2.start, this.state.end));
  47310. node2.value = value2;
  47311. this.next();
  47312. return this.finishNode(node2, type);
  47313. }
  47314. parseLiteral(value2, type) {
  47315. const node2 = this.startNode();
  47316. return this.parseLiteralAtNode(value2, type, node2);
  47317. }
  47318. parseStringLiteral(value2) {
  47319. return this.parseLiteral(value2, "StringLiteral");
  47320. }
  47321. parseNumericLiteral(value2) {
  47322. return this.parseLiteral(value2, "NumericLiteral");
  47323. }
  47324. parseBigIntLiteral(value2) {
  47325. return this.parseLiteral(value2, "BigIntLiteral");
  47326. }
  47327. parseDecimalLiteral(value2) {
  47328. return this.parseLiteral(value2, "DecimalLiteral");
  47329. }
  47330. parseRegExpLiteral(value2) {
  47331. const node2 = this.parseLiteral(value2.value, "RegExpLiteral");
  47332. node2.pattern = value2.pattern;
  47333. node2.flags = value2.flags;
  47334. return node2;
  47335. }
  47336. parseBooleanLiteral(value2) {
  47337. const node2 = this.startNode();
  47338. node2.value = value2;
  47339. this.next();
  47340. return this.finishNode(node2, "BooleanLiteral");
  47341. }
  47342. parseNullLiteral() {
  47343. const node2 = this.startNode();
  47344. this.next();
  47345. return this.finishNode(node2, "NullLiteral");
  47346. }
  47347. parseParenAndDistinguishExpression(canBeArrow) {
  47348. const startLoc = this.state.startLoc;
  47349. let val;
  47350. this.next();
  47351. this.expressionScope.enter(newArrowHeadScope());
  47352. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  47353. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  47354. this.state.maybeInArrowParameters = true;
  47355. this.state.inFSharpPipelineDirectBody = false;
  47356. const innerStartLoc = this.state.startLoc;
  47357. const exprList = [];
  47358. const refExpressionErrors = new ExpressionErrors();
  47359. let first = true;
  47360. let spreadStartLoc;
  47361. let optionalCommaStartLoc;
  47362. while (!this.match(11)) {
  47363. if (first) {
  47364. first = false;
  47365. } else {
  47366. this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc);
  47367. if (this.match(11)) {
  47368. optionalCommaStartLoc = this.state.startLoc;
  47369. break;
  47370. }
  47371. }
  47372. if (this.match(21)) {
  47373. const spreadNodeStartLoc = this.state.startLoc;
  47374. spreadStartLoc = this.state.startLoc;
  47375. exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc));
  47376. if (!this.checkCommaAfterRest(41)) {
  47377. break;
  47378. }
  47379. } else {
  47380. exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem));
  47381. }
  47382. }
  47383. const innerEndLoc = this.state.lastTokEndLoc;
  47384. this.expect(11);
  47385. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  47386. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  47387. let arrowNode = this.startNodeAt(startLoc);
  47388. if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) {
  47389. this.checkDestructuringPrivate(refExpressionErrors);
  47390. this.expressionScope.validateAsPattern();
  47391. this.expressionScope.exit();
  47392. this.parseArrowExpression(arrowNode, exprList, false);
  47393. return arrowNode;
  47394. }
  47395. this.expressionScope.exit();
  47396. if (!exprList.length) {
  47397. this.unexpected(this.state.lastTokStartLoc);
  47398. }
  47399. if (optionalCommaStartLoc)
  47400. this.unexpected(optionalCommaStartLoc);
  47401. if (spreadStartLoc)
  47402. this.unexpected(spreadStartLoc);
  47403. this.checkExpressionErrors(refExpressionErrors, true);
  47404. this.toReferencedListDeep(exprList, true);
  47405. if (exprList.length > 1) {
  47406. val = this.startNodeAt(innerStartLoc);
  47407. val.expressions = exprList;
  47408. this.finishNode(val, "SequenceExpression");
  47409. this.resetEndLocation(val, innerEndLoc);
  47410. } else {
  47411. val = exprList[0];
  47412. }
  47413. return this.wrapParenthesis(startLoc, val);
  47414. }
  47415. wrapParenthesis(startLoc, expression) {
  47416. if (!this.options.createParenthesizedExpressions) {
  47417. this.addExtra(expression, "parenthesized", true);
  47418. this.addExtra(expression, "parenStart", startLoc.index);
  47419. this.takeSurroundingComments(expression, startLoc.index, this.state.lastTokEndLoc.index);
  47420. return expression;
  47421. }
  47422. const parenExpression = this.startNodeAt(startLoc);
  47423. parenExpression.expression = expression;
  47424. return this.finishNode(parenExpression, "ParenthesizedExpression");
  47425. }
  47426. shouldParseArrow(params) {
  47427. return !this.canInsertSemicolon();
  47428. }
  47429. parseArrow(node2) {
  47430. if (this.eat(19)) {
  47431. return node2;
  47432. }
  47433. }
  47434. parseParenItem(node2, startLoc) {
  47435. return node2;
  47436. }
  47437. parseNewOrNewTarget() {
  47438. const node2 = this.startNode();
  47439. this.next();
  47440. if (this.match(16)) {
  47441. const meta = this.createIdentifier(this.startNodeAtNode(node2), "new");
  47442. this.next();
  47443. const metaProp = this.parseMetaProperty(node2, meta, "target");
  47444. if (!this.scope.inNonArrowFunction && !this.scope.inClass && !this.options.allowNewTargetOutsideFunction) {
  47445. this.raise(Errors.UnexpectedNewTarget, {
  47446. at: metaProp
  47447. });
  47448. }
  47449. return metaProp;
  47450. }
  47451. return this.parseNew(node2);
  47452. }
  47453. parseNew(node2) {
  47454. this.parseNewCallee(node2);
  47455. if (this.eat(10)) {
  47456. const args = this.parseExprList(11);
  47457. this.toReferencedList(args);
  47458. node2.arguments = args;
  47459. } else {
  47460. node2.arguments = [];
  47461. }
  47462. return this.finishNode(node2, "NewExpression");
  47463. }
  47464. parseNewCallee(node2) {
  47465. node2.callee = this.parseNoCallExpr();
  47466. if (node2.callee.type === "Import") {
  47467. this.raise(Errors.ImportCallNotNewExpression, {
  47468. at: node2.callee
  47469. });
  47470. }
  47471. }
  47472. parseTemplateElement(isTagged) {
  47473. const {
  47474. start: start3,
  47475. startLoc,
  47476. end,
  47477. value: value2
  47478. } = this.state;
  47479. const elemStart = start3 + 1;
  47480. const elem = this.startNodeAt(createPositionWithColumnOffset(startLoc, 1));
  47481. if (value2 === null) {
  47482. if (!isTagged) {
  47483. this.raise(Errors.InvalidEscapeSequenceTemplate, {
  47484. at: createPositionWithColumnOffset(this.state.firstInvalidTemplateEscapePos, 1)
  47485. });
  47486. }
  47487. }
  47488. const isTail = this.match(24);
  47489. const endOffset = isTail ? -1 : -2;
  47490. const elemEnd = end + endOffset;
  47491. elem.value = {
  47492. raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"),
  47493. cooked: value2 === null ? null : value2.slice(1, endOffset)
  47494. };
  47495. elem.tail = isTail;
  47496. this.next();
  47497. const finishedNode = this.finishNode(elem, "TemplateElement");
  47498. this.resetEndLocation(finishedNode, createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset));
  47499. return finishedNode;
  47500. }
  47501. parseTemplate(isTagged) {
  47502. const node2 = this.startNode();
  47503. node2.expressions = [];
  47504. let curElt = this.parseTemplateElement(isTagged);
  47505. node2.quasis = [curElt];
  47506. while (!curElt.tail) {
  47507. node2.expressions.push(this.parseTemplateSubstitution());
  47508. this.readTemplateContinuation();
  47509. node2.quasis.push(curElt = this.parseTemplateElement(isTagged));
  47510. }
  47511. return this.finishNode(node2, "TemplateLiteral");
  47512. }
  47513. parseTemplateSubstitution() {
  47514. return this.parseExpression();
  47515. }
  47516. parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
  47517. if (isRecord) {
  47518. this.expectPlugin("recordAndTuple");
  47519. }
  47520. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  47521. this.state.inFSharpPipelineDirectBody = false;
  47522. const propHash = /* @__PURE__ */ Object.create(null);
  47523. let first = true;
  47524. const node2 = this.startNode();
  47525. node2.properties = [];
  47526. this.next();
  47527. while (!this.match(close)) {
  47528. if (first) {
  47529. first = false;
  47530. } else {
  47531. this.expect(12);
  47532. if (this.match(close)) {
  47533. this.addTrailingCommaExtraToNode(node2);
  47534. break;
  47535. }
  47536. }
  47537. let prop;
  47538. if (isPattern) {
  47539. prop = this.parseBindingProperty();
  47540. } else {
  47541. prop = this.parsePropertyDefinition(refExpressionErrors);
  47542. this.checkProto(prop, isRecord, propHash, refExpressionErrors);
  47543. }
  47544. if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
  47545. this.raise(Errors.InvalidRecordProperty, {
  47546. at: prop
  47547. });
  47548. }
  47549. if (prop.shorthand) {
  47550. this.addExtra(prop, "shorthand", true);
  47551. }
  47552. node2.properties.push(prop);
  47553. }
  47554. this.next();
  47555. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  47556. let type = "ObjectExpression";
  47557. if (isPattern) {
  47558. type = "ObjectPattern";
  47559. } else if (isRecord) {
  47560. type = "RecordExpression";
  47561. }
  47562. return this.finishNode(node2, type);
  47563. }
  47564. addTrailingCommaExtraToNode(node2) {
  47565. this.addExtra(node2, "trailingComma", this.state.lastTokStart);
  47566. this.addExtra(node2, "trailingCommaLoc", this.state.lastTokStartLoc, false);
  47567. }
  47568. maybeAsyncOrAccessorProp(prop) {
  47569. return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55));
  47570. }
  47571. parsePropertyDefinition(refExpressionErrors) {
  47572. let decorators = [];
  47573. if (this.match(26)) {
  47574. if (this.hasPlugin("decorators")) {
  47575. this.raise(Errors.UnsupportedPropertyDecorator, {
  47576. at: this.state.startLoc
  47577. });
  47578. }
  47579. while (this.match(26)) {
  47580. decorators.push(this.parseDecorator());
  47581. }
  47582. }
  47583. const prop = this.startNode();
  47584. let isAsync = false;
  47585. let isAccessor = false;
  47586. let startLoc;
  47587. if (this.match(21)) {
  47588. if (decorators.length)
  47589. this.unexpected();
  47590. return this.parseSpread();
  47591. }
  47592. if (decorators.length) {
  47593. prop.decorators = decorators;
  47594. decorators = [];
  47595. }
  47596. prop.method = false;
  47597. if (refExpressionErrors) {
  47598. startLoc = this.state.startLoc;
  47599. }
  47600. let isGenerator = this.eat(55);
  47601. this.parsePropertyNamePrefixOperator(prop);
  47602. const containsEsc = this.state.containsEsc;
  47603. const key2 = this.parsePropertyName(prop, refExpressionErrors);
  47604. if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
  47605. const keyName = key2.name;
  47606. if (keyName === "async" && !this.hasPrecedingLineBreak()) {
  47607. isAsync = true;
  47608. this.resetPreviousNodeTrailingComments(key2);
  47609. isGenerator = this.eat(55);
  47610. this.parsePropertyName(prop);
  47611. }
  47612. if (keyName === "get" || keyName === "set") {
  47613. isAccessor = true;
  47614. this.resetPreviousNodeTrailingComments(key2);
  47615. prop.kind = keyName;
  47616. if (this.match(55)) {
  47617. isGenerator = true;
  47618. this.raise(Errors.AccessorIsGenerator, {
  47619. at: this.state.curPosition(),
  47620. kind: keyName
  47621. });
  47622. this.next();
  47623. }
  47624. this.parsePropertyName(prop);
  47625. }
  47626. }
  47627. return this.parseObjPropValue(prop, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors);
  47628. }
  47629. getGetterSetterExpectedParamCount(method) {
  47630. return method.kind === "get" ? 0 : 1;
  47631. }
  47632. getObjectOrClassMethodParams(method) {
  47633. return method.params;
  47634. }
  47635. checkGetterSetterParams(method) {
  47636. var _params;
  47637. const paramCount = this.getGetterSetterExpectedParamCount(method);
  47638. const params = this.getObjectOrClassMethodParams(method);
  47639. if (params.length !== paramCount) {
  47640. this.raise(method.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, {
  47641. at: method
  47642. });
  47643. }
  47644. if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
  47645. this.raise(Errors.BadSetterRestParameter, {
  47646. at: method
  47647. });
  47648. }
  47649. }
  47650. parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  47651. if (isAccessor) {
  47652. const finishedProp = this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
  47653. this.checkGetterSetterParams(finishedProp);
  47654. return finishedProp;
  47655. }
  47656. if (isAsync || isGenerator || this.match(10)) {
  47657. if (isPattern)
  47658. this.unexpected();
  47659. prop.kind = "method";
  47660. prop.method = true;
  47661. return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
  47662. }
  47663. }
  47664. parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) {
  47665. prop.shorthand = false;
  47666. if (this.eat(14)) {
  47667. prop.value = isPattern ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
  47668. return this.finishNode(prop, "ObjectProperty");
  47669. }
  47670. if (!prop.computed && prop.key.type === "Identifier") {
  47671. this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false);
  47672. if (isPattern) {
  47673. prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key));
  47674. } else if (this.match(29)) {
  47675. const shorthandAssignLoc = this.state.startLoc;
  47676. if (refExpressionErrors != null) {
  47677. if (refExpressionErrors.shorthandAssignLoc === null) {
  47678. refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc;
  47679. }
  47680. } else {
  47681. this.raise(Errors.InvalidCoverInitializedName, {
  47682. at: shorthandAssignLoc
  47683. });
  47684. }
  47685. prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key));
  47686. } else {
  47687. prop.value = cloneIdentifier(prop.key);
  47688. }
  47689. prop.shorthand = true;
  47690. return this.finishNode(prop, "ObjectProperty");
  47691. }
  47692. }
  47693. parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  47694. const node2 = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors);
  47695. if (!node2)
  47696. this.unexpected();
  47697. return node2;
  47698. }
  47699. parsePropertyName(prop, refExpressionErrors) {
  47700. if (this.eat(0)) {
  47701. prop.computed = true;
  47702. prop.key = this.parseMaybeAssignAllowIn();
  47703. this.expect(3);
  47704. } else {
  47705. const {
  47706. type,
  47707. value: value2
  47708. } = this.state;
  47709. let key2;
  47710. if (tokenIsKeywordOrIdentifier(type)) {
  47711. key2 = this.parseIdentifier(true);
  47712. } else {
  47713. switch (type) {
  47714. case 132:
  47715. key2 = this.parseNumericLiteral(value2);
  47716. break;
  47717. case 131:
  47718. key2 = this.parseStringLiteral(value2);
  47719. break;
  47720. case 133:
  47721. key2 = this.parseBigIntLiteral(value2);
  47722. break;
  47723. case 134:
  47724. key2 = this.parseDecimalLiteral(value2);
  47725. break;
  47726. case 136: {
  47727. const privateKeyLoc = this.state.startLoc;
  47728. if (refExpressionErrors != null) {
  47729. if (refExpressionErrors.privateKeyLoc === null) {
  47730. refExpressionErrors.privateKeyLoc = privateKeyLoc;
  47731. }
  47732. } else {
  47733. this.raise(Errors.UnexpectedPrivateField, {
  47734. at: privateKeyLoc
  47735. });
  47736. }
  47737. key2 = this.parsePrivateName();
  47738. break;
  47739. }
  47740. default:
  47741. this.unexpected();
  47742. }
  47743. }
  47744. prop.key = key2;
  47745. if (type !== 136) {
  47746. prop.computed = false;
  47747. }
  47748. }
  47749. return prop.key;
  47750. }
  47751. initFunction(node2, isAsync) {
  47752. node2.id = null;
  47753. node2.generator = false;
  47754. node2.async = isAsync;
  47755. }
  47756. parseMethod(node2, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
  47757. this.initFunction(node2, isAsync);
  47758. node2.generator = isGenerator;
  47759. this.scope.enter(SCOPE_FUNCTION3 | SCOPE_SUPER3 | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER3 : 0));
  47760. this.prodParam.enter(functionFlags3(isAsync, node2.generator));
  47761. this.parseFunctionParams(node2, isConstructor);
  47762. const finishedNode = this.parseFunctionBodyAndFinish(node2, type, true);
  47763. this.prodParam.exit();
  47764. this.scope.exit();
  47765. return finishedNode;
  47766. }
  47767. parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  47768. if (isTuple) {
  47769. this.expectPlugin("recordAndTuple");
  47770. }
  47771. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  47772. this.state.inFSharpPipelineDirectBody = false;
  47773. const node2 = this.startNode();
  47774. this.next();
  47775. node2.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node2);
  47776. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  47777. return this.finishNode(node2, isTuple ? "TupleExpression" : "ArrayExpression");
  47778. }
  47779. parseArrowExpression(node2, params, isAsync, trailingCommaLoc) {
  47780. this.scope.enter(SCOPE_FUNCTION3 | SCOPE_ARROW3);
  47781. let flags = functionFlags3(isAsync, false);
  47782. if (!this.match(5) && this.prodParam.hasIn) {
  47783. flags |= PARAM_IN;
  47784. }
  47785. this.prodParam.enter(flags);
  47786. this.initFunction(node2, isAsync);
  47787. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  47788. if (params) {
  47789. this.state.maybeInArrowParameters = true;
  47790. this.setArrowFunctionParameters(node2, params, trailingCommaLoc);
  47791. }
  47792. this.state.maybeInArrowParameters = false;
  47793. this.parseFunctionBody(node2, true);
  47794. this.prodParam.exit();
  47795. this.scope.exit();
  47796. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  47797. return this.finishNode(node2, "ArrowFunctionExpression");
  47798. }
  47799. setArrowFunctionParameters(node2, params, trailingCommaLoc) {
  47800. this.toAssignableList(params, trailingCommaLoc, false);
  47801. node2.params = params;
  47802. }
  47803. parseFunctionBodyAndFinish(node2, type, isMethod = false) {
  47804. this.parseFunctionBody(node2, false, isMethod);
  47805. return this.finishNode(node2, type);
  47806. }
  47807. parseFunctionBody(node2, allowExpression, isMethod = false) {
  47808. const isExpression = allowExpression && !this.match(5);
  47809. this.expressionScope.enter(newExpressionScope());
  47810. if (isExpression) {
  47811. node2.body = this.parseMaybeAssign();
  47812. this.checkParams(node2, false, allowExpression, false);
  47813. } else {
  47814. const oldStrict = this.state.strict;
  47815. const oldLabels = this.state.labels;
  47816. this.state.labels = [];
  47817. this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
  47818. node2.body = this.parseBlock(true, false, (hasStrictModeDirective) => {
  47819. const nonSimple = !this.isSimpleParamList(node2.params);
  47820. if (hasStrictModeDirective && nonSimple) {
  47821. this.raise(Errors.IllegalLanguageModeDirective, {
  47822. at: (node2.kind === "method" || node2.kind === "constructor") && !!node2.key ? node2.key.loc.end : node2
  47823. });
  47824. }
  47825. const strictModeChanged = !oldStrict && this.state.strict;
  47826. this.checkParams(node2, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
  47827. if (this.state.strict && node2.id) {
  47828. this.checkIdentifier(node2.id, BIND_OUTSIDE3, strictModeChanged);
  47829. }
  47830. });
  47831. this.prodParam.exit();
  47832. this.state.labels = oldLabels;
  47833. }
  47834. this.expressionScope.exit();
  47835. }
  47836. isSimpleParameter(node2) {
  47837. return node2.type === "Identifier";
  47838. }
  47839. isSimpleParamList(params) {
  47840. for (let i = 0, len = params.length; i < len; i++) {
  47841. if (!this.isSimpleParameter(params[i]))
  47842. return false;
  47843. }
  47844. return true;
  47845. }
  47846. checkParams(node2, allowDuplicates, isArrowFunction, strictModeChanged = true) {
  47847. const checkClashes = !allowDuplicates && /* @__PURE__ */ new Set();
  47848. const formalParameters = {
  47849. type: "FormalParameters"
  47850. };
  47851. for (const param of node2.params) {
  47852. this.checkLVal(param, {
  47853. in: formalParameters,
  47854. binding: BIND_VAR3,
  47855. checkClashes,
  47856. strictModeChanged
  47857. });
  47858. }
  47859. }
  47860. parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
  47861. const elts = [];
  47862. let first = true;
  47863. while (!this.eat(close)) {
  47864. if (first) {
  47865. first = false;
  47866. } else {
  47867. this.expect(12);
  47868. if (this.match(close)) {
  47869. if (nodeForExtra) {
  47870. this.addTrailingCommaExtraToNode(nodeForExtra);
  47871. }
  47872. this.next();
  47873. break;
  47874. }
  47875. }
  47876. elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
  47877. }
  47878. return elts;
  47879. }
  47880. parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) {
  47881. let elt;
  47882. if (this.match(12)) {
  47883. if (!allowEmpty) {
  47884. this.raise(Errors.UnexpectedToken, {
  47885. at: this.state.curPosition(),
  47886. unexpected: ","
  47887. });
  47888. }
  47889. elt = null;
  47890. } else if (this.match(21)) {
  47891. const spreadNodeStartLoc = this.state.startLoc;
  47892. elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartLoc);
  47893. } else if (this.match(17)) {
  47894. this.expectPlugin("partialApplication");
  47895. if (!allowPlaceholder) {
  47896. this.raise(Errors.UnexpectedArgumentPlaceholder, {
  47897. at: this.state.startLoc
  47898. });
  47899. }
  47900. const node2 = this.startNode();
  47901. this.next();
  47902. elt = this.finishNode(node2, "ArgumentPlaceholder");
  47903. } else {
  47904. elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem);
  47905. }
  47906. return elt;
  47907. }
  47908. parseIdentifier(liberal) {
  47909. const node2 = this.startNode();
  47910. const name2 = this.parseIdentifierName(liberal);
  47911. return this.createIdentifier(node2, name2);
  47912. }
  47913. createIdentifier(node2, name2) {
  47914. node2.name = name2;
  47915. node2.loc.identifierName = name2;
  47916. return this.finishNode(node2, "Identifier");
  47917. }
  47918. parseIdentifierName(liberal) {
  47919. let name2;
  47920. const {
  47921. startLoc,
  47922. type
  47923. } = this.state;
  47924. if (tokenIsKeywordOrIdentifier(type)) {
  47925. name2 = this.state.value;
  47926. } else {
  47927. this.unexpected();
  47928. }
  47929. const tokenIsKeyword2 = tokenKeywordOrIdentifierIsKeyword(type);
  47930. if (liberal) {
  47931. if (tokenIsKeyword2) {
  47932. this.replaceToken(130);
  47933. }
  47934. } else {
  47935. this.checkReservedWord(name2, startLoc, tokenIsKeyword2, false);
  47936. }
  47937. this.next();
  47938. return name2;
  47939. }
  47940. checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  47941. if (word.length > 10) {
  47942. return;
  47943. }
  47944. if (!canBeReservedWord(word)) {
  47945. return;
  47946. }
  47947. if (checkKeywords && isKeyword(word)) {
  47948. this.raise(Errors.UnexpectedKeyword, {
  47949. at: startLoc,
  47950. keyword: word
  47951. });
  47952. return;
  47953. }
  47954. const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
  47955. if (reservedTest(word, this.inModule)) {
  47956. this.raise(Errors.UnexpectedReservedWord, {
  47957. at: startLoc,
  47958. reservedWord: word
  47959. });
  47960. return;
  47961. } else if (word === "yield") {
  47962. if (this.prodParam.hasYield) {
  47963. this.raise(Errors.YieldBindingIdentifier, {
  47964. at: startLoc
  47965. });
  47966. return;
  47967. }
  47968. } else if (word === "await") {
  47969. if (this.prodParam.hasAwait) {
  47970. this.raise(Errors.AwaitBindingIdentifier, {
  47971. at: startLoc
  47972. });
  47973. return;
  47974. }
  47975. if (this.scope.inStaticBlock) {
  47976. this.raise(Errors.AwaitBindingIdentifierInStaticBlock, {
  47977. at: startLoc
  47978. });
  47979. return;
  47980. }
  47981. this.expressionScope.recordAsyncArrowParametersError({
  47982. at: startLoc
  47983. });
  47984. } else if (word === "arguments") {
  47985. if (this.scope.inClassAndNotInNonArrowFunction) {
  47986. this.raise(Errors.ArgumentsInClass, {
  47987. at: startLoc
  47988. });
  47989. return;
  47990. }
  47991. }
  47992. }
  47993. isAwaitAllowed() {
  47994. if (this.prodParam.hasAwait)
  47995. return true;
  47996. if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
  47997. return true;
  47998. }
  47999. return false;
  48000. }
  48001. parseAwait(startLoc) {
  48002. const node2 = this.startNodeAt(startLoc);
  48003. this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter, {
  48004. at: node2
  48005. });
  48006. if (this.eat(55)) {
  48007. this.raise(Errors.ObsoleteAwaitStar, {
  48008. at: node2
  48009. });
  48010. }
  48011. if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
  48012. if (this.isAmbiguousAwait()) {
  48013. this.ambiguousScriptDifferentAst = true;
  48014. } else {
  48015. this.sawUnambiguousESM = true;
  48016. }
  48017. }
  48018. if (!this.state.soloAwait) {
  48019. node2.argument = this.parseMaybeUnary(null, true);
  48020. }
  48021. return this.finishNode(node2, "AwaitExpression");
  48022. }
  48023. isAmbiguousAwait() {
  48024. if (this.hasPrecedingLineBreak())
  48025. return true;
  48026. const {
  48027. type
  48028. } = this.state;
  48029. return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 101 && !this.state.containsEsc || type === 135 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54;
  48030. }
  48031. parseYield() {
  48032. const node2 = this.startNode();
  48033. this.expressionScope.recordParameterInitializerError(Errors.YieldInParameter, {
  48034. at: node2
  48035. });
  48036. this.next();
  48037. let delegating = false;
  48038. let argument = null;
  48039. if (!this.hasPrecedingLineBreak()) {
  48040. delegating = this.eat(55);
  48041. switch (this.state.type) {
  48042. case 13:
  48043. case 137:
  48044. case 8:
  48045. case 11:
  48046. case 3:
  48047. case 9:
  48048. case 14:
  48049. case 12:
  48050. if (!delegating)
  48051. break;
  48052. default:
  48053. argument = this.parseMaybeAssign();
  48054. }
  48055. }
  48056. node2.delegate = delegating;
  48057. node2.argument = argument;
  48058. return this.finishNode(node2, "YieldExpression");
  48059. }
  48060. checkPipelineAtInfixOperator(left, leftStartLoc) {
  48061. if (this.hasPlugin(["pipelineOperator", {
  48062. proposal: "smart"
  48063. }])) {
  48064. if (left.type === "SequenceExpression") {
  48065. this.raise(Errors.PipelineHeadSequenceExpression, {
  48066. at: leftStartLoc
  48067. });
  48068. }
  48069. }
  48070. }
  48071. parseSmartPipelineBodyInStyle(childExpr, startLoc) {
  48072. if (this.isSimpleReference(childExpr)) {
  48073. const bodyNode = this.startNodeAt(startLoc);
  48074. bodyNode.callee = childExpr;
  48075. return this.finishNode(bodyNode, "PipelineBareFunction");
  48076. } else {
  48077. const bodyNode = this.startNodeAt(startLoc);
  48078. this.checkSmartPipeTopicBodyEarlyErrors(startLoc);
  48079. bodyNode.expression = childExpr;
  48080. return this.finishNode(bodyNode, "PipelineTopicExpression");
  48081. }
  48082. }
  48083. isSimpleReference(expression) {
  48084. switch (expression.type) {
  48085. case "MemberExpression":
  48086. return !expression.computed && this.isSimpleReference(expression.object);
  48087. case "Identifier":
  48088. return true;
  48089. default:
  48090. return false;
  48091. }
  48092. }
  48093. checkSmartPipeTopicBodyEarlyErrors(startLoc) {
  48094. if (this.match(19)) {
  48095. throw this.raise(Errors.PipelineBodyNoArrow, {
  48096. at: this.state.startLoc
  48097. });
  48098. }
  48099. if (!this.topicReferenceWasUsedInCurrentContext()) {
  48100. this.raise(Errors.PipelineTopicUnused, {
  48101. at: startLoc
  48102. });
  48103. }
  48104. }
  48105. withTopicBindingContext(callback) {
  48106. const outerContextTopicState = this.state.topicContext;
  48107. this.state.topicContext = {
  48108. maxNumOfResolvableTopics: 1,
  48109. maxTopicIndex: null
  48110. };
  48111. try {
  48112. return callback();
  48113. } finally {
  48114. this.state.topicContext = outerContextTopicState;
  48115. }
  48116. }
  48117. withSmartMixTopicForbiddingContext(callback) {
  48118. if (this.hasPlugin(["pipelineOperator", {
  48119. proposal: "smart"
  48120. }])) {
  48121. const outerContextTopicState = this.state.topicContext;
  48122. this.state.topicContext = {
  48123. maxNumOfResolvableTopics: 0,
  48124. maxTopicIndex: null
  48125. };
  48126. try {
  48127. return callback();
  48128. } finally {
  48129. this.state.topicContext = outerContextTopicState;
  48130. }
  48131. } else {
  48132. return callback();
  48133. }
  48134. }
  48135. withSoloAwaitPermittingContext(callback) {
  48136. const outerContextSoloAwaitState = this.state.soloAwait;
  48137. this.state.soloAwait = true;
  48138. try {
  48139. return callback();
  48140. } finally {
  48141. this.state.soloAwait = outerContextSoloAwaitState;
  48142. }
  48143. }
  48144. allowInAnd(callback) {
  48145. const flags = this.prodParam.currentFlags();
  48146. const prodParamToSet = PARAM_IN & ~flags;
  48147. if (prodParamToSet) {
  48148. this.prodParam.enter(flags | PARAM_IN);
  48149. try {
  48150. return callback();
  48151. } finally {
  48152. this.prodParam.exit();
  48153. }
  48154. }
  48155. return callback();
  48156. }
  48157. disallowInAnd(callback) {
  48158. const flags = this.prodParam.currentFlags();
  48159. const prodParamToClear = PARAM_IN & flags;
  48160. if (prodParamToClear) {
  48161. this.prodParam.enter(flags & ~PARAM_IN);
  48162. try {
  48163. return callback();
  48164. } finally {
  48165. this.prodParam.exit();
  48166. }
  48167. }
  48168. return callback();
  48169. }
  48170. registerTopicReference() {
  48171. this.state.topicContext.maxTopicIndex = 0;
  48172. }
  48173. topicReferenceIsAllowedInCurrentContext() {
  48174. return this.state.topicContext.maxNumOfResolvableTopics >= 1;
  48175. }
  48176. topicReferenceWasUsedInCurrentContext() {
  48177. return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
  48178. }
  48179. parseFSharpPipelineBody(prec) {
  48180. const startLoc = this.state.startLoc;
  48181. this.state.potentialArrowAt = this.state.start;
  48182. const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  48183. this.state.inFSharpPipelineDirectBody = true;
  48184. const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, prec);
  48185. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  48186. return ret;
  48187. }
  48188. parseModuleExpression() {
  48189. this.expectPlugin("moduleBlocks");
  48190. const node2 = this.startNode();
  48191. this.next();
  48192. if (!this.match(5)) {
  48193. this.unexpected(null, 5);
  48194. }
  48195. const program = this.startNodeAt(this.state.endLoc);
  48196. this.next();
  48197. const revertScopes = this.initializeScopes(true);
  48198. this.enterInitialScopes();
  48199. try {
  48200. node2.body = this.parseProgram(program, 8, "module");
  48201. } finally {
  48202. revertScopes();
  48203. }
  48204. return this.finishNode(node2, "ModuleExpression");
  48205. }
  48206. parsePropertyNamePrefixOperator(prop) {
  48207. }
  48208. };
  48209. var loopLabel3 = {
  48210. kind: "loop"
  48211. };
  48212. var switchLabel3 = {
  48213. kind: "switch"
  48214. };
  48215. var loneSurrogate2 = /[\uD800-\uDFFF]/u;
  48216. var keywordRelationalOperator3 = /in(?:stanceof)?/y;
  48217. function babel7CompatTokens(tokens, input) {
  48218. for (let i = 0; i < tokens.length; i++) {
  48219. const token2 = tokens[i];
  48220. const {
  48221. type
  48222. } = token2;
  48223. if (typeof type === "number") {
  48224. {
  48225. if (type === 136) {
  48226. const {
  48227. loc,
  48228. start: start3,
  48229. value: value2,
  48230. end
  48231. } = token2;
  48232. const hashEndPos = start3 + 1;
  48233. const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);
  48234. tokens.splice(i, 1, new Token5({
  48235. type: getExportedToken(27),
  48236. value: "#",
  48237. start: start3,
  48238. end: hashEndPos,
  48239. startLoc: loc.start,
  48240. endLoc: hashEndLoc
  48241. }), new Token5({
  48242. type: getExportedToken(130),
  48243. value: value2,
  48244. start: hashEndPos,
  48245. end,
  48246. startLoc: hashEndLoc,
  48247. endLoc: loc.end
  48248. }));
  48249. i++;
  48250. continue;
  48251. }
  48252. if (tokenIsTemplate(type)) {
  48253. const {
  48254. loc,
  48255. start: start3,
  48256. value: value2,
  48257. end
  48258. } = token2;
  48259. const backquoteEnd = start3 + 1;
  48260. const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);
  48261. let startToken;
  48262. if (input.charCodeAt(start3) === 96) {
  48263. startToken = new Token5({
  48264. type: getExportedToken(22),
  48265. value: "`",
  48266. start: start3,
  48267. end: backquoteEnd,
  48268. startLoc: loc.start,
  48269. endLoc: backquoteEndLoc
  48270. });
  48271. } else {
  48272. startToken = new Token5({
  48273. type: getExportedToken(8),
  48274. value: "}",
  48275. start: start3,
  48276. end: backquoteEnd,
  48277. startLoc: loc.start,
  48278. endLoc: backquoteEndLoc
  48279. });
  48280. }
  48281. let templateValue, templateElementEnd, templateElementEndLoc, endToken;
  48282. if (type === 24) {
  48283. templateElementEnd = end - 1;
  48284. templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);
  48285. templateValue = value2 === null ? null : value2.slice(1, -1);
  48286. endToken = new Token5({
  48287. type: getExportedToken(22),
  48288. value: "`",
  48289. start: templateElementEnd,
  48290. end,
  48291. startLoc: templateElementEndLoc,
  48292. endLoc: loc.end
  48293. });
  48294. } else {
  48295. templateElementEnd = end - 2;
  48296. templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);
  48297. templateValue = value2 === null ? null : value2.slice(1, -2);
  48298. endToken = new Token5({
  48299. type: getExportedToken(23),
  48300. value: "${",
  48301. start: templateElementEnd,
  48302. end,
  48303. startLoc: templateElementEndLoc,
  48304. endLoc: loc.end
  48305. });
  48306. }
  48307. tokens.splice(i, 1, startToken, new Token5({
  48308. type: getExportedToken(20),
  48309. value: templateValue,
  48310. start: backquoteEnd,
  48311. end: templateElementEnd,
  48312. startLoc: backquoteEndLoc,
  48313. endLoc: templateElementEndLoc
  48314. }), endToken);
  48315. i += 2;
  48316. continue;
  48317. }
  48318. }
  48319. token2.type = getExportedToken(type);
  48320. }
  48321. }
  48322. return tokens;
  48323. }
  48324. var StatementParser = class extends ExpressionParser {
  48325. parseTopLevel(file, program) {
  48326. file.program = this.parseProgram(program);
  48327. file.comments = this.state.comments;
  48328. if (this.options.tokens) {
  48329. file.tokens = babel7CompatTokens(this.tokens, this.input);
  48330. }
  48331. return this.finishNode(file, "File");
  48332. }
  48333. parseProgram(program, end = 137, sourceType = this.options.sourceType) {
  48334. program.sourceType = sourceType;
  48335. program.interpreter = this.parseInterpreterDirective();
  48336. this.parseBlockBody(program, true, true, end);
  48337. if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
  48338. for (const [localName, at3] of Array.from(this.scope.undefinedExports)) {
  48339. this.raise(Errors.ModuleExportUndefined, {
  48340. at: at3,
  48341. localName
  48342. });
  48343. }
  48344. }
  48345. let finishedProgram;
  48346. if (end === 137) {
  48347. finishedProgram = this.finishNode(program, "Program");
  48348. } else {
  48349. finishedProgram = this.finishNodeAt(program, "Program", createPositionWithColumnOffset(this.state.startLoc, -1));
  48350. }
  48351. return finishedProgram;
  48352. }
  48353. stmtToDirective(stmt) {
  48354. const directive = stmt;
  48355. directive.type = "Directive";
  48356. directive.value = directive.expression;
  48357. delete directive.expression;
  48358. const directiveLiteral = directive.value;
  48359. const expressionValue = directiveLiteral.value;
  48360. const raw = this.input.slice(directiveLiteral.start, directiveLiteral.end);
  48361. const val = directiveLiteral.value = raw.slice(1, -1);
  48362. this.addExtra(directiveLiteral, "raw", raw);
  48363. this.addExtra(directiveLiteral, "rawValue", val);
  48364. this.addExtra(directiveLiteral, "expressionValue", expressionValue);
  48365. directiveLiteral.type = "DirectiveLiteral";
  48366. return directive;
  48367. }
  48368. parseInterpreterDirective() {
  48369. if (!this.match(28)) {
  48370. return null;
  48371. }
  48372. const node2 = this.startNode();
  48373. node2.value = this.state.value;
  48374. this.next();
  48375. return this.finishNode(node2, "InterpreterDirective");
  48376. }
  48377. isLet() {
  48378. if (!this.isContextual(99)) {
  48379. return false;
  48380. }
  48381. return this.hasFollowingBindingAtom();
  48382. }
  48383. chStartsBindingIdentifier(ch, pos2) {
  48384. if (isIdentifierStart3(ch)) {
  48385. keywordRelationalOperator3.lastIndex = pos2;
  48386. if (keywordRelationalOperator3.test(this.input)) {
  48387. const endCh = this.codePointAtPos(keywordRelationalOperator3.lastIndex);
  48388. if (!isIdentifierChar3(endCh) && endCh !== 92) {
  48389. return false;
  48390. }
  48391. }
  48392. return true;
  48393. } else if (ch === 92) {
  48394. return true;
  48395. } else {
  48396. return false;
  48397. }
  48398. }
  48399. chStartsBindingPattern(ch) {
  48400. return ch === 91 || ch === 123;
  48401. }
  48402. hasFollowingBindingAtom() {
  48403. const next = this.nextTokenStart();
  48404. const nextCh = this.codePointAtPos(next);
  48405. return this.chStartsBindingPattern(nextCh) || this.chStartsBindingIdentifier(nextCh, next);
  48406. }
  48407. hasInLineFollowingBindingIdentifier() {
  48408. const next = this.nextTokenInLineStart();
  48409. const nextCh = this.codePointAtPos(next);
  48410. return this.chStartsBindingIdentifier(nextCh, next);
  48411. }
  48412. startsUsingForOf() {
  48413. const {
  48414. type,
  48415. containsEsc
  48416. } = this.lookahead();
  48417. if (type === 101 && !containsEsc) {
  48418. return false;
  48419. } else if (tokenIsIdentifier(type) && !this.hasFollowingLineBreak()) {
  48420. this.expectPlugin("explicitResourceManagement");
  48421. return true;
  48422. }
  48423. }
  48424. parseModuleItem() {
  48425. return this.parseStatementLike(1 | 2 | 4 | 8);
  48426. }
  48427. parseStatementListItem() {
  48428. return this.parseStatementLike(2 | 4 | (!this.options.annexB || this.state.strict ? 0 : 8));
  48429. }
  48430. parseStatementOrSloppyAnnexBFunctionDeclaration(allowLabeledFunction = false) {
  48431. let flags = 0;
  48432. if (this.options.annexB && !this.state.strict) {
  48433. flags |= 4;
  48434. if (allowLabeledFunction) {
  48435. flags |= 8;
  48436. }
  48437. }
  48438. return this.parseStatementLike(flags);
  48439. }
  48440. parseStatement() {
  48441. return this.parseStatementLike(0);
  48442. }
  48443. parseStatementLike(flags) {
  48444. let decorators = null;
  48445. if (this.match(26)) {
  48446. decorators = this.parseDecorators(true);
  48447. }
  48448. return this.parseStatementContent(flags, decorators);
  48449. }
  48450. parseStatementContent(flags, decorators) {
  48451. const starttype = this.state.type;
  48452. const node2 = this.startNode();
  48453. const allowDeclaration = !!(flags & 2);
  48454. const allowFunctionDeclaration = !!(flags & 4);
  48455. const topLevel = flags & 1;
  48456. switch (starttype) {
  48457. case 60:
  48458. return this.parseBreakContinueStatement(node2, true);
  48459. case 63:
  48460. return this.parseBreakContinueStatement(node2, false);
  48461. case 64:
  48462. return this.parseDebuggerStatement(node2);
  48463. case 90:
  48464. return this.parseDoWhileStatement(node2);
  48465. case 91:
  48466. return this.parseForStatement(node2);
  48467. case 68:
  48468. if (this.lookaheadCharCode() === 46)
  48469. break;
  48470. if (!allowFunctionDeclaration) {
  48471. this.raise(this.state.strict ? Errors.StrictFunction : this.options.annexB ? Errors.SloppyFunctionAnnexB : Errors.SloppyFunction, {
  48472. at: this.state.startLoc
  48473. });
  48474. }
  48475. return this.parseFunctionStatement(node2, false, !allowDeclaration && allowFunctionDeclaration);
  48476. case 80:
  48477. if (!allowDeclaration)
  48478. this.unexpected();
  48479. return this.parseClass(this.maybeTakeDecorators(decorators, node2), true);
  48480. case 69:
  48481. return this.parseIfStatement(node2);
  48482. case 70:
  48483. return this.parseReturnStatement(node2);
  48484. case 71:
  48485. return this.parseSwitchStatement(node2);
  48486. case 72:
  48487. return this.parseThrowStatement(node2);
  48488. case 73:
  48489. return this.parseTryStatement(node2);
  48490. case 105:
  48491. if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifier()) {
  48492. break;
  48493. }
  48494. this.expectPlugin("explicitResourceManagement");
  48495. if (!this.scope.inModule && this.scope.inTopLevel) {
  48496. this.raise(Errors.UnexpectedUsingDeclaration, {
  48497. at: this.state.startLoc
  48498. });
  48499. } else if (!allowDeclaration) {
  48500. this.raise(Errors.UnexpectedLexicalDeclaration, {
  48501. at: this.state.startLoc
  48502. });
  48503. }
  48504. return this.parseVarStatement(node2, "using");
  48505. case 99: {
  48506. if (this.state.containsEsc) {
  48507. break;
  48508. }
  48509. const next = this.nextTokenStart();
  48510. const nextCh = this.codePointAtPos(next);
  48511. if (nextCh !== 91) {
  48512. if (!allowDeclaration && this.hasFollowingLineBreak())
  48513. break;
  48514. if (!this.chStartsBindingIdentifier(nextCh, next) && nextCh !== 123) {
  48515. break;
  48516. }
  48517. }
  48518. }
  48519. case 75: {
  48520. if (!allowDeclaration) {
  48521. this.raise(Errors.UnexpectedLexicalDeclaration, {
  48522. at: this.state.startLoc
  48523. });
  48524. }
  48525. }
  48526. case 74: {
  48527. const kind = this.state.value;
  48528. return this.parseVarStatement(node2, kind);
  48529. }
  48530. case 92:
  48531. return this.parseWhileStatement(node2);
  48532. case 76:
  48533. return this.parseWithStatement(node2);
  48534. case 5:
  48535. return this.parseBlock();
  48536. case 13:
  48537. return this.parseEmptyStatement(node2);
  48538. case 83: {
  48539. const nextTokenCharCode = this.lookaheadCharCode();
  48540. if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
  48541. break;
  48542. }
  48543. }
  48544. case 82: {
  48545. if (!this.options.allowImportExportEverywhere && !topLevel) {
  48546. this.raise(Errors.UnexpectedImportExport, {
  48547. at: this.state.startLoc
  48548. });
  48549. }
  48550. this.next();
  48551. let result;
  48552. if (starttype === 83) {
  48553. result = this.parseImport(node2);
  48554. if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
  48555. this.sawUnambiguousESM = true;
  48556. }
  48557. } else {
  48558. result = this.parseExport(node2, decorators);
  48559. if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
  48560. this.sawUnambiguousESM = true;
  48561. }
  48562. }
  48563. this.assertModuleNodeAllowed(result);
  48564. return result;
  48565. }
  48566. default: {
  48567. if (this.isAsyncFunction()) {
  48568. if (!allowDeclaration) {
  48569. this.raise(Errors.AsyncFunctionInSingleStatementContext, {
  48570. at: this.state.startLoc
  48571. });
  48572. }
  48573. this.next();
  48574. return this.parseFunctionStatement(node2, true, !allowDeclaration && allowFunctionDeclaration);
  48575. }
  48576. }
  48577. }
  48578. const maybeName = this.state.value;
  48579. const expr = this.parseExpression();
  48580. if (tokenIsIdentifier(starttype) && expr.type === "Identifier" && this.eat(14)) {
  48581. return this.parseLabeledStatement(node2, maybeName, expr, flags);
  48582. } else {
  48583. return this.parseExpressionStatement(node2, expr, decorators);
  48584. }
  48585. }
  48586. assertModuleNodeAllowed(node2) {
  48587. if (!this.options.allowImportExportEverywhere && !this.inModule) {
  48588. this.raise(Errors.ImportOutsideModule, {
  48589. at: node2
  48590. });
  48591. }
  48592. }
  48593. decoratorsEnabledBeforeExport() {
  48594. if (this.hasPlugin("decorators-legacy"))
  48595. return true;
  48596. return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") !== false;
  48597. }
  48598. maybeTakeDecorators(maybeDecorators, classNode, exportNode) {
  48599. if (maybeDecorators) {
  48600. if (classNode.decorators && classNode.decorators.length > 0) {
  48601. if (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") !== "boolean") {
  48602. this.raise(Errors.DecoratorsBeforeAfterExport, {
  48603. at: classNode.decorators[0]
  48604. });
  48605. }
  48606. classNode.decorators.unshift(...maybeDecorators);
  48607. } else {
  48608. classNode.decorators = maybeDecorators;
  48609. }
  48610. this.resetStartLocationFromNode(classNode, maybeDecorators[0]);
  48611. if (exportNode)
  48612. this.resetStartLocationFromNode(exportNode, classNode);
  48613. }
  48614. return classNode;
  48615. }
  48616. canHaveLeadingDecorator() {
  48617. return this.match(80);
  48618. }
  48619. parseDecorators(allowExport) {
  48620. const decorators = [];
  48621. do {
  48622. decorators.push(this.parseDecorator());
  48623. } while (this.match(26));
  48624. if (this.match(82)) {
  48625. if (!allowExport) {
  48626. this.unexpected();
  48627. }
  48628. if (!this.decoratorsEnabledBeforeExport()) {
  48629. this.raise(Errors.DecoratorExportClass, {
  48630. at: this.state.startLoc
  48631. });
  48632. }
  48633. } else if (!this.canHaveLeadingDecorator()) {
  48634. throw this.raise(Errors.UnexpectedLeadingDecorator, {
  48635. at: this.state.startLoc
  48636. });
  48637. }
  48638. return decorators;
  48639. }
  48640. parseDecorator() {
  48641. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  48642. const node2 = this.startNode();
  48643. this.next();
  48644. if (this.hasPlugin("decorators")) {
  48645. const startLoc = this.state.startLoc;
  48646. let expr;
  48647. if (this.match(10)) {
  48648. const startLoc2 = this.state.startLoc;
  48649. this.next();
  48650. expr = this.parseExpression();
  48651. this.expect(11);
  48652. expr = this.wrapParenthesis(startLoc2, expr);
  48653. const paramsStartLoc = this.state.startLoc;
  48654. node2.expression = this.parseMaybeDecoratorArguments(expr);
  48655. if (this.getPluginOption("decorators", "allowCallParenthesized") === false && node2.expression !== expr) {
  48656. this.raise(Errors.DecoratorArgumentsOutsideParentheses, {
  48657. at: paramsStartLoc
  48658. });
  48659. }
  48660. } else {
  48661. expr = this.parseIdentifier(false);
  48662. while (this.eat(16)) {
  48663. const node3 = this.startNodeAt(startLoc);
  48664. node3.object = expr;
  48665. if (this.match(136)) {
  48666. this.classScope.usePrivateName(this.state.value, this.state.startLoc);
  48667. node3.property = this.parsePrivateName();
  48668. } else {
  48669. node3.property = this.parseIdentifier(true);
  48670. }
  48671. node3.computed = false;
  48672. expr = this.finishNode(node3, "MemberExpression");
  48673. }
  48674. node2.expression = this.parseMaybeDecoratorArguments(expr);
  48675. }
  48676. } else {
  48677. node2.expression = this.parseExprSubscripts();
  48678. }
  48679. return this.finishNode(node2, "Decorator");
  48680. }
  48681. parseMaybeDecoratorArguments(expr) {
  48682. if (this.eat(10)) {
  48683. const node2 = this.startNodeAtNode(expr);
  48684. node2.callee = expr;
  48685. node2.arguments = this.parseCallExpressionArguments(11, false);
  48686. this.toReferencedList(node2.arguments);
  48687. return this.finishNode(node2, "CallExpression");
  48688. }
  48689. return expr;
  48690. }
  48691. parseBreakContinueStatement(node2, isBreak) {
  48692. this.next();
  48693. if (this.isLineTerminator()) {
  48694. node2.label = null;
  48695. } else {
  48696. node2.label = this.parseIdentifier();
  48697. this.semicolon();
  48698. }
  48699. this.verifyBreakContinue(node2, isBreak);
  48700. return this.finishNode(node2, isBreak ? "BreakStatement" : "ContinueStatement");
  48701. }
  48702. verifyBreakContinue(node2, isBreak) {
  48703. let i;
  48704. for (i = 0; i < this.state.labels.length; ++i) {
  48705. const lab = this.state.labels[i];
  48706. if (node2.label == null || lab.name === node2.label.name) {
  48707. if (lab.kind != null && (isBreak || lab.kind === "loop"))
  48708. break;
  48709. if (node2.label && isBreak)
  48710. break;
  48711. }
  48712. }
  48713. if (i === this.state.labels.length) {
  48714. const type = isBreak ? "BreakStatement" : "ContinueStatement";
  48715. this.raise(Errors.IllegalBreakContinue, {
  48716. at: node2,
  48717. type
  48718. });
  48719. }
  48720. }
  48721. parseDebuggerStatement(node2) {
  48722. this.next();
  48723. this.semicolon();
  48724. return this.finishNode(node2, "DebuggerStatement");
  48725. }
  48726. parseHeaderExpression() {
  48727. this.expect(10);
  48728. const val = this.parseExpression();
  48729. this.expect(11);
  48730. return val;
  48731. }
  48732. parseDoWhileStatement(node2) {
  48733. this.next();
  48734. this.state.labels.push(loopLabel3);
  48735. node2.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement());
  48736. this.state.labels.pop();
  48737. this.expect(92);
  48738. node2.test = this.parseHeaderExpression();
  48739. this.eat(13);
  48740. return this.finishNode(node2, "DoWhileStatement");
  48741. }
  48742. parseForStatement(node2) {
  48743. this.next();
  48744. this.state.labels.push(loopLabel3);
  48745. let awaitAt = null;
  48746. if (this.isAwaitAllowed() && this.eatContextual(96)) {
  48747. awaitAt = this.state.lastTokStartLoc;
  48748. }
  48749. this.scope.enter(SCOPE_OTHER);
  48750. this.expect(10);
  48751. if (this.match(13)) {
  48752. if (awaitAt !== null) {
  48753. this.unexpected(awaitAt);
  48754. }
  48755. return this.parseFor(node2, null);
  48756. }
  48757. const startsWithLet = this.isContextual(99);
  48758. const startsWithUsing = this.isContextual(105);
  48759. const isLetOrUsing = startsWithLet && this.hasFollowingBindingAtom() || startsWithUsing && this.startsUsingForOf();
  48760. if (this.match(74) || this.match(75) || isLetOrUsing) {
  48761. const initNode = this.startNode();
  48762. const kind = this.state.value;
  48763. this.next();
  48764. this.parseVar(initNode, true, kind);
  48765. const init2 = this.finishNode(initNode, "VariableDeclaration");
  48766. const isForIn = this.match(58);
  48767. if (isForIn && startsWithUsing) {
  48768. this.raise(Errors.ForInUsing, {
  48769. at: init2
  48770. });
  48771. }
  48772. if ((isForIn || this.isContextual(101)) && init2.declarations.length === 1) {
  48773. return this.parseForIn(node2, init2, awaitAt);
  48774. }
  48775. if (awaitAt !== null) {
  48776. this.unexpected(awaitAt);
  48777. }
  48778. return this.parseFor(node2, init2);
  48779. }
  48780. const startsWithAsync = this.isContextual(95);
  48781. const refExpressionErrors = new ExpressionErrors();
  48782. const init = this.parseExpression(true, refExpressionErrors);
  48783. const isForOf = this.isContextual(101);
  48784. if (isForOf) {
  48785. if (startsWithLet) {
  48786. this.raise(Errors.ForOfLet, {
  48787. at: init
  48788. });
  48789. }
  48790. if (awaitAt === null && startsWithAsync && init.type === "Identifier") {
  48791. this.raise(Errors.ForOfAsync, {
  48792. at: init
  48793. });
  48794. }
  48795. }
  48796. if (isForOf || this.match(58)) {
  48797. this.checkDestructuringPrivate(refExpressionErrors);
  48798. this.toAssignable(init, true);
  48799. const type = isForOf ? "ForOfStatement" : "ForInStatement";
  48800. this.checkLVal(init, {
  48801. in: {
  48802. type
  48803. }
  48804. });
  48805. return this.parseForIn(node2, init, awaitAt);
  48806. } else {
  48807. this.checkExpressionErrors(refExpressionErrors, true);
  48808. }
  48809. if (awaitAt !== null) {
  48810. this.unexpected(awaitAt);
  48811. }
  48812. return this.parseFor(node2, init);
  48813. }
  48814. parseFunctionStatement(node2, isAsync, isHangingDeclaration) {
  48815. this.next();
  48816. return this.parseFunction(node2, 1 | (isHangingDeclaration ? 2 : 0) | (isAsync ? 8 : 0));
  48817. }
  48818. parseIfStatement(node2) {
  48819. this.next();
  48820. node2.test = this.parseHeaderExpression();
  48821. node2.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration();
  48822. node2.alternate = this.eat(66) ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() : null;
  48823. return this.finishNode(node2, "IfStatement");
  48824. }
  48825. parseReturnStatement(node2) {
  48826. if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
  48827. this.raise(Errors.IllegalReturn, {
  48828. at: this.state.startLoc
  48829. });
  48830. }
  48831. this.next();
  48832. if (this.isLineTerminator()) {
  48833. node2.argument = null;
  48834. } else {
  48835. node2.argument = this.parseExpression();
  48836. this.semicolon();
  48837. }
  48838. return this.finishNode(node2, "ReturnStatement");
  48839. }
  48840. parseSwitchStatement(node2) {
  48841. this.next();
  48842. node2.discriminant = this.parseHeaderExpression();
  48843. const cases = node2.cases = [];
  48844. this.expect(5);
  48845. this.state.labels.push(switchLabel3);
  48846. this.scope.enter(SCOPE_OTHER);
  48847. let cur;
  48848. for (let sawDefault; !this.match(8); ) {
  48849. if (this.match(61) || this.match(65)) {
  48850. const isCase = this.match(61);
  48851. if (cur)
  48852. this.finishNode(cur, "SwitchCase");
  48853. cases.push(cur = this.startNode());
  48854. cur.consequent = [];
  48855. this.next();
  48856. if (isCase) {
  48857. cur.test = this.parseExpression();
  48858. } else {
  48859. if (sawDefault) {
  48860. this.raise(Errors.MultipleDefaultsInSwitch, {
  48861. at: this.state.lastTokStartLoc
  48862. });
  48863. }
  48864. sawDefault = true;
  48865. cur.test = null;
  48866. }
  48867. this.expect(14);
  48868. } else {
  48869. if (cur) {
  48870. cur.consequent.push(this.parseStatementListItem());
  48871. } else {
  48872. this.unexpected();
  48873. }
  48874. }
  48875. }
  48876. this.scope.exit();
  48877. if (cur)
  48878. this.finishNode(cur, "SwitchCase");
  48879. this.next();
  48880. this.state.labels.pop();
  48881. return this.finishNode(node2, "SwitchStatement");
  48882. }
  48883. parseThrowStatement(node2) {
  48884. this.next();
  48885. if (this.hasPrecedingLineBreak()) {
  48886. this.raise(Errors.NewlineAfterThrow, {
  48887. at: this.state.lastTokEndLoc
  48888. });
  48889. }
  48890. node2.argument = this.parseExpression();
  48891. this.semicolon();
  48892. return this.finishNode(node2, "ThrowStatement");
  48893. }
  48894. parseCatchClauseParam() {
  48895. const param = this.parseBindingAtom();
  48896. this.scope.enter(this.options.annexB && param.type === "Identifier" ? SCOPE_SIMPLE_CATCH3 : 0);
  48897. this.checkLVal(param, {
  48898. in: {
  48899. type: "CatchClause"
  48900. },
  48901. binding: BIND_CATCH_PARAM
  48902. });
  48903. return param;
  48904. }
  48905. parseTryStatement(node2) {
  48906. this.next();
  48907. node2.block = this.parseBlock();
  48908. node2.handler = null;
  48909. if (this.match(62)) {
  48910. const clause = this.startNode();
  48911. this.next();
  48912. if (this.match(10)) {
  48913. this.expect(10);
  48914. clause.param = this.parseCatchClauseParam();
  48915. this.expect(11);
  48916. } else {
  48917. clause.param = null;
  48918. this.scope.enter(SCOPE_OTHER);
  48919. }
  48920. clause.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false));
  48921. this.scope.exit();
  48922. node2.handler = this.finishNode(clause, "CatchClause");
  48923. }
  48924. node2.finalizer = this.eat(67) ? this.parseBlock() : null;
  48925. if (!node2.handler && !node2.finalizer) {
  48926. this.raise(Errors.NoCatchOrFinally, {
  48927. at: node2
  48928. });
  48929. }
  48930. return this.finishNode(node2, "TryStatement");
  48931. }
  48932. parseVarStatement(node2, kind, allowMissingInitializer = false) {
  48933. this.next();
  48934. this.parseVar(node2, false, kind, allowMissingInitializer);
  48935. this.semicolon();
  48936. return this.finishNode(node2, "VariableDeclaration");
  48937. }
  48938. parseWhileStatement(node2) {
  48939. this.next();
  48940. node2.test = this.parseHeaderExpression();
  48941. this.state.labels.push(loopLabel3);
  48942. node2.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement());
  48943. this.state.labels.pop();
  48944. return this.finishNode(node2, "WhileStatement");
  48945. }
  48946. parseWithStatement(node2) {
  48947. if (this.state.strict) {
  48948. this.raise(Errors.StrictWith, {
  48949. at: this.state.startLoc
  48950. });
  48951. }
  48952. this.next();
  48953. node2.object = this.parseHeaderExpression();
  48954. node2.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement());
  48955. return this.finishNode(node2, "WithStatement");
  48956. }
  48957. parseEmptyStatement(node2) {
  48958. this.next();
  48959. return this.finishNode(node2, "EmptyStatement");
  48960. }
  48961. parseLabeledStatement(node2, maybeName, expr, flags) {
  48962. for (const label of this.state.labels) {
  48963. if (label.name === maybeName) {
  48964. this.raise(Errors.LabelRedeclaration, {
  48965. at: expr,
  48966. labelName: maybeName
  48967. });
  48968. }
  48969. }
  48970. const kind = tokenIsLoop(this.state.type) ? "loop" : this.match(71) ? "switch" : null;
  48971. for (let i = this.state.labels.length - 1; i >= 0; i--) {
  48972. const label = this.state.labels[i];
  48973. if (label.statementStart === node2.start) {
  48974. label.statementStart = this.state.start;
  48975. label.kind = kind;
  48976. } else {
  48977. break;
  48978. }
  48979. }
  48980. this.state.labels.push({
  48981. name: maybeName,
  48982. kind,
  48983. statementStart: this.state.start
  48984. });
  48985. node2.body = flags & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement();
  48986. this.state.labels.pop();
  48987. node2.label = expr;
  48988. return this.finishNode(node2, "LabeledStatement");
  48989. }
  48990. parseExpressionStatement(node2, expr, decorators) {
  48991. node2.expression = expr;
  48992. this.semicolon();
  48993. return this.finishNode(node2, "ExpressionStatement");
  48994. }
  48995. parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) {
  48996. const node2 = this.startNode();
  48997. if (allowDirectives) {
  48998. this.state.strictErrors.clear();
  48999. }
  49000. this.expect(5);
  49001. if (createNewLexicalScope) {
  49002. this.scope.enter(SCOPE_OTHER);
  49003. }
  49004. this.parseBlockBody(node2, allowDirectives, false, 8, afterBlockParse);
  49005. if (createNewLexicalScope) {
  49006. this.scope.exit();
  49007. }
  49008. return this.finishNode(node2, "BlockStatement");
  49009. }
  49010. isValidDirective(stmt) {
  49011. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  49012. }
  49013. parseBlockBody(node2, allowDirectives, topLevel, end, afterBlockParse) {
  49014. const body = node2.body = [];
  49015. const directives = node2.directives = [];
  49016. this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : void 0, topLevel, end, afterBlockParse);
  49017. }
  49018. parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
  49019. const oldStrict = this.state.strict;
  49020. let hasStrictModeDirective = false;
  49021. let parsedNonDirective = false;
  49022. while (!this.match(end)) {
  49023. const stmt = topLevel ? this.parseModuleItem() : this.parseStatementListItem();
  49024. if (directives && !parsedNonDirective) {
  49025. if (this.isValidDirective(stmt)) {
  49026. const directive = this.stmtToDirective(stmt);
  49027. directives.push(directive);
  49028. if (!hasStrictModeDirective && directive.value.value === "use strict") {
  49029. hasStrictModeDirective = true;
  49030. this.setStrict(true);
  49031. }
  49032. continue;
  49033. }
  49034. parsedNonDirective = true;
  49035. this.state.strictErrors.clear();
  49036. }
  49037. body.push(stmt);
  49038. }
  49039. if (afterBlockParse) {
  49040. afterBlockParse.call(this, hasStrictModeDirective);
  49041. }
  49042. if (!oldStrict) {
  49043. this.setStrict(false);
  49044. }
  49045. this.next();
  49046. }
  49047. parseFor(node2, init) {
  49048. node2.init = init;
  49049. this.semicolon(false);
  49050. node2.test = this.match(13) ? null : this.parseExpression();
  49051. this.semicolon(false);
  49052. node2.update = this.match(11) ? null : this.parseExpression();
  49053. this.expect(11);
  49054. node2.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement());
  49055. this.scope.exit();
  49056. this.state.labels.pop();
  49057. return this.finishNode(node2, "ForStatement");
  49058. }
  49059. parseForIn(node2, init, awaitAt) {
  49060. const isForIn = this.match(58);
  49061. this.next();
  49062. if (isForIn) {
  49063. if (awaitAt !== null)
  49064. this.unexpected(awaitAt);
  49065. } else {
  49066. node2.await = awaitAt !== null;
  49067. }
  49068. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  49069. this.raise(Errors.ForInOfLoopInitializer, {
  49070. at: init,
  49071. type: isForIn ? "ForInStatement" : "ForOfStatement"
  49072. });
  49073. }
  49074. if (init.type === "AssignmentPattern") {
  49075. this.raise(Errors.InvalidLhs, {
  49076. at: init,
  49077. ancestor: {
  49078. type: "ForStatement"
  49079. }
  49080. });
  49081. }
  49082. node2.left = init;
  49083. node2.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
  49084. this.expect(11);
  49085. node2.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement());
  49086. this.scope.exit();
  49087. this.state.labels.pop();
  49088. return this.finishNode(node2, isForIn ? "ForInStatement" : "ForOfStatement");
  49089. }
  49090. parseVar(node2, isFor, kind, allowMissingInitializer = false) {
  49091. const declarations = node2.declarations = [];
  49092. node2.kind = kind;
  49093. for (; ; ) {
  49094. const decl = this.startNode();
  49095. this.parseVarId(decl, kind);
  49096. decl.init = !this.eat(29) ? null : isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
  49097. if (decl.init === null && !allowMissingInitializer) {
  49098. if (decl.id.type !== "Identifier" && !(isFor && (this.match(58) || this.isContextual(101)))) {
  49099. this.raise(Errors.DeclarationMissingInitializer, {
  49100. at: this.state.lastTokEndLoc,
  49101. kind: "destructuring"
  49102. });
  49103. } else if (kind === "const" && !(this.match(58) || this.isContextual(101))) {
  49104. this.raise(Errors.DeclarationMissingInitializer, {
  49105. at: this.state.lastTokEndLoc,
  49106. kind: "const"
  49107. });
  49108. }
  49109. }
  49110. declarations.push(this.finishNode(decl, "VariableDeclarator"));
  49111. if (!this.eat(12))
  49112. break;
  49113. }
  49114. return node2;
  49115. }
  49116. parseVarId(decl, kind) {
  49117. if (kind === "using" && !this.inModule && this.match(96)) {
  49118. this.raise(Errors.AwaitInUsingBinding, {
  49119. at: this.state.startLoc
  49120. });
  49121. }
  49122. const id = this.parseBindingAtom();
  49123. this.checkLVal(id, {
  49124. in: {
  49125. type: "VariableDeclarator"
  49126. },
  49127. binding: kind === "var" ? BIND_VAR3 : BIND_LEXICAL3
  49128. });
  49129. decl.id = id;
  49130. }
  49131. parseAsyncFunctionExpression(node2) {
  49132. return this.parseFunction(node2, 8);
  49133. }
  49134. parseFunction(node2, flags = 0) {
  49135. const hangingDeclaration = flags & 2;
  49136. const isDeclaration2 = !!(flags & 1);
  49137. const requireId = isDeclaration2 && !(flags & 4);
  49138. const isAsync = !!(flags & 8);
  49139. this.initFunction(node2, isAsync);
  49140. if (this.match(55)) {
  49141. if (hangingDeclaration) {
  49142. this.raise(Errors.GeneratorInSingleStatementContext, {
  49143. at: this.state.startLoc
  49144. });
  49145. }
  49146. this.next();
  49147. node2.generator = true;
  49148. }
  49149. if (isDeclaration2) {
  49150. node2.id = this.parseFunctionId(requireId);
  49151. }
  49152. const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  49153. this.state.maybeInArrowParameters = false;
  49154. this.scope.enter(SCOPE_FUNCTION3);
  49155. this.prodParam.enter(functionFlags3(isAsync, node2.generator));
  49156. if (!isDeclaration2) {
  49157. node2.id = this.parseFunctionId();
  49158. }
  49159. this.parseFunctionParams(node2, false);
  49160. this.withSmartMixTopicForbiddingContext(() => {
  49161. this.parseFunctionBodyAndFinish(node2, isDeclaration2 ? "FunctionDeclaration" : "FunctionExpression");
  49162. });
  49163. this.prodParam.exit();
  49164. this.scope.exit();
  49165. if (isDeclaration2 && !hangingDeclaration) {
  49166. this.registerFunctionStatementId(node2);
  49167. }
  49168. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  49169. return node2;
  49170. }
  49171. parseFunctionId(requireId) {
  49172. return requireId || tokenIsIdentifier(this.state.type) ? this.parseIdentifier() : null;
  49173. }
  49174. parseFunctionParams(node2, isConstructor) {
  49175. this.expect(10);
  49176. this.expressionScope.enter(newParameterDeclarationScope());
  49177. node2.params = this.parseBindingList(11, 41, 2 | (isConstructor ? 4 : 0));
  49178. this.expressionScope.exit();
  49179. }
  49180. registerFunctionStatementId(node2) {
  49181. if (!node2.id)
  49182. return;
  49183. this.scope.declareName(node2.id.name, !this.options.annexB || this.state.strict || node2.generator || node2.async ? this.scope.treatFunctionsAsVar ? BIND_VAR3 : BIND_LEXICAL3 : BIND_FUNCTION3, node2.id.loc.start);
  49184. }
  49185. parseClass(node2, isStatement, optionalId) {
  49186. this.next();
  49187. const oldStrict = this.state.strict;
  49188. this.state.strict = true;
  49189. this.parseClassId(node2, isStatement, optionalId);
  49190. this.parseClassSuper(node2);
  49191. node2.body = this.parseClassBody(!!node2.superClass, oldStrict);
  49192. return this.finishNode(node2, isStatement ? "ClassDeclaration" : "ClassExpression");
  49193. }
  49194. isClassProperty() {
  49195. return this.match(29) || this.match(13) || this.match(8);
  49196. }
  49197. isClassMethod() {
  49198. return this.match(10);
  49199. }
  49200. isNonstaticConstructor(method) {
  49201. return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
  49202. }
  49203. parseClassBody(hadSuperClass, oldStrict) {
  49204. this.classScope.enter();
  49205. const state = {
  49206. hadConstructor: false,
  49207. hadSuperClass
  49208. };
  49209. let decorators = [];
  49210. const classBody = this.startNode();
  49211. classBody.body = [];
  49212. this.expect(5);
  49213. this.withSmartMixTopicForbiddingContext(() => {
  49214. while (!this.match(8)) {
  49215. if (this.eat(13)) {
  49216. if (decorators.length > 0) {
  49217. throw this.raise(Errors.DecoratorSemicolon, {
  49218. at: this.state.lastTokEndLoc
  49219. });
  49220. }
  49221. continue;
  49222. }
  49223. if (this.match(26)) {
  49224. decorators.push(this.parseDecorator());
  49225. continue;
  49226. }
  49227. const member = this.startNode();
  49228. if (decorators.length) {
  49229. member.decorators = decorators;
  49230. this.resetStartLocationFromNode(member, decorators[0]);
  49231. decorators = [];
  49232. }
  49233. this.parseClassMember(classBody, member, state);
  49234. if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
  49235. this.raise(Errors.DecoratorConstructor, {
  49236. at: member
  49237. });
  49238. }
  49239. }
  49240. });
  49241. this.state.strict = oldStrict;
  49242. this.next();
  49243. if (decorators.length) {
  49244. throw this.raise(Errors.TrailingDecorator, {
  49245. at: this.state.startLoc
  49246. });
  49247. }
  49248. this.classScope.exit();
  49249. return this.finishNode(classBody, "ClassBody");
  49250. }
  49251. parseClassMemberFromModifier(classBody, member) {
  49252. const key2 = this.parseIdentifier(true);
  49253. if (this.isClassMethod()) {
  49254. const method = member;
  49255. method.kind = "method";
  49256. method.computed = false;
  49257. method.key = key2;
  49258. method.static = false;
  49259. this.pushClassMethod(classBody, method, false, false, false, false);
  49260. return true;
  49261. } else if (this.isClassProperty()) {
  49262. const prop = member;
  49263. prop.computed = false;
  49264. prop.key = key2;
  49265. prop.static = false;
  49266. classBody.body.push(this.parseClassProperty(prop));
  49267. return true;
  49268. }
  49269. this.resetPreviousNodeTrailingComments(key2);
  49270. return false;
  49271. }
  49272. parseClassMember(classBody, member, state) {
  49273. const isStatic = this.isContextual(104);
  49274. if (isStatic) {
  49275. if (this.parseClassMemberFromModifier(classBody, member)) {
  49276. return;
  49277. }
  49278. if (this.eat(5)) {
  49279. this.parseClassStaticBlock(classBody, member);
  49280. return;
  49281. }
  49282. }
  49283. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  49284. }
  49285. parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  49286. const publicMethod = member;
  49287. const privateMethod = member;
  49288. const publicProp = member;
  49289. const privateProp = member;
  49290. const accessorProp = member;
  49291. const method = publicMethod;
  49292. const publicMember = publicMethod;
  49293. member.static = isStatic;
  49294. this.parsePropertyNamePrefixOperator(member);
  49295. if (this.eat(55)) {
  49296. method.kind = "method";
  49297. const isPrivateName = this.match(136);
  49298. this.parseClassElementName(method);
  49299. if (isPrivateName) {
  49300. this.pushClassPrivateMethod(classBody, privateMethod, true, false);
  49301. return;
  49302. }
  49303. if (this.isNonstaticConstructor(publicMethod)) {
  49304. this.raise(Errors.ConstructorIsGenerator, {
  49305. at: publicMethod.key
  49306. });
  49307. }
  49308. this.pushClassMethod(classBody, publicMethod, true, false, false, false);
  49309. return;
  49310. }
  49311. const isContextual = tokenIsIdentifier(this.state.type) && !this.state.containsEsc;
  49312. const isPrivate = this.match(136);
  49313. const key2 = this.parseClassElementName(member);
  49314. const maybeQuestionTokenStartLoc = this.state.startLoc;
  49315. this.parsePostMemberNameModifiers(publicMember);
  49316. if (this.isClassMethod()) {
  49317. method.kind = "method";
  49318. if (isPrivate) {
  49319. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  49320. return;
  49321. }
  49322. const isConstructor = this.isNonstaticConstructor(publicMethod);
  49323. let allowsDirectSuper = false;
  49324. if (isConstructor) {
  49325. publicMethod.kind = "constructor";
  49326. if (state.hadConstructor && !this.hasPlugin("typescript")) {
  49327. this.raise(Errors.DuplicateConstructor, {
  49328. at: key2
  49329. });
  49330. }
  49331. if (isConstructor && this.hasPlugin("typescript") && member.override) {
  49332. this.raise(Errors.OverrideOnConstructor, {
  49333. at: key2
  49334. });
  49335. }
  49336. state.hadConstructor = true;
  49337. allowsDirectSuper = state.hadSuperClass;
  49338. }
  49339. this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
  49340. } else if (this.isClassProperty()) {
  49341. if (isPrivate) {
  49342. this.pushClassPrivateProperty(classBody, privateProp);
  49343. } else {
  49344. this.pushClassProperty(classBody, publicProp);
  49345. }
  49346. } else if (isContextual && key2.name === "async" && !this.isLineTerminator()) {
  49347. this.resetPreviousNodeTrailingComments(key2);
  49348. const isGenerator = this.eat(55);
  49349. if (publicMember.optional) {
  49350. this.unexpected(maybeQuestionTokenStartLoc);
  49351. }
  49352. method.kind = "method";
  49353. const isPrivate2 = this.match(136);
  49354. this.parseClassElementName(method);
  49355. this.parsePostMemberNameModifiers(publicMember);
  49356. if (isPrivate2) {
  49357. this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
  49358. } else {
  49359. if (this.isNonstaticConstructor(publicMethod)) {
  49360. this.raise(Errors.ConstructorIsAsync, {
  49361. at: publicMethod.key
  49362. });
  49363. }
  49364. this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
  49365. }
  49366. } else if (isContextual && (key2.name === "get" || key2.name === "set") && !(this.match(55) && this.isLineTerminator())) {
  49367. this.resetPreviousNodeTrailingComments(key2);
  49368. method.kind = key2.name;
  49369. const isPrivate2 = this.match(136);
  49370. this.parseClassElementName(publicMethod);
  49371. if (isPrivate2) {
  49372. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  49373. } else {
  49374. if (this.isNonstaticConstructor(publicMethod)) {
  49375. this.raise(Errors.ConstructorIsAccessor, {
  49376. at: publicMethod.key
  49377. });
  49378. }
  49379. this.pushClassMethod(classBody, publicMethod, false, false, false, false);
  49380. }
  49381. this.checkGetterSetterParams(publicMethod);
  49382. } else if (isContextual && key2.name === "accessor" && !this.isLineTerminator()) {
  49383. this.expectPlugin("decoratorAutoAccessors");
  49384. this.resetPreviousNodeTrailingComments(key2);
  49385. const isPrivate2 = this.match(136);
  49386. this.parseClassElementName(publicProp);
  49387. this.pushClassAccessorProperty(classBody, accessorProp, isPrivate2);
  49388. } else if (this.isLineTerminator()) {
  49389. if (isPrivate) {
  49390. this.pushClassPrivateProperty(classBody, privateProp);
  49391. } else {
  49392. this.pushClassProperty(classBody, publicProp);
  49393. }
  49394. } else {
  49395. this.unexpected();
  49396. }
  49397. }
  49398. parseClassElementName(member) {
  49399. const {
  49400. type,
  49401. value: value2
  49402. } = this.state;
  49403. if ((type === 130 || type === 131) && member.static && value2 === "prototype") {
  49404. this.raise(Errors.StaticPrototype, {
  49405. at: this.state.startLoc
  49406. });
  49407. }
  49408. if (type === 136) {
  49409. if (value2 === "constructor") {
  49410. this.raise(Errors.ConstructorClassPrivateField, {
  49411. at: this.state.startLoc
  49412. });
  49413. }
  49414. const key2 = this.parsePrivateName();
  49415. member.key = key2;
  49416. return key2;
  49417. }
  49418. return this.parsePropertyName(member);
  49419. }
  49420. parseClassStaticBlock(classBody, member) {
  49421. var _member$decorators;
  49422. this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER3);
  49423. const oldLabels = this.state.labels;
  49424. this.state.labels = [];
  49425. this.prodParam.enter(PARAM);
  49426. const body = member.body = [];
  49427. this.parseBlockOrModuleBlockBody(body, void 0, false, 8);
  49428. this.prodParam.exit();
  49429. this.scope.exit();
  49430. this.state.labels = oldLabels;
  49431. classBody.body.push(this.finishNode(member, "StaticBlock"));
  49432. if ((_member$decorators = member.decorators) != null && _member$decorators.length) {
  49433. this.raise(Errors.DecoratorStaticBlock, {
  49434. at: member
  49435. });
  49436. }
  49437. }
  49438. pushClassProperty(classBody, prop) {
  49439. if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
  49440. this.raise(Errors.ConstructorClassField, {
  49441. at: prop.key
  49442. });
  49443. }
  49444. classBody.body.push(this.parseClassProperty(prop));
  49445. }
  49446. pushClassPrivateProperty(classBody, prop) {
  49447. const node2 = this.parseClassPrivateProperty(prop);
  49448. classBody.body.push(node2);
  49449. this.classScope.declarePrivateName(this.getPrivateNameSV(node2.key), CLASS_ELEMENT_OTHER, node2.key.loc.start);
  49450. }
  49451. pushClassAccessorProperty(classBody, prop, isPrivate) {
  49452. if (!isPrivate && !prop.computed) {
  49453. const key2 = prop.key;
  49454. if (key2.name === "constructor" || key2.value === "constructor") {
  49455. this.raise(Errors.ConstructorClassField, {
  49456. at: key2
  49457. });
  49458. }
  49459. }
  49460. const node2 = this.parseClassAccessorProperty(prop);
  49461. classBody.body.push(node2);
  49462. if (isPrivate) {
  49463. this.classScope.declarePrivateName(this.getPrivateNameSV(node2.key), CLASS_ELEMENT_OTHER, node2.key.loc.start);
  49464. }
  49465. }
  49466. pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  49467. classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
  49468. }
  49469. pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  49470. const node2 = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
  49471. classBody.body.push(node2);
  49472. const kind = node2.kind === "get" ? node2.static ? CLASS_ELEMENT_STATIC_GETTER : CLASS_ELEMENT_INSTANCE_GETTER : node2.kind === "set" ? node2.static ? CLASS_ELEMENT_STATIC_SETTER : CLASS_ELEMENT_INSTANCE_SETTER : CLASS_ELEMENT_OTHER;
  49473. this.declareClassPrivateMethodInScope(node2, kind);
  49474. }
  49475. declareClassPrivateMethodInScope(node2, kind) {
  49476. this.classScope.declarePrivateName(this.getPrivateNameSV(node2.key), kind, node2.key.loc.start);
  49477. }
  49478. parsePostMemberNameModifiers(methodOrProp) {
  49479. }
  49480. parseClassPrivateProperty(node2) {
  49481. this.parseInitializer(node2);
  49482. this.semicolon();
  49483. return this.finishNode(node2, "ClassPrivateProperty");
  49484. }
  49485. parseClassProperty(node2) {
  49486. this.parseInitializer(node2);
  49487. this.semicolon();
  49488. return this.finishNode(node2, "ClassProperty");
  49489. }
  49490. parseClassAccessorProperty(node2) {
  49491. this.parseInitializer(node2);
  49492. this.semicolon();
  49493. return this.finishNode(node2, "ClassAccessorProperty");
  49494. }
  49495. parseInitializer(node2) {
  49496. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER3);
  49497. this.expressionScope.enter(newExpressionScope());
  49498. this.prodParam.enter(PARAM);
  49499. node2.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null;
  49500. this.expressionScope.exit();
  49501. this.prodParam.exit();
  49502. this.scope.exit();
  49503. }
  49504. parseClassId(node2, isStatement, optionalId, bindingType = BIND_CLASS) {
  49505. if (tokenIsIdentifier(this.state.type)) {
  49506. node2.id = this.parseIdentifier();
  49507. if (isStatement) {
  49508. this.declareNameFromIdentifier(node2.id, bindingType);
  49509. }
  49510. } else {
  49511. if (optionalId || !isStatement) {
  49512. node2.id = null;
  49513. } else {
  49514. throw this.raise(Errors.MissingClassName, {
  49515. at: this.state.startLoc
  49516. });
  49517. }
  49518. }
  49519. }
  49520. parseClassSuper(node2) {
  49521. node2.superClass = this.eat(81) ? this.parseExprSubscripts() : null;
  49522. }
  49523. parseExport(node2, decorators) {
  49524. const hasDefault = this.maybeParseExportDefaultSpecifier(node2);
  49525. const parseAfterDefault = !hasDefault || this.eat(12);
  49526. const hasStar = parseAfterDefault && this.eatExportStar(node2);
  49527. const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node2);
  49528. const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(12));
  49529. const isFromRequired = hasDefault || hasStar;
  49530. if (hasStar && !hasNamespace) {
  49531. if (hasDefault)
  49532. this.unexpected();
  49533. if (decorators) {
  49534. throw this.raise(Errors.UnsupportedDecoratorExport, {
  49535. at: node2
  49536. });
  49537. }
  49538. this.parseExportFrom(node2, true);
  49539. return this.finishNode(node2, "ExportAllDeclaration");
  49540. }
  49541. const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node2);
  49542. if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) {
  49543. this.unexpected(null, 5);
  49544. }
  49545. if (hasNamespace && parseAfterNamespace) {
  49546. this.unexpected(null, 97);
  49547. }
  49548. let hasDeclaration;
  49549. if (isFromRequired || hasSpecifiers) {
  49550. hasDeclaration = false;
  49551. if (decorators) {
  49552. throw this.raise(Errors.UnsupportedDecoratorExport, {
  49553. at: node2
  49554. });
  49555. }
  49556. this.parseExportFrom(node2, isFromRequired);
  49557. } else {
  49558. hasDeclaration = this.maybeParseExportDeclaration(node2);
  49559. }
  49560. if (isFromRequired || hasSpecifiers || hasDeclaration) {
  49561. var _node2$declaration;
  49562. const node22 = node2;
  49563. this.checkExport(node22, true, false, !!node22.source);
  49564. if (((_node2$declaration = node22.declaration) == null ? void 0 : _node2$declaration.type) === "ClassDeclaration") {
  49565. this.maybeTakeDecorators(decorators, node22.declaration, node22);
  49566. } else if (decorators) {
  49567. throw this.raise(Errors.UnsupportedDecoratorExport, {
  49568. at: node2
  49569. });
  49570. }
  49571. return this.finishNode(node22, "ExportNamedDeclaration");
  49572. }
  49573. if (this.eat(65)) {
  49574. const node22 = node2;
  49575. const decl = this.parseExportDefaultExpression();
  49576. node22.declaration = decl;
  49577. if (decl.type === "ClassDeclaration") {
  49578. this.maybeTakeDecorators(decorators, decl, node22);
  49579. } else if (decorators) {
  49580. throw this.raise(Errors.UnsupportedDecoratorExport, {
  49581. at: node2
  49582. });
  49583. }
  49584. this.checkExport(node22, true, true);
  49585. return this.finishNode(node22, "ExportDefaultDeclaration");
  49586. }
  49587. this.unexpected(null, 5);
  49588. }
  49589. eatExportStar(node2) {
  49590. return this.eat(55);
  49591. }
  49592. maybeParseExportDefaultSpecifier(node2) {
  49593. if (this.isExportDefaultSpecifier()) {
  49594. this.expectPlugin("exportDefaultFrom");
  49595. const specifier = this.startNode();
  49596. specifier.exported = this.parseIdentifier(true);
  49597. node2.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  49598. return true;
  49599. }
  49600. return false;
  49601. }
  49602. maybeParseExportNamespaceSpecifier(node2) {
  49603. if (this.isContextual(93)) {
  49604. if (!node2.specifiers)
  49605. node2.specifiers = [];
  49606. const specifier = this.startNodeAt(this.state.lastTokStartLoc);
  49607. this.next();
  49608. specifier.exported = this.parseModuleExportName();
  49609. node2.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
  49610. return true;
  49611. }
  49612. return false;
  49613. }
  49614. maybeParseExportNamedSpecifiers(node2) {
  49615. if (this.match(5)) {
  49616. if (!node2.specifiers)
  49617. node2.specifiers = [];
  49618. const isTypeExport = node2.exportKind === "type";
  49619. node2.specifiers.push(...this.parseExportSpecifiers(isTypeExport));
  49620. node2.source = null;
  49621. node2.declaration = null;
  49622. if (this.hasPlugin("importAssertions")) {
  49623. node2.assertions = [];
  49624. }
  49625. return true;
  49626. }
  49627. return false;
  49628. }
  49629. maybeParseExportDeclaration(node2) {
  49630. if (this.shouldParseExportDeclaration()) {
  49631. node2.specifiers = [];
  49632. node2.source = null;
  49633. if (this.hasPlugin("importAssertions")) {
  49634. node2.assertions = [];
  49635. }
  49636. node2.declaration = this.parseExportDeclaration(node2);
  49637. return true;
  49638. }
  49639. return false;
  49640. }
  49641. isAsyncFunction() {
  49642. if (!this.isContextual(95))
  49643. return false;
  49644. const next = this.nextTokenStart();
  49645. return !lineBreak3.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
  49646. }
  49647. parseExportDefaultExpression() {
  49648. const expr = this.startNode();
  49649. if (this.match(68)) {
  49650. this.next();
  49651. return this.parseFunction(expr, 1 | 4);
  49652. } else if (this.isAsyncFunction()) {
  49653. this.next();
  49654. this.next();
  49655. return this.parseFunction(expr, 1 | 4 | 8);
  49656. }
  49657. if (this.match(80)) {
  49658. return this.parseClass(expr, true, true);
  49659. }
  49660. if (this.match(26)) {
  49661. if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === true) {
  49662. this.raise(Errors.DecoratorBeforeExport, {
  49663. at: this.state.startLoc
  49664. });
  49665. }
  49666. return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(false), this.startNode()), true, true);
  49667. }
  49668. if (this.match(75) || this.match(74) || this.isLet()) {
  49669. throw this.raise(Errors.UnsupportedDefaultExport, {
  49670. at: this.state.startLoc
  49671. });
  49672. }
  49673. const res = this.parseMaybeAssignAllowIn();
  49674. this.semicolon();
  49675. return res;
  49676. }
  49677. parseExportDeclaration(node2) {
  49678. if (this.match(80)) {
  49679. const node3 = this.parseClass(this.startNode(), true, false);
  49680. return node3;
  49681. }
  49682. return this.parseStatementListItem();
  49683. }
  49684. isExportDefaultSpecifier() {
  49685. const {
  49686. type
  49687. } = this.state;
  49688. if (tokenIsIdentifier(type)) {
  49689. if (type === 95 && !this.state.containsEsc || type === 99) {
  49690. return false;
  49691. }
  49692. if ((type === 128 || type === 127) && !this.state.containsEsc) {
  49693. const {
  49694. type: nextType
  49695. } = this.lookahead();
  49696. if (tokenIsIdentifier(nextType) && nextType !== 97 || nextType === 5) {
  49697. this.expectOnePlugin(["flow", "typescript"]);
  49698. return false;
  49699. }
  49700. }
  49701. } else if (!this.match(65)) {
  49702. return false;
  49703. }
  49704. const next = this.nextTokenStart();
  49705. const hasFrom = this.isUnparsedContextual(next, "from");
  49706. if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.state.type) && hasFrom) {
  49707. return true;
  49708. }
  49709. if (this.match(65) && hasFrom) {
  49710. const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
  49711. return nextAfterFrom === 34 || nextAfterFrom === 39;
  49712. }
  49713. return false;
  49714. }
  49715. parseExportFrom(node2, expect) {
  49716. if (this.eatContextual(97)) {
  49717. node2.source = this.parseImportSource();
  49718. this.checkExport(node2);
  49719. const assertions = this.maybeParseImportAssertions();
  49720. if (assertions) {
  49721. node2.assertions = assertions;
  49722. this.checkJSONModuleImport(node2);
  49723. }
  49724. } else if (expect) {
  49725. this.unexpected();
  49726. }
  49727. this.semicolon();
  49728. }
  49729. shouldParseExportDeclaration() {
  49730. const {
  49731. type
  49732. } = this.state;
  49733. if (type === 26) {
  49734. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  49735. if (this.hasPlugin("decorators")) {
  49736. if (this.getPluginOption("decorators", "decoratorsBeforeExport") === true) {
  49737. this.raise(Errors.DecoratorBeforeExport, {
  49738. at: this.state.startLoc
  49739. });
  49740. }
  49741. return true;
  49742. }
  49743. }
  49744. return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction();
  49745. }
  49746. checkExport(node2, checkNames, isDefault, isFrom) {
  49747. if (checkNames) {
  49748. if (isDefault) {
  49749. this.checkDuplicateExports(node2, "default");
  49750. if (this.hasPlugin("exportDefaultFrom")) {
  49751. var _declaration$extra;
  49752. const declaration = node2.declaration;
  49753. if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) {
  49754. this.raise(Errors.ExportDefaultFromAsIdentifier, {
  49755. at: declaration
  49756. });
  49757. }
  49758. }
  49759. } else if (node2.specifiers && node2.specifiers.length) {
  49760. for (const specifier of node2.specifiers) {
  49761. const {
  49762. exported
  49763. } = specifier;
  49764. const exportName = exported.type === "Identifier" ? exported.name : exported.value;
  49765. this.checkDuplicateExports(specifier, exportName);
  49766. if (!isFrom && specifier.local) {
  49767. const {
  49768. local
  49769. } = specifier;
  49770. if (local.type !== "Identifier") {
  49771. this.raise(Errors.ExportBindingIsString, {
  49772. at: specifier,
  49773. localName: local.value,
  49774. exportName
  49775. });
  49776. } else {
  49777. this.checkReservedWord(local.name, local.loc.start, true, false);
  49778. this.scope.checkLocalExport(local);
  49779. }
  49780. }
  49781. }
  49782. } else if (node2.declaration) {
  49783. if (node2.declaration.type === "FunctionDeclaration" || node2.declaration.type === "ClassDeclaration") {
  49784. const id = node2.declaration.id;
  49785. if (!id)
  49786. throw new Error("Assertion failure");
  49787. this.checkDuplicateExports(node2, id.name);
  49788. } else if (node2.declaration.type === "VariableDeclaration") {
  49789. for (const declaration of node2.declaration.declarations) {
  49790. this.checkDeclaration(declaration.id);
  49791. }
  49792. }
  49793. }
  49794. }
  49795. }
  49796. checkDeclaration(node2) {
  49797. if (node2.type === "Identifier") {
  49798. this.checkDuplicateExports(node2, node2.name);
  49799. } else if (node2.type === "ObjectPattern") {
  49800. for (const prop of node2.properties) {
  49801. this.checkDeclaration(prop);
  49802. }
  49803. } else if (node2.type === "ArrayPattern") {
  49804. for (const elem of node2.elements) {
  49805. if (elem) {
  49806. this.checkDeclaration(elem);
  49807. }
  49808. }
  49809. } else if (node2.type === "ObjectProperty") {
  49810. this.checkDeclaration(node2.value);
  49811. } else if (node2.type === "RestElement") {
  49812. this.checkDeclaration(node2.argument);
  49813. } else if (node2.type === "AssignmentPattern") {
  49814. this.checkDeclaration(node2.left);
  49815. }
  49816. }
  49817. checkDuplicateExports(node2, exportName) {
  49818. if (this.exportedIdentifiers.has(exportName)) {
  49819. if (exportName === "default") {
  49820. this.raise(Errors.DuplicateDefaultExport, {
  49821. at: node2
  49822. });
  49823. } else {
  49824. this.raise(Errors.DuplicateExport, {
  49825. at: node2,
  49826. exportName
  49827. });
  49828. }
  49829. }
  49830. this.exportedIdentifiers.add(exportName);
  49831. }
  49832. parseExportSpecifiers(isInTypeExport) {
  49833. const nodes = [];
  49834. let first = true;
  49835. this.expect(5);
  49836. while (!this.eat(8)) {
  49837. if (first) {
  49838. first = false;
  49839. } else {
  49840. this.expect(12);
  49841. if (this.eat(8))
  49842. break;
  49843. }
  49844. const isMaybeTypeOnly = this.isContextual(128);
  49845. const isString = this.match(131);
  49846. const node2 = this.startNode();
  49847. node2.local = this.parseModuleExportName();
  49848. nodes.push(this.parseExportSpecifier(node2, isString, isInTypeExport, isMaybeTypeOnly));
  49849. }
  49850. return nodes;
  49851. }
  49852. parseExportSpecifier(node2, isString, isInTypeExport, isMaybeTypeOnly) {
  49853. if (this.eatContextual(93)) {
  49854. node2.exported = this.parseModuleExportName();
  49855. } else if (isString) {
  49856. node2.exported = cloneStringLiteral(node2.local);
  49857. } else if (!node2.exported) {
  49858. node2.exported = cloneIdentifier(node2.local);
  49859. }
  49860. return this.finishNode(node2, "ExportSpecifier");
  49861. }
  49862. parseModuleExportName() {
  49863. if (this.match(131)) {
  49864. const result = this.parseStringLiteral(this.state.value);
  49865. const surrogate = result.value.match(loneSurrogate2);
  49866. if (surrogate) {
  49867. this.raise(Errors.ModuleExportNameHasLoneSurrogate, {
  49868. at: result,
  49869. surrogateCharCode: surrogate[0].charCodeAt(0)
  49870. });
  49871. }
  49872. return result;
  49873. }
  49874. return this.parseIdentifier(true);
  49875. }
  49876. isJSONModuleImport(node2) {
  49877. if (node2.assertions != null) {
  49878. return node2.assertions.some(({
  49879. key: key2,
  49880. value: value2
  49881. }) => {
  49882. return value2.value === "json" && (key2.type === "Identifier" ? key2.name === "type" : key2.value === "type");
  49883. });
  49884. }
  49885. return false;
  49886. }
  49887. checkImportReflection(node2) {
  49888. if (node2.module) {
  49889. var _node$assertions;
  49890. if (node2.specifiers.length !== 1 || node2.specifiers[0].type !== "ImportDefaultSpecifier") {
  49891. this.raise(Errors.ImportReflectionNotBinding, {
  49892. at: node2.specifiers[0].loc.start
  49893. });
  49894. }
  49895. if (((_node$assertions = node2.assertions) == null ? void 0 : _node$assertions.length) > 0) {
  49896. this.raise(Errors.ImportReflectionHasAssertion, {
  49897. at: node2.specifiers[0].loc.start
  49898. });
  49899. }
  49900. }
  49901. }
  49902. checkJSONModuleImport(node2) {
  49903. if (this.isJSONModuleImport(node2) && node2.type !== "ExportAllDeclaration") {
  49904. const {
  49905. specifiers
  49906. } = node2;
  49907. if (specifiers != null) {
  49908. const nonDefaultNamedSpecifier = specifiers.find((specifier) => {
  49909. let imported;
  49910. if (specifier.type === "ExportSpecifier") {
  49911. imported = specifier.local;
  49912. } else if (specifier.type === "ImportSpecifier") {
  49913. imported = specifier.imported;
  49914. }
  49915. if (imported !== void 0) {
  49916. return imported.type === "Identifier" ? imported.name !== "default" : imported.value !== "default";
  49917. }
  49918. });
  49919. if (nonDefaultNamedSpecifier !== void 0) {
  49920. this.raise(Errors.ImportJSONBindingNotDefault, {
  49921. at: nonDefaultNamedSpecifier.loc.start
  49922. });
  49923. }
  49924. }
  49925. }
  49926. }
  49927. parseMaybeImportReflection(node2) {
  49928. let isImportReflection = false;
  49929. if (this.isContextual(125)) {
  49930. const lookahead3 = this.lookahead();
  49931. const nextType = lookahead3.type;
  49932. if (tokenIsIdentifier(nextType)) {
  49933. if (nextType !== 97) {
  49934. isImportReflection = true;
  49935. } else {
  49936. const nextNextTokenFirstChar = this.input.charCodeAt(this.nextTokenStartSince(lookahead3.end));
  49937. if (nextNextTokenFirstChar === 102) {
  49938. isImportReflection = true;
  49939. }
  49940. }
  49941. } else if (nextType !== 12) {
  49942. isImportReflection = true;
  49943. }
  49944. }
  49945. if (isImportReflection) {
  49946. this.expectPlugin("importReflection");
  49947. this.next();
  49948. node2.module = true;
  49949. } else if (this.hasPlugin("importReflection")) {
  49950. node2.module = false;
  49951. }
  49952. }
  49953. parseImport(node2) {
  49954. node2.specifiers = [];
  49955. if (!this.match(131)) {
  49956. this.parseMaybeImportReflection(node2);
  49957. const hasDefault = this.maybeParseDefaultImportSpecifier(node2);
  49958. const parseNext = !hasDefault || this.eat(12);
  49959. const hasStar = parseNext && this.maybeParseStarImportSpecifier(node2);
  49960. if (parseNext && !hasStar)
  49961. this.parseNamedImportSpecifiers(node2);
  49962. this.expectContextual(97);
  49963. }
  49964. node2.source = this.parseImportSource();
  49965. const assertions = this.maybeParseImportAssertions();
  49966. if (assertions) {
  49967. node2.assertions = assertions;
  49968. } else {
  49969. const attributes = this.maybeParseModuleAttributes();
  49970. if (attributes) {
  49971. node2.attributes = attributes;
  49972. }
  49973. }
  49974. this.checkImportReflection(node2);
  49975. this.checkJSONModuleImport(node2);
  49976. this.semicolon();
  49977. return this.finishNode(node2, "ImportDeclaration");
  49978. }
  49979. parseImportSource() {
  49980. if (!this.match(131))
  49981. this.unexpected();
  49982. return this.parseExprAtom();
  49983. }
  49984. shouldParseDefaultImport(node2) {
  49985. return tokenIsIdentifier(this.state.type);
  49986. }
  49987. parseImportSpecifierLocal(node2, specifier, type) {
  49988. specifier.local = this.parseIdentifier();
  49989. node2.specifiers.push(this.finishImportSpecifier(specifier, type));
  49990. }
  49991. finishImportSpecifier(specifier, type, bindingType = BIND_LEXICAL3) {
  49992. this.checkLVal(specifier.local, {
  49993. in: {
  49994. type
  49995. },
  49996. binding: bindingType
  49997. });
  49998. return this.finishNode(specifier, type);
  49999. }
  50000. parseAssertEntries() {
  50001. const attrs = [];
  50002. const attrNames = /* @__PURE__ */ new Set();
  50003. do {
  50004. if (this.match(8)) {
  50005. break;
  50006. }
  50007. const node2 = this.startNode();
  50008. const keyName = this.state.value;
  50009. if (attrNames.has(keyName)) {
  50010. this.raise(Errors.ModuleAttributesWithDuplicateKeys, {
  50011. at: this.state.startLoc,
  50012. key: keyName
  50013. });
  50014. }
  50015. attrNames.add(keyName);
  50016. if (this.match(131)) {
  50017. node2.key = this.parseStringLiteral(keyName);
  50018. } else {
  50019. node2.key = this.parseIdentifier(true);
  50020. }
  50021. this.expect(14);
  50022. if (!this.match(131)) {
  50023. throw this.raise(Errors.ModuleAttributeInvalidValue, {
  50024. at: this.state.startLoc
  50025. });
  50026. }
  50027. node2.value = this.parseStringLiteral(this.state.value);
  50028. attrs.push(this.finishNode(node2, "ImportAttribute"));
  50029. } while (this.eat(12));
  50030. return attrs;
  50031. }
  50032. maybeParseModuleAttributes() {
  50033. if (this.match(76) && !this.hasPrecedingLineBreak()) {
  50034. this.expectPlugin("moduleAttributes");
  50035. this.next();
  50036. } else {
  50037. if (this.hasPlugin("moduleAttributes"))
  50038. return [];
  50039. return null;
  50040. }
  50041. const attrs = [];
  50042. const attributes = /* @__PURE__ */ new Set();
  50043. do {
  50044. const node2 = this.startNode();
  50045. node2.key = this.parseIdentifier(true);
  50046. if (node2.key.name !== "type") {
  50047. this.raise(Errors.ModuleAttributeDifferentFromType, {
  50048. at: node2.key
  50049. });
  50050. }
  50051. if (attributes.has(node2.key.name)) {
  50052. this.raise(Errors.ModuleAttributesWithDuplicateKeys, {
  50053. at: node2.key,
  50054. key: node2.key.name
  50055. });
  50056. }
  50057. attributes.add(node2.key.name);
  50058. this.expect(14);
  50059. if (!this.match(131)) {
  50060. throw this.raise(Errors.ModuleAttributeInvalidValue, {
  50061. at: this.state.startLoc
  50062. });
  50063. }
  50064. node2.value = this.parseStringLiteral(this.state.value);
  50065. this.finishNode(node2, "ImportAttribute");
  50066. attrs.push(node2);
  50067. } while (this.eat(12));
  50068. return attrs;
  50069. }
  50070. maybeParseImportAssertions() {
  50071. if (this.isContextual(94) && !this.hasPrecedingLineBreak()) {
  50072. this.expectPlugin("importAssertions");
  50073. this.next();
  50074. } else {
  50075. if (this.hasPlugin("importAssertions"))
  50076. return [];
  50077. return null;
  50078. }
  50079. this.eat(5);
  50080. const attrs = this.parseAssertEntries();
  50081. this.eat(8);
  50082. return attrs;
  50083. }
  50084. maybeParseDefaultImportSpecifier(node2) {
  50085. if (this.shouldParseDefaultImport(node2)) {
  50086. this.parseImportSpecifierLocal(node2, this.startNode(), "ImportDefaultSpecifier");
  50087. return true;
  50088. }
  50089. return false;
  50090. }
  50091. maybeParseStarImportSpecifier(node2) {
  50092. if (this.match(55)) {
  50093. const specifier = this.startNode();
  50094. this.next();
  50095. this.expectContextual(93);
  50096. this.parseImportSpecifierLocal(node2, specifier, "ImportNamespaceSpecifier");
  50097. return true;
  50098. }
  50099. return false;
  50100. }
  50101. parseNamedImportSpecifiers(node2) {
  50102. let first = true;
  50103. this.expect(5);
  50104. while (!this.eat(8)) {
  50105. if (first) {
  50106. first = false;
  50107. } else {
  50108. if (this.eat(14)) {
  50109. throw this.raise(Errors.DestructureNamedImport, {
  50110. at: this.state.startLoc
  50111. });
  50112. }
  50113. this.expect(12);
  50114. if (this.eat(8))
  50115. break;
  50116. }
  50117. const specifier = this.startNode();
  50118. const importedIsString = this.match(131);
  50119. const isMaybeTypeOnly = this.isContextual(128);
  50120. specifier.imported = this.parseModuleExportName();
  50121. const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node2.importKind === "type" || node2.importKind === "typeof", isMaybeTypeOnly, void 0);
  50122. node2.specifiers.push(importSpecifier);
  50123. }
  50124. }
  50125. parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) {
  50126. if (this.eatContextual(93)) {
  50127. specifier.local = this.parseIdentifier();
  50128. } else {
  50129. const {
  50130. imported
  50131. } = specifier;
  50132. if (importedIsString) {
  50133. throw this.raise(Errors.ImportBindingIsString, {
  50134. at: specifier,
  50135. importName: imported.value
  50136. });
  50137. }
  50138. this.checkReservedWord(imported.name, specifier.loc.start, true, true);
  50139. if (!specifier.local) {
  50140. specifier.local = cloneIdentifier(imported);
  50141. }
  50142. }
  50143. return this.finishImportSpecifier(specifier, "ImportSpecifier", bindingType);
  50144. }
  50145. isThisParam(param) {
  50146. return param.type === "Identifier" && param.name === "this";
  50147. }
  50148. };
  50149. var Parser5 = class extends StatementParser {
  50150. constructor(options, input) {
  50151. options = getOptions3(options);
  50152. super(options, input);
  50153. this.options = options;
  50154. this.initializeScopes();
  50155. this.plugins = pluginsMap(this.options.plugins);
  50156. this.filename = options.sourceFilename;
  50157. }
  50158. getScopeHandler() {
  50159. return ScopeHandler;
  50160. }
  50161. parse() {
  50162. this.enterInitialScopes();
  50163. const file = this.startNode();
  50164. const program = this.startNode();
  50165. this.nextToken();
  50166. file.errors = null;
  50167. this.parseTopLevel(file, program);
  50168. file.errors = this.state.errors;
  50169. return file;
  50170. }
  50171. };
  50172. function pluginsMap(plugins) {
  50173. const pluginMap = /* @__PURE__ */ new Map();
  50174. for (const plugin2 of plugins) {
  50175. const [name2, options] = Array.isArray(plugin2) ? plugin2 : [plugin2, {}];
  50176. if (!pluginMap.has(name2))
  50177. pluginMap.set(name2, options || {});
  50178. }
  50179. return pluginMap;
  50180. }
  50181. function parse9(input, options) {
  50182. var _options;
  50183. if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
  50184. options = Object.assign({}, options);
  50185. try {
  50186. options.sourceType = "module";
  50187. const parser = getParser(options, input);
  50188. const ast = parser.parse();
  50189. if (parser.sawUnambiguousESM) {
  50190. return ast;
  50191. }
  50192. if (parser.ambiguousScriptDifferentAst) {
  50193. try {
  50194. options.sourceType = "script";
  50195. return getParser(options, input).parse();
  50196. } catch (_unused) {
  50197. }
  50198. } else {
  50199. ast.program.sourceType = "script";
  50200. }
  50201. return ast;
  50202. } catch (moduleError) {
  50203. try {
  50204. options.sourceType = "script";
  50205. return getParser(options, input).parse();
  50206. } catch (_unused2) {
  50207. }
  50208. throw moduleError;
  50209. }
  50210. } else {
  50211. return getParser(options, input).parse();
  50212. }
  50213. }
  50214. function parseExpression(input, options) {
  50215. const parser = getParser(options, input);
  50216. if (parser.options.strictMode) {
  50217. parser.state.strict = true;
  50218. }
  50219. return parser.getExpression();
  50220. }
  50221. function generateExportedTokenTypes(internalTokenTypes) {
  50222. const tokenTypes2 = {};
  50223. for (const typeName of Object.keys(internalTokenTypes)) {
  50224. tokenTypes2[typeName] = getExportedToken(internalTokenTypes[typeName]);
  50225. }
  50226. return tokenTypes2;
  50227. }
  50228. var tokTypes = generateExportedTokenTypes(tt);
  50229. function getParser(options, input) {
  50230. let cls = Parser5;
  50231. if (options != null && options.plugins) {
  50232. validatePlugins(options.plugins);
  50233. cls = getParserClass(options.plugins);
  50234. }
  50235. return new cls(options, input);
  50236. }
  50237. var parserClassCache = {};
  50238. function getParserClass(pluginsFromOptions) {
  50239. const pluginList = mixinPluginNames.filter((name2) => hasPlugin(pluginsFromOptions, name2));
  50240. const key2 = pluginList.join("/");
  50241. let cls = parserClassCache[key2];
  50242. if (!cls) {
  50243. cls = Parser5;
  50244. for (const plugin2 of pluginList) {
  50245. cls = mixinPlugins[plugin2](cls);
  50246. }
  50247. parserClassCache[key2] = cls;
  50248. }
  50249. return cls;
  50250. }
  50251. exports.parse = parse9;
  50252. exports.parseExpression = parseExpression;
  50253. exports.tokTypes = tokTypes;
  50254. }
  50255. });
  50256. // node_modules/@babel/helper-hoist-variables/lib/index.js
  50257. var require_lib10 = __commonJS({
  50258. "node_modules/@babel/helper-hoist-variables/lib/index.js"(exports) {
  50259. "use strict";
  50260. Object.defineProperty(exports, "__esModule", {
  50261. value: true
  50262. });
  50263. exports.default = hoistVariables;
  50264. var _t = require_lib3();
  50265. var {
  50266. assignmentExpression,
  50267. expressionStatement,
  50268. identifier
  50269. } = _t;
  50270. var visitor = {
  50271. Scope(path, state) {
  50272. if (state.kind === "let")
  50273. path.skip();
  50274. },
  50275. FunctionParent(path) {
  50276. path.skip();
  50277. },
  50278. VariableDeclaration(path, state) {
  50279. if (state.kind && path.node.kind !== state.kind)
  50280. return;
  50281. const nodes = [];
  50282. const declarations = path.get("declarations");
  50283. let firstId;
  50284. for (const declar of declarations) {
  50285. firstId = declar.node.id;
  50286. if (declar.node.init) {
  50287. nodes.push(expressionStatement(assignmentExpression("=", declar.node.id, declar.node.init)));
  50288. }
  50289. for (const name2 of Object.keys(declar.getBindingIdentifiers())) {
  50290. state.emit(identifier(name2), name2, declar.node.init !== null);
  50291. }
  50292. }
  50293. if (path.parentPath.isFor({
  50294. left: path.node
  50295. })) {
  50296. path.replaceWith(firstId);
  50297. } else {
  50298. path.replaceWithMultiple(nodes);
  50299. }
  50300. }
  50301. };
  50302. function hoistVariables(path, emit, kind = "var") {
  50303. path.traverse(visitor, {
  50304. kind,
  50305. emit
  50306. });
  50307. }
  50308. }
  50309. });
  50310. // node_modules/@babel/traverse/lib/path/replacement.js
  50311. var require_replacement = __commonJS({
  50312. "node_modules/@babel/traverse/lib/path/replacement.js"(exports) {
  50313. "use strict";
  50314. Object.defineProperty(exports, "__esModule", {
  50315. value: true
  50316. });
  50317. exports._replaceWith = _replaceWith;
  50318. exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
  50319. exports.replaceInline = replaceInline;
  50320. exports.replaceWith = replaceWith;
  50321. exports.replaceWithMultiple = replaceWithMultiple;
  50322. exports.replaceWithSourceString = replaceWithSourceString;
  50323. var _codeFrame = require_lib8();
  50324. var _index = require_lib13();
  50325. var _index2 = require_path();
  50326. var _cache = require_cache();
  50327. var _parser = require_lib9();
  50328. var _t = require_lib3();
  50329. var _helperHoistVariables = require_lib10();
  50330. var {
  50331. FUNCTION_TYPES,
  50332. arrowFunctionExpression,
  50333. assignmentExpression,
  50334. awaitExpression,
  50335. blockStatement,
  50336. callExpression,
  50337. cloneNode,
  50338. expressionStatement,
  50339. identifier,
  50340. inheritLeadingComments,
  50341. inheritTrailingComments,
  50342. inheritsComments,
  50343. isExpression,
  50344. isProgram,
  50345. isStatement,
  50346. removeComments,
  50347. returnStatement,
  50348. toSequenceExpression,
  50349. validate,
  50350. yieldExpression
  50351. } = _t;
  50352. function replaceWithMultiple(nodes) {
  50353. var _pathCache$get;
  50354. this.resync();
  50355. nodes = this._verifyNodeList(nodes);
  50356. inheritLeadingComments(nodes[0], this.node);
  50357. inheritTrailingComments(nodes[nodes.length - 1], this.node);
  50358. (_pathCache$get = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get.delete(this.node);
  50359. this.node = this.container[this.key] = null;
  50360. const paths = this.insertAfter(nodes);
  50361. if (this.node) {
  50362. this.requeue();
  50363. } else {
  50364. this.remove();
  50365. }
  50366. return paths;
  50367. }
  50368. function replaceWithSourceString(replacement) {
  50369. this.resync();
  50370. let ast;
  50371. try {
  50372. replacement = `(${replacement})`;
  50373. ast = (0, _parser.parse)(replacement);
  50374. } catch (err) {
  50375. const loc = err.loc;
  50376. if (loc) {
  50377. err.message += " - make sure this is an expression.\n" + (0, _codeFrame.codeFrameColumns)(replacement, {
  50378. start: {
  50379. line: loc.line,
  50380. column: loc.column + 1
  50381. }
  50382. });
  50383. err.code = "BABEL_REPLACE_SOURCE_ERROR";
  50384. }
  50385. throw err;
  50386. }
  50387. const expressionAST = ast.program.body[0].expression;
  50388. _index.default.removeProperties(expressionAST);
  50389. return this.replaceWith(expressionAST);
  50390. }
  50391. function replaceWith(replacementPath) {
  50392. this.resync();
  50393. if (this.removed) {
  50394. throw new Error("You can't replace this node, we've already removed it");
  50395. }
  50396. let replacement = replacementPath instanceof _index2.default ? replacementPath.node : replacementPath;
  50397. if (!replacement) {
  50398. throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
  50399. }
  50400. if (this.node === replacement) {
  50401. return [this];
  50402. }
  50403. if (this.isProgram() && !isProgram(replacement)) {
  50404. throw new Error("You can only replace a Program root node with another Program node");
  50405. }
  50406. if (Array.isArray(replacement)) {
  50407. throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
  50408. }
  50409. if (typeof replacement === "string") {
  50410. throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
  50411. }
  50412. let nodePath = "";
  50413. if (this.isNodeType("Statement") && isExpression(replacement)) {
  50414. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
  50415. replacement = expressionStatement(replacement);
  50416. nodePath = "expression";
  50417. }
  50418. }
  50419. if (this.isNodeType("Expression") && isStatement(replacement)) {
  50420. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
  50421. return this.replaceExpressionWithStatements([replacement]);
  50422. }
  50423. }
  50424. const oldNode = this.node;
  50425. if (oldNode) {
  50426. inheritsComments(replacement, oldNode);
  50427. removeComments(oldNode);
  50428. }
  50429. this._replaceWith(replacement);
  50430. this.type = replacement.type;
  50431. this.setScope();
  50432. this.requeue();
  50433. return [nodePath ? this.get(nodePath) : this];
  50434. }
  50435. function _replaceWith(node2) {
  50436. var _pathCache$get2;
  50437. if (!this.container) {
  50438. throw new ReferenceError("Container is falsy");
  50439. }
  50440. if (this.inList) {
  50441. validate(this.parent, this.key, [node2]);
  50442. } else {
  50443. validate(this.parent, this.key, node2);
  50444. }
  50445. this.debug(`Replace with ${node2 == null ? void 0 : node2.type}`);
  50446. (_pathCache$get2 = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get2.set(node2, this).delete(this.node);
  50447. this.node = this.container[this.key] = node2;
  50448. }
  50449. function replaceExpressionWithStatements(nodes) {
  50450. this.resync();
  50451. const nodesAsSequenceExpression = toSequenceExpression(nodes, this.scope);
  50452. if (nodesAsSequenceExpression) {
  50453. return this.replaceWith(nodesAsSequenceExpression)[0].get("expressions");
  50454. }
  50455. const functionParent = this.getFunctionParent();
  50456. const isParentAsync = functionParent == null ? void 0 : functionParent.is("async");
  50457. const isParentGenerator = functionParent == null ? void 0 : functionParent.is("generator");
  50458. const container = arrowFunctionExpression([], blockStatement(nodes));
  50459. this.replaceWith(callExpression(container, []));
  50460. const callee = this.get("callee");
  50461. (0, _helperHoistVariables.default)(callee.get("body"), (id) => {
  50462. this.scope.push({
  50463. id
  50464. });
  50465. }, "var");
  50466. const completionRecords = this.get("callee").getCompletionRecords();
  50467. for (const path of completionRecords) {
  50468. if (!path.isExpressionStatement())
  50469. continue;
  50470. const loop = path.findParent((path2) => path2.isLoop());
  50471. if (loop) {
  50472. let uid = loop.getData("expressionReplacementReturnUid");
  50473. if (!uid) {
  50474. uid = callee.scope.generateDeclaredUidIdentifier("ret");
  50475. callee.get("body").pushContainer("body", returnStatement(cloneNode(uid)));
  50476. loop.setData("expressionReplacementReturnUid", uid);
  50477. } else {
  50478. uid = identifier(uid.name);
  50479. }
  50480. path.get("expression").replaceWith(assignmentExpression("=", cloneNode(uid), path.node.expression));
  50481. } else {
  50482. path.replaceWith(returnStatement(path.node.expression));
  50483. }
  50484. }
  50485. callee.arrowFunctionToExpression();
  50486. const newCallee = callee;
  50487. const needToAwaitFunction = isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", FUNCTION_TYPES);
  50488. const needToYieldFunction = isParentGenerator && _index.default.hasType(this.get("callee.body").node, "YieldExpression", FUNCTION_TYPES);
  50489. if (needToAwaitFunction) {
  50490. newCallee.set("async", true);
  50491. if (!needToYieldFunction) {
  50492. this.replaceWith(awaitExpression(this.node));
  50493. }
  50494. }
  50495. if (needToYieldFunction) {
  50496. newCallee.set("generator", true);
  50497. this.replaceWith(yieldExpression(this.node, true));
  50498. }
  50499. return newCallee.get("body.body");
  50500. }
  50501. function replaceInline(nodes) {
  50502. this.resync();
  50503. if (Array.isArray(nodes)) {
  50504. if (Array.isArray(this.container)) {
  50505. nodes = this._verifyNodeList(nodes);
  50506. const paths = this._containerInsertAfter(nodes);
  50507. this.remove();
  50508. return paths;
  50509. } else {
  50510. return this.replaceWithMultiple(nodes);
  50511. }
  50512. } else {
  50513. return this.replaceWith(nodes);
  50514. }
  50515. }
  50516. }
  50517. });
  50518. // node_modules/@babel/traverse/lib/path/evaluation.js
  50519. var require_evaluation = __commonJS({
  50520. "node_modules/@babel/traverse/lib/path/evaluation.js"(exports) {
  50521. "use strict";
  50522. Object.defineProperty(exports, "__esModule", {
  50523. value: true
  50524. });
  50525. exports.evaluate = evaluate;
  50526. exports.evaluateTruthy = evaluateTruthy;
  50527. var VALID_CALLEES = ["String", "Number", "Math"];
  50528. var INVALID_METHODS = ["random"];
  50529. function isValidCallee(val) {
  50530. return VALID_CALLEES.includes(val);
  50531. }
  50532. function isInvalidMethod(val) {
  50533. return INVALID_METHODS.includes(val);
  50534. }
  50535. function evaluateTruthy() {
  50536. const res = this.evaluate();
  50537. if (res.confident)
  50538. return !!res.value;
  50539. }
  50540. function deopt(path, state) {
  50541. if (!state.confident)
  50542. return;
  50543. state.deoptPath = path;
  50544. state.confident = false;
  50545. }
  50546. var Globals = /* @__PURE__ */ new Map([["undefined", void 0], ["Infinity", Infinity], ["NaN", NaN]]);
  50547. function evaluateCached(path, state) {
  50548. const {
  50549. node: node2
  50550. } = path;
  50551. const {
  50552. seen
  50553. } = state;
  50554. if (seen.has(node2)) {
  50555. const existing = seen.get(node2);
  50556. if (existing.resolved) {
  50557. return existing.value;
  50558. } else {
  50559. deopt(path, state);
  50560. return;
  50561. }
  50562. } else {
  50563. const item = {
  50564. resolved: false
  50565. };
  50566. seen.set(node2, item);
  50567. const val = _evaluate(path, state);
  50568. if (state.confident) {
  50569. item.resolved = true;
  50570. item.value = val;
  50571. }
  50572. return val;
  50573. }
  50574. }
  50575. function _evaluate(path, state) {
  50576. if (!state.confident)
  50577. return;
  50578. if (path.isSequenceExpression()) {
  50579. const exprs = path.get("expressions");
  50580. return evaluateCached(exprs[exprs.length - 1], state);
  50581. }
  50582. if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
  50583. return path.node.value;
  50584. }
  50585. if (path.isNullLiteral()) {
  50586. return null;
  50587. }
  50588. if (path.isTemplateLiteral()) {
  50589. return evaluateQuasis(path, path.node.quasis, state);
  50590. }
  50591. if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
  50592. const object = path.get("tag.object");
  50593. const {
  50594. node: {
  50595. name: name2
  50596. }
  50597. } = object;
  50598. const property = path.get("tag.property");
  50599. if (object.isIdentifier() && name2 === "String" && !path.scope.getBinding(name2) && property.isIdentifier() && property.node.name === "raw") {
  50600. return evaluateQuasis(path, path.node.quasi.quasis, state, true);
  50601. }
  50602. }
  50603. if (path.isConditionalExpression()) {
  50604. const testResult = evaluateCached(path.get("test"), state);
  50605. if (!state.confident)
  50606. return;
  50607. if (testResult) {
  50608. return evaluateCached(path.get("consequent"), state);
  50609. } else {
  50610. return evaluateCached(path.get("alternate"), state);
  50611. }
  50612. }
  50613. if (path.isExpressionWrapper()) {
  50614. return evaluateCached(path.get("expression"), state);
  50615. }
  50616. if (path.isMemberExpression() && !path.parentPath.isCallExpression({
  50617. callee: path.node
  50618. })) {
  50619. const property = path.get("property");
  50620. const object = path.get("object");
  50621. if (object.isLiteral()) {
  50622. const value2 = object.node.value;
  50623. const type = typeof value2;
  50624. let key2 = null;
  50625. if (path.node.computed) {
  50626. key2 = evaluateCached(property, state);
  50627. if (!state.confident)
  50628. return;
  50629. } else if (property.isIdentifier()) {
  50630. key2 = property.node.name;
  50631. }
  50632. if ((type === "number" || type === "string") && key2 != null && (typeof key2 === "number" || typeof key2 === "string")) {
  50633. return value2[key2];
  50634. }
  50635. }
  50636. }
  50637. if (path.isReferencedIdentifier()) {
  50638. const binding = path.scope.getBinding(path.node.name);
  50639. if (binding) {
  50640. if (binding.constantViolations.length > 0 || path.node.start < binding.path.node.end) {
  50641. deopt(binding.path, state);
  50642. return;
  50643. }
  50644. if (binding.hasValue) {
  50645. return binding.value;
  50646. }
  50647. }
  50648. const name2 = path.node.name;
  50649. if (Globals.has(name2)) {
  50650. if (!binding) {
  50651. return Globals.get(name2);
  50652. }
  50653. deopt(binding.path, state);
  50654. return;
  50655. }
  50656. const resolved = path.resolve();
  50657. if (resolved === path) {
  50658. deopt(path, state);
  50659. return;
  50660. } else {
  50661. return evaluateCached(resolved, state);
  50662. }
  50663. }
  50664. if (path.isUnaryExpression({
  50665. prefix: true
  50666. })) {
  50667. if (path.node.operator === "void") {
  50668. return void 0;
  50669. }
  50670. const argument = path.get("argument");
  50671. if (path.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
  50672. return "function";
  50673. }
  50674. const arg = evaluateCached(argument, state);
  50675. if (!state.confident)
  50676. return;
  50677. switch (path.node.operator) {
  50678. case "!":
  50679. return !arg;
  50680. case "+":
  50681. return +arg;
  50682. case "-":
  50683. return -arg;
  50684. case "~":
  50685. return ~arg;
  50686. case "typeof":
  50687. return typeof arg;
  50688. }
  50689. }
  50690. if (path.isArrayExpression()) {
  50691. const arr = [];
  50692. const elems = path.get("elements");
  50693. for (const elem of elems) {
  50694. const elemValue = elem.evaluate();
  50695. if (elemValue.confident) {
  50696. arr.push(elemValue.value);
  50697. } else {
  50698. deopt(elemValue.deopt, state);
  50699. return;
  50700. }
  50701. }
  50702. return arr;
  50703. }
  50704. if (path.isObjectExpression()) {
  50705. const obj = {};
  50706. const props = path.get("properties");
  50707. for (const prop of props) {
  50708. if (prop.isObjectMethod() || prop.isSpreadElement()) {
  50709. deopt(prop, state);
  50710. return;
  50711. }
  50712. const keyPath = prop.get("key");
  50713. let key2;
  50714. if (prop.node.computed) {
  50715. key2 = keyPath.evaluate();
  50716. if (!key2.confident) {
  50717. deopt(key2.deopt, state);
  50718. return;
  50719. }
  50720. key2 = key2.value;
  50721. } else if (keyPath.isIdentifier()) {
  50722. key2 = keyPath.node.name;
  50723. } else {
  50724. key2 = keyPath.node.value;
  50725. }
  50726. const valuePath = prop.get("value");
  50727. let value2 = valuePath.evaluate();
  50728. if (!value2.confident) {
  50729. deopt(value2.deopt, state);
  50730. return;
  50731. }
  50732. value2 = value2.value;
  50733. obj[key2] = value2;
  50734. }
  50735. return obj;
  50736. }
  50737. if (path.isLogicalExpression()) {
  50738. const wasConfident = state.confident;
  50739. const left = evaluateCached(path.get("left"), state);
  50740. const leftConfident = state.confident;
  50741. state.confident = wasConfident;
  50742. const right = evaluateCached(path.get("right"), state);
  50743. const rightConfident = state.confident;
  50744. switch (path.node.operator) {
  50745. case "||":
  50746. state.confident = leftConfident && (!!left || rightConfident);
  50747. if (!state.confident)
  50748. return;
  50749. return left || right;
  50750. case "&&":
  50751. state.confident = leftConfident && (!left || rightConfident);
  50752. if (!state.confident)
  50753. return;
  50754. return left && right;
  50755. case "??":
  50756. state.confident = leftConfident && (left != null || rightConfident);
  50757. if (!state.confident)
  50758. return;
  50759. return left != null ? left : right;
  50760. }
  50761. }
  50762. if (path.isBinaryExpression()) {
  50763. const left = evaluateCached(path.get("left"), state);
  50764. if (!state.confident)
  50765. return;
  50766. const right = evaluateCached(path.get("right"), state);
  50767. if (!state.confident)
  50768. return;
  50769. switch (path.node.operator) {
  50770. case "-":
  50771. return left - right;
  50772. case "+":
  50773. return left + right;
  50774. case "/":
  50775. return left / right;
  50776. case "*":
  50777. return left * right;
  50778. case "%":
  50779. return left % right;
  50780. case "**":
  50781. return Math.pow(left, right);
  50782. case "<":
  50783. return left < right;
  50784. case ">":
  50785. return left > right;
  50786. case "<=":
  50787. return left <= right;
  50788. case ">=":
  50789. return left >= right;
  50790. case "==":
  50791. return left == right;
  50792. case "!=":
  50793. return left != right;
  50794. case "===":
  50795. return left === right;
  50796. case "!==":
  50797. return left !== right;
  50798. case "|":
  50799. return left | right;
  50800. case "&":
  50801. return left & right;
  50802. case "^":
  50803. return left ^ right;
  50804. case "<<":
  50805. return left << right;
  50806. case ">>":
  50807. return left >> right;
  50808. case ">>>":
  50809. return left >>> right;
  50810. }
  50811. }
  50812. if (path.isCallExpression()) {
  50813. const callee = path.get("callee");
  50814. let context;
  50815. let func;
  50816. if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name) && isValidCallee(callee.node.name)) {
  50817. func = global[callee.node.name];
  50818. }
  50819. if (callee.isMemberExpression()) {
  50820. const object = callee.get("object");
  50821. const property = callee.get("property");
  50822. if (object.isIdentifier() && property.isIdentifier() && isValidCallee(object.node.name) && !isInvalidMethod(property.node.name)) {
  50823. context = global[object.node.name];
  50824. func = context[property.node.name];
  50825. }
  50826. if (object.isLiteral() && property.isIdentifier()) {
  50827. const type = typeof object.node.value;
  50828. if (type === "string" || type === "number") {
  50829. context = object.node.value;
  50830. func = context[property.node.name];
  50831. }
  50832. }
  50833. }
  50834. if (func) {
  50835. const args = path.get("arguments").map((arg) => evaluateCached(arg, state));
  50836. if (!state.confident)
  50837. return;
  50838. return func.apply(context, args);
  50839. }
  50840. }
  50841. deopt(path, state);
  50842. }
  50843. function evaluateQuasis(path, quasis, state, raw = false) {
  50844. let str = "";
  50845. let i = 0;
  50846. const exprs = path.isTemplateLiteral() ? path.get("expressions") : path.get("quasi.expressions");
  50847. for (const elem of quasis) {
  50848. if (!state.confident)
  50849. break;
  50850. str += raw ? elem.value.raw : elem.value.cooked;
  50851. const expr = exprs[i++];
  50852. if (expr)
  50853. str += String(evaluateCached(expr, state));
  50854. }
  50855. if (!state.confident)
  50856. return;
  50857. return str;
  50858. }
  50859. function evaluate() {
  50860. const state = {
  50861. confident: true,
  50862. deoptPath: null,
  50863. seen: /* @__PURE__ */ new Map()
  50864. };
  50865. let value2 = evaluateCached(this, state);
  50866. if (!state.confident)
  50867. value2 = void 0;
  50868. return {
  50869. confident: state.confident,
  50870. deopt: state.deoptPath,
  50871. value: value2
  50872. };
  50873. }
  50874. }
  50875. });
  50876. // node_modules/@babel/template/lib/formatters.js
  50877. var require_formatters = __commonJS({
  50878. "node_modules/@babel/template/lib/formatters.js"(exports) {
  50879. "use strict";
  50880. Object.defineProperty(exports, "__esModule", {
  50881. value: true
  50882. });
  50883. exports.statements = exports.statement = exports.smart = exports.program = exports.expression = void 0;
  50884. var _t = require_lib3();
  50885. var {
  50886. assertExpressionStatement
  50887. } = _t;
  50888. function makeStatementFormatter(fn) {
  50889. return {
  50890. code: (str) => `/* @babel/template */;
  50891. ${str}`,
  50892. validate: () => {
  50893. },
  50894. unwrap: (ast) => {
  50895. return fn(ast.program.body.slice(1));
  50896. }
  50897. };
  50898. }
  50899. var smart = makeStatementFormatter((body) => {
  50900. if (body.length > 1) {
  50901. return body;
  50902. } else {
  50903. return body[0];
  50904. }
  50905. });
  50906. exports.smart = smart;
  50907. var statements = makeStatementFormatter((body) => body);
  50908. exports.statements = statements;
  50909. var statement = makeStatementFormatter((body) => {
  50910. if (body.length === 0) {
  50911. throw new Error("Found nothing to return.");
  50912. }
  50913. if (body.length > 1) {
  50914. throw new Error("Found multiple statements but wanted one");
  50915. }
  50916. return body[0];
  50917. });
  50918. exports.statement = statement;
  50919. var expression = {
  50920. code: (str) => `(
  50921. ${str}
  50922. )`,
  50923. validate: (ast) => {
  50924. if (ast.program.body.length > 1) {
  50925. throw new Error("Found multiple statements but wanted one");
  50926. }
  50927. if (expression.unwrap(ast).start === 0) {
  50928. throw new Error("Parse result included parens.");
  50929. }
  50930. },
  50931. unwrap: ({
  50932. program: program2
  50933. }) => {
  50934. const [stmt] = program2.body;
  50935. assertExpressionStatement(stmt);
  50936. return stmt.expression;
  50937. }
  50938. };
  50939. exports.expression = expression;
  50940. var program = {
  50941. code: (str) => str,
  50942. validate: () => {
  50943. },
  50944. unwrap: (ast) => ast.program
  50945. };
  50946. exports.program = program;
  50947. }
  50948. });
  50949. // node_modules/@babel/template/lib/options.js
  50950. var require_options = __commonJS({
  50951. "node_modules/@babel/template/lib/options.js"(exports) {
  50952. "use strict";
  50953. Object.defineProperty(exports, "__esModule", {
  50954. value: true
  50955. });
  50956. exports.merge = merge2;
  50957. exports.normalizeReplacements = normalizeReplacements;
  50958. exports.validate = validate;
  50959. var _excluded = ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"];
  50960. function _objectWithoutPropertiesLoose(source2, excluded) {
  50961. if (source2 == null)
  50962. return {};
  50963. var target = {};
  50964. var sourceKeys = Object.keys(source2);
  50965. var key2, i;
  50966. for (i = 0; i < sourceKeys.length; i++) {
  50967. key2 = sourceKeys[i];
  50968. if (excluded.indexOf(key2) >= 0)
  50969. continue;
  50970. target[key2] = source2[key2];
  50971. }
  50972. return target;
  50973. }
  50974. function merge2(a, b) {
  50975. const {
  50976. placeholderWhitelist = a.placeholderWhitelist,
  50977. placeholderPattern = a.placeholderPattern,
  50978. preserveComments = a.preserveComments,
  50979. syntacticPlaceholders = a.syntacticPlaceholders
  50980. } = b;
  50981. return {
  50982. parser: Object.assign({}, a.parser, b.parser),
  50983. placeholderWhitelist,
  50984. placeholderPattern,
  50985. preserveComments,
  50986. syntacticPlaceholders
  50987. };
  50988. }
  50989. function validate(opts) {
  50990. if (opts != null && typeof opts !== "object") {
  50991. throw new Error("Unknown template options.");
  50992. }
  50993. const _ref = opts || {}, {
  50994. placeholderWhitelist,
  50995. placeholderPattern,
  50996. preserveComments,
  50997. syntacticPlaceholders
  50998. } = _ref, parser = _objectWithoutPropertiesLoose(_ref, _excluded);
  50999. if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
  51000. throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
  51001. }
  51002. if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
  51003. throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
  51004. }
  51005. if (preserveComments != null && typeof preserveComments !== "boolean") {
  51006. throw new Error("'.preserveComments' must be a boolean, null, or undefined");
  51007. }
  51008. if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
  51009. throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
  51010. }
  51011. if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
  51012. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  51013. }
  51014. return {
  51015. parser,
  51016. placeholderWhitelist: placeholderWhitelist || void 0,
  51017. placeholderPattern: placeholderPattern == null ? void 0 : placeholderPattern,
  51018. preserveComments: preserveComments == null ? void 0 : preserveComments,
  51019. syntacticPlaceholders: syntacticPlaceholders == null ? void 0 : syntacticPlaceholders
  51020. };
  51021. }
  51022. function normalizeReplacements(replacements) {
  51023. if (Array.isArray(replacements)) {
  51024. return replacements.reduce((acc, replacement, i) => {
  51025. acc["$" + i] = replacement;
  51026. return acc;
  51027. }, {});
  51028. } else if (typeof replacements === "object" || replacements == null) {
  51029. return replacements || void 0;
  51030. }
  51031. throw new Error("Template replacements must be an array, object, null, or undefined");
  51032. }
  51033. }
  51034. });
  51035. // node_modules/@babel/template/lib/parse.js
  51036. var require_parse = __commonJS({
  51037. "node_modules/@babel/template/lib/parse.js"(exports) {
  51038. "use strict";
  51039. Object.defineProperty(exports, "__esModule", {
  51040. value: true
  51041. });
  51042. exports.default = parseAndBuildMetadata;
  51043. var _t = require_lib3();
  51044. var _parser = require_lib9();
  51045. var _codeFrame = require_lib8();
  51046. var {
  51047. isCallExpression: isCallExpression2,
  51048. isExpressionStatement: isExpressionStatement2,
  51049. isFunction,
  51050. isIdentifier: isIdentifier3,
  51051. isJSXIdentifier: isJSXIdentifier3,
  51052. isNewExpression,
  51053. isPlaceholder,
  51054. isStatement,
  51055. isStringLiteral: isStringLiteral2,
  51056. removePropertiesDeep,
  51057. traverse
  51058. } = _t;
  51059. var PATTERN = /^[_$A-Z0-9]+$/;
  51060. function parseAndBuildMetadata(formatter, code2, opts) {
  51061. const {
  51062. placeholderWhitelist,
  51063. placeholderPattern,
  51064. preserveComments,
  51065. syntacticPlaceholders
  51066. } = opts;
  51067. const ast = parseWithCodeFrame(code2, opts.parser, syntacticPlaceholders);
  51068. removePropertiesDeep(ast, {
  51069. preserveComments
  51070. });
  51071. formatter.validate(ast);
  51072. const syntactic = {
  51073. placeholders: [],
  51074. placeholderNames: /* @__PURE__ */ new Set()
  51075. };
  51076. const legacy = {
  51077. placeholders: [],
  51078. placeholderNames: /* @__PURE__ */ new Set()
  51079. };
  51080. const isLegacyRef = {
  51081. value: void 0
  51082. };
  51083. traverse(ast, placeholderVisitorHandler, {
  51084. syntactic,
  51085. legacy,
  51086. isLegacyRef,
  51087. placeholderWhitelist,
  51088. placeholderPattern,
  51089. syntacticPlaceholders
  51090. });
  51091. return Object.assign({
  51092. ast
  51093. }, isLegacyRef.value ? legacy : syntactic);
  51094. }
  51095. function placeholderVisitorHandler(node2, ancestors, state) {
  51096. var _state$placeholderWhi;
  51097. let name2;
  51098. if (isPlaceholder(node2)) {
  51099. if (state.syntacticPlaceholders === false) {
  51100. throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");
  51101. } else {
  51102. name2 = node2.name.name;
  51103. state.isLegacyRef.value = false;
  51104. }
  51105. } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
  51106. return;
  51107. } else if (isIdentifier3(node2) || isJSXIdentifier3(node2)) {
  51108. name2 = node2.name;
  51109. state.isLegacyRef.value = true;
  51110. } else if (isStringLiteral2(node2)) {
  51111. name2 = node2.value;
  51112. state.isLegacyRef.value = true;
  51113. } else {
  51114. return;
  51115. }
  51116. if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
  51117. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
  51118. }
  51119. if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name2)) && !((_state$placeholderWhi = state.placeholderWhitelist) != null && _state$placeholderWhi.has(name2))) {
  51120. return;
  51121. }
  51122. ancestors = ancestors.slice();
  51123. const {
  51124. node: parent,
  51125. key: key2
  51126. } = ancestors[ancestors.length - 1];
  51127. let type;
  51128. if (isStringLiteral2(node2) || isPlaceholder(node2, {
  51129. expectedNode: "StringLiteral"
  51130. })) {
  51131. type = "string";
  51132. } else if (isNewExpression(parent) && key2 === "arguments" || isCallExpression2(parent) && key2 === "arguments" || isFunction(parent) && key2 === "params") {
  51133. type = "param";
  51134. } else if (isExpressionStatement2(parent) && !isPlaceholder(node2)) {
  51135. type = "statement";
  51136. ancestors = ancestors.slice(0, -1);
  51137. } else if (isStatement(node2) && isPlaceholder(node2)) {
  51138. type = "statement";
  51139. } else {
  51140. type = "other";
  51141. }
  51142. const {
  51143. placeholders,
  51144. placeholderNames
  51145. } = state.isLegacyRef.value ? state.legacy : state.syntactic;
  51146. placeholders.push({
  51147. name: name2,
  51148. type,
  51149. resolve: (ast) => resolveAncestors(ast, ancestors),
  51150. isDuplicate: placeholderNames.has(name2)
  51151. });
  51152. placeholderNames.add(name2);
  51153. }
  51154. function resolveAncestors(ast, ancestors) {
  51155. let parent = ast;
  51156. for (let i = 0; i < ancestors.length - 1; i++) {
  51157. const {
  51158. key: key3,
  51159. index: index3
  51160. } = ancestors[i];
  51161. if (index3 === void 0) {
  51162. parent = parent[key3];
  51163. } else {
  51164. parent = parent[key3][index3];
  51165. }
  51166. }
  51167. const {
  51168. key: key2,
  51169. index: index2
  51170. } = ancestors[ancestors.length - 1];
  51171. return {
  51172. parent,
  51173. key: key2,
  51174. index: index2
  51175. };
  51176. }
  51177. function parseWithCodeFrame(code2, parserOpts, syntacticPlaceholders) {
  51178. const plugins = (parserOpts.plugins || []).slice();
  51179. if (syntacticPlaceholders !== false) {
  51180. plugins.push("placeholders");
  51181. }
  51182. parserOpts = Object.assign({
  51183. allowReturnOutsideFunction: true,
  51184. allowSuperOutsideMethod: true,
  51185. sourceType: "module"
  51186. }, parserOpts, {
  51187. plugins
  51188. });
  51189. try {
  51190. return (0, _parser.parse)(code2, parserOpts);
  51191. } catch (err) {
  51192. const loc = err.loc;
  51193. if (loc) {
  51194. err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code2, {
  51195. start: loc
  51196. });
  51197. err.code = "BABEL_TEMPLATE_PARSE_ERROR";
  51198. }
  51199. throw err;
  51200. }
  51201. }
  51202. }
  51203. });
  51204. // node_modules/@babel/template/lib/populate.js
  51205. var require_populate = __commonJS({
  51206. "node_modules/@babel/template/lib/populate.js"(exports) {
  51207. "use strict";
  51208. Object.defineProperty(exports, "__esModule", {
  51209. value: true
  51210. });
  51211. exports.default = populatePlaceholders;
  51212. var _t = require_lib3();
  51213. var {
  51214. blockStatement,
  51215. cloneNode,
  51216. emptyStatement,
  51217. expressionStatement,
  51218. identifier,
  51219. isStatement,
  51220. isStringLiteral: isStringLiteral2,
  51221. stringLiteral: stringLiteral2,
  51222. validate
  51223. } = _t;
  51224. function populatePlaceholders(metadata, replacements) {
  51225. const ast = cloneNode(metadata.ast);
  51226. if (replacements) {
  51227. metadata.placeholders.forEach((placeholder) => {
  51228. if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
  51229. const placeholderName = placeholder.name;
  51230. throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a
  51231. placeholder you may want to consider passing one of the following options to @babel/template:
  51232. - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}
  51233. - { placeholderPattern: /^${placeholderName}$/ }`);
  51234. }
  51235. });
  51236. Object.keys(replacements).forEach((key2) => {
  51237. if (!metadata.placeholderNames.has(key2)) {
  51238. throw new Error(`Unknown substitution "${key2}" given`);
  51239. }
  51240. });
  51241. }
  51242. metadata.placeholders.slice().reverse().forEach((placeholder) => {
  51243. try {
  51244. applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
  51245. } catch (e) {
  51246. e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
  51247. throw e;
  51248. }
  51249. });
  51250. return ast;
  51251. }
  51252. function applyReplacement(placeholder, ast, replacement) {
  51253. if (placeholder.isDuplicate) {
  51254. if (Array.isArray(replacement)) {
  51255. replacement = replacement.map((node2) => cloneNode(node2));
  51256. } else if (typeof replacement === "object") {
  51257. replacement = cloneNode(replacement);
  51258. }
  51259. }
  51260. const {
  51261. parent,
  51262. key: key2,
  51263. index: index2
  51264. } = placeholder.resolve(ast);
  51265. if (placeholder.type === "string") {
  51266. if (typeof replacement === "string") {
  51267. replacement = stringLiteral2(replacement);
  51268. }
  51269. if (!replacement || !isStringLiteral2(replacement)) {
  51270. throw new Error("Expected string substitution");
  51271. }
  51272. } else if (placeholder.type === "statement") {
  51273. if (index2 === void 0) {
  51274. if (!replacement) {
  51275. replacement = emptyStatement();
  51276. } else if (Array.isArray(replacement)) {
  51277. replacement = blockStatement(replacement);
  51278. } else if (typeof replacement === "string") {
  51279. replacement = expressionStatement(identifier(replacement));
  51280. } else if (!isStatement(replacement)) {
  51281. replacement = expressionStatement(replacement);
  51282. }
  51283. } else {
  51284. if (replacement && !Array.isArray(replacement)) {
  51285. if (typeof replacement === "string") {
  51286. replacement = identifier(replacement);
  51287. }
  51288. if (!isStatement(replacement)) {
  51289. replacement = expressionStatement(replacement);
  51290. }
  51291. }
  51292. }
  51293. } else if (placeholder.type === "param") {
  51294. if (typeof replacement === "string") {
  51295. replacement = identifier(replacement);
  51296. }
  51297. if (index2 === void 0)
  51298. throw new Error("Assertion failure.");
  51299. } else {
  51300. if (typeof replacement === "string") {
  51301. replacement = identifier(replacement);
  51302. }
  51303. if (Array.isArray(replacement)) {
  51304. throw new Error("Cannot replace single expression with an array.");
  51305. }
  51306. }
  51307. if (index2 === void 0) {
  51308. validate(parent, key2, replacement);
  51309. parent[key2] = replacement;
  51310. } else {
  51311. const items = parent[key2].slice();
  51312. if (placeholder.type === "statement" || placeholder.type === "param") {
  51313. if (replacement == null) {
  51314. items.splice(index2, 1);
  51315. } else if (Array.isArray(replacement)) {
  51316. items.splice(index2, 1, ...replacement);
  51317. } else {
  51318. items[index2] = replacement;
  51319. }
  51320. } else {
  51321. items[index2] = replacement;
  51322. }
  51323. validate(parent, key2, items);
  51324. parent[key2] = items;
  51325. }
  51326. }
  51327. }
  51328. });
  51329. // node_modules/@babel/template/lib/string.js
  51330. var require_string = __commonJS({
  51331. "node_modules/@babel/template/lib/string.js"(exports) {
  51332. "use strict";
  51333. Object.defineProperty(exports, "__esModule", {
  51334. value: true
  51335. });
  51336. exports.default = stringTemplate;
  51337. var _options = require_options();
  51338. var _parse = require_parse();
  51339. var _populate = require_populate();
  51340. function stringTemplate(formatter, code2, opts) {
  51341. code2 = formatter.code(code2);
  51342. let metadata;
  51343. return (arg) => {
  51344. const replacements = (0, _options.normalizeReplacements)(arg);
  51345. if (!metadata)
  51346. metadata = (0, _parse.default)(formatter, code2, opts);
  51347. return formatter.unwrap((0, _populate.default)(metadata, replacements));
  51348. };
  51349. }
  51350. }
  51351. });
  51352. // node_modules/@babel/template/lib/literal.js
  51353. var require_literal = __commonJS({
  51354. "node_modules/@babel/template/lib/literal.js"(exports) {
  51355. "use strict";
  51356. Object.defineProperty(exports, "__esModule", {
  51357. value: true
  51358. });
  51359. exports.default = literalTemplate;
  51360. var _options = require_options();
  51361. var _parse = require_parse();
  51362. var _populate = require_populate();
  51363. function literalTemplate(formatter, tpl, opts) {
  51364. const {
  51365. metadata,
  51366. names
  51367. } = buildLiteralData(formatter, tpl, opts);
  51368. return (arg) => {
  51369. const defaultReplacements = {};
  51370. arg.forEach((replacement, i) => {
  51371. defaultReplacements[names[i]] = replacement;
  51372. });
  51373. return (arg2) => {
  51374. const replacements = (0, _options.normalizeReplacements)(arg2);
  51375. if (replacements) {
  51376. Object.keys(replacements).forEach((key2) => {
  51377. if (Object.prototype.hasOwnProperty.call(defaultReplacements, key2)) {
  51378. throw new Error("Unexpected replacement overlap.");
  51379. }
  51380. });
  51381. }
  51382. return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
  51383. };
  51384. };
  51385. }
  51386. function buildLiteralData(formatter, tpl, opts) {
  51387. let names;
  51388. let nameSet;
  51389. let metadata;
  51390. let prefix = "";
  51391. do {
  51392. prefix += "$";
  51393. const result = buildTemplateCode(tpl, prefix);
  51394. names = result.names;
  51395. nameSet = new Set(names);
  51396. metadata = (0, _parse.default)(formatter, formatter.code(result.code), {
  51397. parser: opts.parser,
  51398. placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
  51399. placeholderPattern: opts.placeholderPattern,
  51400. preserveComments: opts.preserveComments,
  51401. syntacticPlaceholders: opts.syntacticPlaceholders
  51402. });
  51403. } while (metadata.placeholders.some((placeholder) => placeholder.isDuplicate && nameSet.has(placeholder.name)));
  51404. return {
  51405. metadata,
  51406. names
  51407. };
  51408. }
  51409. function buildTemplateCode(tpl, prefix) {
  51410. const names = [];
  51411. let code2 = tpl[0];
  51412. for (let i = 1; i < tpl.length; i++) {
  51413. const value2 = `${prefix}${i - 1}`;
  51414. names.push(value2);
  51415. code2 += value2 + tpl[i];
  51416. }
  51417. return {
  51418. names,
  51419. code: code2
  51420. };
  51421. }
  51422. }
  51423. });
  51424. // node_modules/@babel/template/lib/builder.js
  51425. var require_builder = __commonJS({
  51426. "node_modules/@babel/template/lib/builder.js"(exports) {
  51427. "use strict";
  51428. Object.defineProperty(exports, "__esModule", {
  51429. value: true
  51430. });
  51431. exports.default = createTemplateBuilder;
  51432. var _options = require_options();
  51433. var _string = require_string();
  51434. var _literal = require_literal();
  51435. var NO_PLACEHOLDER = (0, _options.validate)({
  51436. placeholderPattern: false
  51437. });
  51438. function createTemplateBuilder(formatter, defaultOpts) {
  51439. const templateFnCache = /* @__PURE__ */ new WeakMap();
  51440. const templateAstCache = /* @__PURE__ */ new WeakMap();
  51441. const cachedOpts = defaultOpts || (0, _options.validate)(null);
  51442. return Object.assign((tpl, ...args) => {
  51443. if (typeof tpl === "string") {
  51444. if (args.length > 1)
  51445. throw new Error("Unexpected extra params.");
  51446. return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0]))));
  51447. } else if (Array.isArray(tpl)) {
  51448. let builder = templateFnCache.get(tpl);
  51449. if (!builder) {
  51450. builder = (0, _literal.default)(formatter, tpl, cachedOpts);
  51451. templateFnCache.set(tpl, builder);
  51452. }
  51453. return extendedTrace(builder(args));
  51454. } else if (typeof tpl === "object" && tpl) {
  51455. if (args.length > 0)
  51456. throw new Error("Unexpected extra params.");
  51457. return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl)));
  51458. }
  51459. throw new Error(`Unexpected template param ${typeof tpl}`);
  51460. }, {
  51461. ast: (tpl, ...args) => {
  51462. if (typeof tpl === "string") {
  51463. if (args.length > 1)
  51464. throw new Error("Unexpected extra params.");
  51465. return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))();
  51466. } else if (Array.isArray(tpl)) {
  51467. let builder = templateAstCache.get(tpl);
  51468. if (!builder) {
  51469. builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER));
  51470. templateAstCache.set(tpl, builder);
  51471. }
  51472. return builder(args)();
  51473. }
  51474. throw new Error(`Unexpected template param ${typeof tpl}`);
  51475. }
  51476. });
  51477. }
  51478. function extendedTrace(fn) {
  51479. let rootStack = "";
  51480. try {
  51481. throw new Error();
  51482. } catch (error) {
  51483. if (error.stack) {
  51484. rootStack = error.stack.split("\n").slice(3).join("\n");
  51485. }
  51486. }
  51487. return (arg) => {
  51488. try {
  51489. return fn(arg);
  51490. } catch (err) {
  51491. err.stack += `
  51492. =============
  51493. ${rootStack}`;
  51494. throw err;
  51495. }
  51496. };
  51497. }
  51498. }
  51499. });
  51500. // node_modules/@babel/template/lib/index.js
  51501. var require_lib11 = __commonJS({
  51502. "node_modules/@babel/template/lib/index.js"(exports) {
  51503. "use strict";
  51504. Object.defineProperty(exports, "__esModule", {
  51505. value: true
  51506. });
  51507. exports.statements = exports.statement = exports.smart = exports.program = exports.expression = exports.default = void 0;
  51508. var formatters = require_formatters();
  51509. var _builder = require_builder();
  51510. var smart = (0, _builder.default)(formatters.smart);
  51511. exports.smart = smart;
  51512. var statement = (0, _builder.default)(formatters.statement);
  51513. exports.statement = statement;
  51514. var statements = (0, _builder.default)(formatters.statements);
  51515. exports.statements = statements;
  51516. var expression = (0, _builder.default)(formatters.expression);
  51517. exports.expression = expression;
  51518. var program = (0, _builder.default)(formatters.program);
  51519. exports.program = program;
  51520. var _default = Object.assign(smart.bind(void 0), {
  51521. smart,
  51522. statement,
  51523. statements,
  51524. expression,
  51525. program,
  51526. ast: smart.ast
  51527. });
  51528. exports.default = _default;
  51529. }
  51530. });
  51531. // node_modules/@babel/helper-function-name/lib/index.js
  51532. var require_lib12 = __commonJS({
  51533. "node_modules/@babel/helper-function-name/lib/index.js"(exports) {
  51534. "use strict";
  51535. Object.defineProperty(exports, "__esModule", {
  51536. value: true
  51537. });
  51538. exports.default = _default;
  51539. var _template = require_lib11();
  51540. var _t = require_lib3();
  51541. var {
  51542. NOT_LOCAL_BINDING,
  51543. cloneNode,
  51544. identifier,
  51545. isAssignmentExpression,
  51546. isAssignmentPattern,
  51547. isFunction,
  51548. isIdentifier: isIdentifier3,
  51549. isLiteral,
  51550. isNullLiteral,
  51551. isObjectMethod,
  51552. isObjectProperty,
  51553. isRegExpLiteral,
  51554. isRestElement,
  51555. isTemplateLiteral,
  51556. isVariableDeclarator: isVariableDeclarator2,
  51557. toBindingIdentifierName
  51558. } = _t;
  51559. function getFunctionArity(node2) {
  51560. const count = node2.params.findIndex((param) => isAssignmentPattern(param) || isRestElement(param));
  51561. return count === -1 ? node2.params.length : count;
  51562. }
  51563. var buildPropertyMethodAssignmentWrapper = _template.default.statement(`
  51564. (function (FUNCTION_KEY) {
  51565. function FUNCTION_ID() {
  51566. return FUNCTION_KEY.apply(this, arguments);
  51567. }
  51568. FUNCTION_ID.toString = function () {
  51569. return FUNCTION_KEY.toString();
  51570. }
  51571. return FUNCTION_ID;
  51572. })(FUNCTION)
  51573. `);
  51574. var buildGeneratorPropertyMethodAssignmentWrapper = _template.default.statement(`
  51575. (function (FUNCTION_KEY) {
  51576. function* FUNCTION_ID() {
  51577. return yield* FUNCTION_KEY.apply(this, arguments);
  51578. }
  51579. FUNCTION_ID.toString = function () {
  51580. return FUNCTION_KEY.toString();
  51581. };
  51582. return FUNCTION_ID;
  51583. })(FUNCTION)
  51584. `);
  51585. var visitor = {
  51586. "ReferencedIdentifier|BindingIdentifier"(path, state) {
  51587. if (path.node.name !== state.name)
  51588. return;
  51589. const localDeclar = path.scope.getBindingIdentifier(state.name);
  51590. if (localDeclar !== state.outerDeclar)
  51591. return;
  51592. state.selfReference = true;
  51593. path.stop();
  51594. }
  51595. };
  51596. function getNameFromLiteralId(id) {
  51597. if (isNullLiteral(id)) {
  51598. return "null";
  51599. }
  51600. if (isRegExpLiteral(id)) {
  51601. return `_${id.pattern}_${id.flags}`;
  51602. }
  51603. if (isTemplateLiteral(id)) {
  51604. return id.quasis.map((quasi) => quasi.value.raw).join("");
  51605. }
  51606. if (id.value !== void 0) {
  51607. return id.value + "";
  51608. }
  51609. return "";
  51610. }
  51611. function wrap3(state, method, id, scope) {
  51612. if (state.selfReference) {
  51613. if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
  51614. scope.rename(id.name);
  51615. } else {
  51616. if (!isFunction(method))
  51617. return;
  51618. let build = buildPropertyMethodAssignmentWrapper;
  51619. if (method.generator) {
  51620. build = buildGeneratorPropertyMethodAssignmentWrapper;
  51621. }
  51622. const template = build({
  51623. FUNCTION: method,
  51624. FUNCTION_ID: id,
  51625. FUNCTION_KEY: scope.generateUidIdentifier(id.name)
  51626. }).expression;
  51627. const params = template.callee.body.body[0].params;
  51628. for (let i = 0, len = getFunctionArity(method); i < len; i++) {
  51629. params.push(scope.generateUidIdentifier("x"));
  51630. }
  51631. return template;
  51632. }
  51633. }
  51634. method.id = id;
  51635. scope.getProgramParent().references[id.name] = true;
  51636. }
  51637. function visit3(node2, name2, scope) {
  51638. const state = {
  51639. selfAssignment: false,
  51640. selfReference: false,
  51641. outerDeclar: scope.getBindingIdentifier(name2),
  51642. name: name2
  51643. };
  51644. const binding = scope.getOwnBinding(name2);
  51645. if (binding) {
  51646. if (binding.kind === "param") {
  51647. state.selfReference = true;
  51648. } else {
  51649. }
  51650. } else if (state.outerDeclar || scope.hasGlobal(name2)) {
  51651. scope.traverse(node2, visitor, state);
  51652. }
  51653. return state;
  51654. }
  51655. function _default({
  51656. node: node2,
  51657. parent,
  51658. scope,
  51659. id
  51660. }, localBinding = false, supportUnicodeId = false) {
  51661. if (node2.id)
  51662. return;
  51663. if ((isObjectProperty(parent) || isObjectMethod(parent, {
  51664. kind: "method"
  51665. })) && (!parent.computed || isLiteral(parent.key))) {
  51666. id = parent.key;
  51667. } else if (isVariableDeclarator2(parent)) {
  51668. id = parent.id;
  51669. if (isIdentifier3(id) && !localBinding) {
  51670. const binding = scope.parent.getBinding(id.name);
  51671. if (binding && binding.constant && scope.getBinding(id.name) === binding) {
  51672. node2.id = cloneNode(id);
  51673. node2.id[NOT_LOCAL_BINDING] = true;
  51674. return;
  51675. }
  51676. }
  51677. } else if (isAssignmentExpression(parent, {
  51678. operator: "="
  51679. })) {
  51680. id = parent.left;
  51681. } else if (!id) {
  51682. return;
  51683. }
  51684. let name2;
  51685. if (id && isLiteral(id)) {
  51686. name2 = getNameFromLiteralId(id);
  51687. } else if (id && isIdentifier3(id)) {
  51688. name2 = id.name;
  51689. }
  51690. if (name2 === void 0) {
  51691. return;
  51692. }
  51693. if (!supportUnicodeId && isFunction(node2) && /[\uD800-\uDFFF]/.test(name2)) {
  51694. return;
  51695. }
  51696. name2 = toBindingIdentifierName(name2);
  51697. const newId = identifier(name2);
  51698. newId[NOT_LOCAL_BINDING] = true;
  51699. const state = visit3(node2, name2, scope);
  51700. return wrap3(state, node2, newId, scope) || node2;
  51701. }
  51702. }
  51703. });
  51704. // node_modules/@babel/traverse/lib/path/conversion.js
  51705. var require_conversion = __commonJS({
  51706. "node_modules/@babel/traverse/lib/path/conversion.js"(exports) {
  51707. "use strict";
  51708. Object.defineProperty(exports, "__esModule", {
  51709. value: true
  51710. });
  51711. exports.arrowFunctionToExpression = arrowFunctionToExpression;
  51712. exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
  51713. exports.ensureBlock = ensureBlock;
  51714. exports.toComputedKey = toComputedKey;
  51715. exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
  51716. var _t = require_lib3();
  51717. var _helperEnvironmentVisitor = require_lib6();
  51718. var _helperFunctionName = require_lib12();
  51719. var _visitors = require_visitors();
  51720. var {
  51721. arrowFunctionExpression,
  51722. assignmentExpression,
  51723. binaryExpression,
  51724. blockStatement,
  51725. callExpression,
  51726. conditionalExpression,
  51727. expressionStatement,
  51728. identifier,
  51729. isIdentifier: isIdentifier3,
  51730. jsxIdentifier: jsxIdentifier2,
  51731. logicalExpression,
  51732. LOGICAL_OPERATORS,
  51733. memberExpression,
  51734. metaProperty,
  51735. numericLiteral,
  51736. objectExpression,
  51737. restElement,
  51738. returnStatement,
  51739. sequenceExpression,
  51740. spreadElement,
  51741. stringLiteral: stringLiteral2,
  51742. super: _super,
  51743. thisExpression,
  51744. toExpression,
  51745. unaryExpression
  51746. } = _t;
  51747. function toComputedKey() {
  51748. let key2;
  51749. if (this.isMemberExpression()) {
  51750. key2 = this.node.property;
  51751. } else if (this.isProperty() || this.isMethod()) {
  51752. key2 = this.node.key;
  51753. } else {
  51754. throw new ReferenceError("todo");
  51755. }
  51756. if (!this.node.computed) {
  51757. if (isIdentifier3(key2))
  51758. key2 = stringLiteral2(key2.name);
  51759. }
  51760. return key2;
  51761. }
  51762. function ensureBlock() {
  51763. const body = this.get("body");
  51764. const bodyNode = body.node;
  51765. if (Array.isArray(body)) {
  51766. throw new Error("Can't convert array path to a block statement");
  51767. }
  51768. if (!bodyNode) {
  51769. throw new Error("Can't convert node without a body");
  51770. }
  51771. if (body.isBlockStatement()) {
  51772. return bodyNode;
  51773. }
  51774. const statements = [];
  51775. let stringPath = "body";
  51776. let key2;
  51777. let listKey;
  51778. if (body.isStatement()) {
  51779. listKey = "body";
  51780. key2 = 0;
  51781. statements.push(body.node);
  51782. } else {
  51783. stringPath += ".body.0";
  51784. if (this.isFunction()) {
  51785. key2 = "argument";
  51786. statements.push(returnStatement(body.node));
  51787. } else {
  51788. key2 = "expression";
  51789. statements.push(expressionStatement(body.node));
  51790. }
  51791. }
  51792. this.node.body = blockStatement(statements);
  51793. const parentPath = this.get(stringPath);
  51794. body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key2);
  51795. return this.node;
  51796. }
  51797. function arrowFunctionToShadowed() {
  51798. if (!this.isArrowFunctionExpression())
  51799. return;
  51800. this.arrowFunctionToExpression();
  51801. }
  51802. function unwrapFunctionEnvironment() {
  51803. if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
  51804. throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
  51805. }
  51806. hoistFunctionEnvironment(this);
  51807. }
  51808. function setType(path, type) {
  51809. path.node.type = type;
  51810. }
  51811. function arrowFunctionToExpression({
  51812. allowInsertArrow = true,
  51813. allowInsertArrowWithRest = allowInsertArrow,
  51814. specCompliant = false,
  51815. noNewArrows = !specCompliant
  51816. } = {}) {
  51817. if (!this.isArrowFunctionExpression()) {
  51818. throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
  51819. }
  51820. const {
  51821. thisBinding,
  51822. fnPath: fn
  51823. } = hoistFunctionEnvironment(this, noNewArrows, allowInsertArrow, allowInsertArrowWithRest);
  51824. fn.ensureBlock();
  51825. setType(fn, "FunctionExpression");
  51826. if (!noNewArrows) {
  51827. const checkBinding = thisBinding ? null : fn.scope.generateUidIdentifier("arrowCheckId");
  51828. if (checkBinding) {
  51829. fn.parentPath.scope.push({
  51830. id: checkBinding,
  51831. init: objectExpression([])
  51832. });
  51833. }
  51834. fn.get("body").unshiftContainer("body", expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"), [thisExpression(), checkBinding ? identifier(checkBinding.name) : identifier(thisBinding)])));
  51835. fn.replaceWith(callExpression(memberExpression((0, _helperFunctionName.default)(this, true) || fn.node, identifier("bind")), [checkBinding ? identifier(checkBinding.name) : thisExpression()]));
  51836. return fn.get("callee.object");
  51837. }
  51838. return fn;
  51839. }
  51840. var getSuperCallsVisitor = (0, _visitors.merge)([{
  51841. CallExpression(child, {
  51842. allSuperCalls
  51843. }) {
  51844. if (!child.get("callee").isSuper())
  51845. return;
  51846. allSuperCalls.push(child);
  51847. }
  51848. }, _helperEnvironmentVisitor.default]);
  51849. function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow = true, allowInsertArrowWithRest = true) {
  51850. let arrowParent;
  51851. let thisEnvFn = fnPath.findParent((p) => {
  51852. if (p.isArrowFunctionExpression()) {
  51853. var _arrowParent;
  51854. (_arrowParent = arrowParent) != null ? _arrowParent : arrowParent = p;
  51855. return false;
  51856. }
  51857. return p.isFunction() || p.isProgram() || p.isClassProperty({
  51858. static: false
  51859. }) || p.isClassPrivateProperty({
  51860. static: false
  51861. });
  51862. });
  51863. const inConstructor = thisEnvFn.isClassMethod({
  51864. kind: "constructor"
  51865. });
  51866. if (thisEnvFn.isClassProperty() || thisEnvFn.isClassPrivateProperty()) {
  51867. if (arrowParent) {
  51868. thisEnvFn = arrowParent;
  51869. } else if (allowInsertArrow) {
  51870. fnPath.replaceWith(callExpression(arrowFunctionExpression([], toExpression(fnPath.node)), []));
  51871. thisEnvFn = fnPath.get("callee");
  51872. fnPath = thisEnvFn.get("body");
  51873. } else {
  51874. throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
  51875. }
  51876. }
  51877. const {
  51878. thisPaths,
  51879. argumentsPaths,
  51880. newTargetPaths,
  51881. superProps,
  51882. superCalls
  51883. } = getScopeInformation(fnPath);
  51884. if (inConstructor && superCalls.length > 0) {
  51885. if (!allowInsertArrow) {
  51886. throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");
  51887. }
  51888. if (!allowInsertArrowWithRest) {
  51889. throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");
  51890. }
  51891. const allSuperCalls = [];
  51892. thisEnvFn.traverse(getSuperCallsVisitor, {
  51893. allSuperCalls
  51894. });
  51895. const superBinding = getSuperBinding(thisEnvFn);
  51896. allSuperCalls.forEach((superCall) => {
  51897. const callee = identifier(superBinding);
  51898. callee.loc = superCall.node.callee.loc;
  51899. superCall.get("callee").replaceWith(callee);
  51900. });
  51901. }
  51902. if (argumentsPaths.length > 0) {
  51903. const argumentsBinding = getBinding(thisEnvFn, "arguments", () => {
  51904. const args = () => identifier("arguments");
  51905. if (thisEnvFn.scope.path.isProgram()) {
  51906. return conditionalExpression(binaryExpression("===", unaryExpression("typeof", args()), stringLiteral2("undefined")), thisEnvFn.scope.buildUndefinedNode(), args());
  51907. } else {
  51908. return args();
  51909. }
  51910. });
  51911. argumentsPaths.forEach((argumentsChild) => {
  51912. const argsRef = identifier(argumentsBinding);
  51913. argsRef.loc = argumentsChild.node.loc;
  51914. argumentsChild.replaceWith(argsRef);
  51915. });
  51916. }
  51917. if (newTargetPaths.length > 0) {
  51918. const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => metaProperty(identifier("new"), identifier("target")));
  51919. newTargetPaths.forEach((targetChild) => {
  51920. const targetRef = identifier(newTargetBinding);
  51921. targetRef.loc = targetChild.node.loc;
  51922. targetChild.replaceWith(targetRef);
  51923. });
  51924. }
  51925. if (superProps.length > 0) {
  51926. if (!allowInsertArrow) {
  51927. throw superProps[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");
  51928. }
  51929. const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []);
  51930. flatSuperProps.forEach((superProp) => {
  51931. const key2 = superProp.node.computed ? "" : superProp.get("property").node.name;
  51932. const superParentPath = superProp.parentPath;
  51933. const isAssignment = superParentPath.isAssignmentExpression({
  51934. left: superProp.node
  51935. });
  51936. const isCall = superParentPath.isCallExpression({
  51937. callee: superProp.node
  51938. });
  51939. const isTaggedTemplate = superParentPath.isTaggedTemplateExpression({
  51940. tag: superProp.node
  51941. });
  51942. const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key2);
  51943. const args = [];
  51944. if (superProp.node.computed) {
  51945. args.push(superProp.get("property").node);
  51946. }
  51947. if (isAssignment) {
  51948. const value2 = superParentPath.node.right;
  51949. args.push(value2);
  51950. }
  51951. const call = callExpression(identifier(superBinding), args);
  51952. if (isCall) {
  51953. superParentPath.unshiftContainer("arguments", thisExpression());
  51954. superProp.replaceWith(memberExpression(call, identifier("call")));
  51955. thisPaths.push(superParentPath.get("arguments.0"));
  51956. } else if (isAssignment) {
  51957. superParentPath.replaceWith(call);
  51958. } else if (isTaggedTemplate) {
  51959. superProp.replaceWith(callExpression(memberExpression(call, identifier("bind"), false), [thisExpression()]));
  51960. thisPaths.push(superProp.get("arguments.0"));
  51961. } else {
  51962. superProp.replaceWith(call);
  51963. }
  51964. });
  51965. }
  51966. let thisBinding;
  51967. if (thisPaths.length > 0 || !noNewArrows) {
  51968. thisBinding = getThisBinding(thisEnvFn, inConstructor);
  51969. if (noNewArrows || inConstructor && hasSuperClass(thisEnvFn)) {
  51970. thisPaths.forEach((thisChild) => {
  51971. const thisRef = thisChild.isJSX() ? jsxIdentifier2(thisBinding) : identifier(thisBinding);
  51972. thisRef.loc = thisChild.node.loc;
  51973. thisChild.replaceWith(thisRef);
  51974. });
  51975. if (!noNewArrows)
  51976. thisBinding = null;
  51977. }
  51978. }
  51979. return {
  51980. thisBinding,
  51981. fnPath
  51982. };
  51983. }
  51984. function isLogicalOp(op) {
  51985. return LOGICAL_OPERATORS.includes(op);
  51986. }
  51987. function standardizeSuperProperty(superProp) {
  51988. if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
  51989. const assignmentPath = superProp.parentPath;
  51990. const op = assignmentPath.node.operator.slice(0, -1);
  51991. const value2 = assignmentPath.node.right;
  51992. const isLogicalAssignment = isLogicalOp(op);
  51993. if (superProp.node.computed) {
  51994. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  51995. const object = superProp.node.object;
  51996. const property = superProp.node.property;
  51997. assignmentPath.get("left").replaceWith(memberExpression(object, assignmentExpression("=", tmp, property), true));
  51998. assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object, identifier(tmp.name), true), value2));
  51999. } else {
  52000. const object = superProp.node.object;
  52001. const property = superProp.node.property;
  52002. assignmentPath.get("left").replaceWith(memberExpression(object, property));
  52003. assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object, identifier(property.name)), value2));
  52004. }
  52005. if (isLogicalAssignment) {
  52006. assignmentPath.replaceWith(logicalExpression(op, assignmentPath.node.left, assignmentPath.node.right));
  52007. } else {
  52008. assignmentPath.node.operator = "=";
  52009. }
  52010. return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
  52011. } else if (superProp.parentPath.isUpdateExpression()) {
  52012. const updateExpr = superProp.parentPath;
  52013. const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  52014. const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
  52015. const parts = [assignmentExpression("=", tmp, memberExpression(superProp.node.object, computedKey ? assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), assignmentExpression("=", memberExpression(superProp.node.object, computedKey ? identifier(computedKey.name) : superProp.node.property, superProp.node.computed), binaryExpression(superProp.parentPath.node.operator[0], identifier(tmp.name), numericLiteral(1)))];
  52016. if (!superProp.parentPath.node.prefix) {
  52017. parts.push(identifier(tmp.name));
  52018. }
  52019. updateExpr.replaceWith(sequenceExpression(parts));
  52020. const left = updateExpr.get("expressions.0.right");
  52021. const right = updateExpr.get("expressions.1.left");
  52022. return [left, right];
  52023. }
  52024. return [superProp];
  52025. function rightExpression(op, left, right) {
  52026. if (op === "=") {
  52027. return assignmentExpression("=", left, right);
  52028. } else {
  52029. return binaryExpression(op, left, right);
  52030. }
  52031. }
  52032. }
  52033. function hasSuperClass(thisEnvFn) {
  52034. return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
  52035. }
  52036. var assignSuperThisVisitor = (0, _visitors.merge)([{
  52037. CallExpression(child, {
  52038. supers,
  52039. thisBinding
  52040. }) {
  52041. if (!child.get("callee").isSuper())
  52042. return;
  52043. if (supers.has(child.node))
  52044. return;
  52045. supers.add(child.node);
  52046. child.replaceWithMultiple([child.node, assignmentExpression("=", identifier(thisBinding), identifier("this"))]);
  52047. }
  52048. }, _helperEnvironmentVisitor.default]);
  52049. function getThisBinding(thisEnvFn, inConstructor) {
  52050. return getBinding(thisEnvFn, "this", (thisBinding) => {
  52051. if (!inConstructor || !hasSuperClass(thisEnvFn))
  52052. return thisExpression();
  52053. thisEnvFn.traverse(assignSuperThisVisitor, {
  52054. supers: /* @__PURE__ */ new WeakSet(),
  52055. thisBinding
  52056. });
  52057. });
  52058. }
  52059. function getSuperBinding(thisEnvFn) {
  52060. return getBinding(thisEnvFn, "supercall", () => {
  52061. const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
  52062. return arrowFunctionExpression([restElement(argsBinding)], callExpression(_super(), [spreadElement(identifier(argsBinding.name))]));
  52063. });
  52064. }
  52065. function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
  52066. const op = isAssignment ? "set" : "get";
  52067. return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => {
  52068. const argsList = [];
  52069. let fnBody;
  52070. if (propName) {
  52071. fnBody = memberExpression(_super(), identifier(propName));
  52072. } else {
  52073. const method = thisEnvFn.scope.generateUidIdentifier("prop");
  52074. argsList.unshift(method);
  52075. fnBody = memberExpression(_super(), identifier(method.name), true);
  52076. }
  52077. if (isAssignment) {
  52078. const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
  52079. argsList.push(valueIdent);
  52080. fnBody = assignmentExpression("=", fnBody, identifier(valueIdent.name));
  52081. }
  52082. return arrowFunctionExpression(argsList, fnBody);
  52083. });
  52084. }
  52085. function getBinding(thisEnvFn, key2, init) {
  52086. const cacheKey = "binding:" + key2;
  52087. let data3 = thisEnvFn.getData(cacheKey);
  52088. if (!data3) {
  52089. const id = thisEnvFn.scope.generateUidIdentifier(key2);
  52090. data3 = id.name;
  52091. thisEnvFn.setData(cacheKey, data3);
  52092. thisEnvFn.scope.push({
  52093. id,
  52094. init: init(data3)
  52095. });
  52096. }
  52097. return data3;
  52098. }
  52099. var getScopeInformationVisitor = (0, _visitors.merge)([{
  52100. ThisExpression(child, {
  52101. thisPaths
  52102. }) {
  52103. thisPaths.push(child);
  52104. },
  52105. JSXIdentifier(child, {
  52106. thisPaths
  52107. }) {
  52108. if (child.node.name !== "this")
  52109. return;
  52110. if (!child.parentPath.isJSXMemberExpression({
  52111. object: child.node
  52112. }) && !child.parentPath.isJSXOpeningElement({
  52113. name: child.node
  52114. })) {
  52115. return;
  52116. }
  52117. thisPaths.push(child);
  52118. },
  52119. CallExpression(child, {
  52120. superCalls
  52121. }) {
  52122. if (child.get("callee").isSuper())
  52123. superCalls.push(child);
  52124. },
  52125. MemberExpression(child, {
  52126. superProps
  52127. }) {
  52128. if (child.get("object").isSuper())
  52129. superProps.push(child);
  52130. },
  52131. Identifier(child, {
  52132. argumentsPaths
  52133. }) {
  52134. if (!child.isReferencedIdentifier({
  52135. name: "arguments"
  52136. }))
  52137. return;
  52138. let curr = child.scope;
  52139. do {
  52140. if (curr.hasOwnBinding("arguments")) {
  52141. curr.rename("arguments");
  52142. return;
  52143. }
  52144. if (curr.path.isFunction() && !curr.path.isArrowFunctionExpression()) {
  52145. break;
  52146. }
  52147. } while (curr = curr.parent);
  52148. argumentsPaths.push(child);
  52149. },
  52150. MetaProperty(child, {
  52151. newTargetPaths
  52152. }) {
  52153. if (!child.get("meta").isIdentifier({
  52154. name: "new"
  52155. }))
  52156. return;
  52157. if (!child.get("property").isIdentifier({
  52158. name: "target"
  52159. }))
  52160. return;
  52161. newTargetPaths.push(child);
  52162. }
  52163. }, _helperEnvironmentVisitor.default]);
  52164. function getScopeInformation(fnPath) {
  52165. const thisPaths = [];
  52166. const argumentsPaths = [];
  52167. const newTargetPaths = [];
  52168. const superProps = [];
  52169. const superCalls = [];
  52170. fnPath.traverse(getScopeInformationVisitor, {
  52171. thisPaths,
  52172. argumentsPaths,
  52173. newTargetPaths,
  52174. superProps,
  52175. superCalls
  52176. });
  52177. return {
  52178. thisPaths,
  52179. argumentsPaths,
  52180. newTargetPaths,
  52181. superProps,
  52182. superCalls
  52183. };
  52184. }
  52185. }
  52186. });
  52187. // node_modules/@babel/traverse/lib/path/introspection.js
  52188. var require_introspection = __commonJS({
  52189. "node_modules/@babel/traverse/lib/path/introspection.js"(exports) {
  52190. "use strict";
  52191. Object.defineProperty(exports, "__esModule", {
  52192. value: true
  52193. });
  52194. exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
  52195. exports._resolve = _resolve;
  52196. exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
  52197. exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
  52198. exports.equals = equals;
  52199. exports.getSource = getSource;
  52200. exports.has = has2;
  52201. exports.is = void 0;
  52202. exports.isCompletionRecord = isCompletionRecord;
  52203. exports.isConstantExpression = isConstantExpression;
  52204. exports.isInStrictMode = isInStrictMode;
  52205. exports.isNodeType = isNodeType;
  52206. exports.isStatementOrBlock = isStatementOrBlock;
  52207. exports.isStatic = isStatic;
  52208. exports.isnt = isnt;
  52209. exports.matchesPattern = matchesPattern;
  52210. exports.referencesImport = referencesImport;
  52211. exports.resolve = resolve;
  52212. exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
  52213. var _t = require_lib3();
  52214. var {
  52215. STATEMENT_OR_BLOCK_KEYS,
  52216. VISITOR_KEYS,
  52217. isBlockStatement,
  52218. isExpression,
  52219. isIdentifier: isIdentifier3,
  52220. isLiteral,
  52221. isStringLiteral: isStringLiteral2,
  52222. isType,
  52223. matchesPattern: _matchesPattern
  52224. } = _t;
  52225. function matchesPattern(pattern, allowPartial) {
  52226. return _matchesPattern(this.node, pattern, allowPartial);
  52227. }
  52228. function has2(key2) {
  52229. const val = this.node && this.node[key2];
  52230. if (val && Array.isArray(val)) {
  52231. return !!val.length;
  52232. } else {
  52233. return !!val;
  52234. }
  52235. }
  52236. function isStatic() {
  52237. return this.scope.isStatic(this.node);
  52238. }
  52239. var is2 = has2;
  52240. exports.is = is2;
  52241. function isnt(key2) {
  52242. return !this.has(key2);
  52243. }
  52244. function equals(key2, value2) {
  52245. return this.node[key2] === value2;
  52246. }
  52247. function isNodeType(type) {
  52248. return isType(this.type, type);
  52249. }
  52250. function canHaveVariableDeclarationOrExpression() {
  52251. return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
  52252. }
  52253. function canSwapBetweenExpressionAndStatement(replacement) {
  52254. if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
  52255. return false;
  52256. }
  52257. if (this.isExpression()) {
  52258. return isBlockStatement(replacement);
  52259. } else if (this.isBlockStatement()) {
  52260. return isExpression(replacement);
  52261. }
  52262. return false;
  52263. }
  52264. function isCompletionRecord(allowInsideFunction) {
  52265. let path = this;
  52266. let first = true;
  52267. do {
  52268. const {
  52269. type,
  52270. container
  52271. } = path;
  52272. if (!first && (path.isFunction() || type === "StaticBlock")) {
  52273. return !!allowInsideFunction;
  52274. }
  52275. first = false;
  52276. if (Array.isArray(container) && path.key !== container.length - 1) {
  52277. return false;
  52278. }
  52279. } while ((path = path.parentPath) && !path.isProgram() && !path.isDoExpression());
  52280. return true;
  52281. }
  52282. function isStatementOrBlock() {
  52283. if (this.parentPath.isLabeledStatement() || isBlockStatement(this.container)) {
  52284. return false;
  52285. } else {
  52286. return STATEMENT_OR_BLOCK_KEYS.includes(this.key);
  52287. }
  52288. }
  52289. function referencesImport(moduleSource, importName) {
  52290. if (!this.isReferencedIdentifier()) {
  52291. if (this.isJSXMemberExpression() && this.node.property.name === importName || (this.isMemberExpression() || this.isOptionalMemberExpression()) && (this.node.computed ? isStringLiteral2(this.node.property, {
  52292. value: importName
  52293. }) : this.node.property.name === importName)) {
  52294. const object = this.get("object");
  52295. return object.isReferencedIdentifier() && object.referencesImport(moduleSource, "*");
  52296. }
  52297. return false;
  52298. }
  52299. const binding = this.scope.getBinding(this.node.name);
  52300. if (!binding || binding.kind !== "module")
  52301. return false;
  52302. const path = binding.path;
  52303. const parent = path.parentPath;
  52304. if (!parent.isImportDeclaration())
  52305. return false;
  52306. if (parent.node.source.value === moduleSource) {
  52307. if (!importName)
  52308. return true;
  52309. } else {
  52310. return false;
  52311. }
  52312. if (path.isImportDefaultSpecifier() && importName === "default") {
  52313. return true;
  52314. }
  52315. if (path.isImportNamespaceSpecifier() && importName === "*") {
  52316. return true;
  52317. }
  52318. if (path.isImportSpecifier() && isIdentifier3(path.node.imported, {
  52319. name: importName
  52320. })) {
  52321. return true;
  52322. }
  52323. return false;
  52324. }
  52325. function getSource() {
  52326. const node2 = this.node;
  52327. if (node2.end) {
  52328. const code2 = this.hub.getCode();
  52329. if (code2)
  52330. return code2.slice(node2.start, node2.end);
  52331. }
  52332. return "";
  52333. }
  52334. function willIMaybeExecuteBefore(target) {
  52335. return this._guessExecutionStatusRelativeTo(target) !== "after";
  52336. }
  52337. function getOuterFunction(path) {
  52338. return path.isProgram() ? path : (path.parentPath.scope.getFunctionParent() || path.parentPath.scope.getProgramParent()).path;
  52339. }
  52340. function isExecutionUncertain(type, key2) {
  52341. switch (type) {
  52342. case "LogicalExpression":
  52343. return key2 === "right";
  52344. case "ConditionalExpression":
  52345. case "IfStatement":
  52346. return key2 === "consequent" || key2 === "alternate";
  52347. case "WhileStatement":
  52348. case "DoWhileStatement":
  52349. case "ForInStatement":
  52350. case "ForOfStatement":
  52351. return key2 === "body";
  52352. case "ForStatement":
  52353. return key2 === "body" || key2 === "update";
  52354. case "SwitchStatement":
  52355. return key2 === "cases";
  52356. case "TryStatement":
  52357. return key2 === "handler";
  52358. case "AssignmentPattern":
  52359. return key2 === "right";
  52360. case "OptionalMemberExpression":
  52361. return key2 === "property";
  52362. case "OptionalCallExpression":
  52363. return key2 === "arguments";
  52364. default:
  52365. return false;
  52366. }
  52367. }
  52368. function isExecutionUncertainInList(paths, maxIndex) {
  52369. for (let i = 0; i < maxIndex; i++) {
  52370. const path = paths[i];
  52371. if (isExecutionUncertain(path.parent.type, path.parentKey)) {
  52372. return true;
  52373. }
  52374. }
  52375. return false;
  52376. }
  52377. var SYMBOL_CHECKING = Symbol();
  52378. function _guessExecutionStatusRelativeTo(target) {
  52379. return _guessExecutionStatusRelativeToCached(this, target, /* @__PURE__ */ new Map());
  52380. }
  52381. function _guessExecutionStatusRelativeToCached(base2, target, cache) {
  52382. const funcParent = {
  52383. this: getOuterFunction(base2),
  52384. target: getOuterFunction(target)
  52385. };
  52386. if (funcParent.target.node !== funcParent.this.node) {
  52387. return _guessExecutionStatusRelativeToDifferentFunctionsCached(base2, funcParent.target, cache);
  52388. }
  52389. const paths = {
  52390. target: target.getAncestry(),
  52391. this: base2.getAncestry()
  52392. };
  52393. if (paths.target.indexOf(base2) >= 0)
  52394. return "after";
  52395. if (paths.this.indexOf(target) >= 0)
  52396. return "before";
  52397. let commonPath;
  52398. const commonIndex = {
  52399. target: 0,
  52400. this: 0
  52401. };
  52402. while (!commonPath && commonIndex.this < paths.this.length) {
  52403. const path = paths.this[commonIndex.this];
  52404. commonIndex.target = paths.target.indexOf(path);
  52405. if (commonIndex.target >= 0) {
  52406. commonPath = path;
  52407. } else {
  52408. commonIndex.this++;
  52409. }
  52410. }
  52411. if (!commonPath) {
  52412. throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");
  52413. }
  52414. if (isExecutionUncertainInList(paths.this, commonIndex.this - 1) || isExecutionUncertainInList(paths.target, commonIndex.target - 1)) {
  52415. return "unknown";
  52416. }
  52417. const divergence = {
  52418. this: paths.this[commonIndex.this - 1],
  52419. target: paths.target[commonIndex.target - 1]
  52420. };
  52421. if (divergence.target.listKey && divergence.this.listKey && divergence.target.container === divergence.this.container) {
  52422. return divergence.target.key > divergence.this.key ? "before" : "after";
  52423. }
  52424. const keys2 = VISITOR_KEYS[commonPath.type];
  52425. const keyPosition = {
  52426. this: keys2.indexOf(divergence.this.parentKey),
  52427. target: keys2.indexOf(divergence.target.parentKey)
  52428. };
  52429. return keyPosition.target > keyPosition.this ? "before" : "after";
  52430. }
  52431. function _guessExecutionStatusRelativeToDifferentFunctionsInternal(base2, target, cache) {
  52432. if (!target.isFunctionDeclaration()) {
  52433. if (_guessExecutionStatusRelativeToCached(base2, target, cache) === "before") {
  52434. return "before";
  52435. }
  52436. return "unknown";
  52437. } else if (target.parentPath.isExportDeclaration()) {
  52438. return "unknown";
  52439. }
  52440. const binding = target.scope.getBinding(target.node.id.name);
  52441. if (!binding.references)
  52442. return "before";
  52443. const referencePaths = binding.referencePaths;
  52444. let allStatus;
  52445. for (const path of referencePaths) {
  52446. const childOfFunction = !!path.find((path2) => path2.node === target.node);
  52447. if (childOfFunction)
  52448. continue;
  52449. if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
  52450. return "unknown";
  52451. }
  52452. const status = _guessExecutionStatusRelativeToCached(base2, path, cache);
  52453. if (allStatus && allStatus !== status) {
  52454. return "unknown";
  52455. } else {
  52456. allStatus = status;
  52457. }
  52458. }
  52459. return allStatus;
  52460. }
  52461. function _guessExecutionStatusRelativeToDifferentFunctionsCached(base2, target, cache) {
  52462. let nodeMap = cache.get(base2.node);
  52463. let cached;
  52464. if (!nodeMap) {
  52465. cache.set(base2.node, nodeMap = /* @__PURE__ */ new Map());
  52466. } else if (cached = nodeMap.get(target.node)) {
  52467. if (cached === SYMBOL_CHECKING) {
  52468. return "unknown";
  52469. }
  52470. return cached;
  52471. }
  52472. nodeMap.set(target.node, SYMBOL_CHECKING);
  52473. const result = _guessExecutionStatusRelativeToDifferentFunctionsInternal(base2, target, cache);
  52474. nodeMap.set(target.node, result);
  52475. return result;
  52476. }
  52477. function resolve(dangerous, resolved) {
  52478. return this._resolve(dangerous, resolved) || this;
  52479. }
  52480. function _resolve(dangerous, resolved) {
  52481. if (resolved && resolved.indexOf(this) >= 0)
  52482. return;
  52483. resolved = resolved || [];
  52484. resolved.push(this);
  52485. if (this.isVariableDeclarator()) {
  52486. if (this.get("id").isIdentifier()) {
  52487. return this.get("init").resolve(dangerous, resolved);
  52488. } else {
  52489. }
  52490. } else if (this.isReferencedIdentifier()) {
  52491. const binding = this.scope.getBinding(this.node.name);
  52492. if (!binding)
  52493. return;
  52494. if (!binding.constant)
  52495. return;
  52496. if (binding.kind === "module")
  52497. return;
  52498. if (binding.path !== this) {
  52499. const ret = binding.path.resolve(dangerous, resolved);
  52500. if (this.find((parent) => parent.node === ret.node))
  52501. return;
  52502. return ret;
  52503. }
  52504. } else if (this.isTypeCastExpression()) {
  52505. return this.get("expression").resolve(dangerous, resolved);
  52506. } else if (dangerous && this.isMemberExpression()) {
  52507. const targetKey = this.toComputedKey();
  52508. if (!isLiteral(targetKey))
  52509. return;
  52510. const targetName = targetKey.value;
  52511. const target = this.get("object").resolve(dangerous, resolved);
  52512. if (target.isObjectExpression()) {
  52513. const props = target.get("properties");
  52514. for (const prop of props) {
  52515. if (!prop.isProperty())
  52516. continue;
  52517. const key2 = prop.get("key");
  52518. let match = prop.isnt("computed") && key2.isIdentifier({
  52519. name: targetName
  52520. });
  52521. match = match || key2.isLiteral({
  52522. value: targetName
  52523. });
  52524. if (match)
  52525. return prop.get("value").resolve(dangerous, resolved);
  52526. }
  52527. } else if (target.isArrayExpression() && !isNaN(+targetName)) {
  52528. const elems = target.get("elements");
  52529. const elem = elems[targetName];
  52530. if (elem)
  52531. return elem.resolve(dangerous, resolved);
  52532. }
  52533. }
  52534. }
  52535. function isConstantExpression() {
  52536. if (this.isIdentifier()) {
  52537. const binding = this.scope.getBinding(this.node.name);
  52538. if (!binding)
  52539. return false;
  52540. return binding.constant;
  52541. }
  52542. if (this.isLiteral()) {
  52543. if (this.isRegExpLiteral()) {
  52544. return false;
  52545. }
  52546. if (this.isTemplateLiteral()) {
  52547. return this.get("expressions").every((expression) => expression.isConstantExpression());
  52548. }
  52549. return true;
  52550. }
  52551. if (this.isUnaryExpression()) {
  52552. if (this.node.operator !== "void") {
  52553. return false;
  52554. }
  52555. return this.get("argument").isConstantExpression();
  52556. }
  52557. if (this.isBinaryExpression()) {
  52558. const {
  52559. operator
  52560. } = this.node;
  52561. return operator !== "in" && operator !== "instanceof" && this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
  52562. }
  52563. return false;
  52564. }
  52565. function isInStrictMode() {
  52566. const start3 = this.isProgram() ? this : this.parentPath;
  52567. const strictParent = start3.find((path) => {
  52568. if (path.isProgram({
  52569. sourceType: "module"
  52570. }))
  52571. return true;
  52572. if (path.isClass())
  52573. return true;
  52574. if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
  52575. return false;
  52576. }
  52577. let body;
  52578. if (path.isFunction()) {
  52579. body = path.node.body;
  52580. } else if (path.isProgram()) {
  52581. body = path.node;
  52582. } else {
  52583. return false;
  52584. }
  52585. for (const directive of body.directives) {
  52586. if (directive.value.value === "use strict") {
  52587. return true;
  52588. }
  52589. }
  52590. });
  52591. return !!strictParent;
  52592. }
  52593. }
  52594. });
  52595. // node_modules/@babel/traverse/lib/path/context.js
  52596. var require_context = __commonJS({
  52597. "node_modules/@babel/traverse/lib/path/context.js"(exports) {
  52598. "use strict";
  52599. Object.defineProperty(exports, "__esModule", {
  52600. value: true
  52601. });
  52602. exports._call = _call;
  52603. exports._getQueueContexts = _getQueueContexts;
  52604. exports._resyncKey = _resyncKey;
  52605. exports._resyncList = _resyncList;
  52606. exports._resyncParent = _resyncParent;
  52607. exports._resyncRemoved = _resyncRemoved;
  52608. exports.call = call;
  52609. exports.isBlacklisted = exports.isDenylisted = isDenylisted;
  52610. exports.popContext = popContext;
  52611. exports.pushContext = pushContext;
  52612. exports.requeue = requeue;
  52613. exports.resync = resync;
  52614. exports.setContext = setContext;
  52615. exports.setKey = setKey;
  52616. exports.setScope = setScope;
  52617. exports.setup = setup;
  52618. exports.skip = skip;
  52619. exports.skipKey = skipKey;
  52620. exports.stop = stop;
  52621. exports.visit = visit3;
  52622. var _traverseNode = require_traverse_node();
  52623. var _index = require_path();
  52624. function call(key2) {
  52625. const opts = this.opts;
  52626. this.debug(key2);
  52627. if (this.node) {
  52628. if (this._call(opts[key2]))
  52629. return true;
  52630. }
  52631. if (this.node) {
  52632. return this._call(opts[this.node.type] && opts[this.node.type][key2]);
  52633. }
  52634. return false;
  52635. }
  52636. function _call(fns) {
  52637. if (!fns)
  52638. return false;
  52639. for (const fn of fns) {
  52640. if (!fn)
  52641. continue;
  52642. const node2 = this.node;
  52643. if (!node2)
  52644. return true;
  52645. const ret = fn.call(this.state, this, this.state);
  52646. if (ret && typeof ret === "object" && typeof ret.then === "function") {
  52647. throw new Error(`You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.`);
  52648. }
  52649. if (ret) {
  52650. throw new Error(`Unexpected return value from visitor method ${fn}`);
  52651. }
  52652. if (this.node !== node2)
  52653. return true;
  52654. if (this._traverseFlags > 0)
  52655. return true;
  52656. }
  52657. return false;
  52658. }
  52659. function isDenylisted() {
  52660. var _this$opts$denylist;
  52661. const denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
  52662. return denylist && denylist.indexOf(this.node.type) > -1;
  52663. }
  52664. function restoreContext(path, context) {
  52665. if (path.context !== context) {
  52666. path.context = context;
  52667. path.state = context.state;
  52668. path.opts = context.opts;
  52669. }
  52670. }
  52671. function visit3() {
  52672. if (!this.node) {
  52673. return false;
  52674. }
  52675. if (this.isDenylisted()) {
  52676. return false;
  52677. }
  52678. if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
  52679. return false;
  52680. }
  52681. const currentContext = this.context;
  52682. if (this.shouldSkip || this.call("enter")) {
  52683. this.debug("Skip...");
  52684. return this.shouldStop;
  52685. }
  52686. restoreContext(this, currentContext);
  52687. this.debug("Recursing into...");
  52688. this.shouldStop = (0, _traverseNode.traverseNode)(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
  52689. restoreContext(this, currentContext);
  52690. this.call("exit");
  52691. return this.shouldStop;
  52692. }
  52693. function skip() {
  52694. this.shouldSkip = true;
  52695. }
  52696. function skipKey(key2) {
  52697. if (this.skipKeys == null) {
  52698. this.skipKeys = {};
  52699. }
  52700. this.skipKeys[key2] = true;
  52701. }
  52702. function stop() {
  52703. this._traverseFlags |= _index.SHOULD_SKIP | _index.SHOULD_STOP;
  52704. }
  52705. function setScope() {
  52706. if (this.opts && this.opts.noScope)
  52707. return;
  52708. let path = this.parentPath;
  52709. if ((this.key === "key" || this.listKey === "decorators") && path.isMethod() || this.key === "discriminant" && path.isSwitchStatement()) {
  52710. path = path.parentPath;
  52711. }
  52712. let target;
  52713. while (path && !target) {
  52714. if (path.opts && path.opts.noScope)
  52715. return;
  52716. target = path.scope;
  52717. path = path.parentPath;
  52718. }
  52719. this.scope = this.getScope(target);
  52720. if (this.scope)
  52721. this.scope.init();
  52722. }
  52723. function setContext(context) {
  52724. if (this.skipKeys != null) {
  52725. this.skipKeys = {};
  52726. }
  52727. this._traverseFlags = 0;
  52728. if (context) {
  52729. this.context = context;
  52730. this.state = context.state;
  52731. this.opts = context.opts;
  52732. }
  52733. this.setScope();
  52734. return this;
  52735. }
  52736. function resync() {
  52737. if (this.removed)
  52738. return;
  52739. this._resyncParent();
  52740. this._resyncList();
  52741. this._resyncKey();
  52742. }
  52743. function _resyncParent() {
  52744. if (this.parentPath) {
  52745. this.parent = this.parentPath.node;
  52746. }
  52747. }
  52748. function _resyncKey() {
  52749. if (!this.container)
  52750. return;
  52751. if (this.node === this.container[this.key]) {
  52752. return;
  52753. }
  52754. if (Array.isArray(this.container)) {
  52755. for (let i = 0; i < this.container.length; i++) {
  52756. if (this.container[i] === this.node) {
  52757. this.setKey(i);
  52758. return;
  52759. }
  52760. }
  52761. } else {
  52762. for (const key2 of Object.keys(this.container)) {
  52763. if (this.container[key2] === this.node) {
  52764. this.setKey(key2);
  52765. return;
  52766. }
  52767. }
  52768. }
  52769. this.key = null;
  52770. }
  52771. function _resyncList() {
  52772. if (!this.parent || !this.inList)
  52773. return;
  52774. const newContainer = this.parent[this.listKey];
  52775. if (this.container === newContainer)
  52776. return;
  52777. this.container = newContainer || null;
  52778. }
  52779. function _resyncRemoved() {
  52780. if (this.key == null || !this.container || this.container[this.key] !== this.node) {
  52781. this._markRemoved();
  52782. }
  52783. }
  52784. function popContext() {
  52785. this.contexts.pop();
  52786. if (this.contexts.length > 0) {
  52787. this.setContext(this.contexts[this.contexts.length - 1]);
  52788. } else {
  52789. this.setContext(void 0);
  52790. }
  52791. }
  52792. function pushContext(context) {
  52793. this.contexts.push(context);
  52794. this.setContext(context);
  52795. }
  52796. function setup(parentPath, container, listKey, key2) {
  52797. this.listKey = listKey;
  52798. this.container = container;
  52799. this.parentPath = parentPath || this.parentPath;
  52800. this.setKey(key2);
  52801. }
  52802. function setKey(key2) {
  52803. var _this$node;
  52804. this.key = key2;
  52805. this.node = this.container[this.key];
  52806. this.type = (_this$node = this.node) == null ? void 0 : _this$node.type;
  52807. }
  52808. function requeue(pathToQueue = this) {
  52809. if (pathToQueue.removed)
  52810. return;
  52811. ;
  52812. const contexts = this.contexts;
  52813. for (const context of contexts) {
  52814. context.maybeQueue(pathToQueue);
  52815. }
  52816. }
  52817. function _getQueueContexts() {
  52818. let path = this;
  52819. let contexts = this.contexts;
  52820. while (!contexts.length) {
  52821. path = path.parentPath;
  52822. if (!path)
  52823. break;
  52824. contexts = path.contexts;
  52825. }
  52826. return contexts;
  52827. }
  52828. }
  52829. });
  52830. // node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
  52831. var require_removal_hooks = __commonJS({
  52832. "node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"(exports) {
  52833. "use strict";
  52834. Object.defineProperty(exports, "__esModule", {
  52835. value: true
  52836. });
  52837. exports.hooks = void 0;
  52838. var hooks = [function(self2, parent) {
  52839. const removeParent = self2.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self2.key === "declaration" && parent.isExportDeclaration() || self2.key === "body" && parent.isLabeledStatement() || self2.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self2.key === "expression" && parent.isExpressionStatement();
  52840. if (removeParent) {
  52841. parent.remove();
  52842. return true;
  52843. }
  52844. }, function(self2, parent) {
  52845. if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
  52846. parent.replaceWith(parent.node.expressions[0]);
  52847. return true;
  52848. }
  52849. }, function(self2, parent) {
  52850. if (parent.isBinary()) {
  52851. if (self2.key === "left") {
  52852. parent.replaceWith(parent.node.right);
  52853. } else {
  52854. parent.replaceWith(parent.node.left);
  52855. }
  52856. return true;
  52857. }
  52858. }, function(self2, parent) {
  52859. if (parent.isIfStatement() && self2.key === "consequent" || self2.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
  52860. self2.replaceWith({
  52861. type: "BlockStatement",
  52862. body: []
  52863. });
  52864. return true;
  52865. }
  52866. }];
  52867. exports.hooks = hooks;
  52868. }
  52869. });
  52870. // node_modules/@babel/traverse/lib/path/removal.js
  52871. var require_removal = __commonJS({
  52872. "node_modules/@babel/traverse/lib/path/removal.js"(exports) {
  52873. "use strict";
  52874. Object.defineProperty(exports, "__esModule", {
  52875. value: true
  52876. });
  52877. exports._assertUnremoved = _assertUnremoved;
  52878. exports._callRemovalHooks = _callRemovalHooks;
  52879. exports._markRemoved = _markRemoved;
  52880. exports._remove = _remove;
  52881. exports._removeFromScope = _removeFromScope;
  52882. exports.remove = remove;
  52883. var _removalHooks = require_removal_hooks();
  52884. var _cache = require_cache();
  52885. var _index = require_path();
  52886. function remove() {
  52887. var _this$opts;
  52888. this._assertUnremoved();
  52889. this.resync();
  52890. if (!((_this$opts = this.opts) != null && _this$opts.noScope)) {
  52891. this._removeFromScope();
  52892. }
  52893. if (this._callRemovalHooks()) {
  52894. this._markRemoved();
  52895. return;
  52896. }
  52897. this.shareCommentsWithSiblings();
  52898. this._remove();
  52899. this._markRemoved();
  52900. }
  52901. function _removeFromScope() {
  52902. const bindings = this.getBindingIdentifiers();
  52903. Object.keys(bindings).forEach((name2) => this.scope.removeBinding(name2));
  52904. }
  52905. function _callRemovalHooks() {
  52906. for (const fn of _removalHooks.hooks) {
  52907. if (fn(this, this.parentPath))
  52908. return true;
  52909. }
  52910. }
  52911. function _remove() {
  52912. if (Array.isArray(this.container)) {
  52913. this.container.splice(this.key, 1);
  52914. this.updateSiblingKeys(this.key, -1);
  52915. } else {
  52916. this._replaceWith(null);
  52917. }
  52918. }
  52919. function _markRemoved() {
  52920. this._traverseFlags |= _index.SHOULD_SKIP | _index.REMOVED;
  52921. if (this.parent)
  52922. _cache.path.get(this.parent).delete(this.node);
  52923. this.node = null;
  52924. }
  52925. function _assertUnremoved() {
  52926. if (this.removed) {
  52927. throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
  52928. }
  52929. }
  52930. }
  52931. });
  52932. // node_modules/@babel/traverse/lib/path/lib/hoister.js
  52933. var require_hoister = __commonJS({
  52934. "node_modules/@babel/traverse/lib/path/lib/hoister.js"(exports) {
  52935. "use strict";
  52936. Object.defineProperty(exports, "__esModule", {
  52937. value: true
  52938. });
  52939. exports.default = void 0;
  52940. var _t = require_lib3();
  52941. var _t2 = _t;
  52942. var {
  52943. react
  52944. } = _t;
  52945. var {
  52946. cloneNode,
  52947. jsxExpressionContainer,
  52948. variableDeclaration,
  52949. variableDeclarator
  52950. } = _t2;
  52951. var referenceVisitor = {
  52952. ReferencedIdentifier(path, state) {
  52953. if (path.isJSXIdentifier() && react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
  52954. return;
  52955. }
  52956. if (path.node.name === "this") {
  52957. let scope = path.scope;
  52958. do {
  52959. if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
  52960. break;
  52961. }
  52962. } while (scope = scope.parent);
  52963. if (scope)
  52964. state.breakOnScopePaths.push(scope.path);
  52965. }
  52966. const binding = path.scope.getBinding(path.node.name);
  52967. if (!binding)
  52968. return;
  52969. for (const violation of binding.constantViolations) {
  52970. if (violation.scope !== binding.path.scope) {
  52971. state.mutableBinding = true;
  52972. path.stop();
  52973. return;
  52974. }
  52975. }
  52976. if (binding !== state.scope.getBinding(path.node.name))
  52977. return;
  52978. state.bindings[path.node.name] = binding;
  52979. }
  52980. };
  52981. var PathHoister = class {
  52982. constructor(path, scope) {
  52983. this.breakOnScopePaths = void 0;
  52984. this.bindings = void 0;
  52985. this.mutableBinding = void 0;
  52986. this.scopes = void 0;
  52987. this.scope = void 0;
  52988. this.path = void 0;
  52989. this.attachAfter = void 0;
  52990. this.breakOnScopePaths = [];
  52991. this.bindings = {};
  52992. this.mutableBinding = false;
  52993. this.scopes = [];
  52994. this.scope = scope;
  52995. this.path = path;
  52996. this.attachAfter = false;
  52997. }
  52998. isCompatibleScope(scope) {
  52999. for (const key2 of Object.keys(this.bindings)) {
  53000. const binding = this.bindings[key2];
  53001. if (!scope.bindingIdentifierEquals(key2, binding.identifier)) {
  53002. return false;
  53003. }
  53004. }
  53005. return true;
  53006. }
  53007. getCompatibleScopes() {
  53008. let scope = this.path.scope;
  53009. do {
  53010. if (this.isCompatibleScope(scope)) {
  53011. this.scopes.push(scope);
  53012. } else {
  53013. break;
  53014. }
  53015. if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
  53016. break;
  53017. }
  53018. } while (scope = scope.parent);
  53019. }
  53020. getAttachmentPath() {
  53021. let path = this._getAttachmentPath();
  53022. if (!path)
  53023. return;
  53024. let targetScope = path.scope;
  53025. if (targetScope.path === path) {
  53026. targetScope = path.scope.parent;
  53027. }
  53028. if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
  53029. for (const name2 of Object.keys(this.bindings)) {
  53030. if (!targetScope.hasOwnBinding(name2))
  53031. continue;
  53032. const binding = this.bindings[name2];
  53033. if (binding.kind === "param" || binding.path.parentKey === "params") {
  53034. continue;
  53035. }
  53036. const bindingParentPath = this.getAttachmentParentForPath(binding.path);
  53037. if (bindingParentPath.key >= path.key) {
  53038. this.attachAfter = true;
  53039. path = binding.path;
  53040. for (const violationPath of binding.constantViolations) {
  53041. if (this.getAttachmentParentForPath(violationPath).key > path.key) {
  53042. path = violationPath;
  53043. }
  53044. }
  53045. }
  53046. }
  53047. }
  53048. return path;
  53049. }
  53050. _getAttachmentPath() {
  53051. const scopes = this.scopes;
  53052. const scope = scopes.pop();
  53053. if (!scope)
  53054. return;
  53055. if (scope.path.isFunction()) {
  53056. if (this.hasOwnParamBindings(scope)) {
  53057. if (this.scope === scope)
  53058. return;
  53059. const bodies = scope.path.get("body").get("body");
  53060. for (let i = 0; i < bodies.length; i++) {
  53061. if (bodies[i].node._blockHoist)
  53062. continue;
  53063. return bodies[i];
  53064. }
  53065. } else {
  53066. return this.getNextScopeAttachmentParent();
  53067. }
  53068. } else if (scope.path.isProgram()) {
  53069. return this.getNextScopeAttachmentParent();
  53070. }
  53071. }
  53072. getNextScopeAttachmentParent() {
  53073. const scope = this.scopes.pop();
  53074. if (scope)
  53075. return this.getAttachmentParentForPath(scope.path);
  53076. }
  53077. getAttachmentParentForPath(path) {
  53078. do {
  53079. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  53080. return path;
  53081. }
  53082. } while (path = path.parentPath);
  53083. }
  53084. hasOwnParamBindings(scope) {
  53085. for (const name2 of Object.keys(this.bindings)) {
  53086. if (!scope.hasOwnBinding(name2))
  53087. continue;
  53088. const binding = this.bindings[name2];
  53089. if (binding.kind === "param" && binding.constant)
  53090. return true;
  53091. }
  53092. return false;
  53093. }
  53094. run() {
  53095. this.path.traverse(referenceVisitor, this);
  53096. if (this.mutableBinding)
  53097. return;
  53098. this.getCompatibleScopes();
  53099. const attachTo = this.getAttachmentPath();
  53100. if (!attachTo)
  53101. return;
  53102. if (attachTo.getFunctionParent() === this.path.getFunctionParent())
  53103. return;
  53104. let uid = attachTo.scope.generateUidIdentifier("ref");
  53105. const declarator = variableDeclarator(uid, this.path.node);
  53106. const insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
  53107. const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : variableDeclaration("var", [declarator])]);
  53108. const parent = this.path.parentPath;
  53109. if (parent.isJSXElement() && this.path.container === parent.node.children) {
  53110. uid = jsxExpressionContainer(uid);
  53111. }
  53112. this.path.replaceWith(cloneNode(uid));
  53113. return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
  53114. }
  53115. };
  53116. exports.default = PathHoister;
  53117. }
  53118. });
  53119. // node_modules/@babel/traverse/lib/path/modification.js
  53120. var require_modification = __commonJS({
  53121. "node_modules/@babel/traverse/lib/path/modification.js"(exports) {
  53122. "use strict";
  53123. Object.defineProperty(exports, "__esModule", {
  53124. value: true
  53125. });
  53126. exports._containerInsert = _containerInsert;
  53127. exports._containerInsertAfter = _containerInsertAfter;
  53128. exports._containerInsertBefore = _containerInsertBefore;
  53129. exports._verifyNodeList = _verifyNodeList;
  53130. exports.hoist = hoist;
  53131. exports.insertAfter = insertAfter;
  53132. exports.insertBefore = insertBefore;
  53133. exports.pushContainer = pushContainer;
  53134. exports.unshiftContainer = unshiftContainer;
  53135. exports.updateSiblingKeys = updateSiblingKeys;
  53136. var _cache = require_cache();
  53137. var _hoister = require_hoister();
  53138. var _index = require_path();
  53139. var _t = require_lib3();
  53140. var {
  53141. arrowFunctionExpression,
  53142. assertExpression,
  53143. assignmentExpression,
  53144. blockStatement,
  53145. callExpression,
  53146. cloneNode,
  53147. expressionStatement,
  53148. isAssignmentExpression,
  53149. isCallExpression: isCallExpression2,
  53150. isExportNamedDeclaration: isExportNamedDeclaration2,
  53151. isExpression,
  53152. isIdentifier: isIdentifier3,
  53153. isSequenceExpression,
  53154. isSuper,
  53155. thisExpression
  53156. } = _t;
  53157. function insertBefore(nodes_) {
  53158. this._assertUnremoved();
  53159. const nodes = this._verifyNodeList(nodes_);
  53160. const {
  53161. parentPath,
  53162. parent
  53163. } = this;
  53164. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || isExportNamedDeclaration2(parent) || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  53165. return parentPath.insertBefore(nodes);
  53166. } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  53167. if (this.node)
  53168. nodes.push(this.node);
  53169. return this.replaceExpressionWithStatements(nodes);
  53170. } else if (Array.isArray(this.container)) {
  53171. return this._containerInsertBefore(nodes);
  53172. } else if (this.isStatementOrBlock()) {
  53173. const node2 = this.node;
  53174. const shouldInsertCurrentNode = node2 && (!this.isExpressionStatement() || node2.expression != null);
  53175. this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node2] : []));
  53176. return this.unshiftContainer("body", nodes);
  53177. } else {
  53178. throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
  53179. }
  53180. }
  53181. function _containerInsert(from, nodes) {
  53182. this.updateSiblingKeys(from, nodes.length);
  53183. const paths = [];
  53184. this.container.splice(from, 0, ...nodes);
  53185. for (let i = 0; i < nodes.length; i++) {
  53186. const to = from + i;
  53187. const path = this.getSibling(to);
  53188. paths.push(path);
  53189. if (this.context && this.context.queue) {
  53190. path.pushContext(this.context);
  53191. }
  53192. }
  53193. const contexts = this._getQueueContexts();
  53194. for (const path of paths) {
  53195. path.setScope();
  53196. path.debug("Inserted.");
  53197. for (const context of contexts) {
  53198. context.maybeQueue(path, true);
  53199. }
  53200. }
  53201. return paths;
  53202. }
  53203. function _containerInsertBefore(nodes) {
  53204. return this._containerInsert(this.key, nodes);
  53205. }
  53206. function _containerInsertAfter(nodes) {
  53207. return this._containerInsert(this.key + 1, nodes);
  53208. }
  53209. var last = (arr) => arr[arr.length - 1];
  53210. function isHiddenInSequenceExpression(path) {
  53211. return isSequenceExpression(path.parent) && (last(path.parent.expressions) !== path.node || isHiddenInSequenceExpression(path.parentPath));
  53212. }
  53213. function isAlmostConstantAssignment(node2, scope) {
  53214. if (!isAssignmentExpression(node2) || !isIdentifier3(node2.left)) {
  53215. return false;
  53216. }
  53217. const blockScope = scope.getBlockParent();
  53218. return blockScope.hasOwnBinding(node2.left.name) && blockScope.getOwnBinding(node2.left.name).constantViolations.length <= 1;
  53219. }
  53220. function insertAfter(nodes_) {
  53221. this._assertUnremoved();
  53222. if (this.isSequenceExpression()) {
  53223. return last(this.get("expressions")).insertAfter(nodes_);
  53224. }
  53225. const nodes = this._verifyNodeList(nodes_);
  53226. const {
  53227. parentPath,
  53228. parent
  53229. } = this;
  53230. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || isExportNamedDeclaration2(parent) || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  53231. return parentPath.insertAfter(nodes.map((node2) => {
  53232. return isExpression(node2) ? expressionStatement(node2) : node2;
  53233. }));
  53234. } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  53235. if (this.node) {
  53236. const node2 = this.node;
  53237. let {
  53238. scope
  53239. } = this;
  53240. if (scope.path.isPattern()) {
  53241. assertExpression(node2);
  53242. this.replaceWith(callExpression(arrowFunctionExpression([], node2), []));
  53243. this.get("callee.body").insertAfter(nodes);
  53244. return [this];
  53245. }
  53246. if (isHiddenInSequenceExpression(this)) {
  53247. nodes.unshift(node2);
  53248. } else if (isCallExpression2(node2) && isSuper(node2.callee)) {
  53249. nodes.unshift(node2);
  53250. nodes.push(thisExpression());
  53251. } else if (isAlmostConstantAssignment(node2, scope)) {
  53252. nodes.unshift(node2);
  53253. nodes.push(cloneNode(node2.left));
  53254. } else if (scope.isPure(node2, true)) {
  53255. nodes.push(node2);
  53256. } else {
  53257. if (parentPath.isMethod({
  53258. computed: true,
  53259. key: node2
  53260. })) {
  53261. scope = scope.parent;
  53262. }
  53263. const temp = scope.generateDeclaredUidIdentifier();
  53264. nodes.unshift(expressionStatement(assignmentExpression("=", cloneNode(temp), node2)));
  53265. nodes.push(expressionStatement(cloneNode(temp)));
  53266. }
  53267. }
  53268. return this.replaceExpressionWithStatements(nodes);
  53269. } else if (Array.isArray(this.container)) {
  53270. return this._containerInsertAfter(nodes);
  53271. } else if (this.isStatementOrBlock()) {
  53272. const node2 = this.node;
  53273. const shouldInsertCurrentNode = node2 && (!this.isExpressionStatement() || node2.expression != null);
  53274. this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node2] : []));
  53275. return this.pushContainer("body", nodes);
  53276. } else {
  53277. throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
  53278. }
  53279. }
  53280. function updateSiblingKeys(fromIndex, incrementBy) {
  53281. if (!this.parent)
  53282. return;
  53283. const paths = _cache.path.get(this.parent);
  53284. for (const [, path] of paths) {
  53285. if (path.key >= fromIndex) {
  53286. path.key += incrementBy;
  53287. }
  53288. }
  53289. }
  53290. function _verifyNodeList(nodes) {
  53291. if (!nodes) {
  53292. return [];
  53293. }
  53294. if (!Array.isArray(nodes)) {
  53295. nodes = [nodes];
  53296. }
  53297. for (let i = 0; i < nodes.length; i++) {
  53298. const node2 = nodes[i];
  53299. let msg;
  53300. if (!node2) {
  53301. msg = "has falsy node";
  53302. } else if (typeof node2 !== "object") {
  53303. msg = "contains a non-object node";
  53304. } else if (!node2.type) {
  53305. msg = "without a type";
  53306. } else if (node2 instanceof _index.default) {
  53307. msg = "has a NodePath when it expected a raw object";
  53308. }
  53309. if (msg) {
  53310. const type = Array.isArray(node2) ? "array" : typeof node2;
  53311. throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
  53312. }
  53313. }
  53314. return nodes;
  53315. }
  53316. function unshiftContainer(listKey, nodes) {
  53317. this._assertUnremoved();
  53318. nodes = this._verifyNodeList(nodes);
  53319. const path = _index.default.get({
  53320. parentPath: this,
  53321. parent: this.node,
  53322. container: this.node[listKey],
  53323. listKey,
  53324. key: 0
  53325. }).setContext(this.context);
  53326. return path._containerInsertBefore(nodes);
  53327. }
  53328. function pushContainer(listKey, nodes) {
  53329. this._assertUnremoved();
  53330. const verifiedNodes = this._verifyNodeList(nodes);
  53331. const container = this.node[listKey];
  53332. const path = _index.default.get({
  53333. parentPath: this,
  53334. parent: this.node,
  53335. container,
  53336. listKey,
  53337. key: container.length
  53338. }).setContext(this.context);
  53339. return path.replaceWithMultiple(verifiedNodes);
  53340. }
  53341. function hoist(scope = this.scope) {
  53342. const hoister = new _hoister.default(this, scope);
  53343. return hoister.run();
  53344. }
  53345. }
  53346. });
  53347. // node_modules/@babel/traverse/lib/path/family.js
  53348. var require_family = __commonJS({
  53349. "node_modules/@babel/traverse/lib/path/family.js"(exports) {
  53350. "use strict";
  53351. Object.defineProperty(exports, "__esModule", {
  53352. value: true
  53353. });
  53354. exports._getKey = _getKey;
  53355. exports._getPattern = _getPattern;
  53356. exports.get = get;
  53357. exports.getAllNextSiblings = getAllNextSiblings;
  53358. exports.getAllPrevSiblings = getAllPrevSiblings;
  53359. exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
  53360. exports.getBindingIdentifiers = getBindingIdentifiers;
  53361. exports.getCompletionRecords = getCompletionRecords;
  53362. exports.getNextSibling = getNextSibling;
  53363. exports.getOpposite = getOpposite;
  53364. exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
  53365. exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
  53366. exports.getPrevSibling = getPrevSibling;
  53367. exports.getSibling = getSibling;
  53368. var _index = require_path();
  53369. var _t = require_lib3();
  53370. var {
  53371. getBindingIdentifiers: _getBindingIdentifiers,
  53372. getOuterBindingIdentifiers: _getOuterBindingIdentifiers,
  53373. isDeclaration: isDeclaration2,
  53374. numericLiteral,
  53375. unaryExpression
  53376. } = _t;
  53377. var NORMAL_COMPLETION = 0;
  53378. var BREAK_COMPLETION = 1;
  53379. function NormalCompletion(path) {
  53380. return {
  53381. type: NORMAL_COMPLETION,
  53382. path
  53383. };
  53384. }
  53385. function BreakCompletion(path) {
  53386. return {
  53387. type: BREAK_COMPLETION,
  53388. path
  53389. };
  53390. }
  53391. function getOpposite() {
  53392. if (this.key === "left") {
  53393. return this.getSibling("right");
  53394. } else if (this.key === "right") {
  53395. return this.getSibling("left");
  53396. }
  53397. return null;
  53398. }
  53399. function addCompletionRecords(path, records, context) {
  53400. if (path) {
  53401. records.push(..._getCompletionRecords(path, context));
  53402. }
  53403. return records;
  53404. }
  53405. function completionRecordForSwitch(cases, records, context) {
  53406. let lastNormalCompletions = [];
  53407. for (let i = 0; i < cases.length; i++) {
  53408. const casePath = cases[i];
  53409. const caseCompletions = _getCompletionRecords(casePath, context);
  53410. const normalCompletions = [];
  53411. const breakCompletions = [];
  53412. for (const c2 of caseCompletions) {
  53413. if (c2.type === NORMAL_COMPLETION) {
  53414. normalCompletions.push(c2);
  53415. }
  53416. if (c2.type === BREAK_COMPLETION) {
  53417. breakCompletions.push(c2);
  53418. }
  53419. }
  53420. if (normalCompletions.length) {
  53421. lastNormalCompletions = normalCompletions;
  53422. }
  53423. records.push(...breakCompletions);
  53424. }
  53425. records.push(...lastNormalCompletions);
  53426. return records;
  53427. }
  53428. function normalCompletionToBreak(completions) {
  53429. completions.forEach((c2) => {
  53430. c2.type = BREAK_COMPLETION;
  53431. });
  53432. }
  53433. function replaceBreakStatementInBreakCompletion(completions, reachable) {
  53434. completions.forEach((c2) => {
  53435. if (c2.path.isBreakStatement({
  53436. label: null
  53437. })) {
  53438. if (reachable) {
  53439. c2.path.replaceWith(unaryExpression("void", numericLiteral(0)));
  53440. } else {
  53441. c2.path.remove();
  53442. }
  53443. }
  53444. });
  53445. }
  53446. function getStatementListCompletion(paths, context) {
  53447. const completions = [];
  53448. if (context.canHaveBreak) {
  53449. let lastNormalCompletions = [];
  53450. for (let i = 0; i < paths.length; i++) {
  53451. const path = paths[i];
  53452. const newContext = Object.assign({}, context, {
  53453. inCaseClause: false
  53454. });
  53455. if (path.isBlockStatement() && (context.inCaseClause || context.shouldPopulateBreak)) {
  53456. newContext.shouldPopulateBreak = true;
  53457. } else {
  53458. newContext.shouldPopulateBreak = false;
  53459. }
  53460. const statementCompletions = _getCompletionRecords(path, newContext);
  53461. if (statementCompletions.length > 0 && statementCompletions.every((c2) => c2.type === BREAK_COMPLETION)) {
  53462. if (lastNormalCompletions.length > 0 && statementCompletions.every((c2) => c2.path.isBreakStatement({
  53463. label: null
  53464. }))) {
  53465. normalCompletionToBreak(lastNormalCompletions);
  53466. completions.push(...lastNormalCompletions);
  53467. if (lastNormalCompletions.some((c2) => c2.path.isDeclaration())) {
  53468. completions.push(...statementCompletions);
  53469. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  53470. }
  53471. replaceBreakStatementInBreakCompletion(statementCompletions, false);
  53472. } else {
  53473. completions.push(...statementCompletions);
  53474. if (!context.shouldPopulateBreak) {
  53475. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  53476. }
  53477. }
  53478. break;
  53479. }
  53480. if (i === paths.length - 1) {
  53481. completions.push(...statementCompletions);
  53482. } else {
  53483. lastNormalCompletions = [];
  53484. for (let i2 = 0; i2 < statementCompletions.length; i2++) {
  53485. const c2 = statementCompletions[i2];
  53486. if (c2.type === BREAK_COMPLETION) {
  53487. completions.push(c2);
  53488. }
  53489. if (c2.type === NORMAL_COMPLETION) {
  53490. lastNormalCompletions.push(c2);
  53491. }
  53492. }
  53493. }
  53494. }
  53495. } else if (paths.length) {
  53496. for (let i = paths.length - 1; i >= 0; i--) {
  53497. const pathCompletions = _getCompletionRecords(paths[i], context);
  53498. if (pathCompletions.length > 1 || pathCompletions.length === 1 && !pathCompletions[0].path.isVariableDeclaration()) {
  53499. completions.push(...pathCompletions);
  53500. break;
  53501. }
  53502. }
  53503. }
  53504. return completions;
  53505. }
  53506. function _getCompletionRecords(path, context) {
  53507. let records = [];
  53508. if (path.isIfStatement()) {
  53509. records = addCompletionRecords(path.get("consequent"), records, context);
  53510. records = addCompletionRecords(path.get("alternate"), records, context);
  53511. } else if (path.isDoExpression() || path.isFor() || path.isWhile() || path.isLabeledStatement()) {
  53512. return addCompletionRecords(path.get("body"), records, context);
  53513. } else if (path.isProgram() || path.isBlockStatement()) {
  53514. return getStatementListCompletion(path.get("body"), context);
  53515. } else if (path.isFunction()) {
  53516. return _getCompletionRecords(path.get("body"), context);
  53517. } else if (path.isTryStatement()) {
  53518. records = addCompletionRecords(path.get("block"), records, context);
  53519. records = addCompletionRecords(path.get("handler"), records, context);
  53520. } else if (path.isCatchClause()) {
  53521. return addCompletionRecords(path.get("body"), records, context);
  53522. } else if (path.isSwitchStatement()) {
  53523. return completionRecordForSwitch(path.get("cases"), records, context);
  53524. } else if (path.isSwitchCase()) {
  53525. return getStatementListCompletion(path.get("consequent"), {
  53526. canHaveBreak: true,
  53527. shouldPopulateBreak: false,
  53528. inCaseClause: true
  53529. });
  53530. } else if (path.isBreakStatement()) {
  53531. records.push(BreakCompletion(path));
  53532. } else {
  53533. records.push(NormalCompletion(path));
  53534. }
  53535. return records;
  53536. }
  53537. function getCompletionRecords() {
  53538. const records = _getCompletionRecords(this, {
  53539. canHaveBreak: false,
  53540. shouldPopulateBreak: false,
  53541. inCaseClause: false
  53542. });
  53543. return records.map((r) => r.path);
  53544. }
  53545. function getSibling(key2) {
  53546. return _index.default.get({
  53547. parentPath: this.parentPath,
  53548. parent: this.parent,
  53549. container: this.container,
  53550. listKey: this.listKey,
  53551. key: key2
  53552. }).setContext(this.context);
  53553. }
  53554. function getPrevSibling() {
  53555. return this.getSibling(this.key - 1);
  53556. }
  53557. function getNextSibling() {
  53558. return this.getSibling(this.key + 1);
  53559. }
  53560. function getAllNextSiblings() {
  53561. let _key = this.key;
  53562. let sibling = this.getSibling(++_key);
  53563. const siblings = [];
  53564. while (sibling.node) {
  53565. siblings.push(sibling);
  53566. sibling = this.getSibling(++_key);
  53567. }
  53568. return siblings;
  53569. }
  53570. function getAllPrevSiblings() {
  53571. let _key = this.key;
  53572. let sibling = this.getSibling(--_key);
  53573. const siblings = [];
  53574. while (sibling.node) {
  53575. siblings.push(sibling);
  53576. sibling = this.getSibling(--_key);
  53577. }
  53578. return siblings;
  53579. }
  53580. function get(key2, context = true) {
  53581. if (context === true)
  53582. context = this.context;
  53583. const parts = key2.split(".");
  53584. if (parts.length === 1) {
  53585. return this._getKey(key2, context);
  53586. } else {
  53587. return this._getPattern(parts, context);
  53588. }
  53589. }
  53590. function _getKey(key2, context) {
  53591. const node2 = this.node;
  53592. const container = node2[key2];
  53593. if (Array.isArray(container)) {
  53594. return container.map((_, i) => {
  53595. return _index.default.get({
  53596. listKey: key2,
  53597. parentPath: this,
  53598. parent: node2,
  53599. container,
  53600. key: i
  53601. }).setContext(context);
  53602. });
  53603. } else {
  53604. return _index.default.get({
  53605. parentPath: this,
  53606. parent: node2,
  53607. container: node2,
  53608. key: key2
  53609. }).setContext(context);
  53610. }
  53611. }
  53612. function _getPattern(parts, context) {
  53613. let path = this;
  53614. for (const part of parts) {
  53615. if (part === ".") {
  53616. path = path.parentPath;
  53617. } else {
  53618. if (Array.isArray(path)) {
  53619. path = path[part];
  53620. } else {
  53621. path = path.get(part, context);
  53622. }
  53623. }
  53624. }
  53625. return path;
  53626. }
  53627. function getBindingIdentifiers(duplicates) {
  53628. return _getBindingIdentifiers(this.node, duplicates);
  53629. }
  53630. function getOuterBindingIdentifiers(duplicates) {
  53631. return _getOuterBindingIdentifiers(this.node, duplicates);
  53632. }
  53633. function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
  53634. const path = this;
  53635. const search2 = [path];
  53636. const ids = /* @__PURE__ */ Object.create(null);
  53637. while (search2.length) {
  53638. const id = search2.shift();
  53639. if (!id)
  53640. continue;
  53641. if (!id.node)
  53642. continue;
  53643. const keys2 = _getBindingIdentifiers.keys[id.node.type];
  53644. if (id.isIdentifier()) {
  53645. if (duplicates) {
  53646. const _ids = ids[id.node.name] = ids[id.node.name] || [];
  53647. _ids.push(id);
  53648. } else {
  53649. ids[id.node.name] = id;
  53650. }
  53651. continue;
  53652. }
  53653. if (id.isExportDeclaration()) {
  53654. const declaration = id.get("declaration");
  53655. if (isDeclaration2(declaration)) {
  53656. search2.push(declaration);
  53657. }
  53658. continue;
  53659. }
  53660. if (outerOnly) {
  53661. if (id.isFunctionDeclaration()) {
  53662. search2.push(id.get("id"));
  53663. continue;
  53664. }
  53665. if (id.isFunctionExpression()) {
  53666. continue;
  53667. }
  53668. }
  53669. if (keys2) {
  53670. for (let i = 0; i < keys2.length; i++) {
  53671. const key2 = keys2[i];
  53672. const child = id.get(key2);
  53673. if (Array.isArray(child)) {
  53674. search2.push(...child);
  53675. } else if (child.node) {
  53676. search2.push(child);
  53677. }
  53678. }
  53679. }
  53680. }
  53681. return ids;
  53682. }
  53683. function getOuterBindingIdentifierPaths(duplicates = false) {
  53684. return this.getBindingIdentifierPaths(duplicates, true);
  53685. }
  53686. }
  53687. });
  53688. // node_modules/@babel/traverse/lib/path/comments.js
  53689. var require_comments = __commonJS({
  53690. "node_modules/@babel/traverse/lib/path/comments.js"(exports) {
  53691. "use strict";
  53692. Object.defineProperty(exports, "__esModule", {
  53693. value: true
  53694. });
  53695. exports.addComment = addComment;
  53696. exports.addComments = addComments;
  53697. exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
  53698. var _t = require_lib3();
  53699. var {
  53700. addComment: _addComment,
  53701. addComments: _addComments
  53702. } = _t;
  53703. function shareCommentsWithSiblings() {
  53704. if (typeof this.key === "string")
  53705. return;
  53706. const node2 = this.node;
  53707. if (!node2)
  53708. return;
  53709. const trailing = node2.trailingComments;
  53710. const leading = node2.leadingComments;
  53711. if (!trailing && !leading)
  53712. return;
  53713. const prev = this.getSibling(this.key - 1);
  53714. const next = this.getSibling(this.key + 1);
  53715. const hasPrev = Boolean(prev.node);
  53716. const hasNext = Boolean(next.node);
  53717. if (hasPrev) {
  53718. if (leading) {
  53719. prev.addComments("trailing", removeIfExisting(leading, prev.node.trailingComments));
  53720. }
  53721. if (trailing && !hasNext)
  53722. prev.addComments("trailing", trailing);
  53723. }
  53724. if (hasNext) {
  53725. if (trailing) {
  53726. next.addComments("leading", removeIfExisting(trailing, next.node.leadingComments));
  53727. }
  53728. if (leading && !hasPrev)
  53729. next.addComments("leading", leading);
  53730. }
  53731. }
  53732. function removeIfExisting(list3, toRemove) {
  53733. if (!toRemove)
  53734. return list3;
  53735. let lastFoundIndex = -1;
  53736. return list3.filter((el) => {
  53737. const i = toRemove.indexOf(el, lastFoundIndex);
  53738. if (i === -1)
  53739. return true;
  53740. lastFoundIndex = i;
  53741. });
  53742. }
  53743. function addComment(type, content3, line2) {
  53744. _addComment(this.node, type, content3, line2);
  53745. }
  53746. function addComments(type, comments) {
  53747. _addComments(this.node, type, comments);
  53748. }
  53749. }
  53750. });
  53751. // node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js
  53752. var require_virtual_types_validator = __commonJS({
  53753. "node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js"(exports) {
  53754. "use strict";
  53755. Object.defineProperty(exports, "__esModule", {
  53756. value: true
  53757. });
  53758. exports.isBindingIdentifier = isBindingIdentifier;
  53759. exports.isBlockScoped = isBlockScoped;
  53760. exports.isExistentialTypeParam = isExistentialTypeParam;
  53761. exports.isExpression = isExpression;
  53762. exports.isFlow = isFlow;
  53763. exports.isForAwaitStatement = isForAwaitStatement;
  53764. exports.isGenerated = isGenerated;
  53765. exports.isNumericLiteralTypeAnnotation = isNumericLiteralTypeAnnotation;
  53766. exports.isPure = isPure;
  53767. exports.isReferenced = isReferenced;
  53768. exports.isReferencedIdentifier = isReferencedIdentifier;
  53769. exports.isReferencedMemberExpression = isReferencedMemberExpression;
  53770. exports.isRestProperty = isRestProperty;
  53771. exports.isScope = isScope;
  53772. exports.isSpreadProperty = isSpreadProperty;
  53773. exports.isStatement = isStatement;
  53774. exports.isUser = isUser;
  53775. exports.isVar = isVar;
  53776. var _t = require_lib3();
  53777. var {
  53778. isBinding,
  53779. isBlockScoped: nodeIsBlockScoped,
  53780. isExportDeclaration,
  53781. isExpression: nodeIsExpression,
  53782. isFlow: nodeIsFlow,
  53783. isForStatement,
  53784. isForXStatement,
  53785. isIdentifier: isIdentifier3,
  53786. isImportDeclaration,
  53787. isImportSpecifier,
  53788. isJSXIdentifier: isJSXIdentifier3,
  53789. isJSXMemberExpression,
  53790. isMemberExpression: isMemberExpression2,
  53791. isRestElement: nodeIsRestElement,
  53792. isReferenced: nodeIsReferenced,
  53793. isScope: nodeIsScope,
  53794. isStatement: nodeIsStatement,
  53795. isVar: nodeIsVar,
  53796. isVariableDeclaration: isVariableDeclaration2,
  53797. react,
  53798. isForOfStatement
  53799. } = _t;
  53800. var {
  53801. isCompatTag
  53802. } = react;
  53803. function isReferencedIdentifier(opts) {
  53804. const {
  53805. node: node2,
  53806. parent
  53807. } = this;
  53808. if (!isIdentifier3(node2, opts) && !isJSXMemberExpression(parent, opts)) {
  53809. if (isJSXIdentifier3(node2, opts)) {
  53810. if (isCompatTag(node2.name))
  53811. return false;
  53812. } else {
  53813. return false;
  53814. }
  53815. }
  53816. return nodeIsReferenced(node2, parent, this.parentPath.parent);
  53817. }
  53818. function isReferencedMemberExpression() {
  53819. const {
  53820. node: node2,
  53821. parent
  53822. } = this;
  53823. return isMemberExpression2(node2) && nodeIsReferenced(node2, parent);
  53824. }
  53825. function isBindingIdentifier() {
  53826. const {
  53827. node: node2,
  53828. parent
  53829. } = this;
  53830. const grandparent = this.parentPath.parent;
  53831. return isIdentifier3(node2) && isBinding(node2, parent, grandparent);
  53832. }
  53833. function isStatement() {
  53834. const {
  53835. node: node2,
  53836. parent
  53837. } = this;
  53838. if (nodeIsStatement(node2)) {
  53839. if (isVariableDeclaration2(node2)) {
  53840. if (isForXStatement(parent, {
  53841. left: node2
  53842. }))
  53843. return false;
  53844. if (isForStatement(parent, {
  53845. init: node2
  53846. }))
  53847. return false;
  53848. }
  53849. return true;
  53850. } else {
  53851. return false;
  53852. }
  53853. }
  53854. function isExpression() {
  53855. if (this.isIdentifier()) {
  53856. return this.isReferencedIdentifier();
  53857. } else {
  53858. return nodeIsExpression(this.node);
  53859. }
  53860. }
  53861. function isScope() {
  53862. return nodeIsScope(this.node, this.parent);
  53863. }
  53864. function isReferenced() {
  53865. return nodeIsReferenced(this.node, this.parent);
  53866. }
  53867. function isBlockScoped() {
  53868. return nodeIsBlockScoped(this.node);
  53869. }
  53870. function isVar() {
  53871. return nodeIsVar(this.node);
  53872. }
  53873. function isUser() {
  53874. return this.node && !!this.node.loc;
  53875. }
  53876. function isGenerated() {
  53877. return !this.isUser();
  53878. }
  53879. function isPure(constantsOnly) {
  53880. return this.scope.isPure(this.node, constantsOnly);
  53881. }
  53882. function isFlow() {
  53883. const {
  53884. node: node2
  53885. } = this;
  53886. if (nodeIsFlow(node2)) {
  53887. return true;
  53888. } else if (isImportDeclaration(node2)) {
  53889. return node2.importKind === "type" || node2.importKind === "typeof";
  53890. } else if (isExportDeclaration(node2)) {
  53891. return node2.exportKind === "type";
  53892. } else if (isImportSpecifier(node2)) {
  53893. return node2.importKind === "type" || node2.importKind === "typeof";
  53894. } else {
  53895. return false;
  53896. }
  53897. }
  53898. function isRestProperty() {
  53899. return nodeIsRestElement(this.node) && this.parentPath && this.parentPath.isObjectPattern();
  53900. }
  53901. function isSpreadProperty() {
  53902. return nodeIsRestElement(this.node) && this.parentPath && this.parentPath.isObjectExpression();
  53903. }
  53904. function isForAwaitStatement() {
  53905. return isForOfStatement(this.node, {
  53906. await: true
  53907. });
  53908. }
  53909. function isExistentialTypeParam() {
  53910. throw new Error("`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.");
  53911. }
  53912. function isNumericLiteralTypeAnnotation() {
  53913. throw new Error("`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.");
  53914. }
  53915. }
  53916. });
  53917. // node_modules/@babel/traverse/lib/path/index.js
  53918. var require_path = __commonJS({
  53919. "node_modules/@babel/traverse/lib/path/index.js"(exports) {
  53920. "use strict";
  53921. Object.defineProperty(exports, "__esModule", {
  53922. value: true
  53923. });
  53924. exports.default = exports.SHOULD_STOP = exports.SHOULD_SKIP = exports.REMOVED = void 0;
  53925. var virtualTypes = require_virtual_types();
  53926. var _debug = require_src();
  53927. var _index = require_lib13();
  53928. var _scope = require_scope();
  53929. var _t = require_lib3();
  53930. var t3 = _t;
  53931. var _cache = require_cache();
  53932. var _generator = require_lib4();
  53933. var NodePath_ancestry = require_ancestry();
  53934. var NodePath_inference = require_inference();
  53935. var NodePath_replacement = require_replacement();
  53936. var NodePath_evaluation = require_evaluation();
  53937. var NodePath_conversion = require_conversion();
  53938. var NodePath_introspection = require_introspection();
  53939. var NodePath_context = require_context();
  53940. var NodePath_removal = require_removal();
  53941. var NodePath_modification = require_modification();
  53942. var NodePath_family = require_family();
  53943. var NodePath_comments = require_comments();
  53944. var NodePath_virtual_types_validator = require_virtual_types_validator();
  53945. var {
  53946. validate
  53947. } = _t;
  53948. var debug = _debug("babel");
  53949. var REMOVED = 1 << 0;
  53950. exports.REMOVED = REMOVED;
  53951. var SHOULD_STOP = 1 << 1;
  53952. exports.SHOULD_STOP = SHOULD_STOP;
  53953. var SHOULD_SKIP = 1 << 2;
  53954. exports.SHOULD_SKIP = SHOULD_SKIP;
  53955. var NodePath = class {
  53956. constructor(hub, parent) {
  53957. this.contexts = [];
  53958. this.state = null;
  53959. this.opts = null;
  53960. this._traverseFlags = 0;
  53961. this.skipKeys = null;
  53962. this.parentPath = null;
  53963. this.container = null;
  53964. this.listKey = null;
  53965. this.key = null;
  53966. this.node = null;
  53967. this.type = null;
  53968. this.parent = parent;
  53969. this.hub = hub;
  53970. this.data = null;
  53971. this.context = null;
  53972. this.scope = null;
  53973. }
  53974. static get({
  53975. hub,
  53976. parentPath,
  53977. parent,
  53978. container,
  53979. listKey,
  53980. key: key2
  53981. }) {
  53982. if (!hub && parentPath) {
  53983. hub = parentPath.hub;
  53984. }
  53985. if (!parent) {
  53986. throw new Error("To get a node path the parent needs to exist");
  53987. }
  53988. const targetNode = container[key2];
  53989. let paths = _cache.path.get(parent);
  53990. if (!paths) {
  53991. paths = /* @__PURE__ */ new Map();
  53992. _cache.path.set(parent, paths);
  53993. }
  53994. let path = paths.get(targetNode);
  53995. if (!path) {
  53996. path = new NodePath(hub, parent);
  53997. if (targetNode)
  53998. paths.set(targetNode, path);
  53999. }
  54000. path.setup(parentPath, container, listKey, key2);
  54001. return path;
  54002. }
  54003. getScope(scope) {
  54004. return this.isScope() ? new _scope.default(this) : scope;
  54005. }
  54006. setData(key2, val) {
  54007. if (this.data == null) {
  54008. this.data = /* @__PURE__ */ Object.create(null);
  54009. }
  54010. return this.data[key2] = val;
  54011. }
  54012. getData(key2, def) {
  54013. if (this.data == null) {
  54014. this.data = /* @__PURE__ */ Object.create(null);
  54015. }
  54016. let val = this.data[key2];
  54017. if (val === void 0 && def !== void 0)
  54018. val = this.data[key2] = def;
  54019. return val;
  54020. }
  54021. hasNode() {
  54022. return this.node != null;
  54023. }
  54024. buildCodeFrameError(msg, Error2 = SyntaxError) {
  54025. return this.hub.buildError(this.node, msg, Error2);
  54026. }
  54027. traverse(visitor, state) {
  54028. (0, _index.default)(this.node, visitor, this.scope, state, this);
  54029. }
  54030. set(key2, node2) {
  54031. validate(this.node, key2, node2);
  54032. this.node[key2] = node2;
  54033. }
  54034. getPathLocation() {
  54035. const parts = [];
  54036. let path = this;
  54037. do {
  54038. let key2 = path.key;
  54039. if (path.inList)
  54040. key2 = `${path.listKey}[${key2}]`;
  54041. parts.unshift(key2);
  54042. } while (path = path.parentPath);
  54043. return parts.join(".");
  54044. }
  54045. debug(message) {
  54046. if (!debug.enabled)
  54047. return;
  54048. debug(`${this.getPathLocation()} ${this.type}: ${message}`);
  54049. }
  54050. toString() {
  54051. return (0, _generator.default)(this.node).code;
  54052. }
  54053. get inList() {
  54054. return !!this.listKey;
  54055. }
  54056. set inList(inList) {
  54057. if (!inList) {
  54058. this.listKey = null;
  54059. }
  54060. }
  54061. get parentKey() {
  54062. return this.listKey || this.key;
  54063. }
  54064. get shouldSkip() {
  54065. return !!(this._traverseFlags & SHOULD_SKIP);
  54066. }
  54067. set shouldSkip(v) {
  54068. if (v) {
  54069. this._traverseFlags |= SHOULD_SKIP;
  54070. } else {
  54071. this._traverseFlags &= ~SHOULD_SKIP;
  54072. }
  54073. }
  54074. get shouldStop() {
  54075. return !!(this._traverseFlags & SHOULD_STOP);
  54076. }
  54077. set shouldStop(v) {
  54078. if (v) {
  54079. this._traverseFlags |= SHOULD_STOP;
  54080. } else {
  54081. this._traverseFlags &= ~SHOULD_STOP;
  54082. }
  54083. }
  54084. get removed() {
  54085. return !!(this._traverseFlags & REMOVED);
  54086. }
  54087. set removed(v) {
  54088. if (v) {
  54089. this._traverseFlags |= REMOVED;
  54090. } else {
  54091. this._traverseFlags &= ~REMOVED;
  54092. }
  54093. }
  54094. };
  54095. Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments);
  54096. {
  54097. NodePath.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
  54098. }
  54099. for (const type of t3.TYPES) {
  54100. const typeKey = `is${type}`;
  54101. const fn = t3[typeKey];
  54102. NodePath.prototype[typeKey] = function(opts) {
  54103. return fn(this.node, opts);
  54104. };
  54105. NodePath.prototype[`assert${type}`] = function(opts) {
  54106. if (!fn(this.node, opts)) {
  54107. throw new TypeError(`Expected node path of type ${type}`);
  54108. }
  54109. };
  54110. }
  54111. Object.assign(NodePath.prototype, NodePath_virtual_types_validator);
  54112. for (const type of Object.keys(virtualTypes)) {
  54113. if (type[0] === "_")
  54114. continue;
  54115. if (!t3.TYPES.includes(type))
  54116. t3.TYPES.push(type);
  54117. }
  54118. var _default = NodePath;
  54119. exports.default = _default;
  54120. }
  54121. });
  54122. // node_modules/@babel/traverse/lib/context.js
  54123. var require_context2 = __commonJS({
  54124. "node_modules/@babel/traverse/lib/context.js"(exports) {
  54125. "use strict";
  54126. Object.defineProperty(exports, "__esModule", {
  54127. value: true
  54128. });
  54129. exports.default = void 0;
  54130. var _path = require_path();
  54131. var _t = require_lib3();
  54132. var {
  54133. VISITOR_KEYS
  54134. } = _t;
  54135. var TraversalContext = class {
  54136. constructor(scope, opts, state, parentPath) {
  54137. this.queue = null;
  54138. this.priorityQueue = null;
  54139. this.parentPath = parentPath;
  54140. this.scope = scope;
  54141. this.state = state;
  54142. this.opts = opts;
  54143. }
  54144. shouldVisit(node2) {
  54145. const opts = this.opts;
  54146. if (opts.enter || opts.exit)
  54147. return true;
  54148. if (opts[node2.type])
  54149. return true;
  54150. const keys2 = VISITOR_KEYS[node2.type];
  54151. if (!(keys2 != null && keys2.length))
  54152. return false;
  54153. for (const key2 of keys2) {
  54154. if (node2[key2]) {
  54155. return true;
  54156. }
  54157. }
  54158. return false;
  54159. }
  54160. create(node2, container, key2, listKey) {
  54161. return _path.default.get({
  54162. parentPath: this.parentPath,
  54163. parent: node2,
  54164. container,
  54165. key: key2,
  54166. listKey
  54167. });
  54168. }
  54169. maybeQueue(path, notPriority) {
  54170. if (this.queue) {
  54171. if (notPriority) {
  54172. this.queue.push(path);
  54173. } else {
  54174. this.priorityQueue.push(path);
  54175. }
  54176. }
  54177. }
  54178. visitMultiple(container, parent, listKey) {
  54179. if (container.length === 0)
  54180. return false;
  54181. const queue = [];
  54182. for (let key2 = 0; key2 < container.length; key2++) {
  54183. const node2 = container[key2];
  54184. if (node2 && this.shouldVisit(node2)) {
  54185. queue.push(this.create(parent, container, key2, listKey));
  54186. }
  54187. }
  54188. return this.visitQueue(queue);
  54189. }
  54190. visitSingle(node2, key2) {
  54191. if (this.shouldVisit(node2[key2])) {
  54192. return this.visitQueue([this.create(node2, node2, key2)]);
  54193. } else {
  54194. return false;
  54195. }
  54196. }
  54197. visitQueue(queue) {
  54198. this.queue = queue;
  54199. this.priorityQueue = [];
  54200. const visited = /* @__PURE__ */ new WeakSet();
  54201. let stop = false;
  54202. for (const path of queue) {
  54203. path.resync();
  54204. if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
  54205. path.pushContext(this);
  54206. }
  54207. if (path.key === null)
  54208. continue;
  54209. const {
  54210. node: node2
  54211. } = path;
  54212. if (visited.has(node2))
  54213. continue;
  54214. if (node2)
  54215. visited.add(node2);
  54216. if (path.visit()) {
  54217. stop = true;
  54218. break;
  54219. }
  54220. if (this.priorityQueue.length) {
  54221. stop = this.visitQueue(this.priorityQueue);
  54222. this.priorityQueue = [];
  54223. this.queue = queue;
  54224. if (stop)
  54225. break;
  54226. }
  54227. }
  54228. for (const path of queue) {
  54229. path.popContext();
  54230. }
  54231. this.queue = null;
  54232. return stop;
  54233. }
  54234. visit(node2, key2) {
  54235. const nodes = node2[key2];
  54236. if (!nodes)
  54237. return false;
  54238. if (Array.isArray(nodes)) {
  54239. return this.visitMultiple(nodes, node2, key2);
  54240. } else {
  54241. return this.visitSingle(node2, key2);
  54242. }
  54243. }
  54244. };
  54245. exports.default = TraversalContext;
  54246. }
  54247. });
  54248. // node_modules/@babel/traverse/lib/traverse-node.js
  54249. var require_traverse_node = __commonJS({
  54250. "node_modules/@babel/traverse/lib/traverse-node.js"(exports) {
  54251. "use strict";
  54252. Object.defineProperty(exports, "__esModule", {
  54253. value: true
  54254. });
  54255. exports.traverseNode = traverseNode;
  54256. var _context = require_context2();
  54257. var _t = require_lib3();
  54258. var {
  54259. VISITOR_KEYS
  54260. } = _t;
  54261. function traverseNode(node2, opts, scope, state, path, skipKeys) {
  54262. const keys2 = VISITOR_KEYS[node2.type];
  54263. if (!keys2)
  54264. return false;
  54265. const context = new _context.default(scope, opts, state, path);
  54266. for (const key2 of keys2) {
  54267. if (skipKeys && skipKeys[key2])
  54268. continue;
  54269. if (context.visit(node2, key2)) {
  54270. return true;
  54271. }
  54272. }
  54273. return false;
  54274. }
  54275. }
  54276. });
  54277. // node_modules/@babel/traverse/lib/hub.js
  54278. var require_hub = __commonJS({
  54279. "node_modules/@babel/traverse/lib/hub.js"(exports) {
  54280. "use strict";
  54281. Object.defineProperty(exports, "__esModule", {
  54282. value: true
  54283. });
  54284. exports.default = void 0;
  54285. var Hub = class {
  54286. getCode() {
  54287. }
  54288. getScope() {
  54289. }
  54290. addHelper() {
  54291. throw new Error("Helpers are not supported by the default hub.");
  54292. }
  54293. buildError(node2, msg, Error2 = TypeError) {
  54294. return new Error2(msg);
  54295. }
  54296. };
  54297. exports.default = Hub;
  54298. }
  54299. });
  54300. // node_modules/@babel/traverse/lib/index.js
  54301. var require_lib13 = __commonJS({
  54302. "node_modules/@babel/traverse/lib/index.js"(exports) {
  54303. "use strict";
  54304. Object.defineProperty(exports, "__esModule", {
  54305. value: true
  54306. });
  54307. Object.defineProperty(exports, "Hub", {
  54308. enumerable: true,
  54309. get: function() {
  54310. return _hub.default;
  54311. }
  54312. });
  54313. Object.defineProperty(exports, "NodePath", {
  54314. enumerable: true,
  54315. get: function() {
  54316. return _path.default;
  54317. }
  54318. });
  54319. Object.defineProperty(exports, "Scope", {
  54320. enumerable: true,
  54321. get: function() {
  54322. return _scope.default;
  54323. }
  54324. });
  54325. exports.visitors = exports.default = void 0;
  54326. var visitors = require_visitors();
  54327. exports.visitors = visitors;
  54328. var _t = require_lib3();
  54329. var cache = require_cache();
  54330. var _traverseNode = require_traverse_node();
  54331. var _path = require_path();
  54332. var _scope = require_scope();
  54333. var _hub = require_hub();
  54334. var {
  54335. VISITOR_KEYS,
  54336. removeProperties,
  54337. traverseFast
  54338. } = _t;
  54339. function traverse(parent, opts = {}, scope, state, parentPath) {
  54340. if (!parent)
  54341. return;
  54342. if (!opts.noScope && !scope) {
  54343. if (parent.type !== "Program" && parent.type !== "File") {
  54344. throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${parent.type} node without passing scope and parentPath.`);
  54345. }
  54346. }
  54347. if (!VISITOR_KEYS[parent.type]) {
  54348. return;
  54349. }
  54350. visitors.explode(opts);
  54351. (0, _traverseNode.traverseNode)(parent, opts, scope, state, parentPath);
  54352. }
  54353. var _default = traverse;
  54354. exports.default = _default;
  54355. traverse.visitors = visitors;
  54356. traverse.verify = visitors.verify;
  54357. traverse.explode = visitors.explode;
  54358. traverse.cheap = function(node2, enter) {
  54359. traverseFast(node2, enter);
  54360. return;
  54361. };
  54362. traverse.node = function(node2, opts, scope, state, path, skipKeys) {
  54363. (0, _traverseNode.traverseNode)(node2, opts, scope, state, path, skipKeys);
  54364. };
  54365. traverse.clearNode = function(node2, opts) {
  54366. removeProperties(node2, opts);
  54367. cache.path.delete(node2);
  54368. };
  54369. traverse.removeProperties = function(tree, opts) {
  54370. traverseFast(tree, traverse.clearNode, opts);
  54371. return tree;
  54372. };
  54373. function hasDenylistedType(path, state) {
  54374. if (path.node.type === state.type) {
  54375. state.has = true;
  54376. path.stop();
  54377. }
  54378. }
  54379. traverse.hasType = function(tree, type, denylistTypes) {
  54380. if (denylistTypes != null && denylistTypes.includes(tree.type))
  54381. return false;
  54382. if (tree.type === type)
  54383. return true;
  54384. const state = {
  54385. has: false,
  54386. type
  54387. };
  54388. traverse(tree, {
  54389. noScope: true,
  54390. denylist: denylistTypes,
  54391. enter: hasDenylistedType
  54392. }, null, state);
  54393. return state.has;
  54394. };
  54395. traverse.cache = cache;
  54396. }
  54397. });
  54398. // node_modules/estree-to-babel/lib/traverse-object-expression.js
  54399. var require_traverse_object_expression = __commonJS({
  54400. "node_modules/estree-to-babel/lib/traverse-object-expression.js"(exports, module) {
  54401. "use strict";
  54402. var { assign } = Object;
  54403. var {
  54404. isFunctionExpression,
  54405. ObjectMethod
  54406. } = require_lib3();
  54407. module.exports = (propertiesPaths) => {
  54408. for (const propPath of propertiesPaths) {
  54409. const {
  54410. computed,
  54411. key: key2,
  54412. value: value2
  54413. } = propPath.node;
  54414. if (isFunctionExpression(value2)) {
  54415. propPath.replaceWith(ObjectMethod("method", key2, value2.params, value2.body, computed));
  54416. assign(propPath.node, {
  54417. id: null,
  54418. method: true,
  54419. generator: value2.generator,
  54420. loc: getObjectMethodLoc(key2, value2),
  54421. async: value2.async,
  54422. type: "ObjectMethod"
  54423. });
  54424. }
  54425. }
  54426. };
  54427. function getObjectMethodLoc(key2, value2) {
  54428. return {
  54429. start: key2.loc.start,
  54430. end: value2.loc.end
  54431. };
  54432. }
  54433. }
  54434. });
  54435. // node_modules/estree-to-babel/lib/set-class-method.js
  54436. var require_set_class_method = __commonJS({
  54437. "node_modules/estree-to-babel/lib/set-class-method.js"(exports, module) {
  54438. "use strict";
  54439. var {
  54440. isPrivateName,
  54441. classPrivateMethod,
  54442. classMethod
  54443. } = require_lib3();
  54444. var { assign } = Object;
  54445. module.exports = (path) => {
  54446. const { node: node2 } = path;
  54447. const {
  54448. key: key2,
  54449. kind,
  54450. computed,
  54451. loc
  54452. } = node2;
  54453. const {
  54454. body,
  54455. params,
  54456. expression,
  54457. generator
  54458. } = node2.value;
  54459. const method = getClassMethod({
  54460. kind,
  54461. key: key2,
  54462. params,
  54463. body,
  54464. computed,
  54465. nodeStatic: node2.static
  54466. });
  54467. path.replaceWith(method);
  54468. assign(path.node, {
  54469. loc,
  54470. expression,
  54471. generator
  54472. });
  54473. };
  54474. function getClassMethod({ kind, key: key2, params, body, computed, nodeStatic }) {
  54475. if (isPrivateName(key2))
  54476. return classPrivateMethod(
  54477. kind,
  54478. key2,
  54479. params,
  54480. body,
  54481. computed
  54482. );
  54483. return classMethod(
  54484. kind,
  54485. key2,
  54486. params,
  54487. body,
  54488. computed,
  54489. nodeStatic
  54490. );
  54491. }
  54492. }
  54493. });
  54494. // node_modules/estree-to-babel/lib/set-class-private-property.js
  54495. var require_set_class_private_property = __commonJS({
  54496. "node_modules/estree-to-babel/lib/set-class-private-property.js"(exports, module) {
  54497. "use strict";
  54498. module.exports = (path) => {
  54499. path.node.type = "ClassPrivateProperty";
  54500. };
  54501. }
  54502. });
  54503. // node_modules/estree-to-babel/lib/set-class-private-name.js
  54504. var require_set_class_private_name = __commonJS({
  54505. "node_modules/estree-to-babel/lib/set-class-private-name.js"(exports, module) {
  54506. "use strict";
  54507. var { Identifier } = require_lib3();
  54508. module.exports = (path) => {
  54509. const { node: node2 } = path;
  54510. if (!node2.name)
  54511. return;
  54512. node2.id = Identifier(node2.name);
  54513. delete node2.name;
  54514. };
  54515. }
  54516. });
  54517. // node_modules/estree-to-babel/lib/set-literal.js
  54518. var require_set_literal = __commonJS({
  54519. "node_modules/estree-to-babel/lib/set-literal.js"(exports, module) {
  54520. "use strict";
  54521. var isString = (a) => typeof a === "string";
  54522. var isNumber = (a) => typeof a === "number";
  54523. var isNull = (a) => a === null;
  54524. var isBool = (a) => typeof a === "boolean";
  54525. module.exports = (node2) => {
  54526. const { type, value: value2 } = node2;
  54527. if (type !== "Literal")
  54528. return;
  54529. if (isNull(value2)) {
  54530. node2.type = "NullLiteral";
  54531. return;
  54532. }
  54533. if (isString(value2)) {
  54534. node2.type = "StringLiteral";
  54535. return;
  54536. }
  54537. if (isNumber(value2)) {
  54538. node2.type = "NumericLiteral";
  54539. return;
  54540. }
  54541. if (isBool(value2)) {
  54542. node2.type = "BooleanLiteral";
  54543. return;
  54544. }
  54545. if (node2.regex) {
  54546. transformRegExp(node2);
  54547. return;
  54548. }
  54549. };
  54550. function transformRegExp(node2) {
  54551. node2.type = "RegExpLiteral";
  54552. for (const key2 of Object.keys(node2.regex)) {
  54553. node2[key2] = node2.regex[key2];
  54554. }
  54555. delete node2.regex;
  54556. }
  54557. }
  54558. });
  54559. // node_modules/estree-to-babel/lib/convert-import-to-call.js
  54560. var require_convert_import_to_call = __commonJS({
  54561. "node_modules/estree-to-babel/lib/convert-import-to-call.js"(exports, module) {
  54562. "use strict";
  54563. var {
  54564. CallExpression,
  54565. Identifier
  54566. } = require_lib3();
  54567. var setLiteral = require_set_literal();
  54568. module.exports = (path) => {
  54569. const { source: source2 } = path.node;
  54570. setLiteral(source2);
  54571. const callNode = CallExpression(Identifier("import"), [
  54572. source2
  54573. ]);
  54574. path.replaceWith(callNode);
  54575. };
  54576. }
  54577. });
  54578. // node_modules/estree-to-babel/lib/convert-chain-expression.js
  54579. var require_convert_chain_expression = __commonJS({
  54580. "node_modules/estree-to-babel/lib/convert-chain-expression.js"(exports, module) {
  54581. "use strict";
  54582. module.exports = (path) => {
  54583. const expressionPath = path.get("expression");
  54584. const { expression } = path.node;
  54585. if (expressionPath.isCallExpression())
  54586. expression.stype = "OptionalCallExpression";
  54587. else
  54588. expression.type = "OptionalMemberExpression";
  54589. path.replaceWith(expression);
  54590. };
  54591. }
  54592. });
  54593. // node_modules/estree-to-babel/lib/convert-import-declaration.js
  54594. var require_convert_import_declaration = __commonJS({
  54595. "node_modules/estree-to-babel/lib/convert-import-declaration.js"(exports, module) {
  54596. "use strict";
  54597. module.exports = (path) => {
  54598. const { assertions = [] } = path.node;
  54599. path.node.assertions = assertions;
  54600. };
  54601. }
  54602. });
  54603. // node_modules/estree-to-babel/lib/convert-export-declaration.js
  54604. var require_convert_export_declaration = __commonJS({
  54605. "node_modules/estree-to-babel/lib/convert-export-declaration.js"(exports, module) {
  54606. "use strict";
  54607. var { assign } = Object;
  54608. module.exports = (path) => {
  54609. const { assertions = [] } = path.node;
  54610. assign(path.node, {
  54611. assertions
  54612. });
  54613. };
  54614. }
  54615. });
  54616. // node_modules/estree-to-babel/lib/ts.js
  54617. var require_ts = __commonJS({
  54618. "node_modules/estree-to-babel/lib/ts.js"(exports, module) {
  54619. "use strict";
  54620. module.exports.convertTSClassImplements = (path) => {
  54621. path.node.type = "TSExpressionWithTypeArguments";
  54622. };
  54623. module.exports.convertPropertyDefinition = (path) => {
  54624. const { node: node2 } = path;
  54625. if (node2.key.type === "PrivateIdentifier") {
  54626. const { key: key2 } = node2;
  54627. node2.type = "ClassPrivateProperty";
  54628. node2.key = createPrivateName(key2);
  54629. return;
  54630. }
  54631. path.node.type = "ClassProperty";
  54632. };
  54633. module.exports.convertTSInterfaceHeritage = (path) => {
  54634. path.node.type = "TSExpressionWithTypeArguments";
  54635. let { expression } = path.node;
  54636. while (expression.type === "MemberExpression") {
  54637. const { object, property } = expression;
  54638. expression.type = "TSQualifiedName";
  54639. expression.left = object;
  54640. expression.right = property;
  54641. delete expression.object;
  54642. delete expression.property;
  54643. expression = object;
  54644. }
  54645. };
  54646. module.exports.convertPrivateIdentifier = (path) => {
  54647. path.replaceWith(createPrivateName(path.node));
  54648. };
  54649. module.exports.convertTSAbstractMethodDefinition = (path) => {
  54650. const { node: node2 } = path;
  54651. const {
  54652. generator,
  54653. async,
  54654. params,
  54655. id,
  54656. returnType
  54657. } = node2.value;
  54658. const newNode = {
  54659. ...node2,
  54660. abstract: true,
  54661. generator,
  54662. async,
  54663. params,
  54664. id,
  54665. returnType,
  54666. type: "TSDeclareMethod"
  54667. };
  54668. delete newNode.value;
  54669. path.replaceWith(newNode);
  54670. };
  54671. function createPrivateName(node2) {
  54672. return {
  54673. type: "PrivateName",
  54674. id: {
  54675. ...node2,
  54676. type: "Identifier"
  54677. }
  54678. };
  54679. }
  54680. }
  54681. });
  54682. // node_modules/estree-to-babel/lib/comments.js
  54683. var require_comments2 = __commonJS({
  54684. "node_modules/estree-to-babel/lib/comments.js"(exports, module) {
  54685. "use strict";
  54686. module.exports.convertNodeComments = (node2) => {
  54687. const { comments } = node2;
  54688. if (!comments)
  54689. return;
  54690. delete node2.comments;
  54691. node2.leadingComments = void 0;
  54692. node2.trailingComments = void 0;
  54693. node2.innerComments = void 0;
  54694. for (const comment2 of comments) {
  54695. const group = getCommentGroup(comment2);
  54696. if (!node2[group])
  54697. node2[group] = [];
  54698. delete comment2.leading;
  54699. delete comment2.trailing;
  54700. comment2.type = getCommentType(comment2);
  54701. node2[group].push(comment2);
  54702. }
  54703. };
  54704. module.exports.convertProgramComments = (comments) => {
  54705. for (const comment2 of comments) {
  54706. comment2.type = getCommentType(comment2);
  54707. }
  54708. return comments;
  54709. };
  54710. function getCommentType({ type }) {
  54711. return `Comment${type}`;
  54712. }
  54713. function getCommentGroup({ trailing, leading }) {
  54714. if (trailing)
  54715. return "trailingComments";
  54716. if (leading)
  54717. return "leadingComments";
  54718. return "innerComments";
  54719. }
  54720. }
  54721. });
  54722. // node_modules/estree-to-babel/lib/get-ast.js
  54723. var require_get_ast = __commonJS({
  54724. "node_modules/estree-to-babel/lib/get-ast.js"(exports, module) {
  54725. "use strict";
  54726. var { convertProgramComments } = require_comments2();
  54727. module.exports = (node2) => {
  54728. if (node2.type === "File")
  54729. return node2;
  54730. const {
  54731. comments = [],
  54732. tokens,
  54733. ...program
  54734. } = node2;
  54735. const ast = {
  54736. type: "File",
  54737. program: {
  54738. ...program,
  54739. directives: []
  54740. },
  54741. comments: convertProgramComments(comments),
  54742. tokens
  54743. };
  54744. return ast;
  54745. };
  54746. }
  54747. });
  54748. // node_modules/estree-to-babel/lib/estree-to-babel.js
  54749. var require_estree_to_babel = __commonJS({
  54750. "node_modules/estree-to-babel/lib/estree-to-babel.js"(exports, module) {
  54751. "use strict";
  54752. var traverse = require_lib13().default;
  54753. var {
  54754. isObjectExpression: isObjectExpression2,
  54755. isExportDeclaration
  54756. } = require_lib3();
  54757. var traverseObjectExpression = require_traverse_object_expression();
  54758. var setClassMethod = require_set_class_method();
  54759. var setClassPrivateProperty = require_set_class_private_property();
  54760. var setClassPrivateName = require_set_class_private_name();
  54761. var convertImportToCall = require_convert_import_to_call();
  54762. var convertChainExpression = require_convert_chain_expression();
  54763. var convertImportDeclaration = require_convert_import_declaration();
  54764. var convertExportDeclaration = require_convert_export_declaration();
  54765. var {
  54766. convertTSClassImplements,
  54767. convertTSInterfaceHeritage,
  54768. convertTSAbstractMethodDefinition,
  54769. convertPropertyDefinition,
  54770. convertPrivateIdentifier
  54771. } = require_ts();
  54772. var { convertNodeComments } = require_comments2();
  54773. var setLiteral = require_set_literal();
  54774. var getAST = require_get_ast();
  54775. module.exports = (node2) => {
  54776. const ast = getAST(node2);
  54777. traverse(ast, {
  54778. noScope: true,
  54779. enter(path) {
  54780. const { node: node3 } = path;
  54781. const { type } = node3;
  54782. if (/Literal$/.test(type)) {
  54783. setLiteral(node3);
  54784. return setEsprimaRaw(node3);
  54785. }
  54786. if (type === "Property")
  54787. return setObjectProperty(node3);
  54788. if (type === "MethodDefinition")
  54789. return setClassMethod(path);
  54790. if (type === "FieldDefinition")
  54791. return setClassPrivateProperty(path);
  54792. if (type === "PrivateName")
  54793. return setClassPrivateName(path);
  54794. if (type === "ImportExpression")
  54795. return convertImportToCall(path);
  54796. if (type === "ImportDeclaration")
  54797. return convertImportDeclaration(path);
  54798. if (isExportDeclaration(path))
  54799. return convertExportDeclaration(path);
  54800. if (type === "ChainExpression")
  54801. return convertChainExpression(path);
  54802. if (type === "TSAbstractMethodDefinition")
  54803. return convertTSAbstractMethodDefinition(path);
  54804. if (type === "TSInterfaceHeritage")
  54805. return convertTSInterfaceHeritage(path);
  54806. if (type === "PropertyDefinition")
  54807. return convertPropertyDefinition(path);
  54808. if (type === "PrivateIdentifier")
  54809. return convertPrivateIdentifier(path);
  54810. if (type === "TSClassImplements")
  54811. return convertTSClassImplements(path);
  54812. },
  54813. exit(path) {
  54814. const { node: node3 } = path;
  54815. convertNodeComments(node3);
  54816. if (isObjectExpression2(node3))
  54817. return traverseObjectExpression(path.get("properties"));
  54818. }
  54819. });
  54820. return ast;
  54821. };
  54822. function setObjectProperty(node2) {
  54823. node2.type = "ObjectProperty";
  54824. }
  54825. function setEsprimaRaw(node2) {
  54826. const { raw } = node2;
  54827. node2.raw = raw || node2.extra?.raw;
  54828. node2.extra = node2.extra || {
  54829. raw
  54830. };
  54831. }
  54832. }
  54833. });
  54834. // node_modules/lodash/_arrayMap.js
  54835. var require_arrayMap = __commonJS({
  54836. "node_modules/lodash/_arrayMap.js"(exports, module) {
  54837. function arrayMap(array, iteratee) {
  54838. var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
  54839. while (++index2 < length) {
  54840. result[index2] = iteratee(array[index2], index2, array);
  54841. }
  54842. return result;
  54843. }
  54844. module.exports = arrayMap;
  54845. }
  54846. });
  54847. // node_modules/lodash/isSymbol.js
  54848. var require_isSymbol = __commonJS({
  54849. "node_modules/lodash/isSymbol.js"(exports, module) {
  54850. var baseGetTag = require_baseGetTag();
  54851. var isObjectLike = require_isObjectLike();
  54852. var symbolTag = "[object Symbol]";
  54853. function isSymbol(value2) {
  54854. return typeof value2 == "symbol" || isObjectLike(value2) && baseGetTag(value2) == symbolTag;
  54855. }
  54856. module.exports = isSymbol;
  54857. }
  54858. });
  54859. // node_modules/lodash/_baseToString.js
  54860. var require_baseToString = __commonJS({
  54861. "node_modules/lodash/_baseToString.js"(exports, module) {
  54862. var Symbol2 = require_Symbol();
  54863. var arrayMap = require_arrayMap();
  54864. var isArray3 = require_isArray();
  54865. var isSymbol = require_isSymbol();
  54866. var INFINITY = 1 / 0;
  54867. var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
  54868. var symbolToString = symbolProto ? symbolProto.toString : void 0;
  54869. function baseToString(value2) {
  54870. if (typeof value2 == "string") {
  54871. return value2;
  54872. }
  54873. if (isArray3(value2)) {
  54874. return arrayMap(value2, baseToString) + "";
  54875. }
  54876. if (isSymbol(value2)) {
  54877. return symbolToString ? symbolToString.call(value2) : "";
  54878. }
  54879. var result = value2 + "";
  54880. return result == "0" && 1 / value2 == -INFINITY ? "-0" : result;
  54881. }
  54882. module.exports = baseToString;
  54883. }
  54884. });
  54885. // node_modules/lodash/toString.js
  54886. var require_toString = __commonJS({
  54887. "node_modules/lodash/toString.js"(exports, module) {
  54888. var baseToString = require_baseToString();
  54889. function toString4(value2) {
  54890. return value2 == null ? "" : baseToString(value2);
  54891. }
  54892. module.exports = toString4;
  54893. }
  54894. });
  54895. // node_modules/lodash/_baseSlice.js
  54896. var require_baseSlice = __commonJS({
  54897. "node_modules/lodash/_baseSlice.js"(exports, module) {
  54898. function baseSlice(array, start3, end) {
  54899. var index2 = -1, length = array.length;
  54900. if (start3 < 0) {
  54901. start3 = -start3 > length ? 0 : length + start3;
  54902. }
  54903. end = end > length ? length : end;
  54904. if (end < 0) {
  54905. end += length;
  54906. }
  54907. length = start3 > end ? 0 : end - start3 >>> 0;
  54908. start3 >>>= 0;
  54909. var result = Array(length);
  54910. while (++index2 < length) {
  54911. result[index2] = array[index2 + start3];
  54912. }
  54913. return result;
  54914. }
  54915. module.exports = baseSlice;
  54916. }
  54917. });
  54918. // node_modules/lodash/_castSlice.js
  54919. var require_castSlice = __commonJS({
  54920. "node_modules/lodash/_castSlice.js"(exports, module) {
  54921. var baseSlice = require_baseSlice();
  54922. function castSlice(array, start3, end) {
  54923. var length = array.length;
  54924. end = end === void 0 ? length : end;
  54925. return !start3 && end >= length ? array : baseSlice(array, start3, end);
  54926. }
  54927. module.exports = castSlice;
  54928. }
  54929. });
  54930. // node_modules/lodash/_hasUnicode.js
  54931. var require_hasUnicode = __commonJS({
  54932. "node_modules/lodash/_hasUnicode.js"(exports, module) {
  54933. var rsAstralRange = "\\ud800-\\udfff";
  54934. var rsComboMarksRange = "\\u0300-\\u036f";
  54935. var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
  54936. var rsComboSymbolsRange = "\\u20d0-\\u20ff";
  54937. var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
  54938. var rsVarRange = "\\ufe0e\\ufe0f";
  54939. var rsZWJ = "\\u200d";
  54940. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
  54941. function hasUnicode(string3) {
  54942. return reHasUnicode.test(string3);
  54943. }
  54944. module.exports = hasUnicode;
  54945. }
  54946. });
  54947. // node_modules/lodash/_asciiToArray.js
  54948. var require_asciiToArray = __commonJS({
  54949. "node_modules/lodash/_asciiToArray.js"(exports, module) {
  54950. function asciiToArray(string3) {
  54951. return string3.split("");
  54952. }
  54953. module.exports = asciiToArray;
  54954. }
  54955. });
  54956. // node_modules/lodash/_unicodeToArray.js
  54957. var require_unicodeToArray = __commonJS({
  54958. "node_modules/lodash/_unicodeToArray.js"(exports, module) {
  54959. var rsAstralRange = "\\ud800-\\udfff";
  54960. var rsComboMarksRange = "\\u0300-\\u036f";
  54961. var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
  54962. var rsComboSymbolsRange = "\\u20d0-\\u20ff";
  54963. var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
  54964. var rsVarRange = "\\ufe0e\\ufe0f";
  54965. var rsAstral = "[" + rsAstralRange + "]";
  54966. var rsCombo = "[" + rsComboRange + "]";
  54967. var rsFitz = "\\ud83c[\\udffb-\\udfff]";
  54968. var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
  54969. var rsNonAstral = "[^" + rsAstralRange + "]";
  54970. var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
  54971. var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
  54972. var rsZWJ = "\\u200d";
  54973. var reOptMod = rsModifier + "?";
  54974. var rsOptVar = "[" + rsVarRange + "]?";
  54975. var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
  54976. var rsSeq = rsOptVar + reOptMod + rsOptJoin;
  54977. var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
  54978. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  54979. function unicodeToArray(string3) {
  54980. return string3.match(reUnicode) || [];
  54981. }
  54982. module.exports = unicodeToArray;
  54983. }
  54984. });
  54985. // node_modules/lodash/_stringToArray.js
  54986. var require_stringToArray = __commonJS({
  54987. "node_modules/lodash/_stringToArray.js"(exports, module) {
  54988. var asciiToArray = require_asciiToArray();
  54989. var hasUnicode = require_hasUnicode();
  54990. var unicodeToArray = require_unicodeToArray();
  54991. function stringToArray(string3) {
  54992. return hasUnicode(string3) ? unicodeToArray(string3) : asciiToArray(string3);
  54993. }
  54994. module.exports = stringToArray;
  54995. }
  54996. });
  54997. // node_modules/lodash/_createCaseFirst.js
  54998. var require_createCaseFirst = __commonJS({
  54999. "node_modules/lodash/_createCaseFirst.js"(exports, module) {
  55000. var castSlice = require_castSlice();
  55001. var hasUnicode = require_hasUnicode();
  55002. var stringToArray = require_stringToArray();
  55003. var toString4 = require_toString();
  55004. function createCaseFirst(methodName) {
  55005. return function(string3) {
  55006. string3 = toString4(string3);
  55007. var strSymbols = hasUnicode(string3) ? stringToArray(string3) : void 0;
  55008. var chr = strSymbols ? strSymbols[0] : string3.charAt(0);
  55009. var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string3.slice(1);
  55010. return chr[methodName]() + trailing;
  55011. };
  55012. }
  55013. module.exports = createCaseFirst;
  55014. }
  55015. });
  55016. // node_modules/lodash/upperFirst.js
  55017. var require_upperFirst = __commonJS({
  55018. "node_modules/lodash/upperFirst.js"(exports, module) {
  55019. var createCaseFirst = require_createCaseFirst();
  55020. var upperFirst = createCaseFirst("toUpperCase");
  55021. module.exports = upperFirst;
  55022. }
  55023. });
  55024. // node_modules/lodash/capitalize.js
  55025. var require_capitalize = __commonJS({
  55026. "node_modules/lodash/capitalize.js"(exports, module) {
  55027. var toString4 = require_toString();
  55028. var upperFirst = require_upperFirst();
  55029. function capitalize(string3) {
  55030. return upperFirst(toString4(string3).toLowerCase());
  55031. }
  55032. module.exports = capitalize;
  55033. }
  55034. });
  55035. // node_modules/lodash/_arrayReduce.js
  55036. var require_arrayReduce = __commonJS({
  55037. "node_modules/lodash/_arrayReduce.js"(exports, module) {
  55038. function arrayReduce(array, iteratee, accumulator, initAccum) {
  55039. var index2 = -1, length = array == null ? 0 : array.length;
  55040. if (initAccum && length) {
  55041. accumulator = array[++index2];
  55042. }
  55043. while (++index2 < length) {
  55044. accumulator = iteratee(accumulator, array[index2], index2, array);
  55045. }
  55046. return accumulator;
  55047. }
  55048. module.exports = arrayReduce;
  55049. }
  55050. });
  55051. // node_modules/lodash/_basePropertyOf.js
  55052. var require_basePropertyOf = __commonJS({
  55053. "node_modules/lodash/_basePropertyOf.js"(exports, module) {
  55054. function basePropertyOf(object) {
  55055. return function(key2) {
  55056. return object == null ? void 0 : object[key2];
  55057. };
  55058. }
  55059. module.exports = basePropertyOf;
  55060. }
  55061. });
  55062. // node_modules/lodash/_deburrLetter.js
  55063. var require_deburrLetter = __commonJS({
  55064. "node_modules/lodash/_deburrLetter.js"(exports, module) {
  55065. var basePropertyOf = require_basePropertyOf();
  55066. var deburredLetters = {
  55067. // Latin-1 Supplement block.
  55068. "\xC0": "A",
  55069. "\xC1": "A",
  55070. "\xC2": "A",
  55071. "\xC3": "A",
  55072. "\xC4": "A",
  55073. "\xC5": "A",
  55074. "\xE0": "a",
  55075. "\xE1": "a",
  55076. "\xE2": "a",
  55077. "\xE3": "a",
  55078. "\xE4": "a",
  55079. "\xE5": "a",
  55080. "\xC7": "C",
  55081. "\xE7": "c",
  55082. "\xD0": "D",
  55083. "\xF0": "d",
  55084. "\xC8": "E",
  55085. "\xC9": "E",
  55086. "\xCA": "E",
  55087. "\xCB": "E",
  55088. "\xE8": "e",
  55089. "\xE9": "e",
  55090. "\xEA": "e",
  55091. "\xEB": "e",
  55092. "\xCC": "I",
  55093. "\xCD": "I",
  55094. "\xCE": "I",
  55095. "\xCF": "I",
  55096. "\xEC": "i",
  55097. "\xED": "i",
  55098. "\xEE": "i",
  55099. "\xEF": "i",
  55100. "\xD1": "N",
  55101. "\xF1": "n",
  55102. "\xD2": "O",
  55103. "\xD3": "O",
  55104. "\xD4": "O",
  55105. "\xD5": "O",
  55106. "\xD6": "O",
  55107. "\xD8": "O",
  55108. "\xF2": "o",
  55109. "\xF3": "o",
  55110. "\xF4": "o",
  55111. "\xF5": "o",
  55112. "\xF6": "o",
  55113. "\xF8": "o",
  55114. "\xD9": "U",
  55115. "\xDA": "U",
  55116. "\xDB": "U",
  55117. "\xDC": "U",
  55118. "\xF9": "u",
  55119. "\xFA": "u",
  55120. "\xFB": "u",
  55121. "\xFC": "u",
  55122. "\xDD": "Y",
  55123. "\xFD": "y",
  55124. "\xFF": "y",
  55125. "\xC6": "Ae",
  55126. "\xE6": "ae",
  55127. "\xDE": "Th",
  55128. "\xFE": "th",
  55129. "\xDF": "ss",
  55130. // Latin Extended-A block.
  55131. "\u0100": "A",
  55132. "\u0102": "A",
  55133. "\u0104": "A",
  55134. "\u0101": "a",
  55135. "\u0103": "a",
  55136. "\u0105": "a",
  55137. "\u0106": "C",
  55138. "\u0108": "C",
  55139. "\u010A": "C",
  55140. "\u010C": "C",
  55141. "\u0107": "c",
  55142. "\u0109": "c",
  55143. "\u010B": "c",
  55144. "\u010D": "c",
  55145. "\u010E": "D",
  55146. "\u0110": "D",
  55147. "\u010F": "d",
  55148. "\u0111": "d",
  55149. "\u0112": "E",
  55150. "\u0114": "E",
  55151. "\u0116": "E",
  55152. "\u0118": "E",
  55153. "\u011A": "E",
  55154. "\u0113": "e",
  55155. "\u0115": "e",
  55156. "\u0117": "e",
  55157. "\u0119": "e",
  55158. "\u011B": "e",
  55159. "\u011C": "G",
  55160. "\u011E": "G",
  55161. "\u0120": "G",
  55162. "\u0122": "G",
  55163. "\u011D": "g",
  55164. "\u011F": "g",
  55165. "\u0121": "g",
  55166. "\u0123": "g",
  55167. "\u0124": "H",
  55168. "\u0126": "H",
  55169. "\u0125": "h",
  55170. "\u0127": "h",
  55171. "\u0128": "I",
  55172. "\u012A": "I",
  55173. "\u012C": "I",
  55174. "\u012E": "I",
  55175. "\u0130": "I",
  55176. "\u0129": "i",
  55177. "\u012B": "i",
  55178. "\u012D": "i",
  55179. "\u012F": "i",
  55180. "\u0131": "i",
  55181. "\u0134": "J",
  55182. "\u0135": "j",
  55183. "\u0136": "K",
  55184. "\u0137": "k",
  55185. "\u0138": "k",
  55186. "\u0139": "L",
  55187. "\u013B": "L",
  55188. "\u013D": "L",
  55189. "\u013F": "L",
  55190. "\u0141": "L",
  55191. "\u013A": "l",
  55192. "\u013C": "l",
  55193. "\u013E": "l",
  55194. "\u0140": "l",
  55195. "\u0142": "l",
  55196. "\u0143": "N",
  55197. "\u0145": "N",
  55198. "\u0147": "N",
  55199. "\u014A": "N",
  55200. "\u0144": "n",
  55201. "\u0146": "n",
  55202. "\u0148": "n",
  55203. "\u014B": "n",
  55204. "\u014C": "O",
  55205. "\u014E": "O",
  55206. "\u0150": "O",
  55207. "\u014D": "o",
  55208. "\u014F": "o",
  55209. "\u0151": "o",
  55210. "\u0154": "R",
  55211. "\u0156": "R",
  55212. "\u0158": "R",
  55213. "\u0155": "r",
  55214. "\u0157": "r",
  55215. "\u0159": "r",
  55216. "\u015A": "S",
  55217. "\u015C": "S",
  55218. "\u015E": "S",
  55219. "\u0160": "S",
  55220. "\u015B": "s",
  55221. "\u015D": "s",
  55222. "\u015F": "s",
  55223. "\u0161": "s",
  55224. "\u0162": "T",
  55225. "\u0164": "T",
  55226. "\u0166": "T",
  55227. "\u0163": "t",
  55228. "\u0165": "t",
  55229. "\u0167": "t",
  55230. "\u0168": "U",
  55231. "\u016A": "U",
  55232. "\u016C": "U",
  55233. "\u016E": "U",
  55234. "\u0170": "U",
  55235. "\u0172": "U",
  55236. "\u0169": "u",
  55237. "\u016B": "u",
  55238. "\u016D": "u",
  55239. "\u016F": "u",
  55240. "\u0171": "u",
  55241. "\u0173": "u",
  55242. "\u0174": "W",
  55243. "\u0175": "w",
  55244. "\u0176": "Y",
  55245. "\u0177": "y",
  55246. "\u0178": "Y",
  55247. "\u0179": "Z",
  55248. "\u017B": "Z",
  55249. "\u017D": "Z",
  55250. "\u017A": "z",
  55251. "\u017C": "z",
  55252. "\u017E": "z",
  55253. "\u0132": "IJ",
  55254. "\u0133": "ij",
  55255. "\u0152": "Oe",
  55256. "\u0153": "oe",
  55257. "\u0149": "'n",
  55258. "\u017F": "s"
  55259. };
  55260. var deburrLetter = basePropertyOf(deburredLetters);
  55261. module.exports = deburrLetter;
  55262. }
  55263. });
  55264. // node_modules/lodash/deburr.js
  55265. var require_deburr = __commonJS({
  55266. "node_modules/lodash/deburr.js"(exports, module) {
  55267. var deburrLetter = require_deburrLetter();
  55268. var toString4 = require_toString();
  55269. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  55270. var rsComboMarksRange = "\\u0300-\\u036f";
  55271. var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
  55272. var rsComboSymbolsRange = "\\u20d0-\\u20ff";
  55273. var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
  55274. var rsCombo = "[" + rsComboRange + "]";
  55275. var reComboMark = RegExp(rsCombo, "g");
  55276. function deburr(string3) {
  55277. string3 = toString4(string3);
  55278. return string3 && string3.replace(reLatin, deburrLetter).replace(reComboMark, "");
  55279. }
  55280. module.exports = deburr;
  55281. }
  55282. });
  55283. // node_modules/lodash/_asciiWords.js
  55284. var require_asciiWords = __commonJS({
  55285. "node_modules/lodash/_asciiWords.js"(exports, module) {
  55286. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  55287. function asciiWords(string3) {
  55288. return string3.match(reAsciiWord) || [];
  55289. }
  55290. module.exports = asciiWords;
  55291. }
  55292. });
  55293. // node_modules/lodash/_hasUnicodeWord.js
  55294. var require_hasUnicodeWord = __commonJS({
  55295. "node_modules/lodash/_hasUnicodeWord.js"(exports, module) {
  55296. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  55297. function hasUnicodeWord(string3) {
  55298. return reHasUnicodeWord.test(string3);
  55299. }
  55300. module.exports = hasUnicodeWord;
  55301. }
  55302. });
  55303. // node_modules/lodash/_unicodeWords.js
  55304. var require_unicodeWords = __commonJS({
  55305. "node_modules/lodash/_unicodeWords.js"(exports, module) {
  55306. var rsAstralRange = "\\ud800-\\udfff";
  55307. var rsComboMarksRange = "\\u0300-\\u036f";
  55308. var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
  55309. var rsComboSymbolsRange = "\\u20d0-\\u20ff";
  55310. var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
  55311. var rsDingbatRange = "\\u2700-\\u27bf";
  55312. var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
  55313. var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
  55314. var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
  55315. var rsPunctuationRange = "\\u2000-\\u206f";
  55316. var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
  55317. var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
  55318. var rsVarRange = "\\ufe0e\\ufe0f";
  55319. var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  55320. var rsApos = "['\u2019]";
  55321. var rsBreak = "[" + rsBreakRange + "]";
  55322. var rsCombo = "[" + rsComboRange + "]";
  55323. var rsDigits = "\\d+";
  55324. var rsDingbat = "[" + rsDingbatRange + "]";
  55325. var rsLower = "[" + rsLowerRange + "]";
  55326. var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
  55327. var rsFitz = "\\ud83c[\\udffb-\\udfff]";
  55328. var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
  55329. var rsNonAstral = "[^" + rsAstralRange + "]";
  55330. var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
  55331. var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
  55332. var rsUpper = "[" + rsUpperRange + "]";
  55333. var rsZWJ = "\\u200d";
  55334. var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")";
  55335. var rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")";
  55336. var rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
  55337. var rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
  55338. var reOptMod = rsModifier + "?";
  55339. var rsOptVar = "[" + rsVarRange + "]?";
  55340. var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
  55341. var rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])";
  55342. var rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])";
  55343. var rsSeq = rsOptVar + reOptMod + rsOptJoin;
  55344. var rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq;
  55345. var reUnicodeWord = RegExp([
  55346. rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
  55347. rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
  55348. rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
  55349. rsUpper + "+" + rsOptContrUpper,
  55350. rsOrdUpper,
  55351. rsOrdLower,
  55352. rsDigits,
  55353. rsEmoji
  55354. ].join("|"), "g");
  55355. function unicodeWords(string3) {
  55356. return string3.match(reUnicodeWord) || [];
  55357. }
  55358. module.exports = unicodeWords;
  55359. }
  55360. });
  55361. // node_modules/lodash/words.js
  55362. var require_words = __commonJS({
  55363. "node_modules/lodash/words.js"(exports, module) {
  55364. var asciiWords = require_asciiWords();
  55365. var hasUnicodeWord = require_hasUnicodeWord();
  55366. var toString4 = require_toString();
  55367. var unicodeWords = require_unicodeWords();
  55368. function words(string3, pattern, guard) {
  55369. string3 = toString4(string3);
  55370. pattern = guard ? void 0 : pattern;
  55371. if (pattern === void 0) {
  55372. return hasUnicodeWord(string3) ? unicodeWords(string3) : asciiWords(string3);
  55373. }
  55374. return string3.match(pattern) || [];
  55375. }
  55376. module.exports = words;
  55377. }
  55378. });
  55379. // node_modules/lodash/_createCompounder.js
  55380. var require_createCompounder = __commonJS({
  55381. "node_modules/lodash/_createCompounder.js"(exports, module) {
  55382. var arrayReduce = require_arrayReduce();
  55383. var deburr = require_deburr();
  55384. var words = require_words();
  55385. var rsApos = "['\u2019]";
  55386. var reApos = RegExp(rsApos, "g");
  55387. function createCompounder(callback) {
  55388. return function(string3) {
  55389. return arrayReduce(words(deburr(string3).replace(reApos, "")), callback, "");
  55390. };
  55391. }
  55392. module.exports = createCompounder;
  55393. }
  55394. });
  55395. // node_modules/lodash/camelCase.js
  55396. var require_camelCase = __commonJS({
  55397. "node_modules/lodash/camelCase.js"(exports, module) {
  55398. var capitalize = require_capitalize();
  55399. var createCompounder = require_createCompounder();
  55400. var camelCase2 = createCompounder(function(result, word, index2) {
  55401. word = word.toLowerCase();
  55402. return result + (index2 ? capitalize(word) : word);
  55403. });
  55404. module.exports = camelCase2;
  55405. }
  55406. });
  55407. // node_modules/js-string-escape/index.js
  55408. var require_js_string_escape = __commonJS({
  55409. "node_modules/js-string-escape/index.js"(exports, module) {
  55410. module.exports = function(string3) {
  55411. return ("" + string3).replace(/["'\\\n\r\u2028\u2029]/g, function(character) {
  55412. switch (character) {
  55413. case '"':
  55414. case "'":
  55415. case "\\":
  55416. return "\\" + character;
  55417. case "\n":
  55418. return "\\n";
  55419. case "\r":
  55420. return "\\r";
  55421. case "\u2028":
  55422. return "\\u2028";
  55423. case "\u2029":
  55424. return "\\u2029";
  55425. }
  55426. });
  55427. };
  55428. }
  55429. });
  55430. // node_modules/@babel/helpers/lib/helpers-generated.js
  55431. var require_helpers_generated = __commonJS({
  55432. "node_modules/@babel/helpers/lib/helpers-generated.js"(exports) {
  55433. "use strict";
  55434. Object.defineProperty(exports, "__esModule", {
  55435. value: true
  55436. });
  55437. exports.default = void 0;
  55438. var _template = require_lib11();
  55439. function helper(minVersion, source2) {
  55440. return Object.freeze({
  55441. minVersion,
  55442. ast: () => _template.default.program.ast(source2, {
  55443. preserveComments: true
  55444. })
  55445. });
  55446. }
  55447. var _default = Object.freeze({
  55448. AsyncGenerator: helper("7.0.0-beta.0", 'import OverloadYield from"OverloadYield";export default function AsyncGenerator(gen){var front,back;function resume(key,arg){try{var result=gen[key](arg),value=result.value,overloaded=value instanceof OverloadYield;Promise.resolve(overloaded?value.v:value).then((function(arg){if(overloaded){var nextKey="return"===key?"return":"next";if(!value.k||arg.done)return resume(nextKey,arg);arg=gen[nextKey](arg).value}settle(result.done?"return":"normal",arg)}),(function(err){resume("throw",err)}))}catch(err){settle("throw",err)}}function settle(type,value){switch(type){case"return":front.resolve({value:value,done:!0});break;case"throw":front.reject(value);break;default:front.resolve({value:value,done:!1})}(front=front.next)?resume(front.key,front.arg):back=null}this._invoke=function(key,arg){return new Promise((function(resolve,reject){var request={key:key,arg:arg,resolve:resolve,reject:reject,next:null};back?back=back.next=request:(front=back=request,resume(key,arg))}))},"function"!=typeof gen.return&&(this.return=void 0)}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},AsyncGenerator.prototype.next=function(arg){return this._invoke("next",arg)},AsyncGenerator.prototype.throw=function(arg){return this._invoke("throw",arg)},AsyncGenerator.prototype.return=function(arg){return this._invoke("return",arg)};'),
  55449. OverloadYield: helper("7.18.14", "export default function _OverloadYield(value,kind){this.v=value,this.k=kind}"),
  55450. applyDecs: helper("7.17.8", 'function old_createMetadataMethodsForProperty(metadataMap,kind,property,decoratorFinishedRef){return{getMetadata:function(key){old_assertNotFinished(decoratorFinishedRef,"getMetadata"),old_assertMetadataKey(key);var metadataForKey=metadataMap[key];if(void 0!==metadataForKey)if(1===kind){var pub=metadataForKey.public;if(void 0!==pub)return pub[property]}else if(2===kind){var priv=metadataForKey.private;if(void 0!==priv)return priv.get(property)}else if(Object.hasOwnProperty.call(metadataForKey,"constructor"))return metadataForKey.constructor},setMetadata:function(key,value){old_assertNotFinished(decoratorFinishedRef,"setMetadata"),old_assertMetadataKey(key);var metadataForKey=metadataMap[key];if(void 0===metadataForKey&&(metadataForKey=metadataMap[key]={}),1===kind){var pub=metadataForKey.public;void 0===pub&&(pub=metadataForKey.public={}),pub[property]=value}else if(2===kind){var priv=metadataForKey.priv;void 0===priv&&(priv=metadataForKey.private=new Map),priv.set(property,value)}else metadataForKey.constructor=value}}}function old_convertMetadataMapToFinal(obj,metadataMap){var parentMetadataMap=obj[Symbol.metadata||Symbol.for("Symbol.metadata")],metadataKeys=Object.getOwnPropertySymbols(metadataMap);if(0!==metadataKeys.length){for(var i=0;i<metadataKeys.length;i++){var key=metadataKeys[i],metaForKey=metadataMap[key],parentMetaForKey=parentMetadataMap?parentMetadataMap[key]:null,pub=metaForKey.public,parentPub=parentMetaForKey?parentMetaForKey.public:null;pub&&parentPub&&Object.setPrototypeOf(pub,parentPub);var priv=metaForKey.private;if(priv){var privArr=Array.from(priv.values()),parentPriv=parentMetaForKey?parentMetaForKey.private:null;parentPriv&&(privArr=privArr.concat(parentPriv)),metaForKey.private=privArr}parentMetaForKey&&Object.setPrototypeOf(metaForKey,parentMetaForKey)}parentMetadataMap&&Object.setPrototypeOf(metadataMap,parentMetadataMap),obj[Symbol.metadata||Symbol.for("Symbol.metadata")]=metadataMap}}function old_createAddInitializerMethod(initializers,decoratorFinishedRef){return function(initializer){old_assertNotFinished(decoratorFinishedRef,"addInitializer"),old_assertCallable(initializer,"An initializer"),initializers.push(initializer)}}function old_memberDec(dec,name,desc,metadataMap,initializers,kind,isStatic,isPrivate,value){var kindStr;switch(kind){case 1:kindStr="accessor";break;case 2:kindStr="method";break;case 3:kindStr="getter";break;case 4:kindStr="setter";break;default:kindStr="field"}var metadataKind,metadataName,ctx={kind:kindStr,name:isPrivate?"#"+name:name,isStatic:isStatic,isPrivate:isPrivate},decoratorFinishedRef={v:!1};if(0!==kind&&(ctx.addInitializer=old_createAddInitializerMethod(initializers,decoratorFinishedRef)),isPrivate){metadataKind=2,metadataName=Symbol(name);var access={};0===kind?(access.get=desc.get,access.set=desc.set):2===kind?access.get=function(){return desc.value}:(1!==kind&&3!==kind||(access.get=function(){return desc.get.call(this)}),1!==kind&&4!==kind||(access.set=function(v){desc.set.call(this,v)})),ctx.access=access}else metadataKind=1,metadataName=name;try{return dec(value,Object.assign(ctx,old_createMetadataMethodsForProperty(metadataMap,metadataKind,metadataName,decoratorFinishedRef)))}finally{decoratorFinishedRef.v=!0}}function old_assertNotFinished(decoratorFinishedRef,fnName){if(decoratorFinishedRef.v)throw new Error("attempted to call "+fnName+" after decoration was finished")}function old_assertMetadataKey(key){if("symbol"!=typeof key)throw new TypeError("Metadata keys must be symbols, received: "+key)}function old_assertCallable(fn,hint){if("function"!=typeof fn)throw new TypeError(hint+" must be a function")}function old_assertValidReturnValue(kind,value){var type=typeof value;if(1===kind){if("object"!==type||null===value)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==value.get&&old_assertCallable(value.get,"accessor.get"),void 0!==value.set&&old_assertCallable(value.set,"accessor.set"),void 0!==value.init&&old_assertCallable(value.init,"accessor.init"),void 0!==value.initializer&&old_assertCallable(value.initializer,"accessor.initializer")}else if("function"!==type){var hint;throw hint=0===kind?"field":10===kind?"class":"method",new TypeError(hint+" decorators must return a function or void 0")}}function old_getInit(desc){var initializer;return null==(initializer=desc.init)&&(initializer=desc.initializer)&&"undefined"!=typeof console&&console.warn(".initializer has been renamed to .init as of March 2022"),initializer}function old_applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,metadataMap,initializers){var desc,initializer,value,newValue,get,set,decs=decInfo[0];if(isPrivate?desc=0===kind||1===kind?{get:decInfo[3],set:decInfo[4]}:3===kind?{get:decInfo[3]}:4===kind?{set:decInfo[3]}:{value:decInfo[3]}:0!==kind&&(desc=Object.getOwnPropertyDescriptor(base,name)),1===kind?value={get:desc.get,set:desc.set}:2===kind?value=desc.value:3===kind?value=desc.get:4===kind&&(value=desc.set),"function"==typeof decs)void 0!==(newValue=old_memberDec(decs,name,desc,metadataMap,initializers,kind,isStatic,isPrivate,value))&&(old_assertValidReturnValue(kind,newValue),0===kind?initializer=newValue:1===kind?(initializer=old_getInit(newValue),get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue);else for(var i=decs.length-1;i>=0;i--){var newInit;if(void 0!==(newValue=old_memberDec(decs[i],name,desc,metadataMap,initializers,kind,isStatic,isPrivate,value)))old_assertValidReturnValue(kind,newValue),0===kind?newInit=newValue:1===kind?(newInit=old_getInit(newValue),get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue,void 0!==newInit&&(void 0===initializer?initializer=newInit:"function"==typeof initializer?initializer=[initializer,newInit]:initializer.push(newInit))}if(0===kind||1===kind){if(void 0===initializer)initializer=function(instance,init){return init};else if("function"!=typeof initializer){var ownInitializers=initializer;initializer=function(instance,init){for(var value=init,i=0;i<ownInitializers.length;i++)value=ownInitializers[i].call(instance,value);return value}}else{var originalInitializer=initializer;initializer=function(instance,init){return originalInitializer.call(instance,init)}}ret.push(initializer)}0!==kind&&(1===kind?(desc.get=value.get,desc.set=value.set):2===kind?desc.value=value:3===kind?desc.get=value:4===kind&&(desc.set=value),isPrivate?1===kind?(ret.push((function(instance,args){return value.get.call(instance,args)})),ret.push((function(instance,args){return value.set.call(instance,args)}))):2===kind?ret.push(value):ret.push((function(instance,args){return value.call(instance,args)})):Object.defineProperty(base,name,desc))}function old_applyMemberDecs(ret,Class,protoMetadataMap,staticMetadataMap,decInfos){for(var protoInitializers,staticInitializers,existingProtoNonFields=new Map,existingStaticNonFields=new Map,i=0;i<decInfos.length;i++){var decInfo=decInfos[i];if(Array.isArray(decInfo)){var base,metadataMap,initializers,kind=decInfo[1],name=decInfo[2],isPrivate=decInfo.length>3,isStatic=kind>=5;if(isStatic?(base=Class,metadataMap=staticMetadataMap,0!==(kind-=5)&&(initializers=staticInitializers=staticInitializers||[])):(base=Class.prototype,metadataMap=protoMetadataMap,0!==kind&&(initializers=protoInitializers=protoInitializers||[])),0!==kind&&!isPrivate){var existingNonFields=isStatic?existingStaticNonFields:existingProtoNonFields,existingKind=existingNonFields.get(name)||0;if(!0===existingKind||3===existingKind&&4!==kind||4===existingKind&&3!==kind)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+name);!existingKind&&kind>2?existingNonFields.set(name,kind):existingNonFields.set(name,!0)}old_applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,metadataMap,initializers)}}old_pushInitializers(ret,protoInitializers),old_pushInitializers(ret,staticInitializers)}function old_pushInitializers(ret,initializers){initializers&&ret.push((function(instance){for(var i=0;i<initializers.length;i++)initializers[i].call(instance);return instance}))}function old_applyClassDecs(ret,targetClass,metadataMap,classDecs){if(classDecs.length>0){for(var initializers=[],newClass=targetClass,name=targetClass.name,i=classDecs.length-1;i>=0;i--){var decoratorFinishedRef={v:!1};try{var ctx=Object.assign({kind:"class",name:name,addInitializer:old_createAddInitializerMethod(initializers,decoratorFinishedRef)},old_createMetadataMethodsForProperty(metadataMap,0,name,decoratorFinishedRef)),nextNewClass=classDecs[i](newClass,ctx)}finally{decoratorFinishedRef.v=!0}void 0!==nextNewClass&&(old_assertValidReturnValue(10,nextNewClass),newClass=nextNewClass)}ret.push(newClass,(function(){for(var i=0;i<initializers.length;i++)initializers[i].call(newClass)}))}}export default function applyDecs(targetClass,memberDecs,classDecs){var ret=[],staticMetadataMap={},protoMetadataMap={};return old_applyMemberDecs(ret,targetClass,protoMetadataMap,staticMetadataMap,memberDecs),old_convertMetadataMapToFinal(targetClass.prototype,protoMetadataMap),old_applyClassDecs(ret,targetClass,staticMetadataMap,classDecs),old_convertMetadataMapToFinal(targetClass,staticMetadataMap),ret}'),
  55451. applyDecs2203: helper("7.19.0", 'function applyDecs2203Factory(){function createAddInitializerMethod(initializers,decoratorFinishedRef){return function(initializer){!function(decoratorFinishedRef,fnName){if(decoratorFinishedRef.v)throw new Error("attempted to call "+fnName+" after decoration was finished")}(decoratorFinishedRef,"addInitializer"),assertCallable(initializer,"An initializer"),initializers.push(initializer)}}function memberDec(dec,name,desc,initializers,kind,isStatic,isPrivate,value){var kindStr;switch(kind){case 1:kindStr="accessor";break;case 2:kindStr="method";break;case 3:kindStr="getter";break;case 4:kindStr="setter";break;default:kindStr="field"}var get,set,ctx={kind:kindStr,name:isPrivate?"#"+name:name,static:isStatic,private:isPrivate},decoratorFinishedRef={v:!1};0!==kind&&(ctx.addInitializer=createAddInitializerMethod(initializers,decoratorFinishedRef)),0===kind?isPrivate?(get=desc.get,set=desc.set):(get=function(){return this[name]},set=function(v){this[name]=v}):2===kind?get=function(){return desc.value}:(1!==kind&&3!==kind||(get=function(){return desc.get.call(this)}),1!==kind&&4!==kind||(set=function(v){desc.set.call(this,v)})),ctx.access=get&&set?{get:get,set:set}:get?{get:get}:{set:set};try{return dec(value,ctx)}finally{decoratorFinishedRef.v=!0}}function assertCallable(fn,hint){if("function"!=typeof fn)throw new TypeError(hint+" must be a function")}function assertValidReturnValue(kind,value){var type=typeof value;if(1===kind){if("object"!==type||null===value)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==value.get&&assertCallable(value.get,"accessor.get"),void 0!==value.set&&assertCallable(value.set,"accessor.set"),void 0!==value.init&&assertCallable(value.init,"accessor.init")}else if("function"!==type){var hint;throw hint=0===kind?"field":10===kind?"class":"method",new TypeError(hint+" decorators must return a function or void 0")}}function applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,initializers){var desc,init,value,newValue,get,set,decs=decInfo[0];if(isPrivate?desc=0===kind||1===kind?{get:decInfo[3],set:decInfo[4]}:3===kind?{get:decInfo[3]}:4===kind?{set:decInfo[3]}:{value:decInfo[3]}:0!==kind&&(desc=Object.getOwnPropertyDescriptor(base,name)),1===kind?value={get:desc.get,set:desc.set}:2===kind?value=desc.value:3===kind?value=desc.get:4===kind&&(value=desc.set),"function"==typeof decs)void 0!==(newValue=memberDec(decs,name,desc,initializers,kind,isStatic,isPrivate,value))&&(assertValidReturnValue(kind,newValue),0===kind?init=newValue:1===kind?(init=newValue.init,get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue);else for(var i=decs.length-1;i>=0;i--){var newInit;if(void 0!==(newValue=memberDec(decs[i],name,desc,initializers,kind,isStatic,isPrivate,value)))assertValidReturnValue(kind,newValue),0===kind?newInit=newValue:1===kind?(newInit=newValue.init,get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue,void 0!==newInit&&(void 0===init?init=newInit:"function"==typeof init?init=[init,newInit]:init.push(newInit))}if(0===kind||1===kind){if(void 0===init)init=function(instance,init){return init};else if("function"!=typeof init){var ownInitializers=init;init=function(instance,init){for(var value=init,i=0;i<ownInitializers.length;i++)value=ownInitializers[i].call(instance,value);return value}}else{var originalInitializer=init;init=function(instance,init){return originalInitializer.call(instance,init)}}ret.push(init)}0!==kind&&(1===kind?(desc.get=value.get,desc.set=value.set):2===kind?desc.value=value:3===kind?desc.get=value:4===kind&&(desc.set=value),isPrivate?1===kind?(ret.push((function(instance,args){return value.get.call(instance,args)})),ret.push((function(instance,args){return value.set.call(instance,args)}))):2===kind?ret.push(value):ret.push((function(instance,args){return value.call(instance,args)})):Object.defineProperty(base,name,desc))}function pushInitializers(ret,initializers){initializers&&ret.push((function(instance){for(var i=0;i<initializers.length;i++)initializers[i].call(instance);return instance}))}return function(targetClass,memberDecs,classDecs){var ret=[];return function(ret,Class,decInfos){for(var protoInitializers,staticInitializers,existingProtoNonFields=new Map,existingStaticNonFields=new Map,i=0;i<decInfos.length;i++){var decInfo=decInfos[i];if(Array.isArray(decInfo)){var base,initializers,kind=decInfo[1],name=decInfo[2],isPrivate=decInfo.length>3,isStatic=kind>=5;if(isStatic?(base=Class,0!=(kind-=5)&&(initializers=staticInitializers=staticInitializers||[])):(base=Class.prototype,0!==kind&&(initializers=protoInitializers=protoInitializers||[])),0!==kind&&!isPrivate){var existingNonFields=isStatic?existingStaticNonFields:existingProtoNonFields,existingKind=existingNonFields.get(name)||0;if(!0===existingKind||3===existingKind&&4!==kind||4===existingKind&&3!==kind)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+name);!existingKind&&kind>2?existingNonFields.set(name,kind):existingNonFields.set(name,!0)}applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,initializers)}}pushInitializers(ret,protoInitializers),pushInitializers(ret,staticInitializers)}(ret,targetClass,memberDecs),function(ret,targetClass,classDecs){if(classDecs.length>0){for(var initializers=[],newClass=targetClass,name=targetClass.name,i=classDecs.length-1;i>=0;i--){var decoratorFinishedRef={v:!1};try{var nextNewClass=classDecs[i](newClass,{kind:"class",name:name,addInitializer:createAddInitializerMethod(initializers,decoratorFinishedRef)})}finally{decoratorFinishedRef.v=!0}void 0!==nextNewClass&&(assertValidReturnValue(10,nextNewClass),newClass=nextNewClass)}ret.push(newClass,(function(){for(var i=0;i<initializers.length;i++)initializers[i].call(newClass)}))}}(ret,targetClass,classDecs),ret}}var applyDecs2203Impl;export default function applyDecs2203(targetClass,memberDecs,classDecs){return(applyDecs2203Impl=applyDecs2203Impl||applyDecs2203Factory())(targetClass,memberDecs,classDecs)}'),
  55452. applyDecs2203R: helper("7.20.0", 'function applyDecs2203RFactory(){function createAddInitializerMethod(initializers,decoratorFinishedRef){return function(initializer){!function(decoratorFinishedRef,fnName){if(decoratorFinishedRef.v)throw new Error("attempted to call "+fnName+" after decoration was finished")}(decoratorFinishedRef,"addInitializer"),assertCallable(initializer,"An initializer"),initializers.push(initializer)}}function memberDec(dec,name,desc,initializers,kind,isStatic,isPrivate,value){var kindStr;switch(kind){case 1:kindStr="accessor";break;case 2:kindStr="method";break;case 3:kindStr="getter";break;case 4:kindStr="setter";break;default:kindStr="field"}var get,set,ctx={kind:kindStr,name:isPrivate?"#"+name:name,static:isStatic,private:isPrivate},decoratorFinishedRef={v:!1};0!==kind&&(ctx.addInitializer=createAddInitializerMethod(initializers,decoratorFinishedRef)),0===kind?isPrivate?(get=desc.get,set=desc.set):(get=function(){return this[name]},set=function(v){this[name]=v}):2===kind?get=function(){return desc.value}:(1!==kind&&3!==kind||(get=function(){return desc.get.call(this)}),1!==kind&&4!==kind||(set=function(v){desc.set.call(this,v)})),ctx.access=get&&set?{get:get,set:set}:get?{get:get}:{set:set};try{return dec(value,ctx)}finally{decoratorFinishedRef.v=!0}}function assertCallable(fn,hint){if("function"!=typeof fn)throw new TypeError(hint+" must be a function")}function assertValidReturnValue(kind,value){var type=typeof value;if(1===kind){if("object"!==type||null===value)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==value.get&&assertCallable(value.get,"accessor.get"),void 0!==value.set&&assertCallable(value.set,"accessor.set"),void 0!==value.init&&assertCallable(value.init,"accessor.init")}else if("function"!==type){var hint;throw hint=0===kind?"field":10===kind?"class":"method",new TypeError(hint+" decorators must return a function or void 0")}}function applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,initializers){var desc,init,value,newValue,get,set,decs=decInfo[0];if(isPrivate?desc=0===kind||1===kind?{get:decInfo[3],set:decInfo[4]}:3===kind?{get:decInfo[3]}:4===kind?{set:decInfo[3]}:{value:decInfo[3]}:0!==kind&&(desc=Object.getOwnPropertyDescriptor(base,name)),1===kind?value={get:desc.get,set:desc.set}:2===kind?value=desc.value:3===kind?value=desc.get:4===kind&&(value=desc.set),"function"==typeof decs)void 0!==(newValue=memberDec(decs,name,desc,initializers,kind,isStatic,isPrivate,value))&&(assertValidReturnValue(kind,newValue),0===kind?init=newValue:1===kind?(init=newValue.init,get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue);else for(var i=decs.length-1;i>=0;i--){var newInit;if(void 0!==(newValue=memberDec(decs[i],name,desc,initializers,kind,isStatic,isPrivate,value)))assertValidReturnValue(kind,newValue),0===kind?newInit=newValue:1===kind?(newInit=newValue.init,get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue,void 0!==newInit&&(void 0===init?init=newInit:"function"==typeof init?init=[init,newInit]:init.push(newInit))}if(0===kind||1===kind){if(void 0===init)init=function(instance,init){return init};else if("function"!=typeof init){var ownInitializers=init;init=function(instance,init){for(var value=init,i=0;i<ownInitializers.length;i++)value=ownInitializers[i].call(instance,value);return value}}else{var originalInitializer=init;init=function(instance,init){return originalInitializer.call(instance,init)}}ret.push(init)}0!==kind&&(1===kind?(desc.get=value.get,desc.set=value.set):2===kind?desc.value=value:3===kind?desc.get=value:4===kind&&(desc.set=value),isPrivate?1===kind?(ret.push((function(instance,args){return value.get.call(instance,args)})),ret.push((function(instance,args){return value.set.call(instance,args)}))):2===kind?ret.push(value):ret.push((function(instance,args){return value.call(instance,args)})):Object.defineProperty(base,name,desc))}function applyMemberDecs(Class,decInfos){for(var protoInitializers,staticInitializers,ret=[],existingProtoNonFields=new Map,existingStaticNonFields=new Map,i=0;i<decInfos.length;i++){var decInfo=decInfos[i];if(Array.isArray(decInfo)){var base,initializers,kind=decInfo[1],name=decInfo[2],isPrivate=decInfo.length>3,isStatic=kind>=5;if(isStatic?(base=Class,0!==(kind-=5)&&(initializers=staticInitializers=staticInitializers||[])):(base=Class.prototype,0!==kind&&(initializers=protoInitializers=protoInitializers||[])),0!==kind&&!isPrivate){var existingNonFields=isStatic?existingStaticNonFields:existingProtoNonFields,existingKind=existingNonFields.get(name)||0;if(!0===existingKind||3===existingKind&&4!==kind||4===existingKind&&3!==kind)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+name);!existingKind&&kind>2?existingNonFields.set(name,kind):existingNonFields.set(name,!0)}applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,initializers)}}return pushInitializers(ret,protoInitializers),pushInitializers(ret,staticInitializers),ret}function pushInitializers(ret,initializers){initializers&&ret.push((function(instance){for(var i=0;i<initializers.length;i++)initializers[i].call(instance);return instance}))}return function(targetClass,memberDecs,classDecs){return{e:applyMemberDecs(targetClass,memberDecs),get c(){return function(targetClass,classDecs){if(classDecs.length>0){for(var initializers=[],newClass=targetClass,name=targetClass.name,i=classDecs.length-1;i>=0;i--){var decoratorFinishedRef={v:!1};try{var nextNewClass=classDecs[i](newClass,{kind:"class",name:name,addInitializer:createAddInitializerMethod(initializers,decoratorFinishedRef)})}finally{decoratorFinishedRef.v=!0}void 0!==nextNewClass&&(assertValidReturnValue(10,nextNewClass),newClass=nextNewClass)}return[newClass,function(){for(var i=0;i<initializers.length;i++)initializers[i].call(newClass)}]}}(targetClass,classDecs)}}}}export default function applyDecs2203R(targetClass,memberDecs,classDecs){return(applyDecs2203R=applyDecs2203RFactory())(targetClass,memberDecs,classDecs)}'),
  55453. applyDecs2301: helper("7.21.0", 'import checkInRHS from"checkInRHS";function createAddInitializerMethod(initializers,decoratorFinishedRef){return function(initializer){assertNotFinished(decoratorFinishedRef,"addInitializer"),assertCallable(initializer,"An initializer"),initializers.push(initializer)}}function assertInstanceIfPrivate(has,target){if(!has(target))throw new TypeError("Attempted to access private element on non-instance")}function memberDec(dec,name,desc,initializers,kind,isStatic,isPrivate,value,hasPrivateBrand){var kindStr;switch(kind){case 1:kindStr="accessor";break;case 2:kindStr="method";break;case 3:kindStr="getter";break;case 4:kindStr="setter";break;default:kindStr="field"}var get,set,ctx={kind:kindStr,name:isPrivate?"#"+name:name,static:isStatic,private:isPrivate},decoratorFinishedRef={v:!1};if(0!==kind&&(ctx.addInitializer=createAddInitializerMethod(initializers,decoratorFinishedRef)),isPrivate||0!==kind&&2!==kind)if(2===kind)get=function(target){return assertInstanceIfPrivate(hasPrivateBrand,target),desc.value};else{var t=0===kind||1===kind;(t||3===kind)&&(get=isPrivate?function(target){return assertInstanceIfPrivate(hasPrivateBrand,target),desc.get.call(target)}:function(target){return desc.get.call(target)}),(t||4===kind)&&(set=isPrivate?function(target,value){assertInstanceIfPrivate(hasPrivateBrand,target),desc.set.call(target,value)}:function(target,value){desc.set.call(target,value)})}else get=function(target){return target[name]},0===kind&&(set=function(target,v){target[name]=v});var has=isPrivate?hasPrivateBrand.bind():function(target){return name in target};ctx.access=get&&set?{get:get,set:set,has:has}:get?{get:get,has:has}:{set:set,has:has};try{return dec(value,ctx)}finally{decoratorFinishedRef.v=!0}}function assertNotFinished(decoratorFinishedRef,fnName){if(decoratorFinishedRef.v)throw new Error("attempted to call "+fnName+" after decoration was finished")}function assertCallable(fn,hint){if("function"!=typeof fn)throw new TypeError(hint+" must be a function")}function assertValidReturnValue(kind,value){var type=typeof value;if(1===kind){if("object"!==type||null===value)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==value.get&&assertCallable(value.get,"accessor.get"),void 0!==value.set&&assertCallable(value.set,"accessor.set"),void 0!==value.init&&assertCallable(value.init,"accessor.init")}else if("function"!==type){var hint;throw hint=0===kind?"field":10===kind?"class":"method",new TypeError(hint+" decorators must return a function or void 0")}}function curryThis1(fn){return function(){return fn(this)}}function curryThis2(fn){return function(value){fn(this,value)}}function applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,initializers,hasPrivateBrand){var desc,init,value,newValue,get,set,decs=decInfo[0];if(isPrivate?desc=0===kind||1===kind?{get:curryThis1(decInfo[3]),set:curryThis2(decInfo[4])}:3===kind?{get:decInfo[3]}:4===kind?{set:decInfo[3]}:{value:decInfo[3]}:0!==kind&&(desc=Object.getOwnPropertyDescriptor(base,name)),1===kind?value={get:desc.get,set:desc.set}:2===kind?value=desc.value:3===kind?value=desc.get:4===kind&&(value=desc.set),"function"==typeof decs)void 0!==(newValue=memberDec(decs,name,desc,initializers,kind,isStatic,isPrivate,value,hasPrivateBrand))&&(assertValidReturnValue(kind,newValue),0===kind?init=newValue:1===kind?(init=newValue.init,get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue);else for(var i=decs.length-1;i>=0;i--){var newInit;if(void 0!==(newValue=memberDec(decs[i],name,desc,initializers,kind,isStatic,isPrivate,value,hasPrivateBrand)))assertValidReturnValue(kind,newValue),0===kind?newInit=newValue:1===kind?(newInit=newValue.init,get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue,void 0!==newInit&&(void 0===init?init=newInit:"function"==typeof init?init=[init,newInit]:init.push(newInit))}if(0===kind||1===kind){if(void 0===init)init=function(instance,init){return init};else if("function"!=typeof init){var ownInitializers=init;init=function(instance,init){for(var value=init,i=0;i<ownInitializers.length;i++)value=ownInitializers[i].call(instance,value);return value}}else{var originalInitializer=init;init=function(instance,init){return originalInitializer.call(instance,init)}}ret.push(init)}0!==kind&&(1===kind?(desc.get=value.get,desc.set=value.set):2===kind?desc.value=value:3===kind?desc.get=value:4===kind&&(desc.set=value),isPrivate?1===kind?(ret.push((function(instance,args){return value.get.call(instance,args)})),ret.push((function(instance,args){return value.set.call(instance,args)}))):2===kind?ret.push(value):ret.push((function(instance,args){return value.call(instance,args)})):Object.defineProperty(base,name,desc))}function applyMemberDecs(Class,decInfos,instanceBrand){for(var protoInitializers,staticInitializers,staticBrand,ret=[],existingProtoNonFields=new Map,existingStaticNonFields=new Map,i=0;i<decInfos.length;i++){var decInfo=decInfos[i];if(Array.isArray(decInfo)){var base,initializers,kind=decInfo[1],name=decInfo[2],isPrivate=decInfo.length>3,isStatic=kind>=5,hasPrivateBrand=instanceBrand;if(isStatic?(base=Class,0!==(kind-=5)&&(initializers=staticInitializers=staticInitializers||[]),isPrivate&&!staticBrand&&(staticBrand=function(_){return checkInRHS(_)===Class}),hasPrivateBrand=staticBrand):(base=Class.prototype,0!==kind&&(initializers=protoInitializers=protoInitializers||[])),0!==kind&&!isPrivate){var existingNonFields=isStatic?existingStaticNonFields:existingProtoNonFields,existingKind=existingNonFields.get(name)||0;if(!0===existingKind||3===existingKind&&4!==kind||4===existingKind&&3!==kind)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+name);!existingKind&&kind>2?existingNonFields.set(name,kind):existingNonFields.set(name,!0)}applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,initializers,hasPrivateBrand)}}return pushInitializers(ret,protoInitializers),pushInitializers(ret,staticInitializers),ret}function pushInitializers(ret,initializers){initializers&&ret.push((function(instance){for(var i=0;i<initializers.length;i++)initializers[i].call(instance);return instance}))}function applyClassDecs(targetClass,classDecs){if(classDecs.length>0){for(var initializers=[],newClass=targetClass,name=targetClass.name,i=classDecs.length-1;i>=0;i--){var decoratorFinishedRef={v:!1};try{var nextNewClass=classDecs[i](newClass,{kind:"class",name:name,addInitializer:createAddInitializerMethod(initializers,decoratorFinishedRef)})}finally{decoratorFinishedRef.v=!0}void 0!==nextNewClass&&(assertValidReturnValue(10,nextNewClass),newClass=nextNewClass)}return[newClass,function(){for(var i=0;i<initializers.length;i++)initializers[i].call(newClass)}]}}export default function applyDecs2301(targetClass,memberDecs,classDecs,instanceBrand){return{e:applyMemberDecs(targetClass,memberDecs,instanceBrand),get c(){return applyClassDecs(targetClass,classDecs)}}}'),
  55454. asyncGeneratorDelegate: helper("7.0.0-beta.0", 'import OverloadYield from"OverloadYield";export default function _asyncGeneratorDelegate(inner){var iter={},waiting=!1;function pump(key,value){return waiting=!0,value=new Promise((function(resolve){resolve(inner[key](value))})),{done:!1,value:new OverloadYield(value,1)}}return iter["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},iter.next=function(value){return waiting?(waiting=!1,value):pump("next",value)},"function"==typeof inner.throw&&(iter.throw=function(value){if(waiting)throw waiting=!1,value;return pump("throw",value)}),"function"==typeof inner.return&&(iter.return=function(value){return waiting?(waiting=!1,value):pump("return",value)}),iter}'),
  55455. asyncIterator: helper("7.15.9", 'export default function _asyncIterator(iterable){var method,async,sync,retry=2;for("undefined"!=typeof Symbol&&(async=Symbol.asyncIterator,sync=Symbol.iterator);retry--;){if(async&&null!=(method=iterable[async]))return method.call(iterable);if(sync&&null!=(method=iterable[sync]))return new AsyncFromSyncIterator(method.call(iterable));async="@@asyncIterator",sync="@@iterator"}throw new TypeError("Object is not async iterable")}function AsyncFromSyncIterator(s){function AsyncFromSyncIteratorContinuation(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var done=r.done;return Promise.resolve(r.value).then((function(value){return{value:value,done:done}}))}return AsyncFromSyncIterator=function(s){this.s=s,this.n=s.next},AsyncFromSyncIterator.prototype={s:null,n:null,next:function(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments))},return:function(value){var ret=this.s.return;return void 0===ret?Promise.resolve({value:value,done:!0}):AsyncFromSyncIteratorContinuation(ret.apply(this.s,arguments))},throw:function(value){var thr=this.s.return;return void 0===thr?Promise.reject(value):AsyncFromSyncIteratorContinuation(thr.apply(this.s,arguments))}},new AsyncFromSyncIterator(s)}'),
  55456. awaitAsyncGenerator: helper("7.0.0-beta.0", 'import OverloadYield from"OverloadYield";export default function _awaitAsyncGenerator(value){return new OverloadYield(value,0)}'),
  55457. checkInRHS: helper("7.20.5", `export default function _checkInRHS(value){if(Object(value)!==value)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==value?typeof value:"null"));return value}`),
  55458. defineAccessor: helper("7.20.7", "export default function _defineAccessor(type,obj,key,fn){var desc={configurable:!0,enumerable:!0};return desc[type]=fn,Object.defineProperty(obj,key,desc)}"),
  55459. iterableToArrayLimit: helper("7.0.0-beta.0", 'export default function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}'),
  55460. iterableToArrayLimitLoose: helper("7.0.0-beta.0", 'export default function _iterableToArrayLimitLoose(arr,i){var _i=arr&&("undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"]);if(null!=_i){var _s,_arr=[];for(_i=_i.call(arr);arr.length<i&&!(_s=_i.next()).done;)_arr.push(_s.value);return _arr}}'),
  55461. jsx: helper("7.0.0-beta.0", 'var REACT_ELEMENT_TYPE;export default function _createRawReactElement(type,props,key,children){REACT_ELEMENT_TYPE||(REACT_ELEMENT_TYPE="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var defaultProps=type&&type.defaultProps,childrenLength=arguments.length-3;if(props||0===childrenLength||(props={children:void 0}),1===childrenLength)props.children=children;else if(childrenLength>1){for(var childArray=new Array(childrenLength),i=0;i<childrenLength;i++)childArray[i]=arguments[i+3];props.children=childArray}if(props&&defaultProps)for(var propName in defaultProps)void 0===props[propName]&&(props[propName]=defaultProps[propName]);else props||(props=defaultProps||{});return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:void 0===key?null:""+key,ref:null,props:props,_owner:null}}'),
  55462. objectSpread2: helper("7.5.0", 'import defineProperty from"defineProperty";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}export default function _objectSpread2(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}'),
  55463. regeneratorRuntime: helper("7.18.0", `export default function _regeneratorRuntime(){"use strict";
  55464. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return exports};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,defineProperty=Object.defineProperty||function(obj,key,desc){obj[key]=desc.value},$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}),obj[key]}try{define({},"")}catch(err){define=function(obj,key,value){return obj[key]=value}}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return defineProperty(generator,"_invoke",{value:makeInvokeMethod(innerFn,self,context)}),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,(function(){return this}));var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach((function(method){define(prototype,method,(function(arg){return this._invoke(method,arg)}))}))}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==typeof value&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then((function(value){invoke("next",value,resolve,reject)}),(function(err){invoke("throw",err,resolve,reject)})):PromiseImpl.resolve(value).then((function(unwrapped){result.value=unwrapped,resolve(result)}),(function(error){return invoke("throw",error,resolve,reject)}))}reject(record.arg)}var previousPromise;defineProperty(this,"_invoke",{value:function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl((function(resolve,reject){invoke(method,arg,resolve,reject)}))}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg)}}}function maybeInvokeDelegate(delegate,context){var methodName=context.method,method=delegate.iterator[methodName];if(undefined===method)return context.delegate=null,"throw"===methodName&&delegate.iterator.return&&(context.method="return",context.arg=undefined,maybeInvokeDelegate(delegate,context),"throw"===context.method)||"return"!==methodName&&(context.method="throw",context.arg=new TypeError("The iterator does not provide a '"+methodName+"' method")),ContinueSentinel;var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=undefined),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i<iterable.length;)if(hasOwn.call(iterable,i))return next.value=iterable[i],next.done=!1,next;return next.value=undefined,next.done=!0,next};return next.next=next}}return{next:doneResult}}function doneResult(){return{value:undefined,done:!0}}return GeneratorFunction.prototype=GeneratorFunctionPrototype,defineProperty(Gp,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),defineProperty(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,toStringTagSymbol,"GeneratorFunction"),exports.isGeneratorFunction=function(genFun){var ctor="function"==typeof genFun&&genFun.constructor;return!!ctor&&(ctor===GeneratorFunction||"GeneratorFunction"===(ctor.displayName||ctor.name))},exports.mark=function(genFun){return Object.setPrototypeOf?Object.setPrototypeOf(genFun,GeneratorFunctionPrototype):(genFun.__proto__=GeneratorFunctionPrototype,define(genFun,toStringTagSymbol,"GeneratorFunction")),genFun.prototype=Object.create(Gp),genFun},exports.awrap=function(arg){return{__await:arg}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,asyncIteratorSymbol,(function(){return this})),exports.AsyncIterator=AsyncIterator,exports.async=function(innerFn,outerFn,self,tryLocsList,PromiseImpl){void 0===PromiseImpl&&(PromiseImpl=Promise);var iter=new AsyncIterator(wrap(innerFn,outerFn,self,tryLocsList),PromiseImpl);return exports.isGeneratorFunction(outerFn)?iter:iter.next().then((function(result){return result.done?result.value:iter.next()}))},defineIteratorMethods(Gp),define(Gp,toStringTagSymbol,"Generator"),define(Gp,iteratorSymbol,(function(){return this})),define(Gp,"toString",(function(){return"[object Generator]"})),exports.keys=function(val){var object=Object(val),keys=[];for(var key in object)keys.push(key);return keys.reverse(),function next(){for(;keys.length;){var key=keys.pop();if(key in object)return next.value=key,next.done=!1,next}return next.done=!0,next}},exports.values=values,Context.prototype={constructor:Context,reset:function(skipTempReset){if(this.prev=0,this.next=0,this.sent=this._sent=undefined,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined,this.tryEntries.forEach(resetTryEntry),!skipTempReset)for(var name in this)"t"===name.charAt(0)&&hasOwn.call(this,name)&&!isNaN(+name.slice(1))&&(this[name]=undefined)},stop:function(){this.done=!0;var rootRecord=this.tryEntries[0].completion;if("throw"===rootRecord.type)throw rootRecord.arg;return this.rval},dispatchException:function(exception){if(this.done)throw exception;var context=this;function handle(loc,caught){return record.type="throw",record.arg=exception,context.next=loc,caught&&(context.method="next",context.arg=undefined),!!caught}for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0);if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(hasCatch){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0)}else{if(!hasFinally)throw new Error("try statement without catch or finally");if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}}}},abrupt:function(type,arg){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev<entry.finallyLoc){var finallyEntry=entry;break}}finallyEntry&&("break"===type||"continue"===type)&&finallyEntry.tryLoc<=arg&&arg<=finallyEntry.finallyLoc&&(finallyEntry=null);var record=finallyEntry?finallyEntry.completion:{};return record.type=type,record.arg=arg,finallyEntry?(this.method="next",this.next=finallyEntry.finallyLoc,ContinueSentinel):this.complete(record)},complete:function(record,afterLoc){if("throw"===record.type)throw record.arg;return"break"===record.type||"continue"===record.type?this.next=record.arg:"return"===record.type?(this.rval=this.arg=record.arg,this.method="return",this.next="end"):"normal"===record.type&&afterLoc&&(this.next=afterLoc),ContinueSentinel},finish:function(finallyLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc},"next"===this.method&&(this.arg=undefined),ContinueSentinel}},exports}`),
  55465. typeof: helper("7.0.0-beta.0", 'export default function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}'),
  55466. wrapRegExp: helper("7.19.0", 'import setPrototypeOf from"setPrototypeOf";import inherits from"inherits";export default function _wrapRegExp(){_wrapRegExp=function(re,groups){return new BabelRegExp(re,void 0,groups)};var _super=RegExp.prototype,_groups=new WeakMap;function BabelRegExp(re,flags,groups){var _this=new RegExp(re,flags);return _groups.set(_this,groups||_groups.get(re)),setPrototypeOf(_this,BabelRegExp.prototype)}function buildGroups(result,re){var g=_groups.get(re);return Object.keys(g).reduce((function(groups,name){var i=g[name];if("number"==typeof i)groups[name]=result[i];else{for(var k=0;void 0===result[i[k]]&&k+1<i.length;)k++;groups[name]=result[i[k]]}return groups}),Object.create(null))}return inherits(BabelRegExp,RegExp),BabelRegExp.prototype.exec=function(str){var result=_super.exec.call(this,str);if(result){result.groups=buildGroups(result,this);var indices=result.indices;indices&&(indices.groups=buildGroups(indices,this))}return result},BabelRegExp.prototype[Symbol.replace]=function(str,substitution){if("string"==typeof substitution){var groups=_groups.get(this);return _super[Symbol.replace].call(this,str,substitution.replace(/\\$<([^>]+)>/g,(function(_,name){var group=groups[name];return"$"+(Array.isArray(group)?group.join("$"):group)})))}if("function"==typeof substitution){var _this=this;return _super[Symbol.replace].call(this,str,(function(){var args=arguments;return"object"!=typeof args[args.length-1]&&(args=[].slice.call(args)).push(buildGroups(args,_this)),substitution.apply(this,args)}))}return _super[Symbol.replace].call(this,str,substitution)},_wrapRegExp.apply(this,arguments)}')
  55467. });
  55468. exports.default = _default;
  55469. }
  55470. });
  55471. // node_modules/@babel/helpers/lib/helpers.js
  55472. var require_helpers = __commonJS({
  55473. "node_modules/@babel/helpers/lib/helpers.js"(exports) {
  55474. "use strict";
  55475. Object.defineProperty(exports, "__esModule", {
  55476. value: true
  55477. });
  55478. exports.default = void 0;
  55479. var _template = require_lib11();
  55480. var _helpersGenerated = require_helpers_generated();
  55481. var helpers = Object.assign({
  55482. __proto__: null
  55483. }, _helpersGenerated.default);
  55484. var _default = helpers;
  55485. exports.default = _default;
  55486. var helper = (minVersion) => (tpl) => ({
  55487. minVersion,
  55488. ast: () => _template.default.program.ast(tpl)
  55489. });
  55490. {
  55491. helpers.AwaitValue = helper("7.0.0-beta.0")`
  55492. export default function _AwaitValue(value) {
  55493. this.wrapped = value;
  55494. }
  55495. `;
  55496. }
  55497. helpers.wrapAsyncGenerator = helper("7.0.0-beta.0")`
  55498. import AsyncGenerator from "AsyncGenerator";
  55499. export default function _wrapAsyncGenerator(fn) {
  55500. return function () {
  55501. return new AsyncGenerator(fn.apply(this, arguments));
  55502. };
  55503. }
  55504. `;
  55505. helpers.asyncToGenerator = helper("7.0.0-beta.0")`
  55506. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  55507. try {
  55508. var info = gen[key](arg);
  55509. var value = info.value;
  55510. } catch (error) {
  55511. reject(error);
  55512. return;
  55513. }
  55514. if (info.done) {
  55515. resolve(value);
  55516. } else {
  55517. Promise.resolve(value).then(_next, _throw);
  55518. }
  55519. }
  55520. export default function _asyncToGenerator(fn) {
  55521. return function () {
  55522. var self = this, args = arguments;
  55523. return new Promise(function (resolve, reject) {
  55524. var gen = fn.apply(self, args);
  55525. function _next(value) {
  55526. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  55527. }
  55528. function _throw(err) {
  55529. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  55530. }
  55531. _next(undefined);
  55532. });
  55533. };
  55534. }
  55535. `;
  55536. helpers.classCallCheck = helper("7.0.0-beta.0")`
  55537. export default function _classCallCheck(instance, Constructor) {
  55538. if (!(instance instanceof Constructor)) {
  55539. throw new TypeError("Cannot call a class as a function");
  55540. }
  55541. }
  55542. `;
  55543. helpers.createClass = helper("7.0.0-beta.0")`
  55544. import toPropertyKey from "toPropertyKey";
  55545. function _defineProperties(target, props) {
  55546. for (var i = 0; i < props.length; i ++) {
  55547. var descriptor = props[i];
  55548. descriptor.enumerable = descriptor.enumerable || false;
  55549. descriptor.configurable = true;
  55550. if ("value" in descriptor) descriptor.writable = true;
  55551. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  55552. }
  55553. }
  55554. export default function _createClass(Constructor, protoProps, staticProps) {
  55555. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  55556. if (staticProps) _defineProperties(Constructor, staticProps);
  55557. Object.defineProperty(Constructor, "prototype", { writable: false });
  55558. return Constructor;
  55559. }
  55560. `;
  55561. helpers.defineEnumerableProperties = helper("7.0.0-beta.0")`
  55562. export default function _defineEnumerableProperties(obj, descs) {
  55563. for (var key in descs) {
  55564. var desc = descs[key];
  55565. desc.configurable = desc.enumerable = true;
  55566. if ("value" in desc) desc.writable = true;
  55567. Object.defineProperty(obj, key, desc);
  55568. }
  55569. // Symbols are not enumerated over by for-in loops. If native
  55570. // Symbols are available, fetch all of the descs object's own
  55571. // symbol properties and define them on our target object too.
  55572. if (Object.getOwnPropertySymbols) {
  55573. var objectSymbols = Object.getOwnPropertySymbols(descs);
  55574. for (var i = 0; i < objectSymbols.length; i++) {
  55575. var sym = objectSymbols[i];
  55576. var desc = descs[sym];
  55577. desc.configurable = desc.enumerable = true;
  55578. if ("value" in desc) desc.writable = true;
  55579. Object.defineProperty(obj, sym, desc);
  55580. }
  55581. }
  55582. return obj;
  55583. }
  55584. `;
  55585. helpers.defaults = helper("7.0.0-beta.0")`
  55586. export default function _defaults(obj, defaults) {
  55587. var keys = Object.getOwnPropertyNames(defaults);
  55588. for (var i = 0; i < keys.length; i++) {
  55589. var key = keys[i];
  55590. var value = Object.getOwnPropertyDescriptor(defaults, key);
  55591. if (value && value.configurable && obj[key] === undefined) {
  55592. Object.defineProperty(obj, key, value);
  55593. }
  55594. }
  55595. return obj;
  55596. }
  55597. `;
  55598. helpers.defineProperty = helper("7.0.0-beta.0")`
  55599. import toPropertyKey from "toPropertyKey";
  55600. export default function _defineProperty(obj, key, value) {
  55601. key = toPropertyKey(key);
  55602. // Shortcircuit the slow defineProperty path when possible.
  55603. // We are trying to avoid issues where setters defined on the
  55604. // prototype cause side effects under the fast path of simple
  55605. // assignment. By checking for existence of the property with
  55606. // the in operator, we can optimize most of this overhead away.
  55607. if (key in obj) {
  55608. Object.defineProperty(obj, key, {
  55609. value: value,
  55610. enumerable: true,
  55611. configurable: true,
  55612. writable: true
  55613. });
  55614. } else {
  55615. obj[key] = value;
  55616. }
  55617. return obj;
  55618. }
  55619. `;
  55620. helpers.extends = helper("7.0.0-beta.0")`
  55621. export default function _extends() {
  55622. _extends = Object.assign ? Object.assign.bind() : function (target) {
  55623. for (var i = 1; i < arguments.length; i++) {
  55624. var source = arguments[i];
  55625. for (var key in source) {
  55626. if (Object.prototype.hasOwnProperty.call(source, key)) {
  55627. target[key] = source[key];
  55628. }
  55629. }
  55630. }
  55631. return target;
  55632. };
  55633. return _extends.apply(this, arguments);
  55634. }
  55635. `;
  55636. helpers.objectSpread = helper("7.0.0-beta.0")`
  55637. import defineProperty from "defineProperty";
  55638. export default function _objectSpread(target) {
  55639. for (var i = 1; i < arguments.length; i++) {
  55640. var source = (arguments[i] != null) ? Object(arguments[i]) : {};
  55641. var ownKeys = Object.keys(source);
  55642. if (typeof Object.getOwnPropertySymbols === 'function') {
  55643. ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function(sym) {
  55644. return Object.getOwnPropertyDescriptor(source, sym).enumerable;
  55645. }));
  55646. }
  55647. ownKeys.forEach(function(key) {
  55648. defineProperty(target, key, source[key]);
  55649. });
  55650. }
  55651. return target;
  55652. }
  55653. `;
  55654. helpers.inherits = helper("7.0.0-beta.0")`
  55655. import setPrototypeOf from "setPrototypeOf";
  55656. export default function _inherits(subClass, superClass) {
  55657. if (typeof superClass !== "function" && superClass !== null) {
  55658. throw new TypeError("Super expression must either be null or a function");
  55659. }
  55660. // We can't use defineProperty to set the prototype in a single step because it
  55661. // doesn't work in Chrome <= 36. https://github.com/babel/babel/issues/14056
  55662. // V8 bug: https://bugs.chromium.org/p/v8/issues/detail?id=3334
  55663. subClass.prototype = Object.create(superClass && superClass.prototype, {
  55664. constructor: {
  55665. value: subClass,
  55666. writable: true,
  55667. configurable: true
  55668. }
  55669. });
  55670. Object.defineProperty(subClass, "prototype", { writable: false });
  55671. if (superClass) setPrototypeOf(subClass, superClass);
  55672. }
  55673. `;
  55674. helpers.inheritsLoose = helper("7.0.0-beta.0")`
  55675. import setPrototypeOf from "setPrototypeOf";
  55676. export default function _inheritsLoose(subClass, superClass) {
  55677. subClass.prototype = Object.create(superClass.prototype);
  55678. subClass.prototype.constructor = subClass;
  55679. setPrototypeOf(subClass, superClass);
  55680. }
  55681. `;
  55682. helpers.getPrototypeOf = helper("7.0.0-beta.0")`
  55683. export default function _getPrototypeOf(o) {
  55684. _getPrototypeOf = Object.setPrototypeOf
  55685. ? Object.getPrototypeOf.bind()
  55686. : function _getPrototypeOf(o) {
  55687. return o.__proto__ || Object.getPrototypeOf(o);
  55688. };
  55689. return _getPrototypeOf(o);
  55690. }
  55691. `;
  55692. helpers.setPrototypeOf = helper("7.0.0-beta.0")`
  55693. export default function _setPrototypeOf(o, p) {
  55694. _setPrototypeOf = Object.setPrototypeOf
  55695. ? Object.setPrototypeOf.bind()
  55696. : function _setPrototypeOf(o, p) {
  55697. o.__proto__ = p;
  55698. return o;
  55699. };
  55700. return _setPrototypeOf(o, p);
  55701. }
  55702. `;
  55703. helpers.isNativeReflectConstruct = helper("7.9.0")`
  55704. export default function _isNativeReflectConstruct() {
  55705. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  55706. // core-js@3
  55707. if (Reflect.construct.sham) return false;
  55708. // Proxy can't be polyfilled. Every browser implemented
  55709. // proxies before or at the same time as Reflect.construct,
  55710. // so if they support Proxy they also support Reflect.construct.
  55711. if (typeof Proxy === "function") return true;
  55712. // Since Reflect.construct can't be properly polyfilled, some
  55713. // implementations (e.g. core-js@2) don't set the correct internal slots.
  55714. // Those polyfills don't allow us to subclass built-ins, so we need to
  55715. // use our fallback implementation.
  55716. try {
  55717. // If the internal slots aren't set, this throws an error similar to
  55718. // TypeError: this is not a Boolean object.
  55719. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
  55720. return true;
  55721. } catch (e) {
  55722. return false;
  55723. }
  55724. }
  55725. `;
  55726. helpers.construct = helper("7.0.0-beta.0")`
  55727. import setPrototypeOf from "setPrototypeOf";
  55728. import isNativeReflectConstruct from "isNativeReflectConstruct";
  55729. export default function _construct(Parent, args, Class) {
  55730. if (isNativeReflectConstruct()) {
  55731. _construct = Reflect.construct.bind();
  55732. } else {
  55733. // NOTE: If Parent !== Class, the correct __proto__ is set *after*
  55734. // calling the constructor.
  55735. _construct = function _construct(Parent, args, Class) {
  55736. var a = [null];
  55737. a.push.apply(a, args);
  55738. var Constructor = Function.bind.apply(Parent, a);
  55739. var instance = new Constructor();
  55740. if (Class) setPrototypeOf(instance, Class.prototype);
  55741. return instance;
  55742. };
  55743. }
  55744. // Avoid issues with Class being present but undefined when it wasn't
  55745. // present in the original call.
  55746. return _construct.apply(null, arguments);
  55747. }
  55748. `;
  55749. helpers.isNativeFunction = helper("7.0.0-beta.0")`
  55750. export default function _isNativeFunction(fn) {
  55751. // Note: This function returns "true" for core-js functions.
  55752. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  55753. }
  55754. `;
  55755. helpers.wrapNativeSuper = helper("7.0.0-beta.0")`
  55756. import getPrototypeOf from "getPrototypeOf";
  55757. import setPrototypeOf from "setPrototypeOf";
  55758. import isNativeFunction from "isNativeFunction";
  55759. import construct from "construct";
  55760. export default function _wrapNativeSuper(Class) {
  55761. var _cache = typeof Map === "function" ? new Map() : undefined;
  55762. _wrapNativeSuper = function _wrapNativeSuper(Class) {
  55763. if (Class === null || !isNativeFunction(Class)) return Class;
  55764. if (typeof Class !== "function") {
  55765. throw new TypeError("Super expression must either be null or a function");
  55766. }
  55767. if (typeof _cache !== "undefined") {
  55768. if (_cache.has(Class)) return _cache.get(Class);
  55769. _cache.set(Class, Wrapper);
  55770. }
  55771. function Wrapper() {
  55772. return construct(Class, arguments, getPrototypeOf(this).constructor)
  55773. }
  55774. Wrapper.prototype = Object.create(Class.prototype, {
  55775. constructor: {
  55776. value: Wrapper,
  55777. enumerable: false,
  55778. writable: true,
  55779. configurable: true,
  55780. }
  55781. });
  55782. return setPrototypeOf(Wrapper, Class);
  55783. }
  55784. return _wrapNativeSuper(Class)
  55785. }
  55786. `;
  55787. helpers.instanceof = helper("7.0.0-beta.0")`
  55788. export default function _instanceof(left, right) {
  55789. if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
  55790. return !!right[Symbol.hasInstance](left);
  55791. } else {
  55792. return left instanceof right;
  55793. }
  55794. }
  55795. `;
  55796. helpers.interopRequireDefault = helper("7.0.0-beta.0")`
  55797. export default function _interopRequireDefault(obj) {
  55798. return obj && obj.__esModule ? obj : { default: obj };
  55799. }
  55800. `;
  55801. helpers.interopRequireWildcard = helper("7.14.0")`
  55802. function _getRequireWildcardCache(nodeInterop) {
  55803. if (typeof WeakMap !== "function") return null;
  55804. var cacheBabelInterop = new WeakMap();
  55805. var cacheNodeInterop = new WeakMap();
  55806. return (_getRequireWildcardCache = function (nodeInterop) {
  55807. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  55808. })(nodeInterop);
  55809. }
  55810. export default function _interopRequireWildcard(obj, nodeInterop) {
  55811. if (!nodeInterop && obj && obj.__esModule) {
  55812. return obj;
  55813. }
  55814. if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
  55815. return { default: obj }
  55816. }
  55817. var cache = _getRequireWildcardCache(nodeInterop);
  55818. if (cache && cache.has(obj)) {
  55819. return cache.get(obj);
  55820. }
  55821. var newObj = {};
  55822. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  55823. for (var key in obj) {
  55824. if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  55825. var desc = hasPropertyDescriptor
  55826. ? Object.getOwnPropertyDescriptor(obj, key)
  55827. : null;
  55828. if (desc && (desc.get || desc.set)) {
  55829. Object.defineProperty(newObj, key, desc);
  55830. } else {
  55831. newObj[key] = obj[key];
  55832. }
  55833. }
  55834. }
  55835. newObj.default = obj;
  55836. if (cache) {
  55837. cache.set(obj, newObj);
  55838. }
  55839. return newObj;
  55840. }
  55841. `;
  55842. helpers.newArrowCheck = helper("7.0.0-beta.0")`
  55843. export default function _newArrowCheck(innerThis, boundThis) {
  55844. if (innerThis !== boundThis) {
  55845. throw new TypeError("Cannot instantiate an arrow function");
  55846. }
  55847. }
  55848. `;
  55849. helpers.objectDestructuringEmpty = helper("7.0.0-beta.0")`
  55850. export default function _objectDestructuringEmpty(obj) {
  55851. if (obj == null) throw new TypeError("Cannot destructure " + obj);
  55852. }
  55853. `;
  55854. helpers.objectWithoutPropertiesLoose = helper("7.0.0-beta.0")`
  55855. export default function _objectWithoutPropertiesLoose(source, excluded) {
  55856. if (source == null) return {};
  55857. var target = {};
  55858. var sourceKeys = Object.keys(source);
  55859. var key, i;
  55860. for (i = 0; i < sourceKeys.length; i++) {
  55861. key = sourceKeys[i];
  55862. if (excluded.indexOf(key) >= 0) continue;
  55863. target[key] = source[key];
  55864. }
  55865. return target;
  55866. }
  55867. `;
  55868. helpers.objectWithoutProperties = helper("7.0.0-beta.0")`
  55869. import objectWithoutPropertiesLoose from "objectWithoutPropertiesLoose";
  55870. export default function _objectWithoutProperties(source, excluded) {
  55871. if (source == null) return {};
  55872. var target = objectWithoutPropertiesLoose(source, excluded);
  55873. var key, i;
  55874. if (Object.getOwnPropertySymbols) {
  55875. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  55876. for (i = 0; i < sourceSymbolKeys.length; i++) {
  55877. key = sourceSymbolKeys[i];
  55878. if (excluded.indexOf(key) >= 0) continue;
  55879. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  55880. target[key] = source[key];
  55881. }
  55882. }
  55883. return target;
  55884. }
  55885. `;
  55886. helpers.assertThisInitialized = helper("7.0.0-beta.0")`
  55887. export default function _assertThisInitialized(self) {
  55888. if (self === void 0) {
  55889. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  55890. }
  55891. return self;
  55892. }
  55893. `;
  55894. helpers.possibleConstructorReturn = helper("7.0.0-beta.0")`
  55895. import assertThisInitialized from "assertThisInitialized";
  55896. export default function _possibleConstructorReturn(self, call) {
  55897. if (call && (typeof call === "object" || typeof call === "function")) {
  55898. return call;
  55899. } else if (call !== void 0) {
  55900. throw new TypeError("Derived constructors may only return object or undefined");
  55901. }
  55902. return assertThisInitialized(self);
  55903. }
  55904. `;
  55905. helpers.createSuper = helper("7.9.0")`
  55906. import getPrototypeOf from "getPrototypeOf";
  55907. import isNativeReflectConstruct from "isNativeReflectConstruct";
  55908. import possibleConstructorReturn from "possibleConstructorReturn";
  55909. export default function _createSuper(Derived) {
  55910. var hasNativeReflectConstruct = isNativeReflectConstruct();
  55911. return function _createSuperInternal() {
  55912. var Super = getPrototypeOf(Derived), result;
  55913. if (hasNativeReflectConstruct) {
  55914. // NOTE: This doesn't work if this.__proto__.constructor has been modified.
  55915. var NewTarget = getPrototypeOf(this).constructor;
  55916. result = Reflect.construct(Super, arguments, NewTarget);
  55917. } else {
  55918. result = Super.apply(this, arguments);
  55919. }
  55920. return possibleConstructorReturn(this, result);
  55921. }
  55922. }
  55923. `;
  55924. helpers.superPropBase = helper("7.0.0-beta.0")`
  55925. import getPrototypeOf from "getPrototypeOf";
  55926. export default function _superPropBase(object, property) {
  55927. // Yes, this throws if object is null to being with, that's on purpose.
  55928. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  55929. object = getPrototypeOf(object);
  55930. if (object === null) break;
  55931. }
  55932. return object;
  55933. }
  55934. `;
  55935. helpers.get = helper("7.0.0-beta.0")`
  55936. import superPropBase from "superPropBase";
  55937. export default function _get() {
  55938. if (typeof Reflect !== "undefined" && Reflect.get) {
  55939. _get = Reflect.get.bind();
  55940. } else {
  55941. _get = function _get(target, property, receiver) {
  55942. var base = superPropBase(target, property);
  55943. if (!base) return;
  55944. var desc = Object.getOwnPropertyDescriptor(base, property);
  55945. if (desc.get) {
  55946. // STEP 3. If receiver is not present, then set receiver to target.
  55947. return desc.get.call(arguments.length < 3 ? target : receiver);
  55948. }
  55949. return desc.value;
  55950. };
  55951. }
  55952. return _get.apply(this, arguments);
  55953. }
  55954. `;
  55955. helpers.set = helper("7.0.0-beta.0")`
  55956. import superPropBase from "superPropBase";
  55957. import defineProperty from "defineProperty";
  55958. function set(target, property, value, receiver) {
  55959. if (typeof Reflect !== "undefined" && Reflect.set) {
  55960. set = Reflect.set;
  55961. } else {
  55962. set = function set(target, property, value, receiver) {
  55963. var base = superPropBase(target, property);
  55964. var desc;
  55965. if (base) {
  55966. desc = Object.getOwnPropertyDescriptor(base, property);
  55967. if (desc.set) {
  55968. desc.set.call(receiver, value);
  55969. return true;
  55970. } else if (!desc.writable) {
  55971. // Both getter and non-writable fall into this.
  55972. return false;
  55973. }
  55974. }
  55975. // Without a super that defines the property, spec boils down to
  55976. // "define on receiver" for some reason.
  55977. desc = Object.getOwnPropertyDescriptor(receiver, property);
  55978. if (desc) {
  55979. if (!desc.writable) {
  55980. // Setter, getter, and non-writable fall into this.
  55981. return false;
  55982. }
  55983. desc.value = value;
  55984. Object.defineProperty(receiver, property, desc);
  55985. } else {
  55986. // Avoid setters that may be defined on Sub's prototype, but not on
  55987. // the instance.
  55988. defineProperty(receiver, property, value);
  55989. }
  55990. return true;
  55991. };
  55992. }
  55993. return set(target, property, value, receiver);
  55994. }
  55995. export default function _set(target, property, value, receiver, isStrict) {
  55996. var s = set(target, property, value, receiver || target);
  55997. if (!s && isStrict) {
  55998. throw new TypeError('failed to set property');
  55999. }
  56000. return value;
  56001. }
  56002. `;
  56003. helpers.taggedTemplateLiteral = helper("7.0.0-beta.0")`
  56004. export default function _taggedTemplateLiteral(strings, raw) {
  56005. if (!raw) { raw = strings.slice(0); }
  56006. return Object.freeze(Object.defineProperties(strings, {
  56007. raw: { value: Object.freeze(raw) }
  56008. }));
  56009. }
  56010. `;
  56011. helpers.taggedTemplateLiteralLoose = helper("7.0.0-beta.0")`
  56012. export default function _taggedTemplateLiteralLoose(strings, raw) {
  56013. if (!raw) { raw = strings.slice(0); }
  56014. strings.raw = raw;
  56015. return strings;
  56016. }
  56017. `;
  56018. helpers.readOnlyError = helper("7.0.0-beta.0")`
  56019. export default function _readOnlyError(name) {
  56020. throw new TypeError("\\"" + name + "\\" is read-only");
  56021. }
  56022. `;
  56023. helpers.writeOnlyError = helper("7.12.13")`
  56024. export default function _writeOnlyError(name) {
  56025. throw new TypeError("\\"" + name + "\\" is write-only");
  56026. }
  56027. `;
  56028. helpers.classNameTDZError = helper("7.0.0-beta.0")`
  56029. export default function _classNameTDZError(name) {
  56030. throw new ReferenceError("Class \\"" + name + "\\" cannot be referenced in computed property keys.");
  56031. }
  56032. `;
  56033. helpers.temporalUndefined = helper("7.0.0-beta.0")`
  56034. // This function isn't mean to be called, but to be used as a reference.
  56035. // We can't use a normal object because it isn't hoisted.
  56036. export default function _temporalUndefined() {}
  56037. `;
  56038. helpers.tdz = helper("7.5.5")`
  56039. export default function _tdzError(name) {
  56040. throw new ReferenceError(name + " is not defined - temporal dead zone");
  56041. }
  56042. `;
  56043. helpers.temporalRef = helper("7.0.0-beta.0")`
  56044. import undef from "temporalUndefined";
  56045. import err from "tdz";
  56046. export default function _temporalRef(val, name) {
  56047. return val === undef ? err(name) : val;
  56048. }
  56049. `;
  56050. helpers.slicedToArray = helper("7.0.0-beta.0")`
  56051. import arrayWithHoles from "arrayWithHoles";
  56052. import iterableToArrayLimit from "iterableToArrayLimit";
  56053. import unsupportedIterableToArray from "unsupportedIterableToArray";
  56054. import nonIterableRest from "nonIterableRest";
  56055. export default function _slicedToArray(arr, i) {
  56056. return (
  56057. arrayWithHoles(arr) ||
  56058. iterableToArrayLimit(arr, i) ||
  56059. unsupportedIterableToArray(arr, i) ||
  56060. nonIterableRest()
  56061. );
  56062. }
  56063. `;
  56064. helpers.slicedToArrayLoose = helper("7.0.0-beta.0")`
  56065. import arrayWithHoles from "arrayWithHoles";
  56066. import iterableToArrayLimitLoose from "iterableToArrayLimitLoose";
  56067. import unsupportedIterableToArray from "unsupportedIterableToArray";
  56068. import nonIterableRest from "nonIterableRest";
  56069. export default function _slicedToArrayLoose(arr, i) {
  56070. return (
  56071. arrayWithHoles(arr) ||
  56072. iterableToArrayLimitLoose(arr, i) ||
  56073. unsupportedIterableToArray(arr, i) ||
  56074. nonIterableRest()
  56075. );
  56076. }
  56077. `;
  56078. helpers.toArray = helper("7.0.0-beta.0")`
  56079. import arrayWithHoles from "arrayWithHoles";
  56080. import iterableToArray from "iterableToArray";
  56081. import unsupportedIterableToArray from "unsupportedIterableToArray";
  56082. import nonIterableRest from "nonIterableRest";
  56083. export default function _toArray(arr) {
  56084. return (
  56085. arrayWithHoles(arr) ||
  56086. iterableToArray(arr) ||
  56087. unsupportedIterableToArray(arr) ||
  56088. nonIterableRest()
  56089. );
  56090. }
  56091. `;
  56092. helpers.toConsumableArray = helper("7.0.0-beta.0")`
  56093. import arrayWithoutHoles from "arrayWithoutHoles";
  56094. import iterableToArray from "iterableToArray";
  56095. import unsupportedIterableToArray from "unsupportedIterableToArray";
  56096. import nonIterableSpread from "nonIterableSpread";
  56097. export default function _toConsumableArray(arr) {
  56098. return (
  56099. arrayWithoutHoles(arr) ||
  56100. iterableToArray(arr) ||
  56101. unsupportedIterableToArray(arr) ||
  56102. nonIterableSpread()
  56103. );
  56104. }
  56105. `;
  56106. helpers.arrayWithoutHoles = helper("7.0.0-beta.0")`
  56107. import arrayLikeToArray from "arrayLikeToArray";
  56108. export default function _arrayWithoutHoles(arr) {
  56109. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  56110. }
  56111. `;
  56112. helpers.arrayWithHoles = helper("7.0.0-beta.0")`
  56113. export default function _arrayWithHoles(arr) {
  56114. if (Array.isArray(arr)) return arr;
  56115. }
  56116. `;
  56117. helpers.maybeArrayLike = helper("7.9.0")`
  56118. import arrayLikeToArray from "arrayLikeToArray";
  56119. export default function _maybeArrayLike(next, arr, i) {
  56120. if (arr && !Array.isArray(arr) && typeof arr.length === "number") {
  56121. var len = arr.length;
  56122. return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len);
  56123. }
  56124. return next(arr, i);
  56125. }
  56126. `;
  56127. helpers.iterableToArray = helper("7.0.0-beta.0")`
  56128. export default function _iterableToArray(iter) {
  56129. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  56130. }
  56131. `;
  56132. helpers.unsupportedIterableToArray = helper("7.9.0")`
  56133. import arrayLikeToArray from "arrayLikeToArray";
  56134. export default function _unsupportedIterableToArray(o, minLen) {
  56135. if (!o) return;
  56136. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  56137. var n = Object.prototype.toString.call(o).slice(8, -1);
  56138. if (n === "Object" && o.constructor) n = o.constructor.name;
  56139. if (n === "Map" || n === "Set") return Array.from(o);
  56140. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
  56141. return arrayLikeToArray(o, minLen);
  56142. }
  56143. `;
  56144. helpers.arrayLikeToArray = helper("7.9.0")`
  56145. export default function _arrayLikeToArray(arr, len) {
  56146. if (len == null || len > arr.length) len = arr.length;
  56147. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  56148. return arr2;
  56149. }
  56150. `;
  56151. helpers.nonIterableSpread = helper("7.0.0-beta.0")`
  56152. export default function _nonIterableSpread() {
  56153. throw new TypeError(
  56154. "Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
  56155. );
  56156. }
  56157. `;
  56158. helpers.nonIterableRest = helper("7.0.0-beta.0")`
  56159. export default function _nonIterableRest() {
  56160. throw new TypeError(
  56161. "Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
  56162. );
  56163. }
  56164. `;
  56165. helpers.createForOfIteratorHelper = helper("7.9.0")`
  56166. import unsupportedIterableToArray from "unsupportedIterableToArray";
  56167. // s: start (create the iterator)
  56168. // n: next
  56169. // e: error (called whenever something throws)
  56170. // f: finish (always called at the end)
  56171. export default function _createForOfIteratorHelper(o, allowArrayLike) {
  56172. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  56173. if (!it) {
  56174. // Fallback for engines without symbol support
  56175. if (
  56176. Array.isArray(o) ||
  56177. (it = unsupportedIterableToArray(o)) ||
  56178. (allowArrayLike && o && typeof o.length === "number")
  56179. ) {
  56180. if (it) o = it;
  56181. var i = 0;
  56182. var F = function(){};
  56183. return {
  56184. s: F,
  56185. n: function() {
  56186. if (i >= o.length) return { done: true };
  56187. return { done: false, value: o[i++] };
  56188. },
  56189. e: function(e) { throw e; },
  56190. f: F,
  56191. };
  56192. }
  56193. throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  56194. }
  56195. var normalCompletion = true, didErr = false, err;
  56196. return {
  56197. s: function() {
  56198. it = it.call(o);
  56199. },
  56200. n: function() {
  56201. var step = it.next();
  56202. normalCompletion = step.done;
  56203. return step;
  56204. },
  56205. e: function(e) {
  56206. didErr = true;
  56207. err = e;
  56208. },
  56209. f: function() {
  56210. try {
  56211. if (!normalCompletion && it.return != null) it.return();
  56212. } finally {
  56213. if (didErr) throw err;
  56214. }
  56215. }
  56216. };
  56217. }
  56218. `;
  56219. helpers.createForOfIteratorHelperLoose = helper("7.9.0")`
  56220. import unsupportedIterableToArray from "unsupportedIterableToArray";
  56221. export default function _createForOfIteratorHelperLoose(o, allowArrayLike) {
  56222. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  56223. if (it) return (it = it.call(o)).next.bind(it);
  56224. // Fallback for engines without symbol support
  56225. if (
  56226. Array.isArray(o) ||
  56227. (it = unsupportedIterableToArray(o)) ||
  56228. (allowArrayLike && o && typeof o.length === "number")
  56229. ) {
  56230. if (it) o = it;
  56231. var i = 0;
  56232. return function() {
  56233. if (i >= o.length) return { done: true };
  56234. return { done: false, value: o[i++] };
  56235. }
  56236. }
  56237. throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  56238. }
  56239. `;
  56240. helpers.skipFirstGeneratorNext = helper("7.0.0-beta.0")`
  56241. export default function _skipFirstGeneratorNext(fn) {
  56242. return function () {
  56243. var it = fn.apply(this, arguments);
  56244. it.next();
  56245. return it;
  56246. }
  56247. }
  56248. `;
  56249. helpers.toPrimitive = helper("7.1.5")`
  56250. export default function _toPrimitive(
  56251. input,
  56252. hint /*: "default" | "string" | "number" | void */
  56253. ) {
  56254. if (typeof input !== "object" || input === null) return input;
  56255. var prim = input[Symbol.toPrimitive];
  56256. if (prim !== undefined) {
  56257. var res = prim.call(input, hint || "default");
  56258. if (typeof res !== "object") return res;
  56259. throw new TypeError("@@toPrimitive must return a primitive value.");
  56260. }
  56261. return (hint === "string" ? String : Number)(input);
  56262. }
  56263. `;
  56264. helpers.toPropertyKey = helper("7.1.5")`
  56265. import toPrimitive from "toPrimitive";
  56266. export default function _toPropertyKey(arg) {
  56267. var key = toPrimitive(arg, "string");
  56268. return typeof key === "symbol" ? key : String(key);
  56269. }
  56270. `;
  56271. helpers.initializerWarningHelper = helper("7.0.0-beta.0")`
  56272. export default function _initializerWarningHelper(descriptor, context){
  56273. throw new Error(
  56274. 'Decorating class property failed. Please ensure that ' +
  56275. 'proposal-class-properties is enabled and runs after the decorators transform.'
  56276. );
  56277. }
  56278. `;
  56279. helpers.initializerDefineProperty = helper("7.0.0-beta.0")`
  56280. export default function _initializerDefineProperty(target, property, descriptor, context){
  56281. if (!descriptor) return;
  56282. Object.defineProperty(target, property, {
  56283. enumerable: descriptor.enumerable,
  56284. configurable: descriptor.configurable,
  56285. writable: descriptor.writable,
  56286. value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,
  56287. });
  56288. }
  56289. `;
  56290. helpers.applyDecoratedDescriptor = helper("7.0.0-beta.0")`
  56291. export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){
  56292. var desc = {};
  56293. Object.keys(descriptor).forEach(function(key){
  56294. desc[key] = descriptor[key];
  56295. });
  56296. desc.enumerable = !!desc.enumerable;
  56297. desc.configurable = !!desc.configurable;
  56298. if ('value' in desc || desc.initializer){
  56299. desc.writable = true;
  56300. }
  56301. desc = decorators.slice().reverse().reduce(function(desc, decorator){
  56302. return decorator(target, property, desc) || desc;
  56303. }, desc);
  56304. if (context && desc.initializer !== void 0){
  56305. desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
  56306. desc.initializer = undefined;
  56307. }
  56308. if (desc.initializer === void 0){
  56309. Object.defineProperty(target, property, desc);
  56310. desc = null;
  56311. }
  56312. return desc;
  56313. }
  56314. `;
  56315. helpers.classPrivateFieldLooseKey = helper("7.0.0-beta.0")`
  56316. var id = 0;
  56317. export default function _classPrivateFieldKey(name) {
  56318. return "__private_" + (id++) + "_" + name;
  56319. }
  56320. `;
  56321. helpers.classPrivateFieldLooseBase = helper("7.0.0-beta.0")`
  56322. export default function _classPrivateFieldBase(receiver, privateKey) {
  56323. if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
  56324. throw new TypeError("attempted to use private field on non-instance");
  56325. }
  56326. return receiver;
  56327. }
  56328. `;
  56329. helpers.classPrivateFieldGet = helper("7.0.0-beta.0")`
  56330. import classApplyDescriptorGet from "classApplyDescriptorGet";
  56331. import classExtractFieldDescriptor from "classExtractFieldDescriptor";
  56332. export default function _classPrivateFieldGet(receiver, privateMap) {
  56333. var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get");
  56334. return classApplyDescriptorGet(receiver, descriptor);
  56335. }
  56336. `;
  56337. helpers.classPrivateFieldSet = helper("7.0.0-beta.0")`
  56338. import classApplyDescriptorSet from "classApplyDescriptorSet";
  56339. import classExtractFieldDescriptor from "classExtractFieldDescriptor";
  56340. export default function _classPrivateFieldSet(receiver, privateMap, value) {
  56341. var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
  56342. classApplyDescriptorSet(receiver, descriptor, value);
  56343. return value;
  56344. }
  56345. `;
  56346. helpers.classPrivateFieldDestructureSet = helper("7.4.4")`
  56347. import classApplyDescriptorDestructureSet from "classApplyDescriptorDestructureSet";
  56348. import classExtractFieldDescriptor from "classExtractFieldDescriptor";
  56349. export default function _classPrivateFieldDestructureSet(receiver, privateMap) {
  56350. var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
  56351. return classApplyDescriptorDestructureSet(receiver, descriptor);
  56352. }
  56353. `;
  56354. helpers.classExtractFieldDescriptor = helper("7.13.10")`
  56355. export default function _classExtractFieldDescriptor(receiver, privateMap, action) {
  56356. if (!privateMap.has(receiver)) {
  56357. throw new TypeError("attempted to " + action + " private field on non-instance");
  56358. }
  56359. return privateMap.get(receiver);
  56360. }
  56361. `;
  56362. helpers.classStaticPrivateFieldSpecGet = helper("7.0.2")`
  56363. import classApplyDescriptorGet from "classApplyDescriptorGet";
  56364. import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
  56365. import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
  56366. export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
  56367. classCheckPrivateStaticAccess(receiver, classConstructor);
  56368. classCheckPrivateStaticFieldDescriptor(descriptor, "get");
  56369. return classApplyDescriptorGet(receiver, descriptor);
  56370. }
  56371. `;
  56372. helpers.classStaticPrivateFieldSpecSet = helper("7.0.2")`
  56373. import classApplyDescriptorSet from "classApplyDescriptorSet";
  56374. import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
  56375. import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
  56376. export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
  56377. classCheckPrivateStaticAccess(receiver, classConstructor);
  56378. classCheckPrivateStaticFieldDescriptor(descriptor, "set");
  56379. classApplyDescriptorSet(receiver, descriptor, value);
  56380. return value;
  56381. }
  56382. `;
  56383. helpers.classStaticPrivateMethodGet = helper("7.3.2")`
  56384. import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
  56385. export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
  56386. classCheckPrivateStaticAccess(receiver, classConstructor);
  56387. return method;
  56388. }
  56389. `;
  56390. helpers.classStaticPrivateMethodSet = helper("7.3.2")`
  56391. export default function _classStaticPrivateMethodSet() {
  56392. throw new TypeError("attempted to set read only static private field");
  56393. }
  56394. `;
  56395. helpers.classApplyDescriptorGet = helper("7.13.10")`
  56396. export default function _classApplyDescriptorGet(receiver, descriptor) {
  56397. if (descriptor.get) {
  56398. return descriptor.get.call(receiver);
  56399. }
  56400. return descriptor.value;
  56401. }
  56402. `;
  56403. helpers.classApplyDescriptorSet = helper("7.13.10")`
  56404. export default function _classApplyDescriptorSet(receiver, descriptor, value) {
  56405. if (descriptor.set) {
  56406. descriptor.set.call(receiver, value);
  56407. } else {
  56408. if (!descriptor.writable) {
  56409. // This should only throw in strict mode, but class bodies are
  56410. // always strict and private fields can only be used inside
  56411. // class bodies.
  56412. throw new TypeError("attempted to set read only private field");
  56413. }
  56414. descriptor.value = value;
  56415. }
  56416. }
  56417. `;
  56418. helpers.classApplyDescriptorDestructureSet = helper("7.13.10")`
  56419. export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {
  56420. if (descriptor.set) {
  56421. if (!("__destrObj" in descriptor)) {
  56422. descriptor.__destrObj = {
  56423. set value(v) {
  56424. descriptor.set.call(receiver, v)
  56425. },
  56426. };
  56427. }
  56428. return descriptor.__destrObj;
  56429. } else {
  56430. if (!descriptor.writable) {
  56431. // This should only throw in strict mode, but class bodies are
  56432. // always strict and private fields can only be used inside
  56433. // class bodies.
  56434. throw new TypeError("attempted to set read only private field");
  56435. }
  56436. return descriptor;
  56437. }
  56438. }
  56439. `;
  56440. helpers.classStaticPrivateFieldDestructureSet = helper("7.13.10")`
  56441. import classApplyDescriptorDestructureSet from "classApplyDescriptorDestructureSet";
  56442. import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
  56443. import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
  56444. export default function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {
  56445. classCheckPrivateStaticAccess(receiver, classConstructor);
  56446. classCheckPrivateStaticFieldDescriptor(descriptor, "set");
  56447. return classApplyDescriptorDestructureSet(receiver, descriptor);
  56448. }
  56449. `;
  56450. helpers.classCheckPrivateStaticAccess = helper("7.13.10")`
  56451. export default function _classCheckPrivateStaticAccess(receiver, classConstructor) {
  56452. if (receiver !== classConstructor) {
  56453. throw new TypeError("Private static access of wrong provenance");
  56454. }
  56455. }
  56456. `;
  56457. helpers.classCheckPrivateStaticFieldDescriptor = helper("7.13.10")`
  56458. export default function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
  56459. if (descriptor === undefined) {
  56460. throw new TypeError("attempted to " + action + " private static field before its declaration");
  56461. }
  56462. }
  56463. `;
  56464. helpers.decorate = helper("7.1.5")`
  56465. import toArray from "toArray";
  56466. import toPropertyKey from "toPropertyKey";
  56467. // These comments are stripped by @babel/template
  56468. /*::
  56469. type PropertyDescriptor =
  56470. | {
  56471. value: any,
  56472. writable: boolean,
  56473. configurable: boolean,
  56474. enumerable: boolean,
  56475. }
  56476. | {
  56477. get?: () => any,
  56478. set?: (v: any) => void,
  56479. configurable: boolean,
  56480. enumerable: boolean,
  56481. };
  56482. type FieldDescriptor ={
  56483. writable: boolean,
  56484. configurable: boolean,
  56485. enumerable: boolean,
  56486. };
  56487. type Placement = "static" | "prototype" | "own";
  56488. type Key = string | symbol; // PrivateName is not supported yet.
  56489. type ElementDescriptor =
  56490. | {
  56491. kind: "method",
  56492. key: Key,
  56493. placement: Placement,
  56494. descriptor: PropertyDescriptor
  56495. }
  56496. | {
  56497. kind: "field",
  56498. key: Key,
  56499. placement: Placement,
  56500. descriptor: FieldDescriptor,
  56501. initializer?: () => any,
  56502. };
  56503. // This is exposed to the user code
  56504. type ElementObjectInput = ElementDescriptor & {
  56505. [@@toStringTag]?: "Descriptor"
  56506. };
  56507. // This is exposed to the user code
  56508. type ElementObjectOutput = ElementDescriptor & {
  56509. [@@toStringTag]?: "Descriptor"
  56510. extras?: ElementDescriptor[],
  56511. finisher?: ClassFinisher,
  56512. };
  56513. // This is exposed to the user code
  56514. type ClassObject = {
  56515. [@@toStringTag]?: "Descriptor",
  56516. kind: "class",
  56517. elements: ElementDescriptor[],
  56518. };
  56519. type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput;
  56520. type ClassDecorator = (descriptor: ClassObject) => ?ClassObject;
  56521. type ClassFinisher = <A, B>(cl: Class<A>) => Class<B>;
  56522. // Only used by Babel in the transform output, not part of the spec.
  56523. type ElementDefinition =
  56524. | {
  56525. kind: "method",
  56526. value: any,
  56527. key: Key,
  56528. static?: boolean,
  56529. decorators?: ElementDecorator[],
  56530. }
  56531. | {
  56532. kind: "field",
  56533. value: () => any,
  56534. key: Key,
  56535. static?: boolean,
  56536. decorators?: ElementDecorator[],
  56537. };
  56538. declare function ClassFactory<C>(initialize: (instance: C) => void): {
  56539. F: Class<C>,
  56540. d: ElementDefinition[]
  56541. }
  56542. */
  56543. /*::
  56544. // Various combinations with/without extras and with one or many finishers
  56545. type ElementFinisherExtras = {
  56546. element: ElementDescriptor,
  56547. finisher?: ClassFinisher,
  56548. extras?: ElementDescriptor[],
  56549. };
  56550. type ElementFinishersExtras = {
  56551. element: ElementDescriptor,
  56552. finishers: ClassFinisher[],
  56553. extras: ElementDescriptor[],
  56554. };
  56555. type ElementsFinisher = {
  56556. elements: ElementDescriptor[],
  56557. finisher?: ClassFinisher,
  56558. };
  56559. type ElementsFinishers = {
  56560. elements: ElementDescriptor[],
  56561. finishers: ClassFinisher[],
  56562. };
  56563. */
  56564. /*::
  56565. type Placements = {
  56566. static: Key[],
  56567. prototype: Key[],
  56568. own: Key[],
  56569. };
  56570. */
  56571. // ClassDefinitionEvaluation (Steps 26-*)
  56572. export default function _decorate(
  56573. decorators /*: ClassDecorator[] */,
  56574. factory /*: ClassFactory */,
  56575. superClass /*: ?Class<*> */,
  56576. mixins /*: ?Array<Function> */,
  56577. ) /*: Class<*> */ {
  56578. var api = _getDecoratorsApi();
  56579. if (mixins) {
  56580. for (var i = 0; i < mixins.length; i++) {
  56581. api = mixins[i](api);
  56582. }
  56583. }
  56584. var r = factory(function initialize(O) {
  56585. api.initializeInstanceElements(O, decorated.elements);
  56586. }, superClass);
  56587. var decorated = api.decorateClass(
  56588. _coalesceClassElements(r.d.map(_createElementDescriptor)),
  56589. decorators,
  56590. );
  56591. api.initializeClassElements(r.F, decorated.elements);
  56592. return api.runClassFinishers(r.F, decorated.finishers);
  56593. }
  56594. function _getDecoratorsApi() {
  56595. _getDecoratorsApi = function() {
  56596. return api;
  56597. };
  56598. var api = {
  56599. elementsDefinitionOrder: [["method"], ["field"]],
  56600. // InitializeInstanceElements
  56601. initializeInstanceElements: function(
  56602. /*::<C>*/ O /*: C */,
  56603. elements /*: ElementDescriptor[] */,
  56604. ) {
  56605. ["method", "field"].forEach(function(kind) {
  56606. elements.forEach(function(element /*: ElementDescriptor */) {
  56607. if (element.kind === kind && element.placement === "own") {
  56608. this.defineClassElement(O, element);
  56609. }
  56610. }, this);
  56611. }, this);
  56612. },
  56613. // InitializeClassElements
  56614. initializeClassElements: function(
  56615. /*::<C>*/ F /*: Class<C> */,
  56616. elements /*: ElementDescriptor[] */,
  56617. ) {
  56618. var proto = F.prototype;
  56619. ["method", "field"].forEach(function(kind) {
  56620. elements.forEach(function(element /*: ElementDescriptor */) {
  56621. var placement = element.placement;
  56622. if (
  56623. element.kind === kind &&
  56624. (placement === "static" || placement === "prototype")
  56625. ) {
  56626. var receiver = placement === "static" ? F : proto;
  56627. this.defineClassElement(receiver, element);
  56628. }
  56629. }, this);
  56630. }, this);
  56631. },
  56632. // DefineClassElement
  56633. defineClassElement: function(
  56634. /*::<C>*/ receiver /*: C | Class<C> */,
  56635. element /*: ElementDescriptor */,
  56636. ) {
  56637. var descriptor /*: PropertyDescriptor */ = element.descriptor;
  56638. if (element.kind === "field") {
  56639. var initializer = element.initializer;
  56640. descriptor = {
  56641. enumerable: descriptor.enumerable,
  56642. writable: descriptor.writable,
  56643. configurable: descriptor.configurable,
  56644. value: initializer === void 0 ? void 0 : initializer.call(receiver),
  56645. };
  56646. }
  56647. Object.defineProperty(receiver, element.key, descriptor);
  56648. },
  56649. // DecorateClass
  56650. decorateClass: function(
  56651. elements /*: ElementDescriptor[] */,
  56652. decorators /*: ClassDecorator[] */,
  56653. ) /*: ElementsFinishers */ {
  56654. var newElements /*: ElementDescriptor[] */ = [];
  56655. var finishers /*: ClassFinisher[] */ = [];
  56656. var placements /*: Placements */ = {
  56657. static: [],
  56658. prototype: [],
  56659. own: [],
  56660. };
  56661. elements.forEach(function(element /*: ElementDescriptor */) {
  56662. this.addElementPlacement(element, placements);
  56663. }, this);
  56664. elements.forEach(function(element /*: ElementDescriptor */) {
  56665. if (!_hasDecorators(element)) return newElements.push(element);
  56666. var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement(
  56667. element,
  56668. placements,
  56669. );
  56670. newElements.push(elementFinishersExtras.element);
  56671. newElements.push.apply(newElements, elementFinishersExtras.extras);
  56672. finishers.push.apply(finishers, elementFinishersExtras.finishers);
  56673. }, this);
  56674. if (!decorators) {
  56675. return { elements: newElements, finishers: finishers };
  56676. }
  56677. var result /*: ElementsFinishers */ = this.decorateConstructor(
  56678. newElements,
  56679. decorators,
  56680. );
  56681. finishers.push.apply(finishers, result.finishers);
  56682. result.finishers = finishers;
  56683. return result;
  56684. },
  56685. // AddElementPlacement
  56686. addElementPlacement: function(
  56687. element /*: ElementDescriptor */,
  56688. placements /*: Placements */,
  56689. silent /*: boolean */,
  56690. ) {
  56691. var keys = placements[element.placement];
  56692. if (!silent && keys.indexOf(element.key) !== -1) {
  56693. throw new TypeError("Duplicated element (" + element.key + ")");
  56694. }
  56695. keys.push(element.key);
  56696. },
  56697. // DecorateElement
  56698. decorateElement: function(
  56699. element /*: ElementDescriptor */,
  56700. placements /*: Placements */,
  56701. ) /*: ElementFinishersExtras */ {
  56702. var extras /*: ElementDescriptor[] */ = [];
  56703. var finishers /*: ClassFinisher[] */ = [];
  56704. for (
  56705. var decorators = element.decorators, i = decorators.length - 1;
  56706. i >= 0;
  56707. i--
  56708. ) {
  56709. // (inlined) RemoveElementPlacement
  56710. var keys = placements[element.placement];
  56711. keys.splice(keys.indexOf(element.key), 1);
  56712. var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor(
  56713. element,
  56714. );
  56715. var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras(
  56716. (0, decorators[i])(elementObject) /*: ElementObjectOutput */ ||
  56717. elementObject,
  56718. );
  56719. element = elementFinisherExtras.element;
  56720. this.addElementPlacement(element, placements);
  56721. if (elementFinisherExtras.finisher) {
  56722. finishers.push(elementFinisherExtras.finisher);
  56723. }
  56724. var newExtras /*: ElementDescriptor[] | void */ =
  56725. elementFinisherExtras.extras;
  56726. if (newExtras) {
  56727. for (var j = 0; j < newExtras.length; j++) {
  56728. this.addElementPlacement(newExtras[j], placements);
  56729. }
  56730. extras.push.apply(extras, newExtras);
  56731. }
  56732. }
  56733. return { element: element, finishers: finishers, extras: extras };
  56734. },
  56735. // DecorateConstructor
  56736. decorateConstructor: function(
  56737. elements /*: ElementDescriptor[] */,
  56738. decorators /*: ClassDecorator[] */,
  56739. ) /*: ElementsFinishers */ {
  56740. var finishers /*: ClassFinisher[] */ = [];
  56741. for (var i = decorators.length - 1; i >= 0; i--) {
  56742. var obj /*: ClassObject */ = this.fromClassDescriptor(elements);
  56743. var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor(
  56744. (0, decorators[i])(obj) /*: ClassObject */ || obj,
  56745. );
  56746. if (elementsAndFinisher.finisher !== undefined) {
  56747. finishers.push(elementsAndFinisher.finisher);
  56748. }
  56749. if (elementsAndFinisher.elements !== undefined) {
  56750. elements = elementsAndFinisher.elements;
  56751. for (var j = 0; j < elements.length - 1; j++) {
  56752. for (var k = j + 1; k < elements.length; k++) {
  56753. if (
  56754. elements[j].key === elements[k].key &&
  56755. elements[j].placement === elements[k].placement
  56756. ) {
  56757. throw new TypeError(
  56758. "Duplicated element (" + elements[j].key + ")",
  56759. );
  56760. }
  56761. }
  56762. }
  56763. }
  56764. }
  56765. return { elements: elements, finishers: finishers };
  56766. },
  56767. // FromElementDescriptor
  56768. fromElementDescriptor: function(
  56769. element /*: ElementDescriptor */,
  56770. ) /*: ElementObject */ {
  56771. var obj /*: ElementObject */ = {
  56772. kind: element.kind,
  56773. key: element.key,
  56774. placement: element.placement,
  56775. descriptor: element.descriptor,
  56776. };
  56777. var desc = {
  56778. value: "Descriptor",
  56779. configurable: true,
  56780. };
  56781. Object.defineProperty(obj, Symbol.toStringTag, desc);
  56782. if (element.kind === "field") obj.initializer = element.initializer;
  56783. return obj;
  56784. },
  56785. // ToElementDescriptors
  56786. toElementDescriptors: function(
  56787. elementObjects /*: ElementObject[] */,
  56788. ) /*: ElementDescriptor[] */ {
  56789. if (elementObjects === undefined) return;
  56790. return toArray(elementObjects).map(function(elementObject) {
  56791. var element = this.toElementDescriptor(elementObject);
  56792. this.disallowProperty(elementObject, "finisher", "An element descriptor");
  56793. this.disallowProperty(elementObject, "extras", "An element descriptor");
  56794. return element;
  56795. }, this);
  56796. },
  56797. // ToElementDescriptor
  56798. toElementDescriptor: function(
  56799. elementObject /*: ElementObject */,
  56800. ) /*: ElementDescriptor */ {
  56801. var kind = String(elementObject.kind);
  56802. if (kind !== "method" && kind !== "field") {
  56803. throw new TypeError(
  56804. 'An element descriptor\\'s .kind property must be either "method" or' +
  56805. ' "field", but a decorator created an element descriptor with' +
  56806. ' .kind "' +
  56807. kind +
  56808. '"',
  56809. );
  56810. }
  56811. var key = toPropertyKey(elementObject.key);
  56812. var placement = String(elementObject.placement);
  56813. if (
  56814. placement !== "static" &&
  56815. placement !== "prototype" &&
  56816. placement !== "own"
  56817. ) {
  56818. throw new TypeError(
  56819. 'An element descriptor\\'s .placement property must be one of "static",' +
  56820. ' "prototype" or "own", but a decorator created an element descriptor' +
  56821. ' with .placement "' +
  56822. placement +
  56823. '"',
  56824. );
  56825. }
  56826. var descriptor /*: PropertyDescriptor */ = elementObject.descriptor;
  56827. this.disallowProperty(elementObject, "elements", "An element descriptor");
  56828. var element /*: ElementDescriptor */ = {
  56829. kind: kind,
  56830. key: key,
  56831. placement: placement,
  56832. descriptor: Object.assign({}, descriptor),
  56833. };
  56834. if (kind !== "field") {
  56835. this.disallowProperty(elementObject, "initializer", "A method descriptor");
  56836. } else {
  56837. this.disallowProperty(
  56838. descriptor,
  56839. "get",
  56840. "The property descriptor of a field descriptor",
  56841. );
  56842. this.disallowProperty(
  56843. descriptor,
  56844. "set",
  56845. "The property descriptor of a field descriptor",
  56846. );
  56847. this.disallowProperty(
  56848. descriptor,
  56849. "value",
  56850. "The property descriptor of a field descriptor",
  56851. );
  56852. element.initializer = elementObject.initializer;
  56853. }
  56854. return element;
  56855. },
  56856. toElementFinisherExtras: function(
  56857. elementObject /*: ElementObject */,
  56858. ) /*: ElementFinisherExtras */ {
  56859. var element /*: ElementDescriptor */ = this.toElementDescriptor(
  56860. elementObject,
  56861. );
  56862. var finisher /*: ClassFinisher */ = _optionalCallableProperty(
  56863. elementObject,
  56864. "finisher",
  56865. );
  56866. var extras /*: ElementDescriptors[] */ = this.toElementDescriptors(
  56867. elementObject.extras,
  56868. );
  56869. return { element: element, finisher: finisher, extras: extras };
  56870. },
  56871. // FromClassDescriptor
  56872. fromClassDescriptor: function(
  56873. elements /*: ElementDescriptor[] */,
  56874. ) /*: ClassObject */ {
  56875. var obj = {
  56876. kind: "class",
  56877. elements: elements.map(this.fromElementDescriptor, this),
  56878. };
  56879. var desc = { value: "Descriptor", configurable: true };
  56880. Object.defineProperty(obj, Symbol.toStringTag, desc);
  56881. return obj;
  56882. },
  56883. // ToClassDescriptor
  56884. toClassDescriptor: function(
  56885. obj /*: ClassObject */,
  56886. ) /*: ElementsFinisher */ {
  56887. var kind = String(obj.kind);
  56888. if (kind !== "class") {
  56889. throw new TypeError(
  56890. 'A class descriptor\\'s .kind property must be "class", but a decorator' +
  56891. ' created a class descriptor with .kind "' +
  56892. kind +
  56893. '"',
  56894. );
  56895. }
  56896. this.disallowProperty(obj, "key", "A class descriptor");
  56897. this.disallowProperty(obj, "placement", "A class descriptor");
  56898. this.disallowProperty(obj, "descriptor", "A class descriptor");
  56899. this.disallowProperty(obj, "initializer", "A class descriptor");
  56900. this.disallowProperty(obj, "extras", "A class descriptor");
  56901. var finisher = _optionalCallableProperty(obj, "finisher");
  56902. var elements = this.toElementDescriptors(obj.elements);
  56903. return { elements: elements, finisher: finisher };
  56904. },
  56905. // RunClassFinishers
  56906. runClassFinishers: function(
  56907. constructor /*: Class<*> */,
  56908. finishers /*: ClassFinisher[] */,
  56909. ) /*: Class<*> */ {
  56910. for (var i = 0; i < finishers.length; i++) {
  56911. var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor);
  56912. if (newConstructor !== undefined) {
  56913. // NOTE: This should check if IsConstructor(newConstructor) is false.
  56914. if (typeof newConstructor !== "function") {
  56915. throw new TypeError("Finishers must return a constructor.");
  56916. }
  56917. constructor = newConstructor;
  56918. }
  56919. }
  56920. return constructor;
  56921. },
  56922. disallowProperty: function(obj, name, objectType) {
  56923. if (obj[name] !== undefined) {
  56924. throw new TypeError(objectType + " can't have a ." + name + " property.");
  56925. }
  56926. }
  56927. };
  56928. return api;
  56929. }
  56930. // ClassElementEvaluation
  56931. function _createElementDescriptor(
  56932. def /*: ElementDefinition */,
  56933. ) /*: ElementDescriptor */ {
  56934. var key = toPropertyKey(def.key);
  56935. var descriptor /*: PropertyDescriptor */;
  56936. if (def.kind === "method") {
  56937. descriptor = {
  56938. value: def.value,
  56939. writable: true,
  56940. configurable: true,
  56941. enumerable: false,
  56942. };
  56943. } else if (def.kind === "get") {
  56944. descriptor = { get: def.value, configurable: true, enumerable: false };
  56945. } else if (def.kind === "set") {
  56946. descriptor = { set: def.value, configurable: true, enumerable: false };
  56947. } else if (def.kind === "field") {
  56948. descriptor = { configurable: true, writable: true, enumerable: true };
  56949. }
  56950. var element /*: ElementDescriptor */ = {
  56951. kind: def.kind === "field" ? "field" : "method",
  56952. key: key,
  56953. placement: def.static
  56954. ? "static"
  56955. : def.kind === "field"
  56956. ? "own"
  56957. : "prototype",
  56958. descriptor: descriptor,
  56959. };
  56960. if (def.decorators) element.decorators = def.decorators;
  56961. if (def.kind === "field") element.initializer = def.value;
  56962. return element;
  56963. }
  56964. // CoalesceGetterSetter
  56965. function _coalesceGetterSetter(
  56966. element /*: ElementDescriptor */,
  56967. other /*: ElementDescriptor */,
  56968. ) {
  56969. if (element.descriptor.get !== undefined) {
  56970. other.descriptor.get = element.descriptor.get;
  56971. } else {
  56972. other.descriptor.set = element.descriptor.set;
  56973. }
  56974. }
  56975. // CoalesceClassElements
  56976. function _coalesceClassElements(
  56977. elements /*: ElementDescriptor[] */,
  56978. ) /*: ElementDescriptor[] */ {
  56979. var newElements /*: ElementDescriptor[] */ = [];
  56980. var isSameElement = function(
  56981. other /*: ElementDescriptor */,
  56982. ) /*: boolean */ {
  56983. return (
  56984. other.kind === "method" &&
  56985. other.key === element.key &&
  56986. other.placement === element.placement
  56987. );
  56988. };
  56989. for (var i = 0; i < elements.length; i++) {
  56990. var element /*: ElementDescriptor */ = elements[i];
  56991. var other /*: ElementDescriptor */;
  56992. if (
  56993. element.kind === "method" &&
  56994. (other = newElements.find(isSameElement))
  56995. ) {
  56996. if (
  56997. _isDataDescriptor(element.descriptor) ||
  56998. _isDataDescriptor(other.descriptor)
  56999. ) {
  57000. if (_hasDecorators(element) || _hasDecorators(other)) {
  57001. throw new ReferenceError(
  57002. "Duplicated methods (" + element.key + ") can't be decorated.",
  57003. );
  57004. }
  57005. other.descriptor = element.descriptor;
  57006. } else {
  57007. if (_hasDecorators(element)) {
  57008. if (_hasDecorators(other)) {
  57009. throw new ReferenceError(
  57010. "Decorators can't be placed on different accessors with for " +
  57011. "the same property (" +
  57012. element.key +
  57013. ").",
  57014. );
  57015. }
  57016. other.decorators = element.decorators;
  57017. }
  57018. _coalesceGetterSetter(element, other);
  57019. }
  57020. } else {
  57021. newElements.push(element);
  57022. }
  57023. }
  57024. return newElements;
  57025. }
  57026. function _hasDecorators(element /*: ElementDescriptor */) /*: boolean */ {
  57027. return element.decorators && element.decorators.length;
  57028. }
  57029. function _isDataDescriptor(desc /*: PropertyDescriptor */) /*: boolean */ {
  57030. return (
  57031. desc !== undefined &&
  57032. !(desc.value === undefined && desc.writable === undefined)
  57033. );
  57034. }
  57035. function _optionalCallableProperty /*::<T>*/(
  57036. obj /*: T */,
  57037. name /*: $Keys<T> */,
  57038. ) /*: ?Function */ {
  57039. var value = obj[name];
  57040. if (value !== undefined && typeof value !== "function") {
  57041. throw new TypeError("Expected '" + name + "' to be a function");
  57042. }
  57043. return value;
  57044. }
  57045. `;
  57046. helpers.classPrivateMethodGet = helper("7.1.6")`
  57047. export default function _classPrivateMethodGet(receiver, privateSet, fn) {
  57048. if (!privateSet.has(receiver)) {
  57049. throw new TypeError("attempted to get private field on non-instance");
  57050. }
  57051. return fn;
  57052. }
  57053. `;
  57054. helpers.checkPrivateRedeclaration = helper("7.14.1")`
  57055. export default function _checkPrivateRedeclaration(obj, privateCollection) {
  57056. if (privateCollection.has(obj)) {
  57057. throw new TypeError("Cannot initialize the same private elements twice on an object");
  57058. }
  57059. }
  57060. `;
  57061. helpers.classPrivateFieldInitSpec = helper("7.14.1")`
  57062. import checkPrivateRedeclaration from "checkPrivateRedeclaration";
  57063. export default function _classPrivateFieldInitSpec(obj, privateMap, value) {
  57064. checkPrivateRedeclaration(obj, privateMap);
  57065. privateMap.set(obj, value);
  57066. }
  57067. `;
  57068. helpers.classPrivateMethodInitSpec = helper("7.14.1")`
  57069. import checkPrivateRedeclaration from "checkPrivateRedeclaration";
  57070. export default function _classPrivateMethodInitSpec(obj, privateSet) {
  57071. checkPrivateRedeclaration(obj, privateSet);
  57072. privateSet.add(obj);
  57073. }
  57074. `;
  57075. {
  57076. helpers.classPrivateMethodSet = helper("7.1.6")`
  57077. export default function _classPrivateMethodSet() {
  57078. throw new TypeError("attempted to reassign private method");
  57079. }
  57080. `;
  57081. }
  57082. helpers.identity = helper("7.17.0")`
  57083. export default function _identity(x) {
  57084. return x;
  57085. }
  57086. `;
  57087. }
  57088. });
  57089. // node_modules/@babel/helpers/lib/index.js
  57090. var require_lib14 = __commonJS({
  57091. "node_modules/@babel/helpers/lib/index.js"(exports) {
  57092. "use strict";
  57093. Object.defineProperty(exports, "__esModule", {
  57094. value: true
  57095. });
  57096. exports.default = void 0;
  57097. exports.ensure = ensure;
  57098. exports.get = get;
  57099. exports.getDependencies = getDependencies;
  57100. exports.list = void 0;
  57101. exports.minVersion = minVersion;
  57102. var _traverse = require_lib13();
  57103. var _t = require_lib3();
  57104. var _helpers = require_helpers();
  57105. var {
  57106. assignmentExpression,
  57107. cloneNode,
  57108. expressionStatement,
  57109. file,
  57110. identifier
  57111. } = _t;
  57112. function makePath(path) {
  57113. const parts = [];
  57114. for (; path.parentPath; path = path.parentPath) {
  57115. parts.push(path.key);
  57116. if (path.inList)
  57117. parts.push(path.listKey);
  57118. }
  57119. return parts.reverse().join(".");
  57120. }
  57121. var FileClass = void 0;
  57122. function getHelperMetadata(file2) {
  57123. const globals = /* @__PURE__ */ new Set();
  57124. const localBindingNames = /* @__PURE__ */ new Set();
  57125. const dependencies = /* @__PURE__ */ new Map();
  57126. let exportName;
  57127. let exportPath;
  57128. const exportBindingAssignments = [];
  57129. const importPaths = [];
  57130. const importBindingsReferences = [];
  57131. const dependencyVisitor = {
  57132. ImportDeclaration(child) {
  57133. const name2 = child.node.source.value;
  57134. if (!_helpers.default[name2]) {
  57135. throw child.buildCodeFrameError(`Unknown helper ${name2}`);
  57136. }
  57137. if (child.get("specifiers").length !== 1 || !child.get("specifiers.0").isImportDefaultSpecifier()) {
  57138. throw child.buildCodeFrameError("Helpers can only import a default value");
  57139. }
  57140. const bindingIdentifier = child.node.specifiers[0].local;
  57141. dependencies.set(bindingIdentifier, name2);
  57142. importPaths.push(makePath(child));
  57143. },
  57144. ExportDefaultDeclaration(child) {
  57145. const decl = child.get("declaration");
  57146. if (!decl.isFunctionDeclaration() || !decl.node.id) {
  57147. throw decl.buildCodeFrameError("Helpers can only export named function declarations");
  57148. }
  57149. exportName = decl.node.id.name;
  57150. exportPath = makePath(child);
  57151. },
  57152. ExportAllDeclaration(child) {
  57153. throw child.buildCodeFrameError("Helpers can only export default");
  57154. },
  57155. ExportNamedDeclaration(child) {
  57156. throw child.buildCodeFrameError("Helpers can only export default");
  57157. },
  57158. Statement(child) {
  57159. if (child.isImportDeclaration() || child.isExportDeclaration())
  57160. return;
  57161. child.skip();
  57162. }
  57163. };
  57164. const referenceVisitor = {
  57165. Program(path) {
  57166. const bindings = path.scope.getAllBindings();
  57167. Object.keys(bindings).forEach((name2) => {
  57168. if (name2 === exportName)
  57169. return;
  57170. if (dependencies.has(bindings[name2].identifier))
  57171. return;
  57172. localBindingNames.add(name2);
  57173. });
  57174. },
  57175. ReferencedIdentifier(child) {
  57176. const name2 = child.node.name;
  57177. const binding = child.scope.getBinding(name2);
  57178. if (!binding) {
  57179. globals.add(name2);
  57180. } else if (dependencies.has(binding.identifier)) {
  57181. importBindingsReferences.push(makePath(child));
  57182. }
  57183. },
  57184. AssignmentExpression(child) {
  57185. const left = child.get("left");
  57186. if (!(exportName in left.getBindingIdentifiers()))
  57187. return;
  57188. if (!left.isIdentifier()) {
  57189. throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers");
  57190. }
  57191. const binding = child.scope.getBinding(exportName);
  57192. if (binding != null && binding.scope.path.isProgram()) {
  57193. exportBindingAssignments.push(makePath(child));
  57194. }
  57195. }
  57196. };
  57197. (0, _traverse.default)(file2.ast, dependencyVisitor, file2.scope);
  57198. (0, _traverse.default)(file2.ast, referenceVisitor, file2.scope);
  57199. if (!exportPath)
  57200. throw new Error("Helpers must have a default export.");
  57201. exportBindingAssignments.reverse();
  57202. return {
  57203. globals: Array.from(globals),
  57204. localBindingNames: Array.from(localBindingNames),
  57205. dependencies,
  57206. exportBindingAssignments,
  57207. exportPath,
  57208. exportName,
  57209. importBindingsReferences,
  57210. importPaths
  57211. };
  57212. }
  57213. function permuteHelperAST(file2, metadata, id, localBindings, getDependency) {
  57214. if (localBindings && !id) {
  57215. throw new Error("Unexpected local bindings for module-based helpers.");
  57216. }
  57217. if (!id)
  57218. return;
  57219. const {
  57220. localBindingNames,
  57221. dependencies,
  57222. exportBindingAssignments,
  57223. exportPath,
  57224. exportName,
  57225. importBindingsReferences,
  57226. importPaths
  57227. } = metadata;
  57228. const dependenciesRefs = {};
  57229. dependencies.forEach((name2, id2) => {
  57230. dependenciesRefs[id2.name] = typeof getDependency === "function" && getDependency(name2) || id2;
  57231. });
  57232. const toRename = {};
  57233. const bindings = new Set(localBindings || []);
  57234. localBindingNames.forEach((name2) => {
  57235. let newName = name2;
  57236. while (bindings.has(newName))
  57237. newName = "_" + newName;
  57238. if (newName !== name2)
  57239. toRename[name2] = newName;
  57240. });
  57241. if (id.type === "Identifier" && exportName !== id.name) {
  57242. toRename[exportName] = id.name;
  57243. }
  57244. const {
  57245. path
  57246. } = file2;
  57247. const exp = path.get(exportPath);
  57248. const imps = importPaths.map((p) => path.get(p));
  57249. const impsBindingRefs = importBindingsReferences.map((p) => path.get(p));
  57250. const decl = exp.get("declaration");
  57251. if (id.type === "Identifier") {
  57252. exp.replaceWith(decl);
  57253. } else if (id.type === "MemberExpression") {
  57254. exportBindingAssignments.forEach((assignPath) => {
  57255. const assign = path.get(assignPath);
  57256. assign.replaceWith(assignmentExpression("=", id, assign.node));
  57257. });
  57258. exp.replaceWith(decl);
  57259. path.pushContainer("body", expressionStatement(assignmentExpression("=", id, identifier(exportName))));
  57260. } else {
  57261. throw new Error("Unexpected helper format.");
  57262. }
  57263. Object.keys(toRename).forEach((name2) => {
  57264. path.scope.rename(name2, toRename[name2]);
  57265. });
  57266. for (const path2 of imps)
  57267. path2.remove();
  57268. for (const path2 of impsBindingRefs) {
  57269. const node2 = cloneNode(dependenciesRefs[path2.node.name]);
  57270. path2.replaceWith(node2);
  57271. }
  57272. }
  57273. var helperData = /* @__PURE__ */ Object.create(null);
  57274. function loadHelper(name2) {
  57275. if (!helperData[name2]) {
  57276. const helper = _helpers.default[name2];
  57277. if (!helper) {
  57278. throw Object.assign(new ReferenceError(`Unknown helper ${name2}`), {
  57279. code: "BABEL_HELPER_UNKNOWN",
  57280. helper: name2
  57281. });
  57282. }
  57283. const fn = () => {
  57284. {
  57285. if (!FileClass) {
  57286. const fakeFile = {
  57287. ast: file(helper.ast()),
  57288. path: null
  57289. };
  57290. (0, _traverse.default)(fakeFile.ast, {
  57291. Program: (path) => (fakeFile.path = path).stop()
  57292. });
  57293. return fakeFile;
  57294. }
  57295. }
  57296. return new FileClass({
  57297. filename: `babel-helper://${name2}`
  57298. }, {
  57299. ast: file(helper.ast()),
  57300. code: "[internal Babel helper code]",
  57301. inputMap: null
  57302. });
  57303. };
  57304. let metadata = null;
  57305. helperData[name2] = {
  57306. minVersion: helper.minVersion,
  57307. build(getDependency, id, localBindings) {
  57308. const file2 = fn();
  57309. metadata || (metadata = getHelperMetadata(file2));
  57310. permuteHelperAST(file2, metadata, id, localBindings, getDependency);
  57311. return {
  57312. nodes: file2.ast.program.body,
  57313. globals: metadata.globals
  57314. };
  57315. },
  57316. getDependencies() {
  57317. metadata || (metadata = getHelperMetadata(fn()));
  57318. return Array.from(metadata.dependencies.values());
  57319. }
  57320. };
  57321. }
  57322. return helperData[name2];
  57323. }
  57324. function get(name2, getDependency, id, localBindings) {
  57325. return loadHelper(name2).build(getDependency, id, localBindings);
  57326. }
  57327. function minVersion(name2) {
  57328. return loadHelper(name2).minVersion;
  57329. }
  57330. function getDependencies(name2) {
  57331. return loadHelper(name2).getDependencies();
  57332. }
  57333. function ensure(name2, newFileClass) {
  57334. FileClass || (FileClass = newFileClass);
  57335. loadHelper(name2);
  57336. }
  57337. var list3 = Object.keys(_helpers.default).map((name2) => name2.replace(/^_/, ""));
  57338. exports.list = list3;
  57339. var _default = get;
  57340. exports.default = _default;
  57341. }
  57342. });
  57343. // node_modules/@babel/helper-module-imports/lib/import-builder.js
  57344. var require_import_builder = __commonJS({
  57345. "node_modules/@babel/helper-module-imports/lib/import-builder.js"(exports) {
  57346. "use strict";
  57347. Object.defineProperty(exports, "__esModule", {
  57348. value: true
  57349. });
  57350. exports.default = void 0;
  57351. var _assert = __require("assert");
  57352. var _t = require_lib3();
  57353. var {
  57354. callExpression,
  57355. cloneNode,
  57356. expressionStatement,
  57357. identifier,
  57358. importDeclaration,
  57359. importDefaultSpecifier,
  57360. importNamespaceSpecifier,
  57361. importSpecifier,
  57362. memberExpression,
  57363. stringLiteral: stringLiteral2,
  57364. variableDeclaration,
  57365. variableDeclarator
  57366. } = _t;
  57367. var ImportBuilder = class {
  57368. constructor(importedSource, scope, hub) {
  57369. this._statements = [];
  57370. this._resultName = null;
  57371. this._importedSource = void 0;
  57372. this._scope = scope;
  57373. this._hub = hub;
  57374. this._importedSource = importedSource;
  57375. }
  57376. done() {
  57377. return {
  57378. statements: this._statements,
  57379. resultName: this._resultName
  57380. };
  57381. }
  57382. import() {
  57383. this._statements.push(importDeclaration([], stringLiteral2(this._importedSource)));
  57384. return this;
  57385. }
  57386. require() {
  57387. this._statements.push(expressionStatement(callExpression(identifier("require"), [stringLiteral2(this._importedSource)])));
  57388. return this;
  57389. }
  57390. namespace(name2 = "namespace") {
  57391. const local = this._scope.generateUidIdentifier(name2);
  57392. const statement = this._statements[this._statements.length - 1];
  57393. _assert(statement.type === "ImportDeclaration");
  57394. _assert(statement.specifiers.length === 0);
  57395. statement.specifiers = [importNamespaceSpecifier(local)];
  57396. this._resultName = cloneNode(local);
  57397. return this;
  57398. }
  57399. default(name2) {
  57400. const id = this._scope.generateUidIdentifier(name2);
  57401. const statement = this._statements[this._statements.length - 1];
  57402. _assert(statement.type === "ImportDeclaration");
  57403. _assert(statement.specifiers.length === 0);
  57404. statement.specifiers = [importDefaultSpecifier(id)];
  57405. this._resultName = cloneNode(id);
  57406. return this;
  57407. }
  57408. named(name2, importName) {
  57409. if (importName === "default")
  57410. return this.default(name2);
  57411. const id = this._scope.generateUidIdentifier(name2);
  57412. const statement = this._statements[this._statements.length - 1];
  57413. _assert(statement.type === "ImportDeclaration");
  57414. _assert(statement.specifiers.length === 0);
  57415. statement.specifiers = [importSpecifier(id, identifier(importName))];
  57416. this._resultName = cloneNode(id);
  57417. return this;
  57418. }
  57419. var(name2) {
  57420. const id = this._scope.generateUidIdentifier(name2);
  57421. let statement = this._statements[this._statements.length - 1];
  57422. if (statement.type !== "ExpressionStatement") {
  57423. _assert(this._resultName);
  57424. statement = expressionStatement(this._resultName);
  57425. this._statements.push(statement);
  57426. }
  57427. this._statements[this._statements.length - 1] = variableDeclaration("var", [variableDeclarator(id, statement.expression)]);
  57428. this._resultName = cloneNode(id);
  57429. return this;
  57430. }
  57431. defaultInterop() {
  57432. return this._interop(this._hub.addHelper("interopRequireDefault"));
  57433. }
  57434. wildcardInterop() {
  57435. return this._interop(this._hub.addHelper("interopRequireWildcard"));
  57436. }
  57437. _interop(callee) {
  57438. const statement = this._statements[this._statements.length - 1];
  57439. if (statement.type === "ExpressionStatement") {
  57440. statement.expression = callExpression(callee, [statement.expression]);
  57441. } else if (statement.type === "VariableDeclaration") {
  57442. _assert(statement.declarations.length === 1);
  57443. statement.declarations[0].init = callExpression(callee, [statement.declarations[0].init]);
  57444. } else {
  57445. _assert.fail("Unexpected type.");
  57446. }
  57447. return this;
  57448. }
  57449. prop(name2) {
  57450. const statement = this._statements[this._statements.length - 1];
  57451. if (statement.type === "ExpressionStatement") {
  57452. statement.expression = memberExpression(statement.expression, identifier(name2));
  57453. } else if (statement.type === "VariableDeclaration") {
  57454. _assert(statement.declarations.length === 1);
  57455. statement.declarations[0].init = memberExpression(statement.declarations[0].init, identifier(name2));
  57456. } else {
  57457. _assert.fail("Unexpected type:" + statement.type);
  57458. }
  57459. return this;
  57460. }
  57461. read(name2) {
  57462. this._resultName = memberExpression(this._resultName, identifier(name2));
  57463. }
  57464. };
  57465. exports.default = ImportBuilder;
  57466. }
  57467. });
  57468. // node_modules/@babel/helper-module-imports/lib/is-module.js
  57469. var require_is_module = __commonJS({
  57470. "node_modules/@babel/helper-module-imports/lib/is-module.js"(exports) {
  57471. "use strict";
  57472. Object.defineProperty(exports, "__esModule", {
  57473. value: true
  57474. });
  57475. exports.default = isModule;
  57476. function isModule(path) {
  57477. return path.node.sourceType === "module";
  57478. }
  57479. }
  57480. });
  57481. // node_modules/@babel/helper-module-imports/lib/import-injector.js
  57482. var require_import_injector = __commonJS({
  57483. "node_modules/@babel/helper-module-imports/lib/import-injector.js"(exports) {
  57484. "use strict";
  57485. Object.defineProperty(exports, "__esModule", {
  57486. value: true
  57487. });
  57488. exports.default = void 0;
  57489. var _assert = __require("assert");
  57490. var _t = require_lib3();
  57491. var _importBuilder = require_import_builder();
  57492. var _isModule = require_is_module();
  57493. var {
  57494. numericLiteral,
  57495. sequenceExpression
  57496. } = _t;
  57497. var ImportInjector = class {
  57498. constructor(path, importedSource, opts) {
  57499. this._defaultOpts = {
  57500. importedSource: null,
  57501. importedType: "commonjs",
  57502. importedInterop: "babel",
  57503. importingInterop: "babel",
  57504. ensureLiveReference: false,
  57505. ensureNoContext: false,
  57506. importPosition: "before"
  57507. };
  57508. const programPath = path.find((p) => p.isProgram());
  57509. this._programPath = programPath;
  57510. this._programScope = programPath.scope;
  57511. this._hub = programPath.hub;
  57512. this._defaultOpts = this._applyDefaults(importedSource, opts, true);
  57513. }
  57514. addDefault(importedSourceIn, opts) {
  57515. return this.addNamed("default", importedSourceIn, opts);
  57516. }
  57517. addNamed(importName, importedSourceIn, opts) {
  57518. _assert(typeof importName === "string");
  57519. return this._generateImport(this._applyDefaults(importedSourceIn, opts), importName);
  57520. }
  57521. addNamespace(importedSourceIn, opts) {
  57522. return this._generateImport(this._applyDefaults(importedSourceIn, opts), null);
  57523. }
  57524. addSideEffect(importedSourceIn, opts) {
  57525. return this._generateImport(this._applyDefaults(importedSourceIn, opts), void 0);
  57526. }
  57527. _applyDefaults(importedSource, opts, isInit = false) {
  57528. let newOpts;
  57529. if (typeof importedSource === "string") {
  57530. newOpts = Object.assign({}, this._defaultOpts, {
  57531. importedSource
  57532. }, opts);
  57533. } else {
  57534. _assert(!opts, "Unexpected secondary arguments.");
  57535. newOpts = Object.assign({}, this._defaultOpts, importedSource);
  57536. }
  57537. if (!isInit && opts) {
  57538. if (opts.nameHint !== void 0)
  57539. newOpts.nameHint = opts.nameHint;
  57540. if (opts.blockHoist !== void 0)
  57541. newOpts.blockHoist = opts.blockHoist;
  57542. }
  57543. return newOpts;
  57544. }
  57545. _generateImport(opts, importName) {
  57546. const isDefault = importName === "default";
  57547. const isNamed = !!importName && !isDefault;
  57548. const isNamespace = importName === null;
  57549. const {
  57550. importedSource,
  57551. importedType,
  57552. importedInterop,
  57553. importingInterop,
  57554. ensureLiveReference,
  57555. ensureNoContext,
  57556. nameHint,
  57557. importPosition,
  57558. blockHoist
  57559. } = opts;
  57560. let name2 = nameHint || importName;
  57561. const isMod = (0, _isModule.default)(this._programPath);
  57562. const isModuleForNode = isMod && importingInterop === "node";
  57563. const isModuleForBabel = isMod && importingInterop === "babel";
  57564. if (importPosition === "after" && !isMod) {
  57565. throw new Error(`"importPosition": "after" is only supported in modules`);
  57566. }
  57567. const builder = new _importBuilder.default(importedSource, this._programScope, this._hub);
  57568. if (importedType === "es6") {
  57569. if (!isModuleForNode && !isModuleForBabel) {
  57570. throw new Error("Cannot import an ES6 module from CommonJS");
  57571. }
  57572. builder.import();
  57573. if (isNamespace) {
  57574. builder.namespace(nameHint || importedSource);
  57575. } else if (isDefault || isNamed) {
  57576. builder.named(name2, importName);
  57577. }
  57578. } else if (importedType !== "commonjs") {
  57579. throw new Error(`Unexpected interopType "${importedType}"`);
  57580. } else if (importedInterop === "babel") {
  57581. if (isModuleForNode) {
  57582. name2 = name2 !== "default" ? name2 : importedSource;
  57583. const es6Default = `${importedSource}$es6Default`;
  57584. builder.import();
  57585. if (isNamespace) {
  57586. builder.default(es6Default).var(name2 || importedSource).wildcardInterop();
  57587. } else if (isDefault) {
  57588. if (ensureLiveReference) {
  57589. builder.default(es6Default).var(name2 || importedSource).defaultInterop().read("default");
  57590. } else {
  57591. builder.default(es6Default).var(name2).defaultInterop().prop(importName);
  57592. }
  57593. } else if (isNamed) {
  57594. builder.default(es6Default).read(importName);
  57595. }
  57596. } else if (isModuleForBabel) {
  57597. builder.import();
  57598. if (isNamespace) {
  57599. builder.namespace(name2 || importedSource);
  57600. } else if (isDefault || isNamed) {
  57601. builder.named(name2, importName);
  57602. }
  57603. } else {
  57604. builder.require();
  57605. if (isNamespace) {
  57606. builder.var(name2 || importedSource).wildcardInterop();
  57607. } else if ((isDefault || isNamed) && ensureLiveReference) {
  57608. if (isDefault) {
  57609. name2 = name2 !== "default" ? name2 : importedSource;
  57610. builder.var(name2).read(importName);
  57611. builder.defaultInterop();
  57612. } else {
  57613. builder.var(importedSource).read(importName);
  57614. }
  57615. } else if (isDefault) {
  57616. builder.var(name2).defaultInterop().prop(importName);
  57617. } else if (isNamed) {
  57618. builder.var(name2).prop(importName);
  57619. }
  57620. }
  57621. } else if (importedInterop === "compiled") {
  57622. if (isModuleForNode) {
  57623. builder.import();
  57624. if (isNamespace) {
  57625. builder.default(name2 || importedSource);
  57626. } else if (isDefault || isNamed) {
  57627. builder.default(importedSource).read(name2);
  57628. }
  57629. } else if (isModuleForBabel) {
  57630. builder.import();
  57631. if (isNamespace) {
  57632. builder.namespace(name2 || importedSource);
  57633. } else if (isDefault || isNamed) {
  57634. builder.named(name2, importName);
  57635. }
  57636. } else {
  57637. builder.require();
  57638. if (isNamespace) {
  57639. builder.var(name2 || importedSource);
  57640. } else if (isDefault || isNamed) {
  57641. if (ensureLiveReference) {
  57642. builder.var(importedSource).read(name2);
  57643. } else {
  57644. builder.prop(importName).var(name2);
  57645. }
  57646. }
  57647. }
  57648. } else if (importedInterop === "uncompiled") {
  57649. if (isDefault && ensureLiveReference) {
  57650. throw new Error("No live reference for commonjs default");
  57651. }
  57652. if (isModuleForNode) {
  57653. builder.import();
  57654. if (isNamespace) {
  57655. builder.default(name2 || importedSource);
  57656. } else if (isDefault) {
  57657. builder.default(name2);
  57658. } else if (isNamed) {
  57659. builder.default(importedSource).read(name2);
  57660. }
  57661. } else if (isModuleForBabel) {
  57662. builder.import();
  57663. if (isNamespace) {
  57664. builder.default(name2 || importedSource);
  57665. } else if (isDefault) {
  57666. builder.default(name2);
  57667. } else if (isNamed) {
  57668. builder.named(name2, importName);
  57669. }
  57670. } else {
  57671. builder.require();
  57672. if (isNamespace) {
  57673. builder.var(name2 || importedSource);
  57674. } else if (isDefault) {
  57675. builder.var(name2);
  57676. } else if (isNamed) {
  57677. if (ensureLiveReference) {
  57678. builder.var(importedSource).read(name2);
  57679. } else {
  57680. builder.var(name2).prop(importName);
  57681. }
  57682. }
  57683. }
  57684. } else {
  57685. throw new Error(`Unknown importedInterop "${importedInterop}".`);
  57686. }
  57687. const {
  57688. statements,
  57689. resultName
  57690. } = builder.done();
  57691. this._insertStatements(statements, importPosition, blockHoist);
  57692. if ((isDefault || isNamed) && ensureNoContext && resultName.type !== "Identifier") {
  57693. return sequenceExpression([numericLiteral(0), resultName]);
  57694. }
  57695. return resultName;
  57696. }
  57697. _insertStatements(statements, importPosition = "before", blockHoist = 3) {
  57698. const body = this._programPath.get("body");
  57699. if (importPosition === "after") {
  57700. for (let i = body.length - 1; i >= 0; i--) {
  57701. if (body[i].isImportDeclaration()) {
  57702. body[i].insertAfter(statements);
  57703. return;
  57704. }
  57705. }
  57706. } else {
  57707. statements.forEach((node2) => {
  57708. node2._blockHoist = blockHoist;
  57709. });
  57710. const targetPath = body.find((p) => {
  57711. const val = p.node._blockHoist;
  57712. return Number.isFinite(val) && val < 4;
  57713. });
  57714. if (targetPath) {
  57715. targetPath.insertBefore(statements);
  57716. return;
  57717. }
  57718. }
  57719. this._programPath.unshiftContainer("body", statements);
  57720. }
  57721. };
  57722. exports.default = ImportInjector;
  57723. }
  57724. });
  57725. // node_modules/@babel/helper-module-imports/lib/index.js
  57726. var require_lib15 = __commonJS({
  57727. "node_modules/@babel/helper-module-imports/lib/index.js"(exports) {
  57728. "use strict";
  57729. Object.defineProperty(exports, "__esModule", {
  57730. value: true
  57731. });
  57732. Object.defineProperty(exports, "ImportInjector", {
  57733. enumerable: true,
  57734. get: function() {
  57735. return _importInjector.default;
  57736. }
  57737. });
  57738. exports.addDefault = addDefault;
  57739. exports.addNamed = addNamed;
  57740. exports.addNamespace = addNamespace;
  57741. exports.addSideEffect = addSideEffect;
  57742. Object.defineProperty(exports, "isModule", {
  57743. enumerable: true,
  57744. get: function() {
  57745. return _isModule.default;
  57746. }
  57747. });
  57748. var _importInjector = require_import_injector();
  57749. var _isModule = require_is_module();
  57750. function addDefault(path, importedSource, opts) {
  57751. return new _importInjector.default(path).addDefault(importedSource, opts);
  57752. }
  57753. function addNamed(path, name2, importedSource, opts) {
  57754. return new _importInjector.default(path).addNamed(name2, importedSource, opts);
  57755. }
  57756. function addNamespace(path, importedSource, opts) {
  57757. return new _importInjector.default(path).addNamespace(importedSource, opts);
  57758. }
  57759. function addSideEffect(path, importedSource, opts) {
  57760. return new _importInjector.default(path).addSideEffect(importedSource, opts);
  57761. }
  57762. }
  57763. });
  57764. // node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
  57765. var require_rewrite_this = __commonJS({
  57766. "node_modules/@babel/helper-module-transforms/lib/rewrite-this.js"(exports) {
  57767. "use strict";
  57768. Object.defineProperty(exports, "__esModule", {
  57769. value: true
  57770. });
  57771. exports.default = rewriteThis;
  57772. var _helperEnvironmentVisitor = require_lib6();
  57773. var _traverse = require_lib13();
  57774. var _t = require_lib3();
  57775. var {
  57776. numericLiteral,
  57777. unaryExpression
  57778. } = _t;
  57779. var rewriteThisVisitor = _traverse.default.visitors.merge([_helperEnvironmentVisitor.default, {
  57780. ThisExpression(path) {
  57781. path.replaceWith(unaryExpression("void", numericLiteral(0), true));
  57782. }
  57783. }]);
  57784. function rewriteThis(programPath) {
  57785. (0, _traverse.default)(programPath.node, Object.assign({}, rewriteThisVisitor, {
  57786. noScope: true
  57787. }));
  57788. }
  57789. }
  57790. });
  57791. // node_modules/@babel/helper-simple-access/lib/index.js
  57792. var require_lib16 = __commonJS({
  57793. "node_modules/@babel/helper-simple-access/lib/index.js"(exports) {
  57794. "use strict";
  57795. Object.defineProperty(exports, "__esModule", {
  57796. value: true
  57797. });
  57798. exports.default = simplifyAccess;
  57799. var _t = require_lib3();
  57800. var {
  57801. LOGICAL_OPERATORS,
  57802. assignmentExpression,
  57803. binaryExpression,
  57804. cloneNode,
  57805. identifier,
  57806. logicalExpression,
  57807. numericLiteral,
  57808. sequenceExpression,
  57809. unaryExpression
  57810. } = _t;
  57811. var simpleAssignmentVisitor = {
  57812. UpdateExpression: {
  57813. exit(path) {
  57814. const {
  57815. scope,
  57816. bindingNames,
  57817. includeUpdateExpression
  57818. } = this;
  57819. if (!includeUpdateExpression) {
  57820. return;
  57821. }
  57822. const arg = path.get("argument");
  57823. if (!arg.isIdentifier())
  57824. return;
  57825. const localName = arg.node.name;
  57826. if (!bindingNames.has(localName))
  57827. return;
  57828. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  57829. return;
  57830. }
  57831. if (path.parentPath.isExpressionStatement() && !path.isCompletionRecord()) {
  57832. const operator = path.node.operator == "++" ? "+=" : "-=";
  57833. path.replaceWith(assignmentExpression(operator, arg.node, numericLiteral(1)));
  57834. } else if (path.node.prefix) {
  57835. path.replaceWith(assignmentExpression("=", identifier(localName), binaryExpression(path.node.operator[0], unaryExpression("+", arg.node), numericLiteral(1))));
  57836. } else {
  57837. const old = path.scope.generateUidIdentifierBasedOnNode(arg.node, "old");
  57838. const varName = old.name;
  57839. path.scope.push({
  57840. id: old
  57841. });
  57842. const binary = binaryExpression(
  57843. path.node.operator[0],
  57844. identifier(varName),
  57845. numericLiteral(1)
  57846. );
  57847. path.replaceWith(sequenceExpression([assignmentExpression("=", identifier(varName), unaryExpression("+", arg.node)), assignmentExpression("=", cloneNode(arg.node), binary), identifier(varName)]));
  57848. }
  57849. }
  57850. },
  57851. AssignmentExpression: {
  57852. exit(path) {
  57853. const {
  57854. scope,
  57855. seen,
  57856. bindingNames
  57857. } = this;
  57858. if (path.node.operator === "=")
  57859. return;
  57860. if (seen.has(path.node))
  57861. return;
  57862. seen.add(path.node);
  57863. const left = path.get("left");
  57864. if (!left.isIdentifier())
  57865. return;
  57866. const localName = left.node.name;
  57867. if (!bindingNames.has(localName))
  57868. return;
  57869. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  57870. return;
  57871. }
  57872. const operator = path.node.operator.slice(0, -1);
  57873. if (LOGICAL_OPERATORS.includes(operator)) {
  57874. path.replaceWith(logicalExpression(
  57875. operator,
  57876. path.node.left,
  57877. assignmentExpression("=", cloneNode(path.node.left), path.node.right)
  57878. ));
  57879. } else {
  57880. path.node.right = binaryExpression(
  57881. operator,
  57882. cloneNode(path.node.left),
  57883. path.node.right
  57884. );
  57885. path.node.operator = "=";
  57886. }
  57887. }
  57888. }
  57889. };
  57890. function simplifyAccess(path, bindingNames, includeUpdateExpression = true) {
  57891. path.traverse(simpleAssignmentVisitor, {
  57892. scope: path.scope,
  57893. bindingNames,
  57894. seen: /* @__PURE__ */ new WeakSet(),
  57895. includeUpdateExpression
  57896. });
  57897. }
  57898. }
  57899. });
  57900. // node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js
  57901. var require_rewrite_live_references = __commonJS({
  57902. "node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js"(exports) {
  57903. "use strict";
  57904. Object.defineProperty(exports, "__esModule", {
  57905. value: true
  57906. });
  57907. exports.default = rewriteLiveReferences;
  57908. var _assert = __require("assert");
  57909. var _t = require_lib3();
  57910. var _template = require_lib11();
  57911. var _helperSimpleAccess = require_lib16();
  57912. var {
  57913. assignmentExpression,
  57914. callExpression,
  57915. cloneNode,
  57916. expressionStatement,
  57917. getOuterBindingIdentifiers,
  57918. identifier,
  57919. isMemberExpression: isMemberExpression2,
  57920. isVariableDeclaration: isVariableDeclaration2,
  57921. jsxIdentifier: jsxIdentifier2,
  57922. jsxMemberExpression,
  57923. memberExpression,
  57924. numericLiteral,
  57925. sequenceExpression,
  57926. stringLiteral: stringLiteral2,
  57927. variableDeclaration,
  57928. variableDeclarator
  57929. } = _t;
  57930. function isInType(path) {
  57931. do {
  57932. switch (path.parent.type) {
  57933. case "TSTypeAnnotation":
  57934. case "TSTypeAliasDeclaration":
  57935. case "TSTypeReference":
  57936. case "TypeAnnotation":
  57937. case "TypeAlias":
  57938. return true;
  57939. case "ExportSpecifier":
  57940. return path.parentPath.parent.exportKind === "type";
  57941. default:
  57942. if (path.parentPath.isStatement() || path.parentPath.isExpression()) {
  57943. return false;
  57944. }
  57945. }
  57946. } while (path = path.parentPath);
  57947. }
  57948. function rewriteLiveReferences(programPath, metadata) {
  57949. const imported = /* @__PURE__ */ new Map();
  57950. const exported = /* @__PURE__ */ new Map();
  57951. const requeueInParent = (path) => {
  57952. programPath.requeue(path);
  57953. };
  57954. for (const [source2, data3] of metadata.source) {
  57955. for (const [localName, importName] of data3.imports) {
  57956. imported.set(localName, [source2, importName, null]);
  57957. }
  57958. for (const localName of data3.importsNamespace) {
  57959. imported.set(localName, [source2, null, localName]);
  57960. }
  57961. }
  57962. for (const [local, data3] of metadata.local) {
  57963. let exportMeta = exported.get(local);
  57964. if (!exportMeta) {
  57965. exportMeta = [];
  57966. exported.set(local, exportMeta);
  57967. }
  57968. exportMeta.push(...data3.names);
  57969. }
  57970. const rewriteBindingInitVisitorState = {
  57971. metadata,
  57972. requeueInParent,
  57973. scope: programPath.scope,
  57974. exported
  57975. };
  57976. programPath.traverse(rewriteBindingInitVisitor, rewriteBindingInitVisitorState);
  57977. (0, _helperSimpleAccess.default)(programPath, /* @__PURE__ */ new Set([...Array.from(imported.keys()), ...Array.from(exported.keys())]), false);
  57978. const rewriteReferencesVisitorState = {
  57979. seen: /* @__PURE__ */ new WeakSet(),
  57980. metadata,
  57981. requeueInParent,
  57982. scope: programPath.scope,
  57983. imported,
  57984. exported,
  57985. buildImportReference: ([source2, importName, localName], identNode) => {
  57986. const meta = metadata.source.get(source2);
  57987. meta.referenced = true;
  57988. if (localName) {
  57989. if (meta.lazy) {
  57990. identNode = callExpression(identNode, []);
  57991. }
  57992. return identNode;
  57993. }
  57994. let namespace = identifier(meta.name);
  57995. if (meta.lazy)
  57996. namespace = callExpression(namespace, []);
  57997. if (importName === "default" && meta.interop === "node-default") {
  57998. return namespace;
  57999. }
  58000. const computed = metadata.stringSpecifiers.has(importName);
  58001. return memberExpression(namespace, computed ? stringLiteral2(importName) : identifier(importName), computed);
  58002. }
  58003. };
  58004. programPath.traverse(rewriteReferencesVisitor, rewriteReferencesVisitorState);
  58005. }
  58006. var rewriteBindingInitVisitor = {
  58007. Scope(path) {
  58008. path.skip();
  58009. },
  58010. ClassDeclaration(path) {
  58011. const {
  58012. requeueInParent,
  58013. exported,
  58014. metadata
  58015. } = this;
  58016. const {
  58017. id
  58018. } = path.node;
  58019. if (!id)
  58020. throw new Error("Expected class to have a name");
  58021. const localName = id.name;
  58022. const exportNames = exported.get(localName) || [];
  58023. if (exportNames.length > 0) {
  58024. const statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName), path.scope));
  58025. statement._blockHoist = path.node._blockHoist;
  58026. requeueInParent(path.insertAfter(statement)[0]);
  58027. }
  58028. },
  58029. VariableDeclaration(path) {
  58030. const {
  58031. requeueInParent,
  58032. exported,
  58033. metadata
  58034. } = this;
  58035. Object.keys(path.getOuterBindingIdentifiers()).forEach((localName) => {
  58036. const exportNames = exported.get(localName) || [];
  58037. if (exportNames.length > 0) {
  58038. const statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName), path.scope));
  58039. statement._blockHoist = path.node._blockHoist;
  58040. requeueInParent(path.insertAfter(statement)[0]);
  58041. }
  58042. });
  58043. }
  58044. };
  58045. var buildBindingExportAssignmentExpression = (metadata, exportNames, localExpr, scope) => {
  58046. const exportsObjectName = metadata.exportName;
  58047. for (let currentScope = scope; currentScope != null; currentScope = currentScope.parent) {
  58048. if (currentScope.hasOwnBinding(exportsObjectName)) {
  58049. currentScope.rename(exportsObjectName);
  58050. }
  58051. }
  58052. return (exportNames || []).reduce((expr, exportName) => {
  58053. const {
  58054. stringSpecifiers
  58055. } = metadata;
  58056. const computed = stringSpecifiers.has(exportName);
  58057. return assignmentExpression("=", memberExpression(identifier(exportsObjectName), computed ? stringLiteral2(exportName) : identifier(exportName), computed), expr);
  58058. }, localExpr);
  58059. };
  58060. var buildImportThrow = (localName) => {
  58061. return _template.default.expression.ast`
  58062. (function() {
  58063. throw new Error('"' + '${localName}' + '" is read-only.');
  58064. })()
  58065. `;
  58066. };
  58067. var rewriteReferencesVisitor = {
  58068. ReferencedIdentifier(path) {
  58069. const {
  58070. seen,
  58071. buildImportReference,
  58072. scope,
  58073. imported,
  58074. requeueInParent
  58075. } = this;
  58076. if (seen.has(path.node))
  58077. return;
  58078. seen.add(path.node);
  58079. const localName = path.node.name;
  58080. const importData = imported.get(localName);
  58081. if (importData) {
  58082. if (isInType(path)) {
  58083. throw path.buildCodeFrameError(`Cannot transform the imported binding "${localName}" since it's also used in a type annotation. Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`);
  58084. }
  58085. const localBinding = path.scope.getBinding(localName);
  58086. const rootBinding = scope.getBinding(localName);
  58087. if (rootBinding !== localBinding)
  58088. return;
  58089. const ref3 = buildImportReference(importData, path.node);
  58090. ref3.loc = path.node.loc;
  58091. if ((path.parentPath.isCallExpression({
  58092. callee: path.node
  58093. }) || path.parentPath.isOptionalCallExpression({
  58094. callee: path.node
  58095. }) || path.parentPath.isTaggedTemplateExpression({
  58096. tag: path.node
  58097. })) && isMemberExpression2(ref3)) {
  58098. path.replaceWith(sequenceExpression([numericLiteral(0), ref3]));
  58099. } else if (path.isJSXIdentifier() && isMemberExpression2(ref3)) {
  58100. const {
  58101. object,
  58102. property
  58103. } = ref3;
  58104. path.replaceWith(jsxMemberExpression(jsxIdentifier2(object.name), jsxIdentifier2(property.name)));
  58105. } else {
  58106. path.replaceWith(ref3);
  58107. }
  58108. requeueInParent(path);
  58109. path.skip();
  58110. }
  58111. },
  58112. UpdateExpression(path) {
  58113. const {
  58114. scope,
  58115. seen,
  58116. imported,
  58117. exported,
  58118. requeueInParent,
  58119. buildImportReference
  58120. } = this;
  58121. if (seen.has(path.node))
  58122. return;
  58123. seen.add(path.node);
  58124. const arg = path.get("argument");
  58125. if (arg.isMemberExpression())
  58126. return;
  58127. const update = path.node;
  58128. if (arg.isIdentifier()) {
  58129. const localName = arg.node.name;
  58130. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  58131. return;
  58132. }
  58133. const exportedNames = exported.get(localName);
  58134. const importData = imported.get(localName);
  58135. if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) {
  58136. if (importData) {
  58137. path.replaceWith(assignmentExpression(update.operator[0] + "=", buildImportReference(importData, arg.node), buildImportThrow(localName)));
  58138. } else if (update.prefix) {
  58139. path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, cloneNode(update), path.scope));
  58140. } else {
  58141. const ref3 = scope.generateDeclaredUidIdentifier(localName);
  58142. path.replaceWith(sequenceExpression([assignmentExpression("=", cloneNode(ref3), cloneNode(update)), buildBindingExportAssignmentExpression(this.metadata, exportedNames, identifier(localName), path.scope), cloneNode(ref3)]));
  58143. }
  58144. }
  58145. }
  58146. requeueInParent(path);
  58147. path.skip();
  58148. },
  58149. AssignmentExpression: {
  58150. exit(path) {
  58151. const {
  58152. scope,
  58153. seen,
  58154. imported,
  58155. exported,
  58156. requeueInParent,
  58157. buildImportReference
  58158. } = this;
  58159. if (seen.has(path.node))
  58160. return;
  58161. seen.add(path.node);
  58162. const left = path.get("left");
  58163. if (left.isMemberExpression())
  58164. return;
  58165. if (left.isIdentifier()) {
  58166. const localName = left.node.name;
  58167. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  58168. return;
  58169. }
  58170. const exportedNames = exported.get(localName);
  58171. const importData = imported.get(localName);
  58172. if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) {
  58173. _assert(path.node.operator === "=", "Path was not simplified");
  58174. const assignment = path.node;
  58175. if (importData) {
  58176. assignment.left = buildImportReference(importData, left.node);
  58177. assignment.right = sequenceExpression([assignment.right, buildImportThrow(localName)]);
  58178. }
  58179. path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, assignment, path.scope));
  58180. requeueInParent(path);
  58181. }
  58182. } else {
  58183. const ids = left.getOuterBindingIdentifiers();
  58184. const programScopeIds = Object.keys(ids).filter((localName) => scope.getBinding(localName) === path.scope.getBinding(localName));
  58185. const id = programScopeIds.find((localName) => imported.has(localName));
  58186. if (id) {
  58187. path.node.right = sequenceExpression([path.node.right, buildImportThrow(id)]);
  58188. }
  58189. const items = [];
  58190. programScopeIds.forEach((localName) => {
  58191. const exportedNames = exported.get(localName) || [];
  58192. if (exportedNames.length > 0) {
  58193. items.push(buildBindingExportAssignmentExpression(this.metadata, exportedNames, identifier(localName), path.scope));
  58194. }
  58195. });
  58196. if (items.length > 0) {
  58197. let node2 = sequenceExpression(items);
  58198. if (path.parentPath.isExpressionStatement()) {
  58199. node2 = expressionStatement(node2);
  58200. node2._blockHoist = path.parentPath.node._blockHoist;
  58201. }
  58202. const statement = path.insertAfter(node2)[0];
  58203. requeueInParent(statement);
  58204. }
  58205. }
  58206. }
  58207. },
  58208. "ForOfStatement|ForInStatement"(path) {
  58209. const {
  58210. scope,
  58211. node: node2
  58212. } = path;
  58213. const {
  58214. left
  58215. } = node2;
  58216. const {
  58217. exported,
  58218. imported,
  58219. scope: programScope
  58220. } = this;
  58221. if (!isVariableDeclaration2(left)) {
  58222. let didTransformExport = false, importConstViolationName;
  58223. const loopBodyScope = path.get("body").scope;
  58224. for (const name2 of Object.keys(getOuterBindingIdentifiers(left))) {
  58225. if (programScope.getBinding(name2) === scope.getBinding(name2)) {
  58226. if (exported.has(name2)) {
  58227. didTransformExport = true;
  58228. if (loopBodyScope.hasOwnBinding(name2)) {
  58229. loopBodyScope.rename(name2);
  58230. }
  58231. }
  58232. if (imported.has(name2) && !importConstViolationName) {
  58233. importConstViolationName = name2;
  58234. }
  58235. }
  58236. }
  58237. if (!didTransformExport && !importConstViolationName) {
  58238. return;
  58239. }
  58240. path.ensureBlock();
  58241. const bodyPath = path.get("body");
  58242. const newLoopId = scope.generateUidIdentifierBasedOnNode(left);
  58243. path.get("left").replaceWith(variableDeclaration("let", [variableDeclarator(cloneNode(newLoopId))]));
  58244. scope.registerDeclaration(path.get("left"));
  58245. if (didTransformExport) {
  58246. bodyPath.unshiftContainer("body", expressionStatement(assignmentExpression("=", left, newLoopId)));
  58247. }
  58248. if (importConstViolationName) {
  58249. bodyPath.unshiftContainer("body", expressionStatement(buildImportThrow(importConstViolationName)));
  58250. }
  58251. }
  58252. }
  58253. };
  58254. }
  58255. });
  58256. // node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js
  58257. var require_normalize_and_load_metadata = __commonJS({
  58258. "node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js"(exports) {
  58259. "use strict";
  58260. Object.defineProperty(exports, "__esModule", {
  58261. value: true
  58262. });
  58263. exports.default = normalizeModuleAndLoadMetadata;
  58264. exports.hasExports = hasExports;
  58265. exports.isSideEffectImport = isSideEffectImport;
  58266. exports.validateImportInteropOption = validateImportInteropOption;
  58267. var _path = __require("path");
  58268. var _helperValidatorIdentifier = require_lib();
  58269. var _helperSplitExportDeclaration = require_lib5();
  58270. function hasExports(metadata) {
  58271. return metadata.hasExports;
  58272. }
  58273. function isSideEffectImport(source2) {
  58274. return source2.imports.size === 0 && source2.importsNamespace.size === 0 && source2.reexports.size === 0 && source2.reexportNamespace.size === 0 && !source2.reexportAll;
  58275. }
  58276. function validateImportInteropOption(importInterop) {
  58277. if (typeof importInterop !== "function" && importInterop !== "none" && importInterop !== "babel" && importInterop !== "node") {
  58278. throw new Error(`.importInterop must be one of "none", "babel", "node", or a function returning one of those values (received ${importInterop}).`);
  58279. }
  58280. return importInterop;
  58281. }
  58282. function resolveImportInterop(importInterop, source2, filename) {
  58283. if (typeof importInterop === "function") {
  58284. return validateImportInteropOption(importInterop(source2, filename));
  58285. }
  58286. return importInterop;
  58287. }
  58288. function normalizeModuleAndLoadMetadata(programPath, exportName, {
  58289. importInterop,
  58290. initializeReexports = false,
  58291. lazy = false,
  58292. esNamespaceOnly = false,
  58293. filename
  58294. }) {
  58295. if (!exportName) {
  58296. exportName = programPath.scope.generateUidIdentifier("exports").name;
  58297. }
  58298. const stringSpecifiers = /* @__PURE__ */ new Set();
  58299. nameAnonymousExports(programPath);
  58300. const {
  58301. local,
  58302. sources,
  58303. hasExports: hasExports2
  58304. } = getModuleMetadata(programPath, {
  58305. initializeReexports,
  58306. lazy
  58307. }, stringSpecifiers);
  58308. removeImportExportDeclarations(programPath);
  58309. for (const [source2, metadata] of sources) {
  58310. if (metadata.importsNamespace.size > 0) {
  58311. metadata.name = metadata.importsNamespace.values().next().value;
  58312. }
  58313. const resolvedInterop = resolveImportInterop(importInterop, source2, filename);
  58314. if (resolvedInterop === "none") {
  58315. metadata.interop = "none";
  58316. } else if (resolvedInterop === "node" && metadata.interop === "namespace") {
  58317. metadata.interop = "node-namespace";
  58318. } else if (resolvedInterop === "node" && metadata.interop === "default") {
  58319. metadata.interop = "node-default";
  58320. } else if (esNamespaceOnly && metadata.interop === "namespace") {
  58321. metadata.interop = "default";
  58322. }
  58323. }
  58324. return {
  58325. exportName,
  58326. exportNameListName: null,
  58327. hasExports: hasExports2,
  58328. local,
  58329. source: sources,
  58330. stringSpecifiers
  58331. };
  58332. }
  58333. function getExportSpecifierName(path, stringSpecifiers) {
  58334. if (path.isIdentifier()) {
  58335. return path.node.name;
  58336. } else if (path.isStringLiteral()) {
  58337. const stringValue = path.node.value;
  58338. if (!(0, _helperValidatorIdentifier.isIdentifierName)(stringValue)) {
  58339. stringSpecifiers.add(stringValue);
  58340. }
  58341. return stringValue;
  58342. } else {
  58343. throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`);
  58344. }
  58345. }
  58346. function assertExportSpecifier(path) {
  58347. if (path.isExportSpecifier()) {
  58348. return;
  58349. } else if (path.isExportNamespaceSpecifier()) {
  58350. throw path.buildCodeFrameError("Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`.");
  58351. } else {
  58352. throw path.buildCodeFrameError("Unexpected export specifier type");
  58353. }
  58354. }
  58355. function getModuleMetadata(programPath, {
  58356. lazy,
  58357. initializeReexports
  58358. }, stringSpecifiers) {
  58359. const localData = getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers);
  58360. const sourceData = /* @__PURE__ */ new Map();
  58361. const getData = (sourceNode) => {
  58362. const source2 = sourceNode.value;
  58363. let data3 = sourceData.get(source2);
  58364. if (!data3) {
  58365. data3 = {
  58366. name: programPath.scope.generateUidIdentifier((0, _path.basename)(source2, (0, _path.extname)(source2))).name,
  58367. interop: "none",
  58368. loc: null,
  58369. imports: /* @__PURE__ */ new Map(),
  58370. importsNamespace: /* @__PURE__ */ new Set(),
  58371. reexports: /* @__PURE__ */ new Map(),
  58372. reexportNamespace: /* @__PURE__ */ new Set(),
  58373. reexportAll: null,
  58374. lazy: false,
  58375. referenced: false
  58376. };
  58377. sourceData.set(source2, data3);
  58378. }
  58379. return data3;
  58380. };
  58381. let hasExports2 = false;
  58382. programPath.get("body").forEach((child) => {
  58383. if (child.isImportDeclaration()) {
  58384. const data3 = getData(child.node.source);
  58385. if (!data3.loc)
  58386. data3.loc = child.node.loc;
  58387. child.get("specifiers").forEach((spec) => {
  58388. if (spec.isImportDefaultSpecifier()) {
  58389. const localName = spec.get("local").node.name;
  58390. data3.imports.set(localName, "default");
  58391. const reexport = localData.get(localName);
  58392. if (reexport) {
  58393. localData.delete(localName);
  58394. reexport.names.forEach((name2) => {
  58395. data3.reexports.set(name2, "default");
  58396. });
  58397. data3.referenced = true;
  58398. }
  58399. } else if (spec.isImportNamespaceSpecifier()) {
  58400. const localName = spec.get("local").node.name;
  58401. data3.importsNamespace.add(localName);
  58402. const reexport = localData.get(localName);
  58403. if (reexport) {
  58404. localData.delete(localName);
  58405. reexport.names.forEach((name2) => {
  58406. data3.reexportNamespace.add(name2);
  58407. });
  58408. data3.referenced = true;
  58409. }
  58410. } else if (spec.isImportSpecifier()) {
  58411. const importName = getExportSpecifierName(spec.get("imported"), stringSpecifiers);
  58412. const localName = spec.get("local").node.name;
  58413. data3.imports.set(localName, importName);
  58414. const reexport = localData.get(localName);
  58415. if (reexport) {
  58416. localData.delete(localName);
  58417. reexport.names.forEach((name2) => {
  58418. data3.reexports.set(name2, importName);
  58419. });
  58420. data3.referenced = true;
  58421. }
  58422. }
  58423. });
  58424. } else if (child.isExportAllDeclaration()) {
  58425. hasExports2 = true;
  58426. const data3 = getData(child.node.source);
  58427. if (!data3.loc)
  58428. data3.loc = child.node.loc;
  58429. data3.reexportAll = {
  58430. loc: child.node.loc
  58431. };
  58432. data3.referenced = true;
  58433. } else if (child.isExportNamedDeclaration() && child.node.source) {
  58434. hasExports2 = true;
  58435. const data3 = getData(child.node.source);
  58436. if (!data3.loc)
  58437. data3.loc = child.node.loc;
  58438. child.get("specifiers").forEach((spec) => {
  58439. assertExportSpecifier(spec);
  58440. const importName = getExportSpecifierName(spec.get("local"), stringSpecifiers);
  58441. const exportName = getExportSpecifierName(spec.get("exported"), stringSpecifiers);
  58442. data3.reexports.set(exportName, importName);
  58443. data3.referenced = true;
  58444. if (exportName === "__esModule") {
  58445. throw spec.get("exported").buildCodeFrameError('Illegal export "__esModule".');
  58446. }
  58447. });
  58448. } else if (child.isExportNamedDeclaration() || child.isExportDefaultDeclaration()) {
  58449. hasExports2 = true;
  58450. }
  58451. });
  58452. for (const metadata of sourceData.values()) {
  58453. let needsDefault = false;
  58454. let needsNamed = false;
  58455. if (metadata.importsNamespace.size > 0) {
  58456. needsDefault = true;
  58457. needsNamed = true;
  58458. }
  58459. if (metadata.reexportAll) {
  58460. needsNamed = true;
  58461. }
  58462. for (const importName of metadata.imports.values()) {
  58463. if (importName === "default")
  58464. needsDefault = true;
  58465. else
  58466. needsNamed = true;
  58467. }
  58468. for (const importName of metadata.reexports.values()) {
  58469. if (importName === "default")
  58470. needsDefault = true;
  58471. else
  58472. needsNamed = true;
  58473. }
  58474. if (needsDefault && needsNamed) {
  58475. metadata.interop = "namespace";
  58476. } else if (needsDefault) {
  58477. metadata.interop = "default";
  58478. }
  58479. }
  58480. for (const [source2, metadata] of sourceData) {
  58481. if (lazy !== false && !(isSideEffectImport(metadata) || metadata.reexportAll)) {
  58482. if (lazy === true) {
  58483. metadata.lazy = !/\./.test(source2);
  58484. } else if (Array.isArray(lazy)) {
  58485. metadata.lazy = lazy.indexOf(source2) !== -1;
  58486. } else if (typeof lazy === "function") {
  58487. metadata.lazy = lazy(source2);
  58488. } else {
  58489. throw new Error(`.lazy must be a boolean, string array, or function`);
  58490. }
  58491. }
  58492. }
  58493. return {
  58494. hasExports: hasExports2,
  58495. local: localData,
  58496. sources: sourceData
  58497. };
  58498. }
  58499. function getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers) {
  58500. const bindingKindLookup = /* @__PURE__ */ new Map();
  58501. programPath.get("body").forEach((child) => {
  58502. let kind;
  58503. if (child.isImportDeclaration()) {
  58504. kind = "import";
  58505. } else {
  58506. if (child.isExportDefaultDeclaration()) {
  58507. child = child.get("declaration");
  58508. }
  58509. if (child.isExportNamedDeclaration()) {
  58510. if (child.node.declaration) {
  58511. child = child.get("declaration");
  58512. } else if (initializeReexports && child.node.source && child.get("source").isStringLiteral()) {
  58513. child.get("specifiers").forEach((spec) => {
  58514. assertExportSpecifier(spec);
  58515. bindingKindLookup.set(spec.get("local").node.name, "block");
  58516. });
  58517. return;
  58518. }
  58519. }
  58520. if (child.isFunctionDeclaration()) {
  58521. kind = "hoisted";
  58522. } else if (child.isClassDeclaration()) {
  58523. kind = "block";
  58524. } else if (child.isVariableDeclaration({
  58525. kind: "var"
  58526. })) {
  58527. kind = "var";
  58528. } else if (child.isVariableDeclaration()) {
  58529. kind = "block";
  58530. } else {
  58531. return;
  58532. }
  58533. }
  58534. Object.keys(child.getOuterBindingIdentifiers()).forEach((name2) => {
  58535. bindingKindLookup.set(name2, kind);
  58536. });
  58537. });
  58538. const localMetadata = /* @__PURE__ */ new Map();
  58539. const getLocalMetadata = (idPath) => {
  58540. const localName = idPath.node.name;
  58541. let metadata = localMetadata.get(localName);
  58542. if (!metadata) {
  58543. const kind = bindingKindLookup.get(localName);
  58544. if (kind === void 0) {
  58545. throw idPath.buildCodeFrameError(`Exporting local "${localName}", which is not declared.`);
  58546. }
  58547. metadata = {
  58548. names: [],
  58549. kind
  58550. };
  58551. localMetadata.set(localName, metadata);
  58552. }
  58553. return metadata;
  58554. };
  58555. programPath.get("body").forEach((child) => {
  58556. if (child.isExportNamedDeclaration() && (initializeReexports || !child.node.source)) {
  58557. if (child.node.declaration) {
  58558. const declaration = child.get("declaration");
  58559. const ids = declaration.getOuterBindingIdentifierPaths();
  58560. Object.keys(ids).forEach((name2) => {
  58561. if (name2 === "__esModule") {
  58562. throw declaration.buildCodeFrameError('Illegal export "__esModule".');
  58563. }
  58564. getLocalMetadata(ids[name2]).names.push(name2);
  58565. });
  58566. } else {
  58567. child.get("specifiers").forEach((spec) => {
  58568. const local = spec.get("local");
  58569. const exported = spec.get("exported");
  58570. const localMetadata2 = getLocalMetadata(local);
  58571. const exportName = getExportSpecifierName(exported, stringSpecifiers);
  58572. if (exportName === "__esModule") {
  58573. throw exported.buildCodeFrameError('Illegal export "__esModule".');
  58574. }
  58575. localMetadata2.names.push(exportName);
  58576. });
  58577. }
  58578. } else if (child.isExportDefaultDeclaration()) {
  58579. const declaration = child.get("declaration");
  58580. if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
  58581. getLocalMetadata(declaration.get("id")).names.push("default");
  58582. } else {
  58583. throw declaration.buildCodeFrameError("Unexpected default expression export.");
  58584. }
  58585. }
  58586. });
  58587. return localMetadata;
  58588. }
  58589. function nameAnonymousExports(programPath) {
  58590. programPath.get("body").forEach((child) => {
  58591. if (!child.isExportDefaultDeclaration())
  58592. return;
  58593. (0, _helperSplitExportDeclaration.default)(child);
  58594. });
  58595. }
  58596. function removeImportExportDeclarations(programPath) {
  58597. programPath.get("body").forEach((child) => {
  58598. if (child.isImportDeclaration()) {
  58599. child.remove();
  58600. } else if (child.isExportNamedDeclaration()) {
  58601. if (child.node.declaration) {
  58602. child.node.declaration._blockHoist = child.node._blockHoist;
  58603. child.replaceWith(child.node.declaration);
  58604. } else {
  58605. child.remove();
  58606. }
  58607. } else if (child.isExportDefaultDeclaration()) {
  58608. const declaration = child.get("declaration");
  58609. if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
  58610. declaration._blockHoist = child.node._blockHoist;
  58611. child.replaceWith(declaration);
  58612. } else {
  58613. throw declaration.buildCodeFrameError("Unexpected default expression export.");
  58614. }
  58615. } else if (child.isExportAllDeclaration()) {
  58616. child.remove();
  58617. }
  58618. });
  58619. }
  58620. }
  58621. });
  58622. // node_modules/@babel/helper-module-transforms/lib/dynamic-import.js
  58623. var require_dynamic_import = __commonJS({
  58624. "node_modules/@babel/helper-module-transforms/lib/dynamic-import.js"(exports) {
  58625. "use strict";
  58626. Object.defineProperty(exports, "__esModule", {
  58627. value: true
  58628. });
  58629. exports.buildDynamicImport = buildDynamicImport;
  58630. exports.getDynamicImportSource = getDynamicImportSource;
  58631. var t3 = require_lib3();
  58632. var _template = require_lib11();
  58633. function getDynamicImportSource(node2) {
  58634. const [source2] = node2.arguments;
  58635. return t3.isStringLiteral(source2) || t3.isTemplateLiteral(source2) ? source2 : _template.default.expression.ast`\`\${${source2}}\``;
  58636. }
  58637. function buildDynamicImport(node2, deferToThen, wrapWithPromise, builder) {
  58638. const [specifier] = node2.arguments;
  58639. if (t3.isStringLiteral(specifier) || t3.isTemplateLiteral(specifier) && specifier.quasis.length === 0) {
  58640. if (deferToThen) {
  58641. return _template.default.expression.ast`
  58642. Promise.resolve().then(() => ${builder(specifier)})
  58643. `;
  58644. } else
  58645. return builder(specifier);
  58646. }
  58647. const specifierToString = t3.isTemplateLiteral(specifier) ? t3.identifier("specifier") : t3.templateLiteral([t3.templateElement({
  58648. raw: ""
  58649. }), t3.templateElement({
  58650. raw: ""
  58651. })], [t3.identifier("specifier")]);
  58652. if (deferToThen) {
  58653. return _template.default.expression.ast`
  58654. (specifier =>
  58655. new Promise(r => r(${specifierToString}))
  58656. .then(s => ${builder(t3.identifier("s"))})
  58657. )(${specifier})
  58658. `;
  58659. } else if (wrapWithPromise) {
  58660. return _template.default.expression.ast`
  58661. (specifier =>
  58662. new Promise(r => r(${builder(specifierToString)}))
  58663. )(${specifier})
  58664. `;
  58665. } else {
  58666. return _template.default.expression.ast`
  58667. (specifier => ${builder(specifierToString)})(${specifier})
  58668. `;
  58669. }
  58670. }
  58671. }
  58672. });
  58673. // node_modules/@babel/helper-module-transforms/lib/get-module-name.js
  58674. var require_get_module_name = __commonJS({
  58675. "node_modules/@babel/helper-module-transforms/lib/get-module-name.js"(exports) {
  58676. "use strict";
  58677. Object.defineProperty(exports, "__esModule", {
  58678. value: true
  58679. });
  58680. exports.default = getModuleName;
  58681. {
  58682. const originalGetModuleName = getModuleName;
  58683. exports.default = getModuleName = function getModuleName2(rootOpts, pluginOpts) {
  58684. var _pluginOpts$moduleId, _pluginOpts$moduleIds, _pluginOpts$getModule, _pluginOpts$moduleRoo;
  58685. return originalGetModuleName(rootOpts, {
  58686. moduleId: (_pluginOpts$moduleId = pluginOpts.moduleId) != null ? _pluginOpts$moduleId : rootOpts.moduleId,
  58687. moduleIds: (_pluginOpts$moduleIds = pluginOpts.moduleIds) != null ? _pluginOpts$moduleIds : rootOpts.moduleIds,
  58688. getModuleId: (_pluginOpts$getModule = pluginOpts.getModuleId) != null ? _pluginOpts$getModule : rootOpts.getModuleId,
  58689. moduleRoot: (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot
  58690. });
  58691. };
  58692. }
  58693. function getModuleName(rootOpts, pluginOpts) {
  58694. const {
  58695. filename,
  58696. filenameRelative = filename,
  58697. sourceRoot = pluginOpts.moduleRoot
  58698. } = rootOpts;
  58699. const {
  58700. moduleId,
  58701. moduleIds = !!moduleId,
  58702. getModuleId,
  58703. moduleRoot = sourceRoot
  58704. } = pluginOpts;
  58705. if (!moduleIds)
  58706. return null;
  58707. if (moduleId != null && !getModuleId) {
  58708. return moduleId;
  58709. }
  58710. let moduleName = moduleRoot != null ? moduleRoot + "/" : "";
  58711. if (filenameRelative) {
  58712. const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : "";
  58713. moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, "");
  58714. }
  58715. moduleName = moduleName.replace(/\\/g, "/");
  58716. if (getModuleId) {
  58717. return getModuleId(moduleName) || moduleName;
  58718. } else {
  58719. return moduleName;
  58720. }
  58721. }
  58722. }
  58723. });
  58724. // node_modules/@babel/helper-module-transforms/lib/index.js
  58725. var require_lib17 = __commonJS({
  58726. "node_modules/@babel/helper-module-transforms/lib/index.js"(exports) {
  58727. "use strict";
  58728. Object.defineProperty(exports, "__esModule", {
  58729. value: true
  58730. });
  58731. Object.defineProperty(exports, "buildDynamicImport", {
  58732. enumerable: true,
  58733. get: function() {
  58734. return _dynamicImport.buildDynamicImport;
  58735. }
  58736. });
  58737. exports.buildNamespaceInitStatements = buildNamespaceInitStatements;
  58738. exports.ensureStatementsHoisted = ensureStatementsHoisted;
  58739. Object.defineProperty(exports, "getDynamicImportSource", {
  58740. enumerable: true,
  58741. get: function() {
  58742. return _dynamicImport.getDynamicImportSource;
  58743. }
  58744. });
  58745. Object.defineProperty(exports, "getModuleName", {
  58746. enumerable: true,
  58747. get: function() {
  58748. return _getModuleName.default;
  58749. }
  58750. });
  58751. Object.defineProperty(exports, "hasExports", {
  58752. enumerable: true,
  58753. get: function() {
  58754. return _normalizeAndLoadMetadata.hasExports;
  58755. }
  58756. });
  58757. Object.defineProperty(exports, "isModule", {
  58758. enumerable: true,
  58759. get: function() {
  58760. return _helperModuleImports.isModule;
  58761. }
  58762. });
  58763. Object.defineProperty(exports, "isSideEffectImport", {
  58764. enumerable: true,
  58765. get: function() {
  58766. return _normalizeAndLoadMetadata.isSideEffectImport;
  58767. }
  58768. });
  58769. exports.rewriteModuleStatementsAndPrepareHeader = rewriteModuleStatementsAndPrepareHeader;
  58770. Object.defineProperty(exports, "rewriteThis", {
  58771. enumerable: true,
  58772. get: function() {
  58773. return _rewriteThis.default;
  58774. }
  58775. });
  58776. exports.wrapInterop = wrapInterop;
  58777. var _assert = __require("assert");
  58778. var _t = require_lib3();
  58779. var _template = require_lib11();
  58780. var _helperModuleImports = require_lib15();
  58781. var _rewriteThis = require_rewrite_this();
  58782. var _rewriteLiveReferences = require_rewrite_live_references();
  58783. var _normalizeAndLoadMetadata = require_normalize_and_load_metadata();
  58784. var _dynamicImport = require_dynamic_import();
  58785. var _getModuleName = require_get_module_name();
  58786. var {
  58787. booleanLiteral,
  58788. callExpression,
  58789. cloneNode,
  58790. directive,
  58791. directiveLiteral,
  58792. expressionStatement,
  58793. identifier,
  58794. isIdentifier: isIdentifier3,
  58795. memberExpression,
  58796. stringLiteral: stringLiteral2,
  58797. valueToNode,
  58798. variableDeclaration,
  58799. variableDeclarator
  58800. } = _t;
  58801. function rewriteModuleStatementsAndPrepareHeader(path, {
  58802. loose,
  58803. exportName,
  58804. strict,
  58805. allowTopLevelThis,
  58806. strictMode,
  58807. noInterop,
  58808. importInterop = noInterop ? "none" : "babel",
  58809. lazy,
  58810. esNamespaceOnly,
  58811. filename,
  58812. constantReexports = loose,
  58813. enumerableModuleMeta = loose,
  58814. noIncompleteNsImportDetection
  58815. }) {
  58816. (0, _normalizeAndLoadMetadata.validateImportInteropOption)(importInterop);
  58817. _assert((0, _helperModuleImports.isModule)(path), "Cannot process module statements in a script");
  58818. path.node.sourceType = "script";
  58819. const meta = (0, _normalizeAndLoadMetadata.default)(path, exportName, {
  58820. importInterop,
  58821. initializeReexports: constantReexports,
  58822. lazy,
  58823. esNamespaceOnly,
  58824. filename
  58825. });
  58826. if (!allowTopLevelThis) {
  58827. (0, _rewriteThis.default)(path);
  58828. }
  58829. (0, _rewriteLiveReferences.default)(path, meta);
  58830. if (strictMode !== false) {
  58831. const hasStrict = path.node.directives.some((directive2) => {
  58832. return directive2.value.value === "use strict";
  58833. });
  58834. if (!hasStrict) {
  58835. path.unshiftContainer("directives", directive(directiveLiteral("use strict")));
  58836. }
  58837. }
  58838. const headers = [];
  58839. if ((0, _normalizeAndLoadMetadata.hasExports)(meta) && !strict) {
  58840. headers.push(buildESModuleHeader(meta, enumerableModuleMeta));
  58841. }
  58842. const nameList = buildExportNameListDeclaration(path, meta);
  58843. if (nameList) {
  58844. meta.exportNameListName = nameList.name;
  58845. headers.push(nameList.statement);
  58846. }
  58847. headers.push(...buildExportInitializationStatements(path, meta, constantReexports, noIncompleteNsImportDetection));
  58848. return {
  58849. meta,
  58850. headers
  58851. };
  58852. }
  58853. function ensureStatementsHoisted(statements) {
  58854. statements.forEach((header) => {
  58855. header._blockHoist = 3;
  58856. });
  58857. }
  58858. function wrapInterop(programPath, expr, type) {
  58859. if (type === "none") {
  58860. return null;
  58861. }
  58862. if (type === "node-namespace") {
  58863. return callExpression(programPath.hub.addHelper("interopRequireWildcard"), [expr, booleanLiteral(true)]);
  58864. } else if (type === "node-default") {
  58865. return null;
  58866. }
  58867. let helper;
  58868. if (type === "default") {
  58869. helper = "interopRequireDefault";
  58870. } else if (type === "namespace") {
  58871. helper = "interopRequireWildcard";
  58872. } else {
  58873. throw new Error(`Unknown interop: ${type}`);
  58874. }
  58875. return callExpression(programPath.hub.addHelper(helper), [expr]);
  58876. }
  58877. function buildNamespaceInitStatements(metadata, sourceMetadata, constantReexports = false) {
  58878. const statements = [];
  58879. let srcNamespace = identifier(sourceMetadata.name);
  58880. if (sourceMetadata.lazy)
  58881. srcNamespace = callExpression(srcNamespace, []);
  58882. for (const localName of sourceMetadata.importsNamespace) {
  58883. if (localName === sourceMetadata.name)
  58884. continue;
  58885. statements.push(_template.default.statement`var NAME = SOURCE;`({
  58886. NAME: localName,
  58887. SOURCE: cloneNode(srcNamespace)
  58888. }));
  58889. }
  58890. if (constantReexports) {
  58891. statements.push(...buildReexportsFromMeta(metadata, sourceMetadata, true));
  58892. }
  58893. for (const exportName of sourceMetadata.reexportNamespace) {
  58894. statements.push((sourceMetadata.lazy ? _template.default.statement`
  58895. Object.defineProperty(EXPORTS, "NAME", {
  58896. enumerable: true,
  58897. get: function() {
  58898. return NAMESPACE;
  58899. }
  58900. });
  58901. ` : _template.default.statement`EXPORTS.NAME = NAMESPACE;`)({
  58902. EXPORTS: metadata.exportName,
  58903. NAME: exportName,
  58904. NAMESPACE: cloneNode(srcNamespace)
  58905. }));
  58906. }
  58907. if (sourceMetadata.reexportAll) {
  58908. const statement = buildNamespaceReexport(metadata, cloneNode(srcNamespace), constantReexports);
  58909. statement.loc = sourceMetadata.reexportAll.loc;
  58910. statements.push(statement);
  58911. }
  58912. return statements;
  58913. }
  58914. var ReexportTemplate = {
  58915. constant: _template.default.statement`EXPORTS.EXPORT_NAME = NAMESPACE_IMPORT;`,
  58916. constantComputed: _template.default.statement`EXPORTS["EXPORT_NAME"] = NAMESPACE_IMPORT;`,
  58917. spec: _template.default.statement`
  58918. Object.defineProperty(EXPORTS, "EXPORT_NAME", {
  58919. enumerable: true,
  58920. get: function() {
  58921. return NAMESPACE_IMPORT;
  58922. },
  58923. });
  58924. `
  58925. };
  58926. function buildReexportsFromMeta(meta, metadata, constantReexports) {
  58927. const namespace = metadata.lazy ? callExpression(identifier(metadata.name), []) : identifier(metadata.name);
  58928. const {
  58929. stringSpecifiers
  58930. } = meta;
  58931. return Array.from(metadata.reexports, ([exportName, importName]) => {
  58932. let NAMESPACE_IMPORT = cloneNode(namespace);
  58933. if (importName === "default" && metadata.interop === "node-default") {
  58934. } else if (stringSpecifiers.has(importName)) {
  58935. NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, stringLiteral2(importName), true);
  58936. } else {
  58937. NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, identifier(importName));
  58938. }
  58939. const astNodes = {
  58940. EXPORTS: meta.exportName,
  58941. EXPORT_NAME: exportName,
  58942. NAMESPACE_IMPORT
  58943. };
  58944. if (constantReexports || isIdentifier3(NAMESPACE_IMPORT)) {
  58945. if (stringSpecifiers.has(exportName)) {
  58946. return ReexportTemplate.constantComputed(astNodes);
  58947. } else {
  58948. return ReexportTemplate.constant(astNodes);
  58949. }
  58950. } else {
  58951. return ReexportTemplate.spec(astNodes);
  58952. }
  58953. });
  58954. }
  58955. function buildESModuleHeader(metadata, enumerableModuleMeta = false) {
  58956. return (enumerableModuleMeta ? _template.default.statement`
  58957. EXPORTS.__esModule = true;
  58958. ` : _template.default.statement`
  58959. Object.defineProperty(EXPORTS, "__esModule", {
  58960. value: true,
  58961. });
  58962. `)({
  58963. EXPORTS: metadata.exportName
  58964. });
  58965. }
  58966. function buildNamespaceReexport(metadata, namespace, constantReexports) {
  58967. return (constantReexports ? _template.default.statement`
  58968. Object.keys(NAMESPACE).forEach(function(key) {
  58969. if (key === "default" || key === "__esModule") return;
  58970. VERIFY_NAME_LIST;
  58971. if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
  58972. EXPORTS[key] = NAMESPACE[key];
  58973. });
  58974. ` : _template.default.statement`
  58975. Object.keys(NAMESPACE).forEach(function(key) {
  58976. if (key === "default" || key === "__esModule") return;
  58977. VERIFY_NAME_LIST;
  58978. if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
  58979. Object.defineProperty(EXPORTS, key, {
  58980. enumerable: true,
  58981. get: function() {
  58982. return NAMESPACE[key];
  58983. },
  58984. });
  58985. });
  58986. `)({
  58987. NAMESPACE: namespace,
  58988. EXPORTS: metadata.exportName,
  58989. VERIFY_NAME_LIST: metadata.exportNameListName ? (0, _template.default)`
  58990. if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
  58991. `({
  58992. EXPORTS_LIST: metadata.exportNameListName
  58993. }) : null
  58994. });
  58995. }
  58996. function buildExportNameListDeclaration(programPath, metadata) {
  58997. const exportedVars = /* @__PURE__ */ Object.create(null);
  58998. for (const data3 of metadata.local.values()) {
  58999. for (const name3 of data3.names) {
  59000. exportedVars[name3] = true;
  59001. }
  59002. }
  59003. let hasReexport = false;
  59004. for (const data3 of metadata.source.values()) {
  59005. for (const exportName of data3.reexports.keys()) {
  59006. exportedVars[exportName] = true;
  59007. }
  59008. for (const exportName of data3.reexportNamespace) {
  59009. exportedVars[exportName] = true;
  59010. }
  59011. hasReexport = hasReexport || !!data3.reexportAll;
  59012. }
  59013. if (!hasReexport || Object.keys(exportedVars).length === 0)
  59014. return null;
  59015. const name2 = programPath.scope.generateUidIdentifier("exportNames");
  59016. delete exportedVars.default;
  59017. return {
  59018. name: name2.name,
  59019. statement: variableDeclaration("var", [variableDeclarator(name2, valueToNode(exportedVars))])
  59020. };
  59021. }
  59022. function buildExportInitializationStatements(programPath, metadata, constantReexports = false, noIncompleteNsImportDetection = false) {
  59023. const initStatements = [];
  59024. for (const [localName, data3] of metadata.local) {
  59025. if (data3.kind === "import") {
  59026. } else if (data3.kind === "hoisted") {
  59027. initStatements.push([data3.names[0], buildInitStatement(metadata, data3.names, identifier(localName))]);
  59028. } else if (!noIncompleteNsImportDetection) {
  59029. for (const exportName of data3.names) {
  59030. initStatements.push([exportName, null]);
  59031. }
  59032. }
  59033. }
  59034. for (const data3 of metadata.source.values()) {
  59035. if (!constantReexports) {
  59036. const reexportsStatements = buildReexportsFromMeta(metadata, data3, false);
  59037. const reexports = [...data3.reexports.keys()];
  59038. for (let i = 0; i < reexportsStatements.length; i++) {
  59039. initStatements.push([reexports[i], reexportsStatements[i]]);
  59040. }
  59041. }
  59042. if (!noIncompleteNsImportDetection) {
  59043. for (const exportName of data3.reexportNamespace) {
  59044. initStatements.push([exportName, null]);
  59045. }
  59046. }
  59047. }
  59048. initStatements.sort(([a], [b]) => {
  59049. if (a < b)
  59050. return -1;
  59051. if (b < a)
  59052. return 1;
  59053. return 0;
  59054. });
  59055. const results = [];
  59056. if (noIncompleteNsImportDetection) {
  59057. for (const [, initStatement] of initStatements) {
  59058. results.push(initStatement);
  59059. }
  59060. } else {
  59061. const chunkSize = 100;
  59062. for (let i = 0; i < initStatements.length; i += chunkSize) {
  59063. let uninitializedExportNames = [];
  59064. for (let j = 0; j < chunkSize && i + j < initStatements.length; j++) {
  59065. const [exportName, initStatement] = initStatements[i + j];
  59066. if (initStatement !== null) {
  59067. if (uninitializedExportNames.length > 0) {
  59068. results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode()));
  59069. uninitializedExportNames = [];
  59070. }
  59071. results.push(initStatement);
  59072. } else {
  59073. uninitializedExportNames.push(exportName);
  59074. }
  59075. }
  59076. if (uninitializedExportNames.length > 0) {
  59077. results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode()));
  59078. }
  59079. }
  59080. }
  59081. return results;
  59082. }
  59083. var InitTemplate = {
  59084. computed: _template.default.expression`EXPORTS["NAME"] = VALUE`,
  59085. default: _template.default.expression`EXPORTS.NAME = VALUE`
  59086. };
  59087. function buildInitStatement(metadata, exportNames, initExpr) {
  59088. const {
  59089. stringSpecifiers,
  59090. exportName: EXPORTS
  59091. } = metadata;
  59092. return expressionStatement(exportNames.reduce((acc, exportName) => {
  59093. const params = {
  59094. EXPORTS,
  59095. NAME: exportName,
  59096. VALUE: acc
  59097. };
  59098. if (stringSpecifiers.has(exportName)) {
  59099. return InitTemplate.computed(params);
  59100. } else {
  59101. return InitTemplate.default(params);
  59102. }
  59103. }, initExpr));
  59104. }
  59105. }
  59106. });
  59107. // node_modules/@babel/core/node_modules/semver/semver.js
  59108. var require_semver = __commonJS({
  59109. "node_modules/@babel/core/node_modules/semver/semver.js"(exports, module) {
  59110. exports = module.exports = SemVer;
  59111. var debug;
  59112. if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
  59113. debug = function() {
  59114. var args = Array.prototype.slice.call(arguments, 0);
  59115. args.unshift("SEMVER");
  59116. console.log.apply(console, args);
  59117. };
  59118. } else {
  59119. debug = function() {
  59120. };
  59121. }
  59122. exports.SEMVER_SPEC_VERSION = "2.0.0";
  59123. var MAX_LENGTH = 256;
  59124. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
  59125. 9007199254740991;
  59126. var MAX_SAFE_COMPONENT_LENGTH = 16;
  59127. var re = exports.re = [];
  59128. var src = exports.src = [];
  59129. var t3 = exports.tokens = {};
  59130. var R = 0;
  59131. function tok(n) {
  59132. t3[n] = R++;
  59133. }
  59134. tok("NUMERICIDENTIFIER");
  59135. src[t3.NUMERICIDENTIFIER] = "0|[1-9]\\d*";
  59136. tok("NUMERICIDENTIFIERLOOSE");
  59137. src[t3.NUMERICIDENTIFIERLOOSE] = "[0-9]+";
  59138. tok("NONNUMERICIDENTIFIER");
  59139. src[t3.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
  59140. tok("MAINVERSION");
  59141. src[t3.MAINVERSION] = "(" + src[t3.NUMERICIDENTIFIER] + ")\\.(" + src[t3.NUMERICIDENTIFIER] + ")\\.(" + src[t3.NUMERICIDENTIFIER] + ")";
  59142. tok("MAINVERSIONLOOSE");
  59143. src[t3.MAINVERSIONLOOSE] = "(" + src[t3.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t3.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t3.NUMERICIDENTIFIERLOOSE] + ")";
  59144. tok("PRERELEASEIDENTIFIER");
  59145. src[t3.PRERELEASEIDENTIFIER] = "(?:" + src[t3.NUMERICIDENTIFIER] + "|" + src[t3.NONNUMERICIDENTIFIER] + ")";
  59146. tok("PRERELEASEIDENTIFIERLOOSE");
  59147. src[t3.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t3.NUMERICIDENTIFIERLOOSE] + "|" + src[t3.NONNUMERICIDENTIFIER] + ")";
  59148. tok("PRERELEASE");
  59149. src[t3.PRERELEASE] = "(?:-(" + src[t3.PRERELEASEIDENTIFIER] + "(?:\\." + src[t3.PRERELEASEIDENTIFIER] + ")*))";
  59150. tok("PRERELEASELOOSE");
  59151. src[t3.PRERELEASELOOSE] = "(?:-?(" + src[t3.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t3.PRERELEASEIDENTIFIERLOOSE] + ")*))";
  59152. tok("BUILDIDENTIFIER");
  59153. src[t3.BUILDIDENTIFIER] = "[0-9A-Za-z-]+";
  59154. tok("BUILD");
  59155. src[t3.BUILD] = "(?:\\+(" + src[t3.BUILDIDENTIFIER] + "(?:\\." + src[t3.BUILDIDENTIFIER] + ")*))";
  59156. tok("FULL");
  59157. tok("FULLPLAIN");
  59158. src[t3.FULLPLAIN] = "v?" + src[t3.MAINVERSION] + src[t3.PRERELEASE] + "?" + src[t3.BUILD] + "?";
  59159. src[t3.FULL] = "^" + src[t3.FULLPLAIN] + "$";
  59160. tok("LOOSEPLAIN");
  59161. src[t3.LOOSEPLAIN] = "[v=\\s]*" + src[t3.MAINVERSIONLOOSE] + src[t3.PRERELEASELOOSE] + "?" + src[t3.BUILD] + "?";
  59162. tok("LOOSE");
  59163. src[t3.LOOSE] = "^" + src[t3.LOOSEPLAIN] + "$";
  59164. tok("GTLT");
  59165. src[t3.GTLT] = "((?:<|>)?=?)";
  59166. tok("XRANGEIDENTIFIERLOOSE");
  59167. src[t3.XRANGEIDENTIFIERLOOSE] = src[t3.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*";
  59168. tok("XRANGEIDENTIFIER");
  59169. src[t3.XRANGEIDENTIFIER] = src[t3.NUMERICIDENTIFIER] + "|x|X|\\*";
  59170. tok("XRANGEPLAIN");
  59171. src[t3.XRANGEPLAIN] = "[v=\\s]*(" + src[t3.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t3.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t3.XRANGEIDENTIFIER] + ")(?:" + src[t3.PRERELEASE] + ")?" + src[t3.BUILD] + "?)?)?";
  59172. tok("XRANGEPLAINLOOSE");
  59173. src[t3.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t3.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t3.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t3.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t3.PRERELEASELOOSE] + ")?" + src[t3.BUILD] + "?)?)?";
  59174. tok("XRANGE");
  59175. src[t3.XRANGE] = "^" + src[t3.GTLT] + "\\s*" + src[t3.XRANGEPLAIN] + "$";
  59176. tok("XRANGELOOSE");
  59177. src[t3.XRANGELOOSE] = "^" + src[t3.GTLT] + "\\s*" + src[t3.XRANGEPLAINLOOSE] + "$";
  59178. tok("COERCE");
  59179. src[t3.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])";
  59180. tok("COERCERTL");
  59181. re[t3.COERCERTL] = new RegExp(src[t3.COERCE], "g");
  59182. tok("LONETILDE");
  59183. src[t3.LONETILDE] = "(?:~>?)";
  59184. tok("TILDETRIM");
  59185. src[t3.TILDETRIM] = "(\\s*)" + src[t3.LONETILDE] + "\\s+";
  59186. re[t3.TILDETRIM] = new RegExp(src[t3.TILDETRIM], "g");
  59187. var tildeTrimReplace = "$1~";
  59188. tok("TILDE");
  59189. src[t3.TILDE] = "^" + src[t3.LONETILDE] + src[t3.XRANGEPLAIN] + "$";
  59190. tok("TILDELOOSE");
  59191. src[t3.TILDELOOSE] = "^" + src[t3.LONETILDE] + src[t3.XRANGEPLAINLOOSE] + "$";
  59192. tok("LONECARET");
  59193. src[t3.LONECARET] = "(?:\\^)";
  59194. tok("CARETTRIM");
  59195. src[t3.CARETTRIM] = "(\\s*)" + src[t3.LONECARET] + "\\s+";
  59196. re[t3.CARETTRIM] = new RegExp(src[t3.CARETTRIM], "g");
  59197. var caretTrimReplace = "$1^";
  59198. tok("CARET");
  59199. src[t3.CARET] = "^" + src[t3.LONECARET] + src[t3.XRANGEPLAIN] + "$";
  59200. tok("CARETLOOSE");
  59201. src[t3.CARETLOOSE] = "^" + src[t3.LONECARET] + src[t3.XRANGEPLAINLOOSE] + "$";
  59202. tok("COMPARATORLOOSE");
  59203. src[t3.COMPARATORLOOSE] = "^" + src[t3.GTLT] + "\\s*(" + src[t3.LOOSEPLAIN] + ")$|^$";
  59204. tok("COMPARATOR");
  59205. src[t3.COMPARATOR] = "^" + src[t3.GTLT] + "\\s*(" + src[t3.FULLPLAIN] + ")$|^$";
  59206. tok("COMPARATORTRIM");
  59207. src[t3.COMPARATORTRIM] = "(\\s*)" + src[t3.GTLT] + "\\s*(" + src[t3.LOOSEPLAIN] + "|" + src[t3.XRANGEPLAIN] + ")";
  59208. re[t3.COMPARATORTRIM] = new RegExp(src[t3.COMPARATORTRIM], "g");
  59209. var comparatorTrimReplace = "$1$2$3";
  59210. tok("HYPHENRANGE");
  59211. src[t3.HYPHENRANGE] = "^\\s*(" + src[t3.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t3.XRANGEPLAIN] + ")\\s*$";
  59212. tok("HYPHENRANGELOOSE");
  59213. src[t3.HYPHENRANGELOOSE] = "^\\s*(" + src[t3.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t3.XRANGEPLAINLOOSE] + ")\\s*$";
  59214. tok("STAR");
  59215. src[t3.STAR] = "(<|>)?=?\\s*\\*";
  59216. for (i = 0; i < R; i++) {
  59217. debug(i, src[i]);
  59218. if (!re[i]) {
  59219. re[i] = new RegExp(src[i]);
  59220. }
  59221. }
  59222. var i;
  59223. exports.parse = parse9;
  59224. function parse9(version3, options) {
  59225. if (!options || typeof options !== "object") {
  59226. options = {
  59227. loose: !!options,
  59228. includePrerelease: false
  59229. };
  59230. }
  59231. if (version3 instanceof SemVer) {
  59232. return version3;
  59233. }
  59234. if (typeof version3 !== "string") {
  59235. return null;
  59236. }
  59237. if (version3.length > MAX_LENGTH) {
  59238. return null;
  59239. }
  59240. var r = options.loose ? re[t3.LOOSE] : re[t3.FULL];
  59241. if (!r.test(version3)) {
  59242. return null;
  59243. }
  59244. try {
  59245. return new SemVer(version3, options);
  59246. } catch (er) {
  59247. return null;
  59248. }
  59249. }
  59250. exports.valid = valid2;
  59251. function valid2(version3, options) {
  59252. var v = parse9(version3, options);
  59253. return v ? v.version : null;
  59254. }
  59255. exports.clean = clean2;
  59256. function clean2(version3, options) {
  59257. var s = parse9(version3.trim().replace(/^[=v]+/, ""), options);
  59258. return s ? s.version : null;
  59259. }
  59260. exports.SemVer = SemVer;
  59261. function SemVer(version3, options) {
  59262. if (!options || typeof options !== "object") {
  59263. options = {
  59264. loose: !!options,
  59265. includePrerelease: false
  59266. };
  59267. }
  59268. if (version3 instanceof SemVer) {
  59269. if (version3.loose === options.loose) {
  59270. return version3;
  59271. } else {
  59272. version3 = version3.version;
  59273. }
  59274. } else if (typeof version3 !== "string") {
  59275. throw new TypeError("Invalid Version: " + version3);
  59276. }
  59277. if (version3.length > MAX_LENGTH) {
  59278. throw new TypeError("version is longer than " + MAX_LENGTH + " characters");
  59279. }
  59280. if (!(this instanceof SemVer)) {
  59281. return new SemVer(version3, options);
  59282. }
  59283. debug("SemVer", version3, options);
  59284. this.options = options;
  59285. this.loose = !!options.loose;
  59286. var m = version3.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);
  59287. if (!m) {
  59288. throw new TypeError("Invalid Version: " + version3);
  59289. }
  59290. this.raw = version3;
  59291. this.major = +m[1];
  59292. this.minor = +m[2];
  59293. this.patch = +m[3];
  59294. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  59295. throw new TypeError("Invalid major version");
  59296. }
  59297. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  59298. throw new TypeError("Invalid minor version");
  59299. }
  59300. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  59301. throw new TypeError("Invalid patch version");
  59302. }
  59303. if (!m[4]) {
  59304. this.prerelease = [];
  59305. } else {
  59306. this.prerelease = m[4].split(".").map(function(id) {
  59307. if (/^[0-9]+$/.test(id)) {
  59308. var num = +id;
  59309. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  59310. return num;
  59311. }
  59312. }
  59313. return id;
  59314. });
  59315. }
  59316. this.build = m[5] ? m[5].split(".") : [];
  59317. this.format();
  59318. }
  59319. SemVer.prototype.format = function() {
  59320. this.version = this.major + "." + this.minor + "." + this.patch;
  59321. if (this.prerelease.length) {
  59322. this.version += "-" + this.prerelease.join(".");
  59323. }
  59324. return this.version;
  59325. };
  59326. SemVer.prototype.toString = function() {
  59327. return this.version;
  59328. };
  59329. SemVer.prototype.compare = function(other) {
  59330. debug("SemVer.compare", this.version, this.options, other);
  59331. if (!(other instanceof SemVer)) {
  59332. other = new SemVer(other, this.options);
  59333. }
  59334. return this.compareMain(other) || this.comparePre(other);
  59335. };
  59336. SemVer.prototype.compareMain = function(other) {
  59337. if (!(other instanceof SemVer)) {
  59338. other = new SemVer(other, this.options);
  59339. }
  59340. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  59341. };
  59342. SemVer.prototype.comparePre = function(other) {
  59343. if (!(other instanceof SemVer)) {
  59344. other = new SemVer(other, this.options);
  59345. }
  59346. if (this.prerelease.length && !other.prerelease.length) {
  59347. return -1;
  59348. } else if (!this.prerelease.length && other.prerelease.length) {
  59349. return 1;
  59350. } else if (!this.prerelease.length && !other.prerelease.length) {
  59351. return 0;
  59352. }
  59353. var i2 = 0;
  59354. do {
  59355. var a = this.prerelease[i2];
  59356. var b = other.prerelease[i2];
  59357. debug("prerelease compare", i2, a, b);
  59358. if (a === void 0 && b === void 0) {
  59359. return 0;
  59360. } else if (b === void 0) {
  59361. return 1;
  59362. } else if (a === void 0) {
  59363. return -1;
  59364. } else if (a === b) {
  59365. continue;
  59366. } else {
  59367. return compareIdentifiers(a, b);
  59368. }
  59369. } while (++i2);
  59370. };
  59371. SemVer.prototype.compareBuild = function(other) {
  59372. if (!(other instanceof SemVer)) {
  59373. other = new SemVer(other, this.options);
  59374. }
  59375. var i2 = 0;
  59376. do {
  59377. var a = this.build[i2];
  59378. var b = other.build[i2];
  59379. debug("prerelease compare", i2, a, b);
  59380. if (a === void 0 && b === void 0) {
  59381. return 0;
  59382. } else if (b === void 0) {
  59383. return 1;
  59384. } else if (a === void 0) {
  59385. return -1;
  59386. } else if (a === b) {
  59387. continue;
  59388. } else {
  59389. return compareIdentifiers(a, b);
  59390. }
  59391. } while (++i2);
  59392. };
  59393. SemVer.prototype.inc = function(release, identifier) {
  59394. switch (release) {
  59395. case "premajor":
  59396. this.prerelease.length = 0;
  59397. this.patch = 0;
  59398. this.minor = 0;
  59399. this.major++;
  59400. this.inc("pre", identifier);
  59401. break;
  59402. case "preminor":
  59403. this.prerelease.length = 0;
  59404. this.patch = 0;
  59405. this.minor++;
  59406. this.inc("pre", identifier);
  59407. break;
  59408. case "prepatch":
  59409. this.prerelease.length = 0;
  59410. this.inc("patch", identifier);
  59411. this.inc("pre", identifier);
  59412. break;
  59413. case "prerelease":
  59414. if (this.prerelease.length === 0) {
  59415. this.inc("patch", identifier);
  59416. }
  59417. this.inc("pre", identifier);
  59418. break;
  59419. case "major":
  59420. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  59421. this.major++;
  59422. }
  59423. this.minor = 0;
  59424. this.patch = 0;
  59425. this.prerelease = [];
  59426. break;
  59427. case "minor":
  59428. if (this.patch !== 0 || this.prerelease.length === 0) {
  59429. this.minor++;
  59430. }
  59431. this.patch = 0;
  59432. this.prerelease = [];
  59433. break;
  59434. case "patch":
  59435. if (this.prerelease.length === 0) {
  59436. this.patch++;
  59437. }
  59438. this.prerelease = [];
  59439. break;
  59440. case "pre":
  59441. if (this.prerelease.length === 0) {
  59442. this.prerelease = [0];
  59443. } else {
  59444. var i2 = this.prerelease.length;
  59445. while (--i2 >= 0) {
  59446. if (typeof this.prerelease[i2] === "number") {
  59447. this.prerelease[i2]++;
  59448. i2 = -2;
  59449. }
  59450. }
  59451. if (i2 === -1) {
  59452. this.prerelease.push(0);
  59453. }
  59454. }
  59455. if (identifier) {
  59456. if (this.prerelease[0] === identifier) {
  59457. if (isNaN(this.prerelease[1])) {
  59458. this.prerelease = [identifier, 0];
  59459. }
  59460. } else {
  59461. this.prerelease = [identifier, 0];
  59462. }
  59463. }
  59464. break;
  59465. default:
  59466. throw new Error("invalid increment argument: " + release);
  59467. }
  59468. this.format();
  59469. this.raw = this.version;
  59470. return this;
  59471. };
  59472. exports.inc = inc;
  59473. function inc(version3, release, loose, identifier) {
  59474. if (typeof loose === "string") {
  59475. identifier = loose;
  59476. loose = void 0;
  59477. }
  59478. try {
  59479. return new SemVer(version3, loose).inc(release, identifier).version;
  59480. } catch (er) {
  59481. return null;
  59482. }
  59483. }
  59484. exports.diff = diff;
  59485. function diff(version1, version22) {
  59486. if (eq(version1, version22)) {
  59487. return null;
  59488. } else {
  59489. var v1 = parse9(version1);
  59490. var v2 = parse9(version22);
  59491. var prefix = "";
  59492. if (v1.prerelease.length || v2.prerelease.length) {
  59493. prefix = "pre";
  59494. var defaultResult = "prerelease";
  59495. }
  59496. for (var key2 in v1) {
  59497. if (key2 === "major" || key2 === "minor" || key2 === "patch") {
  59498. if (v1[key2] !== v2[key2]) {
  59499. return prefix + key2;
  59500. }
  59501. }
  59502. }
  59503. return defaultResult;
  59504. }
  59505. }
  59506. exports.compareIdentifiers = compareIdentifiers;
  59507. var numeric = /^[0-9]+$/;
  59508. function compareIdentifiers(a, b) {
  59509. var anum = numeric.test(a);
  59510. var bnum = numeric.test(b);
  59511. if (anum && bnum) {
  59512. a = +a;
  59513. b = +b;
  59514. }
  59515. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  59516. }
  59517. exports.rcompareIdentifiers = rcompareIdentifiers;
  59518. function rcompareIdentifiers(a, b) {
  59519. return compareIdentifiers(b, a);
  59520. }
  59521. exports.major = major;
  59522. function major(a, loose) {
  59523. return new SemVer(a, loose).major;
  59524. }
  59525. exports.minor = minor;
  59526. function minor(a, loose) {
  59527. return new SemVer(a, loose).minor;
  59528. }
  59529. exports.patch = patch3;
  59530. function patch3(a, loose) {
  59531. return new SemVer(a, loose).patch;
  59532. }
  59533. exports.compare = compare2;
  59534. function compare2(a, b, loose) {
  59535. return new SemVer(a, loose).compare(new SemVer(b, loose));
  59536. }
  59537. exports.compareLoose = compareLoose;
  59538. function compareLoose(a, b) {
  59539. return compare2(a, b, true);
  59540. }
  59541. exports.compareBuild = compareBuild;
  59542. function compareBuild(a, b, loose) {
  59543. var versionA = new SemVer(a, loose);
  59544. var versionB = new SemVer(b, loose);
  59545. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  59546. }
  59547. exports.rcompare = rcompare;
  59548. function rcompare(a, b, loose) {
  59549. return compare2(b, a, loose);
  59550. }
  59551. exports.sort = sort;
  59552. function sort(list3, loose) {
  59553. return list3.sort(function(a, b) {
  59554. return exports.compareBuild(a, b, loose);
  59555. });
  59556. }
  59557. exports.rsort = rsort;
  59558. function rsort(list3, loose) {
  59559. return list3.sort(function(a, b) {
  59560. return exports.compareBuild(b, a, loose);
  59561. });
  59562. }
  59563. exports.gt = gt;
  59564. function gt(a, b, loose) {
  59565. return compare2(a, b, loose) > 0;
  59566. }
  59567. exports.lt = lt;
  59568. function lt(a, b, loose) {
  59569. return compare2(a, b, loose) < 0;
  59570. }
  59571. exports.eq = eq;
  59572. function eq(a, b, loose) {
  59573. return compare2(a, b, loose) === 0;
  59574. }
  59575. exports.neq = neq;
  59576. function neq(a, b, loose) {
  59577. return compare2(a, b, loose) !== 0;
  59578. }
  59579. exports.gte = gte;
  59580. function gte(a, b, loose) {
  59581. return compare2(a, b, loose) >= 0;
  59582. }
  59583. exports.lte = lte;
  59584. function lte(a, b, loose) {
  59585. return compare2(a, b, loose) <= 0;
  59586. }
  59587. exports.cmp = cmp;
  59588. function cmp(a, op, b, loose) {
  59589. switch (op) {
  59590. case "===":
  59591. if (typeof a === "object")
  59592. a = a.version;
  59593. if (typeof b === "object")
  59594. b = b.version;
  59595. return a === b;
  59596. case "!==":
  59597. if (typeof a === "object")
  59598. a = a.version;
  59599. if (typeof b === "object")
  59600. b = b.version;
  59601. return a !== b;
  59602. case "":
  59603. case "=":
  59604. case "==":
  59605. return eq(a, b, loose);
  59606. case "!=":
  59607. return neq(a, b, loose);
  59608. case ">":
  59609. return gt(a, b, loose);
  59610. case ">=":
  59611. return gte(a, b, loose);
  59612. case "<":
  59613. return lt(a, b, loose);
  59614. case "<=":
  59615. return lte(a, b, loose);
  59616. default:
  59617. throw new TypeError("Invalid operator: " + op);
  59618. }
  59619. }
  59620. exports.Comparator = Comparator;
  59621. function Comparator(comp, options) {
  59622. if (!options || typeof options !== "object") {
  59623. options = {
  59624. loose: !!options,
  59625. includePrerelease: false
  59626. };
  59627. }
  59628. if (comp instanceof Comparator) {
  59629. if (comp.loose === !!options.loose) {
  59630. return comp;
  59631. } else {
  59632. comp = comp.value;
  59633. }
  59634. }
  59635. if (!(this instanceof Comparator)) {
  59636. return new Comparator(comp, options);
  59637. }
  59638. debug("comparator", comp, options);
  59639. this.options = options;
  59640. this.loose = !!options.loose;
  59641. this.parse(comp);
  59642. if (this.semver === ANY) {
  59643. this.value = "";
  59644. } else {
  59645. this.value = this.operator + this.semver.version;
  59646. }
  59647. debug("comp", this);
  59648. }
  59649. var ANY = {};
  59650. Comparator.prototype.parse = function(comp) {
  59651. var r = this.options.loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];
  59652. var m = comp.match(r);
  59653. if (!m) {
  59654. throw new TypeError("Invalid comparator: " + comp);
  59655. }
  59656. this.operator = m[1] !== void 0 ? m[1] : "";
  59657. if (this.operator === "=") {
  59658. this.operator = "";
  59659. }
  59660. if (!m[2]) {
  59661. this.semver = ANY;
  59662. } else {
  59663. this.semver = new SemVer(m[2], this.options.loose);
  59664. }
  59665. };
  59666. Comparator.prototype.toString = function() {
  59667. return this.value;
  59668. };
  59669. Comparator.prototype.test = function(version3) {
  59670. debug("Comparator.test", version3, this.options.loose);
  59671. if (this.semver === ANY || version3 === ANY) {
  59672. return true;
  59673. }
  59674. if (typeof version3 === "string") {
  59675. try {
  59676. version3 = new SemVer(version3, this.options);
  59677. } catch (er) {
  59678. return false;
  59679. }
  59680. }
  59681. return cmp(version3, this.operator, this.semver, this.options);
  59682. };
  59683. Comparator.prototype.intersects = function(comp, options) {
  59684. if (!(comp instanceof Comparator)) {
  59685. throw new TypeError("a Comparator is required");
  59686. }
  59687. if (!options || typeof options !== "object") {
  59688. options = {
  59689. loose: !!options,
  59690. includePrerelease: false
  59691. };
  59692. }
  59693. var rangeTmp;
  59694. if (this.operator === "") {
  59695. if (this.value === "") {
  59696. return true;
  59697. }
  59698. rangeTmp = new Range(comp.value, options);
  59699. return satisfies(this.value, rangeTmp, options);
  59700. } else if (comp.operator === "") {
  59701. if (comp.value === "") {
  59702. return true;
  59703. }
  59704. rangeTmp = new Range(this.value, options);
  59705. return satisfies(comp.semver, rangeTmp, options);
  59706. }
  59707. var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
  59708. var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
  59709. var sameSemVer = this.semver.version === comp.semver.version;
  59710. var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
  59711. var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"));
  59712. var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"));
  59713. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  59714. };
  59715. exports.Range = Range;
  59716. function Range(range, options) {
  59717. if (!options || typeof options !== "object") {
  59718. options = {
  59719. loose: !!options,
  59720. includePrerelease: false
  59721. };
  59722. }
  59723. if (range instanceof Range) {
  59724. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  59725. return range;
  59726. } else {
  59727. return new Range(range.raw, options);
  59728. }
  59729. }
  59730. if (range instanceof Comparator) {
  59731. return new Range(range.value, options);
  59732. }
  59733. if (!(this instanceof Range)) {
  59734. return new Range(range, options);
  59735. }
  59736. this.options = options;
  59737. this.loose = !!options.loose;
  59738. this.includePrerelease = !!options.includePrerelease;
  59739. this.raw = range;
  59740. this.set = range.split(/\s*\|\|\s*/).map(function(range2) {
  59741. return this.parseRange(range2.trim());
  59742. }, this).filter(function(c2) {
  59743. return c2.length;
  59744. });
  59745. if (!this.set.length) {
  59746. throw new TypeError("Invalid SemVer Range: " + range);
  59747. }
  59748. this.format();
  59749. }
  59750. Range.prototype.format = function() {
  59751. this.range = this.set.map(function(comps) {
  59752. return comps.join(" ").trim();
  59753. }).join("||").trim();
  59754. return this.range;
  59755. };
  59756. Range.prototype.toString = function() {
  59757. return this.range;
  59758. };
  59759. Range.prototype.parseRange = function(range) {
  59760. var loose = this.options.loose;
  59761. range = range.trim();
  59762. var hr = loose ? re[t3.HYPHENRANGELOOSE] : re[t3.HYPHENRANGE];
  59763. range = range.replace(hr, hyphenReplace);
  59764. debug("hyphen replace", range);
  59765. range = range.replace(re[t3.COMPARATORTRIM], comparatorTrimReplace);
  59766. debug("comparator trim", range, re[t3.COMPARATORTRIM]);
  59767. range = range.replace(re[t3.TILDETRIM], tildeTrimReplace);
  59768. range = range.replace(re[t3.CARETTRIM], caretTrimReplace);
  59769. range = range.split(/\s+/).join(" ");
  59770. var compRe = loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];
  59771. var set = range.split(" ").map(function(comp) {
  59772. return parseComparator(comp, this.options);
  59773. }, this).join(" ").split(/\s+/);
  59774. if (this.options.loose) {
  59775. set = set.filter(function(comp) {
  59776. return !!comp.match(compRe);
  59777. });
  59778. }
  59779. set = set.map(function(comp) {
  59780. return new Comparator(comp, this.options);
  59781. }, this);
  59782. return set;
  59783. };
  59784. Range.prototype.intersects = function(range, options) {
  59785. if (!(range instanceof Range)) {
  59786. throw new TypeError("a Range is required");
  59787. }
  59788. return this.set.some(function(thisComparators) {
  59789. return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) {
  59790. return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) {
  59791. return rangeComparators.every(function(rangeComparator) {
  59792. return thisComparator.intersects(rangeComparator, options);
  59793. });
  59794. });
  59795. });
  59796. });
  59797. };
  59798. function isSatisfiable(comparators, options) {
  59799. var result = true;
  59800. var remainingComparators = comparators.slice();
  59801. var testComparator = remainingComparators.pop();
  59802. while (result && remainingComparators.length) {
  59803. result = remainingComparators.every(function(otherComparator) {
  59804. return testComparator.intersects(otherComparator, options);
  59805. });
  59806. testComparator = remainingComparators.pop();
  59807. }
  59808. return result;
  59809. }
  59810. exports.toComparators = toComparators;
  59811. function toComparators(range, options) {
  59812. return new Range(range, options).set.map(function(comp) {
  59813. return comp.map(function(c2) {
  59814. return c2.value;
  59815. }).join(" ").trim().split(" ");
  59816. });
  59817. }
  59818. function parseComparator(comp, options) {
  59819. debug("comp", comp, options);
  59820. comp = replaceCarets(comp, options);
  59821. debug("caret", comp);
  59822. comp = replaceTildes(comp, options);
  59823. debug("tildes", comp);
  59824. comp = replaceXRanges(comp, options);
  59825. debug("xrange", comp);
  59826. comp = replaceStars(comp, options);
  59827. debug("stars", comp);
  59828. return comp;
  59829. }
  59830. function isX(id) {
  59831. return !id || id.toLowerCase() === "x" || id === "*";
  59832. }
  59833. function replaceTildes(comp, options) {
  59834. return comp.trim().split(/\s+/).map(function(comp2) {
  59835. return replaceTilde(comp2, options);
  59836. }).join(" ");
  59837. }
  59838. function replaceTilde(comp, options) {
  59839. var r = options.loose ? re[t3.TILDELOOSE] : re[t3.TILDE];
  59840. return comp.replace(r, function(_, M, m, p, pr) {
  59841. debug("tilde", comp, _, M, m, p, pr);
  59842. var ret;
  59843. if (isX(M)) {
  59844. ret = "";
  59845. } else if (isX(m)) {
  59846. ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
  59847. } else if (isX(p)) {
  59848. ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
  59849. } else if (pr) {
  59850. debug("replaceTilde pr", pr);
  59851. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
  59852. } else {
  59853. ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
  59854. }
  59855. debug("tilde return", ret);
  59856. return ret;
  59857. });
  59858. }
  59859. function replaceCarets(comp, options) {
  59860. return comp.trim().split(/\s+/).map(function(comp2) {
  59861. return replaceCaret(comp2, options);
  59862. }).join(" ");
  59863. }
  59864. function replaceCaret(comp, options) {
  59865. debug("caret", comp, options);
  59866. var r = options.loose ? re[t3.CARETLOOSE] : re[t3.CARET];
  59867. return comp.replace(r, function(_, M, m, p, pr) {
  59868. debug("caret", comp, _, M, m, p, pr);
  59869. var ret;
  59870. if (isX(M)) {
  59871. ret = "";
  59872. } else if (isX(m)) {
  59873. ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
  59874. } else if (isX(p)) {
  59875. if (M === "0") {
  59876. ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
  59877. } else {
  59878. ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0";
  59879. }
  59880. } else if (pr) {
  59881. debug("replaceCaret pr", pr);
  59882. if (M === "0") {
  59883. if (m === "0") {
  59884. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1);
  59885. } else {
  59886. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
  59887. }
  59888. } else {
  59889. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0";
  59890. }
  59891. } else {
  59892. debug("no pr");
  59893. if (M === "0") {
  59894. if (m === "0") {
  59895. ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1);
  59896. } else {
  59897. ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
  59898. }
  59899. } else {
  59900. ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0";
  59901. }
  59902. }
  59903. debug("caret return", ret);
  59904. return ret;
  59905. });
  59906. }
  59907. function replaceXRanges(comp, options) {
  59908. debug("replaceXRanges", comp, options);
  59909. return comp.split(/\s+/).map(function(comp2) {
  59910. return replaceXRange(comp2, options);
  59911. }).join(" ");
  59912. }
  59913. function replaceXRange(comp, options) {
  59914. comp = comp.trim();
  59915. var r = options.loose ? re[t3.XRANGELOOSE] : re[t3.XRANGE];
  59916. return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
  59917. debug("xRange", comp, ret, gtlt, M, m, p, pr);
  59918. var xM = isX(M);
  59919. var xm = xM || isX(m);
  59920. var xp = xm || isX(p);
  59921. var anyX = xp;
  59922. if (gtlt === "=" && anyX) {
  59923. gtlt = "";
  59924. }
  59925. pr = options.includePrerelease ? "-0" : "";
  59926. if (xM) {
  59927. if (gtlt === ">" || gtlt === "<") {
  59928. ret = "<0.0.0-0";
  59929. } else {
  59930. ret = "*";
  59931. }
  59932. } else if (gtlt && anyX) {
  59933. if (xm) {
  59934. m = 0;
  59935. }
  59936. p = 0;
  59937. if (gtlt === ">") {
  59938. gtlt = ">=";
  59939. if (xm) {
  59940. M = +M + 1;
  59941. m = 0;
  59942. p = 0;
  59943. } else {
  59944. m = +m + 1;
  59945. p = 0;
  59946. }
  59947. } else if (gtlt === "<=") {
  59948. gtlt = "<";
  59949. if (xm) {
  59950. M = +M + 1;
  59951. } else {
  59952. m = +m + 1;
  59953. }
  59954. }
  59955. ret = gtlt + M + "." + m + "." + p + pr;
  59956. } else if (xm) {
  59957. ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr;
  59958. } else if (xp) {
  59959. ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr;
  59960. }
  59961. debug("xRange return", ret);
  59962. return ret;
  59963. });
  59964. }
  59965. function replaceStars(comp, options) {
  59966. debug("replaceStars", comp, options);
  59967. return comp.trim().replace(re[t3.STAR], "");
  59968. }
  59969. function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  59970. if (isX(fM)) {
  59971. from = "";
  59972. } else if (isX(fm)) {
  59973. from = ">=" + fM + ".0.0";
  59974. } else if (isX(fp)) {
  59975. from = ">=" + fM + "." + fm + ".0";
  59976. } else {
  59977. from = ">=" + from;
  59978. }
  59979. if (isX(tM)) {
  59980. to = "";
  59981. } else if (isX(tm)) {
  59982. to = "<" + (+tM + 1) + ".0.0";
  59983. } else if (isX(tp)) {
  59984. to = "<" + tM + "." + (+tm + 1) + ".0";
  59985. } else if (tpr) {
  59986. to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
  59987. } else {
  59988. to = "<=" + to;
  59989. }
  59990. return (from + " " + to).trim();
  59991. }
  59992. Range.prototype.test = function(version3) {
  59993. if (!version3) {
  59994. return false;
  59995. }
  59996. if (typeof version3 === "string") {
  59997. try {
  59998. version3 = new SemVer(version3, this.options);
  59999. } catch (er) {
  60000. return false;
  60001. }
  60002. }
  60003. for (var i2 = 0; i2 < this.set.length; i2++) {
  60004. if (testSet(this.set[i2], version3, this.options)) {
  60005. return true;
  60006. }
  60007. }
  60008. return false;
  60009. };
  60010. function testSet(set, version3, options) {
  60011. for (var i2 = 0; i2 < set.length; i2++) {
  60012. if (!set[i2].test(version3)) {
  60013. return false;
  60014. }
  60015. }
  60016. if (version3.prerelease.length && !options.includePrerelease) {
  60017. for (i2 = 0; i2 < set.length; i2++) {
  60018. debug(set[i2].semver);
  60019. if (set[i2].semver === ANY) {
  60020. continue;
  60021. }
  60022. if (set[i2].semver.prerelease.length > 0) {
  60023. var allowed = set[i2].semver;
  60024. if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) {
  60025. return true;
  60026. }
  60027. }
  60028. }
  60029. return false;
  60030. }
  60031. return true;
  60032. }
  60033. exports.satisfies = satisfies;
  60034. function satisfies(version3, range, options) {
  60035. try {
  60036. range = new Range(range, options);
  60037. } catch (er) {
  60038. return false;
  60039. }
  60040. return range.test(version3);
  60041. }
  60042. exports.maxSatisfying = maxSatisfying;
  60043. function maxSatisfying(versions, range, options) {
  60044. var max = null;
  60045. var maxSV = null;
  60046. try {
  60047. var rangeObj = new Range(range, options);
  60048. } catch (er) {
  60049. return null;
  60050. }
  60051. versions.forEach(function(v) {
  60052. if (rangeObj.test(v)) {
  60053. if (!max || maxSV.compare(v) === -1) {
  60054. max = v;
  60055. maxSV = new SemVer(max, options);
  60056. }
  60057. }
  60058. });
  60059. return max;
  60060. }
  60061. exports.minSatisfying = minSatisfying;
  60062. function minSatisfying(versions, range, options) {
  60063. var min = null;
  60064. var minSV = null;
  60065. try {
  60066. var rangeObj = new Range(range, options);
  60067. } catch (er) {
  60068. return null;
  60069. }
  60070. versions.forEach(function(v) {
  60071. if (rangeObj.test(v)) {
  60072. if (!min || minSV.compare(v) === 1) {
  60073. min = v;
  60074. minSV = new SemVer(min, options);
  60075. }
  60076. }
  60077. });
  60078. return min;
  60079. }
  60080. exports.minVersion = minVersion;
  60081. function minVersion(range, loose) {
  60082. range = new Range(range, loose);
  60083. var minver = new SemVer("0.0.0");
  60084. if (range.test(minver)) {
  60085. return minver;
  60086. }
  60087. minver = new SemVer("0.0.0-0");
  60088. if (range.test(minver)) {
  60089. return minver;
  60090. }
  60091. minver = null;
  60092. for (var i2 = 0; i2 < range.set.length; ++i2) {
  60093. var comparators = range.set[i2];
  60094. comparators.forEach(function(comparator) {
  60095. var compver = new SemVer(comparator.semver.version);
  60096. switch (comparator.operator) {
  60097. case ">":
  60098. if (compver.prerelease.length === 0) {
  60099. compver.patch++;
  60100. } else {
  60101. compver.prerelease.push(0);
  60102. }
  60103. compver.raw = compver.format();
  60104. case "":
  60105. case ">=":
  60106. if (!minver || gt(minver, compver)) {
  60107. minver = compver;
  60108. }
  60109. break;
  60110. case "<":
  60111. case "<=":
  60112. break;
  60113. default:
  60114. throw new Error("Unexpected operation: " + comparator.operator);
  60115. }
  60116. });
  60117. }
  60118. if (minver && range.test(minver)) {
  60119. return minver;
  60120. }
  60121. return null;
  60122. }
  60123. exports.validRange = validRange;
  60124. function validRange(range, options) {
  60125. try {
  60126. return new Range(range, options).range || "*";
  60127. } catch (er) {
  60128. return null;
  60129. }
  60130. }
  60131. exports.ltr = ltr;
  60132. function ltr(version3, range, options) {
  60133. return outside(version3, range, "<", options);
  60134. }
  60135. exports.gtr = gtr;
  60136. function gtr(version3, range, options) {
  60137. return outside(version3, range, ">", options);
  60138. }
  60139. exports.outside = outside;
  60140. function outside(version3, range, hilo, options) {
  60141. version3 = new SemVer(version3, options);
  60142. range = new Range(range, options);
  60143. var gtfn, ltefn, ltfn, comp, ecomp;
  60144. switch (hilo) {
  60145. case ">":
  60146. gtfn = gt;
  60147. ltefn = lte;
  60148. ltfn = lt;
  60149. comp = ">";
  60150. ecomp = ">=";
  60151. break;
  60152. case "<":
  60153. gtfn = lt;
  60154. ltefn = gte;
  60155. ltfn = gt;
  60156. comp = "<";
  60157. ecomp = "<=";
  60158. break;
  60159. default:
  60160. throw new TypeError('Must provide a hilo val of "<" or ">"');
  60161. }
  60162. if (satisfies(version3, range, options)) {
  60163. return false;
  60164. }
  60165. for (var i2 = 0; i2 < range.set.length; ++i2) {
  60166. var comparators = range.set[i2];
  60167. var high = null;
  60168. var low = null;
  60169. comparators.forEach(function(comparator) {
  60170. if (comparator.semver === ANY) {
  60171. comparator = new Comparator(">=0.0.0");
  60172. }
  60173. high = high || comparator;
  60174. low = low || comparator;
  60175. if (gtfn(comparator.semver, high.semver, options)) {
  60176. high = comparator;
  60177. } else if (ltfn(comparator.semver, low.semver, options)) {
  60178. low = comparator;
  60179. }
  60180. });
  60181. if (high.operator === comp || high.operator === ecomp) {
  60182. return false;
  60183. }
  60184. if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) {
  60185. return false;
  60186. } else if (low.operator === ecomp && ltfn(version3, low.semver)) {
  60187. return false;
  60188. }
  60189. }
  60190. return true;
  60191. }
  60192. exports.prerelease = prerelease;
  60193. function prerelease(version3, options) {
  60194. var parsed = parse9(version3, options);
  60195. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  60196. }
  60197. exports.intersects = intersects;
  60198. function intersects(r1, r2, options) {
  60199. r1 = new Range(r1, options);
  60200. r2 = new Range(r2, options);
  60201. return r1.intersects(r2);
  60202. }
  60203. exports.coerce = coerce;
  60204. function coerce(version3, options) {
  60205. if (version3 instanceof SemVer) {
  60206. return version3;
  60207. }
  60208. if (typeof version3 === "number") {
  60209. version3 = String(version3);
  60210. }
  60211. if (typeof version3 !== "string") {
  60212. return null;
  60213. }
  60214. options = options || {};
  60215. var match = null;
  60216. if (!options.rtl) {
  60217. match = version3.match(re[t3.COERCE]);
  60218. } else {
  60219. var next;
  60220. while ((next = re[t3.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) {
  60221. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  60222. match = next;
  60223. }
  60224. re[t3.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  60225. }
  60226. re[t3.COERCERTL].lastIndex = -1;
  60227. }
  60228. if (match === null) {
  60229. return null;
  60230. }
  60231. return parse9(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options);
  60232. }
  60233. }
  60234. });
  60235. // node_modules/@babel/core/lib/transformation/file/file.js
  60236. var require_file = __commonJS({
  60237. "node_modules/@babel/core/lib/transformation/file/file.js"(exports) {
  60238. "use strict";
  60239. Object.defineProperty(exports, "__esModule", {
  60240. value: true
  60241. });
  60242. exports.default = void 0;
  60243. function helpers() {
  60244. const data3 = require_lib14();
  60245. helpers = function() {
  60246. return data3;
  60247. };
  60248. return data3;
  60249. }
  60250. function _traverse() {
  60251. const data3 = require_lib13();
  60252. _traverse = function() {
  60253. return data3;
  60254. };
  60255. return data3;
  60256. }
  60257. function _codeFrame() {
  60258. const data3 = require_lib8();
  60259. _codeFrame = function() {
  60260. return data3;
  60261. };
  60262. return data3;
  60263. }
  60264. function _t() {
  60265. const data3 = require_lib3();
  60266. _t = function() {
  60267. return data3;
  60268. };
  60269. return data3;
  60270. }
  60271. function _helperModuleTransforms() {
  60272. const data3 = require_lib17();
  60273. _helperModuleTransforms = function() {
  60274. return data3;
  60275. };
  60276. return data3;
  60277. }
  60278. function _semver() {
  60279. const data3 = require_semver();
  60280. _semver = function() {
  60281. return data3;
  60282. };
  60283. return data3;
  60284. }
  60285. var {
  60286. cloneNode,
  60287. interpreterDirective
  60288. } = _t();
  60289. var errorVisitor = {
  60290. enter(path, state) {
  60291. const loc = path.node.loc;
  60292. if (loc) {
  60293. state.loc = loc;
  60294. path.stop();
  60295. }
  60296. }
  60297. };
  60298. var File = class {
  60299. constructor(options, {
  60300. code: code2,
  60301. ast,
  60302. inputMap
  60303. }) {
  60304. this._map = /* @__PURE__ */ new Map();
  60305. this.opts = void 0;
  60306. this.declarations = {};
  60307. this.path = void 0;
  60308. this.ast = void 0;
  60309. this.scope = void 0;
  60310. this.metadata = {};
  60311. this.code = "";
  60312. this.inputMap = void 0;
  60313. this.hub = {
  60314. file: this,
  60315. getCode: () => this.code,
  60316. getScope: () => this.scope,
  60317. addHelper: this.addHelper.bind(this),
  60318. buildError: this.buildCodeFrameError.bind(this)
  60319. };
  60320. this.opts = options;
  60321. this.code = code2;
  60322. this.ast = ast;
  60323. this.inputMap = inputMap;
  60324. this.path = _traverse().NodePath.get({
  60325. hub: this.hub,
  60326. parentPath: null,
  60327. parent: this.ast,
  60328. container: this.ast,
  60329. key: "program"
  60330. }).setContext();
  60331. this.scope = this.path.scope;
  60332. }
  60333. get shebang() {
  60334. const {
  60335. interpreter
  60336. } = this.path.node;
  60337. return interpreter ? interpreter.value : "";
  60338. }
  60339. set shebang(value2) {
  60340. if (value2) {
  60341. this.path.get("interpreter").replaceWith(interpreterDirective(value2));
  60342. } else {
  60343. this.path.get("interpreter").remove();
  60344. }
  60345. }
  60346. set(key2, val) {
  60347. if (key2 === "helpersNamespace") {
  60348. throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.If you are using @babel/plugin-external-helpers you will need to use a newer version than the one you currently have installed. If you have your own implementation, you'll want to explore using 'helperGenerator' alongside 'file.availableHelper()'.");
  60349. }
  60350. this._map.set(key2, val);
  60351. }
  60352. get(key2) {
  60353. return this._map.get(key2);
  60354. }
  60355. has(key2) {
  60356. return this._map.has(key2);
  60357. }
  60358. getModuleName() {
  60359. return (0, _helperModuleTransforms().getModuleName)(this.opts, this.opts);
  60360. }
  60361. addImport() {
  60362. throw new Error("This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed from that module, such as 'addNamed' or 'addDefault'.");
  60363. }
  60364. availableHelper(name2, versionRange) {
  60365. let minVersion;
  60366. try {
  60367. minVersion = helpers().minVersion(name2);
  60368. } catch (err) {
  60369. if (err.code !== "BABEL_HELPER_UNKNOWN")
  60370. throw err;
  60371. return false;
  60372. }
  60373. if (typeof versionRange !== "string")
  60374. return true;
  60375. if (_semver().valid(versionRange))
  60376. versionRange = `^${versionRange}`;
  60377. return !_semver().intersects(`<${minVersion}`, versionRange) && !_semver().intersects(`>=8.0.0`, versionRange);
  60378. }
  60379. addHelper(name2) {
  60380. const declar = this.declarations[name2];
  60381. if (declar)
  60382. return cloneNode(declar);
  60383. const generator = this.get("helperGenerator");
  60384. if (generator) {
  60385. const res = generator(name2);
  60386. if (res)
  60387. return res;
  60388. }
  60389. helpers().ensure(name2, File);
  60390. const uid = this.declarations[name2] = this.scope.generateUidIdentifier(name2);
  60391. const dependencies = {};
  60392. for (const dep of helpers().getDependencies(name2)) {
  60393. dependencies[dep] = this.addHelper(dep);
  60394. }
  60395. const {
  60396. nodes,
  60397. globals
  60398. } = helpers().get(name2, (dep) => dependencies[dep], uid, Object.keys(this.scope.getAllBindings()));
  60399. globals.forEach((name3) => {
  60400. if (this.path.scope.hasBinding(name3, true)) {
  60401. this.path.scope.rename(name3);
  60402. }
  60403. });
  60404. nodes.forEach((node2) => {
  60405. node2._compact = true;
  60406. });
  60407. this.path.unshiftContainer("body", nodes);
  60408. this.path.get("body").forEach((path) => {
  60409. if (nodes.indexOf(path.node) === -1)
  60410. return;
  60411. if (path.isVariableDeclaration())
  60412. this.scope.registerDeclaration(path);
  60413. });
  60414. return uid;
  60415. }
  60416. addTemplateObject() {
  60417. throw new Error("This function has been moved into the template literal transform itself.");
  60418. }
  60419. buildCodeFrameError(node2, msg, _Error = SyntaxError) {
  60420. let loc = node2 && (node2.loc || node2._loc);
  60421. if (!loc && node2) {
  60422. const state = {
  60423. loc: null
  60424. };
  60425. (0, _traverse().default)(node2, errorVisitor, this.scope, state);
  60426. loc = state.loc;
  60427. let txt = "This is an error on an internal node. Probably an internal error.";
  60428. if (loc)
  60429. txt += " Location has been estimated.";
  60430. msg += ` (${txt})`;
  60431. }
  60432. if (loc) {
  60433. const {
  60434. highlightCode = true
  60435. } = this.opts;
  60436. msg += "\n" + (0, _codeFrame().codeFrameColumns)(this.code, {
  60437. start: {
  60438. line: loc.start.line,
  60439. column: loc.start.column + 1
  60440. },
  60441. end: loc.end && loc.start.line === loc.end.line ? {
  60442. line: loc.end.line,
  60443. column: loc.end.column + 1
  60444. } : void 0
  60445. }, {
  60446. highlightCode
  60447. });
  60448. }
  60449. return new _Error(msg);
  60450. }
  60451. };
  60452. exports.default = File;
  60453. }
  60454. });
  60455. // node_modules/@babel/core/lib/tools/build-external-helpers.js
  60456. var require_build_external_helpers = __commonJS({
  60457. "node_modules/@babel/core/lib/tools/build-external-helpers.js"(exports) {
  60458. "use strict";
  60459. Object.defineProperty(exports, "__esModule", {
  60460. value: true
  60461. });
  60462. exports.default = _default;
  60463. function helpers() {
  60464. const data3 = require_lib14();
  60465. helpers = function() {
  60466. return data3;
  60467. };
  60468. return data3;
  60469. }
  60470. function _generator() {
  60471. const data3 = require_lib4();
  60472. _generator = function() {
  60473. return data3;
  60474. };
  60475. return data3;
  60476. }
  60477. function _template() {
  60478. const data3 = require_lib11();
  60479. _template = function() {
  60480. return data3;
  60481. };
  60482. return data3;
  60483. }
  60484. function _t() {
  60485. const data3 = require_lib3();
  60486. _t = function() {
  60487. return data3;
  60488. };
  60489. return data3;
  60490. }
  60491. var _file = require_file();
  60492. var {
  60493. arrayExpression,
  60494. assignmentExpression,
  60495. binaryExpression,
  60496. blockStatement,
  60497. callExpression,
  60498. cloneNode,
  60499. conditionalExpression,
  60500. exportNamedDeclaration,
  60501. exportSpecifier,
  60502. expressionStatement,
  60503. functionExpression,
  60504. identifier,
  60505. memberExpression,
  60506. objectExpression,
  60507. program,
  60508. stringLiteral: stringLiteral2,
  60509. unaryExpression,
  60510. variableDeclaration,
  60511. variableDeclarator
  60512. } = _t();
  60513. var buildUmdWrapper = (replacements) => _template().default.statement`
  60514. (function (root, factory) {
  60515. if (typeof define === "function" && define.amd) {
  60516. define(AMD_ARGUMENTS, factory);
  60517. } else if (typeof exports === "object") {
  60518. factory(COMMON_ARGUMENTS);
  60519. } else {
  60520. factory(BROWSER_ARGUMENTS);
  60521. }
  60522. })(UMD_ROOT, function (FACTORY_PARAMETERS) {
  60523. FACTORY_BODY
  60524. });
  60525. `(replacements);
  60526. function buildGlobal(allowlist) {
  60527. const namespace = identifier("babelHelpers");
  60528. const body = [];
  60529. const container = functionExpression(null, [identifier("global")], blockStatement(body));
  60530. const tree = program([expressionStatement(callExpression(container, [conditionalExpression(binaryExpression("===", unaryExpression("typeof", identifier("global")), stringLiteral2("undefined")), identifier("self"), identifier("global"))]))]);
  60531. body.push(variableDeclaration("var", [variableDeclarator(namespace, assignmentExpression("=", memberExpression(identifier("global"), namespace), objectExpression([])))]));
  60532. buildHelpers(body, namespace, allowlist);
  60533. return tree;
  60534. }
  60535. function buildModule(allowlist) {
  60536. const body = [];
  60537. const refs = buildHelpers(body, null, allowlist);
  60538. body.unshift(exportNamedDeclaration(null, Object.keys(refs).map((name2) => {
  60539. return exportSpecifier(cloneNode(refs[name2]), identifier(name2));
  60540. })));
  60541. return program(body, [], "module");
  60542. }
  60543. function buildUmd(allowlist) {
  60544. const namespace = identifier("babelHelpers");
  60545. const body = [];
  60546. body.push(variableDeclaration("var", [variableDeclarator(namespace, identifier("global"))]));
  60547. buildHelpers(body, namespace, allowlist);
  60548. return program([buildUmdWrapper({
  60549. FACTORY_PARAMETERS: identifier("global"),
  60550. BROWSER_ARGUMENTS: assignmentExpression("=", memberExpression(identifier("root"), namespace), objectExpression([])),
  60551. COMMON_ARGUMENTS: identifier("exports"),
  60552. AMD_ARGUMENTS: arrayExpression([stringLiteral2("exports")]),
  60553. FACTORY_BODY: body,
  60554. UMD_ROOT: identifier("this")
  60555. })]);
  60556. }
  60557. function buildVar(allowlist) {
  60558. const namespace = identifier("babelHelpers");
  60559. const body = [];
  60560. body.push(variableDeclaration("var", [variableDeclarator(namespace, objectExpression([]))]));
  60561. const tree = program(body);
  60562. buildHelpers(body, namespace, allowlist);
  60563. body.push(expressionStatement(namespace));
  60564. return tree;
  60565. }
  60566. function buildHelpers(body, namespace, allowlist) {
  60567. const getHelperReference = (name2) => {
  60568. return namespace ? memberExpression(namespace, identifier(name2)) : identifier(`_${name2}`);
  60569. };
  60570. const refs = {};
  60571. helpers().list.forEach(function(name2) {
  60572. if (allowlist && allowlist.indexOf(name2) < 0)
  60573. return;
  60574. const ref3 = refs[name2] = getHelperReference(name2);
  60575. helpers().ensure(name2, _file.default);
  60576. const {
  60577. nodes
  60578. } = helpers().get(name2, getHelperReference, ref3);
  60579. body.push(...nodes);
  60580. });
  60581. return refs;
  60582. }
  60583. function _default(allowlist, outputType = "global") {
  60584. let tree;
  60585. const build = {
  60586. global: buildGlobal,
  60587. module: buildModule,
  60588. umd: buildUmd,
  60589. var: buildVar
  60590. }[outputType];
  60591. if (build) {
  60592. tree = build(allowlist);
  60593. } else {
  60594. throw new Error(`Unsupported output type ${outputType}`);
  60595. }
  60596. return (0, _generator().default)(tree).code;
  60597. }
  60598. }
  60599. });
  60600. // node_modules/gensync/index.js
  60601. var require_gensync = __commonJS({
  60602. "node_modules/gensync/index.js"(exports, module) {
  60603. "use strict";
  60604. var GENSYNC_START = Symbol.for("gensync:v1:start");
  60605. var GENSYNC_SUSPEND = Symbol.for("gensync:v1:suspend");
  60606. var GENSYNC_EXPECTED_START = "GENSYNC_EXPECTED_START";
  60607. var GENSYNC_EXPECTED_SUSPEND = "GENSYNC_EXPECTED_SUSPEND";
  60608. var GENSYNC_OPTIONS_ERROR = "GENSYNC_OPTIONS_ERROR";
  60609. var GENSYNC_RACE_NONEMPTY = "GENSYNC_RACE_NONEMPTY";
  60610. var GENSYNC_ERRBACK_NO_CALLBACK = "GENSYNC_ERRBACK_NO_CALLBACK";
  60611. module.exports = Object.assign(
  60612. function gensync(optsOrFn) {
  60613. let genFn = optsOrFn;
  60614. if (typeof optsOrFn !== "function") {
  60615. genFn = newGenerator(optsOrFn);
  60616. } else {
  60617. genFn = wrapGenerator(optsOrFn);
  60618. }
  60619. return Object.assign(genFn, makeFunctionAPI(genFn));
  60620. },
  60621. {
  60622. all: buildOperation({
  60623. name: "all",
  60624. arity: 1,
  60625. sync: function(args) {
  60626. const items = Array.from(args[0]);
  60627. return items.map((item) => evaluateSync(item));
  60628. },
  60629. async: function(args, resolve, reject) {
  60630. const items = Array.from(args[0]);
  60631. if (items.length === 0) {
  60632. Promise.resolve().then(() => resolve([]));
  60633. return;
  60634. }
  60635. let count = 0;
  60636. const results = items.map(() => void 0);
  60637. items.forEach((item, i) => {
  60638. evaluateAsync(
  60639. item,
  60640. (val) => {
  60641. results[i] = val;
  60642. count += 1;
  60643. if (count === results.length)
  60644. resolve(results);
  60645. },
  60646. reject
  60647. );
  60648. });
  60649. }
  60650. }),
  60651. race: buildOperation({
  60652. name: "race",
  60653. arity: 1,
  60654. sync: function(args) {
  60655. const items = Array.from(args[0]);
  60656. if (items.length === 0) {
  60657. throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY);
  60658. }
  60659. return evaluateSync(items[0]);
  60660. },
  60661. async: function(args, resolve, reject) {
  60662. const items = Array.from(args[0]);
  60663. if (items.length === 0) {
  60664. throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY);
  60665. }
  60666. for (const item of items) {
  60667. evaluateAsync(item, resolve, reject);
  60668. }
  60669. }
  60670. })
  60671. }
  60672. );
  60673. function makeFunctionAPI(genFn) {
  60674. const fns = {
  60675. sync: function(...args) {
  60676. return evaluateSync(genFn.apply(this, args));
  60677. },
  60678. async: function(...args) {
  60679. return new Promise((resolve, reject) => {
  60680. evaluateAsync(genFn.apply(this, args), resolve, reject);
  60681. });
  60682. },
  60683. errback: function(...args) {
  60684. const cb = args.pop();
  60685. if (typeof cb !== "function") {
  60686. throw makeError(
  60687. "Asynchronous function called without callback",
  60688. GENSYNC_ERRBACK_NO_CALLBACK
  60689. );
  60690. }
  60691. let gen;
  60692. try {
  60693. gen = genFn.apply(this, args);
  60694. } catch (err) {
  60695. cb(err);
  60696. return;
  60697. }
  60698. evaluateAsync(gen, (val) => cb(void 0, val), (err) => cb(err));
  60699. }
  60700. };
  60701. return fns;
  60702. }
  60703. function assertTypeof(type, name2, value2, allowUndefined) {
  60704. if (typeof value2 === type || allowUndefined && typeof value2 === "undefined") {
  60705. return;
  60706. }
  60707. let msg;
  60708. if (allowUndefined) {
  60709. msg = `Expected opts.${name2} to be either a ${type}, or undefined.`;
  60710. } else {
  60711. msg = `Expected opts.${name2} to be a ${type}.`;
  60712. }
  60713. throw makeError(msg, GENSYNC_OPTIONS_ERROR);
  60714. }
  60715. function makeError(msg, code2) {
  60716. return Object.assign(new Error(msg), { code: code2 });
  60717. }
  60718. function newGenerator({ name: name2, arity, sync, async, errback }) {
  60719. assertTypeof(
  60720. "string",
  60721. "name",
  60722. name2,
  60723. true
  60724. /* allowUndefined */
  60725. );
  60726. assertTypeof(
  60727. "number",
  60728. "arity",
  60729. arity,
  60730. true
  60731. /* allowUndefined */
  60732. );
  60733. assertTypeof("function", "sync", sync);
  60734. assertTypeof(
  60735. "function",
  60736. "async",
  60737. async,
  60738. true
  60739. /* allowUndefined */
  60740. );
  60741. assertTypeof(
  60742. "function",
  60743. "errback",
  60744. errback,
  60745. true
  60746. /* allowUndefined */
  60747. );
  60748. if (async && errback) {
  60749. throw makeError(
  60750. "Expected one of either opts.async or opts.errback, but got _both_.",
  60751. GENSYNC_OPTIONS_ERROR
  60752. );
  60753. }
  60754. if (typeof name2 !== "string") {
  60755. let fnName;
  60756. if (errback && errback.name && errback.name !== "errback") {
  60757. fnName = errback.name;
  60758. }
  60759. if (async && async.name && async.name !== "async") {
  60760. fnName = async.name.replace(/Async$/, "");
  60761. }
  60762. if (sync && sync.name && sync.name !== "sync") {
  60763. fnName = sync.name.replace(/Sync$/, "");
  60764. }
  60765. if (typeof fnName === "string") {
  60766. name2 = fnName;
  60767. }
  60768. }
  60769. if (typeof arity !== "number") {
  60770. arity = sync.length;
  60771. }
  60772. return buildOperation({
  60773. name: name2,
  60774. arity,
  60775. sync: function(args) {
  60776. return sync.apply(this, args);
  60777. },
  60778. async: function(args, resolve, reject) {
  60779. if (async) {
  60780. async.apply(this, args).then(resolve, reject);
  60781. } else if (errback) {
  60782. errback.call(this, ...args, (err, value2) => {
  60783. if (err == null)
  60784. resolve(value2);
  60785. else
  60786. reject(err);
  60787. });
  60788. } else {
  60789. resolve(sync.apply(this, args));
  60790. }
  60791. }
  60792. });
  60793. }
  60794. function wrapGenerator(genFn) {
  60795. return setFunctionMetadata(genFn.name, genFn.length, function(...args) {
  60796. return genFn.apply(this, args);
  60797. });
  60798. }
  60799. function buildOperation({ name: name2, arity, sync, async }) {
  60800. return setFunctionMetadata(name2, arity, function* (...args) {
  60801. const resume = yield GENSYNC_START;
  60802. if (!resume) {
  60803. const res = sync.call(this, args);
  60804. return res;
  60805. }
  60806. let result;
  60807. try {
  60808. async.call(
  60809. this,
  60810. args,
  60811. (value2) => {
  60812. if (result)
  60813. return;
  60814. result = { value: value2 };
  60815. resume();
  60816. },
  60817. (err) => {
  60818. if (result)
  60819. return;
  60820. result = { err };
  60821. resume();
  60822. }
  60823. );
  60824. } catch (err) {
  60825. result = { err };
  60826. resume();
  60827. }
  60828. yield GENSYNC_SUSPEND;
  60829. if (result.hasOwnProperty("err")) {
  60830. throw result.err;
  60831. }
  60832. return result.value;
  60833. });
  60834. }
  60835. function evaluateSync(gen) {
  60836. let value2;
  60837. while (!({ value: value2 } = gen.next()).done) {
  60838. assertStart(value2, gen);
  60839. }
  60840. return value2;
  60841. }
  60842. function evaluateAsync(gen, resolve, reject) {
  60843. (function step() {
  60844. try {
  60845. let value2;
  60846. while (!({ value: value2 } = gen.next()).done) {
  60847. assertStart(value2, gen);
  60848. let sync = true;
  60849. let didSyncResume = false;
  60850. const out = gen.next(() => {
  60851. if (sync) {
  60852. didSyncResume = true;
  60853. } else {
  60854. step();
  60855. }
  60856. });
  60857. sync = false;
  60858. assertSuspend(out, gen);
  60859. if (!didSyncResume) {
  60860. return;
  60861. }
  60862. }
  60863. return resolve(value2);
  60864. } catch (err) {
  60865. return reject(err);
  60866. }
  60867. })();
  60868. }
  60869. function assertStart(value2, gen) {
  60870. if (value2 === GENSYNC_START)
  60871. return;
  60872. throwError(
  60873. gen,
  60874. makeError(
  60875. `Got unexpected yielded value in gensync generator: ${JSON.stringify(
  60876. value2
  60877. )}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,
  60878. GENSYNC_EXPECTED_START
  60879. )
  60880. );
  60881. }
  60882. function assertSuspend({ value: value2, done }, gen) {
  60883. if (!done && value2 === GENSYNC_SUSPEND)
  60884. return;
  60885. throwError(
  60886. gen,
  60887. makeError(
  60888. done ? "Unexpected generator completion. If you get this, it is probably a gensync bug." : `Expected GENSYNC_SUSPEND, got ${JSON.stringify(
  60889. value2
  60890. )}. If you get this, it is probably a gensync bug.`,
  60891. GENSYNC_EXPECTED_SUSPEND
  60892. )
  60893. );
  60894. }
  60895. function throwError(gen, err) {
  60896. if (gen.throw)
  60897. gen.throw(err);
  60898. throw err;
  60899. }
  60900. function setFunctionMetadata(name2, arity, fn) {
  60901. if (typeof name2 === "string") {
  60902. const nameDesc = Object.getOwnPropertyDescriptor(fn, "name");
  60903. if (!nameDesc || nameDesc.configurable) {
  60904. Object.defineProperty(
  60905. fn,
  60906. "name",
  60907. Object.assign(nameDesc || {}, {
  60908. configurable: true,
  60909. value: name2
  60910. })
  60911. );
  60912. }
  60913. }
  60914. if (typeof arity === "number") {
  60915. const lengthDesc = Object.getOwnPropertyDescriptor(fn, "length");
  60916. if (!lengthDesc || lengthDesc.configurable) {
  60917. Object.defineProperty(
  60918. fn,
  60919. "length",
  60920. Object.assign(lengthDesc || {}, {
  60921. configurable: true,
  60922. value: arity
  60923. })
  60924. );
  60925. }
  60926. }
  60927. return fn;
  60928. }
  60929. }
  60930. });
  60931. // node_modules/@babel/core/lib/gensync-utils/async.js
  60932. var require_async = __commonJS({
  60933. "node_modules/@babel/core/lib/gensync-utils/async.js"(exports) {
  60934. "use strict";
  60935. Object.defineProperty(exports, "__esModule", {
  60936. value: true
  60937. });
  60938. exports.forwardAsync = forwardAsync;
  60939. exports.isAsync = void 0;
  60940. exports.isThenable = isThenable;
  60941. exports.maybeAsync = maybeAsync;
  60942. exports.waitFor = exports.onFirstPause = void 0;
  60943. function _gensync() {
  60944. const data3 = require_gensync();
  60945. _gensync = function() {
  60946. return data3;
  60947. };
  60948. return data3;
  60949. }
  60950. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key2, arg) {
  60951. try {
  60952. var info = gen[key2](arg);
  60953. var value2 = info.value;
  60954. } catch (error) {
  60955. reject(error);
  60956. return;
  60957. }
  60958. if (info.done) {
  60959. resolve(value2);
  60960. } else {
  60961. Promise.resolve(value2).then(_next, _throw);
  60962. }
  60963. }
  60964. function _asyncToGenerator(fn) {
  60965. return function() {
  60966. var self2 = this, args = arguments;
  60967. return new Promise(function(resolve, reject) {
  60968. var gen = fn.apply(self2, args);
  60969. function _next(value2) {
  60970. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value2);
  60971. }
  60972. function _throw(err) {
  60973. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  60974. }
  60975. _next(void 0);
  60976. });
  60977. };
  60978. }
  60979. var runGenerator = _gensync()(function* (item) {
  60980. return yield* item;
  60981. });
  60982. var isAsync = _gensync()({
  60983. sync: () => false,
  60984. errback: (cb) => cb(null, true)
  60985. });
  60986. exports.isAsync = isAsync;
  60987. function maybeAsync(fn, message) {
  60988. return _gensync()({
  60989. sync(...args) {
  60990. const result = fn.apply(this, args);
  60991. if (isThenable(result))
  60992. throw new Error(message);
  60993. return result;
  60994. },
  60995. async(...args) {
  60996. return Promise.resolve(fn.apply(this, args));
  60997. }
  60998. });
  60999. }
  61000. var withKind = _gensync()({
  61001. sync: (cb) => cb("sync"),
  61002. async: function() {
  61003. var _ref = _asyncToGenerator(function* (cb) {
  61004. return cb("async");
  61005. });
  61006. return function async(_x) {
  61007. return _ref.apply(this, arguments);
  61008. };
  61009. }()
  61010. });
  61011. function forwardAsync(action, cb) {
  61012. const g = _gensync()(action);
  61013. return withKind((kind) => {
  61014. const adapted = g[kind];
  61015. return cb(adapted);
  61016. });
  61017. }
  61018. var onFirstPause = _gensync()({
  61019. name: "onFirstPause",
  61020. arity: 2,
  61021. sync: function(item) {
  61022. return runGenerator.sync(item);
  61023. },
  61024. errback: function(item, firstPause, cb) {
  61025. let completed = false;
  61026. runGenerator.errback(item, (err, value2) => {
  61027. completed = true;
  61028. cb(err, value2);
  61029. });
  61030. if (!completed) {
  61031. firstPause();
  61032. }
  61033. }
  61034. });
  61035. exports.onFirstPause = onFirstPause;
  61036. var waitFor = _gensync()({
  61037. sync: (x) => x,
  61038. async: function() {
  61039. var _ref2 = _asyncToGenerator(function* (x) {
  61040. return x;
  61041. });
  61042. return function async(_x2) {
  61043. return _ref2.apply(this, arguments);
  61044. };
  61045. }()
  61046. });
  61047. exports.waitFor = waitFor;
  61048. function isThenable(val) {
  61049. return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
  61050. }
  61051. }
  61052. });
  61053. // node_modules/@babel/core/lib/config/util.js
  61054. var require_util2 = __commonJS({
  61055. "node_modules/@babel/core/lib/config/util.js"(exports) {
  61056. "use strict";
  61057. Object.defineProperty(exports, "__esModule", {
  61058. value: true
  61059. });
  61060. exports.isIterableIterator = isIterableIterator;
  61061. exports.mergeOptions = mergeOptions;
  61062. function mergeOptions(target, source2) {
  61063. for (const k of Object.keys(source2)) {
  61064. if ((k === "parserOpts" || k === "generatorOpts" || k === "assumptions") && source2[k]) {
  61065. const parserOpts = source2[k];
  61066. const targetObj = target[k] || (target[k] = {});
  61067. mergeDefaultFields(targetObj, parserOpts);
  61068. } else {
  61069. const val = source2[k];
  61070. if (val !== void 0)
  61071. target[k] = val;
  61072. }
  61073. }
  61074. }
  61075. function mergeDefaultFields(target, source2) {
  61076. for (const k of Object.keys(source2)) {
  61077. const val = source2[k];
  61078. if (val !== void 0)
  61079. target[k] = val;
  61080. }
  61081. }
  61082. function isIterableIterator(value2) {
  61083. return !!value2 && typeof value2.next === "function" && typeof value2[Symbol.iterator] === "function";
  61084. }
  61085. }
  61086. });
  61087. // node_modules/@babel/core/lib/config/caching.js
  61088. var require_caching = __commonJS({
  61089. "node_modules/@babel/core/lib/config/caching.js"(exports) {
  61090. "use strict";
  61091. Object.defineProperty(exports, "__esModule", {
  61092. value: true
  61093. });
  61094. exports.assertSimpleType = assertSimpleType;
  61095. exports.makeStrongCache = makeStrongCache;
  61096. exports.makeStrongCacheSync = makeStrongCacheSync;
  61097. exports.makeWeakCache = makeWeakCache;
  61098. exports.makeWeakCacheSync = makeWeakCacheSync;
  61099. function _gensync() {
  61100. const data3 = require_gensync();
  61101. _gensync = function() {
  61102. return data3;
  61103. };
  61104. return data3;
  61105. }
  61106. var _async = require_async();
  61107. var _util = require_util2();
  61108. var synchronize = (gen) => {
  61109. return _gensync()(gen).sync;
  61110. };
  61111. function* genTrue() {
  61112. return true;
  61113. }
  61114. function makeWeakCache(handler) {
  61115. return makeCachedFunction(WeakMap, handler);
  61116. }
  61117. function makeWeakCacheSync(handler) {
  61118. return synchronize(makeWeakCache(handler));
  61119. }
  61120. function makeStrongCache(handler) {
  61121. return makeCachedFunction(Map, handler);
  61122. }
  61123. function makeStrongCacheSync(handler) {
  61124. return synchronize(makeStrongCache(handler));
  61125. }
  61126. function makeCachedFunction(CallCache, handler) {
  61127. const callCacheSync = new CallCache();
  61128. const callCacheAsync = new CallCache();
  61129. const futureCache = new CallCache();
  61130. return function* cachedFunction(arg, data3) {
  61131. const asyncContext = yield* (0, _async.isAsync)();
  61132. const callCache = asyncContext ? callCacheAsync : callCacheSync;
  61133. const cached = yield* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data3);
  61134. if (cached.valid)
  61135. return cached.value;
  61136. const cache = new CacheConfigurator(data3);
  61137. const handlerResult = handler(arg, cache);
  61138. let finishLock;
  61139. let value2;
  61140. if ((0, _util.isIterableIterator)(handlerResult)) {
  61141. value2 = yield* (0, _async.onFirstPause)(handlerResult, () => {
  61142. finishLock = setupAsyncLocks(cache, futureCache, arg);
  61143. });
  61144. } else {
  61145. value2 = handlerResult;
  61146. }
  61147. updateFunctionCache(callCache, cache, arg, value2);
  61148. if (finishLock) {
  61149. futureCache.delete(arg);
  61150. finishLock.release(value2);
  61151. }
  61152. return value2;
  61153. };
  61154. }
  61155. function* getCachedValue(cache, arg, data3) {
  61156. const cachedValue = cache.get(arg);
  61157. if (cachedValue) {
  61158. for (const {
  61159. value: value2,
  61160. valid: valid2
  61161. } of cachedValue) {
  61162. if (yield* valid2(data3))
  61163. return {
  61164. valid: true,
  61165. value: value2
  61166. };
  61167. }
  61168. }
  61169. return {
  61170. valid: false,
  61171. value: null
  61172. };
  61173. }
  61174. function* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data3) {
  61175. const cached = yield* getCachedValue(callCache, arg, data3);
  61176. if (cached.valid) {
  61177. return cached;
  61178. }
  61179. if (asyncContext) {
  61180. const cached2 = yield* getCachedValue(futureCache, arg, data3);
  61181. if (cached2.valid) {
  61182. const value2 = yield* (0, _async.waitFor)(cached2.value.promise);
  61183. return {
  61184. valid: true,
  61185. value: value2
  61186. };
  61187. }
  61188. }
  61189. return {
  61190. valid: false,
  61191. value: null
  61192. };
  61193. }
  61194. function setupAsyncLocks(config, futureCache, arg) {
  61195. const finishLock = new Lock();
  61196. updateFunctionCache(futureCache, config, arg, finishLock);
  61197. return finishLock;
  61198. }
  61199. function updateFunctionCache(cache, config, arg, value2) {
  61200. if (!config.configured())
  61201. config.forever();
  61202. let cachedValue = cache.get(arg);
  61203. config.deactivate();
  61204. switch (config.mode()) {
  61205. case "forever":
  61206. cachedValue = [{
  61207. value: value2,
  61208. valid: genTrue
  61209. }];
  61210. cache.set(arg, cachedValue);
  61211. break;
  61212. case "invalidate":
  61213. cachedValue = [{
  61214. value: value2,
  61215. valid: config.validator()
  61216. }];
  61217. cache.set(arg, cachedValue);
  61218. break;
  61219. case "valid":
  61220. if (cachedValue) {
  61221. cachedValue.push({
  61222. value: value2,
  61223. valid: config.validator()
  61224. });
  61225. } else {
  61226. cachedValue = [{
  61227. value: value2,
  61228. valid: config.validator()
  61229. }];
  61230. cache.set(arg, cachedValue);
  61231. }
  61232. }
  61233. }
  61234. var CacheConfigurator = class {
  61235. constructor(data3) {
  61236. this._active = true;
  61237. this._never = false;
  61238. this._forever = false;
  61239. this._invalidate = false;
  61240. this._configured = false;
  61241. this._pairs = [];
  61242. this._data = void 0;
  61243. this._data = data3;
  61244. }
  61245. simple() {
  61246. return makeSimpleConfigurator(this);
  61247. }
  61248. mode() {
  61249. if (this._never)
  61250. return "never";
  61251. if (this._forever)
  61252. return "forever";
  61253. if (this._invalidate)
  61254. return "invalidate";
  61255. return "valid";
  61256. }
  61257. forever() {
  61258. if (!this._active) {
  61259. throw new Error("Cannot change caching after evaluation has completed.");
  61260. }
  61261. if (this._never) {
  61262. throw new Error("Caching has already been configured with .never()");
  61263. }
  61264. this._forever = true;
  61265. this._configured = true;
  61266. }
  61267. never() {
  61268. if (!this._active) {
  61269. throw new Error("Cannot change caching after evaluation has completed.");
  61270. }
  61271. if (this._forever) {
  61272. throw new Error("Caching has already been configured with .forever()");
  61273. }
  61274. this._never = true;
  61275. this._configured = true;
  61276. }
  61277. using(handler) {
  61278. if (!this._active) {
  61279. throw new Error("Cannot change caching after evaluation has completed.");
  61280. }
  61281. if (this._never || this._forever) {
  61282. throw new Error("Caching has already been configured with .never or .forever()");
  61283. }
  61284. this._configured = true;
  61285. const key2 = handler(this._data);
  61286. const fn = (0, _async.maybeAsync)(handler, `You appear to be using an async cache handler, but Babel has been called synchronously`);
  61287. if ((0, _async.isThenable)(key2)) {
  61288. return key2.then((key3) => {
  61289. this._pairs.push([key3, fn]);
  61290. return key3;
  61291. });
  61292. }
  61293. this._pairs.push([key2, fn]);
  61294. return key2;
  61295. }
  61296. invalidate(handler) {
  61297. this._invalidate = true;
  61298. return this.using(handler);
  61299. }
  61300. validator() {
  61301. const pairs = this._pairs;
  61302. return function* (data3) {
  61303. for (const [key2, fn] of pairs) {
  61304. if (key2 !== (yield* fn(data3)))
  61305. return false;
  61306. }
  61307. return true;
  61308. };
  61309. }
  61310. deactivate() {
  61311. this._active = false;
  61312. }
  61313. configured() {
  61314. return this._configured;
  61315. }
  61316. };
  61317. function makeSimpleConfigurator(cache) {
  61318. function cacheFn(val) {
  61319. if (typeof val === "boolean") {
  61320. if (val)
  61321. cache.forever();
  61322. else
  61323. cache.never();
  61324. return;
  61325. }
  61326. return cache.using(() => assertSimpleType(val()));
  61327. }
  61328. cacheFn.forever = () => cache.forever();
  61329. cacheFn.never = () => cache.never();
  61330. cacheFn.using = (cb) => cache.using(() => assertSimpleType(cb()));
  61331. cacheFn.invalidate = (cb) => cache.invalidate(() => assertSimpleType(cb()));
  61332. return cacheFn;
  61333. }
  61334. function assertSimpleType(value2) {
  61335. if ((0, _async.isThenable)(value2)) {
  61336. throw new Error(`You appear to be using an async cache handler, which your current version of Babel does not support. We may add support for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synchronously handle your caching logic.`);
  61337. }
  61338. if (value2 != null && typeof value2 !== "string" && typeof value2 !== "boolean" && typeof value2 !== "number") {
  61339. throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");
  61340. }
  61341. return value2;
  61342. }
  61343. var Lock = class {
  61344. constructor() {
  61345. this.released = false;
  61346. this.promise = void 0;
  61347. this._resolve = void 0;
  61348. this.promise = new Promise((resolve) => {
  61349. this._resolve = resolve;
  61350. });
  61351. }
  61352. release(value2) {
  61353. this.released = true;
  61354. this._resolve(value2);
  61355. }
  61356. };
  61357. }
  61358. });
  61359. // node_modules/@babel/core/lib/gensync-utils/fs.js
  61360. var require_fs = __commonJS({
  61361. "node_modules/@babel/core/lib/gensync-utils/fs.js"(exports) {
  61362. "use strict";
  61363. Object.defineProperty(exports, "__esModule", {
  61364. value: true
  61365. });
  61366. exports.stat = exports.readFile = void 0;
  61367. function _fs() {
  61368. const data3 = __require("fs");
  61369. _fs = function() {
  61370. return data3;
  61371. };
  61372. return data3;
  61373. }
  61374. function _gensync() {
  61375. const data3 = require_gensync();
  61376. _gensync = function() {
  61377. return data3;
  61378. };
  61379. return data3;
  61380. }
  61381. var readFile = _gensync()({
  61382. sync: _fs().readFileSync,
  61383. errback: _fs().readFile
  61384. });
  61385. exports.readFile = readFile;
  61386. var stat = _gensync()({
  61387. sync: _fs().statSync,
  61388. errback: _fs().stat
  61389. });
  61390. exports.stat = stat;
  61391. }
  61392. });
  61393. // node_modules/@babel/core/lib/config/files/utils.js
  61394. var require_utils2 = __commonJS({
  61395. "node_modules/@babel/core/lib/config/files/utils.js"(exports) {
  61396. "use strict";
  61397. Object.defineProperty(exports, "__esModule", {
  61398. value: true
  61399. });
  61400. exports.makeStaticFileCache = makeStaticFileCache;
  61401. var _caching = require_caching();
  61402. var fs = require_fs();
  61403. function _fs2() {
  61404. const data3 = __require("fs");
  61405. _fs2 = function() {
  61406. return data3;
  61407. };
  61408. return data3;
  61409. }
  61410. function makeStaticFileCache(fn) {
  61411. return (0, _caching.makeStrongCache)(function* (filepath, cache) {
  61412. const cached = cache.invalidate(() => fileMtime(filepath));
  61413. if (cached === null) {
  61414. return null;
  61415. }
  61416. return fn(filepath, yield* fs.readFile(filepath, "utf8"));
  61417. });
  61418. }
  61419. function fileMtime(filepath) {
  61420. if (!_fs2().existsSync(filepath))
  61421. return null;
  61422. try {
  61423. return +_fs2().statSync(filepath).mtime;
  61424. } catch (e) {
  61425. if (e.code !== "ENOENT" && e.code !== "ENOTDIR")
  61426. throw e;
  61427. }
  61428. return null;
  61429. }
  61430. }
  61431. });
  61432. // node_modules/@babel/core/lib/errors/rewrite-stack-trace.js
  61433. var require_rewrite_stack_trace = __commonJS({
  61434. "node_modules/@babel/core/lib/errors/rewrite-stack-trace.js"(exports) {
  61435. "use strict";
  61436. Object.defineProperty(exports, "__esModule", {
  61437. value: true
  61438. });
  61439. exports.beginHiddenCallStack = beginHiddenCallStack;
  61440. exports.endHiddenCallStack = endHiddenCallStack;
  61441. exports.expectedError = expectedError;
  61442. exports.injectVirtualStackFrame = injectVirtualStackFrame;
  61443. var ErrorToString = Function.call.bind(Error.prototype.toString);
  61444. var SUPPORTED = !!Error.captureStackTrace;
  61445. var START_HIDING = "startHiding - secret - don't use this - v1";
  61446. var STOP_HIDING = "stopHiding - secret - don't use this - v1";
  61447. var expectedErrors = /* @__PURE__ */ new WeakSet();
  61448. var virtualFrames = /* @__PURE__ */ new WeakMap();
  61449. function CallSite(filename) {
  61450. return /* @__PURE__ */ Object.create({
  61451. isNative: () => false,
  61452. isConstructor: () => false,
  61453. isToplevel: () => true,
  61454. getFileName: () => filename,
  61455. getLineNumber: () => void 0,
  61456. getColumnNumber: () => void 0,
  61457. getFunctionName: () => void 0,
  61458. getMethodName: () => void 0,
  61459. getTypeName: () => void 0,
  61460. toString: () => filename
  61461. });
  61462. }
  61463. function injectVirtualStackFrame(error, filename) {
  61464. if (!SUPPORTED)
  61465. return;
  61466. let frames = virtualFrames.get(error);
  61467. if (!frames)
  61468. virtualFrames.set(error, frames = []);
  61469. frames.push(CallSite(filename));
  61470. return error;
  61471. }
  61472. function expectedError(error) {
  61473. if (!SUPPORTED)
  61474. return;
  61475. expectedErrors.add(error);
  61476. return error;
  61477. }
  61478. function beginHiddenCallStack(fn) {
  61479. if (!SUPPORTED)
  61480. return fn;
  61481. return Object.defineProperty(function(...args) {
  61482. setupPrepareStackTrace();
  61483. return fn(...args);
  61484. }, "name", {
  61485. value: STOP_HIDING
  61486. });
  61487. }
  61488. function endHiddenCallStack(fn) {
  61489. if (!SUPPORTED)
  61490. return fn;
  61491. return Object.defineProperty(function(...args) {
  61492. return fn(...args);
  61493. }, "name", {
  61494. value: START_HIDING
  61495. });
  61496. }
  61497. function setupPrepareStackTrace() {
  61498. setupPrepareStackTrace = () => {
  61499. };
  61500. const {
  61501. prepareStackTrace = defaultPrepareStackTrace
  61502. } = Error;
  61503. const MIN_STACK_TRACE_LIMIT = 50;
  61504. Error.stackTraceLimit && (Error.stackTraceLimit = Math.max(Error.stackTraceLimit, MIN_STACK_TRACE_LIMIT));
  61505. Error.prepareStackTrace = function stackTraceRewriter(err, trace) {
  61506. let newTrace = [];
  61507. const isExpected = expectedErrors.has(err);
  61508. let status = isExpected ? "hiding" : "unknown";
  61509. for (let i = 0; i < trace.length; i++) {
  61510. const name2 = trace[i].getFunctionName();
  61511. if (name2 === START_HIDING) {
  61512. status = "hiding";
  61513. } else if (name2 === STOP_HIDING) {
  61514. if (status === "hiding") {
  61515. status = "showing";
  61516. if (virtualFrames.has(err)) {
  61517. newTrace.unshift(...virtualFrames.get(err));
  61518. }
  61519. } else if (status === "unknown") {
  61520. newTrace = trace;
  61521. break;
  61522. }
  61523. } else if (status !== "hiding") {
  61524. newTrace.push(trace[i]);
  61525. }
  61526. }
  61527. return prepareStackTrace(err, newTrace);
  61528. };
  61529. }
  61530. function defaultPrepareStackTrace(err, trace) {
  61531. if (trace.length === 0)
  61532. return ErrorToString(err);
  61533. return `${ErrorToString(err)}
  61534. at ${trace.join("\n at ")}`;
  61535. }
  61536. }
  61537. });
  61538. // node_modules/@babel/core/lib/errors/config-error.js
  61539. var require_config_error = __commonJS({
  61540. "node_modules/@babel/core/lib/errors/config-error.js"(exports) {
  61541. "use strict";
  61542. Object.defineProperty(exports, "__esModule", {
  61543. value: true
  61544. });
  61545. exports.default = void 0;
  61546. var _rewriteStackTrace = require_rewrite_stack_trace();
  61547. var ConfigError = class extends Error {
  61548. constructor(message, filename) {
  61549. super(message);
  61550. (0, _rewriteStackTrace.expectedError)(this);
  61551. if (filename)
  61552. (0, _rewriteStackTrace.injectVirtualStackFrame)(this, filename);
  61553. }
  61554. };
  61555. exports.default = ConfigError;
  61556. }
  61557. });
  61558. // node_modules/@babel/core/lib/config/files/package.js
  61559. var require_package = __commonJS({
  61560. "node_modules/@babel/core/lib/config/files/package.js"(exports) {
  61561. "use strict";
  61562. Object.defineProperty(exports, "__esModule", {
  61563. value: true
  61564. });
  61565. exports.findPackageData = findPackageData;
  61566. function _path() {
  61567. const data3 = __require("path");
  61568. _path = function() {
  61569. return data3;
  61570. };
  61571. return data3;
  61572. }
  61573. var _utils = require_utils2();
  61574. var _configError = require_config_error();
  61575. var PACKAGE_FILENAME = "package.json";
  61576. var readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content3) => {
  61577. let options;
  61578. try {
  61579. options = JSON.parse(content3);
  61580. } catch (err) {
  61581. throw new _configError.default(`Error while parsing JSON - ${err.message}`, filepath);
  61582. }
  61583. if (!options)
  61584. throw new Error(`${filepath}: No config detected`);
  61585. if (typeof options !== "object") {
  61586. throw new _configError.default(`Config returned typeof ${typeof options}`, filepath);
  61587. }
  61588. if (Array.isArray(options)) {
  61589. throw new _configError.default(`Expected config object but found array`, filepath);
  61590. }
  61591. return {
  61592. filepath,
  61593. dirname: _path().dirname(filepath),
  61594. options
  61595. };
  61596. });
  61597. function* findPackageData(filepath) {
  61598. let pkg = null;
  61599. const directories = [];
  61600. let isPackage = true;
  61601. let dirname = _path().dirname(filepath);
  61602. while (!pkg && _path().basename(dirname) !== "node_modules") {
  61603. directories.push(dirname);
  61604. pkg = yield* readConfigPackage(_path().join(dirname, PACKAGE_FILENAME));
  61605. const nextLoc = _path().dirname(dirname);
  61606. if (dirname === nextLoc) {
  61607. isPackage = false;
  61608. break;
  61609. }
  61610. dirname = nextLoc;
  61611. }
  61612. return {
  61613. filepath,
  61614. directories,
  61615. pkg,
  61616. isPackage
  61617. };
  61618. }
  61619. }
  61620. });
  61621. // node_modules/json5/dist/index.mjs
  61622. var dist_exports = {};
  61623. __export(dist_exports, {
  61624. default: () => dist_default
  61625. });
  61626. function internalize(holder, name2, reviver) {
  61627. const value2 = holder[name2];
  61628. if (value2 != null && typeof value2 === "object") {
  61629. if (Array.isArray(value2)) {
  61630. for (let i = 0; i < value2.length; i++) {
  61631. const key2 = String(i);
  61632. const replacement = internalize(value2, key2, reviver);
  61633. if (replacement === void 0) {
  61634. delete value2[key2];
  61635. } else {
  61636. Object.defineProperty(value2, key2, {
  61637. value: replacement,
  61638. writable: true,
  61639. enumerable: true,
  61640. configurable: true
  61641. });
  61642. }
  61643. }
  61644. } else {
  61645. for (const key2 in value2) {
  61646. const replacement = internalize(value2, key2, reviver);
  61647. if (replacement === void 0) {
  61648. delete value2[key2];
  61649. } else {
  61650. Object.defineProperty(value2, key2, {
  61651. value: replacement,
  61652. writable: true,
  61653. enumerable: true,
  61654. configurable: true
  61655. });
  61656. }
  61657. }
  61658. }
  61659. }
  61660. return reviver.call(holder, name2, value2);
  61661. }
  61662. function lex() {
  61663. lexState = "default";
  61664. buffer2 = "";
  61665. doubleQuote = false;
  61666. sign = 1;
  61667. for (; ; ) {
  61668. c = peek();
  61669. const token2 = lexStates[lexState]();
  61670. if (token2) {
  61671. return token2;
  61672. }
  61673. }
  61674. }
  61675. function peek() {
  61676. if (source[pos]) {
  61677. return String.fromCodePoint(source.codePointAt(pos));
  61678. }
  61679. }
  61680. function read() {
  61681. const c2 = peek();
  61682. if (c2 === "\n") {
  61683. line++;
  61684. column = 0;
  61685. } else if (c2) {
  61686. column += c2.length;
  61687. } else {
  61688. column++;
  61689. }
  61690. if (c2) {
  61691. pos += c2.length;
  61692. }
  61693. return c2;
  61694. }
  61695. function newToken(type, value2) {
  61696. return {
  61697. type,
  61698. value: value2,
  61699. line,
  61700. column
  61701. };
  61702. }
  61703. function literal3(s) {
  61704. for (const c2 of s) {
  61705. const p = peek();
  61706. if (p !== c2) {
  61707. throw invalidChar(read());
  61708. }
  61709. read();
  61710. }
  61711. }
  61712. function escape2() {
  61713. const c2 = peek();
  61714. switch (c2) {
  61715. case "b":
  61716. read();
  61717. return "\b";
  61718. case "f":
  61719. read();
  61720. return "\f";
  61721. case "n":
  61722. read();
  61723. return "\n";
  61724. case "r":
  61725. read();
  61726. return "\r";
  61727. case "t":
  61728. read();
  61729. return " ";
  61730. case "v":
  61731. read();
  61732. return "\v";
  61733. case "0":
  61734. read();
  61735. if (util.isDigit(peek())) {
  61736. throw invalidChar(read());
  61737. }
  61738. return "\0";
  61739. case "x":
  61740. read();
  61741. return hexEscape();
  61742. case "u":
  61743. read();
  61744. return unicodeEscape();
  61745. case "\n":
  61746. case "\u2028":
  61747. case "\u2029":
  61748. read();
  61749. return "";
  61750. case "\r":
  61751. read();
  61752. if (peek() === "\n") {
  61753. read();
  61754. }
  61755. return "";
  61756. case "1":
  61757. case "2":
  61758. case "3":
  61759. case "4":
  61760. case "5":
  61761. case "6":
  61762. case "7":
  61763. case "8":
  61764. case "9":
  61765. throw invalidChar(read());
  61766. case void 0:
  61767. throw invalidChar(read());
  61768. }
  61769. return read();
  61770. }
  61771. function hexEscape() {
  61772. let buffer3 = "";
  61773. let c2 = peek();
  61774. if (!util.isHexDigit(c2)) {
  61775. throw invalidChar(read());
  61776. }
  61777. buffer3 += read();
  61778. c2 = peek();
  61779. if (!util.isHexDigit(c2)) {
  61780. throw invalidChar(read());
  61781. }
  61782. buffer3 += read();
  61783. return String.fromCodePoint(parseInt(buffer3, 16));
  61784. }
  61785. function unicodeEscape() {
  61786. let buffer3 = "";
  61787. let count = 4;
  61788. while (count-- > 0) {
  61789. const c2 = peek();
  61790. if (!util.isHexDigit(c2)) {
  61791. throw invalidChar(read());
  61792. }
  61793. buffer3 += read();
  61794. }
  61795. return String.fromCodePoint(parseInt(buffer3, 16));
  61796. }
  61797. function push2() {
  61798. let value2;
  61799. switch (token.type) {
  61800. case "punctuator":
  61801. switch (token.value) {
  61802. case "{":
  61803. value2 = {};
  61804. break;
  61805. case "[":
  61806. value2 = [];
  61807. break;
  61808. }
  61809. break;
  61810. case "null":
  61811. case "boolean":
  61812. case "numeric":
  61813. case "string":
  61814. value2 = token.value;
  61815. break;
  61816. }
  61817. if (root3 === void 0) {
  61818. root3 = value2;
  61819. } else {
  61820. const parent = stack[stack.length - 1];
  61821. if (Array.isArray(parent)) {
  61822. parent.push(value2);
  61823. } else {
  61824. Object.defineProperty(parent, key, {
  61825. value: value2,
  61826. writable: true,
  61827. enumerable: true,
  61828. configurable: true
  61829. });
  61830. }
  61831. }
  61832. if (value2 !== null && typeof value2 === "object") {
  61833. stack.push(value2);
  61834. if (Array.isArray(value2)) {
  61835. parseState = "beforeArrayValue";
  61836. } else {
  61837. parseState = "beforePropertyName";
  61838. }
  61839. } else {
  61840. const current3 = stack[stack.length - 1];
  61841. if (current3 == null) {
  61842. parseState = "end";
  61843. } else if (Array.isArray(current3)) {
  61844. parseState = "afterArrayValue";
  61845. } else {
  61846. parseState = "afterPropertyValue";
  61847. }
  61848. }
  61849. }
  61850. function pop() {
  61851. stack.pop();
  61852. const current3 = stack[stack.length - 1];
  61853. if (current3 == null) {
  61854. parseState = "end";
  61855. } else if (Array.isArray(current3)) {
  61856. parseState = "afterArrayValue";
  61857. } else {
  61858. parseState = "afterPropertyValue";
  61859. }
  61860. }
  61861. function invalidChar(c2) {
  61862. if (c2 === void 0) {
  61863. return syntaxError(`JSON5: invalid end of input at ${line}:${column}`);
  61864. }
  61865. return syntaxError(`JSON5: invalid character '${formatChar(c2)}' at ${line}:${column}`);
  61866. }
  61867. function invalidEOF() {
  61868. return syntaxError(`JSON5: invalid end of input at ${line}:${column}`);
  61869. }
  61870. function invalidIdentifier() {
  61871. column -= 5;
  61872. return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`);
  61873. }
  61874. function separatorChar(c2) {
  61875. console.warn(`JSON5: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`);
  61876. }
  61877. function formatChar(c2) {
  61878. const replacements = {
  61879. "'": "\\'",
  61880. '"': '\\"',
  61881. "\\": "\\\\",
  61882. "\b": "\\b",
  61883. "\f": "\\f",
  61884. "\n": "\\n",
  61885. "\r": "\\r",
  61886. " ": "\\t",
  61887. "\v": "\\v",
  61888. "\0": "\\0",
  61889. "\u2028": "\\u2028",
  61890. "\u2029": "\\u2029"
  61891. };
  61892. if (replacements[c2]) {
  61893. return replacements[c2];
  61894. }
  61895. if (c2 < " ") {
  61896. const hexString = c2.charCodeAt(0).toString(16);
  61897. return "\\x" + ("00" + hexString).substring(hexString.length);
  61898. }
  61899. return c2;
  61900. }
  61901. function syntaxError(message) {
  61902. const err = new SyntaxError(message);
  61903. err.lineNumber = line;
  61904. err.columnNumber = column;
  61905. return err;
  61906. }
  61907. var Space_Separator, ID_Start, ID_Continue, unicode, util, source, parseState, stack, pos, line, column, token, key, root3, parse7, lexState, buffer2, doubleQuote, sign, c, lexStates, parseStates, stringify4, JSON5, lib, dist_default;
  61908. var init_dist = __esm({
  61909. "node_modules/json5/dist/index.mjs"() {
  61910. Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
  61911. ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
  61912. ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
  61913. unicode = {
  61914. Space_Separator,
  61915. ID_Start,
  61916. ID_Continue
  61917. };
  61918. util = {
  61919. isSpaceSeparator(c2) {
  61920. return typeof c2 === "string" && unicode.Space_Separator.test(c2);
  61921. },
  61922. isIdStartChar(c2) {
  61923. return typeof c2 === "string" && (c2 >= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z" || c2 === "$" || c2 === "_" || unicode.ID_Start.test(c2));
  61924. },
  61925. isIdContinueChar(c2) {
  61926. return typeof c2 === "string" && (c2 >= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z" || c2 >= "0" && c2 <= "9" || c2 === "$" || c2 === "_" || c2 === "\u200C" || c2 === "\u200D" || unicode.ID_Continue.test(c2));
  61927. },
  61928. isDigit(c2) {
  61929. return typeof c2 === "string" && /[0-9]/.test(c2);
  61930. },
  61931. isHexDigit(c2) {
  61932. return typeof c2 === "string" && /[0-9A-Fa-f]/.test(c2);
  61933. }
  61934. };
  61935. parse7 = function parse8(text5, reviver) {
  61936. source = String(text5);
  61937. parseState = "start";
  61938. stack = [];
  61939. pos = 0;
  61940. line = 1;
  61941. column = 0;
  61942. token = void 0;
  61943. key = void 0;
  61944. root3 = void 0;
  61945. do {
  61946. token = lex();
  61947. parseStates[parseState]();
  61948. } while (token.type !== "eof");
  61949. if (typeof reviver === "function") {
  61950. return internalize({ "": root3 }, "", reviver);
  61951. }
  61952. return root3;
  61953. };
  61954. lexStates = {
  61955. default() {
  61956. switch (c) {
  61957. case " ":
  61958. case "\v":
  61959. case "\f":
  61960. case " ":
  61961. case "\xA0":
  61962. case "\uFEFF":
  61963. case "\n":
  61964. case "\r":
  61965. case "\u2028":
  61966. case "\u2029":
  61967. read();
  61968. return;
  61969. case "/":
  61970. read();
  61971. lexState = "comment";
  61972. return;
  61973. case void 0:
  61974. read();
  61975. return newToken("eof");
  61976. }
  61977. if (util.isSpaceSeparator(c)) {
  61978. read();
  61979. return;
  61980. }
  61981. return lexStates[parseState]();
  61982. },
  61983. comment() {
  61984. switch (c) {
  61985. case "*":
  61986. read();
  61987. lexState = "multiLineComment";
  61988. return;
  61989. case "/":
  61990. read();
  61991. lexState = "singleLineComment";
  61992. return;
  61993. }
  61994. throw invalidChar(read());
  61995. },
  61996. multiLineComment() {
  61997. switch (c) {
  61998. case "*":
  61999. read();
  62000. lexState = "multiLineCommentAsterisk";
  62001. return;
  62002. case void 0:
  62003. throw invalidChar(read());
  62004. }
  62005. read();
  62006. },
  62007. multiLineCommentAsterisk() {
  62008. switch (c) {
  62009. case "*":
  62010. read();
  62011. return;
  62012. case "/":
  62013. read();
  62014. lexState = "default";
  62015. return;
  62016. case void 0:
  62017. throw invalidChar(read());
  62018. }
  62019. read();
  62020. lexState = "multiLineComment";
  62021. },
  62022. singleLineComment() {
  62023. switch (c) {
  62024. case "\n":
  62025. case "\r":
  62026. case "\u2028":
  62027. case "\u2029":
  62028. read();
  62029. lexState = "default";
  62030. return;
  62031. case void 0:
  62032. read();
  62033. return newToken("eof");
  62034. }
  62035. read();
  62036. },
  62037. value() {
  62038. switch (c) {
  62039. case "{":
  62040. case "[":
  62041. return newToken("punctuator", read());
  62042. case "n":
  62043. read();
  62044. literal3("ull");
  62045. return newToken("null", null);
  62046. case "t":
  62047. read();
  62048. literal3("rue");
  62049. return newToken("boolean", true);
  62050. case "f":
  62051. read();
  62052. literal3("alse");
  62053. return newToken("boolean", false);
  62054. case "-":
  62055. case "+":
  62056. if (read() === "-") {
  62057. sign = -1;
  62058. }
  62059. lexState = "sign";
  62060. return;
  62061. case ".":
  62062. buffer2 = read();
  62063. lexState = "decimalPointLeading";
  62064. return;
  62065. case "0":
  62066. buffer2 = read();
  62067. lexState = "zero";
  62068. return;
  62069. case "1":
  62070. case "2":
  62071. case "3":
  62072. case "4":
  62073. case "5":
  62074. case "6":
  62075. case "7":
  62076. case "8":
  62077. case "9":
  62078. buffer2 = read();
  62079. lexState = "decimalInteger";
  62080. return;
  62081. case "I":
  62082. read();
  62083. literal3("nfinity");
  62084. return newToken("numeric", Infinity);
  62085. case "N":
  62086. read();
  62087. literal3("aN");
  62088. return newToken("numeric", NaN);
  62089. case '"':
  62090. case "'":
  62091. doubleQuote = read() === '"';
  62092. buffer2 = "";
  62093. lexState = "string";
  62094. return;
  62095. }
  62096. throw invalidChar(read());
  62097. },
  62098. identifierNameStartEscape() {
  62099. if (c !== "u") {
  62100. throw invalidChar(read());
  62101. }
  62102. read();
  62103. const u = unicodeEscape();
  62104. switch (u) {
  62105. case "$":
  62106. case "_":
  62107. break;
  62108. default:
  62109. if (!util.isIdStartChar(u)) {
  62110. throw invalidIdentifier();
  62111. }
  62112. break;
  62113. }
  62114. buffer2 += u;
  62115. lexState = "identifierName";
  62116. },
  62117. identifierName() {
  62118. switch (c) {
  62119. case "$":
  62120. case "_":
  62121. case "\u200C":
  62122. case "\u200D":
  62123. buffer2 += read();
  62124. return;
  62125. case "\\":
  62126. read();
  62127. lexState = "identifierNameEscape";
  62128. return;
  62129. }
  62130. if (util.isIdContinueChar(c)) {
  62131. buffer2 += read();
  62132. return;
  62133. }
  62134. return newToken("identifier", buffer2);
  62135. },
  62136. identifierNameEscape() {
  62137. if (c !== "u") {
  62138. throw invalidChar(read());
  62139. }
  62140. read();
  62141. const u = unicodeEscape();
  62142. switch (u) {
  62143. case "$":
  62144. case "_":
  62145. case "\u200C":
  62146. case "\u200D":
  62147. break;
  62148. default:
  62149. if (!util.isIdContinueChar(u)) {
  62150. throw invalidIdentifier();
  62151. }
  62152. break;
  62153. }
  62154. buffer2 += u;
  62155. lexState = "identifierName";
  62156. },
  62157. sign() {
  62158. switch (c) {
  62159. case ".":
  62160. buffer2 = read();
  62161. lexState = "decimalPointLeading";
  62162. return;
  62163. case "0":
  62164. buffer2 = read();
  62165. lexState = "zero";
  62166. return;
  62167. case "1":
  62168. case "2":
  62169. case "3":
  62170. case "4":
  62171. case "5":
  62172. case "6":
  62173. case "7":
  62174. case "8":
  62175. case "9":
  62176. buffer2 = read();
  62177. lexState = "decimalInteger";
  62178. return;
  62179. case "I":
  62180. read();
  62181. literal3("nfinity");
  62182. return newToken("numeric", sign * Infinity);
  62183. case "N":
  62184. read();
  62185. literal3("aN");
  62186. return newToken("numeric", NaN);
  62187. }
  62188. throw invalidChar(read());
  62189. },
  62190. zero() {
  62191. switch (c) {
  62192. case ".":
  62193. buffer2 += read();
  62194. lexState = "decimalPoint";
  62195. return;
  62196. case "e":
  62197. case "E":
  62198. buffer2 += read();
  62199. lexState = "decimalExponent";
  62200. return;
  62201. case "x":
  62202. case "X":
  62203. buffer2 += read();
  62204. lexState = "hexadecimal";
  62205. return;
  62206. }
  62207. return newToken("numeric", sign * 0);
  62208. },
  62209. decimalInteger() {
  62210. switch (c) {
  62211. case ".":
  62212. buffer2 += read();
  62213. lexState = "decimalPoint";
  62214. return;
  62215. case "e":
  62216. case "E":
  62217. buffer2 += read();
  62218. lexState = "decimalExponent";
  62219. return;
  62220. }
  62221. if (util.isDigit(c)) {
  62222. buffer2 += read();
  62223. return;
  62224. }
  62225. return newToken("numeric", sign * Number(buffer2));
  62226. },
  62227. decimalPointLeading() {
  62228. if (util.isDigit(c)) {
  62229. buffer2 += read();
  62230. lexState = "decimalFraction";
  62231. return;
  62232. }
  62233. throw invalidChar(read());
  62234. },
  62235. decimalPoint() {
  62236. switch (c) {
  62237. case "e":
  62238. case "E":
  62239. buffer2 += read();
  62240. lexState = "decimalExponent";
  62241. return;
  62242. }
  62243. if (util.isDigit(c)) {
  62244. buffer2 += read();
  62245. lexState = "decimalFraction";
  62246. return;
  62247. }
  62248. return newToken("numeric", sign * Number(buffer2));
  62249. },
  62250. decimalFraction() {
  62251. switch (c) {
  62252. case "e":
  62253. case "E":
  62254. buffer2 += read();
  62255. lexState = "decimalExponent";
  62256. return;
  62257. }
  62258. if (util.isDigit(c)) {
  62259. buffer2 += read();
  62260. return;
  62261. }
  62262. return newToken("numeric", sign * Number(buffer2));
  62263. },
  62264. decimalExponent() {
  62265. switch (c) {
  62266. case "+":
  62267. case "-":
  62268. buffer2 += read();
  62269. lexState = "decimalExponentSign";
  62270. return;
  62271. }
  62272. if (util.isDigit(c)) {
  62273. buffer2 += read();
  62274. lexState = "decimalExponentInteger";
  62275. return;
  62276. }
  62277. throw invalidChar(read());
  62278. },
  62279. decimalExponentSign() {
  62280. if (util.isDigit(c)) {
  62281. buffer2 += read();
  62282. lexState = "decimalExponentInteger";
  62283. return;
  62284. }
  62285. throw invalidChar(read());
  62286. },
  62287. decimalExponentInteger() {
  62288. if (util.isDigit(c)) {
  62289. buffer2 += read();
  62290. return;
  62291. }
  62292. return newToken("numeric", sign * Number(buffer2));
  62293. },
  62294. hexadecimal() {
  62295. if (util.isHexDigit(c)) {
  62296. buffer2 += read();
  62297. lexState = "hexadecimalInteger";
  62298. return;
  62299. }
  62300. throw invalidChar(read());
  62301. },
  62302. hexadecimalInteger() {
  62303. if (util.isHexDigit(c)) {
  62304. buffer2 += read();
  62305. return;
  62306. }
  62307. return newToken("numeric", sign * Number(buffer2));
  62308. },
  62309. string() {
  62310. switch (c) {
  62311. case "\\":
  62312. read();
  62313. buffer2 += escape2();
  62314. return;
  62315. case '"':
  62316. if (doubleQuote) {
  62317. read();
  62318. return newToken("string", buffer2);
  62319. }
  62320. buffer2 += read();
  62321. return;
  62322. case "'":
  62323. if (!doubleQuote) {
  62324. read();
  62325. return newToken("string", buffer2);
  62326. }
  62327. buffer2 += read();
  62328. return;
  62329. case "\n":
  62330. case "\r":
  62331. throw invalidChar(read());
  62332. case "\u2028":
  62333. case "\u2029":
  62334. separatorChar(c);
  62335. break;
  62336. case void 0:
  62337. throw invalidChar(read());
  62338. }
  62339. buffer2 += read();
  62340. },
  62341. start() {
  62342. switch (c) {
  62343. case "{":
  62344. case "[":
  62345. return newToken("punctuator", read());
  62346. }
  62347. lexState = "value";
  62348. },
  62349. beforePropertyName() {
  62350. switch (c) {
  62351. case "$":
  62352. case "_":
  62353. buffer2 = read();
  62354. lexState = "identifierName";
  62355. return;
  62356. case "\\":
  62357. read();
  62358. lexState = "identifierNameStartEscape";
  62359. return;
  62360. case "}":
  62361. return newToken("punctuator", read());
  62362. case '"':
  62363. case "'":
  62364. doubleQuote = read() === '"';
  62365. lexState = "string";
  62366. return;
  62367. }
  62368. if (util.isIdStartChar(c)) {
  62369. buffer2 += read();
  62370. lexState = "identifierName";
  62371. return;
  62372. }
  62373. throw invalidChar(read());
  62374. },
  62375. afterPropertyName() {
  62376. if (c === ":") {
  62377. return newToken("punctuator", read());
  62378. }
  62379. throw invalidChar(read());
  62380. },
  62381. beforePropertyValue() {
  62382. lexState = "value";
  62383. },
  62384. afterPropertyValue() {
  62385. switch (c) {
  62386. case ",":
  62387. case "}":
  62388. return newToken("punctuator", read());
  62389. }
  62390. throw invalidChar(read());
  62391. },
  62392. beforeArrayValue() {
  62393. if (c === "]") {
  62394. return newToken("punctuator", read());
  62395. }
  62396. lexState = "value";
  62397. },
  62398. afterArrayValue() {
  62399. switch (c) {
  62400. case ",":
  62401. case "]":
  62402. return newToken("punctuator", read());
  62403. }
  62404. throw invalidChar(read());
  62405. },
  62406. end() {
  62407. throw invalidChar(read());
  62408. }
  62409. };
  62410. parseStates = {
  62411. start() {
  62412. if (token.type === "eof") {
  62413. throw invalidEOF();
  62414. }
  62415. push2();
  62416. },
  62417. beforePropertyName() {
  62418. switch (token.type) {
  62419. case "identifier":
  62420. case "string":
  62421. key = token.value;
  62422. parseState = "afterPropertyName";
  62423. return;
  62424. case "punctuator":
  62425. pop();
  62426. return;
  62427. case "eof":
  62428. throw invalidEOF();
  62429. }
  62430. },
  62431. afterPropertyName() {
  62432. if (token.type === "eof") {
  62433. throw invalidEOF();
  62434. }
  62435. parseState = "beforePropertyValue";
  62436. },
  62437. beforePropertyValue() {
  62438. if (token.type === "eof") {
  62439. throw invalidEOF();
  62440. }
  62441. push2();
  62442. },
  62443. beforeArrayValue() {
  62444. if (token.type === "eof") {
  62445. throw invalidEOF();
  62446. }
  62447. if (token.type === "punctuator" && token.value === "]") {
  62448. pop();
  62449. return;
  62450. }
  62451. push2();
  62452. },
  62453. afterPropertyValue() {
  62454. if (token.type === "eof") {
  62455. throw invalidEOF();
  62456. }
  62457. switch (token.value) {
  62458. case ",":
  62459. parseState = "beforePropertyName";
  62460. return;
  62461. case "}":
  62462. pop();
  62463. }
  62464. },
  62465. afterArrayValue() {
  62466. if (token.type === "eof") {
  62467. throw invalidEOF();
  62468. }
  62469. switch (token.value) {
  62470. case ",":
  62471. parseState = "beforeArrayValue";
  62472. return;
  62473. case "]":
  62474. pop();
  62475. }
  62476. },
  62477. end() {
  62478. }
  62479. };
  62480. stringify4 = function stringify5(value2, replacer, space2) {
  62481. const stack2 = [];
  62482. let indent = "";
  62483. let propertyList;
  62484. let replacerFunc;
  62485. let gap = "";
  62486. let quote;
  62487. if (replacer != null && typeof replacer === "object" && !Array.isArray(replacer)) {
  62488. space2 = replacer.space;
  62489. quote = replacer.quote;
  62490. replacer = replacer.replacer;
  62491. }
  62492. if (typeof replacer === "function") {
  62493. replacerFunc = replacer;
  62494. } else if (Array.isArray(replacer)) {
  62495. propertyList = [];
  62496. for (const v of replacer) {
  62497. let item;
  62498. if (typeof v === "string") {
  62499. item = v;
  62500. } else if (typeof v === "number" || v instanceof String || v instanceof Number) {
  62501. item = String(v);
  62502. }
  62503. if (item !== void 0 && propertyList.indexOf(item) < 0) {
  62504. propertyList.push(item);
  62505. }
  62506. }
  62507. }
  62508. if (space2 instanceof Number) {
  62509. space2 = Number(space2);
  62510. } else if (space2 instanceof String) {
  62511. space2 = String(space2);
  62512. }
  62513. if (typeof space2 === "number") {
  62514. if (space2 > 0) {
  62515. space2 = Math.min(10, Math.floor(space2));
  62516. gap = " ".substr(0, space2);
  62517. }
  62518. } else if (typeof space2 === "string") {
  62519. gap = space2.substr(0, 10);
  62520. }
  62521. return serializeProperty("", { "": value2 });
  62522. function serializeProperty(key2, holder) {
  62523. let value3 = holder[key2];
  62524. if (value3 != null) {
  62525. if (typeof value3.toJSON5 === "function") {
  62526. value3 = value3.toJSON5(key2);
  62527. } else if (typeof value3.toJSON === "function") {
  62528. value3 = value3.toJSON(key2);
  62529. }
  62530. }
  62531. if (replacerFunc) {
  62532. value3 = replacerFunc.call(holder, key2, value3);
  62533. }
  62534. if (value3 instanceof Number) {
  62535. value3 = Number(value3);
  62536. } else if (value3 instanceof String) {
  62537. value3 = String(value3);
  62538. } else if (value3 instanceof Boolean) {
  62539. value3 = value3.valueOf();
  62540. }
  62541. switch (value3) {
  62542. case null:
  62543. return "null";
  62544. case true:
  62545. return "true";
  62546. case false:
  62547. return "false";
  62548. }
  62549. if (typeof value3 === "string") {
  62550. return quoteString(value3, false);
  62551. }
  62552. if (typeof value3 === "number") {
  62553. return String(value3);
  62554. }
  62555. if (typeof value3 === "object") {
  62556. return Array.isArray(value3) ? serializeArray(value3) : serializeObject(value3);
  62557. }
  62558. return void 0;
  62559. }
  62560. function quoteString(value3) {
  62561. const quotes = {
  62562. "'": 0.1,
  62563. '"': 0.2
  62564. };
  62565. const replacements = {
  62566. "'": "\\'",
  62567. '"': '\\"',
  62568. "\\": "\\\\",
  62569. "\b": "\\b",
  62570. "\f": "\\f",
  62571. "\n": "\\n",
  62572. "\r": "\\r",
  62573. " ": "\\t",
  62574. "\v": "\\v",
  62575. "\0": "\\0",
  62576. "\u2028": "\\u2028",
  62577. "\u2029": "\\u2029"
  62578. };
  62579. let product = "";
  62580. for (let i = 0; i < value3.length; i++) {
  62581. const c2 = value3[i];
  62582. switch (c2) {
  62583. case "'":
  62584. case '"':
  62585. quotes[c2]++;
  62586. product += c2;
  62587. continue;
  62588. case "\0":
  62589. if (util.isDigit(value3[i + 1])) {
  62590. product += "\\x00";
  62591. continue;
  62592. }
  62593. }
  62594. if (replacements[c2]) {
  62595. product += replacements[c2];
  62596. continue;
  62597. }
  62598. if (c2 < " ") {
  62599. let hexString = c2.charCodeAt(0).toString(16);
  62600. product += "\\x" + ("00" + hexString).substring(hexString.length);
  62601. continue;
  62602. }
  62603. product += c2;
  62604. }
  62605. const quoteChar = quote || Object.keys(quotes).reduce((a, b) => quotes[a] < quotes[b] ? a : b);
  62606. product = product.replace(new RegExp(quoteChar, "g"), replacements[quoteChar]);
  62607. return quoteChar + product + quoteChar;
  62608. }
  62609. function serializeObject(value3) {
  62610. if (stack2.indexOf(value3) >= 0) {
  62611. throw TypeError("Converting circular structure to JSON5");
  62612. }
  62613. stack2.push(value3);
  62614. let stepback = indent;
  62615. indent = indent + gap;
  62616. let keys2 = propertyList || Object.keys(value3);
  62617. let partial = [];
  62618. for (const key2 of keys2) {
  62619. const propertyString = serializeProperty(key2, value3);
  62620. if (propertyString !== void 0) {
  62621. let member = serializeKey(key2) + ":";
  62622. if (gap !== "") {
  62623. member += " ";
  62624. }
  62625. member += propertyString;
  62626. partial.push(member);
  62627. }
  62628. }
  62629. let final;
  62630. if (partial.length === 0) {
  62631. final = "{}";
  62632. } else {
  62633. let properties;
  62634. if (gap === "") {
  62635. properties = partial.join(",");
  62636. final = "{" + properties + "}";
  62637. } else {
  62638. let separator = ",\n" + indent;
  62639. properties = partial.join(separator);
  62640. final = "{\n" + indent + properties + ",\n" + stepback + "}";
  62641. }
  62642. }
  62643. stack2.pop();
  62644. indent = stepback;
  62645. return final;
  62646. }
  62647. function serializeKey(key2) {
  62648. if (key2.length === 0) {
  62649. return quoteString(key2, true);
  62650. }
  62651. const firstChar = String.fromCodePoint(key2.codePointAt(0));
  62652. if (!util.isIdStartChar(firstChar)) {
  62653. return quoteString(key2, true);
  62654. }
  62655. for (let i = firstChar.length; i < key2.length; i++) {
  62656. if (!util.isIdContinueChar(String.fromCodePoint(key2.codePointAt(i)))) {
  62657. return quoteString(key2, true);
  62658. }
  62659. }
  62660. return key2;
  62661. }
  62662. function serializeArray(value3) {
  62663. if (stack2.indexOf(value3) >= 0) {
  62664. throw TypeError("Converting circular structure to JSON5");
  62665. }
  62666. stack2.push(value3);
  62667. let stepback = indent;
  62668. indent = indent + gap;
  62669. let partial = [];
  62670. for (let i = 0; i < value3.length; i++) {
  62671. const propertyString = serializeProperty(String(i), value3);
  62672. partial.push(propertyString !== void 0 ? propertyString : "null");
  62673. }
  62674. let final;
  62675. if (partial.length === 0) {
  62676. final = "[]";
  62677. } else {
  62678. if (gap === "") {
  62679. let properties = partial.join(",");
  62680. final = "[" + properties + "]";
  62681. } else {
  62682. let separator = ",\n" + indent;
  62683. let properties = partial.join(separator);
  62684. final = "[\n" + indent + properties + ",\n" + stepback + "]";
  62685. }
  62686. }
  62687. stack2.pop();
  62688. indent = stepback;
  62689. return final;
  62690. }
  62691. };
  62692. JSON5 = {
  62693. parse: parse7,
  62694. stringify: stringify4
  62695. };
  62696. lib = JSON5;
  62697. dist_default = lib;
  62698. }
  62699. });
  62700. // node_modules/@babel/core/lib/config/helpers/config-api.js
  62701. var require_config_api = __commonJS({
  62702. "node_modules/@babel/core/lib/config/helpers/config-api.js"(exports) {
  62703. "use strict";
  62704. Object.defineProperty(exports, "__esModule", {
  62705. value: true
  62706. });
  62707. exports.makeConfigAPI = makeConfigAPI;
  62708. exports.makePluginAPI = makePluginAPI;
  62709. exports.makePresetAPI = makePresetAPI;
  62710. function _semver() {
  62711. const data3 = require_semver();
  62712. _semver = function() {
  62713. return data3;
  62714. };
  62715. return data3;
  62716. }
  62717. var _ = require_lib32();
  62718. var _caching = require_caching();
  62719. function makeConfigAPI(cache) {
  62720. const env = (value2) => cache.using((data3) => {
  62721. if (typeof value2 === "undefined")
  62722. return data3.envName;
  62723. if (typeof value2 === "function") {
  62724. return (0, _caching.assertSimpleType)(value2(data3.envName));
  62725. }
  62726. return (Array.isArray(value2) ? value2 : [value2]).some((entry) => {
  62727. if (typeof entry !== "string") {
  62728. throw new Error("Unexpected non-string value");
  62729. }
  62730. return entry === data3.envName;
  62731. });
  62732. });
  62733. const caller = (cb) => cache.using((data3) => (0, _caching.assertSimpleType)(cb(data3.caller)));
  62734. return {
  62735. version: _.version,
  62736. cache: cache.simple(),
  62737. env,
  62738. async: () => false,
  62739. caller,
  62740. assertVersion
  62741. };
  62742. }
  62743. function makePresetAPI(cache, externalDependencies) {
  62744. const targets = () => JSON.parse(cache.using((data3) => JSON.stringify(data3.targets)));
  62745. const addExternalDependency = (ref3) => {
  62746. externalDependencies.push(ref3);
  62747. };
  62748. return Object.assign({}, makeConfigAPI(cache), {
  62749. targets,
  62750. addExternalDependency
  62751. });
  62752. }
  62753. function makePluginAPI(cache, externalDependencies) {
  62754. const assumption = (name2) => cache.using((data3) => data3.assumptions[name2]);
  62755. return Object.assign({}, makePresetAPI(cache, externalDependencies), {
  62756. assumption
  62757. });
  62758. }
  62759. function assertVersion(range) {
  62760. if (typeof range === "number") {
  62761. if (!Number.isInteger(range)) {
  62762. throw new Error("Expected string or integer value.");
  62763. }
  62764. range = `^${range}.0.0-0`;
  62765. }
  62766. if (typeof range !== "string") {
  62767. throw new Error("Expected string or integer value.");
  62768. }
  62769. if (_semver().satisfies(_.version, range))
  62770. return;
  62771. const limit = Error.stackTraceLimit;
  62772. if (typeof limit === "number" && limit < 25) {
  62773. Error.stackTraceLimit = 25;
  62774. }
  62775. const err = new Error(`Requires Babel "${range}", but was loaded with "${_.version}". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.`);
  62776. if (typeof limit === "number") {
  62777. Error.stackTraceLimit = limit;
  62778. }
  62779. throw Object.assign(err, {
  62780. code: "BABEL_VERSION_UNSUPPORTED",
  62781. version: _.version,
  62782. range
  62783. });
  62784. }
  62785. }
  62786. });
  62787. // node_modules/@babel/core/lib/config/helpers/deep-array.js
  62788. var require_deep_array = __commonJS({
  62789. "node_modules/@babel/core/lib/config/helpers/deep-array.js"(exports) {
  62790. "use strict";
  62791. Object.defineProperty(exports, "__esModule", {
  62792. value: true
  62793. });
  62794. exports.finalize = finalize;
  62795. exports.flattenToSet = flattenToSet;
  62796. function finalize(deepArr) {
  62797. return Object.freeze(deepArr);
  62798. }
  62799. function flattenToSet(arr) {
  62800. const result = /* @__PURE__ */ new Set();
  62801. const stack2 = [arr];
  62802. while (stack2.length > 0) {
  62803. for (const el of stack2.pop()) {
  62804. if (Array.isArray(el))
  62805. stack2.push(el);
  62806. else
  62807. result.add(el);
  62808. }
  62809. }
  62810. return result;
  62811. }
  62812. }
  62813. });
  62814. // node_modules/@babel/core/lib/config/plugin.js
  62815. var require_plugin = __commonJS({
  62816. "node_modules/@babel/core/lib/config/plugin.js"(exports) {
  62817. "use strict";
  62818. Object.defineProperty(exports, "__esModule", {
  62819. value: true
  62820. });
  62821. exports.default = void 0;
  62822. var _deepArray = require_deep_array();
  62823. var Plugin = class {
  62824. constructor(plugin2, options, key2, externalDependencies = (0, _deepArray.finalize)([])) {
  62825. this.key = void 0;
  62826. this.manipulateOptions = void 0;
  62827. this.post = void 0;
  62828. this.pre = void 0;
  62829. this.visitor = void 0;
  62830. this.parserOverride = void 0;
  62831. this.generatorOverride = void 0;
  62832. this.options = void 0;
  62833. this.externalDependencies = void 0;
  62834. this.key = plugin2.name || key2;
  62835. this.manipulateOptions = plugin2.manipulateOptions;
  62836. this.post = plugin2.post;
  62837. this.pre = plugin2.pre;
  62838. this.visitor = plugin2.visitor || {};
  62839. this.parserOverride = plugin2.parserOverride;
  62840. this.generatorOverride = plugin2.generatorOverride;
  62841. this.options = options;
  62842. this.externalDependencies = externalDependencies;
  62843. }
  62844. };
  62845. exports.default = Plugin;
  62846. }
  62847. });
  62848. // node_modules/@babel/core/lib/gensync-utils/functional.js
  62849. var require_functional = __commonJS({
  62850. "node_modules/@babel/core/lib/gensync-utils/functional.js"(exports) {
  62851. "use strict";
  62852. Object.defineProperty(exports, "__esModule", {
  62853. value: true
  62854. });
  62855. exports.once = once;
  62856. var _async = require_async();
  62857. function once(fn) {
  62858. let result;
  62859. let resultP;
  62860. return function* () {
  62861. if (result)
  62862. return result;
  62863. if (!(yield* (0, _async.isAsync)()))
  62864. return result = yield* fn();
  62865. if (resultP)
  62866. return yield* (0, _async.waitFor)(resultP);
  62867. let resolve, reject;
  62868. resultP = new Promise((res, rej) => {
  62869. resolve = res;
  62870. reject = rej;
  62871. });
  62872. try {
  62873. result = yield* fn();
  62874. resultP = null;
  62875. resolve(result);
  62876. return result;
  62877. } catch (error) {
  62878. reject(error);
  62879. throw error;
  62880. }
  62881. };
  62882. }
  62883. }
  62884. });
  62885. // node_modules/node-releases/data/processed/envs.json
  62886. var require_envs = __commonJS({
  62887. "node_modules/node-releases/data/processed/envs.json"(exports, module) {
  62888. module.exports = [{ name: "nodejs", version: "0.2.0", date: "2011-08-26", lts: false, security: false }, { name: "nodejs", version: "0.3.0", date: "2011-08-26", lts: false, security: false }, { name: "nodejs", version: "0.4.0", date: "2011-08-26", lts: false, security: false }, { name: "nodejs", version: "0.5.0", date: "2011-08-26", lts: false, security: false }, { name: "nodejs", version: "0.6.0", date: "2011-11-04", lts: false, security: false }, { name: "nodejs", version: "0.7.0", date: "2012-01-17", lts: false, security: false }, { name: "nodejs", version: "0.8.0", date: "2012-06-22", lts: false, security: false }, { name: "nodejs", version: "0.9.0", date: "2012-07-20", lts: false, security: false }, { name: "nodejs", version: "0.10.0", date: "2013-03-11", lts: false, security: false }, { name: "nodejs", version: "0.11.0", date: "2013-03-28", lts: false, security: false }, { name: "nodejs", version: "0.12.0", date: "2015-02-06", lts: false, security: false }, { name: "nodejs", version: "4.0.0", date: "2015-09-08", lts: false, security: false }, { name: "nodejs", version: "4.1.0", date: "2015-09-17", lts: false, security: false }, { name: "nodejs", version: "4.2.0", date: "2015-10-12", lts: "Argon", security: false }, { name: "nodejs", version: "4.3.0", date: "2016-02-09", lts: "Argon", security: false }, { name: "nodejs", version: "4.4.0", date: "2016-03-08", lts: "Argon", security: false }, { name: "nodejs", version: "4.5.0", date: "2016-08-16", lts: "Argon", security: false }, { name: "nodejs", version: "4.6.0", date: "2016-09-27", lts: "Argon", security: true }, { name: "nodejs", version: "4.7.0", date: "2016-12-06", lts: "Argon", security: false }, { name: "nodejs", version: "4.8.0", date: "2017-02-21", lts: "Argon", security: false }, { name: "nodejs", version: "4.9.0", date: "2018-03-28", lts: "Argon", security: true }, { name: "nodejs", version: "5.0.0", date: "2015-10-29", lts: false, security: false }, { name: "nodejs", version: "5.1.0", date: "2015-11-17", lts: false, security: false }, { name: "nodejs", version: "5.2.0", date: "2015-12-09", lts: false, security: false }, { name: "nodejs", version: "5.3.0", date: "2015-12-15", lts: false, security: false }, { name: "nodejs", version: "5.4.0", date: "2016-01-06", lts: false, security: false }, { name: "nodejs", version: "5.5.0", date: "2016-01-21", lts: false, security: false }, { name: "nodejs", version: "5.6.0", date: "2016-02-09", lts: false, security: false }, { name: "nodejs", version: "5.7.0", date: "2016-02-23", lts: false, security: false }, { name: "nodejs", version: "5.8.0", date: "2016-03-09", lts: false, security: false }, { name: "nodejs", version: "5.9.0", date: "2016-03-16", lts: false, security: false }, { name: "nodejs", version: "5.10.0", date: "2016-04-01", lts: false, security: false }, { name: "nodejs", version: "5.11.0", date: "2016-04-21", lts: false, security: false }, { name: "nodejs", version: "5.12.0", date: "2016-06-23", lts: false, security: false }, { name: "nodejs", version: "6.0.0", date: "2016-04-26", lts: false, security: false }, { name: "nodejs", version: "6.1.0", date: "2016-05-05", lts: false, security: false }, { name: "nodejs", version: "6.2.0", date: "2016-05-17", lts: false, security: false }, { name: "nodejs", version: "6.3.0", date: "2016-07-06", lts: false, security: false }, { name: "nodejs", version: "6.4.0", date: "2016-08-12", lts: false, security: false }, { name: "nodejs", version: "6.5.0", date: "2016-08-26", lts: false, security: false }, { name: "nodejs", version: "6.6.0", date: "2016-09-14", lts: false, security: false }, { name: "nodejs", version: "6.7.0", date: "2016-09-27", lts: false, security: true }, { name: "nodejs", version: "6.8.0", date: "2016-10-12", lts: false, security: false }, { name: "nodejs", version: "6.9.0", date: "2016-10-18", lts: "Boron", security: false }, { name: "nodejs", version: "6.10.0", date: "2017-02-21", lts: "Boron", security: false }, { name: "nodejs", version: "6.11.0", date: "2017-06-06", lts: "Boron", security: false }, { name: "nodejs", version: "6.12.0", date: "2017-11-06", lts: "Boron", security: false }, { name: "nodejs", version: "6.13.0", date: "2018-02-10", lts: "Boron", security: false }, { name: "nodejs", version: "6.14.0", date: "2018-03-28", lts: "Boron", security: true }, { name: "nodejs", version: "6.15.0", date: "2018-11-27", lts: "Boron", security: true }, { name: "nodejs", version: "6.16.0", date: "2018-12-26", lts: "Boron", security: false }, { name: "nodejs", version: "6.17.0", date: "2019-02-28", lts: "Boron", security: true }, { name: "nodejs", version: "7.0.0", date: "2016-10-25", lts: false, security: false }, { name: "nodejs", version: "7.1.0", date: "2016-11-08", lts: false, security: false }, { name: "nodejs", version: "7.2.0", date: "2016-11-22", lts: false, security: false }, { name: "nodejs", version: "7.3.0", date: "2016-12-20", lts: false, security: false }, { name: "nodejs", version: "7.4.0", date: "2017-01-04", lts: false, security: false }, { name: "nodejs", version: "7.5.0", date: "2017-01-31", lts: false, security: false }, { name: "nodejs", version: "7.6.0", date: "2017-02-21", lts: false, security: false }, { name: "nodejs", version: "7.7.0", date: "2017-02-28", lts: false, security: false }, { name: "nodejs", version: "7.8.0", date: "2017-03-29", lts: false, security: false }, { name: "nodejs", version: "7.9.0", date: "2017-04-11", lts: false, security: false }, { name: "nodejs", version: "7.10.0", date: "2017-05-02", lts: false, security: false }, { name: "nodejs", version: "8.0.0", date: "2017-05-30", lts: false, security: false }, { name: "nodejs", version: "8.1.0", date: "2017-06-08", lts: false, security: false }, { name: "nodejs", version: "8.2.0", date: "2017-07-19", lts: false, security: false }, { name: "nodejs", version: "8.3.0", date: "2017-08-08", lts: false, security: false }, { name: "nodejs", version: "8.4.0", date: "2017-08-15", lts: false, security: false }, { name: "nodejs", version: "8.5.0", date: "2017-09-12", lts: false, security: false }, { name: "nodejs", version: "8.6.0", date: "2017-09-26", lts: false, security: false }, { name: "nodejs", version: "8.7.0", date: "2017-10-11", lts: false, security: false }, { name: "nodejs", version: "8.8.0", date: "2017-10-24", lts: false, security: false }, { name: "nodejs", version: "8.9.0", date: "2017-10-31", lts: "Carbon", security: false }, { name: "nodejs", version: "8.10.0", date: "2018-03-06", lts: "Carbon", security: false }, { name: "nodejs", version: "8.11.0", date: "2018-03-28", lts: "Carbon", security: true }, { name: "nodejs", version: "8.12.0", date: "2018-09-10", lts: "Carbon", security: false }, { name: "nodejs", version: "8.13.0", date: "2018-11-20", lts: "Carbon", security: false }, { name: "nodejs", version: "8.14.0", date: "2018-11-27", lts: "Carbon", security: true }, { name: "nodejs", version: "8.15.0", date: "2018-12-26", lts: "Carbon", security: false }, { name: "nodejs", version: "8.16.0", date: "2019-04-16", lts: "Carbon", security: false }, { name: "nodejs", version: "8.17.0", date: "2019-12-17", lts: "Carbon", security: true }, { name: "nodejs", version: "9.0.0", date: "2017-10-31", lts: false, security: false }, { name: "nodejs", version: "9.1.0", date: "2017-11-07", lts: false, security: false }, { name: "nodejs", version: "9.2.0", date: "2017-11-14", lts: false, security: false }, { name: "nodejs", version: "9.3.0", date: "2017-12-12", lts: false, security: false }, { name: "nodejs", version: "9.4.0", date: "2018-01-10", lts: false, security: false }, { name: "nodejs", version: "9.5.0", date: "2018-01-31", lts: false, security: false }, { name: "nodejs", version: "9.6.0", date: "2018-02-21", lts: false, security: false }, { name: "nodejs", version: "9.7.0", date: "2018-03-01", lts: false, security: false }, { name: "nodejs", version: "9.8.0", date: "2018-03-07", lts: false, security: false }, { name: "nodejs", version: "9.9.0", date: "2018-03-21", lts: false, security: false }, { name: "nodejs", version: "9.10.0", date: "2018-03-28", lts: false, security: true }, { name: "nodejs", version: "9.11.0", date: "2018-04-04", lts: false, security: false }, { name: "nodejs", version: "10.0.0", date: "2018-04-24", lts: false, security: false }, { name: "nodejs", version: "10.1.0", date: "2018-05-08", lts: false, security: false }, { name: "nodejs", version: "10.2.0", date: "2018-05-23", lts: false, security: false }, { name: "nodejs", version: "10.3.0", date: "2018-05-29", lts: false, security: false }, { name: "nodejs", version: "10.4.0", date: "2018-06-06", lts: false, security: false }, { name: "nodejs", version: "10.5.0", date: "2018-06-20", lts: false, security: false }, { name: "nodejs", version: "10.6.0", date: "2018-07-04", lts: false, security: false }, { name: "nodejs", version: "10.7.0", date: "2018-07-18", lts: false, security: false }, { name: "nodejs", version: "10.8.0", date: "2018-08-01", lts: false, security: false }, { name: "nodejs", version: "10.9.0", date: "2018-08-15", lts: false, security: false }, { name: "nodejs", version: "10.10.0", date: "2018-09-06", lts: false, security: false }, { name: "nodejs", version: "10.11.0", date: "2018-09-19", lts: false, security: false }, { name: "nodejs", version: "10.12.0", date: "2018-10-10", lts: false, security: false }, { name: "nodejs", version: "10.13.0", date: "2018-10-30", lts: "Dubnium", security: false }, { name: "nodejs", version: "10.14.0", date: "2018-11-27", lts: "Dubnium", security: true }, { name: "nodejs", version: "10.15.0", date: "2018-12-26", lts: "Dubnium", security: false }, { name: "nodejs", version: "10.16.0", date: "2019-05-28", lts: "Dubnium", security: false }, { name: "nodejs", version: "10.17.0", date: "2019-10-22", lts: "Dubnium", security: false }, { name: "nodejs", version: "10.18.0", date: "2019-12-17", lts: "Dubnium", security: true }, { name: "nodejs", version: "10.19.0", date: "2020-02-05", lts: "Dubnium", security: true }, { name: "nodejs", version: "10.20.0", date: "2020-03-26", lts: "Dubnium", security: false }, { name: "nodejs", version: "10.21.0", date: "2020-06-02", lts: "Dubnium", security: true }, { name: "nodejs", version: "10.22.0", date: "2020-07-21", lts: "Dubnium", security: false }, { name: "nodejs", version: "10.23.0", date: "2020-10-27", lts: "Dubnium", security: false }, { name: "nodejs", version: "10.24.0", date: "2021-02-23", lts: "Dubnium", security: true }, { name: "nodejs", version: "11.0.0", date: "2018-10-23", lts: false, security: false }, { name: "nodejs", version: "11.1.0", date: "2018-10-30", lts: false, security: false }, { name: "nodejs", version: "11.2.0", date: "2018-11-15", lts: false, security: false }, { name: "nodejs", version: "11.3.0", date: "2018-11-27", lts: false, security: true }, { name: "nodejs", version: "11.4.0", date: "2018-12-07", lts: false, security: false }, { name: "nodejs", version: "11.5.0", date: "2018-12-18", lts: false, security: false }, { name: "nodejs", version: "11.6.0", date: "2018-12-26", lts: false, security: false }, { name: "nodejs", version: "11.7.0", date: "2019-01-17", lts: false, security: false }, { name: "nodejs", version: "11.8.0", date: "2019-01-24", lts: false, security: false }, { name: "nodejs", version: "11.9.0", date: "2019-01-30", lts: false, security: false }, { name: "nodejs", version: "11.10.0", date: "2019-02-14", lts: false, security: false }, { name: "nodejs", version: "11.11.0", date: "2019-03-05", lts: false, security: false }, { name: "nodejs", version: "11.12.0", date: "2019-03-14", lts: false, security: false }, { name: "nodejs", version: "11.13.0", date: "2019-03-28", lts: false, security: false }, { name: "nodejs", version: "11.14.0", date: "2019-04-10", lts: false, security: false }, { name: "nodejs", version: "11.15.0", date: "2019-04-30", lts: false, security: false }, { name: "nodejs", version: "12.0.0", date: "2019-04-23", lts: false, security: false }, { name: "nodejs", version: "12.1.0", date: "2019-04-29", lts: false, security: false }, { name: "nodejs", version: "12.2.0", date: "2019-05-07", lts: false, security: false }, { name: "nodejs", version: "12.3.0", date: "2019-05-21", lts: false, security: false }, { name: "nodejs", version: "12.4.0", date: "2019-06-04", lts: false, security: false }, { name: "nodejs", version: "12.5.0", date: "2019-06-26", lts: false, security: false }, { name: "nodejs", version: "12.6.0", date: "2019-07-03", lts: false, security: false }, { name: "nodejs", version: "12.7.0", date: "2019-07-23", lts: false, security: false }, { name: "nodejs", version: "12.8.0", date: "2019-08-06", lts: false, security: false }, { name: "nodejs", version: "12.9.0", date: "2019-08-20", lts: false, security: false }, { name: "nodejs", version: "12.10.0", date: "2019-09-04", lts: false, security: false }, { name: "nodejs", version: "12.11.0", date: "2019-09-25", lts: false, security: false }, { name: "nodejs", version: "12.12.0", date: "2019-10-11", lts: false, security: false }, { name: "nodejs", version: "12.13.0", date: "2019-10-21", lts: "Erbium", security: false }, { name: "nodejs", version: "12.14.0", date: "2019-12-17", lts: "Erbium", security: true }, { name: "nodejs", version: "12.15.0", date: "2020-02-05", lts: "Erbium", security: true }, { name: "nodejs", version: "12.16.0", date: "2020-02-11", lts: "Erbium", security: false }, { name: "nodejs", version: "12.17.0", date: "2020-05-26", lts: "Erbium", security: false }, { name: "nodejs", version: "12.18.0", date: "2020-06-02", lts: "Erbium", security: true }, { name: "nodejs", version: "12.19.0", date: "2020-10-06", lts: "Erbium", security: false }, { name: "nodejs", version: "12.20.0", date: "2020-11-24", lts: "Erbium", security: false }, { name: "nodejs", version: "12.21.0", date: "2021-02-23", lts: "Erbium", security: true }, { name: "nodejs", version: "12.22.0", date: "2021-03-30", lts: "Erbium", security: false }, { name: "nodejs", version: "13.0.0", date: "2019-10-22", lts: false, security: false }, { name: "nodejs", version: "13.1.0", date: "2019-11-05", lts: false, security: false }, { name: "nodejs", version: "13.2.0", date: "2019-11-21", lts: false, security: false }, { name: "nodejs", version: "13.3.0", date: "2019-12-03", lts: false, security: false }, { name: "nodejs", version: "13.4.0", date: "2019-12-17", lts: false, security: true }, { name: "nodejs", version: "13.5.0", date: "2019-12-18", lts: false, security: false }, { name: "nodejs", version: "13.6.0", date: "2020-01-07", lts: false, security: false }, { name: "nodejs", version: "13.7.0", date: "2020-01-21", lts: false, security: false }, { name: "nodejs", version: "13.8.0", date: "2020-02-05", lts: false, security: true }, { name: "nodejs", version: "13.9.0", date: "2020-02-18", lts: false, security: false }, { name: "nodejs", version: "13.10.0", date: "2020-03-04", lts: false, security: false }, { name: "nodejs", version: "13.11.0", date: "2020-03-12", lts: false, security: false }, { name: "nodejs", version: "13.12.0", date: "2020-03-26", lts: false, security: false }, { name: "nodejs", version: "13.13.0", date: "2020-04-14", lts: false, security: false }, { name: "nodejs", version: "13.14.0", date: "2020-04-29", lts: false, security: false }, { name: "nodejs", version: "14.0.0", date: "2020-04-21", lts: false, security: false }, { name: "nodejs", version: "14.1.0", date: "2020-04-29", lts: false, security: false }, { name: "nodejs", version: "14.2.0", date: "2020-05-05", lts: false, security: false }, { name: "nodejs", version: "14.3.0", date: "2020-05-19", lts: false, security: false }, { name: "nodejs", version: "14.4.0", date: "2020-06-02", lts: false, security: true }, { name: "nodejs", version: "14.5.0", date: "2020-06-30", lts: false, security: false }, { name: "nodejs", version: "14.6.0", date: "2020-07-20", lts: false, security: false }, { name: "nodejs", version: "14.7.0", date: "2020-07-29", lts: false, security: false }, { name: "nodejs", version: "14.8.0", date: "2020-08-11", lts: false, security: false }, { name: "nodejs", version: "14.9.0", date: "2020-08-27", lts: false, security: false }, { name: "nodejs", version: "14.10.0", date: "2020-09-08", lts: false, security: false }, { name: "nodejs", version: "14.11.0", date: "2020-09-15", lts: false, security: true }, { name: "nodejs", version: "14.12.0", date: "2020-09-22", lts: false, security: false }, { name: "nodejs", version: "14.13.0", date: "2020-09-29", lts: false, security: false }, { name: "nodejs", version: "14.14.0", date: "2020-10-15", lts: false, security: false }, { name: "nodejs", version: "14.15.0", date: "2020-10-27", lts: "Fermium", security: false }, { name: "nodejs", version: "14.16.0", date: "2021-02-23", lts: "Fermium", security: true }, { name: "nodejs", version: "14.17.0", date: "2021-05-11", lts: "Fermium", security: false }, { name: "nodejs", version: "14.18.0", date: "2021-09-28", lts: "Fermium", security: false }, { name: "nodejs", version: "14.19.0", date: "2022-02-01", lts: "Fermium", security: false }, { name: "nodejs", version: "14.20.0", date: "2022-07-07", lts: "Fermium", security: true }, { name: "nodejs", version: "14.21.0", date: "2022-11-01", lts: "Fermium", security: false }, { name: "nodejs", version: "15.0.0", date: "2020-10-20", lts: false, security: false }, { name: "nodejs", version: "15.1.0", date: "2020-11-04", lts: false, security: false }, { name: "nodejs", version: "15.2.0", date: "2020-11-10", lts: false, security: false }, { name: "nodejs", version: "15.3.0", date: "2020-11-24", lts: false, security: false }, { name: "nodejs", version: "15.4.0", date: "2020-12-09", lts: false, security: false }, { name: "nodejs", version: "15.5.0", date: "2020-12-22", lts: false, security: false }, { name: "nodejs", version: "15.6.0", date: "2021-01-14", lts: false, security: false }, { name: "nodejs", version: "15.7.0", date: "2021-01-25", lts: false, security: false }, { name: "nodejs", version: "15.8.0", date: "2021-02-02", lts: false, security: false }, { name: "nodejs", version: "15.9.0", date: "2021-02-18", lts: false, security: false }, { name: "nodejs", version: "15.10.0", date: "2021-02-23", lts: false, security: true }, { name: "nodejs", version: "15.11.0", date: "2021-03-03", lts: false, security: false }, { name: "nodejs", version: "15.12.0", date: "2021-03-17", lts: false, security: false }, { name: "nodejs", version: "15.13.0", date: "2021-03-31", lts: false, security: false }, { name: "nodejs", version: "15.14.0", date: "2021-04-06", lts: false, security: false }, { name: "nodejs", version: "16.0.0", date: "2021-04-20", lts: false, security: false }, { name: "nodejs", version: "16.1.0", date: "2021-05-04", lts: false, security: false }, { name: "nodejs", version: "16.2.0", date: "2021-05-19", lts: false, security: false }, { name: "nodejs", version: "16.3.0", date: "2021-06-03", lts: false, security: false }, { name: "nodejs", version: "16.4.0", date: "2021-06-23", lts: false, security: false }, { name: "nodejs", version: "16.5.0", date: "2021-07-14", lts: false, security: false }, { name: "nodejs", version: "16.6.0", date: "2021-07-29", lts: false, security: true }, { name: "nodejs", version: "16.7.0", date: "2021-08-18", lts: false, security: false }, { name: "nodejs", version: "16.8.0", date: "2021-08-25", lts: false, security: false }, { name: "nodejs", version: "16.9.0", date: "2021-09-07", lts: false, security: false }, { name: "nodejs", version: "16.10.0", date: "2021-09-22", lts: false, security: false }, { name: "nodejs", version: "16.11.0", date: "2021-10-08", lts: false, security: false }, { name: "nodejs", version: "16.12.0", date: "2021-10-20", lts: false, security: false }, { name: "nodejs", version: "16.13.0", date: "2021-10-26", lts: "Gallium", security: false }, { name: "nodejs", version: "16.14.0", date: "2022-02-08", lts: "Gallium", security: false }, { name: "nodejs", version: "16.15.0", date: "2022-04-26", lts: "Gallium", security: false }, { name: "nodejs", version: "16.16.0", date: "2022-07-07", lts: "Gallium", security: true }, { name: "nodejs", version: "16.17.0", date: "2022-08-16", lts: "Gallium", security: false }, { name: "nodejs", version: "16.18.0", date: "2022-10-12", lts: "Gallium", security: false }, { name: "nodejs", version: "16.19.0", date: "2022-12-13", lts: "Gallium", security: false }, { name: "nodejs", version: "17.0.0", date: "2021-10-19", lts: false, security: false }, { name: "nodejs", version: "17.1.0", date: "2021-11-09", lts: false, security: false }, { name: "nodejs", version: "17.2.0", date: "2021-11-30", lts: false, security: false }, { name: "nodejs", version: "17.3.0", date: "2021-12-17", lts: false, security: false }, { name: "nodejs", version: "17.4.0", date: "2022-01-18", lts: false, security: false }, { name: "nodejs", version: "17.5.0", date: "2022-02-10", lts: false, security: false }, { name: "nodejs", version: "17.6.0", date: "2022-02-22", lts: false, security: false }, { name: "nodejs", version: "17.7.0", date: "2022-03-09", lts: false, security: false }, { name: "nodejs", version: "17.8.0", date: "2022-03-22", lts: false, security: false }, { name: "nodejs", version: "17.9.0", date: "2022-04-07", lts: false, security: false }, { name: "nodejs", version: "18.0.0", date: "2022-04-18", lts: false, security: false }, { name: "nodejs", version: "18.1.0", date: "2022-05-03", lts: false, security: false }, { name: "nodejs", version: "18.2.0", date: "2022-05-17", lts: false, security: false }, { name: "nodejs", version: "18.3.0", date: "2022-06-02", lts: false, security: false }, { name: "nodejs", version: "18.4.0", date: "2022-06-16", lts: false, security: false }, { name: "nodejs", version: "18.5.0", date: "2022-07-06", lts: false, security: true }, { name: "nodejs", version: "18.6.0", date: "2022-07-13", lts: false, security: false }, { name: "nodejs", version: "18.7.0", date: "2022-07-26", lts: false, security: false }, { name: "nodejs", version: "18.8.0", date: "2022-08-24", lts: false, security: false }, { name: "nodejs", version: "18.9.0", date: "2022-09-07", lts: false, security: false }, { name: "nodejs", version: "18.10.0", date: "2022-09-28", lts: false, security: false }, { name: "nodejs", version: "18.11.0", date: "2022-10-13", lts: false, security: false }, { name: "nodejs", version: "18.12.0", date: "2022-10-25", lts: "Hydrogen", security: false }, { name: "nodejs", version: "18.13.0", date: "2023-01-05", lts: "Hydrogen", security: false }, { name: "nodejs", version: "18.14.0", date: "2023-02-01", lts: "Hydrogen", security: false }, { name: "nodejs", version: "19.0.0", date: "2022-10-17", lts: false, security: false }, { name: "nodejs", version: "19.1.0", date: "2022-11-14", lts: false, security: false }, { name: "nodejs", version: "19.2.0", date: "2022-11-29", lts: false, security: false }, { name: "nodejs", version: "19.3.0", date: "2022-12-14", lts: false, security: false }, { name: "nodejs", version: "19.4.0", date: "2023-01-05", lts: false, security: false }, { name: "nodejs", version: "19.5.0", date: "2023-01-24", lts: false, security: false }, { name: "nodejs", version: "19.6.0", date: "2023-02-01", lts: false, security: false }];
  62889. }
  62890. });
  62891. // node_modules/caniuse-lite/data/browsers.js
  62892. var require_browsers = __commonJS({
  62893. "node_modules/caniuse-lite/data/browsers.js"(exports, module) {
  62894. module.exports = { A: "ie", B: "edge", C: "firefox", D: "chrome", E: "safari", F: "opera", G: "ios_saf", H: "op_mini", I: "android", J: "bb", K: "op_mob", L: "and_chr", M: "and_ff", N: "ie_mob", O: "and_uc", P: "samsung", Q: "and_qq", R: "baidu", S: "kaios" };
  62895. }
  62896. });
  62897. // node_modules/caniuse-lite/dist/unpacker/browsers.js
  62898. var require_browsers2 = __commonJS({
  62899. "node_modules/caniuse-lite/dist/unpacker/browsers.js"(exports, module) {
  62900. module.exports.browsers = require_browsers();
  62901. }
  62902. });
  62903. // node_modules/caniuse-lite/data/browserVersions.js
  62904. var require_browserVersions = __commonJS({
  62905. "node_modules/caniuse-lite/data/browserVersions.js"(exports, module) {
  62906. module.exports = { "0": "22", "1": "23", "2": "24", "3": "25", "4": "26", "5": "27", "6": "28", "7": "29", "8": "30", "9": "31", A: "10", B: "11", C: "12", D: "7", E: "8", F: "9", G: "15", H: "112", I: "4", J: "6", K: "13", L: "14", M: "16", N: "17", O: "18", P: "79", Q: "80", R: "81", S: "83", T: "84", U: "85", V: "86", W: "87", X: "88", Y: "89", Z: "90", a: "91", b: "92", c: "93", d: "94", e: "95", f: "110", g: "20", h: "73", i: "96", j: "97", k: "98", l: "99", m: "100", n: "101", o: "102", p: "103", q: "104", r: "105", s: "106", t: "107", u: "108", v: "109", w: "111", x: "5", y: "19", z: "21", AB: "32", BB: "33", CB: "34", DB: "35", EB: "36", FB: "37", GB: "38", HB: "39", IB: "40", JB: "41", KB: "42", LB: "43", MB: "44", NB: "45", OB: "46", PB: "47", QB: "48", RB: "49", SB: "50", TB: "51", UB: "52", VB: "53", WB: "54", XB: "55", YB: "56", ZB: "57", aB: "58", bB: "60", cB: "62", dB: "63", eB: "64", fB: "65", gB: "66", hB: "67", iB: "68", jB: "69", kB: "70", lB: "71", mB: "72", nB: "74", oB: "75", pB: "76", qB: "77", rB: "78", sB: "11.1", tB: "12.1", uB: "16.0", vB: "3", wB: "59", xB: "61", yB: "82", zB: "113", "0B": "114", "1B": "3.2", "2B": "10.1", "3B": "13.1", "4B": "15.2-15.3", "5B": "15.4", "6B": "15.5", "7B": "15.6", "8B": "16.1", "9B": "16.2", AC: "16.3", BC: "16.4", CC: "16.5", DC: "11.5", EC: "4.2-4.3", FC: "5.5", GC: "2", HC: "3.5", IC: "3.6", JC: "115", KC: "3.1", LC: "5.1", MC: "6.1", NC: "7.1", OC: "9.1", PC: "14.1", QC: "15.1", RC: "TP", SC: "9.5-9.6", TC: "10.0-10.1", UC: "10.5", VC: "10.6", WC: "11.6", XC: "4.0-4.1", YC: "5.0-5.1", ZC: "6.0-6.1", aC: "7.0-7.1", bC: "8.1-8.4", cC: "9.0-9.2", dC: "9.3", eC: "10.0-10.2", fC: "10.3", gC: "11.0-11.2", hC: "11.3-11.4", iC: "12.0-12.1", jC: "12.2-12.5", kC: "13.0-13.1", lC: "13.2", mC: "13.3", nC: "13.4-13.7", oC: "14.0-14.4", pC: "14.5-14.8", qC: "15.0-15.1", rC: "all", sC: "2.1", tC: "2.2", uC: "2.3", vC: "4.1", wC: "4.4", xC: "4.4.3-4.4.4", yC: "13.4", zC: "5.0-5.4", "0C": "6.2-6.4", "1C": "7.2-7.4", "2C": "8.2", "3C": "9.2", "4C": "11.1-11.2", "5C": "12.0", "6C": "13.0", "7C": "14.0", "8C": "15.0", "9C": "17.0", AD: "18.0", BD: "19.0", CD: "13.18", DD: "2.5", ED: "3.0-3.1" };
  62907. }
  62908. });
  62909. // node_modules/caniuse-lite/dist/unpacker/browserVersions.js
  62910. var require_browserVersions2 = __commonJS({
  62911. "node_modules/caniuse-lite/dist/unpacker/browserVersions.js"(exports, module) {
  62912. module.exports.browserVersions = require_browserVersions();
  62913. }
  62914. });
  62915. // node_modules/caniuse-lite/data/agents.js
  62916. var require_agents = __commonJS({
  62917. "node_modules/caniuse-lite/data/agents.js"(exports, module) {
  62918. module.exports = { A: { A: { J: 0.0131217, D: 621152e-8, E: 0.0497493, F: 0.0580409, A: 829156e-8, B: 0.406286, FC: 9298e-6 }, B: "ms", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "FC", "J", "D", "E", "F", "A", "B", "", "", ""], E: "IE", F: { FC: 962323200, J: 998870400, D: 1161129600, E: 1237420800, F: 1300060800, A: 1346716800, B: 1381968e3 } }, B: { A: { C: 4081e-6, K: 4267e-6, L: 4268e-6, G: 4081e-6, M: 3702e-6, N: 4081e-6, O: 0.016324, P: 0, Q: 4298e-6, R: 944e-5, S: 4043e-6, T: 4081e-6, U: 3861e-6, V: 3861e-6, W: 4081e-6, X: 3943e-6, Y: 4081e-6, Z: 3943e-6, a: 3943e-6, b: 8162e-6, c: 4118e-6, d: 3939e-6, e: 3943e-6, i: 3943e-6, j: 3943e-6, k: 3929e-6, l: 3901e-6, m: 0.011829, n: 7886e-6, o: 3943e-6, p: 8162e-6, q: 4081e-6, r: 4081e-6, s: 8162e-6, t: 0.016324, u: 0.044891, v: 0.118349, f: 2.0609, w: 2.19966, H: 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "C", "K", "L", "G", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "f", "w", "H", "", "", ""], E: "Edge", F: { C: 1438128e3, K: 1447286400, L: 1470096e3, G: 1491868800, M: 1508198400, N: 1525046400, O: 1542067200, P: 1579046400, Q: 1581033600, R: 1586736e3, S: 1590019200, T: 1594857600, U: 1598486400, V: 1602201600, W: 1605830400, X: 161136e4, Y: 1614816e3, Z: 1618358400, a: 1622073600, b: 1626912e3, c: 1630627200, d: 1632441600, e: 1634774400, i: 1637539200, j: 1641427200, k: 1643932800, l: 1646265600, m: 1649635200, n: 1651190400, o: 1653955200, p: 1655942400, q: 1659657600, r: 1661990400, s: 1664755200, t: 1666915200, u: 1670198400, v: 1673481600, f: 1675900800, w: 1678665600, H: 1680825600 }, D: { C: "ms", K: "ms", L: "ms", G: "ms", M: "ms", N: "ms", O: "ms" } }, C: { A: { "0": 0.013698, "1": 4161e-6, "2": 8786e-6, "3": 4118e-6, "4": 4317e-6, "5": 4393e-6, "6": 4418e-6, "7": 8834e-6, "8": 8322e-6, "9": 8928e-6, GC: 4118e-6, vB: 4271e-6, I: 0.011703, x: 4879e-6, J: 0.020136, D: 5725e-6, E: 4525e-6, F: 533e-5, A: 4283e-6, B: 8162e-6, C: 4471e-6, K: 4486e-6, L: 453e-5, G: 8322e-6, M: 4417e-6, N: 4425e-6, O: 4161e-6, y: 4443e-6, g: 4283e-6, z: 8322e-6, AB: 4471e-6, BB: 9284e-6, CB: 4707e-6, DB: 9076e-6, EB: 4081e-6, FB: 4783e-6, GB: 3929e-6, HB: 4783e-6, IB: 487e-5, JB: 5029e-6, KB: 47e-4, LB: 0.012243, MB: 4081e-6, NB: 3867e-6, OB: 4525e-6, PB: 4293e-6, QB: 4081e-6, RB: 4538e-6, SB: 8282e-6, TB: 0.011601, UB: 0.044891, VB: 0.011601, WB: 3929e-6, XB: 3974e-6, YB: 8162e-6, ZB: 0.011601, aB: 3939e-6, wB: 4081e-6, bB: 3929e-6, xB: 4356e-6, cB: 4425e-6, dB: 8322e-6, eB: 415e-5, fB: 4267e-6, gB: 3801e-6, hB: 4267e-6, iB: 4081e-6, jB: 415e-5, kB: 4293e-6, lB: 4425e-6, mB: 8162e-6, h: 415e-5, nB: 415e-5, oB: 4318e-6, pB: 4356e-6, qB: 3974e-6, rB: 0.036729, P: 4081e-6, Q: 4081e-6, R: 4081e-6, yB: 3861e-6, S: 4081e-6, T: 3929e-6, U: 4268e-6, V: 3801e-6, W: 0.012243, X: 8162e-6, Y: 3943e-6, Z: 3943e-6, a: 0.012243, b: 3801e-6, c: 7722e-6, d: 0.016324, e: 3773e-6, i: 7886e-6, j: 3901e-6, k: 3901e-6, l: 4081e-6, m: 3861e-6, n: 4081e-6, o: 0.110187, p: 0.036729, q: 8162e-6, r: 8162e-6, s: 8162e-6, t: 0.012243, u: 0.024486, v: 0.053053, f: 1.10187, w: 0.926387, H: 8162e-6, zB: 0, "0B": 0, HC: 8786e-6, IC: 487e-5 }, B: "moz", C: ["GC", "vB", "HC", "IC", "I", "x", "J", "D", "E", "F", "A", "B", "C", "K", "L", "G", "M", "N", "O", "y", "g", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "AB", "BB", "CB", "DB", "EB", "FB", "GB", "HB", "IB", "JB", "KB", "LB", "MB", "NB", "OB", "PB", "QB", "RB", "SB", "TB", "UB", "VB", "WB", "XB", "YB", "ZB", "aB", "wB", "bB", "xB", "cB", "dB", "eB", "fB", "gB", "hB", "iB", "jB", "kB", "lB", "mB", "h", "nB", "oB", "pB", "qB", "rB", "P", "Q", "R", "yB", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "f", "w", "H", "zB", "0B", ""], E: "Firefox", F: { "0": 1368489600, "1": 1372118400, "2": 1375747200, "3": 1379376e3, "4": 1386633600, "5": 1391472e3, "6": 1395100800, "7": 1398729600, "8": 1402358400, "9": 1405987200, GC: 1161648e3, vB: 1213660800, HC: 124632e4, IC: 1264032e3, I: 1300752e3, x: 1308614400, J: 1313452800, D: 1317081600, E: 1317081600, F: 1320710400, A: 1324339200, B: 1327968e3, C: 1331596800, K: 1335225600, L: 1338854400, G: 1342483200, M: 1346112e3, N: 1349740800, O: 1353628800, y: 1357603200, g: 1361232e3, z: 1364860800, AB: 1409616e3, BB: 1413244800, CB: 1417392e3, DB: 1421107200, EB: 1424736e3, FB: 1428278400, GB: 1431475200, HB: 1435881600, IB: 1439251200, JB: 144288e4, KB: 1446508800, LB: 1450137600, MB: 1453852800, NB: 1457395200, OB: 1461628800, PB: 1465257600, QB: 1470096e3, RB: 1474329600, SB: 1479168e3, TB: 1485216e3, UB: 1488844800, VB: 149256e4, WB: 1497312e3, XB: 1502150400, YB: 1506556800, ZB: 1510617600, aB: 1516665600, wB: 1520985600, bB: 1525824e3, xB: 1529971200, cB: 1536105600, dB: 1540252800, eB: 1544486400, fB: 154872e4, gB: 1552953600, hB: 1558396800, iB: 1562630400, jB: 1567468800, kB: 1571788800, lB: 1575331200, mB: 1578355200, h: 1581379200, nB: 1583798400, oB: 1586304e3, pB: 1588636800, qB: 1591056e3, rB: 1593475200, P: 1595894400, Q: 1598313600, R: 1600732800, yB: 1603152e3, S: 1605571200, T: 1607990400, U: 1611619200, V: 1614038400, W: 1616457600, X: 1618790400, Y: 1622505600, Z: 1626134400, a: 1628553600, b: 1630972800, c: 1633392e3, d: 1635811200, e: 1638835200, i: 1641859200, j: 1644364800, k: 1646697600, l: 1649116800, m: 1651536e3, n: 1653955200, o: 1656374400, p: 1658793600, q: 1661212800, r: 1663632e3, s: 1666051200, t: 1668470400, u: 1670889600, v: 1673913600, f: 1676332800, w: 1678752e3, H: 1681171200, zB: null, "0B": null } }, D: { A: { "0": 3901e-6, "1": 8786e-6, "2": 3939e-6, "3": 4461e-6, "4": 4141e-6, "5": 4326e-6, "6": 47e-4, "7": 4538e-6, "8": 8322e-6, "9": 8596e-6, I: 4706e-6, x: 4879e-6, J: 4879e-6, D: 5591e-6, E: 5591e-6, F: 5591e-6, A: 4534e-6, B: 4464e-6, C: 0.010424, K: 83e-4, L: 4706e-6, G: 0.015087, M: 4393e-6, N: 4393e-6, O: 8652e-6, y: 8322e-6, g: 4393e-6, z: 4317e-6, AB: 4566e-6, BB: 4118e-6, CB: 4081e-6, DB: 8162e-6, EB: 4335e-6, FB: 4464e-6, GB: 0.016324, HB: 3867e-6, IB: 0.016324, JB: 3773e-6, KB: 3974e-6, LB: 8162e-6, MB: 7948e-6, NB: 3974e-6, OB: 3867e-6, PB: 8162e-6, QB: 0.020405, RB: 0.036729, SB: 3867e-6, TB: 4081e-6, UB: 8162e-6, VB: 8162e-6, WB: 3867e-6, XB: 4081e-6, YB: 0.073458, ZB: 4081e-6, aB: 0.015772, wB: 3773e-6, bB: 0.016324, xB: 8162e-6, cB: 3773e-6, dB: 0.012243, eB: 3943e-6, fB: 8162e-6, gB: 0.028567, hB: 8162e-6, iB: 8162e-6, jB: 0.036729, kB: 0.016324, lB: 0.012243, mB: 0.020405, h: 8162e-6, nB: 0.036729, oB: 0.048972, pB: 0.044891, qB: 0.016324, rB: 0.024486, P: 0.134673, Q: 0.036729, R: 0.04081, S: 0.065296, T: 0.04081, U: 0.089782, V: 0.065296, W: 0.097944, X: 0.020405, Y: 0.036729, Z: 0.04081, a: 0.077539, b: 0.044891, c: 0.085701, d: 0.044891, e: 0.032648, i: 0.04081, j: 0.053053, k: 0.04081, l: 0.053053, m: 0.053053, n: 0.048972, o: 0.073458, p: 0.355047, q: 0.114268, r: 0.106106, s: 0.077539, t: 0.126511, u: 0.399938, v: 2.73019, f: 7.54169, w: 10.7208, H: 0.020405, zB: 0.020405, "0B": 4081e-6, JC: 0 }, B: "webkit", C: ["", "", "", "", "", "I", "x", "J", "D", "E", "F", "A", "B", "C", "K", "L", "G", "M", "N", "O", "y", "g", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "AB", "BB", "CB", "DB", "EB", "FB", "GB", "HB", "IB", "JB", "KB", "LB", "MB", "NB", "OB", "PB", "QB", "RB", "SB", "TB", "UB", "VB", "WB", "XB", "YB", "ZB", "aB", "wB", "bB", "xB", "cB", "dB", "eB", "fB", "gB", "hB", "iB", "jB", "kB", "lB", "mB", "h", "nB", "oB", "pB", "qB", "rB", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "f", "w", "H", "zB", "0B", "JC"], E: "Chrome", F: { "0": 1343692800, "1": 1348531200, "2": 1352246400, "3": 1357862400, "4": 1361404800, "5": 1364428800, "6": 1369094400, "7": 1374105600, "8": 1376956800, "9": 1384214400, I: 1264377600, x: 1274745600, J: 1283385600, D: 1287619200, E: 1291248e3, F: 1296777600, A: 1299542400, B: 1303862400, C: 1307404800, K: 1312243200, L: 1316131200, G: 1316131200, M: 1319500800, N: 1323734400, O: 1328659200, y: 1332892800, g: 133704e4, z: 1340668800, AB: 1389657600, BB: 1392940800, CB: 1397001600, DB: 1400544e3, EB: 1405468800, FB: 1409011200, GB: 141264e4, HB: 1416268800, IB: 1421798400, JB: 1425513600, KB: 1429401600, LB: 143208e4, MB: 1437523200, NB: 1441152e3, OB: 1444780800, PB: 1449014400, QB: 1453248e3, RB: 1456963200, SB: 1460592e3, TB: 1464134400, UB: 1469059200, VB: 1472601600, WB: 1476230400, XB: 1480550400, YB: 1485302400, ZB: 1489017600, aB: 149256e4, wB: 1496707200, bB: 1500940800, xB: 1504569600, cB: 1508198400, dB: 1512518400, eB: 1516752e3, fB: 1520294400, gB: 1523923200, hB: 1527552e3, iB: 1532390400, jB: 1536019200, kB: 1539648e3, lB: 1543968e3, mB: 154872e4, h: 1552348800, nB: 1555977600, oB: 1559606400, pB: 1564444800, qB: 1568073600, rB: 1571702400, P: 1575936e3, Q: 1580860800, R: 1586304e3, S: 1589846400, T: 1594684800, U: 1598313600, V: 1601942400, W: 1605571200, X: 1611014400, Y: 1614556800, Z: 1618272e3, a: 1621987200, b: 1626739200, c: 1630368e3, d: 1632268800, e: 1634601600, i: 1637020800, j: 1641340800, k: 1643673600, l: 1646092800, m: 1648512e3, n: 1650931200, o: 1653350400, p: 1655769600, q: 1659398400, r: 1661817600, s: 1664236800, t: 1666656e3, u: 166968e4, v: 1673308800, f: 1675728e3, w: 1678147200, H: 1680566400, zB: null, "0B": null, JC: null } }, E: { A: { I: 0, x: 8322e-6, J: 4656e-6, D: 4465e-6, E: 3974e-6, F: 3929e-6, A: 4425e-6, B: 4318e-6, C: 3801e-6, K: 0.020405, L: 0.102025, G: 0.024486, KC: 0, "1B": 8692e-6, LC: 8162e-6, MC: 456e-5, NC: 4283e-6, OC: 0.028567, "2B": 7802e-6, sB: 8162e-6, tB: 0.036729, "3B": 0.183645, PC: 0.289751, QC: 0.044891, "4B": 0.036729, "5B": 0.093863, "6B": 0.171402, "7B": 0.754985, uB: 0.08162, "8B": 0.261184, "9B": 0.465234, AC: 1.69361, BC: 0.028567, CC: 0, RC: 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "KC", "1B", "I", "x", "LC", "J", "MC", "D", "NC", "E", "F", "OC", "A", "2B", "B", "sB", "C", "tB", "K", "3B", "L", "PC", "G", "QC", "4B", "5B", "6B", "7B", "uB", "8B", "9B", "AC", "BC", "CC", "RC", ""], E: "Safari", F: { KC: 1205798400, "1B": 1226534400, I: 1244419200, x: 1275868800, LC: 131112e4, J: 1343174400, MC: 13824e5, D: 13824e5, NC: 1410998400, E: 1413417600, F: 1443657600, OC: 1458518400, A: 1474329600, "2B": 1490572800, B: 1505779200, sB: 1522281600, C: 1537142400, tB: 1553472e3, K: 1568851200, "3B": 1585008e3, L: 1600214400, PC: 1619395200, G: 1632096e3, QC: 1635292800, "4B": 1639353600, "5B": 1647216e3, "6B": 1652745600, "7B": 1658275200, uB: 1662940800, "8B": 1666569600, "9B": 1670889600, AC: 1674432e3, BC: 1679875200, CC: null, RC: null } }, F: { A: { "0": 6597e-6, "1": 0.013434, "2": 6702e-6, "3": 6015e-6, "4": 5595e-6, "5": 4393e-6, "6": 8162e-6, "7": 4879e-6, "8": 4879e-6, "9": 3861e-6, F: 82e-4, B: 0.016581, C: 4317e-6, G: 685e-5, M: 685e-5, N: 685e-5, O: 5014e-6, y: 6015e-6, g: 4879e-6, z: 6597e-6, AB: 5152e-6, BB: 5014e-6, CB: 9758e-6, DB: 4879e-6, EB: 4081e-6, FB: 4283e-6, GB: 4367e-6, HB: 4534e-6, IB: 4081e-6, JB: 4227e-6, KB: 4418e-6, LB: 4161e-6, MB: 4227e-6, NB: 4725e-6, OB: 0.012243, PB: 8942e-6, QB: 4707e-6, RB: 4827e-6, SB: 4707e-6, TB: 4707e-6, UB: 4326e-6, VB: 8922e-6, WB: 0.014349, XB: 4425e-6, YB: 472e-5, ZB: 4425e-6, aB: 4425e-6, bB: 472e-5, cB: 4532e-6, dB: 4566e-6, eB: 0.02283, fB: 867e-5, gB: 4656e-6, hB: 4642e-6, iB: 3929e-6, jB: 944e-5, kB: 4293e-6, lB: 3929e-6, mB: 4298e-6, h: 0.096692, nB: 8162e-6, oB: 4141e-6, pB: 4257e-6, qB: 3939e-6, rB: 8236e-6, P: 3855e-6, Q: 3939e-6, R: 8514e-6, yB: 3939e-6, S: 3939e-6, T: 3702e-6, U: 4081e-6, V: 3855e-6, W: 3855e-6, X: 3929e-6, Y: 3861e-6, Z: 0.011703, a: 7546e-6, b: 0.011829, c: 0.069498, d: 0.020405, e: 0.514206, SC: 685e-5, TC: 0, UC: 8392e-6, VC: 4706e-6, sB: 6229e-6, DC: 4879e-6, WC: 8786e-6, tB: 472e-5 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "F", "SC", "TC", "UC", "VC", "B", "sB", "DC", "WC", "C", "tB", "G", "M", "N", "O", "y", "g", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "AB", "BB", "CB", "DB", "EB", "FB", "GB", "HB", "IB", "JB", "KB", "LB", "MB", "NB", "OB", "PB", "QB", "RB", "SB", "TB", "UB", "VB", "WB", "XB", "YB", "ZB", "aB", "bB", "cB", "dB", "eB", "fB", "gB", "hB", "iB", "jB", "kB", "lB", "mB", "h", "nB", "oB", "pB", "qB", "rB", "P", "Q", "R", "yB", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "", "", ""], E: "Opera", F: { "0": 1401753600, "1": 1405987200, "2": 1409616e3, "3": 1413331200, "4": 1417132800, "5": 1422316800, "6": 1425945600, "7": 1430179200, "8": 1433808e3, "9": 1438646400, F: 1150761600, SC: 1223424e3, TC: 1251763200, UC: 1267488e3, VC: 1277942400, B: 1292457600, sB: 1302566400, DC: 1309219200, WC: 1323129600, C: 1323129600, tB: 1352073600, G: 1372723200, M: 1377561600, N: 1381104e3, O: 1386288e3, y: 1390867200, g: 1393891200, z: 1399334400, AB: 1442448e3, BB: 1445904e3, CB: 1449100800, DB: 1454371200, EB: 1457308800, FB: 146232e4, GB: 1465344e3, HB: 1470096e3, IB: 1474329600, JB: 1477267200, KB: 1481587200, LB: 1486425600, MB: 1490054400, NB: 1494374400, OB: 1498003200, PB: 1502236800, QB: 1506470400, RB: 1510099200, SB: 1515024e3, TB: 1517961600, UB: 1521676800, VB: 1525910400, WB: 1530144e3, XB: 1534982400, YB: 1537833600, ZB: 1543363200, aB: 1548201600, bB: 1554768e3, cB: 1561593600, dB: 1566259200, eB: 1570406400, fB: 1573689600, gB: 1578441600, hB: 1583971200, iB: 1587513600, jB: 1592956800, kB: 1595894400, lB: 1600128e3, mB: 1603238400, h: 161352e4, nB: 1612224e3, oB: 1616544e3, pB: 1619568e3, qB: 1623715200, rB: 1627948800, P: 1631577600, Q: 1633392e3, R: 1635984e3, yB: 1638403200, S: 1642550400, T: 1644969600, U: 1647993600, V: 1650412800, W: 1652745600, X: 1654646400, Y: 1657152e3, Z: 1660780800, a: 1663113600, b: 1668816e3, c: 1668643200, d: 1671062400, e: 1675209600 }, D: { F: "o", B: "o", C: "o", SC: "o", TC: "o", UC: "o", VC: "o", sB: "o", DC: "o", WC: "o", tB: "o" } }, G: { A: { E: 0, "1B": 0, XC: 0, EC: 316399e-8, YC: 474599e-8, ZC: 316399e-8, aC: 0.014238, bC: 790998e-8, cC: 0.018984, dC: 0.0569519, eC: 316399e-8, fC: 0.0696078, gC: 0.0205659, hC: 0.0237299, iC: 0.0205659, jC: 0.376515, kC: 0.012656, lC: 0.0348039, mC: 0.0316399, nC: 0.0996657, oC: 0.259447, pC: 0.480927, qC: 0.14238, "4B": 0.177184, "5B": 0.207241, "6B": 0.357531, "7B": 1.01406, uB: 1.11214, "8B": 2.47741, "9B": 1.67533, AC: 6.04164, BC: 0.11865, CC: 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "1B", "XC", "EC", "YC", "ZC", "aC", "E", "bC", "cC", "dC", "eC", "fC", "gC", "hC", "iC", "jC", "kC", "lC", "mC", "nC", "oC", "pC", "qC", "4B", "5B", "6B", "7B", "uB", "8B", "9B", "AC", "BC", "CC", "", ""], E: "Safari on iOS", F: { "1B": 1270252800, XC: 1283904e3, EC: 1299628800, YC: 1331078400, ZC: 1359331200, aC: 1394409600, E: 1410912e3, bC: 1413763200, cC: 1442361600, dC: 1458518400, eC: 1473724800, fC: 1490572800, gC: 1505779200, hC: 1522281600, iC: 1537142400, jC: 1553472e3, kC: 1568851200, lC: 1572220800, mC: 1580169600, nC: 1585008e3, oC: 1600214400, pC: 1619395200, qC: 1632096e3, "4B": 1639353600, "5B": 1647216e3, "6B": 1652659200, "7B": 1658275200, uB: 1662940800, "8B": 1666569600, "9B": 1670889600, AC: 1674432e3, BC: 1679875200, CC: null } }, H: { A: { rC: 1.0085 }, B: "o", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "rC", "", "", ""], E: "Opera Mini", F: { rC: 1426464e3 } }, I: { A: { vB: 0, I: 0.0240008, H: 0, sC: 0, tC: 0.0720023, uC: 0, vC: 0.0160005, EC: 0.0720023, wC: 0, xC: 0.248008 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "sC", "tC", "uC", "vB", "I", "vC", "EC", "wC", "xC", "H", "", "", ""], E: "Android Browser", F: { sC: 1256515200, tC: 1274313600, uC: 1291593600, vB: 1298332800, I: 1318896e3, vC: 1341792e3, EC: 1374624e3, wC: 1386547200, xC: 1401667200, H: 1680652800 } }, J: { A: { D: 0, A: 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "D", "A", "", "", ""], E: "Blackberry Browser", F: { D: 1325376e3, A: 1359504e3 } }, K: { A: { A: 0, B: 0, C: 0, h: 0.0111391, sB: 0, DC: 0, tB: 0 }, B: "o", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "A", "B", "sB", "DC", "C", "tB", "h", "", "", ""], E: "Opera Mobile", F: { A: 1287100800, B: 1300752e3, sB: 1314835200, DC: 1318291200, C: 1330300800, tB: 1349740800, h: 1673827200 }, D: { h: "webkit" } }, L: { A: { H: 40.8907 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "H", "", "", ""], E: "Chrome for Android", F: { H: 1680652800 } }, M: { A: { f: 0.2959 }, B: "moz", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "f", "", "", ""], E: "Firefox for Android", F: { f: 1676332800 } }, N: { A: { A: 0.0115934, B: 0.022664 }, B: "ms", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "A", "B", "", "", ""], E: "IE Mobile", F: { A: 1340150400, B: 1353456e3 } }, O: { A: { yC: 0.905454 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "yC", "", "", ""], E: "UC Browser for Android", F: { yC: 1634688e3 }, D: { yC: "webkit" } }, P: { A: { I: 0.147621, g: 1.90853, zC: 0.0103543, "0C": 0.010304, "1C": 0.0527219, "2C": 0.0103584, "3C": 0.0104443, "2B": 0.0105043, "4C": 0.0210887, "5C": 0.0103982, "6C": 0.0316331, "7C": 0.0316331, "8C": 0.0210887, uB: 0.0527219, "9C": 0.0632662, AD: 0.0738106, BD: 0.253065 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "I", "zC", "0C", "1C", "2C", "3C", "2B", "4C", "5C", "6C", "7C", "8C", "uB", "9C", "AD", "BD", "g", "", "", ""], E: "Samsung Internet", F: { I: 1461024e3, zC: 1481846400, "0C": 1509408e3, "1C": 1528329600, "2C": 1546128e3, "3C": 1554163200, "2B": 1567900800, "4C": 1582588800, "5C": 1593475200, "6C": 1605657600, "7C": 1618531200, "8C": 1629072e3, uB: 1640736e3, "9C": 1651708800, AD: 1659657600, BD: 1667260800, g: 1677369600 } }, Q: { A: { "3B": 0.11836 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "3B", "", "", ""], E: "QQ Browser", F: { "3B": 1663718400 } }, R: { A: { CD: 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "CD", "", "", ""], E: "Baidu Browser", F: { CD: 1663027200 } }, S: { A: { DD: 0.071016, ED: 0 }, B: "moz", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "DD", "ED", "", "", ""], E: "KaiOS Browser", F: { DD: 1527811200, ED: 1631664e3 } } };
  62919. }
  62920. });
  62921. // node_modules/caniuse-lite/dist/unpacker/agents.js
  62922. var require_agents2 = __commonJS({
  62923. "node_modules/caniuse-lite/dist/unpacker/agents.js"(exports, module) {
  62924. "use strict";
  62925. var browsers = require_browsers2().browsers;
  62926. var versions = require_browserVersions2().browserVersions;
  62927. var agentsData = require_agents();
  62928. function unpackBrowserVersions(versionsData) {
  62929. return Object.keys(versionsData).reduce((usage, version3) => {
  62930. usage[versions[version3]] = versionsData[version3];
  62931. return usage;
  62932. }, {});
  62933. }
  62934. module.exports.agents = Object.keys(agentsData).reduce((map, key2) => {
  62935. let versionsData = agentsData[key2];
  62936. map[browsers[key2]] = Object.keys(versionsData).reduce((data3, entry) => {
  62937. if (entry === "A") {
  62938. data3.usage_global = unpackBrowserVersions(versionsData[entry]);
  62939. } else if (entry === "C") {
  62940. data3.versions = versionsData[entry].reduce((list3, version3) => {
  62941. if (version3 === "") {
  62942. list3.push(null);
  62943. } else {
  62944. list3.push(versions[version3]);
  62945. }
  62946. return list3;
  62947. }, []);
  62948. } else if (entry === "D") {
  62949. data3.prefix_exceptions = unpackBrowserVersions(versionsData[entry]);
  62950. } else if (entry === "E") {
  62951. data3.browser = versionsData[entry];
  62952. } else if (entry === "F") {
  62953. data3.release_date = Object.keys(versionsData[entry]).reduce(
  62954. (map2, key22) => {
  62955. map2[versions[key22]] = versionsData[entry][key22];
  62956. return map2;
  62957. },
  62958. {}
  62959. );
  62960. } else {
  62961. data3.prefix = versionsData[entry];
  62962. }
  62963. return data3;
  62964. }, {});
  62965. return map;
  62966. }, {});
  62967. }
  62968. });
  62969. // node_modules/node-releases/data/release-schedule/release-schedule.json
  62970. var require_release_schedule = __commonJS({
  62971. "node_modules/node-releases/data/release-schedule/release-schedule.json"(exports, module) {
  62972. module.exports = { "v0.8": { start: "2012-06-25", end: "2014-07-31" }, "v0.10": { start: "2013-03-11", end: "2016-10-31" }, "v0.12": { start: "2015-02-06", end: "2016-12-31" }, v4: { start: "2015-09-08", lts: "2015-10-12", maintenance: "2017-04-01", end: "2018-04-30", codename: "Argon" }, v5: { start: "2015-10-29", maintenance: "2016-04-30", end: "2016-06-30" }, v6: { start: "2016-04-26", lts: "2016-10-18", maintenance: "2018-04-30", end: "2019-04-30", codename: "Boron" }, v7: { start: "2016-10-25", maintenance: "2017-04-30", end: "2017-06-30" }, v8: { start: "2017-05-30", lts: "2017-10-31", maintenance: "2019-01-01", end: "2019-12-31", codename: "Carbon" }, v9: { start: "2017-10-01", maintenance: "2018-04-01", end: "2018-06-30" }, v10: { start: "2018-04-24", lts: "2018-10-30", maintenance: "2020-05-19", end: "2021-04-30", codename: "Dubnium" }, v11: { start: "2018-10-23", maintenance: "2019-04-22", end: "2019-06-01" }, v12: { start: "2019-04-23", lts: "2019-10-21", maintenance: "2020-11-30", end: "2022-04-30", codename: "Erbium" }, v13: { start: "2019-10-22", maintenance: "2020-04-01", end: "2020-06-01" }, v14: { start: "2020-04-21", lts: "2020-10-27", maintenance: "2021-10-19", end: "2023-04-30", codename: "Fermium" }, v15: { start: "2020-10-20", maintenance: "2021-04-01", end: "2021-06-01" }, v16: { start: "2021-04-20", lts: "2021-10-26", maintenance: "2022-10-18", end: "2023-09-11", codename: "Gallium" }, v17: { start: "2021-10-19", maintenance: "2022-04-01", end: "2022-06-01" }, v18: { start: "2022-04-19", lts: "2022-10-25", maintenance: "2023-10-18", end: "2025-04-30", codename: "Hydrogen" }, v19: { start: "2022-10-18", maintenance: "2023-04-01", end: "2023-06-01" }, v20: { start: "2023-04-18", lts: "2023-10-24", maintenance: "2024-10-22", end: "2026-04-30", codename: "" } };
  62973. }
  62974. });
  62975. // node_modules/electron-to-chromium/versions.js
  62976. var require_versions = __commonJS({
  62977. "node_modules/electron-to-chromium/versions.js"(exports, module) {
  62978. module.exports = {
  62979. "0.20": "39",
  62980. "0.21": "41",
  62981. "0.22": "41",
  62982. "0.23": "41",
  62983. "0.24": "41",
  62984. "0.25": "42",
  62985. "0.26": "42",
  62986. "0.27": "43",
  62987. "0.28": "43",
  62988. "0.29": "43",
  62989. "0.30": "44",
  62990. "0.31": "45",
  62991. "0.32": "45",
  62992. "0.33": "45",
  62993. "0.34": "45",
  62994. "0.35": "45",
  62995. "0.36": "47",
  62996. "0.37": "49",
  62997. "1.0": "49",
  62998. "1.1": "50",
  62999. "1.2": "51",
  63000. "1.3": "52",
  63001. "1.4": "53",
  63002. "1.5": "54",
  63003. "1.6": "56",
  63004. "1.7": "58",
  63005. "1.8": "59",
  63006. "2.0": "61",
  63007. "2.1": "61",
  63008. "3.0": "66",
  63009. "3.1": "66",
  63010. "4.0": "69",
  63011. "4.1": "69",
  63012. "4.2": "69",
  63013. "5.0": "73",
  63014. "6.0": "76",
  63015. "6.1": "76",
  63016. "7.0": "78",
  63017. "7.1": "78",
  63018. "7.2": "78",
  63019. "7.3": "78",
  63020. "8.0": "80",
  63021. "8.1": "80",
  63022. "8.2": "80",
  63023. "8.3": "80",
  63024. "8.4": "80",
  63025. "8.5": "80",
  63026. "9.0": "83",
  63027. "9.1": "83",
  63028. "9.2": "83",
  63029. "9.3": "83",
  63030. "9.4": "83",
  63031. "10.0": "85",
  63032. "10.1": "85",
  63033. "10.2": "85",
  63034. "10.3": "85",
  63035. "10.4": "85",
  63036. "11.0": "87",
  63037. "11.1": "87",
  63038. "11.2": "87",
  63039. "11.3": "87",
  63040. "11.4": "87",
  63041. "11.5": "87",
  63042. "12.0": "89",
  63043. "12.1": "89",
  63044. "12.2": "89",
  63045. "13.0": "91",
  63046. "13.1": "91",
  63047. "13.2": "91",
  63048. "13.3": "91",
  63049. "13.4": "91",
  63050. "13.5": "91",
  63051. "13.6": "91",
  63052. "14.0": "93",
  63053. "14.1": "93",
  63054. "14.2": "93",
  63055. "15.0": "94",
  63056. "15.1": "94",
  63057. "15.2": "94",
  63058. "15.3": "94",
  63059. "15.4": "94",
  63060. "15.5": "94",
  63061. "16.0": "96",
  63062. "16.1": "96",
  63063. "16.2": "96",
  63064. "17.0": "98",
  63065. "17.1": "98",
  63066. "17.2": "98",
  63067. "17.3": "98",
  63068. "17.4": "98",
  63069. "18.0": "100",
  63070. "18.1": "100",
  63071. "18.2": "100",
  63072. "18.3": "100",
  63073. "19.0": "102",
  63074. "19.1": "102",
  63075. "20.0": "104",
  63076. "20.1": "104",
  63077. "20.2": "104",
  63078. "20.3": "104",
  63079. "21.0": "106",
  63080. "21.1": "106",
  63081. "21.2": "106",
  63082. "21.3": "106",
  63083. "21.4": "106",
  63084. "22.0": "108",
  63085. "22.1": "108",
  63086. "22.2": "108",
  63087. "22.3": "108",
  63088. "23.0": "110",
  63089. "23.1": "110",
  63090. "23.2": "110",
  63091. "24.0": "112",
  63092. "24.1": "112",
  63093. "25.0": "114"
  63094. };
  63095. }
  63096. });
  63097. // node_modules/browserslist/error.js
  63098. var require_error = __commonJS({
  63099. "node_modules/browserslist/error.js"(exports, module) {
  63100. function BrowserslistError(message) {
  63101. this.name = "BrowserslistError";
  63102. this.message = message;
  63103. this.browserslist = true;
  63104. if (Error.captureStackTrace) {
  63105. Error.captureStackTrace(this, BrowserslistError);
  63106. }
  63107. }
  63108. BrowserslistError.prototype = Error.prototype;
  63109. module.exports = BrowserslistError;
  63110. }
  63111. });
  63112. // node_modules/browserslist/parse.js
  63113. var require_parse2 = __commonJS({
  63114. "node_modules/browserslist/parse.js"(exports, module) {
  63115. var AND_REGEXP = /^\s+and\s+(.*)/i;
  63116. var OR_REGEXP = /^(?:,\s*|\s+or\s+)(.*)/i;
  63117. function flatten(array) {
  63118. if (!Array.isArray(array))
  63119. return [array];
  63120. return array.reduce(function(a, b) {
  63121. return a.concat(flatten(b));
  63122. }, []);
  63123. }
  63124. function find2(string3, predicate) {
  63125. for (var n = 1, max = string3.length; n <= max; n++) {
  63126. var parsed = string3.substr(-n, n);
  63127. if (predicate(parsed, n, max)) {
  63128. return string3.slice(0, -n);
  63129. }
  63130. }
  63131. return "";
  63132. }
  63133. function matchQuery(all4, query) {
  63134. var node2 = { query };
  63135. if (query.indexOf("not ") === 0) {
  63136. node2.not = true;
  63137. query = query.slice(4);
  63138. }
  63139. for (var name2 in all4) {
  63140. var type = all4[name2];
  63141. var match = query.match(type.regexp);
  63142. if (match) {
  63143. node2.type = name2;
  63144. for (var i = 0; i < type.matches.length; i++) {
  63145. node2[type.matches[i]] = match[i + 1];
  63146. }
  63147. return node2;
  63148. }
  63149. }
  63150. node2.type = "unknown";
  63151. return node2;
  63152. }
  63153. function matchBlock(all4, string3, qs) {
  63154. var node2;
  63155. return find2(string3, function(parsed, n, max) {
  63156. if (AND_REGEXP.test(parsed)) {
  63157. node2 = matchQuery(all4, parsed.match(AND_REGEXP)[1]);
  63158. node2.compose = "and";
  63159. qs.unshift(node2);
  63160. return true;
  63161. } else if (OR_REGEXP.test(parsed)) {
  63162. node2 = matchQuery(all4, parsed.match(OR_REGEXP)[1]);
  63163. node2.compose = "or";
  63164. qs.unshift(node2);
  63165. return true;
  63166. } else if (n === max) {
  63167. node2 = matchQuery(all4, parsed.trim());
  63168. node2.compose = "or";
  63169. qs.unshift(node2);
  63170. return true;
  63171. }
  63172. return false;
  63173. });
  63174. }
  63175. module.exports = function parse9(all4, queries) {
  63176. if (!Array.isArray(queries))
  63177. queries = [queries];
  63178. return flatten(
  63179. queries.map(function(block) {
  63180. var qs = [];
  63181. do {
  63182. block = matchBlock(all4, block, qs);
  63183. } while (block);
  63184. return qs;
  63185. })
  63186. );
  63187. };
  63188. }
  63189. });
  63190. // node_modules/caniuse-lite/dist/lib/statuses.js
  63191. var require_statuses = __commonJS({
  63192. "node_modules/caniuse-lite/dist/lib/statuses.js"(exports, module) {
  63193. module.exports = {
  63194. 1: "ls",
  63195. // WHATWG Living Standard
  63196. 2: "rec",
  63197. // W3C Recommendation
  63198. 3: "pr",
  63199. // W3C Proposed Recommendation
  63200. 4: "cr",
  63201. // W3C Candidate Recommendation
  63202. 5: "wd",
  63203. // W3C Working Draft
  63204. 6: "other",
  63205. // Non-W3C, but reputable
  63206. 7: "unoff"
  63207. // Unofficial, Editor's Draft or W3C "Note"
  63208. };
  63209. }
  63210. });
  63211. // node_modules/caniuse-lite/dist/lib/supported.js
  63212. var require_supported = __commonJS({
  63213. "node_modules/caniuse-lite/dist/lib/supported.js"(exports, module) {
  63214. module.exports = {
  63215. y: 1 << 0,
  63216. n: 1 << 1,
  63217. a: 1 << 2,
  63218. p: 1 << 3,
  63219. u: 1 << 4,
  63220. x: 1 << 5,
  63221. d: 1 << 6
  63222. };
  63223. }
  63224. });
  63225. // node_modules/caniuse-lite/dist/unpacker/feature.js
  63226. var require_feature = __commonJS({
  63227. "node_modules/caniuse-lite/dist/unpacker/feature.js"(exports, module) {
  63228. "use strict";
  63229. var statuses = require_statuses();
  63230. var supported = require_supported();
  63231. var browsers = require_browsers2().browsers;
  63232. var versions = require_browserVersions2().browserVersions;
  63233. var MATH2LOG = Math.log(2);
  63234. function unpackSupport(cipher) {
  63235. let stats = Object.keys(supported).reduce((list3, support) => {
  63236. if (cipher & supported[support])
  63237. list3.push(support);
  63238. return list3;
  63239. }, []);
  63240. let notes = cipher >> 7;
  63241. let notesArray = [];
  63242. while (notes) {
  63243. let note = Math.floor(Math.log(notes) / MATH2LOG) + 1;
  63244. notesArray.unshift(`#${note}`);
  63245. notes -= Math.pow(2, note - 1);
  63246. }
  63247. return stats.concat(notesArray).join(" ");
  63248. }
  63249. function unpackFeature(packed) {
  63250. let unpacked = { status: statuses[packed.B], title: packed.C };
  63251. unpacked.stats = Object.keys(packed.A).reduce((browserStats, key2) => {
  63252. let browser = packed.A[key2];
  63253. browserStats[browsers[key2]] = Object.keys(browser).reduce(
  63254. (stats, support) => {
  63255. let packedVersions = browser[support].split(" ");
  63256. let unpacked2 = unpackSupport(support);
  63257. packedVersions.forEach((v) => stats[versions[v]] = unpacked2);
  63258. return stats;
  63259. },
  63260. {}
  63261. );
  63262. return browserStats;
  63263. }, {});
  63264. return unpacked;
  63265. }
  63266. module.exports = unpackFeature;
  63267. module.exports.default = unpackFeature;
  63268. }
  63269. });
  63270. // node_modules/caniuse-lite/dist/unpacker/region.js
  63271. var require_region = __commonJS({
  63272. "node_modules/caniuse-lite/dist/unpacker/region.js"(exports, module) {
  63273. "use strict";
  63274. var browsers = require_browsers2().browsers;
  63275. function unpackRegion(packed) {
  63276. return Object.keys(packed).reduce((list3, browser) => {
  63277. let data3 = packed[browser];
  63278. list3[browsers[browser]] = Object.keys(data3).reduce((memo, key2) => {
  63279. let stats = data3[key2];
  63280. if (key2 === "_") {
  63281. stats.split(" ").forEach((version3) => memo[version3] = null);
  63282. } else {
  63283. memo[key2] = stats;
  63284. }
  63285. return memo;
  63286. }, {});
  63287. return list3;
  63288. }, {});
  63289. }
  63290. module.exports = unpackRegion;
  63291. module.exports.default = unpackRegion;
  63292. }
  63293. });
  63294. // node_modules/browserslist/node.js
  63295. var require_node3 = __commonJS({
  63296. "node_modules/browserslist/node.js"(exports, module) {
  63297. var feature = require_feature().default;
  63298. var region = require_region().default;
  63299. var path = __require("path");
  63300. var fs = __require("fs");
  63301. var BrowserslistError = require_error();
  63302. var IS_SECTION = /^\s*\[(.+)]\s*$/;
  63303. var CONFIG_PATTERN = /^browserslist-config-/;
  63304. var SCOPED_CONFIG__PATTERN = /@[^/]+\/browserslist-config(-|$|\/)/;
  63305. var TIME_TO_UPDATE_CANIUSE = 6 * 30 * 24 * 60 * 60 * 1e3;
  63306. var FORMAT = "Browserslist config should be a string or an array of strings with browser queries";
  63307. var dataTimeChecked = false;
  63308. var filenessCache = {};
  63309. var configCache = {};
  63310. function checkExtend(name2) {
  63311. var use = " Use `dangerousExtend` option to disable.";
  63312. if (!CONFIG_PATTERN.test(name2) && !SCOPED_CONFIG__PATTERN.test(name2)) {
  63313. throw new BrowserslistError(
  63314. "Browserslist config needs `browserslist-config-` prefix. " + use
  63315. );
  63316. }
  63317. if (name2.replace(/^@[^/]+\//, "").indexOf(".") !== -1) {
  63318. throw new BrowserslistError(
  63319. "`.` not allowed in Browserslist config name. " + use
  63320. );
  63321. }
  63322. if (name2.indexOf("node_modules") !== -1) {
  63323. throw new BrowserslistError(
  63324. "`node_modules` not allowed in Browserslist config." + use
  63325. );
  63326. }
  63327. }
  63328. function isFile(file) {
  63329. if (file in filenessCache) {
  63330. return filenessCache[file];
  63331. }
  63332. var result = fs.existsSync(file) && fs.statSync(file).isFile();
  63333. if (!process.env.BROWSERSLIST_DISABLE_CACHE) {
  63334. filenessCache[file] = result;
  63335. }
  63336. return result;
  63337. }
  63338. function eachParent(file, callback) {
  63339. var dir = isFile(file) ? path.dirname(file) : file;
  63340. var loc = path.resolve(dir);
  63341. do {
  63342. var result = callback(loc);
  63343. if (typeof result !== "undefined")
  63344. return result;
  63345. } while (loc !== (loc = path.dirname(loc)));
  63346. return void 0;
  63347. }
  63348. function check(section) {
  63349. if (Array.isArray(section)) {
  63350. for (var i = 0; i < section.length; i++) {
  63351. if (typeof section[i] !== "string") {
  63352. throw new BrowserslistError(FORMAT);
  63353. }
  63354. }
  63355. } else if (typeof section !== "string") {
  63356. throw new BrowserslistError(FORMAT);
  63357. }
  63358. }
  63359. function pickEnv(config, opts) {
  63360. if (typeof config !== "object")
  63361. return config;
  63362. var name2;
  63363. if (typeof opts.env === "string") {
  63364. name2 = opts.env;
  63365. } else if (process.env.BROWSERSLIST_ENV) {
  63366. name2 = process.env.BROWSERSLIST_ENV;
  63367. } else if (process.env.NODE_ENV) {
  63368. name2 = process.env.NODE_ENV;
  63369. } else {
  63370. name2 = "production";
  63371. }
  63372. if (opts.throwOnMissing) {
  63373. if (name2 && name2 !== "defaults" && !config[name2]) {
  63374. throw new BrowserslistError(
  63375. "Missing config for Browserslist environment `" + name2 + "`"
  63376. );
  63377. }
  63378. }
  63379. return config[name2] || config.defaults;
  63380. }
  63381. function parsePackage(file) {
  63382. var config = JSON.parse(
  63383. fs.readFileSync(file).toString().replace(/^\uFEFF/m, "")
  63384. );
  63385. if (config.browserlist && !config.browserslist) {
  63386. throw new BrowserslistError(
  63387. "`browserlist` key instead of `browserslist` in " + file
  63388. );
  63389. }
  63390. var list3 = config.browserslist;
  63391. if (Array.isArray(list3) || typeof list3 === "string") {
  63392. list3 = { defaults: list3 };
  63393. }
  63394. for (var i in list3) {
  63395. check(list3[i]);
  63396. }
  63397. return list3;
  63398. }
  63399. function latestReleaseTime(agents) {
  63400. var latest = 0;
  63401. for (var name2 in agents) {
  63402. var dates = agents[name2].releaseDate || {};
  63403. for (var key2 in dates) {
  63404. if (latest < dates[key2]) {
  63405. latest = dates[key2];
  63406. }
  63407. }
  63408. }
  63409. return latest * 1e3;
  63410. }
  63411. function normalizeStats(data3, stats) {
  63412. if (!data3) {
  63413. data3 = {};
  63414. }
  63415. if (stats && "dataByBrowser" in stats) {
  63416. stats = stats.dataByBrowser;
  63417. }
  63418. if (typeof stats !== "object")
  63419. return void 0;
  63420. var normalized = {};
  63421. for (var i in stats) {
  63422. var versions = Object.keys(stats[i]);
  63423. if (versions.length === 1 && data3[i] && data3[i].versions.length === 1) {
  63424. var normal = data3[i].versions[0];
  63425. normalized[i] = {};
  63426. normalized[i][normal] = stats[i][versions[0]];
  63427. } else {
  63428. normalized[i] = stats[i];
  63429. }
  63430. }
  63431. return normalized;
  63432. }
  63433. function normalizeUsageData(usageData, data3) {
  63434. for (var browser in usageData) {
  63435. var browserUsage = usageData[browser];
  63436. if ("0" in browserUsage) {
  63437. var versions = data3[browser].versions;
  63438. browserUsage[versions[versions.length - 1]] = browserUsage[0];
  63439. delete browserUsage[0];
  63440. }
  63441. }
  63442. }
  63443. module.exports = {
  63444. loadQueries: function loadQueries(ctx, name2) {
  63445. if (!ctx.dangerousExtend && !process.env.BROWSERSLIST_DANGEROUS_EXTEND) {
  63446. checkExtend(name2);
  63447. }
  63448. var queries = __require(__require.resolve(name2, { paths: [".", ctx.path] }));
  63449. if (queries) {
  63450. if (Array.isArray(queries)) {
  63451. return queries;
  63452. } else if (typeof queries === "object") {
  63453. if (!queries.defaults)
  63454. queries.defaults = [];
  63455. return pickEnv(queries, ctx, name2);
  63456. }
  63457. }
  63458. throw new BrowserslistError(
  63459. "`" + name2 + "` config exports not an array of queries or an object of envs"
  63460. );
  63461. },
  63462. loadStat: function loadStat(ctx, name2, data3) {
  63463. if (!ctx.dangerousExtend && !process.env.BROWSERSLIST_DANGEROUS_EXTEND) {
  63464. checkExtend(name2);
  63465. }
  63466. var stats = __require(__require.resolve(
  63467. path.join(name2, "browserslist-stats.json"),
  63468. { paths: ["."] }
  63469. ));
  63470. return normalizeStats(data3, stats);
  63471. },
  63472. getStat: function getStat(opts, data3) {
  63473. var stats;
  63474. if (opts.stats) {
  63475. stats = opts.stats;
  63476. } else if (process.env.BROWSERSLIST_STATS) {
  63477. stats = process.env.BROWSERSLIST_STATS;
  63478. } else if (opts.path && path.resolve && fs.existsSync) {
  63479. stats = eachParent(opts.path, function(dir) {
  63480. var file = path.join(dir, "browserslist-stats.json");
  63481. return isFile(file) ? file : void 0;
  63482. });
  63483. }
  63484. if (typeof stats === "string") {
  63485. try {
  63486. stats = JSON.parse(fs.readFileSync(stats));
  63487. } catch (e) {
  63488. throw new BrowserslistError("Can't read " + stats);
  63489. }
  63490. }
  63491. return normalizeStats(data3, stats);
  63492. },
  63493. loadConfig: function loadConfig(opts) {
  63494. if (process.env.BROWSERSLIST) {
  63495. return process.env.BROWSERSLIST;
  63496. } else if (opts.config || process.env.BROWSERSLIST_CONFIG) {
  63497. var file = opts.config || process.env.BROWSERSLIST_CONFIG;
  63498. if (path.basename(file) === "package.json") {
  63499. return pickEnv(parsePackage(file), opts);
  63500. } else {
  63501. return pickEnv(module.exports.readConfig(file), opts);
  63502. }
  63503. } else if (opts.path) {
  63504. return pickEnv(module.exports.findConfig(opts.path), opts);
  63505. } else {
  63506. return void 0;
  63507. }
  63508. },
  63509. loadCountry: function loadCountry(usage, country, data3) {
  63510. var code2 = country.replace(/[^\w-]/g, "");
  63511. if (!usage[code2]) {
  63512. var compressed;
  63513. try {
  63514. compressed = __require("caniuse-lite/data/regions/" + code2 + ".js");
  63515. } catch (e) {
  63516. throw new BrowserslistError("Unknown region name `" + code2 + "`.");
  63517. }
  63518. var usageData = region(compressed);
  63519. normalizeUsageData(usageData, data3);
  63520. usage[country] = {};
  63521. for (var i in usageData) {
  63522. for (var j in usageData[i]) {
  63523. usage[country][i + " " + j] = usageData[i][j];
  63524. }
  63525. }
  63526. }
  63527. },
  63528. loadFeature: function loadFeature(features, name2) {
  63529. name2 = name2.replace(/[^\w-]/g, "");
  63530. if (features[name2])
  63531. return;
  63532. var compressed;
  63533. try {
  63534. compressed = __require("caniuse-lite/data/features/" + name2 + ".js");
  63535. } catch (e) {
  63536. throw new BrowserslistError("Unknown feature name `" + name2 + "`.");
  63537. }
  63538. var stats = feature(compressed).stats;
  63539. features[name2] = {};
  63540. for (var i in stats) {
  63541. for (var j in stats[i]) {
  63542. features[name2][i + " " + j] = stats[i][j];
  63543. }
  63544. }
  63545. },
  63546. parseConfig: function parseConfig(string3) {
  63547. var result = { defaults: [] };
  63548. var sections = ["defaults"];
  63549. string3.toString().replace(/#[^\n]*/g, "").split(/\n|,/).map(function(line2) {
  63550. return line2.trim();
  63551. }).filter(function(line2) {
  63552. return line2 !== "";
  63553. }).forEach(function(line2) {
  63554. if (IS_SECTION.test(line2)) {
  63555. sections = line2.match(IS_SECTION)[1].trim().split(" ");
  63556. sections.forEach(function(section) {
  63557. if (result[section]) {
  63558. throw new BrowserslistError(
  63559. "Duplicate section " + section + " in Browserslist config"
  63560. );
  63561. }
  63562. result[section] = [];
  63563. });
  63564. } else {
  63565. sections.forEach(function(section) {
  63566. result[section].push(line2);
  63567. });
  63568. }
  63569. });
  63570. return result;
  63571. },
  63572. readConfig: function readConfig(file) {
  63573. if (!isFile(file)) {
  63574. throw new BrowserslistError("Can't read " + file + " config");
  63575. }
  63576. return module.exports.parseConfig(fs.readFileSync(file));
  63577. },
  63578. findConfig: function findConfig(from) {
  63579. from = path.resolve(from);
  63580. var passed = [];
  63581. var resolved = eachParent(from, function(dir) {
  63582. if (dir in configCache) {
  63583. return configCache[dir];
  63584. }
  63585. passed.push(dir);
  63586. var config = path.join(dir, "browserslist");
  63587. var pkg = path.join(dir, "package.json");
  63588. var rc = path.join(dir, ".browserslistrc");
  63589. var pkgBrowserslist;
  63590. if (isFile(pkg)) {
  63591. try {
  63592. pkgBrowserslist = parsePackage(pkg);
  63593. } catch (e) {
  63594. if (e.name === "BrowserslistError")
  63595. throw e;
  63596. console.warn(
  63597. "[Browserslist] Could not parse " + pkg + ". Ignoring it."
  63598. );
  63599. }
  63600. }
  63601. if (isFile(config) && pkgBrowserslist) {
  63602. throw new BrowserslistError(
  63603. dir + " contains both browserslist and package.json with browsers"
  63604. );
  63605. } else if (isFile(rc) && pkgBrowserslist) {
  63606. throw new BrowserslistError(
  63607. dir + " contains both .browserslistrc and package.json with browsers"
  63608. );
  63609. } else if (isFile(config) && isFile(rc)) {
  63610. throw new BrowserslistError(
  63611. dir + " contains both .browserslistrc and browserslist"
  63612. );
  63613. } else if (isFile(config)) {
  63614. return module.exports.readConfig(config);
  63615. } else if (isFile(rc)) {
  63616. return module.exports.readConfig(rc);
  63617. } else {
  63618. return pkgBrowserslist;
  63619. }
  63620. });
  63621. if (!process.env.BROWSERSLIST_DISABLE_CACHE) {
  63622. passed.forEach(function(dir) {
  63623. configCache[dir] = resolved;
  63624. });
  63625. }
  63626. return resolved;
  63627. },
  63628. clearCaches: function clearCaches() {
  63629. dataTimeChecked = false;
  63630. filenessCache = {};
  63631. configCache = {};
  63632. this.cache = {};
  63633. },
  63634. oldDataWarning: function oldDataWarning(agentsObj) {
  63635. if (dataTimeChecked)
  63636. return;
  63637. dataTimeChecked = true;
  63638. if (process.env.BROWSERSLIST_IGNORE_OLD_DATA)
  63639. return;
  63640. var latest = latestReleaseTime(agentsObj);
  63641. var halfYearAgo = Date.now() - TIME_TO_UPDATE_CANIUSE;
  63642. if (latest !== 0 && latest < halfYearAgo) {
  63643. console.warn(
  63644. "Browserslist: caniuse-lite is outdated. Please run:\n npx update-browserslist-db@latest\n Why you should do it regularly: https://github.com/browserslist/update-db#readme"
  63645. );
  63646. }
  63647. },
  63648. currentNode: function currentNode() {
  63649. return "node " + process.versions.node;
  63650. },
  63651. env: process.env
  63652. };
  63653. }
  63654. });
  63655. // node_modules/browserslist/index.js
  63656. var require_browserslist = __commonJS({
  63657. "node_modules/browserslist/index.js"(exports, module) {
  63658. var jsReleases = require_envs();
  63659. var agents = require_agents2().agents;
  63660. var jsEOL = require_release_schedule();
  63661. var path = __require("path");
  63662. var e2c = require_versions();
  63663. var BrowserslistError = require_error();
  63664. var parse9 = require_parse2();
  63665. var env = require_node3();
  63666. var YEAR = 365.259641 * 24 * 60 * 60 * 1e3;
  63667. var ANDROID_EVERGREEN_FIRST = 37;
  63668. function isVersionsMatch(versionA, versionB) {
  63669. return (versionA + ".").indexOf(versionB + ".") === 0;
  63670. }
  63671. function isEolReleased(name2) {
  63672. var version3 = name2.slice(1);
  63673. return browserslist.nodeVersions.some(function(i) {
  63674. return isVersionsMatch(i, version3);
  63675. });
  63676. }
  63677. function normalize2(versions) {
  63678. return versions.filter(function(version3) {
  63679. return typeof version3 === "string";
  63680. });
  63681. }
  63682. function normalizeElectron(version3) {
  63683. var versionToUse = version3;
  63684. if (version3.split(".").length === 3) {
  63685. versionToUse = version3.split(".").slice(0, -1).join(".");
  63686. }
  63687. return versionToUse;
  63688. }
  63689. function nameMapper(name2) {
  63690. return function mapName(version3) {
  63691. return name2 + " " + version3;
  63692. };
  63693. }
  63694. function getMajor(version3) {
  63695. return parseInt(version3.split(".")[0]);
  63696. }
  63697. function getMajorVersions(released, number2) {
  63698. if (released.length === 0)
  63699. return [];
  63700. var majorVersions = uniq(released.map(getMajor));
  63701. var minimum = majorVersions[majorVersions.length - number2];
  63702. if (!minimum) {
  63703. return released;
  63704. }
  63705. var selected = [];
  63706. for (var i = released.length - 1; i >= 0; i--) {
  63707. if (minimum > getMajor(released[i]))
  63708. break;
  63709. selected.unshift(released[i]);
  63710. }
  63711. return selected;
  63712. }
  63713. function uniq(array) {
  63714. var filtered = [];
  63715. for (var i = 0; i < array.length; i++) {
  63716. if (filtered.indexOf(array[i]) === -1)
  63717. filtered.push(array[i]);
  63718. }
  63719. return filtered;
  63720. }
  63721. function fillUsage(result, name2, data3) {
  63722. for (var i in data3) {
  63723. result[name2 + " " + i] = data3[i];
  63724. }
  63725. }
  63726. function generateFilter(sign2, version3) {
  63727. version3 = parseFloat(version3);
  63728. if (sign2 === ">") {
  63729. return function(v) {
  63730. return parseFloat(v) > version3;
  63731. };
  63732. } else if (sign2 === ">=") {
  63733. return function(v) {
  63734. return parseFloat(v) >= version3;
  63735. };
  63736. } else if (sign2 === "<") {
  63737. return function(v) {
  63738. return parseFloat(v) < version3;
  63739. };
  63740. } else {
  63741. return function(v) {
  63742. return parseFloat(v) <= version3;
  63743. };
  63744. }
  63745. }
  63746. function generateSemverFilter(sign2, version3) {
  63747. version3 = version3.split(".").map(parseSimpleInt);
  63748. version3[1] = version3[1] || 0;
  63749. version3[2] = version3[2] || 0;
  63750. if (sign2 === ">") {
  63751. return function(v) {
  63752. v = v.split(".").map(parseSimpleInt);
  63753. return compareSemver(v, version3) > 0;
  63754. };
  63755. } else if (sign2 === ">=") {
  63756. return function(v) {
  63757. v = v.split(".").map(parseSimpleInt);
  63758. return compareSemver(v, version3) >= 0;
  63759. };
  63760. } else if (sign2 === "<") {
  63761. return function(v) {
  63762. v = v.split(".").map(parseSimpleInt);
  63763. return compareSemver(version3, v) > 0;
  63764. };
  63765. } else {
  63766. return function(v) {
  63767. v = v.split(".").map(parseSimpleInt);
  63768. return compareSemver(version3, v) >= 0;
  63769. };
  63770. }
  63771. }
  63772. function parseSimpleInt(x) {
  63773. return parseInt(x);
  63774. }
  63775. function compare2(a, b) {
  63776. if (a < b)
  63777. return -1;
  63778. if (a > b)
  63779. return 1;
  63780. return 0;
  63781. }
  63782. function compareSemver(a, b) {
  63783. return compare2(parseInt(a[0]), parseInt(b[0])) || compare2(parseInt(a[1] || "0"), parseInt(b[1] || "0")) || compare2(parseInt(a[2] || "0"), parseInt(b[2] || "0"));
  63784. }
  63785. function semverFilterLoose(operator, range) {
  63786. range = range.split(".").map(parseSimpleInt);
  63787. if (typeof range[1] === "undefined") {
  63788. range[1] = "x";
  63789. }
  63790. switch (operator) {
  63791. case "<=":
  63792. return function(version3) {
  63793. version3 = version3.split(".").map(parseSimpleInt);
  63794. return compareSemverLoose(version3, range) <= 0;
  63795. };
  63796. case ">=":
  63797. default:
  63798. return function(version3) {
  63799. version3 = version3.split(".").map(parseSimpleInt);
  63800. return compareSemverLoose(version3, range) >= 0;
  63801. };
  63802. }
  63803. }
  63804. function compareSemverLoose(version3, range) {
  63805. if (version3[0] !== range[0]) {
  63806. return version3[0] < range[0] ? -1 : 1;
  63807. }
  63808. if (range[1] === "x") {
  63809. return 0;
  63810. }
  63811. if (version3[1] !== range[1]) {
  63812. return version3[1] < range[1] ? -1 : 1;
  63813. }
  63814. return 0;
  63815. }
  63816. function resolveVersion(data3, version3) {
  63817. if (data3.versions.indexOf(version3) !== -1) {
  63818. return version3;
  63819. } else if (browserslist.versionAliases[data3.name][version3]) {
  63820. return browserslist.versionAliases[data3.name][version3];
  63821. } else {
  63822. return false;
  63823. }
  63824. }
  63825. function normalizeVersion(data3, version3) {
  63826. var resolved = resolveVersion(data3, version3);
  63827. if (resolved) {
  63828. return resolved;
  63829. } else if (data3.versions.length === 1) {
  63830. return data3.versions[0];
  63831. } else {
  63832. return false;
  63833. }
  63834. }
  63835. function filterByYear(since, context) {
  63836. since = since / 1e3;
  63837. return Object.keys(agents).reduce(function(selected, name2) {
  63838. var data3 = byName(name2, context);
  63839. if (!data3)
  63840. return selected;
  63841. var versions = Object.keys(data3.releaseDate).filter(function(v) {
  63842. var date = data3.releaseDate[v];
  63843. return date !== null && date >= since;
  63844. });
  63845. return selected.concat(versions.map(nameMapper(data3.name)));
  63846. }, []);
  63847. }
  63848. function cloneData(data3) {
  63849. return {
  63850. name: data3.name,
  63851. versions: data3.versions,
  63852. released: data3.released,
  63853. releaseDate: data3.releaseDate
  63854. };
  63855. }
  63856. function mapVersions(data3, map) {
  63857. data3.versions = data3.versions.map(function(i2) {
  63858. return map[i2] || i2;
  63859. });
  63860. data3.released = data3.released.map(function(i2) {
  63861. return map[i2] || i2;
  63862. });
  63863. var fixedDate = {};
  63864. for (var i in data3.releaseDate) {
  63865. fixedDate[map[i] || i] = data3.releaseDate[i];
  63866. }
  63867. data3.releaseDate = fixedDate;
  63868. return data3;
  63869. }
  63870. function byName(name2, context) {
  63871. name2 = name2.toLowerCase();
  63872. name2 = browserslist.aliases[name2] || name2;
  63873. if (context.mobileToDesktop && browserslist.desktopNames[name2]) {
  63874. var desktop = browserslist.data[browserslist.desktopNames[name2]];
  63875. if (name2 === "android") {
  63876. return normalizeAndroidData(cloneData(browserslist.data[name2]), desktop);
  63877. } else {
  63878. var cloned = cloneData(desktop);
  63879. cloned.name = name2;
  63880. if (name2 === "op_mob") {
  63881. cloned = mapVersions(cloned, { "10.0-10.1": "10" });
  63882. }
  63883. return cloned;
  63884. }
  63885. }
  63886. return browserslist.data[name2];
  63887. }
  63888. function normalizeAndroidVersions(androidVersions, chromeVersions) {
  63889. var firstEvergreen = ANDROID_EVERGREEN_FIRST;
  63890. var last = chromeVersions[chromeVersions.length - 1];
  63891. return androidVersions.filter(function(version3) {
  63892. return /^(?:[2-4]\.|[34]$)/.test(version3);
  63893. }).concat(chromeVersions.slice(firstEvergreen - last - 1));
  63894. }
  63895. function normalizeAndroidData(android, chrome) {
  63896. android.released = normalizeAndroidVersions(android.released, chrome.released);
  63897. android.versions = normalizeAndroidVersions(android.versions, chrome.versions);
  63898. return android;
  63899. }
  63900. function checkName(name2, context) {
  63901. var data3 = byName(name2, context);
  63902. if (!data3)
  63903. throw new BrowserslistError("Unknown browser " + name2);
  63904. return data3;
  63905. }
  63906. function unknownQuery(query) {
  63907. return new BrowserslistError(
  63908. "Unknown browser query `" + query + "`. Maybe you are using old Browserslist or made typo in query."
  63909. );
  63910. }
  63911. function filterAndroid(list3, versions, context) {
  63912. if (context.mobileToDesktop)
  63913. return list3;
  63914. var released = browserslist.data.android.released;
  63915. var last = released[released.length - 1];
  63916. var diff = last - ANDROID_EVERGREEN_FIRST - versions;
  63917. if (diff > 0) {
  63918. return list3.slice(-1);
  63919. } else {
  63920. return list3.slice(diff - 1);
  63921. }
  63922. }
  63923. function resolve(queries, context) {
  63924. return parse9(QUERIES, queries).reduce(function(result, node2, index2) {
  63925. if (node2.not && index2 === 0) {
  63926. throw new BrowserslistError(
  63927. "Write any browsers query (for instance, `defaults`) before `" + node2.query + "`"
  63928. );
  63929. }
  63930. var type = QUERIES[node2.type];
  63931. var array = type.select.call(browserslist, context, node2).map(function(j) {
  63932. var parts = j.split(" ");
  63933. if (parts[1] === "0") {
  63934. return parts[0] + " " + byName(parts[0], context).versions[0];
  63935. } else {
  63936. return j;
  63937. }
  63938. });
  63939. if (node2.compose === "and") {
  63940. if (node2.not) {
  63941. return result.filter(function(j) {
  63942. return array.indexOf(j) === -1;
  63943. });
  63944. } else {
  63945. return result.filter(function(j) {
  63946. return array.indexOf(j) !== -1;
  63947. });
  63948. }
  63949. } else {
  63950. if (node2.not) {
  63951. var filter = {};
  63952. array.forEach(function(j) {
  63953. filter[j] = true;
  63954. });
  63955. return result.filter(function(j) {
  63956. return !filter[j];
  63957. });
  63958. }
  63959. return result.concat(array);
  63960. }
  63961. }, []);
  63962. }
  63963. function prepareOpts(opts) {
  63964. if (typeof opts === "undefined")
  63965. opts = {};
  63966. if (typeof opts.path === "undefined") {
  63967. opts.path = path.resolve ? path.resolve(".") : ".";
  63968. }
  63969. return opts;
  63970. }
  63971. function prepareQueries(queries, opts) {
  63972. if (typeof queries === "undefined" || queries === null) {
  63973. var config = browserslist.loadConfig(opts);
  63974. if (config) {
  63975. queries = config;
  63976. } else {
  63977. queries = browserslist.defaults;
  63978. }
  63979. }
  63980. return queries;
  63981. }
  63982. function checkQueries(queries) {
  63983. if (!(typeof queries === "string" || Array.isArray(queries))) {
  63984. throw new BrowserslistError(
  63985. "Browser queries must be an array or string. Got " + typeof queries + "."
  63986. );
  63987. }
  63988. }
  63989. var cache = {};
  63990. function browserslist(queries, opts) {
  63991. opts = prepareOpts(opts);
  63992. queries = prepareQueries(queries, opts);
  63993. checkQueries(queries);
  63994. var context = {
  63995. ignoreUnknownVersions: opts.ignoreUnknownVersions,
  63996. dangerousExtend: opts.dangerousExtend,
  63997. mobileToDesktop: opts.mobileToDesktop,
  63998. path: opts.path,
  63999. env: opts.env
  64000. };
  64001. env.oldDataWarning(browserslist.data);
  64002. var stats = env.getStat(opts, browserslist.data);
  64003. if (stats) {
  64004. context.customUsage = {};
  64005. for (var browser in stats) {
  64006. fillUsage(context.customUsage, browser, stats[browser]);
  64007. }
  64008. }
  64009. var cacheKey = JSON.stringify([queries, context]);
  64010. if (cache[cacheKey])
  64011. return cache[cacheKey];
  64012. var result = uniq(resolve(queries, context)).sort(function(name1, name2) {
  64013. name1 = name1.split(" ");
  64014. name2 = name2.split(" ");
  64015. if (name1[0] === name2[0]) {
  64016. var version1 = name1[1].split("-")[0];
  64017. var version22 = name2[1].split("-")[0];
  64018. return compareSemver(version22.split("."), version1.split("."));
  64019. } else {
  64020. return compare2(name1[0], name2[0]);
  64021. }
  64022. });
  64023. if (!env.env.BROWSERSLIST_DISABLE_CACHE) {
  64024. cache[cacheKey] = result;
  64025. }
  64026. return result;
  64027. }
  64028. browserslist.parse = function(queries, opts) {
  64029. opts = prepareOpts(opts);
  64030. queries = prepareQueries(queries, opts);
  64031. checkQueries(queries);
  64032. return parse9(QUERIES, queries);
  64033. };
  64034. browserslist.cache = {};
  64035. browserslist.data = {};
  64036. browserslist.usage = {
  64037. global: {},
  64038. custom: null
  64039. };
  64040. browserslist.defaults = ["> 0.5%", "last 2 versions", "Firefox ESR", "not dead"];
  64041. browserslist.aliases = {
  64042. fx: "firefox",
  64043. ff: "firefox",
  64044. ios: "ios_saf",
  64045. explorer: "ie",
  64046. blackberry: "bb",
  64047. explorermobile: "ie_mob",
  64048. operamini: "op_mini",
  64049. operamobile: "op_mob",
  64050. chromeandroid: "and_chr",
  64051. firefoxandroid: "and_ff",
  64052. ucandroid: "and_uc",
  64053. qqandroid: "and_qq"
  64054. };
  64055. browserslist.desktopNames = {
  64056. and_chr: "chrome",
  64057. and_ff: "firefox",
  64058. ie_mob: "ie",
  64059. op_mob: "opera",
  64060. android: "chrome"
  64061. // has extra processing logic
  64062. };
  64063. browserslist.versionAliases = {};
  64064. browserslist.clearCaches = env.clearCaches;
  64065. browserslist.parseConfig = env.parseConfig;
  64066. browserslist.readConfig = env.readConfig;
  64067. browserslist.findConfig = env.findConfig;
  64068. browserslist.loadConfig = env.loadConfig;
  64069. browserslist.coverage = function(browsers, stats) {
  64070. var data3;
  64071. if (typeof stats === "undefined") {
  64072. data3 = browserslist.usage.global;
  64073. } else if (stats === "my stats") {
  64074. var opts = {};
  64075. opts.path = path.resolve ? path.resolve(".") : ".";
  64076. var customStats = env.getStat(opts);
  64077. if (!customStats) {
  64078. throw new BrowserslistError("Custom usage statistics was not provided");
  64079. }
  64080. data3 = {};
  64081. for (var browser in customStats) {
  64082. fillUsage(data3, browser, customStats[browser]);
  64083. }
  64084. } else if (typeof stats === "string") {
  64085. if (stats.length > 2) {
  64086. stats = stats.toLowerCase();
  64087. } else {
  64088. stats = stats.toUpperCase();
  64089. }
  64090. env.loadCountry(browserslist.usage, stats, browserslist.data);
  64091. data3 = browserslist.usage[stats];
  64092. } else {
  64093. if ("dataByBrowser" in stats) {
  64094. stats = stats.dataByBrowser;
  64095. }
  64096. data3 = {};
  64097. for (var name2 in stats) {
  64098. for (var version3 in stats[name2]) {
  64099. data3[name2 + " " + version3] = stats[name2][version3];
  64100. }
  64101. }
  64102. }
  64103. return browsers.reduce(function(all4, i) {
  64104. var usage = data3[i];
  64105. if (usage === void 0) {
  64106. usage = data3[i.replace(/ \S+$/, " 0")];
  64107. }
  64108. return all4 + (usage || 0);
  64109. }, 0);
  64110. };
  64111. function nodeQuery(context, node2) {
  64112. var matched = browserslist.nodeVersions.filter(function(i) {
  64113. return isVersionsMatch(i, node2.version);
  64114. });
  64115. if (matched.length === 0) {
  64116. if (context.ignoreUnknownVersions) {
  64117. return [];
  64118. } else {
  64119. throw new BrowserslistError(
  64120. "Unknown version " + node2.version + " of Node.js"
  64121. );
  64122. }
  64123. }
  64124. return ["node " + matched[matched.length - 1]];
  64125. }
  64126. function sinceQuery(context, node2) {
  64127. var year = parseInt(node2.year);
  64128. var month = parseInt(node2.month || "01") - 1;
  64129. var day = parseInt(node2.day || "01");
  64130. return filterByYear(Date.UTC(year, month, day, 0, 0, 0), context);
  64131. }
  64132. function coverQuery(context, node2) {
  64133. var coverage = parseFloat(node2.coverage);
  64134. var usage = browserslist.usage.global;
  64135. if (node2.place) {
  64136. if (node2.place.match(/^my\s+stats$/i)) {
  64137. if (!context.customUsage) {
  64138. throw new BrowserslistError("Custom usage statistics was not provided");
  64139. }
  64140. usage = context.customUsage;
  64141. } else {
  64142. var place;
  64143. if (node2.place.length === 2) {
  64144. place = node2.place.toUpperCase();
  64145. } else {
  64146. place = node2.place.toLowerCase();
  64147. }
  64148. env.loadCountry(browserslist.usage, place, browserslist.data);
  64149. usage = browserslist.usage[place];
  64150. }
  64151. }
  64152. var versions = Object.keys(usage).sort(function(a, b) {
  64153. return usage[b] - usage[a];
  64154. });
  64155. var coveraged = 0;
  64156. var result = [];
  64157. var version3;
  64158. for (var i = 0; i < versions.length; i++) {
  64159. version3 = versions[i];
  64160. if (usage[version3] === 0)
  64161. break;
  64162. coveraged += usage[version3];
  64163. result.push(version3);
  64164. if (coveraged >= coverage)
  64165. break;
  64166. }
  64167. return result;
  64168. }
  64169. var QUERIES = {
  64170. last_major_versions: {
  64171. matches: ["versions"],
  64172. regexp: /^last\s+(\d+)\s+major\s+versions?$/i,
  64173. select: function(context, node2) {
  64174. return Object.keys(agents).reduce(function(selected, name2) {
  64175. var data3 = byName(name2, context);
  64176. if (!data3)
  64177. return selected;
  64178. var list3 = getMajorVersions(data3.released, node2.versions);
  64179. list3 = list3.map(nameMapper(data3.name));
  64180. if (data3.name === "android") {
  64181. list3 = filterAndroid(list3, node2.versions, context);
  64182. }
  64183. return selected.concat(list3);
  64184. }, []);
  64185. }
  64186. },
  64187. last_versions: {
  64188. matches: ["versions"],
  64189. regexp: /^last\s+(\d+)\s+versions?$/i,
  64190. select: function(context, node2) {
  64191. return Object.keys(agents).reduce(function(selected, name2) {
  64192. var data3 = byName(name2, context);
  64193. if (!data3)
  64194. return selected;
  64195. var list3 = data3.released.slice(-node2.versions);
  64196. list3 = list3.map(nameMapper(data3.name));
  64197. if (data3.name === "android") {
  64198. list3 = filterAndroid(list3, node2.versions, context);
  64199. }
  64200. return selected.concat(list3);
  64201. }, []);
  64202. }
  64203. },
  64204. last_electron_major_versions: {
  64205. matches: ["versions"],
  64206. regexp: /^last\s+(\d+)\s+electron\s+major\s+versions?$/i,
  64207. select: function(context, node2) {
  64208. var validVersions = getMajorVersions(Object.keys(e2c), node2.versions);
  64209. return validVersions.map(function(i) {
  64210. return "chrome " + e2c[i];
  64211. });
  64212. }
  64213. },
  64214. last_node_major_versions: {
  64215. matches: ["versions"],
  64216. regexp: /^last\s+(\d+)\s+node\s+major\s+versions?$/i,
  64217. select: function(context, node2) {
  64218. return getMajorVersions(browserslist.nodeVersions, node2.versions).map(
  64219. function(version3) {
  64220. return "node " + version3;
  64221. }
  64222. );
  64223. }
  64224. },
  64225. last_browser_major_versions: {
  64226. matches: ["versions", "browser"],
  64227. regexp: /^last\s+(\d+)\s+(\w+)\s+major\s+versions?$/i,
  64228. select: function(context, node2) {
  64229. var data3 = checkName(node2.browser, context);
  64230. var validVersions = getMajorVersions(data3.released, node2.versions);
  64231. var list3 = validVersions.map(nameMapper(data3.name));
  64232. if (data3.name === "android") {
  64233. list3 = filterAndroid(list3, node2.versions, context);
  64234. }
  64235. return list3;
  64236. }
  64237. },
  64238. last_electron_versions: {
  64239. matches: ["versions"],
  64240. regexp: /^last\s+(\d+)\s+electron\s+versions?$/i,
  64241. select: function(context, node2) {
  64242. return Object.keys(e2c).slice(-node2.versions).map(function(i) {
  64243. return "chrome " + e2c[i];
  64244. });
  64245. }
  64246. },
  64247. last_node_versions: {
  64248. matches: ["versions"],
  64249. regexp: /^last\s+(\d+)\s+node\s+versions?$/i,
  64250. select: function(context, node2) {
  64251. return browserslist.nodeVersions.slice(-node2.versions).map(function(version3) {
  64252. return "node " + version3;
  64253. });
  64254. }
  64255. },
  64256. last_browser_versions: {
  64257. matches: ["versions", "browser"],
  64258. regexp: /^last\s+(\d+)\s+(\w+)\s+versions?$/i,
  64259. select: function(context, node2) {
  64260. var data3 = checkName(node2.browser, context);
  64261. var list3 = data3.released.slice(-node2.versions).map(nameMapper(data3.name));
  64262. if (data3.name === "android") {
  64263. list3 = filterAndroid(list3, node2.versions, context);
  64264. }
  64265. return list3;
  64266. }
  64267. },
  64268. unreleased_versions: {
  64269. matches: [],
  64270. regexp: /^unreleased\s+versions$/i,
  64271. select: function(context) {
  64272. return Object.keys(agents).reduce(function(selected, name2) {
  64273. var data3 = byName(name2, context);
  64274. if (!data3)
  64275. return selected;
  64276. var list3 = data3.versions.filter(function(v) {
  64277. return data3.released.indexOf(v) === -1;
  64278. });
  64279. list3 = list3.map(nameMapper(data3.name));
  64280. return selected.concat(list3);
  64281. }, []);
  64282. }
  64283. },
  64284. unreleased_electron_versions: {
  64285. matches: [],
  64286. regexp: /^unreleased\s+electron\s+versions?$/i,
  64287. select: function() {
  64288. return [];
  64289. }
  64290. },
  64291. unreleased_browser_versions: {
  64292. matches: ["browser"],
  64293. regexp: /^unreleased\s+(\w+)\s+versions?$/i,
  64294. select: function(context, node2) {
  64295. var data3 = checkName(node2.browser, context);
  64296. return data3.versions.filter(function(v) {
  64297. return data3.released.indexOf(v) === -1;
  64298. }).map(nameMapper(data3.name));
  64299. }
  64300. },
  64301. last_years: {
  64302. matches: ["years"],
  64303. regexp: /^last\s+(\d*.?\d+)\s+years?$/i,
  64304. select: function(context, node2) {
  64305. return filterByYear(Date.now() - YEAR * node2.years, context);
  64306. }
  64307. },
  64308. since_y: {
  64309. matches: ["year"],
  64310. regexp: /^since (\d+)$/i,
  64311. select: sinceQuery
  64312. },
  64313. since_y_m: {
  64314. matches: ["year", "month"],
  64315. regexp: /^since (\d+)-(\d+)$/i,
  64316. select: sinceQuery
  64317. },
  64318. since_y_m_d: {
  64319. matches: ["year", "month", "day"],
  64320. regexp: /^since (\d+)-(\d+)-(\d+)$/i,
  64321. select: sinceQuery
  64322. },
  64323. popularity: {
  64324. matches: ["sign", "popularity"],
  64325. regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%$/,
  64326. select: function(context, node2) {
  64327. var popularity = parseFloat(node2.popularity);
  64328. var usage = browserslist.usage.global;
  64329. return Object.keys(usage).reduce(function(result, version3) {
  64330. if (node2.sign === ">") {
  64331. if (usage[version3] > popularity) {
  64332. result.push(version3);
  64333. }
  64334. } else if (node2.sign === "<") {
  64335. if (usage[version3] < popularity) {
  64336. result.push(version3);
  64337. }
  64338. } else if (node2.sign === "<=") {
  64339. if (usage[version3] <= popularity) {
  64340. result.push(version3);
  64341. }
  64342. } else if (usage[version3] >= popularity) {
  64343. result.push(version3);
  64344. }
  64345. return result;
  64346. }, []);
  64347. }
  64348. },
  64349. popularity_in_my_stats: {
  64350. matches: ["sign", "popularity"],
  64351. regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+my\s+stats$/,
  64352. select: function(context, node2) {
  64353. var popularity = parseFloat(node2.popularity);
  64354. if (!context.customUsage) {
  64355. throw new BrowserslistError("Custom usage statistics was not provided");
  64356. }
  64357. var usage = context.customUsage;
  64358. return Object.keys(usage).reduce(function(result, version3) {
  64359. var percentage = usage[version3];
  64360. if (percentage == null) {
  64361. return result;
  64362. }
  64363. if (node2.sign === ">") {
  64364. if (percentage > popularity) {
  64365. result.push(version3);
  64366. }
  64367. } else if (node2.sign === "<") {
  64368. if (percentage < popularity) {
  64369. result.push(version3);
  64370. }
  64371. } else if (node2.sign === "<=") {
  64372. if (percentage <= popularity) {
  64373. result.push(version3);
  64374. }
  64375. } else if (percentage >= popularity) {
  64376. result.push(version3);
  64377. }
  64378. return result;
  64379. }, []);
  64380. }
  64381. },
  64382. popularity_in_config_stats: {
  64383. matches: ["sign", "popularity", "config"],
  64384. regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+(\S+)\s+stats$/,
  64385. select: function(context, node2) {
  64386. var popularity = parseFloat(node2.popularity);
  64387. var stats = env.loadStat(context, node2.config, browserslist.data);
  64388. if (stats) {
  64389. context.customUsage = {};
  64390. for (var browser in stats) {
  64391. fillUsage(context.customUsage, browser, stats[browser]);
  64392. }
  64393. }
  64394. if (!context.customUsage) {
  64395. throw new BrowserslistError("Custom usage statistics was not provided");
  64396. }
  64397. var usage = context.customUsage;
  64398. return Object.keys(usage).reduce(function(result, version3) {
  64399. var percentage = usage[version3];
  64400. if (percentage == null) {
  64401. return result;
  64402. }
  64403. if (node2.sign === ">") {
  64404. if (percentage > popularity) {
  64405. result.push(version3);
  64406. }
  64407. } else if (node2.sign === "<") {
  64408. if (percentage < popularity) {
  64409. result.push(version3);
  64410. }
  64411. } else if (node2.sign === "<=") {
  64412. if (percentage <= popularity) {
  64413. result.push(version3);
  64414. }
  64415. } else if (percentage >= popularity) {
  64416. result.push(version3);
  64417. }
  64418. return result;
  64419. }, []);
  64420. }
  64421. },
  64422. popularity_in_place: {
  64423. matches: ["sign", "popularity", "place"],
  64424. regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+((alt-)?\w\w)$/,
  64425. select: function(context, node2) {
  64426. var popularity = parseFloat(node2.popularity);
  64427. var place = node2.place;
  64428. if (place.length === 2) {
  64429. place = place.toUpperCase();
  64430. } else {
  64431. place = place.toLowerCase();
  64432. }
  64433. env.loadCountry(browserslist.usage, place, browserslist.data);
  64434. var usage = browserslist.usage[place];
  64435. return Object.keys(usage).reduce(function(result, version3) {
  64436. var percentage = usage[version3];
  64437. if (percentage == null) {
  64438. return result;
  64439. }
  64440. if (node2.sign === ">") {
  64441. if (percentage > popularity) {
  64442. result.push(version3);
  64443. }
  64444. } else if (node2.sign === "<") {
  64445. if (percentage < popularity) {
  64446. result.push(version3);
  64447. }
  64448. } else if (node2.sign === "<=") {
  64449. if (percentage <= popularity) {
  64450. result.push(version3);
  64451. }
  64452. } else if (percentage >= popularity) {
  64453. result.push(version3);
  64454. }
  64455. return result;
  64456. }, []);
  64457. }
  64458. },
  64459. cover: {
  64460. matches: ["coverage"],
  64461. regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%$/i,
  64462. select: coverQuery
  64463. },
  64464. cover_in: {
  64465. matches: ["coverage", "place"],
  64466. regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)$/i,
  64467. select: coverQuery
  64468. },
  64469. supports: {
  64470. matches: ["feature"],
  64471. regexp: /^supports\s+([\w-]+)$/,
  64472. select: function(context, node2) {
  64473. env.loadFeature(browserslist.cache, node2.feature);
  64474. var features = browserslist.cache[node2.feature];
  64475. return Object.keys(features).reduce(function(result, version3) {
  64476. var flags = features[version3];
  64477. if (flags.indexOf("y") >= 0 || flags.indexOf("a") >= 0) {
  64478. result.push(version3);
  64479. }
  64480. return result;
  64481. }, []);
  64482. }
  64483. },
  64484. electron_range: {
  64485. matches: ["from", "to"],
  64486. regexp: /^electron\s+([\d.]+)\s*-\s*([\d.]+)$/i,
  64487. select: function(context, node2) {
  64488. var fromToUse = normalizeElectron(node2.from);
  64489. var toToUse = normalizeElectron(node2.to);
  64490. var from = parseFloat(node2.from);
  64491. var to = parseFloat(node2.to);
  64492. if (!e2c[fromToUse]) {
  64493. throw new BrowserslistError("Unknown version " + from + " of electron");
  64494. }
  64495. if (!e2c[toToUse]) {
  64496. throw new BrowserslistError("Unknown version " + to + " of electron");
  64497. }
  64498. return Object.keys(e2c).filter(function(i) {
  64499. var parsed = parseFloat(i);
  64500. return parsed >= from && parsed <= to;
  64501. }).map(function(i) {
  64502. return "chrome " + e2c[i];
  64503. });
  64504. }
  64505. },
  64506. node_range: {
  64507. matches: ["from", "to"],
  64508. regexp: /^node\s+([\d.]+)\s*-\s*([\d.]+)$/i,
  64509. select: function(context, node2) {
  64510. return browserslist.nodeVersions.filter(semverFilterLoose(">=", node2.from)).filter(semverFilterLoose("<=", node2.to)).map(function(v) {
  64511. return "node " + v;
  64512. });
  64513. }
  64514. },
  64515. browser_range: {
  64516. matches: ["browser", "from", "to"],
  64517. regexp: /^(\w+)\s+([\d.]+)\s*-\s*([\d.]+)$/i,
  64518. select: function(context, node2) {
  64519. var data3 = checkName(node2.browser, context);
  64520. var from = parseFloat(normalizeVersion(data3, node2.from) || node2.from);
  64521. var to = parseFloat(normalizeVersion(data3, node2.to) || node2.to);
  64522. function filter(v) {
  64523. var parsed = parseFloat(v);
  64524. return parsed >= from && parsed <= to;
  64525. }
  64526. return data3.released.filter(filter).map(nameMapper(data3.name));
  64527. }
  64528. },
  64529. electron_ray: {
  64530. matches: ["sign", "version"],
  64531. regexp: /^electron\s*(>=?|<=?)\s*([\d.]+)$/i,
  64532. select: function(context, node2) {
  64533. var versionToUse = normalizeElectron(node2.version);
  64534. return Object.keys(e2c).filter(generateFilter(node2.sign, versionToUse)).map(function(i) {
  64535. return "chrome " + e2c[i];
  64536. });
  64537. }
  64538. },
  64539. node_ray: {
  64540. matches: ["sign", "version"],
  64541. regexp: /^node\s*(>=?|<=?)\s*([\d.]+)$/i,
  64542. select: function(context, node2) {
  64543. return browserslist.nodeVersions.filter(generateSemverFilter(node2.sign, node2.version)).map(function(v) {
  64544. return "node " + v;
  64545. });
  64546. }
  64547. },
  64548. browser_ray: {
  64549. matches: ["browser", "sign", "version"],
  64550. regexp: /^(\w+)\s*(>=?|<=?)\s*([\d.]+)$/,
  64551. select: function(context, node2) {
  64552. var version3 = node2.version;
  64553. var data3 = checkName(node2.browser, context);
  64554. var alias = browserslist.versionAliases[data3.name][version3];
  64555. if (alias)
  64556. version3 = alias;
  64557. return data3.released.filter(generateFilter(node2.sign, version3)).map(function(v) {
  64558. return data3.name + " " + v;
  64559. });
  64560. }
  64561. },
  64562. firefox_esr: {
  64563. matches: [],
  64564. regexp: /^(firefox|ff|fx)\s+esr$/i,
  64565. select: function() {
  64566. return ["firefox 102"];
  64567. }
  64568. },
  64569. opera_mini_all: {
  64570. matches: [],
  64571. regexp: /(operamini|op_mini)\s+all/i,
  64572. select: function() {
  64573. return ["op_mini all"];
  64574. }
  64575. },
  64576. electron_version: {
  64577. matches: ["version"],
  64578. regexp: /^electron\s+([\d.]+)$/i,
  64579. select: function(context, node2) {
  64580. var versionToUse = normalizeElectron(node2.version);
  64581. var chrome = e2c[versionToUse];
  64582. if (!chrome) {
  64583. throw new BrowserslistError(
  64584. "Unknown version " + node2.version + " of electron"
  64585. );
  64586. }
  64587. return ["chrome " + chrome];
  64588. }
  64589. },
  64590. node_major_version: {
  64591. matches: ["version"],
  64592. regexp: /^node\s+(\d+)$/i,
  64593. select: nodeQuery
  64594. },
  64595. node_minor_version: {
  64596. matches: ["version"],
  64597. regexp: /^node\s+(\d+\.\d+)$/i,
  64598. select: nodeQuery
  64599. },
  64600. node_patch_version: {
  64601. matches: ["version"],
  64602. regexp: /^node\s+(\d+\.\d+\.\d+)$/i,
  64603. select: nodeQuery
  64604. },
  64605. current_node: {
  64606. matches: [],
  64607. regexp: /^current\s+node$/i,
  64608. select: function(context) {
  64609. return [env.currentNode(resolve, context)];
  64610. }
  64611. },
  64612. maintained_node: {
  64613. matches: [],
  64614. regexp: /^maintained\s+node\s+versions$/i,
  64615. select: function(context) {
  64616. var now = Date.now();
  64617. var queries = Object.keys(jsEOL).filter(function(key2) {
  64618. return now < Date.parse(jsEOL[key2].end) && now > Date.parse(jsEOL[key2].start) && isEolReleased(key2);
  64619. }).map(function(key2) {
  64620. return "node " + key2.slice(1);
  64621. });
  64622. return resolve(queries, context);
  64623. }
  64624. },
  64625. phantomjs_1_9: {
  64626. matches: [],
  64627. regexp: /^phantomjs\s+1.9$/i,
  64628. select: function() {
  64629. return ["safari 5"];
  64630. }
  64631. },
  64632. phantomjs_2_1: {
  64633. matches: [],
  64634. regexp: /^phantomjs\s+2.1$/i,
  64635. select: function() {
  64636. return ["safari 6"];
  64637. }
  64638. },
  64639. browser_version: {
  64640. matches: ["browser", "version"],
  64641. regexp: /^(\w+)\s+(tp|[\d.]+)$/i,
  64642. select: function(context, node2) {
  64643. var version3 = node2.version;
  64644. if (/^tp$/i.test(version3))
  64645. version3 = "TP";
  64646. var data3 = checkName(node2.browser, context);
  64647. var alias = normalizeVersion(data3, version3);
  64648. if (alias) {
  64649. version3 = alias;
  64650. } else {
  64651. if (version3.indexOf(".") === -1) {
  64652. alias = version3 + ".0";
  64653. } else {
  64654. alias = version3.replace(/\.0$/, "");
  64655. }
  64656. alias = normalizeVersion(data3, alias);
  64657. if (alias) {
  64658. version3 = alias;
  64659. } else if (context.ignoreUnknownVersions) {
  64660. return [];
  64661. } else {
  64662. throw new BrowserslistError(
  64663. "Unknown version " + version3 + " of " + node2.browser
  64664. );
  64665. }
  64666. }
  64667. return [data3.name + " " + version3];
  64668. }
  64669. },
  64670. browserslist_config: {
  64671. matches: [],
  64672. regexp: /^browserslist config$/i,
  64673. select: function(context) {
  64674. return browserslist(void 0, context);
  64675. }
  64676. },
  64677. extends: {
  64678. matches: ["config"],
  64679. regexp: /^extends (.+)$/i,
  64680. select: function(context, node2) {
  64681. return resolve(env.loadQueries(context, node2.config), context);
  64682. }
  64683. },
  64684. defaults: {
  64685. matches: [],
  64686. regexp: /^defaults$/i,
  64687. select: function(context) {
  64688. return resolve(browserslist.defaults, context);
  64689. }
  64690. },
  64691. dead: {
  64692. matches: [],
  64693. regexp: /^dead$/i,
  64694. select: function(context) {
  64695. var dead = [
  64696. "Baidu >= 0",
  64697. "ie <= 11",
  64698. "ie_mob <= 11",
  64699. "bb <= 10",
  64700. "op_mob <= 12.1",
  64701. "samsung 4"
  64702. ];
  64703. return resolve(dead, context);
  64704. }
  64705. },
  64706. unknown: {
  64707. matches: [],
  64708. regexp: /^(\w+)$/i,
  64709. select: function(context, node2) {
  64710. if (byName(node2.query, context)) {
  64711. throw new BrowserslistError(
  64712. "Specify versions in Browserslist query for browser " + node2.query
  64713. );
  64714. } else {
  64715. throw unknownQuery(node2.query);
  64716. }
  64717. }
  64718. }
  64719. };
  64720. (function() {
  64721. for (var name2 in agents) {
  64722. var browser = agents[name2];
  64723. browserslist.data[name2] = {
  64724. name: name2,
  64725. versions: normalize2(agents[name2].versions),
  64726. released: normalize2(agents[name2].versions.slice(0, -3)),
  64727. releaseDate: agents[name2].release_date
  64728. };
  64729. fillUsage(browserslist.usage.global, name2, browser.usage_global);
  64730. browserslist.versionAliases[name2] = {};
  64731. for (var i = 0; i < browser.versions.length; i++) {
  64732. var full = browser.versions[i];
  64733. if (!full)
  64734. continue;
  64735. if (full.indexOf("-") !== -1) {
  64736. var interval = full.split("-");
  64737. for (var j = 0; j < interval.length; j++) {
  64738. browserslist.versionAliases[name2][interval[j]] = full;
  64739. }
  64740. }
  64741. }
  64742. }
  64743. browserslist.versionAliases.op_mob["59"] = "58";
  64744. browserslist.nodeVersions = jsReleases.map(function(release) {
  64745. return release.version;
  64746. });
  64747. })();
  64748. module.exports = browserslist;
  64749. }
  64750. });
  64751. // node_modules/@babel/helper-validator-option/lib/find-suggestion.js
  64752. var require_find_suggestion = __commonJS({
  64753. "node_modules/@babel/helper-validator-option/lib/find-suggestion.js"(exports) {
  64754. "use strict";
  64755. Object.defineProperty(exports, "__esModule", {
  64756. value: true
  64757. });
  64758. exports.findSuggestion = findSuggestion;
  64759. var {
  64760. min
  64761. } = Math;
  64762. function levenshtein(a, b) {
  64763. let t3 = [], u = [], i, j;
  64764. const m = a.length, n = b.length;
  64765. if (!m) {
  64766. return n;
  64767. }
  64768. if (!n) {
  64769. return m;
  64770. }
  64771. for (j = 0; j <= n; j++) {
  64772. t3[j] = j;
  64773. }
  64774. for (i = 1; i <= m; i++) {
  64775. for (u = [i], j = 1; j <= n; j++) {
  64776. u[j] = a[i - 1] === b[j - 1] ? t3[j - 1] : min(t3[j - 1], t3[j], u[j - 1]) + 1;
  64777. }
  64778. t3 = u;
  64779. }
  64780. return u[n];
  64781. }
  64782. function findSuggestion(str, arr) {
  64783. const distances = arr.map((el) => levenshtein(el, str));
  64784. return arr[distances.indexOf(min(...distances))];
  64785. }
  64786. }
  64787. });
  64788. // node_modules/@babel/helper-validator-option/lib/validator.js
  64789. var require_validator = __commonJS({
  64790. "node_modules/@babel/helper-validator-option/lib/validator.js"(exports) {
  64791. "use strict";
  64792. Object.defineProperty(exports, "__esModule", {
  64793. value: true
  64794. });
  64795. exports.OptionValidator = void 0;
  64796. var _findSuggestion = require_find_suggestion();
  64797. var OptionValidator = class {
  64798. constructor(descriptor) {
  64799. this.descriptor = descriptor;
  64800. }
  64801. validateTopLevelOptions(options, TopLevelOptionShape) {
  64802. const validOptionNames = Object.keys(TopLevelOptionShape);
  64803. for (const option of Object.keys(options)) {
  64804. if (!validOptionNames.includes(option)) {
  64805. throw new Error(this.formatMessage(`'${option}' is not a valid top-level option.
  64806. - Did you mean '${(0, _findSuggestion.findSuggestion)(option, validOptionNames)}'?`));
  64807. }
  64808. }
  64809. }
  64810. validateBooleanOption(name2, value2, defaultValue) {
  64811. if (value2 === void 0) {
  64812. return defaultValue;
  64813. } else {
  64814. this.invariant(typeof value2 === "boolean", `'${name2}' option must be a boolean.`);
  64815. }
  64816. return value2;
  64817. }
  64818. validateStringOption(name2, value2, defaultValue) {
  64819. if (value2 === void 0) {
  64820. return defaultValue;
  64821. } else {
  64822. this.invariant(typeof value2 === "string", `'${name2}' option must be a string.`);
  64823. }
  64824. return value2;
  64825. }
  64826. invariant(condition, message) {
  64827. if (!condition) {
  64828. throw new Error(this.formatMessage(message));
  64829. }
  64830. }
  64831. formatMessage(message) {
  64832. return `${this.descriptor}: ${message}`;
  64833. }
  64834. };
  64835. exports.OptionValidator = OptionValidator;
  64836. }
  64837. });
  64838. // node_modules/@babel/helper-validator-option/lib/index.js
  64839. var require_lib18 = __commonJS({
  64840. "node_modules/@babel/helper-validator-option/lib/index.js"(exports) {
  64841. "use strict";
  64842. Object.defineProperty(exports, "__esModule", {
  64843. value: true
  64844. });
  64845. Object.defineProperty(exports, "OptionValidator", {
  64846. enumerable: true,
  64847. get: function() {
  64848. return _validator.OptionValidator;
  64849. }
  64850. });
  64851. Object.defineProperty(exports, "findSuggestion", {
  64852. enumerable: true,
  64853. get: function() {
  64854. return _findSuggestion.findSuggestion;
  64855. }
  64856. });
  64857. var _validator = require_validator();
  64858. var _findSuggestion = require_find_suggestion();
  64859. }
  64860. });
  64861. // node_modules/@babel/compat-data/data/native-modules.json
  64862. var require_native_modules = __commonJS({
  64863. "node_modules/@babel/compat-data/data/native-modules.json"(exports, module) {
  64864. module.exports = {
  64865. "es6.module": {
  64866. chrome: "61",
  64867. and_chr: "61",
  64868. edge: "16",
  64869. firefox: "60",
  64870. and_ff: "60",
  64871. node: "13.2.0",
  64872. opera: "48",
  64873. op_mob: "48",
  64874. safari: "10.1",
  64875. ios: "10.3",
  64876. samsung: "8.2",
  64877. android: "61",
  64878. electron: "2.0",
  64879. ios_saf: "10.3"
  64880. }
  64881. };
  64882. }
  64883. });
  64884. // node_modules/@babel/compat-data/native-modules.js
  64885. var require_native_modules2 = __commonJS({
  64886. "node_modules/@babel/compat-data/native-modules.js"(exports, module) {
  64887. module.exports = require_native_modules();
  64888. }
  64889. });
  64890. // node_modules/@babel/helper-compilation-targets/node_modules/yallist/iterator.js
  64891. var require_iterator = __commonJS({
  64892. "node_modules/@babel/helper-compilation-targets/node_modules/yallist/iterator.js"(exports, module) {
  64893. "use strict";
  64894. module.exports = function(Yallist) {
  64895. Yallist.prototype[Symbol.iterator] = function* () {
  64896. for (let walker = this.head; walker; walker = walker.next) {
  64897. yield walker.value;
  64898. }
  64899. };
  64900. };
  64901. }
  64902. });
  64903. // node_modules/@babel/helper-compilation-targets/node_modules/yallist/yallist.js
  64904. var require_yallist = __commonJS({
  64905. "node_modules/@babel/helper-compilation-targets/node_modules/yallist/yallist.js"(exports, module) {
  64906. "use strict";
  64907. module.exports = Yallist;
  64908. Yallist.Node = Node5;
  64909. Yallist.create = Yallist;
  64910. function Yallist(list3) {
  64911. var self2 = this;
  64912. if (!(self2 instanceof Yallist)) {
  64913. self2 = new Yallist();
  64914. }
  64915. self2.tail = null;
  64916. self2.head = null;
  64917. self2.length = 0;
  64918. if (list3 && typeof list3.forEach === "function") {
  64919. list3.forEach(function(item) {
  64920. self2.push(item);
  64921. });
  64922. } else if (arguments.length > 0) {
  64923. for (var i = 0, l = arguments.length; i < l; i++) {
  64924. self2.push(arguments[i]);
  64925. }
  64926. }
  64927. return self2;
  64928. }
  64929. Yallist.prototype.removeNode = function(node2) {
  64930. if (node2.list !== this) {
  64931. throw new Error("removing node which does not belong to this list");
  64932. }
  64933. var next = node2.next;
  64934. var prev = node2.prev;
  64935. if (next) {
  64936. next.prev = prev;
  64937. }
  64938. if (prev) {
  64939. prev.next = next;
  64940. }
  64941. if (node2 === this.head) {
  64942. this.head = next;
  64943. }
  64944. if (node2 === this.tail) {
  64945. this.tail = prev;
  64946. }
  64947. node2.list.length--;
  64948. node2.next = null;
  64949. node2.prev = null;
  64950. node2.list = null;
  64951. return next;
  64952. };
  64953. Yallist.prototype.unshiftNode = function(node2) {
  64954. if (node2 === this.head) {
  64955. return;
  64956. }
  64957. if (node2.list) {
  64958. node2.list.removeNode(node2);
  64959. }
  64960. var head = this.head;
  64961. node2.list = this;
  64962. node2.next = head;
  64963. if (head) {
  64964. head.prev = node2;
  64965. }
  64966. this.head = node2;
  64967. if (!this.tail) {
  64968. this.tail = node2;
  64969. }
  64970. this.length++;
  64971. };
  64972. Yallist.prototype.pushNode = function(node2) {
  64973. if (node2 === this.tail) {
  64974. return;
  64975. }
  64976. if (node2.list) {
  64977. node2.list.removeNode(node2);
  64978. }
  64979. var tail = this.tail;
  64980. node2.list = this;
  64981. node2.prev = tail;
  64982. if (tail) {
  64983. tail.next = node2;
  64984. }
  64985. this.tail = node2;
  64986. if (!this.head) {
  64987. this.head = node2;
  64988. }
  64989. this.length++;
  64990. };
  64991. Yallist.prototype.push = function() {
  64992. for (var i = 0, l = arguments.length; i < l; i++) {
  64993. push3(this, arguments[i]);
  64994. }
  64995. return this.length;
  64996. };
  64997. Yallist.prototype.unshift = function() {
  64998. for (var i = 0, l = arguments.length; i < l; i++) {
  64999. unshift(this, arguments[i]);
  65000. }
  65001. return this.length;
  65002. };
  65003. Yallist.prototype.pop = function() {
  65004. if (!this.tail) {
  65005. return void 0;
  65006. }
  65007. var res = this.tail.value;
  65008. this.tail = this.tail.prev;
  65009. if (this.tail) {
  65010. this.tail.next = null;
  65011. } else {
  65012. this.head = null;
  65013. }
  65014. this.length--;
  65015. return res;
  65016. };
  65017. Yallist.prototype.shift = function() {
  65018. if (!this.head) {
  65019. return void 0;
  65020. }
  65021. var res = this.head.value;
  65022. this.head = this.head.next;
  65023. if (this.head) {
  65024. this.head.prev = null;
  65025. } else {
  65026. this.tail = null;
  65027. }
  65028. this.length--;
  65029. return res;
  65030. };
  65031. Yallist.prototype.forEach = function(fn, thisp) {
  65032. thisp = thisp || this;
  65033. for (var walker = this.head, i = 0; walker !== null; i++) {
  65034. fn.call(thisp, walker.value, i, this);
  65035. walker = walker.next;
  65036. }
  65037. };
  65038. Yallist.prototype.forEachReverse = function(fn, thisp) {
  65039. thisp = thisp || this;
  65040. for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
  65041. fn.call(thisp, walker.value, i, this);
  65042. walker = walker.prev;
  65043. }
  65044. };
  65045. Yallist.prototype.get = function(n) {
  65046. for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
  65047. walker = walker.next;
  65048. }
  65049. if (i === n && walker !== null) {
  65050. return walker.value;
  65051. }
  65052. };
  65053. Yallist.prototype.getReverse = function(n) {
  65054. for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
  65055. walker = walker.prev;
  65056. }
  65057. if (i === n && walker !== null) {
  65058. return walker.value;
  65059. }
  65060. };
  65061. Yallist.prototype.map = function(fn, thisp) {
  65062. thisp = thisp || this;
  65063. var res = new Yallist();
  65064. for (var walker = this.head; walker !== null; ) {
  65065. res.push(fn.call(thisp, walker.value, this));
  65066. walker = walker.next;
  65067. }
  65068. return res;
  65069. };
  65070. Yallist.prototype.mapReverse = function(fn, thisp) {
  65071. thisp = thisp || this;
  65072. var res = new Yallist();
  65073. for (var walker = this.tail; walker !== null; ) {
  65074. res.push(fn.call(thisp, walker.value, this));
  65075. walker = walker.prev;
  65076. }
  65077. return res;
  65078. };
  65079. Yallist.prototype.reduce = function(fn, initial) {
  65080. var acc;
  65081. var walker = this.head;
  65082. if (arguments.length > 1) {
  65083. acc = initial;
  65084. } else if (this.head) {
  65085. walker = this.head.next;
  65086. acc = this.head.value;
  65087. } else {
  65088. throw new TypeError("Reduce of empty list with no initial value");
  65089. }
  65090. for (var i = 0; walker !== null; i++) {
  65091. acc = fn(acc, walker.value, i);
  65092. walker = walker.next;
  65093. }
  65094. return acc;
  65095. };
  65096. Yallist.prototype.reduceReverse = function(fn, initial) {
  65097. var acc;
  65098. var walker = this.tail;
  65099. if (arguments.length > 1) {
  65100. acc = initial;
  65101. } else if (this.tail) {
  65102. walker = this.tail.prev;
  65103. acc = this.tail.value;
  65104. } else {
  65105. throw new TypeError("Reduce of empty list with no initial value");
  65106. }
  65107. for (var i = this.length - 1; walker !== null; i--) {
  65108. acc = fn(acc, walker.value, i);
  65109. walker = walker.prev;
  65110. }
  65111. return acc;
  65112. };
  65113. Yallist.prototype.toArray = function() {
  65114. var arr = new Array(this.length);
  65115. for (var i = 0, walker = this.head; walker !== null; i++) {
  65116. arr[i] = walker.value;
  65117. walker = walker.next;
  65118. }
  65119. return arr;
  65120. };
  65121. Yallist.prototype.toArrayReverse = function() {
  65122. var arr = new Array(this.length);
  65123. for (var i = 0, walker = this.tail; walker !== null; i++) {
  65124. arr[i] = walker.value;
  65125. walker = walker.prev;
  65126. }
  65127. return arr;
  65128. };
  65129. Yallist.prototype.slice = function(from, to) {
  65130. to = to || this.length;
  65131. if (to < 0) {
  65132. to += this.length;
  65133. }
  65134. from = from || 0;
  65135. if (from < 0) {
  65136. from += this.length;
  65137. }
  65138. var ret = new Yallist();
  65139. if (to < from || to < 0) {
  65140. return ret;
  65141. }
  65142. if (from < 0) {
  65143. from = 0;
  65144. }
  65145. if (to > this.length) {
  65146. to = this.length;
  65147. }
  65148. for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
  65149. walker = walker.next;
  65150. }
  65151. for (; walker !== null && i < to; i++, walker = walker.next) {
  65152. ret.push(walker.value);
  65153. }
  65154. return ret;
  65155. };
  65156. Yallist.prototype.sliceReverse = function(from, to) {
  65157. to = to || this.length;
  65158. if (to < 0) {
  65159. to += this.length;
  65160. }
  65161. from = from || 0;
  65162. if (from < 0) {
  65163. from += this.length;
  65164. }
  65165. var ret = new Yallist();
  65166. if (to < from || to < 0) {
  65167. return ret;
  65168. }
  65169. if (from < 0) {
  65170. from = 0;
  65171. }
  65172. if (to > this.length) {
  65173. to = this.length;
  65174. }
  65175. for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
  65176. walker = walker.prev;
  65177. }
  65178. for (; walker !== null && i > from; i--, walker = walker.prev) {
  65179. ret.push(walker.value);
  65180. }
  65181. return ret;
  65182. };
  65183. Yallist.prototype.splice = function(start3, deleteCount) {
  65184. if (start3 > this.length) {
  65185. start3 = this.length - 1;
  65186. }
  65187. if (start3 < 0) {
  65188. start3 = this.length + start3;
  65189. }
  65190. for (var i = 0, walker = this.head; walker !== null && i < start3; i++) {
  65191. walker = walker.next;
  65192. }
  65193. var ret = [];
  65194. for (var i = 0; walker && i < deleteCount; i++) {
  65195. ret.push(walker.value);
  65196. walker = this.removeNode(walker);
  65197. }
  65198. if (walker === null) {
  65199. walker = this.tail;
  65200. }
  65201. if (walker !== this.head && walker !== this.tail) {
  65202. walker = walker.prev;
  65203. }
  65204. for (var i = 2; i < arguments.length; i++) {
  65205. walker = insert(this, walker, arguments[i]);
  65206. }
  65207. return ret;
  65208. };
  65209. Yallist.prototype.reverse = function() {
  65210. var head = this.head;
  65211. var tail = this.tail;
  65212. for (var walker = head; walker !== null; walker = walker.prev) {
  65213. var p = walker.prev;
  65214. walker.prev = walker.next;
  65215. walker.next = p;
  65216. }
  65217. this.head = tail;
  65218. this.tail = head;
  65219. return this;
  65220. };
  65221. function insert(self2, node2, value2) {
  65222. var inserted = node2 === self2.head ? new Node5(value2, null, node2, self2) : new Node5(value2, node2, node2.next, self2);
  65223. if (inserted.next === null) {
  65224. self2.tail = inserted;
  65225. }
  65226. if (inserted.prev === null) {
  65227. self2.head = inserted;
  65228. }
  65229. self2.length++;
  65230. return inserted;
  65231. }
  65232. function push3(self2, item) {
  65233. self2.tail = new Node5(item, self2.tail, null, self2);
  65234. if (!self2.head) {
  65235. self2.head = self2.tail;
  65236. }
  65237. self2.length++;
  65238. }
  65239. function unshift(self2, item) {
  65240. self2.head = new Node5(item, null, self2.head, self2);
  65241. if (!self2.tail) {
  65242. self2.tail = self2.head;
  65243. }
  65244. self2.length++;
  65245. }
  65246. function Node5(value2, prev, next, list3) {
  65247. if (!(this instanceof Node5)) {
  65248. return new Node5(value2, prev, next, list3);
  65249. }
  65250. this.list = list3;
  65251. this.value = value2;
  65252. if (prev) {
  65253. prev.next = this;
  65254. this.prev = prev;
  65255. } else {
  65256. this.prev = null;
  65257. }
  65258. if (next) {
  65259. next.prev = this;
  65260. this.next = next;
  65261. } else {
  65262. this.next = null;
  65263. }
  65264. }
  65265. try {
  65266. require_iterator()(Yallist);
  65267. } catch (er) {
  65268. }
  65269. }
  65270. });
  65271. // node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/index.js
  65272. var require_lru_cache = __commonJS({
  65273. "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/index.js"(exports, module) {
  65274. "use strict";
  65275. var Yallist = require_yallist();
  65276. var MAX = Symbol("max");
  65277. var LENGTH = Symbol("length");
  65278. var LENGTH_CALCULATOR = Symbol("lengthCalculator");
  65279. var ALLOW_STALE = Symbol("allowStale");
  65280. var MAX_AGE = Symbol("maxAge");
  65281. var DISPOSE = Symbol("dispose");
  65282. var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
  65283. var LRU_LIST = Symbol("lruList");
  65284. var CACHE = Symbol("cache");
  65285. var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
  65286. var naiveLength = () => 1;
  65287. var LRUCache = class {
  65288. constructor(options) {
  65289. if (typeof options === "number")
  65290. options = { max: options };
  65291. if (!options)
  65292. options = {};
  65293. if (options.max && (typeof options.max !== "number" || options.max < 0))
  65294. throw new TypeError("max must be a non-negative number");
  65295. const max = this[MAX] = options.max || Infinity;
  65296. const lc = options.length || naiveLength;
  65297. this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
  65298. this[ALLOW_STALE] = options.stale || false;
  65299. if (options.maxAge && typeof options.maxAge !== "number")
  65300. throw new TypeError("maxAge must be a number");
  65301. this[MAX_AGE] = options.maxAge || 0;
  65302. this[DISPOSE] = options.dispose;
  65303. this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
  65304. this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
  65305. this.reset();
  65306. }
  65307. // resize the cache when the max changes.
  65308. set max(mL) {
  65309. if (typeof mL !== "number" || mL < 0)
  65310. throw new TypeError("max must be a non-negative number");
  65311. this[MAX] = mL || Infinity;
  65312. trim(this);
  65313. }
  65314. get max() {
  65315. return this[MAX];
  65316. }
  65317. set allowStale(allowStale) {
  65318. this[ALLOW_STALE] = !!allowStale;
  65319. }
  65320. get allowStale() {
  65321. return this[ALLOW_STALE];
  65322. }
  65323. set maxAge(mA) {
  65324. if (typeof mA !== "number")
  65325. throw new TypeError("maxAge must be a non-negative number");
  65326. this[MAX_AGE] = mA;
  65327. trim(this);
  65328. }
  65329. get maxAge() {
  65330. return this[MAX_AGE];
  65331. }
  65332. // resize the cache when the lengthCalculator changes.
  65333. set lengthCalculator(lC) {
  65334. if (typeof lC !== "function")
  65335. lC = naiveLength;
  65336. if (lC !== this[LENGTH_CALCULATOR]) {
  65337. this[LENGTH_CALCULATOR] = lC;
  65338. this[LENGTH] = 0;
  65339. this[LRU_LIST].forEach((hit) => {
  65340. hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
  65341. this[LENGTH] += hit.length;
  65342. });
  65343. }
  65344. trim(this);
  65345. }
  65346. get lengthCalculator() {
  65347. return this[LENGTH_CALCULATOR];
  65348. }
  65349. get length() {
  65350. return this[LENGTH];
  65351. }
  65352. get itemCount() {
  65353. return this[LRU_LIST].length;
  65354. }
  65355. rforEach(fn, thisp) {
  65356. thisp = thisp || this;
  65357. for (let walker = this[LRU_LIST].tail; walker !== null; ) {
  65358. const prev = walker.prev;
  65359. forEachStep(this, fn, walker, thisp);
  65360. walker = prev;
  65361. }
  65362. }
  65363. forEach(fn, thisp) {
  65364. thisp = thisp || this;
  65365. for (let walker = this[LRU_LIST].head; walker !== null; ) {
  65366. const next = walker.next;
  65367. forEachStep(this, fn, walker, thisp);
  65368. walker = next;
  65369. }
  65370. }
  65371. keys() {
  65372. return this[LRU_LIST].toArray().map((k) => k.key);
  65373. }
  65374. values() {
  65375. return this[LRU_LIST].toArray().map((k) => k.value);
  65376. }
  65377. reset() {
  65378. if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
  65379. this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
  65380. }
  65381. this[CACHE] = /* @__PURE__ */ new Map();
  65382. this[LRU_LIST] = new Yallist();
  65383. this[LENGTH] = 0;
  65384. }
  65385. dump() {
  65386. return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
  65387. k: hit.key,
  65388. v: hit.value,
  65389. e: hit.now + (hit.maxAge || 0)
  65390. }).toArray().filter((h) => h);
  65391. }
  65392. dumpLru() {
  65393. return this[LRU_LIST];
  65394. }
  65395. set(key2, value2, maxAge) {
  65396. maxAge = maxAge || this[MAX_AGE];
  65397. if (maxAge && typeof maxAge !== "number")
  65398. throw new TypeError("maxAge must be a number");
  65399. const now = maxAge ? Date.now() : 0;
  65400. const len = this[LENGTH_CALCULATOR](value2, key2);
  65401. if (this[CACHE].has(key2)) {
  65402. if (len > this[MAX]) {
  65403. del(this, this[CACHE].get(key2));
  65404. return false;
  65405. }
  65406. const node2 = this[CACHE].get(key2);
  65407. const item = node2.value;
  65408. if (this[DISPOSE]) {
  65409. if (!this[NO_DISPOSE_ON_SET])
  65410. this[DISPOSE](key2, item.value);
  65411. }
  65412. item.now = now;
  65413. item.maxAge = maxAge;
  65414. item.value = value2;
  65415. this[LENGTH] += len - item.length;
  65416. item.length = len;
  65417. this.get(key2);
  65418. trim(this);
  65419. return true;
  65420. }
  65421. const hit = new Entry(key2, value2, len, now, maxAge);
  65422. if (hit.length > this[MAX]) {
  65423. if (this[DISPOSE])
  65424. this[DISPOSE](key2, value2);
  65425. return false;
  65426. }
  65427. this[LENGTH] += hit.length;
  65428. this[LRU_LIST].unshift(hit);
  65429. this[CACHE].set(key2, this[LRU_LIST].head);
  65430. trim(this);
  65431. return true;
  65432. }
  65433. has(key2) {
  65434. if (!this[CACHE].has(key2))
  65435. return false;
  65436. const hit = this[CACHE].get(key2).value;
  65437. return !isStale(this, hit);
  65438. }
  65439. get(key2) {
  65440. return get(this, key2, true);
  65441. }
  65442. peek(key2) {
  65443. return get(this, key2, false);
  65444. }
  65445. pop() {
  65446. const node2 = this[LRU_LIST].tail;
  65447. if (!node2)
  65448. return null;
  65449. del(this, node2);
  65450. return node2.value;
  65451. }
  65452. del(key2) {
  65453. del(this, this[CACHE].get(key2));
  65454. }
  65455. load(arr) {
  65456. this.reset();
  65457. const now = Date.now();
  65458. for (let l = arr.length - 1; l >= 0; l--) {
  65459. const hit = arr[l];
  65460. const expiresAt = hit.e || 0;
  65461. if (expiresAt === 0)
  65462. this.set(hit.k, hit.v);
  65463. else {
  65464. const maxAge = expiresAt - now;
  65465. if (maxAge > 0) {
  65466. this.set(hit.k, hit.v, maxAge);
  65467. }
  65468. }
  65469. }
  65470. }
  65471. prune() {
  65472. this[CACHE].forEach((value2, key2) => get(this, key2, false));
  65473. }
  65474. };
  65475. var get = (self2, key2, doUse) => {
  65476. const node2 = self2[CACHE].get(key2);
  65477. if (node2) {
  65478. const hit = node2.value;
  65479. if (isStale(self2, hit)) {
  65480. del(self2, node2);
  65481. if (!self2[ALLOW_STALE])
  65482. return void 0;
  65483. } else {
  65484. if (doUse) {
  65485. if (self2[UPDATE_AGE_ON_GET])
  65486. node2.value.now = Date.now();
  65487. self2[LRU_LIST].unshiftNode(node2);
  65488. }
  65489. }
  65490. return hit.value;
  65491. }
  65492. };
  65493. var isStale = (self2, hit) => {
  65494. if (!hit || !hit.maxAge && !self2[MAX_AGE])
  65495. return false;
  65496. const diff = Date.now() - hit.now;
  65497. return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE];
  65498. };
  65499. var trim = (self2) => {
  65500. if (self2[LENGTH] > self2[MAX]) {
  65501. for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
  65502. const prev = walker.prev;
  65503. del(self2, walker);
  65504. walker = prev;
  65505. }
  65506. }
  65507. };
  65508. var del = (self2, node2) => {
  65509. if (node2) {
  65510. const hit = node2.value;
  65511. if (self2[DISPOSE])
  65512. self2[DISPOSE](hit.key, hit.value);
  65513. self2[LENGTH] -= hit.length;
  65514. self2[CACHE].delete(hit.key);
  65515. self2[LRU_LIST].removeNode(node2);
  65516. }
  65517. };
  65518. var Entry = class {
  65519. constructor(key2, value2, length, now, maxAge) {
  65520. this.key = key2;
  65521. this.value = value2;
  65522. this.length = length;
  65523. this.now = now;
  65524. this.maxAge = maxAge || 0;
  65525. }
  65526. };
  65527. var forEachStep = (self2, fn, node2, thisp) => {
  65528. let hit = node2.value;
  65529. if (isStale(self2, hit)) {
  65530. del(self2, node2);
  65531. if (!self2[ALLOW_STALE])
  65532. hit = void 0;
  65533. }
  65534. if (hit)
  65535. fn.call(thisp, hit.value, hit.key, self2);
  65536. };
  65537. module.exports = LRUCache;
  65538. }
  65539. });
  65540. // node_modules/@babel/helper-compilation-targets/node_modules/semver/semver.js
  65541. var require_semver2 = __commonJS({
  65542. "node_modules/@babel/helper-compilation-targets/node_modules/semver/semver.js"(exports, module) {
  65543. exports = module.exports = SemVer;
  65544. var debug;
  65545. if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
  65546. debug = function() {
  65547. var args = Array.prototype.slice.call(arguments, 0);
  65548. args.unshift("SEMVER");
  65549. console.log.apply(console, args);
  65550. };
  65551. } else {
  65552. debug = function() {
  65553. };
  65554. }
  65555. exports.SEMVER_SPEC_VERSION = "2.0.0";
  65556. var MAX_LENGTH = 256;
  65557. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
  65558. 9007199254740991;
  65559. var MAX_SAFE_COMPONENT_LENGTH = 16;
  65560. var re = exports.re = [];
  65561. var src = exports.src = [];
  65562. var t3 = exports.tokens = {};
  65563. var R = 0;
  65564. function tok(n) {
  65565. t3[n] = R++;
  65566. }
  65567. tok("NUMERICIDENTIFIER");
  65568. src[t3.NUMERICIDENTIFIER] = "0|[1-9]\\d*";
  65569. tok("NUMERICIDENTIFIERLOOSE");
  65570. src[t3.NUMERICIDENTIFIERLOOSE] = "[0-9]+";
  65571. tok("NONNUMERICIDENTIFIER");
  65572. src[t3.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
  65573. tok("MAINVERSION");
  65574. src[t3.MAINVERSION] = "(" + src[t3.NUMERICIDENTIFIER] + ")\\.(" + src[t3.NUMERICIDENTIFIER] + ")\\.(" + src[t3.NUMERICIDENTIFIER] + ")";
  65575. tok("MAINVERSIONLOOSE");
  65576. src[t3.MAINVERSIONLOOSE] = "(" + src[t3.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t3.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t3.NUMERICIDENTIFIERLOOSE] + ")";
  65577. tok("PRERELEASEIDENTIFIER");
  65578. src[t3.PRERELEASEIDENTIFIER] = "(?:" + src[t3.NUMERICIDENTIFIER] + "|" + src[t3.NONNUMERICIDENTIFIER] + ")";
  65579. tok("PRERELEASEIDENTIFIERLOOSE");
  65580. src[t3.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t3.NUMERICIDENTIFIERLOOSE] + "|" + src[t3.NONNUMERICIDENTIFIER] + ")";
  65581. tok("PRERELEASE");
  65582. src[t3.PRERELEASE] = "(?:-(" + src[t3.PRERELEASEIDENTIFIER] + "(?:\\." + src[t3.PRERELEASEIDENTIFIER] + ")*))";
  65583. tok("PRERELEASELOOSE");
  65584. src[t3.PRERELEASELOOSE] = "(?:-?(" + src[t3.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t3.PRERELEASEIDENTIFIERLOOSE] + ")*))";
  65585. tok("BUILDIDENTIFIER");
  65586. src[t3.BUILDIDENTIFIER] = "[0-9A-Za-z-]+";
  65587. tok("BUILD");
  65588. src[t3.BUILD] = "(?:\\+(" + src[t3.BUILDIDENTIFIER] + "(?:\\." + src[t3.BUILDIDENTIFIER] + ")*))";
  65589. tok("FULL");
  65590. tok("FULLPLAIN");
  65591. src[t3.FULLPLAIN] = "v?" + src[t3.MAINVERSION] + src[t3.PRERELEASE] + "?" + src[t3.BUILD] + "?";
  65592. src[t3.FULL] = "^" + src[t3.FULLPLAIN] + "$";
  65593. tok("LOOSEPLAIN");
  65594. src[t3.LOOSEPLAIN] = "[v=\\s]*" + src[t3.MAINVERSIONLOOSE] + src[t3.PRERELEASELOOSE] + "?" + src[t3.BUILD] + "?";
  65595. tok("LOOSE");
  65596. src[t3.LOOSE] = "^" + src[t3.LOOSEPLAIN] + "$";
  65597. tok("GTLT");
  65598. src[t3.GTLT] = "((?:<|>)?=?)";
  65599. tok("XRANGEIDENTIFIERLOOSE");
  65600. src[t3.XRANGEIDENTIFIERLOOSE] = src[t3.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*";
  65601. tok("XRANGEIDENTIFIER");
  65602. src[t3.XRANGEIDENTIFIER] = src[t3.NUMERICIDENTIFIER] + "|x|X|\\*";
  65603. tok("XRANGEPLAIN");
  65604. src[t3.XRANGEPLAIN] = "[v=\\s]*(" + src[t3.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t3.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t3.XRANGEIDENTIFIER] + ")(?:" + src[t3.PRERELEASE] + ")?" + src[t3.BUILD] + "?)?)?";
  65605. tok("XRANGEPLAINLOOSE");
  65606. src[t3.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t3.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t3.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t3.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t3.PRERELEASELOOSE] + ")?" + src[t3.BUILD] + "?)?)?";
  65607. tok("XRANGE");
  65608. src[t3.XRANGE] = "^" + src[t3.GTLT] + "\\s*" + src[t3.XRANGEPLAIN] + "$";
  65609. tok("XRANGELOOSE");
  65610. src[t3.XRANGELOOSE] = "^" + src[t3.GTLT] + "\\s*" + src[t3.XRANGEPLAINLOOSE] + "$";
  65611. tok("COERCE");
  65612. src[t3.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])";
  65613. tok("COERCERTL");
  65614. re[t3.COERCERTL] = new RegExp(src[t3.COERCE], "g");
  65615. tok("LONETILDE");
  65616. src[t3.LONETILDE] = "(?:~>?)";
  65617. tok("TILDETRIM");
  65618. src[t3.TILDETRIM] = "(\\s*)" + src[t3.LONETILDE] + "\\s+";
  65619. re[t3.TILDETRIM] = new RegExp(src[t3.TILDETRIM], "g");
  65620. var tildeTrimReplace = "$1~";
  65621. tok("TILDE");
  65622. src[t3.TILDE] = "^" + src[t3.LONETILDE] + src[t3.XRANGEPLAIN] + "$";
  65623. tok("TILDELOOSE");
  65624. src[t3.TILDELOOSE] = "^" + src[t3.LONETILDE] + src[t3.XRANGEPLAINLOOSE] + "$";
  65625. tok("LONECARET");
  65626. src[t3.LONECARET] = "(?:\\^)";
  65627. tok("CARETTRIM");
  65628. src[t3.CARETTRIM] = "(\\s*)" + src[t3.LONECARET] + "\\s+";
  65629. re[t3.CARETTRIM] = new RegExp(src[t3.CARETTRIM], "g");
  65630. var caretTrimReplace = "$1^";
  65631. tok("CARET");
  65632. src[t3.CARET] = "^" + src[t3.LONECARET] + src[t3.XRANGEPLAIN] + "$";
  65633. tok("CARETLOOSE");
  65634. src[t3.CARETLOOSE] = "^" + src[t3.LONECARET] + src[t3.XRANGEPLAINLOOSE] + "$";
  65635. tok("COMPARATORLOOSE");
  65636. src[t3.COMPARATORLOOSE] = "^" + src[t3.GTLT] + "\\s*(" + src[t3.LOOSEPLAIN] + ")$|^$";
  65637. tok("COMPARATOR");
  65638. src[t3.COMPARATOR] = "^" + src[t3.GTLT] + "\\s*(" + src[t3.FULLPLAIN] + ")$|^$";
  65639. tok("COMPARATORTRIM");
  65640. src[t3.COMPARATORTRIM] = "(\\s*)" + src[t3.GTLT] + "\\s*(" + src[t3.LOOSEPLAIN] + "|" + src[t3.XRANGEPLAIN] + ")";
  65641. re[t3.COMPARATORTRIM] = new RegExp(src[t3.COMPARATORTRIM], "g");
  65642. var comparatorTrimReplace = "$1$2$3";
  65643. tok("HYPHENRANGE");
  65644. src[t3.HYPHENRANGE] = "^\\s*(" + src[t3.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t3.XRANGEPLAIN] + ")\\s*$";
  65645. tok("HYPHENRANGELOOSE");
  65646. src[t3.HYPHENRANGELOOSE] = "^\\s*(" + src[t3.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t3.XRANGEPLAINLOOSE] + ")\\s*$";
  65647. tok("STAR");
  65648. src[t3.STAR] = "(<|>)?=?\\s*\\*";
  65649. for (i = 0; i < R; i++) {
  65650. debug(i, src[i]);
  65651. if (!re[i]) {
  65652. re[i] = new RegExp(src[i]);
  65653. }
  65654. }
  65655. var i;
  65656. exports.parse = parse9;
  65657. function parse9(version3, options) {
  65658. if (!options || typeof options !== "object") {
  65659. options = {
  65660. loose: !!options,
  65661. includePrerelease: false
  65662. };
  65663. }
  65664. if (version3 instanceof SemVer) {
  65665. return version3;
  65666. }
  65667. if (typeof version3 !== "string") {
  65668. return null;
  65669. }
  65670. if (version3.length > MAX_LENGTH) {
  65671. return null;
  65672. }
  65673. var r = options.loose ? re[t3.LOOSE] : re[t3.FULL];
  65674. if (!r.test(version3)) {
  65675. return null;
  65676. }
  65677. try {
  65678. return new SemVer(version3, options);
  65679. } catch (er) {
  65680. return null;
  65681. }
  65682. }
  65683. exports.valid = valid2;
  65684. function valid2(version3, options) {
  65685. var v = parse9(version3, options);
  65686. return v ? v.version : null;
  65687. }
  65688. exports.clean = clean2;
  65689. function clean2(version3, options) {
  65690. var s = parse9(version3.trim().replace(/^[=v]+/, ""), options);
  65691. return s ? s.version : null;
  65692. }
  65693. exports.SemVer = SemVer;
  65694. function SemVer(version3, options) {
  65695. if (!options || typeof options !== "object") {
  65696. options = {
  65697. loose: !!options,
  65698. includePrerelease: false
  65699. };
  65700. }
  65701. if (version3 instanceof SemVer) {
  65702. if (version3.loose === options.loose) {
  65703. return version3;
  65704. } else {
  65705. version3 = version3.version;
  65706. }
  65707. } else if (typeof version3 !== "string") {
  65708. throw new TypeError("Invalid Version: " + version3);
  65709. }
  65710. if (version3.length > MAX_LENGTH) {
  65711. throw new TypeError("version is longer than " + MAX_LENGTH + " characters");
  65712. }
  65713. if (!(this instanceof SemVer)) {
  65714. return new SemVer(version3, options);
  65715. }
  65716. debug("SemVer", version3, options);
  65717. this.options = options;
  65718. this.loose = !!options.loose;
  65719. var m = version3.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);
  65720. if (!m) {
  65721. throw new TypeError("Invalid Version: " + version3);
  65722. }
  65723. this.raw = version3;
  65724. this.major = +m[1];
  65725. this.minor = +m[2];
  65726. this.patch = +m[3];
  65727. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  65728. throw new TypeError("Invalid major version");
  65729. }
  65730. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  65731. throw new TypeError("Invalid minor version");
  65732. }
  65733. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  65734. throw new TypeError("Invalid patch version");
  65735. }
  65736. if (!m[4]) {
  65737. this.prerelease = [];
  65738. } else {
  65739. this.prerelease = m[4].split(".").map(function(id) {
  65740. if (/^[0-9]+$/.test(id)) {
  65741. var num = +id;
  65742. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  65743. return num;
  65744. }
  65745. }
  65746. return id;
  65747. });
  65748. }
  65749. this.build = m[5] ? m[5].split(".") : [];
  65750. this.format();
  65751. }
  65752. SemVer.prototype.format = function() {
  65753. this.version = this.major + "." + this.minor + "." + this.patch;
  65754. if (this.prerelease.length) {
  65755. this.version += "-" + this.prerelease.join(".");
  65756. }
  65757. return this.version;
  65758. };
  65759. SemVer.prototype.toString = function() {
  65760. return this.version;
  65761. };
  65762. SemVer.prototype.compare = function(other) {
  65763. debug("SemVer.compare", this.version, this.options, other);
  65764. if (!(other instanceof SemVer)) {
  65765. other = new SemVer(other, this.options);
  65766. }
  65767. return this.compareMain(other) || this.comparePre(other);
  65768. };
  65769. SemVer.prototype.compareMain = function(other) {
  65770. if (!(other instanceof SemVer)) {
  65771. other = new SemVer(other, this.options);
  65772. }
  65773. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  65774. };
  65775. SemVer.prototype.comparePre = function(other) {
  65776. if (!(other instanceof SemVer)) {
  65777. other = new SemVer(other, this.options);
  65778. }
  65779. if (this.prerelease.length && !other.prerelease.length) {
  65780. return -1;
  65781. } else if (!this.prerelease.length && other.prerelease.length) {
  65782. return 1;
  65783. } else if (!this.prerelease.length && !other.prerelease.length) {
  65784. return 0;
  65785. }
  65786. var i2 = 0;
  65787. do {
  65788. var a = this.prerelease[i2];
  65789. var b = other.prerelease[i2];
  65790. debug("prerelease compare", i2, a, b);
  65791. if (a === void 0 && b === void 0) {
  65792. return 0;
  65793. } else if (b === void 0) {
  65794. return 1;
  65795. } else if (a === void 0) {
  65796. return -1;
  65797. } else if (a === b) {
  65798. continue;
  65799. } else {
  65800. return compareIdentifiers(a, b);
  65801. }
  65802. } while (++i2);
  65803. };
  65804. SemVer.prototype.compareBuild = function(other) {
  65805. if (!(other instanceof SemVer)) {
  65806. other = new SemVer(other, this.options);
  65807. }
  65808. var i2 = 0;
  65809. do {
  65810. var a = this.build[i2];
  65811. var b = other.build[i2];
  65812. debug("prerelease compare", i2, a, b);
  65813. if (a === void 0 && b === void 0) {
  65814. return 0;
  65815. } else if (b === void 0) {
  65816. return 1;
  65817. } else if (a === void 0) {
  65818. return -1;
  65819. } else if (a === b) {
  65820. continue;
  65821. } else {
  65822. return compareIdentifiers(a, b);
  65823. }
  65824. } while (++i2);
  65825. };
  65826. SemVer.prototype.inc = function(release, identifier) {
  65827. switch (release) {
  65828. case "premajor":
  65829. this.prerelease.length = 0;
  65830. this.patch = 0;
  65831. this.minor = 0;
  65832. this.major++;
  65833. this.inc("pre", identifier);
  65834. break;
  65835. case "preminor":
  65836. this.prerelease.length = 0;
  65837. this.patch = 0;
  65838. this.minor++;
  65839. this.inc("pre", identifier);
  65840. break;
  65841. case "prepatch":
  65842. this.prerelease.length = 0;
  65843. this.inc("patch", identifier);
  65844. this.inc("pre", identifier);
  65845. break;
  65846. case "prerelease":
  65847. if (this.prerelease.length === 0) {
  65848. this.inc("patch", identifier);
  65849. }
  65850. this.inc("pre", identifier);
  65851. break;
  65852. case "major":
  65853. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  65854. this.major++;
  65855. }
  65856. this.minor = 0;
  65857. this.patch = 0;
  65858. this.prerelease = [];
  65859. break;
  65860. case "minor":
  65861. if (this.patch !== 0 || this.prerelease.length === 0) {
  65862. this.minor++;
  65863. }
  65864. this.patch = 0;
  65865. this.prerelease = [];
  65866. break;
  65867. case "patch":
  65868. if (this.prerelease.length === 0) {
  65869. this.patch++;
  65870. }
  65871. this.prerelease = [];
  65872. break;
  65873. case "pre":
  65874. if (this.prerelease.length === 0) {
  65875. this.prerelease = [0];
  65876. } else {
  65877. var i2 = this.prerelease.length;
  65878. while (--i2 >= 0) {
  65879. if (typeof this.prerelease[i2] === "number") {
  65880. this.prerelease[i2]++;
  65881. i2 = -2;
  65882. }
  65883. }
  65884. if (i2 === -1) {
  65885. this.prerelease.push(0);
  65886. }
  65887. }
  65888. if (identifier) {
  65889. if (this.prerelease[0] === identifier) {
  65890. if (isNaN(this.prerelease[1])) {
  65891. this.prerelease = [identifier, 0];
  65892. }
  65893. } else {
  65894. this.prerelease = [identifier, 0];
  65895. }
  65896. }
  65897. break;
  65898. default:
  65899. throw new Error("invalid increment argument: " + release);
  65900. }
  65901. this.format();
  65902. this.raw = this.version;
  65903. return this;
  65904. };
  65905. exports.inc = inc;
  65906. function inc(version3, release, loose, identifier) {
  65907. if (typeof loose === "string") {
  65908. identifier = loose;
  65909. loose = void 0;
  65910. }
  65911. try {
  65912. return new SemVer(version3, loose).inc(release, identifier).version;
  65913. } catch (er) {
  65914. return null;
  65915. }
  65916. }
  65917. exports.diff = diff;
  65918. function diff(version1, version22) {
  65919. if (eq(version1, version22)) {
  65920. return null;
  65921. } else {
  65922. var v1 = parse9(version1);
  65923. var v2 = parse9(version22);
  65924. var prefix = "";
  65925. if (v1.prerelease.length || v2.prerelease.length) {
  65926. prefix = "pre";
  65927. var defaultResult = "prerelease";
  65928. }
  65929. for (var key2 in v1) {
  65930. if (key2 === "major" || key2 === "minor" || key2 === "patch") {
  65931. if (v1[key2] !== v2[key2]) {
  65932. return prefix + key2;
  65933. }
  65934. }
  65935. }
  65936. return defaultResult;
  65937. }
  65938. }
  65939. exports.compareIdentifiers = compareIdentifiers;
  65940. var numeric = /^[0-9]+$/;
  65941. function compareIdentifiers(a, b) {
  65942. var anum = numeric.test(a);
  65943. var bnum = numeric.test(b);
  65944. if (anum && bnum) {
  65945. a = +a;
  65946. b = +b;
  65947. }
  65948. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  65949. }
  65950. exports.rcompareIdentifiers = rcompareIdentifiers;
  65951. function rcompareIdentifiers(a, b) {
  65952. return compareIdentifiers(b, a);
  65953. }
  65954. exports.major = major;
  65955. function major(a, loose) {
  65956. return new SemVer(a, loose).major;
  65957. }
  65958. exports.minor = minor;
  65959. function minor(a, loose) {
  65960. return new SemVer(a, loose).minor;
  65961. }
  65962. exports.patch = patch3;
  65963. function patch3(a, loose) {
  65964. return new SemVer(a, loose).patch;
  65965. }
  65966. exports.compare = compare2;
  65967. function compare2(a, b, loose) {
  65968. return new SemVer(a, loose).compare(new SemVer(b, loose));
  65969. }
  65970. exports.compareLoose = compareLoose;
  65971. function compareLoose(a, b) {
  65972. return compare2(a, b, true);
  65973. }
  65974. exports.compareBuild = compareBuild;
  65975. function compareBuild(a, b, loose) {
  65976. var versionA = new SemVer(a, loose);
  65977. var versionB = new SemVer(b, loose);
  65978. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  65979. }
  65980. exports.rcompare = rcompare;
  65981. function rcompare(a, b, loose) {
  65982. return compare2(b, a, loose);
  65983. }
  65984. exports.sort = sort;
  65985. function sort(list3, loose) {
  65986. return list3.sort(function(a, b) {
  65987. return exports.compareBuild(a, b, loose);
  65988. });
  65989. }
  65990. exports.rsort = rsort;
  65991. function rsort(list3, loose) {
  65992. return list3.sort(function(a, b) {
  65993. return exports.compareBuild(b, a, loose);
  65994. });
  65995. }
  65996. exports.gt = gt;
  65997. function gt(a, b, loose) {
  65998. return compare2(a, b, loose) > 0;
  65999. }
  66000. exports.lt = lt;
  66001. function lt(a, b, loose) {
  66002. return compare2(a, b, loose) < 0;
  66003. }
  66004. exports.eq = eq;
  66005. function eq(a, b, loose) {
  66006. return compare2(a, b, loose) === 0;
  66007. }
  66008. exports.neq = neq;
  66009. function neq(a, b, loose) {
  66010. return compare2(a, b, loose) !== 0;
  66011. }
  66012. exports.gte = gte;
  66013. function gte(a, b, loose) {
  66014. return compare2(a, b, loose) >= 0;
  66015. }
  66016. exports.lte = lte;
  66017. function lte(a, b, loose) {
  66018. return compare2(a, b, loose) <= 0;
  66019. }
  66020. exports.cmp = cmp;
  66021. function cmp(a, op, b, loose) {
  66022. switch (op) {
  66023. case "===":
  66024. if (typeof a === "object")
  66025. a = a.version;
  66026. if (typeof b === "object")
  66027. b = b.version;
  66028. return a === b;
  66029. case "!==":
  66030. if (typeof a === "object")
  66031. a = a.version;
  66032. if (typeof b === "object")
  66033. b = b.version;
  66034. return a !== b;
  66035. case "":
  66036. case "=":
  66037. case "==":
  66038. return eq(a, b, loose);
  66039. case "!=":
  66040. return neq(a, b, loose);
  66041. case ">":
  66042. return gt(a, b, loose);
  66043. case ">=":
  66044. return gte(a, b, loose);
  66045. case "<":
  66046. return lt(a, b, loose);
  66047. case "<=":
  66048. return lte(a, b, loose);
  66049. default:
  66050. throw new TypeError("Invalid operator: " + op);
  66051. }
  66052. }
  66053. exports.Comparator = Comparator;
  66054. function Comparator(comp, options) {
  66055. if (!options || typeof options !== "object") {
  66056. options = {
  66057. loose: !!options,
  66058. includePrerelease: false
  66059. };
  66060. }
  66061. if (comp instanceof Comparator) {
  66062. if (comp.loose === !!options.loose) {
  66063. return comp;
  66064. } else {
  66065. comp = comp.value;
  66066. }
  66067. }
  66068. if (!(this instanceof Comparator)) {
  66069. return new Comparator(comp, options);
  66070. }
  66071. debug("comparator", comp, options);
  66072. this.options = options;
  66073. this.loose = !!options.loose;
  66074. this.parse(comp);
  66075. if (this.semver === ANY) {
  66076. this.value = "";
  66077. } else {
  66078. this.value = this.operator + this.semver.version;
  66079. }
  66080. debug("comp", this);
  66081. }
  66082. var ANY = {};
  66083. Comparator.prototype.parse = function(comp) {
  66084. var r = this.options.loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];
  66085. var m = comp.match(r);
  66086. if (!m) {
  66087. throw new TypeError("Invalid comparator: " + comp);
  66088. }
  66089. this.operator = m[1] !== void 0 ? m[1] : "";
  66090. if (this.operator === "=") {
  66091. this.operator = "";
  66092. }
  66093. if (!m[2]) {
  66094. this.semver = ANY;
  66095. } else {
  66096. this.semver = new SemVer(m[2], this.options.loose);
  66097. }
  66098. };
  66099. Comparator.prototype.toString = function() {
  66100. return this.value;
  66101. };
  66102. Comparator.prototype.test = function(version3) {
  66103. debug("Comparator.test", version3, this.options.loose);
  66104. if (this.semver === ANY || version3 === ANY) {
  66105. return true;
  66106. }
  66107. if (typeof version3 === "string") {
  66108. try {
  66109. version3 = new SemVer(version3, this.options);
  66110. } catch (er) {
  66111. return false;
  66112. }
  66113. }
  66114. return cmp(version3, this.operator, this.semver, this.options);
  66115. };
  66116. Comparator.prototype.intersects = function(comp, options) {
  66117. if (!(comp instanceof Comparator)) {
  66118. throw new TypeError("a Comparator is required");
  66119. }
  66120. if (!options || typeof options !== "object") {
  66121. options = {
  66122. loose: !!options,
  66123. includePrerelease: false
  66124. };
  66125. }
  66126. var rangeTmp;
  66127. if (this.operator === "") {
  66128. if (this.value === "") {
  66129. return true;
  66130. }
  66131. rangeTmp = new Range(comp.value, options);
  66132. return satisfies(this.value, rangeTmp, options);
  66133. } else if (comp.operator === "") {
  66134. if (comp.value === "") {
  66135. return true;
  66136. }
  66137. rangeTmp = new Range(this.value, options);
  66138. return satisfies(comp.semver, rangeTmp, options);
  66139. }
  66140. var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
  66141. var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
  66142. var sameSemVer = this.semver.version === comp.semver.version;
  66143. var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
  66144. var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"));
  66145. var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"));
  66146. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  66147. };
  66148. exports.Range = Range;
  66149. function Range(range, options) {
  66150. if (!options || typeof options !== "object") {
  66151. options = {
  66152. loose: !!options,
  66153. includePrerelease: false
  66154. };
  66155. }
  66156. if (range instanceof Range) {
  66157. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  66158. return range;
  66159. } else {
  66160. return new Range(range.raw, options);
  66161. }
  66162. }
  66163. if (range instanceof Comparator) {
  66164. return new Range(range.value, options);
  66165. }
  66166. if (!(this instanceof Range)) {
  66167. return new Range(range, options);
  66168. }
  66169. this.options = options;
  66170. this.loose = !!options.loose;
  66171. this.includePrerelease = !!options.includePrerelease;
  66172. this.raw = range;
  66173. this.set = range.split(/\s*\|\|\s*/).map(function(range2) {
  66174. return this.parseRange(range2.trim());
  66175. }, this).filter(function(c2) {
  66176. return c2.length;
  66177. });
  66178. if (!this.set.length) {
  66179. throw new TypeError("Invalid SemVer Range: " + range);
  66180. }
  66181. this.format();
  66182. }
  66183. Range.prototype.format = function() {
  66184. this.range = this.set.map(function(comps) {
  66185. return comps.join(" ").trim();
  66186. }).join("||").trim();
  66187. return this.range;
  66188. };
  66189. Range.prototype.toString = function() {
  66190. return this.range;
  66191. };
  66192. Range.prototype.parseRange = function(range) {
  66193. var loose = this.options.loose;
  66194. range = range.trim();
  66195. var hr = loose ? re[t3.HYPHENRANGELOOSE] : re[t3.HYPHENRANGE];
  66196. range = range.replace(hr, hyphenReplace);
  66197. debug("hyphen replace", range);
  66198. range = range.replace(re[t3.COMPARATORTRIM], comparatorTrimReplace);
  66199. debug("comparator trim", range, re[t3.COMPARATORTRIM]);
  66200. range = range.replace(re[t3.TILDETRIM], tildeTrimReplace);
  66201. range = range.replace(re[t3.CARETTRIM], caretTrimReplace);
  66202. range = range.split(/\s+/).join(" ");
  66203. var compRe = loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];
  66204. var set = range.split(" ").map(function(comp) {
  66205. return parseComparator(comp, this.options);
  66206. }, this).join(" ").split(/\s+/);
  66207. if (this.options.loose) {
  66208. set = set.filter(function(comp) {
  66209. return !!comp.match(compRe);
  66210. });
  66211. }
  66212. set = set.map(function(comp) {
  66213. return new Comparator(comp, this.options);
  66214. }, this);
  66215. return set;
  66216. };
  66217. Range.prototype.intersects = function(range, options) {
  66218. if (!(range instanceof Range)) {
  66219. throw new TypeError("a Range is required");
  66220. }
  66221. return this.set.some(function(thisComparators) {
  66222. return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) {
  66223. return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) {
  66224. return rangeComparators.every(function(rangeComparator) {
  66225. return thisComparator.intersects(rangeComparator, options);
  66226. });
  66227. });
  66228. });
  66229. });
  66230. };
  66231. function isSatisfiable(comparators, options) {
  66232. var result = true;
  66233. var remainingComparators = comparators.slice();
  66234. var testComparator = remainingComparators.pop();
  66235. while (result && remainingComparators.length) {
  66236. result = remainingComparators.every(function(otherComparator) {
  66237. return testComparator.intersects(otherComparator, options);
  66238. });
  66239. testComparator = remainingComparators.pop();
  66240. }
  66241. return result;
  66242. }
  66243. exports.toComparators = toComparators;
  66244. function toComparators(range, options) {
  66245. return new Range(range, options).set.map(function(comp) {
  66246. return comp.map(function(c2) {
  66247. return c2.value;
  66248. }).join(" ").trim().split(" ");
  66249. });
  66250. }
  66251. function parseComparator(comp, options) {
  66252. debug("comp", comp, options);
  66253. comp = replaceCarets(comp, options);
  66254. debug("caret", comp);
  66255. comp = replaceTildes(comp, options);
  66256. debug("tildes", comp);
  66257. comp = replaceXRanges(comp, options);
  66258. debug("xrange", comp);
  66259. comp = replaceStars(comp, options);
  66260. debug("stars", comp);
  66261. return comp;
  66262. }
  66263. function isX(id) {
  66264. return !id || id.toLowerCase() === "x" || id === "*";
  66265. }
  66266. function replaceTildes(comp, options) {
  66267. return comp.trim().split(/\s+/).map(function(comp2) {
  66268. return replaceTilde(comp2, options);
  66269. }).join(" ");
  66270. }
  66271. function replaceTilde(comp, options) {
  66272. var r = options.loose ? re[t3.TILDELOOSE] : re[t3.TILDE];
  66273. return comp.replace(r, function(_, M, m, p, pr) {
  66274. debug("tilde", comp, _, M, m, p, pr);
  66275. var ret;
  66276. if (isX(M)) {
  66277. ret = "";
  66278. } else if (isX(m)) {
  66279. ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
  66280. } else if (isX(p)) {
  66281. ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
  66282. } else if (pr) {
  66283. debug("replaceTilde pr", pr);
  66284. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
  66285. } else {
  66286. ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
  66287. }
  66288. debug("tilde return", ret);
  66289. return ret;
  66290. });
  66291. }
  66292. function replaceCarets(comp, options) {
  66293. return comp.trim().split(/\s+/).map(function(comp2) {
  66294. return replaceCaret(comp2, options);
  66295. }).join(" ");
  66296. }
  66297. function replaceCaret(comp, options) {
  66298. debug("caret", comp, options);
  66299. var r = options.loose ? re[t3.CARETLOOSE] : re[t3.CARET];
  66300. return comp.replace(r, function(_, M, m, p, pr) {
  66301. debug("caret", comp, _, M, m, p, pr);
  66302. var ret;
  66303. if (isX(M)) {
  66304. ret = "";
  66305. } else if (isX(m)) {
  66306. ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
  66307. } else if (isX(p)) {
  66308. if (M === "0") {
  66309. ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
  66310. } else {
  66311. ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0";
  66312. }
  66313. } else if (pr) {
  66314. debug("replaceCaret pr", pr);
  66315. if (M === "0") {
  66316. if (m === "0") {
  66317. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1);
  66318. } else {
  66319. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
  66320. }
  66321. } else {
  66322. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0";
  66323. }
  66324. } else {
  66325. debug("no pr");
  66326. if (M === "0") {
  66327. if (m === "0") {
  66328. ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1);
  66329. } else {
  66330. ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
  66331. }
  66332. } else {
  66333. ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0";
  66334. }
  66335. }
  66336. debug("caret return", ret);
  66337. return ret;
  66338. });
  66339. }
  66340. function replaceXRanges(comp, options) {
  66341. debug("replaceXRanges", comp, options);
  66342. return comp.split(/\s+/).map(function(comp2) {
  66343. return replaceXRange(comp2, options);
  66344. }).join(" ");
  66345. }
  66346. function replaceXRange(comp, options) {
  66347. comp = comp.trim();
  66348. var r = options.loose ? re[t3.XRANGELOOSE] : re[t3.XRANGE];
  66349. return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
  66350. debug("xRange", comp, ret, gtlt, M, m, p, pr);
  66351. var xM = isX(M);
  66352. var xm = xM || isX(m);
  66353. var xp = xm || isX(p);
  66354. var anyX = xp;
  66355. if (gtlt === "=" && anyX) {
  66356. gtlt = "";
  66357. }
  66358. pr = options.includePrerelease ? "-0" : "";
  66359. if (xM) {
  66360. if (gtlt === ">" || gtlt === "<") {
  66361. ret = "<0.0.0-0";
  66362. } else {
  66363. ret = "*";
  66364. }
  66365. } else if (gtlt && anyX) {
  66366. if (xm) {
  66367. m = 0;
  66368. }
  66369. p = 0;
  66370. if (gtlt === ">") {
  66371. gtlt = ">=";
  66372. if (xm) {
  66373. M = +M + 1;
  66374. m = 0;
  66375. p = 0;
  66376. } else {
  66377. m = +m + 1;
  66378. p = 0;
  66379. }
  66380. } else if (gtlt === "<=") {
  66381. gtlt = "<";
  66382. if (xm) {
  66383. M = +M + 1;
  66384. } else {
  66385. m = +m + 1;
  66386. }
  66387. }
  66388. ret = gtlt + M + "." + m + "." + p + pr;
  66389. } else if (xm) {
  66390. ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr;
  66391. } else if (xp) {
  66392. ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr;
  66393. }
  66394. debug("xRange return", ret);
  66395. return ret;
  66396. });
  66397. }
  66398. function replaceStars(comp, options) {
  66399. debug("replaceStars", comp, options);
  66400. return comp.trim().replace(re[t3.STAR], "");
  66401. }
  66402. function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  66403. if (isX(fM)) {
  66404. from = "";
  66405. } else if (isX(fm)) {
  66406. from = ">=" + fM + ".0.0";
  66407. } else if (isX(fp)) {
  66408. from = ">=" + fM + "." + fm + ".0";
  66409. } else {
  66410. from = ">=" + from;
  66411. }
  66412. if (isX(tM)) {
  66413. to = "";
  66414. } else if (isX(tm)) {
  66415. to = "<" + (+tM + 1) + ".0.0";
  66416. } else if (isX(tp)) {
  66417. to = "<" + tM + "." + (+tm + 1) + ".0";
  66418. } else if (tpr) {
  66419. to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
  66420. } else {
  66421. to = "<=" + to;
  66422. }
  66423. return (from + " " + to).trim();
  66424. }
  66425. Range.prototype.test = function(version3) {
  66426. if (!version3) {
  66427. return false;
  66428. }
  66429. if (typeof version3 === "string") {
  66430. try {
  66431. version3 = new SemVer(version3, this.options);
  66432. } catch (er) {
  66433. return false;
  66434. }
  66435. }
  66436. for (var i2 = 0; i2 < this.set.length; i2++) {
  66437. if (testSet(this.set[i2], version3, this.options)) {
  66438. return true;
  66439. }
  66440. }
  66441. return false;
  66442. };
  66443. function testSet(set, version3, options) {
  66444. for (var i2 = 0; i2 < set.length; i2++) {
  66445. if (!set[i2].test(version3)) {
  66446. return false;
  66447. }
  66448. }
  66449. if (version3.prerelease.length && !options.includePrerelease) {
  66450. for (i2 = 0; i2 < set.length; i2++) {
  66451. debug(set[i2].semver);
  66452. if (set[i2].semver === ANY) {
  66453. continue;
  66454. }
  66455. if (set[i2].semver.prerelease.length > 0) {
  66456. var allowed = set[i2].semver;
  66457. if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) {
  66458. return true;
  66459. }
  66460. }
  66461. }
  66462. return false;
  66463. }
  66464. return true;
  66465. }
  66466. exports.satisfies = satisfies;
  66467. function satisfies(version3, range, options) {
  66468. try {
  66469. range = new Range(range, options);
  66470. } catch (er) {
  66471. return false;
  66472. }
  66473. return range.test(version3);
  66474. }
  66475. exports.maxSatisfying = maxSatisfying;
  66476. function maxSatisfying(versions, range, options) {
  66477. var max = null;
  66478. var maxSV = null;
  66479. try {
  66480. var rangeObj = new Range(range, options);
  66481. } catch (er) {
  66482. return null;
  66483. }
  66484. versions.forEach(function(v) {
  66485. if (rangeObj.test(v)) {
  66486. if (!max || maxSV.compare(v) === -1) {
  66487. max = v;
  66488. maxSV = new SemVer(max, options);
  66489. }
  66490. }
  66491. });
  66492. return max;
  66493. }
  66494. exports.minSatisfying = minSatisfying;
  66495. function minSatisfying(versions, range, options) {
  66496. var min = null;
  66497. var minSV = null;
  66498. try {
  66499. var rangeObj = new Range(range, options);
  66500. } catch (er) {
  66501. return null;
  66502. }
  66503. versions.forEach(function(v) {
  66504. if (rangeObj.test(v)) {
  66505. if (!min || minSV.compare(v) === 1) {
  66506. min = v;
  66507. minSV = new SemVer(min, options);
  66508. }
  66509. }
  66510. });
  66511. return min;
  66512. }
  66513. exports.minVersion = minVersion;
  66514. function minVersion(range, loose) {
  66515. range = new Range(range, loose);
  66516. var minver = new SemVer("0.0.0");
  66517. if (range.test(minver)) {
  66518. return minver;
  66519. }
  66520. minver = new SemVer("0.0.0-0");
  66521. if (range.test(minver)) {
  66522. return minver;
  66523. }
  66524. minver = null;
  66525. for (var i2 = 0; i2 < range.set.length; ++i2) {
  66526. var comparators = range.set[i2];
  66527. comparators.forEach(function(comparator) {
  66528. var compver = new SemVer(comparator.semver.version);
  66529. switch (comparator.operator) {
  66530. case ">":
  66531. if (compver.prerelease.length === 0) {
  66532. compver.patch++;
  66533. } else {
  66534. compver.prerelease.push(0);
  66535. }
  66536. compver.raw = compver.format();
  66537. case "":
  66538. case ">=":
  66539. if (!minver || gt(minver, compver)) {
  66540. minver = compver;
  66541. }
  66542. break;
  66543. case "<":
  66544. case "<=":
  66545. break;
  66546. default:
  66547. throw new Error("Unexpected operation: " + comparator.operator);
  66548. }
  66549. });
  66550. }
  66551. if (minver && range.test(minver)) {
  66552. return minver;
  66553. }
  66554. return null;
  66555. }
  66556. exports.validRange = validRange;
  66557. function validRange(range, options) {
  66558. try {
  66559. return new Range(range, options).range || "*";
  66560. } catch (er) {
  66561. return null;
  66562. }
  66563. }
  66564. exports.ltr = ltr;
  66565. function ltr(version3, range, options) {
  66566. return outside(version3, range, "<", options);
  66567. }
  66568. exports.gtr = gtr;
  66569. function gtr(version3, range, options) {
  66570. return outside(version3, range, ">", options);
  66571. }
  66572. exports.outside = outside;
  66573. function outside(version3, range, hilo, options) {
  66574. version3 = new SemVer(version3, options);
  66575. range = new Range(range, options);
  66576. var gtfn, ltefn, ltfn, comp, ecomp;
  66577. switch (hilo) {
  66578. case ">":
  66579. gtfn = gt;
  66580. ltefn = lte;
  66581. ltfn = lt;
  66582. comp = ">";
  66583. ecomp = ">=";
  66584. break;
  66585. case "<":
  66586. gtfn = lt;
  66587. ltefn = gte;
  66588. ltfn = gt;
  66589. comp = "<";
  66590. ecomp = "<=";
  66591. break;
  66592. default:
  66593. throw new TypeError('Must provide a hilo val of "<" or ">"');
  66594. }
  66595. if (satisfies(version3, range, options)) {
  66596. return false;
  66597. }
  66598. for (var i2 = 0; i2 < range.set.length; ++i2) {
  66599. var comparators = range.set[i2];
  66600. var high = null;
  66601. var low = null;
  66602. comparators.forEach(function(comparator) {
  66603. if (comparator.semver === ANY) {
  66604. comparator = new Comparator(">=0.0.0");
  66605. }
  66606. high = high || comparator;
  66607. low = low || comparator;
  66608. if (gtfn(comparator.semver, high.semver, options)) {
  66609. high = comparator;
  66610. } else if (ltfn(comparator.semver, low.semver, options)) {
  66611. low = comparator;
  66612. }
  66613. });
  66614. if (high.operator === comp || high.operator === ecomp) {
  66615. return false;
  66616. }
  66617. if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) {
  66618. return false;
  66619. } else if (low.operator === ecomp && ltfn(version3, low.semver)) {
  66620. return false;
  66621. }
  66622. }
  66623. return true;
  66624. }
  66625. exports.prerelease = prerelease;
  66626. function prerelease(version3, options) {
  66627. var parsed = parse9(version3, options);
  66628. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  66629. }
  66630. exports.intersects = intersects;
  66631. function intersects(r1, r2, options) {
  66632. r1 = new Range(r1, options);
  66633. r2 = new Range(r2, options);
  66634. return r1.intersects(r2);
  66635. }
  66636. exports.coerce = coerce;
  66637. function coerce(version3, options) {
  66638. if (version3 instanceof SemVer) {
  66639. return version3;
  66640. }
  66641. if (typeof version3 === "number") {
  66642. version3 = String(version3);
  66643. }
  66644. if (typeof version3 !== "string") {
  66645. return null;
  66646. }
  66647. options = options || {};
  66648. var match = null;
  66649. if (!options.rtl) {
  66650. match = version3.match(re[t3.COERCE]);
  66651. } else {
  66652. var next;
  66653. while ((next = re[t3.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) {
  66654. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  66655. match = next;
  66656. }
  66657. re[t3.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  66658. }
  66659. re[t3.COERCERTL].lastIndex = -1;
  66660. }
  66661. if (match === null) {
  66662. return null;
  66663. }
  66664. return parse9(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options);
  66665. }
  66666. }
  66667. });
  66668. // node_modules/@babel/helper-compilation-targets/lib/targets.js
  66669. var require_targets = __commonJS({
  66670. "node_modules/@babel/helper-compilation-targets/lib/targets.js"(exports) {
  66671. "use strict";
  66672. Object.defineProperty(exports, "__esModule", {
  66673. value: true
  66674. });
  66675. exports.unreleasedLabels = exports.browserNameMap = void 0;
  66676. var unreleasedLabels = {
  66677. safari: "tp"
  66678. };
  66679. exports.unreleasedLabels = unreleasedLabels;
  66680. var browserNameMap = {
  66681. and_chr: "chrome",
  66682. and_ff: "firefox",
  66683. android: "android",
  66684. chrome: "chrome",
  66685. edge: "edge",
  66686. firefox: "firefox",
  66687. ie: "ie",
  66688. ie_mob: "ie",
  66689. ios_saf: "ios",
  66690. node: "node",
  66691. deno: "deno",
  66692. op_mob: "opera",
  66693. opera: "opera",
  66694. safari: "safari",
  66695. samsung: "samsung"
  66696. };
  66697. exports.browserNameMap = browserNameMap;
  66698. }
  66699. });
  66700. // node_modules/@babel/helper-compilation-targets/lib/utils.js
  66701. var require_utils3 = __commonJS({
  66702. "node_modules/@babel/helper-compilation-targets/lib/utils.js"(exports) {
  66703. "use strict";
  66704. Object.defineProperty(exports, "__esModule", {
  66705. value: true
  66706. });
  66707. exports.getHighestUnreleased = getHighestUnreleased;
  66708. exports.getLowestImplementedVersion = getLowestImplementedVersion;
  66709. exports.getLowestUnreleased = getLowestUnreleased;
  66710. exports.isUnreleasedVersion = isUnreleasedVersion;
  66711. exports.semverMin = semverMin;
  66712. exports.semverify = semverify;
  66713. var _semver = require_semver2();
  66714. var _helperValidatorOption = require_lib18();
  66715. var _targets = require_targets();
  66716. var versionRegExp = /^(\d+|\d+.\d+)$/;
  66717. var v = new _helperValidatorOption.OptionValidator("@babel/helper-compilation-targets");
  66718. function semverMin(first, second) {
  66719. return first && _semver.lt(first, second) ? first : second;
  66720. }
  66721. function semverify(version3) {
  66722. if (typeof version3 === "string" && _semver.valid(version3)) {
  66723. return version3;
  66724. }
  66725. v.invariant(typeof version3 === "number" || typeof version3 === "string" && versionRegExp.test(version3), `'${version3}' is not a valid version`);
  66726. version3 = version3.toString();
  66727. let pos2 = 0;
  66728. let num = 0;
  66729. while ((pos2 = version3.indexOf(".", pos2 + 1)) > 0) {
  66730. num++;
  66731. }
  66732. return version3 + ".0".repeat(2 - num);
  66733. }
  66734. function isUnreleasedVersion(version3, env) {
  66735. const unreleasedLabel = _targets.unreleasedLabels[env];
  66736. return !!unreleasedLabel && unreleasedLabel === version3.toString().toLowerCase();
  66737. }
  66738. function getLowestUnreleased(a, b, env) {
  66739. const unreleasedLabel = _targets.unreleasedLabels[env];
  66740. if (a === unreleasedLabel) {
  66741. return b;
  66742. }
  66743. if (b === unreleasedLabel) {
  66744. return a;
  66745. }
  66746. return semverMin(a, b);
  66747. }
  66748. function getHighestUnreleased(a, b, env) {
  66749. return getLowestUnreleased(a, b, env) === a ? b : a;
  66750. }
  66751. function getLowestImplementedVersion(plugin2, environment) {
  66752. const result = plugin2[environment];
  66753. if (!result && environment === "android") {
  66754. return plugin2.chrome;
  66755. }
  66756. return result;
  66757. }
  66758. }
  66759. });
  66760. // node_modules/@babel/helper-compilation-targets/lib/options.js
  66761. var require_options2 = __commonJS({
  66762. "node_modules/@babel/helper-compilation-targets/lib/options.js"(exports) {
  66763. "use strict";
  66764. Object.defineProperty(exports, "__esModule", {
  66765. value: true
  66766. });
  66767. exports.TargetNames = void 0;
  66768. var TargetNames = {
  66769. node: "node",
  66770. deno: "deno",
  66771. chrome: "chrome",
  66772. opera: "opera",
  66773. edge: "edge",
  66774. firefox: "firefox",
  66775. safari: "safari",
  66776. ie: "ie",
  66777. ios: "ios",
  66778. android: "android",
  66779. electron: "electron",
  66780. samsung: "samsung",
  66781. rhino: "rhino"
  66782. };
  66783. exports.TargetNames = TargetNames;
  66784. }
  66785. });
  66786. // node_modules/@babel/helper-compilation-targets/lib/pretty.js
  66787. var require_pretty = __commonJS({
  66788. "node_modules/@babel/helper-compilation-targets/lib/pretty.js"(exports) {
  66789. "use strict";
  66790. Object.defineProperty(exports, "__esModule", {
  66791. value: true
  66792. });
  66793. exports.prettifyTargets = prettifyTargets;
  66794. exports.prettifyVersion = prettifyVersion;
  66795. var _semver = require_semver2();
  66796. var _targets = require_targets();
  66797. function prettifyVersion(version3) {
  66798. if (typeof version3 !== "string") {
  66799. return version3;
  66800. }
  66801. const {
  66802. major,
  66803. minor,
  66804. patch: patch3
  66805. } = _semver.parse(version3);
  66806. const parts = [major];
  66807. if (minor || patch3) {
  66808. parts.push(minor);
  66809. }
  66810. if (patch3) {
  66811. parts.push(patch3);
  66812. }
  66813. return parts.join(".");
  66814. }
  66815. function prettifyTargets(targets) {
  66816. return Object.keys(targets).reduce((results, target) => {
  66817. let value2 = targets[target];
  66818. const unreleasedLabel = _targets.unreleasedLabels[target];
  66819. if (typeof value2 === "string" && unreleasedLabel !== value2) {
  66820. value2 = prettifyVersion(value2);
  66821. }
  66822. results[target] = value2;
  66823. return results;
  66824. }, {});
  66825. }
  66826. }
  66827. });
  66828. // node_modules/@babel/helper-compilation-targets/lib/debug.js
  66829. var require_debug = __commonJS({
  66830. "node_modules/@babel/helper-compilation-targets/lib/debug.js"(exports) {
  66831. "use strict";
  66832. Object.defineProperty(exports, "__esModule", {
  66833. value: true
  66834. });
  66835. exports.getInclusionReasons = getInclusionReasons;
  66836. var _semver = require_semver2();
  66837. var _pretty = require_pretty();
  66838. var _utils = require_utils3();
  66839. function getInclusionReasons(item, targetVersions, list3) {
  66840. const minVersions = list3[item] || {};
  66841. return Object.keys(targetVersions).reduce((result, env) => {
  66842. const minVersion = (0, _utils.getLowestImplementedVersion)(minVersions, env);
  66843. const targetVersion = targetVersions[env];
  66844. if (!minVersion) {
  66845. result[env] = (0, _pretty.prettifyVersion)(targetVersion);
  66846. } else {
  66847. const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env);
  66848. const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env);
  66849. if (!targetIsUnreleased && (minIsUnreleased || _semver.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) {
  66850. result[env] = (0, _pretty.prettifyVersion)(targetVersion);
  66851. }
  66852. }
  66853. return result;
  66854. }, {});
  66855. }
  66856. }
  66857. });
  66858. // node_modules/@babel/compat-data/data/plugins.json
  66859. var require_plugins = __commonJS({
  66860. "node_modules/@babel/compat-data/data/plugins.json"(exports, module) {
  66861. module.exports = {
  66862. "transform-class-static-block": {
  66863. chrome: "94",
  66864. opera: "80",
  66865. edge: "94",
  66866. firefox: "93",
  66867. node: "16.11",
  66868. deno: "1.14",
  66869. samsung: "17",
  66870. electron: "15.0"
  66871. },
  66872. "proposal-class-static-block": {
  66873. chrome: "94",
  66874. opera: "80",
  66875. edge: "94",
  66876. firefox: "93",
  66877. node: "16.11",
  66878. deno: "1.14",
  66879. samsung: "17",
  66880. electron: "15.0"
  66881. },
  66882. "transform-private-property-in-object": {
  66883. chrome: "91",
  66884. opera: "77",
  66885. edge: "91",
  66886. firefox: "90",
  66887. safari: "15",
  66888. node: "16.9",
  66889. deno: "1.9",
  66890. ios: "15",
  66891. samsung: "16",
  66892. electron: "13.0"
  66893. },
  66894. "proposal-private-property-in-object": {
  66895. chrome: "91",
  66896. opera: "77",
  66897. edge: "91",
  66898. firefox: "90",
  66899. safari: "15",
  66900. node: "16.9",
  66901. deno: "1.9",
  66902. ios: "15",
  66903. samsung: "16",
  66904. electron: "13.0"
  66905. },
  66906. "transform-class-properties": {
  66907. chrome: "74",
  66908. opera: "62",
  66909. edge: "79",
  66910. firefox: "90",
  66911. safari: "14.1",
  66912. node: "12",
  66913. deno: "1",
  66914. ios: "15",
  66915. samsung: "11",
  66916. electron: "6.0"
  66917. },
  66918. "proposal-class-properties": {
  66919. chrome: "74",
  66920. opera: "62",
  66921. edge: "79",
  66922. firefox: "90",
  66923. safari: "14.1",
  66924. node: "12",
  66925. deno: "1",
  66926. ios: "15",
  66927. samsung: "11",
  66928. electron: "6.0"
  66929. },
  66930. "transform-private-methods": {
  66931. chrome: "84",
  66932. opera: "70",
  66933. edge: "84",
  66934. firefox: "90",
  66935. safari: "15",
  66936. node: "14.6",
  66937. deno: "1",
  66938. ios: "15",
  66939. samsung: "14",
  66940. electron: "10.0"
  66941. },
  66942. "proposal-private-methods": {
  66943. chrome: "84",
  66944. opera: "70",
  66945. edge: "84",
  66946. firefox: "90",
  66947. safari: "15",
  66948. node: "14.6",
  66949. deno: "1",
  66950. ios: "15",
  66951. samsung: "14",
  66952. electron: "10.0"
  66953. },
  66954. "transform-numeric-separator": {
  66955. chrome: "75",
  66956. opera: "62",
  66957. edge: "79",
  66958. firefox: "70",
  66959. safari: "13",
  66960. node: "12.5",
  66961. deno: "1",
  66962. ios: "13",
  66963. samsung: "11",
  66964. rhino: "1.7.14",
  66965. electron: "6.0"
  66966. },
  66967. "proposal-numeric-separator": {
  66968. chrome: "75",
  66969. opera: "62",
  66970. edge: "79",
  66971. firefox: "70",
  66972. safari: "13",
  66973. node: "12.5",
  66974. deno: "1",
  66975. ios: "13",
  66976. samsung: "11",
  66977. rhino: "1.7.14",
  66978. electron: "6.0"
  66979. },
  66980. "transform-logical-assignment-operators": {
  66981. chrome: "85",
  66982. opera: "71",
  66983. edge: "85",
  66984. firefox: "79",
  66985. safari: "14",
  66986. node: "15",
  66987. deno: "1.2",
  66988. ios: "14",
  66989. samsung: "14",
  66990. electron: "10.0"
  66991. },
  66992. "proposal-logical-assignment-operators": {
  66993. chrome: "85",
  66994. opera: "71",
  66995. edge: "85",
  66996. firefox: "79",
  66997. safari: "14",
  66998. node: "15",
  66999. deno: "1.2",
  67000. ios: "14",
  67001. samsung: "14",
  67002. electron: "10.0"
  67003. },
  67004. "transform-nullish-coalescing-operator": {
  67005. chrome: "80",
  67006. opera: "67",
  67007. edge: "80",
  67008. firefox: "72",
  67009. safari: "13.1",
  67010. node: "14",
  67011. deno: "1",
  67012. ios: "13.4",
  67013. samsung: "13",
  67014. electron: "8.0"
  67015. },
  67016. "proposal-nullish-coalescing-operator": {
  67017. chrome: "80",
  67018. opera: "67",
  67019. edge: "80",
  67020. firefox: "72",
  67021. safari: "13.1",
  67022. node: "14",
  67023. deno: "1",
  67024. ios: "13.4",
  67025. samsung: "13",
  67026. electron: "8.0"
  67027. },
  67028. "transform-optional-chaining": {
  67029. chrome: "91",
  67030. opera: "77",
  67031. edge: "91",
  67032. firefox: "74",
  67033. safari: "13.1",
  67034. node: "16.9",
  67035. deno: "1.9",
  67036. ios: "13.4",
  67037. samsung: "16",
  67038. electron: "13.0"
  67039. },
  67040. "proposal-optional-chaining": {
  67041. chrome: "91",
  67042. opera: "77",
  67043. edge: "91",
  67044. firefox: "74",
  67045. safari: "13.1",
  67046. node: "16.9",
  67047. deno: "1.9",
  67048. ios: "13.4",
  67049. samsung: "16",
  67050. electron: "13.0"
  67051. },
  67052. "transform-json-strings": {
  67053. chrome: "66",
  67054. opera: "53",
  67055. edge: "79",
  67056. firefox: "62",
  67057. safari: "12",
  67058. node: "10",
  67059. deno: "1",
  67060. ios: "12",
  67061. samsung: "9",
  67062. rhino: "1.7.14",
  67063. electron: "3.0"
  67064. },
  67065. "proposal-json-strings": {
  67066. chrome: "66",
  67067. opera: "53",
  67068. edge: "79",
  67069. firefox: "62",
  67070. safari: "12",
  67071. node: "10",
  67072. deno: "1",
  67073. ios: "12",
  67074. samsung: "9",
  67075. rhino: "1.7.14",
  67076. electron: "3.0"
  67077. },
  67078. "transform-optional-catch-binding": {
  67079. chrome: "66",
  67080. opera: "53",
  67081. edge: "79",
  67082. firefox: "58",
  67083. safari: "11.1",
  67084. node: "10",
  67085. deno: "1",
  67086. ios: "11.3",
  67087. samsung: "9",
  67088. electron: "3.0"
  67089. },
  67090. "proposal-optional-catch-binding": {
  67091. chrome: "66",
  67092. opera: "53",
  67093. edge: "79",
  67094. firefox: "58",
  67095. safari: "11.1",
  67096. node: "10",
  67097. deno: "1",
  67098. ios: "11.3",
  67099. samsung: "9",
  67100. electron: "3.0"
  67101. },
  67102. "transform-parameters": {
  67103. chrome: "49",
  67104. opera: "36",
  67105. edge: "18",
  67106. firefox: "53",
  67107. node: "6",
  67108. deno: "1",
  67109. samsung: "5",
  67110. electron: "0.37"
  67111. },
  67112. "transform-async-generator-functions": {
  67113. chrome: "63",
  67114. opera: "50",
  67115. edge: "79",
  67116. firefox: "57",
  67117. safari: "12",
  67118. node: "10",
  67119. deno: "1",
  67120. ios: "12",
  67121. samsung: "8",
  67122. electron: "3.0"
  67123. },
  67124. "proposal-async-generator-functions": {
  67125. chrome: "63",
  67126. opera: "50",
  67127. edge: "79",
  67128. firefox: "57",
  67129. safari: "12",
  67130. node: "10",
  67131. deno: "1",
  67132. ios: "12",
  67133. samsung: "8",
  67134. electron: "3.0"
  67135. },
  67136. "transform-object-rest-spread": {
  67137. chrome: "60",
  67138. opera: "47",
  67139. edge: "79",
  67140. firefox: "55",
  67141. safari: "11.1",
  67142. node: "8.3",
  67143. deno: "1",
  67144. ios: "11.3",
  67145. samsung: "8",
  67146. electron: "2.0"
  67147. },
  67148. "proposal-object-rest-spread": {
  67149. chrome: "60",
  67150. opera: "47",
  67151. edge: "79",
  67152. firefox: "55",
  67153. safari: "11.1",
  67154. node: "8.3",
  67155. deno: "1",
  67156. ios: "11.3",
  67157. samsung: "8",
  67158. electron: "2.0"
  67159. },
  67160. "transform-dotall-regex": {
  67161. chrome: "62",
  67162. opera: "49",
  67163. edge: "79",
  67164. firefox: "78",
  67165. safari: "11.1",
  67166. node: "8.10",
  67167. deno: "1",
  67168. ios: "11.3",
  67169. samsung: "8",
  67170. electron: "3.0"
  67171. },
  67172. "transform-unicode-property-regex": {
  67173. chrome: "64",
  67174. opera: "51",
  67175. edge: "79",
  67176. firefox: "78",
  67177. safari: "11.1",
  67178. node: "10",
  67179. deno: "1",
  67180. ios: "11.3",
  67181. samsung: "9",
  67182. electron: "3.0"
  67183. },
  67184. "proposal-unicode-property-regex": {
  67185. chrome: "64",
  67186. opera: "51",
  67187. edge: "79",
  67188. firefox: "78",
  67189. safari: "11.1",
  67190. node: "10",
  67191. deno: "1",
  67192. ios: "11.3",
  67193. samsung: "9",
  67194. electron: "3.0"
  67195. },
  67196. "transform-named-capturing-groups-regex": {
  67197. chrome: "64",
  67198. opera: "51",
  67199. edge: "79",
  67200. firefox: "78",
  67201. safari: "11.1",
  67202. node: "10",
  67203. deno: "1",
  67204. ios: "11.3",
  67205. samsung: "9",
  67206. electron: "3.0"
  67207. },
  67208. "transform-async-to-generator": {
  67209. chrome: "55",
  67210. opera: "42",
  67211. edge: "15",
  67212. firefox: "52",
  67213. safari: "11",
  67214. node: "7.6",
  67215. deno: "1",
  67216. ios: "11",
  67217. samsung: "6",
  67218. electron: "1.6"
  67219. },
  67220. "transform-exponentiation-operator": {
  67221. chrome: "52",
  67222. opera: "39",
  67223. edge: "14",
  67224. firefox: "52",
  67225. safari: "10.1",
  67226. node: "7",
  67227. deno: "1",
  67228. ios: "10.3",
  67229. samsung: "6",
  67230. rhino: "1.7.14",
  67231. electron: "1.3"
  67232. },
  67233. "transform-template-literals": {
  67234. chrome: "41",
  67235. opera: "28",
  67236. edge: "13",
  67237. firefox: "34",
  67238. safari: "13",
  67239. node: "4",
  67240. deno: "1",
  67241. ios: "13",
  67242. samsung: "3.4",
  67243. electron: "0.21"
  67244. },
  67245. "transform-literals": {
  67246. chrome: "44",
  67247. opera: "31",
  67248. edge: "12",
  67249. firefox: "53",
  67250. safari: "9",
  67251. node: "4",
  67252. deno: "1",
  67253. ios: "9",
  67254. samsung: "4",
  67255. electron: "0.30"
  67256. },
  67257. "transform-function-name": {
  67258. chrome: "51",
  67259. opera: "38",
  67260. edge: "79",
  67261. firefox: "53",
  67262. safari: "10",
  67263. node: "6.5",
  67264. deno: "1",
  67265. ios: "10",
  67266. samsung: "5",
  67267. electron: "1.2"
  67268. },
  67269. "transform-arrow-functions": {
  67270. chrome: "47",
  67271. opera: "34",
  67272. edge: "13",
  67273. firefox: "43",
  67274. safari: "10",
  67275. node: "6",
  67276. deno: "1",
  67277. ios: "10",
  67278. samsung: "5",
  67279. rhino: "1.7.13",
  67280. electron: "0.36"
  67281. },
  67282. "transform-block-scoped-functions": {
  67283. chrome: "41",
  67284. opera: "28",
  67285. edge: "12",
  67286. firefox: "46",
  67287. safari: "10",
  67288. node: "4",
  67289. deno: "1",
  67290. ie: "11",
  67291. ios: "10",
  67292. samsung: "3.4",
  67293. electron: "0.21"
  67294. },
  67295. "transform-classes": {
  67296. chrome: "46",
  67297. opera: "33",
  67298. edge: "13",
  67299. firefox: "45",
  67300. safari: "10",
  67301. node: "5",
  67302. deno: "1",
  67303. ios: "10",
  67304. samsung: "5",
  67305. electron: "0.36"
  67306. },
  67307. "transform-object-super": {
  67308. chrome: "46",
  67309. opera: "33",
  67310. edge: "13",
  67311. firefox: "45",
  67312. safari: "10",
  67313. node: "5",
  67314. deno: "1",
  67315. ios: "10",
  67316. samsung: "5",
  67317. electron: "0.36"
  67318. },
  67319. "transform-shorthand-properties": {
  67320. chrome: "43",
  67321. opera: "30",
  67322. edge: "12",
  67323. firefox: "33",
  67324. safari: "9",
  67325. node: "4",
  67326. deno: "1",
  67327. ios: "9",
  67328. samsung: "4",
  67329. rhino: "1.7.14",
  67330. electron: "0.27"
  67331. },
  67332. "transform-duplicate-keys": {
  67333. chrome: "42",
  67334. opera: "29",
  67335. edge: "12",
  67336. firefox: "34",
  67337. safari: "9",
  67338. node: "4",
  67339. deno: "1",
  67340. ios: "9",
  67341. samsung: "3.4",
  67342. electron: "0.25"
  67343. },
  67344. "transform-computed-properties": {
  67345. chrome: "44",
  67346. opera: "31",
  67347. edge: "12",
  67348. firefox: "34",
  67349. safari: "7.1",
  67350. node: "4",
  67351. deno: "1",
  67352. ios: "8",
  67353. samsung: "4",
  67354. electron: "0.30"
  67355. },
  67356. "transform-for-of": {
  67357. chrome: "51",
  67358. opera: "38",
  67359. edge: "15",
  67360. firefox: "53",
  67361. safari: "10",
  67362. node: "6.5",
  67363. deno: "1",
  67364. ios: "10",
  67365. samsung: "5",
  67366. electron: "1.2"
  67367. },
  67368. "transform-sticky-regex": {
  67369. chrome: "49",
  67370. opera: "36",
  67371. edge: "13",
  67372. firefox: "3",
  67373. safari: "10",
  67374. node: "6",
  67375. deno: "1",
  67376. ios: "10",
  67377. samsung: "5",
  67378. electron: "0.37"
  67379. },
  67380. "transform-unicode-escapes": {
  67381. chrome: "44",
  67382. opera: "31",
  67383. edge: "12",
  67384. firefox: "53",
  67385. safari: "9",
  67386. node: "4",
  67387. deno: "1",
  67388. ios: "9",
  67389. samsung: "4",
  67390. electron: "0.30"
  67391. },
  67392. "transform-unicode-regex": {
  67393. chrome: "50",
  67394. opera: "37",
  67395. edge: "13",
  67396. firefox: "46",
  67397. safari: "12",
  67398. node: "6",
  67399. deno: "1",
  67400. ios: "12",
  67401. samsung: "5",
  67402. electron: "1.1"
  67403. },
  67404. "transform-spread": {
  67405. chrome: "46",
  67406. opera: "33",
  67407. edge: "13",
  67408. firefox: "45",
  67409. safari: "10",
  67410. node: "5",
  67411. deno: "1",
  67412. ios: "10",
  67413. samsung: "5",
  67414. electron: "0.36"
  67415. },
  67416. "transform-destructuring": {
  67417. chrome: "51",
  67418. opera: "38",
  67419. edge: "15",
  67420. firefox: "53",
  67421. safari: "10",
  67422. node: "6.5",
  67423. deno: "1",
  67424. ios: "10",
  67425. samsung: "5",
  67426. electron: "1.2"
  67427. },
  67428. "transform-block-scoping": {
  67429. chrome: "49",
  67430. opera: "36",
  67431. edge: "14",
  67432. firefox: "51",
  67433. safari: "11",
  67434. node: "6",
  67435. deno: "1",
  67436. ios: "11",
  67437. samsung: "5",
  67438. electron: "0.37"
  67439. },
  67440. "transform-typeof-symbol": {
  67441. chrome: "38",
  67442. opera: "25",
  67443. edge: "12",
  67444. firefox: "36",
  67445. safari: "9",
  67446. node: "0.12",
  67447. deno: "1",
  67448. ios: "9",
  67449. samsung: "3",
  67450. rhino: "1.7.13",
  67451. electron: "0.20"
  67452. },
  67453. "transform-new-target": {
  67454. chrome: "46",
  67455. opera: "33",
  67456. edge: "14",
  67457. firefox: "41",
  67458. safari: "10",
  67459. node: "5",
  67460. deno: "1",
  67461. ios: "10",
  67462. samsung: "5",
  67463. electron: "0.36"
  67464. },
  67465. "transform-regenerator": {
  67466. chrome: "50",
  67467. opera: "37",
  67468. edge: "13",
  67469. firefox: "53",
  67470. safari: "10",
  67471. node: "6",
  67472. deno: "1",
  67473. ios: "10",
  67474. samsung: "5",
  67475. electron: "1.1"
  67476. },
  67477. "transform-member-expression-literals": {
  67478. chrome: "7",
  67479. opera: "12",
  67480. edge: "12",
  67481. firefox: "2",
  67482. safari: "5.1",
  67483. node: "0.4",
  67484. deno: "1",
  67485. ie: "9",
  67486. android: "4",
  67487. ios: "6",
  67488. phantom: "1.9",
  67489. samsung: "1",
  67490. rhino: "1.7.13",
  67491. electron: "0.20"
  67492. },
  67493. "transform-property-literals": {
  67494. chrome: "7",
  67495. opera: "12",
  67496. edge: "12",
  67497. firefox: "2",
  67498. safari: "5.1",
  67499. node: "0.4",
  67500. deno: "1",
  67501. ie: "9",
  67502. android: "4",
  67503. ios: "6",
  67504. phantom: "1.9",
  67505. samsung: "1",
  67506. rhino: "1.7.13",
  67507. electron: "0.20"
  67508. },
  67509. "transform-reserved-words": {
  67510. chrome: "13",
  67511. opera: "10.50",
  67512. edge: "12",
  67513. firefox: "2",
  67514. safari: "3.1",
  67515. node: "0.6",
  67516. deno: "1",
  67517. ie: "9",
  67518. android: "4.4",
  67519. ios: "6",
  67520. phantom: "1.9",
  67521. samsung: "1",
  67522. rhino: "1.7.13",
  67523. electron: "0.20"
  67524. },
  67525. "transform-export-namespace-from": {
  67526. chrome: "72",
  67527. and_chr: "72",
  67528. edge: "79",
  67529. firefox: "80",
  67530. and_ff: "80",
  67531. node: "13.2",
  67532. opera: "60",
  67533. op_mob: "51",
  67534. samsung: "11.0",
  67535. android: "72",
  67536. electron: "5.0"
  67537. },
  67538. "proposal-export-namespace-from": {
  67539. chrome: "72",
  67540. and_chr: "72",
  67541. edge: "79",
  67542. firefox: "80",
  67543. and_ff: "80",
  67544. node: "13.2",
  67545. opera: "60",
  67546. op_mob: "51",
  67547. samsung: "11.0",
  67548. android: "72",
  67549. electron: "5.0"
  67550. }
  67551. };
  67552. }
  67553. });
  67554. // node_modules/@babel/compat-data/plugins.js
  67555. var require_plugins2 = __commonJS({
  67556. "node_modules/@babel/compat-data/plugins.js"(exports, module) {
  67557. module.exports = require_plugins();
  67558. }
  67559. });
  67560. // node_modules/@babel/helper-compilation-targets/lib/filter-items.js
  67561. var require_filter_items = __commonJS({
  67562. "node_modules/@babel/helper-compilation-targets/lib/filter-items.js"(exports) {
  67563. "use strict";
  67564. Object.defineProperty(exports, "__esModule", {
  67565. value: true
  67566. });
  67567. exports.default = filterItems;
  67568. exports.isRequired = isRequired;
  67569. exports.targetsSupported = targetsSupported;
  67570. var _semver = require_semver2();
  67571. var _plugins = require_plugins2();
  67572. var _utils = require_utils3();
  67573. function targetsSupported(target, support) {
  67574. const targetEnvironments = Object.keys(target);
  67575. if (targetEnvironments.length === 0) {
  67576. return false;
  67577. }
  67578. const unsupportedEnvironments = targetEnvironments.filter((environment) => {
  67579. const lowestImplementedVersion = (0, _utils.getLowestImplementedVersion)(support, environment);
  67580. if (!lowestImplementedVersion) {
  67581. return true;
  67582. }
  67583. const lowestTargetedVersion = target[environment];
  67584. if ((0, _utils.isUnreleasedVersion)(lowestTargetedVersion, environment)) {
  67585. return false;
  67586. }
  67587. if ((0, _utils.isUnreleasedVersion)(lowestImplementedVersion, environment)) {
  67588. return true;
  67589. }
  67590. if (!_semver.valid(lowestTargetedVersion.toString())) {
  67591. throw new Error(`Invalid version passed for target "${environment}": "${lowestTargetedVersion}". Versions must be in semver format (major.minor.patch)`);
  67592. }
  67593. return _semver.gt((0, _utils.semverify)(lowestImplementedVersion), lowestTargetedVersion.toString());
  67594. });
  67595. return unsupportedEnvironments.length === 0;
  67596. }
  67597. function isRequired(name2, targets, {
  67598. compatData = _plugins,
  67599. includes,
  67600. excludes
  67601. } = {}) {
  67602. if (excludes != null && excludes.has(name2))
  67603. return false;
  67604. if (includes != null && includes.has(name2))
  67605. return true;
  67606. return !targetsSupported(targets, compatData[name2]);
  67607. }
  67608. function filterItems(list3, includes, excludes, targets, defaultIncludes, defaultExcludes, pluginSyntaxMap) {
  67609. const result = /* @__PURE__ */ new Set();
  67610. const options = {
  67611. compatData: list3,
  67612. includes,
  67613. excludes
  67614. };
  67615. for (const item in list3) {
  67616. if (isRequired(item, targets, options)) {
  67617. result.add(item);
  67618. } else if (pluginSyntaxMap) {
  67619. const shippedProposalsSyntax = pluginSyntaxMap.get(item);
  67620. if (shippedProposalsSyntax) {
  67621. result.add(shippedProposalsSyntax);
  67622. }
  67623. }
  67624. }
  67625. if (defaultIncludes) {
  67626. defaultIncludes.forEach((item) => !excludes.has(item) && result.add(item));
  67627. }
  67628. if (defaultExcludes) {
  67629. defaultExcludes.forEach((item) => !includes.has(item) && result.delete(item));
  67630. }
  67631. return result;
  67632. }
  67633. }
  67634. });
  67635. // node_modules/@babel/helper-compilation-targets/lib/index.js
  67636. var require_lib19 = __commonJS({
  67637. "node_modules/@babel/helper-compilation-targets/lib/index.js"(exports) {
  67638. "use strict";
  67639. Object.defineProperty(exports, "__esModule", {
  67640. value: true
  67641. });
  67642. Object.defineProperty(exports, "TargetNames", {
  67643. enumerable: true,
  67644. get: function() {
  67645. return _options.TargetNames;
  67646. }
  67647. });
  67648. exports.default = getTargets;
  67649. Object.defineProperty(exports, "filterItems", {
  67650. enumerable: true,
  67651. get: function() {
  67652. return _filterItems.default;
  67653. }
  67654. });
  67655. Object.defineProperty(exports, "getInclusionReasons", {
  67656. enumerable: true,
  67657. get: function() {
  67658. return _debug.getInclusionReasons;
  67659. }
  67660. });
  67661. exports.isBrowsersQueryValid = isBrowsersQueryValid;
  67662. Object.defineProperty(exports, "isRequired", {
  67663. enumerable: true,
  67664. get: function() {
  67665. return _filterItems.isRequired;
  67666. }
  67667. });
  67668. Object.defineProperty(exports, "prettifyTargets", {
  67669. enumerable: true,
  67670. get: function() {
  67671. return _pretty.prettifyTargets;
  67672. }
  67673. });
  67674. Object.defineProperty(exports, "unreleasedLabels", {
  67675. enumerable: true,
  67676. get: function() {
  67677. return _targets.unreleasedLabels;
  67678. }
  67679. });
  67680. var _browserslist = require_browserslist();
  67681. var _helperValidatorOption = require_lib18();
  67682. var _nativeModules = require_native_modules2();
  67683. var _lruCache = require_lru_cache();
  67684. var _utils = require_utils3();
  67685. var _targets = require_targets();
  67686. var _options = require_options2();
  67687. var _pretty = require_pretty();
  67688. var _debug = require_debug();
  67689. var _filterItems = require_filter_items();
  67690. var ESM_SUPPORT = _nativeModules["es6.module"];
  67691. var v = new _helperValidatorOption.OptionValidator("@babel/helper-compilation-targets");
  67692. function validateTargetNames(targets) {
  67693. const validTargets = Object.keys(_options.TargetNames);
  67694. for (const target of Object.keys(targets)) {
  67695. if (!(target in _options.TargetNames)) {
  67696. throw new Error(v.formatMessage(`'${target}' is not a valid target
  67697. - Did you mean '${(0, _helperValidatorOption.findSuggestion)(target, validTargets)}'?`));
  67698. }
  67699. }
  67700. return targets;
  67701. }
  67702. function isBrowsersQueryValid(browsers) {
  67703. return typeof browsers === "string" || Array.isArray(browsers) && browsers.every((b) => typeof b === "string");
  67704. }
  67705. function validateBrowsers(browsers) {
  67706. v.invariant(browsers === void 0 || isBrowsersQueryValid(browsers), `'${String(browsers)}' is not a valid browserslist query`);
  67707. return browsers;
  67708. }
  67709. function getLowestVersions(browsers) {
  67710. return browsers.reduce((all4, browser) => {
  67711. const [browserName, browserVersion] = browser.split(" ");
  67712. const target = _targets.browserNameMap[browserName];
  67713. if (!target) {
  67714. return all4;
  67715. }
  67716. try {
  67717. const splitVersion = browserVersion.split("-")[0].toLowerCase();
  67718. const isSplitUnreleased = (0, _utils.isUnreleasedVersion)(splitVersion, target);
  67719. if (!all4[target]) {
  67720. all4[target] = isSplitUnreleased ? splitVersion : (0, _utils.semverify)(splitVersion);
  67721. return all4;
  67722. }
  67723. const version3 = all4[target];
  67724. const isUnreleased = (0, _utils.isUnreleasedVersion)(version3, target);
  67725. if (isUnreleased && isSplitUnreleased) {
  67726. all4[target] = (0, _utils.getLowestUnreleased)(version3, splitVersion, target);
  67727. } else if (isUnreleased) {
  67728. all4[target] = (0, _utils.semverify)(splitVersion);
  67729. } else if (!isUnreleased && !isSplitUnreleased) {
  67730. const parsedBrowserVersion = (0, _utils.semverify)(splitVersion);
  67731. all4[target] = (0, _utils.semverMin)(version3, parsedBrowserVersion);
  67732. }
  67733. } catch (e) {
  67734. }
  67735. return all4;
  67736. }, {});
  67737. }
  67738. function outputDecimalWarning(decimalTargets) {
  67739. if (!decimalTargets.length) {
  67740. return;
  67741. }
  67742. console.warn("Warning, the following targets are using a decimal version:\n");
  67743. decimalTargets.forEach(({
  67744. target,
  67745. value: value2
  67746. }) => console.warn(` ${target}: ${value2}`));
  67747. console.warn(`
  67748. We recommend using a string for minor/patch versions to avoid numbers like 6.10
  67749. getting parsed as 6.1, which can lead to unexpected behavior.
  67750. `);
  67751. }
  67752. function semverifyTarget(target, value2) {
  67753. try {
  67754. return (0, _utils.semverify)(value2);
  67755. } catch (error) {
  67756. throw new Error(v.formatMessage(`'${value2}' is not a valid value for 'targets.${target}'.`));
  67757. }
  67758. }
  67759. function nodeTargetParser(value2) {
  67760. const parsed = value2 === true || value2 === "current" ? process.versions.node : semverifyTarget("node", value2);
  67761. return ["node", parsed];
  67762. }
  67763. function defaultTargetParser(target, value2) {
  67764. const version3 = (0, _utils.isUnreleasedVersion)(value2, target) ? value2.toLowerCase() : semverifyTarget(target, value2);
  67765. return [target, version3];
  67766. }
  67767. function generateTargets(inputTargets) {
  67768. const input = Object.assign({}, inputTargets);
  67769. delete input.esmodules;
  67770. delete input.browsers;
  67771. return input;
  67772. }
  67773. function resolveTargets(queries, env) {
  67774. const resolved = _browserslist(queries, {
  67775. mobileToDesktop: true,
  67776. env
  67777. });
  67778. return getLowestVersions(resolved);
  67779. }
  67780. var targetsCache = new _lruCache({
  67781. max: 64
  67782. });
  67783. function resolveTargetsCached(queries, env) {
  67784. const cacheKey = typeof queries === "string" ? queries : queries.join() + env;
  67785. let cached = targetsCache.get(cacheKey);
  67786. if (!cached) {
  67787. cached = resolveTargets(queries, env);
  67788. targetsCache.set(cacheKey, cached);
  67789. }
  67790. return Object.assign({}, cached);
  67791. }
  67792. function getTargets(inputTargets = {}, options = {}) {
  67793. var _browsers, _browsers2;
  67794. let {
  67795. browsers,
  67796. esmodules
  67797. } = inputTargets;
  67798. const {
  67799. configPath = "."
  67800. } = options;
  67801. validateBrowsers(browsers);
  67802. const input = generateTargets(inputTargets);
  67803. let targets = validateTargetNames(input);
  67804. const shouldParseBrowsers = !!browsers;
  67805. const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;
  67806. const shouldSearchForConfig = !options.ignoreBrowserslistConfig && !hasTargets;
  67807. if (!browsers && shouldSearchForConfig) {
  67808. browsers = _browserslist.loadConfig({
  67809. config: options.configFile,
  67810. path: configPath,
  67811. env: options.browserslistEnv
  67812. });
  67813. if (browsers == null) {
  67814. {
  67815. browsers = [];
  67816. }
  67817. }
  67818. }
  67819. if (esmodules && (esmodules !== "intersect" || !((_browsers = browsers) != null && _browsers.length))) {
  67820. browsers = Object.keys(ESM_SUPPORT).map((browser) => `${browser} >= ${ESM_SUPPORT[browser]}`).join(", ");
  67821. esmodules = false;
  67822. }
  67823. if ((_browsers2 = browsers) != null && _browsers2.length) {
  67824. const queryBrowsers = resolveTargetsCached(browsers, options.browserslistEnv);
  67825. if (esmodules === "intersect") {
  67826. for (const browser of Object.keys(queryBrowsers)) {
  67827. const version3 = queryBrowsers[browser];
  67828. const esmSupportVersion = ESM_SUPPORT[browser];
  67829. if (esmSupportVersion) {
  67830. queryBrowsers[browser] = (0, _utils.getHighestUnreleased)(version3, (0, _utils.semverify)(esmSupportVersion), browser);
  67831. } else {
  67832. delete queryBrowsers[browser];
  67833. }
  67834. }
  67835. }
  67836. targets = Object.assign(queryBrowsers, targets);
  67837. }
  67838. const result = {};
  67839. const decimalWarnings = [];
  67840. for (const target of Object.keys(targets).sort()) {
  67841. const value2 = targets[target];
  67842. if (typeof value2 === "number" && value2 % 1 !== 0) {
  67843. decimalWarnings.push({
  67844. target,
  67845. value: value2
  67846. });
  67847. }
  67848. const [parsedTarget, parsedValue] = target === "node" ? nodeTargetParser(value2) : defaultTargetParser(target, value2);
  67849. if (parsedValue) {
  67850. result[parsedTarget] = parsedValue;
  67851. }
  67852. }
  67853. outputDecimalWarning(decimalWarnings);
  67854. return result;
  67855. }
  67856. }
  67857. });
  67858. // node_modules/@babel/core/lib/config/resolve-targets.js
  67859. var require_resolve_targets = __commonJS({
  67860. "node_modules/@babel/core/lib/config/resolve-targets.js"(exports) {
  67861. "use strict";
  67862. Object.defineProperty(exports, "__esModule", {
  67863. value: true
  67864. });
  67865. exports.resolveBrowserslistConfigFile = resolveBrowserslistConfigFile;
  67866. exports.resolveTargets = resolveTargets;
  67867. function _path() {
  67868. const data3 = __require("path");
  67869. _path = function() {
  67870. return data3;
  67871. };
  67872. return data3;
  67873. }
  67874. function _helperCompilationTargets() {
  67875. const data3 = require_lib19();
  67876. _helperCompilationTargets = function() {
  67877. return data3;
  67878. };
  67879. return data3;
  67880. }
  67881. function resolveBrowserslistConfigFile(browserslistConfigFile, configFileDir) {
  67882. return _path().resolve(configFileDir, browserslistConfigFile);
  67883. }
  67884. function resolveTargets(options, root4) {
  67885. const optTargets = options.targets;
  67886. let targets;
  67887. if (typeof optTargets === "string" || Array.isArray(optTargets)) {
  67888. targets = {
  67889. browsers: optTargets
  67890. };
  67891. } else if (optTargets) {
  67892. if ("esmodules" in optTargets) {
  67893. targets = Object.assign({}, optTargets, {
  67894. esmodules: "intersect"
  67895. });
  67896. } else {
  67897. targets = optTargets;
  67898. }
  67899. }
  67900. const {
  67901. browserslistConfigFile
  67902. } = options;
  67903. let configFile;
  67904. let ignoreBrowserslistConfig = false;
  67905. if (typeof browserslistConfigFile === "string") {
  67906. configFile = browserslistConfigFile;
  67907. } else {
  67908. ignoreBrowserslistConfig = browserslistConfigFile === false;
  67909. }
  67910. return (0, _helperCompilationTargets().default)(targets, {
  67911. ignoreBrowserslistConfig,
  67912. configFile,
  67913. configPath: root4,
  67914. browserslistEnv: options.browserslistEnv
  67915. });
  67916. }
  67917. }
  67918. });
  67919. // node_modules/@babel/core/lib/config/config-descriptors.js
  67920. var require_config_descriptors = __commonJS({
  67921. "node_modules/@babel/core/lib/config/config-descriptors.js"(exports) {
  67922. "use strict";
  67923. Object.defineProperty(exports, "__esModule", {
  67924. value: true
  67925. });
  67926. exports.createCachedDescriptors = createCachedDescriptors;
  67927. exports.createDescriptor = createDescriptor;
  67928. exports.createUncachedDescriptors = createUncachedDescriptors;
  67929. function _gensync() {
  67930. const data3 = require_gensync();
  67931. _gensync = function() {
  67932. return data3;
  67933. };
  67934. return data3;
  67935. }
  67936. var _functional = require_functional();
  67937. var _files = require_files();
  67938. var _item = require_item();
  67939. var _caching = require_caching();
  67940. var _resolveTargets = require_resolve_targets();
  67941. function isEqualDescriptor(a, b) {
  67942. return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && (a.file && a.file.request) === (b.file && b.file.request) && (a.file && a.file.resolved) === (b.file && b.file.resolved);
  67943. }
  67944. function* handlerOf(value2) {
  67945. return value2;
  67946. }
  67947. function optionsWithResolvedBrowserslistConfigFile(options, dirname) {
  67948. if (typeof options.browserslistConfigFile === "string") {
  67949. options.browserslistConfigFile = (0, _resolveTargets.resolveBrowserslistConfigFile)(options.browserslistConfigFile, dirname);
  67950. }
  67951. return options;
  67952. }
  67953. function createCachedDescriptors(dirname, options, alias) {
  67954. const {
  67955. plugins,
  67956. presets,
  67957. passPerPreset
  67958. } = options;
  67959. return {
  67960. options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
  67961. plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias) : () => handlerOf([]),
  67962. presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => handlerOf([])
  67963. };
  67964. }
  67965. function createUncachedDescriptors(dirname, options, alias) {
  67966. return {
  67967. options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
  67968. plugins: (0, _functional.once)(() => createPluginDescriptors(options.plugins || [], dirname, alias)),
  67969. presets: (0, _functional.once)(() => createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset))
  67970. };
  67971. }
  67972. var PRESET_DESCRIPTOR_CACHE = /* @__PURE__ */ new WeakMap();
  67973. var createCachedPresetDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => {
  67974. const dirname = cache.using((dir) => dir);
  67975. return (0, _caching.makeStrongCacheSync)((alias) => (0, _caching.makeStrongCache)(function* (passPerPreset) {
  67976. const descriptors = yield* createPresetDescriptors(items, dirname, alias, passPerPreset);
  67977. return descriptors.map((desc) => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc));
  67978. }));
  67979. });
  67980. var PLUGIN_DESCRIPTOR_CACHE = /* @__PURE__ */ new WeakMap();
  67981. var createCachedPluginDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => {
  67982. const dirname = cache.using((dir) => dir);
  67983. return (0, _caching.makeStrongCache)(function* (alias) {
  67984. const descriptors = yield* createPluginDescriptors(items, dirname, alias);
  67985. return descriptors.map((desc) => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc));
  67986. });
  67987. });
  67988. var DEFAULT_OPTIONS = {};
  67989. function loadCachedDescriptor(cache, desc) {
  67990. const {
  67991. value: value2,
  67992. options = DEFAULT_OPTIONS
  67993. } = desc;
  67994. if (options === false)
  67995. return desc;
  67996. let cacheByOptions = cache.get(value2);
  67997. if (!cacheByOptions) {
  67998. cacheByOptions = /* @__PURE__ */ new WeakMap();
  67999. cache.set(value2, cacheByOptions);
  68000. }
  68001. let possibilities = cacheByOptions.get(options);
  68002. if (!possibilities) {
  68003. possibilities = [];
  68004. cacheByOptions.set(options, possibilities);
  68005. }
  68006. if (possibilities.indexOf(desc) === -1) {
  68007. const matches = possibilities.filter((possibility) => isEqualDescriptor(possibility, desc));
  68008. if (matches.length > 0) {
  68009. return matches[0];
  68010. }
  68011. possibilities.push(desc);
  68012. }
  68013. return desc;
  68014. }
  68015. function* createPresetDescriptors(items, dirname, alias, passPerPreset) {
  68016. return yield* createDescriptors("preset", items, dirname, alias, passPerPreset);
  68017. }
  68018. function* createPluginDescriptors(items, dirname, alias) {
  68019. return yield* createDescriptors("plugin", items, dirname, alias);
  68020. }
  68021. function* createDescriptors(type, items, dirname, alias, ownPass) {
  68022. const descriptors = yield* _gensync().all(items.map((item, index2) => createDescriptor(item, dirname, {
  68023. type,
  68024. alias: `${alias}$${index2}`,
  68025. ownPass: !!ownPass
  68026. })));
  68027. assertNoDuplicates(descriptors);
  68028. return descriptors;
  68029. }
  68030. function* createDescriptor(pair, dirname, {
  68031. type,
  68032. alias,
  68033. ownPass
  68034. }) {
  68035. const desc = (0, _item.getItemDescriptor)(pair);
  68036. if (desc) {
  68037. return desc;
  68038. }
  68039. let name2;
  68040. let options;
  68041. let value2 = pair;
  68042. if (Array.isArray(value2)) {
  68043. if (value2.length === 3) {
  68044. [value2, options, name2] = value2;
  68045. } else {
  68046. [value2, options] = value2;
  68047. }
  68048. }
  68049. let file = void 0;
  68050. let filepath = null;
  68051. if (typeof value2 === "string") {
  68052. if (typeof type !== "string") {
  68053. throw new Error("To resolve a string-based item, the type of item must be given");
  68054. }
  68055. const resolver2 = type === "plugin" ? _files.loadPlugin : _files.loadPreset;
  68056. const request = value2;
  68057. ({
  68058. filepath,
  68059. value: value2
  68060. } = yield* resolver2(value2, dirname));
  68061. file = {
  68062. request,
  68063. resolved: filepath
  68064. };
  68065. }
  68066. if (!value2) {
  68067. throw new Error(`Unexpected falsy value: ${String(value2)}`);
  68068. }
  68069. if (typeof value2 === "object" && value2.__esModule) {
  68070. if (value2.default) {
  68071. value2 = value2.default;
  68072. } else {
  68073. throw new Error("Must export a default export when using ES6 modules.");
  68074. }
  68075. }
  68076. if (typeof value2 !== "object" && typeof value2 !== "function") {
  68077. throw new Error(`Unsupported format: ${typeof value2}. Expected an object or a function.`);
  68078. }
  68079. if (filepath !== null && typeof value2 === "object" && value2) {
  68080. throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`);
  68081. }
  68082. return {
  68083. name: name2,
  68084. alias: filepath || alias,
  68085. value: value2,
  68086. options,
  68087. dirname,
  68088. ownPass,
  68089. file
  68090. };
  68091. }
  68092. function assertNoDuplicates(items) {
  68093. const map = /* @__PURE__ */ new Map();
  68094. for (const item of items) {
  68095. if (typeof item.value !== "function")
  68096. continue;
  68097. let nameMap = map.get(item.value);
  68098. if (!nameMap) {
  68099. nameMap = /* @__PURE__ */ new Set();
  68100. map.set(item.value, nameMap);
  68101. }
  68102. if (nameMap.has(item.name)) {
  68103. const conflicts = items.filter((i) => i.value === item.value);
  68104. throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`, ``, `Duplicates detected are:`, `${JSON.stringify(conflicts, null, 2)}`].join("\n"));
  68105. }
  68106. nameMap.add(item.name);
  68107. }
  68108. }
  68109. }
  68110. });
  68111. // node_modules/@babel/core/lib/config/item.js
  68112. var require_item = __commonJS({
  68113. "node_modules/@babel/core/lib/config/item.js"(exports) {
  68114. "use strict";
  68115. Object.defineProperty(exports, "__esModule", {
  68116. value: true
  68117. });
  68118. exports.createConfigItem = createConfigItem;
  68119. exports.createItemFromDescriptor = createItemFromDescriptor;
  68120. exports.getItemDescriptor = getItemDescriptor;
  68121. function _path() {
  68122. const data3 = __require("path");
  68123. _path = function() {
  68124. return data3;
  68125. };
  68126. return data3;
  68127. }
  68128. var _configDescriptors = require_config_descriptors();
  68129. function createItemFromDescriptor(desc) {
  68130. return new ConfigItem(desc);
  68131. }
  68132. function* createConfigItem(value2, {
  68133. dirname = ".",
  68134. type
  68135. } = {}) {
  68136. const descriptor = yield* (0, _configDescriptors.createDescriptor)(value2, _path().resolve(dirname), {
  68137. type,
  68138. alias: "programmatic item"
  68139. });
  68140. return createItemFromDescriptor(descriptor);
  68141. }
  68142. var CONFIG_ITEM_BRAND = Symbol.for("@babel/core@7 - ConfigItem");
  68143. function getItemDescriptor(item) {
  68144. if (item != null && item[CONFIG_ITEM_BRAND]) {
  68145. return item._descriptor;
  68146. }
  68147. return void 0;
  68148. }
  68149. var ConfigItem = class {
  68150. constructor(descriptor) {
  68151. this._descriptor = void 0;
  68152. this[CONFIG_ITEM_BRAND] = true;
  68153. this.value = void 0;
  68154. this.options = void 0;
  68155. this.dirname = void 0;
  68156. this.name = void 0;
  68157. this.file = void 0;
  68158. this._descriptor = descriptor;
  68159. Object.defineProperty(this, "_descriptor", {
  68160. enumerable: false
  68161. });
  68162. Object.defineProperty(this, CONFIG_ITEM_BRAND, {
  68163. enumerable: false
  68164. });
  68165. this.value = this._descriptor.value;
  68166. this.options = this._descriptor.options;
  68167. this.dirname = this._descriptor.dirname;
  68168. this.name = this._descriptor.name;
  68169. this.file = this._descriptor.file ? {
  68170. request: this._descriptor.file.request,
  68171. resolved: this._descriptor.file.resolved
  68172. } : void 0;
  68173. Object.freeze(this);
  68174. }
  68175. };
  68176. Object.freeze(ConfigItem.prototype);
  68177. }
  68178. });
  68179. // node_modules/@babel/core/lib/config/validation/removed.js
  68180. var require_removed = __commonJS({
  68181. "node_modules/@babel/core/lib/config/validation/removed.js"(exports) {
  68182. "use strict";
  68183. Object.defineProperty(exports, "__esModule", {
  68184. value: true
  68185. });
  68186. exports.default = void 0;
  68187. var _default = {
  68188. auxiliaryComment: {
  68189. message: "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"
  68190. },
  68191. blacklist: {
  68192. message: "Put the specific transforms you want in the `plugins` option"
  68193. },
  68194. breakConfig: {
  68195. message: "This is not a necessary option in Babel 6"
  68196. },
  68197. experimental: {
  68198. message: "Put the specific transforms you want in the `plugins` option"
  68199. },
  68200. externalHelpers: {
  68201. message: "Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"
  68202. },
  68203. extra: {
  68204. message: ""
  68205. },
  68206. jsxPragma: {
  68207. message: "use the `pragma` option in the `react-jsx` plugin. Check out http://babeljs.io/docs/plugins/transform-react-jsx/"
  68208. },
  68209. loose: {
  68210. message: "Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."
  68211. },
  68212. metadataUsedHelpers: {
  68213. message: "Not required anymore as this is enabled by default"
  68214. },
  68215. modules: {
  68216. message: "Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"
  68217. },
  68218. nonStandard: {
  68219. message: "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"
  68220. },
  68221. optional: {
  68222. message: "Put the specific transforms you want in the `plugins` option"
  68223. },
  68224. sourceMapName: {
  68225. message: "The `sourceMapName` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.file` themselves."
  68226. },
  68227. stage: {
  68228. message: "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"
  68229. },
  68230. whitelist: {
  68231. message: "Put the specific transforms you want in the `plugins` option"
  68232. },
  68233. resolveModuleSource: {
  68234. version: 6,
  68235. message: "Use `babel-plugin-module-resolver@3`'s 'resolvePath' options"
  68236. },
  68237. metadata: {
  68238. version: 6,
  68239. message: "Generated plugin metadata is always included in the output result"
  68240. },
  68241. sourceMapTarget: {
  68242. version: 6,
  68243. message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.file` themselves."
  68244. }
  68245. };
  68246. exports.default = _default;
  68247. }
  68248. });
  68249. // node_modules/@babel/core/lib/config/validation/option-assertions.js
  68250. var require_option_assertions = __commonJS({
  68251. "node_modules/@babel/core/lib/config/validation/option-assertions.js"(exports) {
  68252. "use strict";
  68253. Object.defineProperty(exports, "__esModule", {
  68254. value: true
  68255. });
  68256. exports.access = access;
  68257. exports.assertArray = assertArray;
  68258. exports.assertAssumptions = assertAssumptions;
  68259. exports.assertBabelrcSearch = assertBabelrcSearch;
  68260. exports.assertBoolean = assertBoolean;
  68261. exports.assertCallerMetadata = assertCallerMetadata;
  68262. exports.assertCompact = assertCompact;
  68263. exports.assertConfigApplicableTest = assertConfigApplicableTest;
  68264. exports.assertConfigFileSearch = assertConfigFileSearch;
  68265. exports.assertFunction = assertFunction;
  68266. exports.assertIgnoreList = assertIgnoreList;
  68267. exports.assertInputSourceMap = assertInputSourceMap;
  68268. exports.assertObject = assertObject;
  68269. exports.assertPluginList = assertPluginList;
  68270. exports.assertRootMode = assertRootMode;
  68271. exports.assertSourceMaps = assertSourceMaps;
  68272. exports.assertSourceType = assertSourceType;
  68273. exports.assertString = assertString;
  68274. exports.assertTargets = assertTargets;
  68275. exports.msg = msg;
  68276. function _helperCompilationTargets() {
  68277. const data3 = require_lib19();
  68278. _helperCompilationTargets = function() {
  68279. return data3;
  68280. };
  68281. return data3;
  68282. }
  68283. var _options = require_options3();
  68284. function msg(loc) {
  68285. switch (loc.type) {
  68286. case "root":
  68287. return ``;
  68288. case "env":
  68289. return `${msg(loc.parent)}.env["${loc.name}"]`;
  68290. case "overrides":
  68291. return `${msg(loc.parent)}.overrides[${loc.index}]`;
  68292. case "option":
  68293. return `${msg(loc.parent)}.${loc.name}`;
  68294. case "access":
  68295. return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;
  68296. default:
  68297. throw new Error(`Assertion failure: Unknown type ${loc.type}`);
  68298. }
  68299. }
  68300. function access(loc, name2) {
  68301. return {
  68302. type: "access",
  68303. name: name2,
  68304. parent: loc
  68305. };
  68306. }
  68307. function assertRootMode(loc, value2) {
  68308. if (value2 !== void 0 && value2 !== "root" && value2 !== "upward" && value2 !== "upward-optional") {
  68309. throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`);
  68310. }
  68311. return value2;
  68312. }
  68313. function assertSourceMaps(loc, value2) {
  68314. if (value2 !== void 0 && typeof value2 !== "boolean" && value2 !== "inline" && value2 !== "both") {
  68315. throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`);
  68316. }
  68317. return value2;
  68318. }
  68319. function assertCompact(loc, value2) {
  68320. if (value2 !== void 0 && typeof value2 !== "boolean" && value2 !== "auto") {
  68321. throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`);
  68322. }
  68323. return value2;
  68324. }
  68325. function assertSourceType(loc, value2) {
  68326. if (value2 !== void 0 && value2 !== "module" && value2 !== "script" && value2 !== "unambiguous") {
  68327. throw new Error(`${msg(loc)} must be "module", "script", "unambiguous", or undefined`);
  68328. }
  68329. return value2;
  68330. }
  68331. function assertCallerMetadata(loc, value2) {
  68332. const obj = assertObject(loc, value2);
  68333. if (obj) {
  68334. if (typeof obj.name !== "string") {
  68335. throw new Error(`${msg(loc)} set but does not contain "name" property string`);
  68336. }
  68337. for (const prop of Object.keys(obj)) {
  68338. const propLoc = access(loc, prop);
  68339. const value3 = obj[prop];
  68340. if (value3 != null && typeof value3 !== "boolean" && typeof value3 !== "string" && typeof value3 !== "number") {
  68341. throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`);
  68342. }
  68343. }
  68344. }
  68345. return value2;
  68346. }
  68347. function assertInputSourceMap(loc, value2) {
  68348. if (value2 !== void 0 && typeof value2 !== "boolean" && (typeof value2 !== "object" || !value2)) {
  68349. throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);
  68350. }
  68351. return value2;
  68352. }
  68353. function assertString(loc, value2) {
  68354. if (value2 !== void 0 && typeof value2 !== "string") {
  68355. throw new Error(`${msg(loc)} must be a string, or undefined`);
  68356. }
  68357. return value2;
  68358. }
  68359. function assertFunction(loc, value2) {
  68360. if (value2 !== void 0 && typeof value2 !== "function") {
  68361. throw new Error(`${msg(loc)} must be a function, or undefined`);
  68362. }
  68363. return value2;
  68364. }
  68365. function assertBoolean(loc, value2) {
  68366. if (value2 !== void 0 && typeof value2 !== "boolean") {
  68367. throw new Error(`${msg(loc)} must be a boolean, or undefined`);
  68368. }
  68369. return value2;
  68370. }
  68371. function assertObject(loc, value2) {
  68372. if (value2 !== void 0 && (typeof value2 !== "object" || Array.isArray(value2) || !value2)) {
  68373. throw new Error(`${msg(loc)} must be an object, or undefined`);
  68374. }
  68375. return value2;
  68376. }
  68377. function assertArray(loc, value2) {
  68378. if (value2 != null && !Array.isArray(value2)) {
  68379. throw new Error(`${msg(loc)} must be an array, or undefined`);
  68380. }
  68381. return value2;
  68382. }
  68383. function assertIgnoreList(loc, value2) {
  68384. const arr = assertArray(loc, value2);
  68385. if (arr) {
  68386. arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));
  68387. }
  68388. return arr;
  68389. }
  68390. function assertIgnoreItem(loc, value2) {
  68391. if (typeof value2 !== "string" && typeof value2 !== "function" && !(value2 instanceof RegExp)) {
  68392. throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`);
  68393. }
  68394. return value2;
  68395. }
  68396. function assertConfigApplicableTest(loc, value2) {
  68397. if (value2 === void 0) {
  68398. return value2;
  68399. }
  68400. if (Array.isArray(value2)) {
  68401. value2.forEach((item, i) => {
  68402. if (!checkValidTest(item)) {
  68403. throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
  68404. }
  68405. });
  68406. } else if (!checkValidTest(value2)) {
  68407. throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`);
  68408. }
  68409. return value2;
  68410. }
  68411. function checkValidTest(value2) {
  68412. return typeof value2 === "string" || typeof value2 === "function" || value2 instanceof RegExp;
  68413. }
  68414. function assertConfigFileSearch(loc, value2) {
  68415. if (value2 !== void 0 && typeof value2 !== "boolean" && typeof value2 !== "string") {
  68416. throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, got ${JSON.stringify(value2)}`);
  68417. }
  68418. return value2;
  68419. }
  68420. function assertBabelrcSearch(loc, value2) {
  68421. if (value2 === void 0 || typeof value2 === "boolean") {
  68422. return value2;
  68423. }
  68424. if (Array.isArray(value2)) {
  68425. value2.forEach((item, i) => {
  68426. if (!checkValidTest(item)) {
  68427. throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
  68428. }
  68429. });
  68430. } else if (!checkValidTest(value2)) {
  68431. throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp or an array of those, got ${JSON.stringify(value2)}`);
  68432. }
  68433. return value2;
  68434. }
  68435. function assertPluginList(loc, value2) {
  68436. const arr = assertArray(loc, value2);
  68437. if (arr) {
  68438. arr.forEach((item, i) => assertPluginItem(access(loc, i), item));
  68439. }
  68440. return arr;
  68441. }
  68442. function assertPluginItem(loc, value2) {
  68443. if (Array.isArray(value2)) {
  68444. if (value2.length === 0) {
  68445. throw new Error(`${msg(loc)} must include an object`);
  68446. }
  68447. if (value2.length > 3) {
  68448. throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);
  68449. }
  68450. assertPluginTarget(access(loc, 0), value2[0]);
  68451. if (value2.length > 1) {
  68452. const opts = value2[1];
  68453. if (opts !== void 0 && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) {
  68454. throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`);
  68455. }
  68456. }
  68457. if (value2.length === 3) {
  68458. const name2 = value2[2];
  68459. if (name2 !== void 0 && typeof name2 !== "string") {
  68460. throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`);
  68461. }
  68462. }
  68463. } else {
  68464. assertPluginTarget(loc, value2);
  68465. }
  68466. return value2;
  68467. }
  68468. function assertPluginTarget(loc, value2) {
  68469. if ((typeof value2 !== "object" || !value2) && typeof value2 !== "string" && typeof value2 !== "function") {
  68470. throw new Error(`${msg(loc)} must be a string, object, function`);
  68471. }
  68472. return value2;
  68473. }
  68474. function assertTargets(loc, value2) {
  68475. if ((0, _helperCompilationTargets().isBrowsersQueryValid)(value2))
  68476. return value2;
  68477. if (typeof value2 !== "object" || !value2 || Array.isArray(value2)) {
  68478. throw new Error(`${msg(loc)} must be a string, an array of strings or an object`);
  68479. }
  68480. const browsersLoc = access(loc, "browsers");
  68481. const esmodulesLoc = access(loc, "esmodules");
  68482. assertBrowsersList(browsersLoc, value2.browsers);
  68483. assertBoolean(esmodulesLoc, value2.esmodules);
  68484. for (const key2 of Object.keys(value2)) {
  68485. const val = value2[key2];
  68486. const subLoc = access(loc, key2);
  68487. if (key2 === "esmodules")
  68488. assertBoolean(subLoc, val);
  68489. else if (key2 === "browsers")
  68490. assertBrowsersList(subLoc, val);
  68491. else if (!Object.hasOwnProperty.call(_helperCompilationTargets().TargetNames, key2)) {
  68492. const validTargets = Object.keys(_helperCompilationTargets().TargetNames).join(", ");
  68493. throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`);
  68494. } else
  68495. assertBrowserVersion(subLoc, val);
  68496. }
  68497. return value2;
  68498. }
  68499. function assertBrowsersList(loc, value2) {
  68500. if (value2 !== void 0 && !(0, _helperCompilationTargets().isBrowsersQueryValid)(value2)) {
  68501. throw new Error(`${msg(loc)} must be undefined, a string or an array of strings`);
  68502. }
  68503. }
  68504. function assertBrowserVersion(loc, value2) {
  68505. if (typeof value2 === "number" && Math.round(value2) === value2)
  68506. return;
  68507. if (typeof value2 === "string")
  68508. return;
  68509. throw new Error(`${msg(loc)} must be a string or an integer number`);
  68510. }
  68511. function assertAssumptions(loc, value2) {
  68512. if (value2 === void 0)
  68513. return;
  68514. if (typeof value2 !== "object" || value2 === null) {
  68515. throw new Error(`${msg(loc)} must be an object or undefined.`);
  68516. }
  68517. let root4 = loc;
  68518. do {
  68519. root4 = root4.parent;
  68520. } while (root4.type !== "root");
  68521. const inPreset = root4.source === "preset";
  68522. for (const name2 of Object.keys(value2)) {
  68523. const subLoc = access(loc, name2);
  68524. if (!_options.assumptionsNames.has(name2)) {
  68525. throw new Error(`${msg(subLoc)} is not a supported assumption.`);
  68526. }
  68527. if (typeof value2[name2] !== "boolean") {
  68528. throw new Error(`${msg(subLoc)} must be a boolean.`);
  68529. }
  68530. if (inPreset && value2[name2] === false) {
  68531. throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`);
  68532. }
  68533. }
  68534. return value2;
  68535. }
  68536. }
  68537. });
  68538. // node_modules/@babel/core/lib/config/validation/options.js
  68539. var require_options3 = __commonJS({
  68540. "node_modules/@babel/core/lib/config/validation/options.js"(exports) {
  68541. "use strict";
  68542. Object.defineProperty(exports, "__esModule", {
  68543. value: true
  68544. });
  68545. exports.assumptionsNames = void 0;
  68546. exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs;
  68547. exports.validate = validate;
  68548. var _removed = require_removed();
  68549. var _optionAssertions = require_option_assertions();
  68550. var _configError = require_config_error();
  68551. var ROOT_VALIDATORS = {
  68552. cwd: _optionAssertions.assertString,
  68553. root: _optionAssertions.assertString,
  68554. rootMode: _optionAssertions.assertRootMode,
  68555. configFile: _optionAssertions.assertConfigFileSearch,
  68556. caller: _optionAssertions.assertCallerMetadata,
  68557. filename: _optionAssertions.assertString,
  68558. filenameRelative: _optionAssertions.assertString,
  68559. code: _optionAssertions.assertBoolean,
  68560. ast: _optionAssertions.assertBoolean,
  68561. cloneInputAst: _optionAssertions.assertBoolean,
  68562. envName: _optionAssertions.assertString
  68563. };
  68564. var BABELRC_VALIDATORS = {
  68565. babelrc: _optionAssertions.assertBoolean,
  68566. babelrcRoots: _optionAssertions.assertBabelrcSearch
  68567. };
  68568. var NONPRESET_VALIDATORS = {
  68569. extends: _optionAssertions.assertString,
  68570. ignore: _optionAssertions.assertIgnoreList,
  68571. only: _optionAssertions.assertIgnoreList,
  68572. targets: _optionAssertions.assertTargets,
  68573. browserslistConfigFile: _optionAssertions.assertConfigFileSearch,
  68574. browserslistEnv: _optionAssertions.assertString
  68575. };
  68576. var COMMON_VALIDATORS = {
  68577. inputSourceMap: _optionAssertions.assertInputSourceMap,
  68578. presets: _optionAssertions.assertPluginList,
  68579. plugins: _optionAssertions.assertPluginList,
  68580. passPerPreset: _optionAssertions.assertBoolean,
  68581. assumptions: _optionAssertions.assertAssumptions,
  68582. env: assertEnvSet,
  68583. overrides: assertOverridesList,
  68584. test: _optionAssertions.assertConfigApplicableTest,
  68585. include: _optionAssertions.assertConfigApplicableTest,
  68586. exclude: _optionAssertions.assertConfigApplicableTest,
  68587. retainLines: _optionAssertions.assertBoolean,
  68588. comments: _optionAssertions.assertBoolean,
  68589. shouldPrintComment: _optionAssertions.assertFunction,
  68590. compact: _optionAssertions.assertCompact,
  68591. minified: _optionAssertions.assertBoolean,
  68592. auxiliaryCommentBefore: _optionAssertions.assertString,
  68593. auxiliaryCommentAfter: _optionAssertions.assertString,
  68594. sourceType: _optionAssertions.assertSourceType,
  68595. wrapPluginVisitorMethod: _optionAssertions.assertFunction,
  68596. highlightCode: _optionAssertions.assertBoolean,
  68597. sourceMaps: _optionAssertions.assertSourceMaps,
  68598. sourceMap: _optionAssertions.assertSourceMaps,
  68599. sourceFileName: _optionAssertions.assertString,
  68600. sourceRoot: _optionAssertions.assertString,
  68601. parserOpts: _optionAssertions.assertObject,
  68602. generatorOpts: _optionAssertions.assertObject
  68603. };
  68604. {
  68605. Object.assign(COMMON_VALIDATORS, {
  68606. getModuleId: _optionAssertions.assertFunction,
  68607. moduleRoot: _optionAssertions.assertString,
  68608. moduleIds: _optionAssertions.assertBoolean,
  68609. moduleId: _optionAssertions.assertString
  68610. });
  68611. }
  68612. var knownAssumptions = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "objectRestNoSymbols", "privateFieldsAsSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"];
  68613. var assumptionsNames = new Set(knownAssumptions);
  68614. exports.assumptionsNames = assumptionsNames;
  68615. function getSource(loc) {
  68616. return loc.type === "root" ? loc.source : getSource(loc.parent);
  68617. }
  68618. function validate(type, opts, filename) {
  68619. try {
  68620. return validateNested({
  68621. type: "root",
  68622. source: type
  68623. }, opts);
  68624. } catch (error) {
  68625. const configError = new _configError.default(error.message, filename);
  68626. if (error.code)
  68627. configError.code = error.code;
  68628. throw configError;
  68629. }
  68630. }
  68631. function validateNested(loc, opts) {
  68632. const type = getSource(loc);
  68633. assertNoDuplicateSourcemap(opts);
  68634. Object.keys(opts).forEach((key2) => {
  68635. const optLoc = {
  68636. type: "option",
  68637. name: key2,
  68638. parent: loc
  68639. };
  68640. if (type === "preset" && NONPRESET_VALIDATORS[key2]) {
  68641. throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in preset options`);
  68642. }
  68643. if (type !== "arguments" && ROOT_VALIDATORS[key2]) {
  68644. throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`);
  68645. }
  68646. if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key2]) {
  68647. if (type === "babelrcfile" || type === "extendsfile") {
  68648. throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, or babel.config.js/config file options`);
  68649. }
  68650. throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options, or babel.config.js/config file options`);
  68651. }
  68652. const validator = COMMON_VALIDATORS[key2] || NONPRESET_VALIDATORS[key2] || BABELRC_VALIDATORS[key2] || ROOT_VALIDATORS[key2] || throwUnknownError;
  68653. validator(optLoc, opts[key2]);
  68654. });
  68655. return opts;
  68656. }
  68657. function throwUnknownError(loc) {
  68658. const key2 = loc.name;
  68659. if (_removed.default[key2]) {
  68660. const {
  68661. message,
  68662. version: version3 = 5
  68663. } = _removed.default[key2];
  68664. throw new Error(`Using removed Babel ${version3} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`);
  68665. } else {
  68666. const unknownOptErr = new Error(`Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`);
  68667. unknownOptErr.code = "BABEL_UNKNOWN_OPTION";
  68668. throw unknownOptErr;
  68669. }
  68670. }
  68671. function has2(obj, key2) {
  68672. return Object.prototype.hasOwnProperty.call(obj, key2);
  68673. }
  68674. function assertNoDuplicateSourcemap(opts) {
  68675. if (has2(opts, "sourceMap") && has2(opts, "sourceMaps")) {
  68676. throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both");
  68677. }
  68678. }
  68679. function assertEnvSet(loc, value2) {
  68680. if (loc.parent.type === "env") {
  68681. throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside of another .env block`);
  68682. }
  68683. const parent = loc.parent;
  68684. const obj = (0, _optionAssertions.assertObject)(loc, value2);
  68685. if (obj) {
  68686. for (const envName of Object.keys(obj)) {
  68687. const env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]);
  68688. if (!env)
  68689. continue;
  68690. const envLoc = {
  68691. type: "env",
  68692. name: envName,
  68693. parent
  68694. };
  68695. validateNested(envLoc, env);
  68696. }
  68697. }
  68698. return obj;
  68699. }
  68700. function assertOverridesList(loc, value2) {
  68701. if (loc.parent.type === "env") {
  68702. throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .env block`);
  68703. }
  68704. if (loc.parent.type === "overrides") {
  68705. throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .overrides block`);
  68706. }
  68707. const parent = loc.parent;
  68708. const arr = (0, _optionAssertions.assertArray)(loc, value2);
  68709. if (arr) {
  68710. for (const [index2, item] of arr.entries()) {
  68711. const objLoc = (0, _optionAssertions.access)(loc, index2);
  68712. const env = (0, _optionAssertions.assertObject)(objLoc, item);
  68713. if (!env)
  68714. throw new Error(`${(0, _optionAssertions.msg)(objLoc)} must be an object`);
  68715. const overridesLoc = {
  68716. type: "overrides",
  68717. index: index2,
  68718. parent
  68719. };
  68720. validateNested(overridesLoc, env);
  68721. }
  68722. }
  68723. return arr;
  68724. }
  68725. function checkNoUnwrappedItemOptionPairs(items, index2, type, e) {
  68726. if (index2 === 0)
  68727. return;
  68728. const lastItem = items[index2 - 1];
  68729. const thisItem = items[index2];
  68730. if (lastItem.file && lastItem.options === void 0 && typeof thisItem.value === "object") {
  68731. e.message += `
  68732. - Maybe you meant to use
  68733. "${type}s": [
  68734. ["${lastItem.file.request}", ${JSON.stringify(thisItem.value, void 0, 2)}]
  68735. ]
  68736. To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;
  68737. }
  68738. }
  68739. }
  68740. });
  68741. // node_modules/@babel/core/lib/config/pattern-to-regex.js
  68742. var require_pattern_to_regex = __commonJS({
  68743. "node_modules/@babel/core/lib/config/pattern-to-regex.js"(exports) {
  68744. "use strict";
  68745. Object.defineProperty(exports, "__esModule", {
  68746. value: true
  68747. });
  68748. exports.default = pathToPattern;
  68749. function _path() {
  68750. const data3 = __require("path");
  68751. _path = function() {
  68752. return data3;
  68753. };
  68754. return data3;
  68755. }
  68756. var sep = `\\${_path().sep}`;
  68757. var endSep = `(?:${sep}|$)`;
  68758. var substitution = `[^${sep}]+`;
  68759. var starPat = `(?:${substitution}${sep})`;
  68760. var starPatLast = `(?:${substitution}${endSep})`;
  68761. var starStarPat = `${starPat}*?`;
  68762. var starStarPatLast = `${starPat}*?${starPatLast}?`;
  68763. function escapeRegExp(string3) {
  68764. return string3.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
  68765. }
  68766. function pathToPattern(pattern, dirname) {
  68767. const parts = _path().resolve(dirname, pattern).split(_path().sep);
  68768. return new RegExp(["^", ...parts.map((part, i) => {
  68769. const last = i === parts.length - 1;
  68770. if (part === "**")
  68771. return last ? starStarPatLast : starStarPat;
  68772. if (part === "*")
  68773. return last ? starPatLast : starPat;
  68774. if (part.indexOf("*.") === 0) {
  68775. return substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep);
  68776. }
  68777. return escapeRegExp(part) + (last ? endSep : sep);
  68778. })].join(""));
  68779. }
  68780. }
  68781. });
  68782. // node_modules/@babel/core/lib/config/printer.js
  68783. var require_printer2 = __commonJS({
  68784. "node_modules/@babel/core/lib/config/printer.js"(exports) {
  68785. "use strict";
  68786. Object.defineProperty(exports, "__esModule", {
  68787. value: true
  68788. });
  68789. exports.ConfigPrinter = exports.ChainFormatter = void 0;
  68790. function _gensync() {
  68791. const data3 = require_gensync();
  68792. _gensync = function() {
  68793. return data3;
  68794. };
  68795. return data3;
  68796. }
  68797. var ChainFormatter = {
  68798. Programmatic: 0,
  68799. Config: 1
  68800. };
  68801. exports.ChainFormatter = ChainFormatter;
  68802. var Formatter = {
  68803. title(type, callerName, filepath) {
  68804. let title = "";
  68805. if (type === ChainFormatter.Programmatic) {
  68806. title = "programmatic options";
  68807. if (callerName) {
  68808. title += " from " + callerName;
  68809. }
  68810. } else {
  68811. title = "config " + filepath;
  68812. }
  68813. return title;
  68814. },
  68815. loc(index2, envName) {
  68816. let loc = "";
  68817. if (index2 != null) {
  68818. loc += `.overrides[${index2}]`;
  68819. }
  68820. if (envName != null) {
  68821. loc += `.env["${envName}"]`;
  68822. }
  68823. return loc;
  68824. },
  68825. *optionsAndDescriptors(opt) {
  68826. const content3 = Object.assign({}, opt.options);
  68827. delete content3.overrides;
  68828. delete content3.env;
  68829. const pluginDescriptors = [...yield* opt.plugins()];
  68830. if (pluginDescriptors.length) {
  68831. content3.plugins = pluginDescriptors.map((d) => descriptorToConfig(d));
  68832. }
  68833. const presetDescriptors = [...yield* opt.presets()];
  68834. if (presetDescriptors.length) {
  68835. content3.presets = [...presetDescriptors].map((d) => descriptorToConfig(d));
  68836. }
  68837. return JSON.stringify(content3, void 0, 2);
  68838. }
  68839. };
  68840. function descriptorToConfig(d) {
  68841. var _d$file;
  68842. let name2 = (_d$file = d.file) == null ? void 0 : _d$file.request;
  68843. if (name2 == null) {
  68844. if (typeof d.value === "object") {
  68845. name2 = d.value;
  68846. } else if (typeof d.value === "function") {
  68847. name2 = `[Function: ${d.value.toString().slice(0, 50)} ... ]`;
  68848. }
  68849. }
  68850. if (name2 == null) {
  68851. name2 = "[Unknown]";
  68852. }
  68853. if (d.options === void 0) {
  68854. return name2;
  68855. } else if (d.name == null) {
  68856. return [name2, d.options];
  68857. } else {
  68858. return [name2, d.options, d.name];
  68859. }
  68860. }
  68861. var ConfigPrinter = class {
  68862. constructor() {
  68863. this._stack = [];
  68864. }
  68865. configure(enabled, type, {
  68866. callerName,
  68867. filepath
  68868. }) {
  68869. if (!enabled)
  68870. return () => {
  68871. };
  68872. return (content3, index2, envName) => {
  68873. this._stack.push({
  68874. type,
  68875. callerName,
  68876. filepath,
  68877. content: content3,
  68878. index: index2,
  68879. envName
  68880. });
  68881. };
  68882. }
  68883. static *format(config) {
  68884. let title = Formatter.title(config.type, config.callerName, config.filepath);
  68885. const loc = Formatter.loc(config.index, config.envName);
  68886. if (loc)
  68887. title += ` ${loc}`;
  68888. const content3 = yield* Formatter.optionsAndDescriptors(config.content);
  68889. return `${title}
  68890. ${content3}`;
  68891. }
  68892. *output() {
  68893. if (this._stack.length === 0)
  68894. return "";
  68895. const configs = yield* _gensync().all(this._stack.map((s) => ConfigPrinter.format(s)));
  68896. return configs.join("\n\n");
  68897. }
  68898. };
  68899. exports.ConfigPrinter = ConfigPrinter;
  68900. }
  68901. });
  68902. // node_modules/@babel/core/lib/config/config-chain.js
  68903. var require_config_chain = __commonJS({
  68904. "node_modules/@babel/core/lib/config/config-chain.js"(exports) {
  68905. "use strict";
  68906. Object.defineProperty(exports, "__esModule", {
  68907. value: true
  68908. });
  68909. exports.buildPresetChain = buildPresetChain;
  68910. exports.buildPresetChainWalker = void 0;
  68911. exports.buildRootChain = buildRootChain;
  68912. function _path() {
  68913. const data3 = __require("path");
  68914. _path = function() {
  68915. return data3;
  68916. };
  68917. return data3;
  68918. }
  68919. function _debug() {
  68920. const data3 = require_src();
  68921. _debug = function() {
  68922. return data3;
  68923. };
  68924. return data3;
  68925. }
  68926. var _options = require_options3();
  68927. var _patternToRegex = require_pattern_to_regex();
  68928. var _printer = require_printer2();
  68929. var _rewriteStackTrace = require_rewrite_stack_trace();
  68930. var _configError = require_config_error();
  68931. var _files = require_files();
  68932. var _caching = require_caching();
  68933. var _configDescriptors = require_config_descriptors();
  68934. var debug = _debug()("babel:config:config-chain");
  68935. function* buildPresetChain(arg, context) {
  68936. const chain = yield* buildPresetChainWalker(arg, context);
  68937. if (!chain)
  68938. return null;
  68939. return {
  68940. plugins: dedupDescriptors(chain.plugins),
  68941. presets: dedupDescriptors(chain.presets),
  68942. options: chain.options.map((o) => normalizeOptions(o)),
  68943. files: /* @__PURE__ */ new Set()
  68944. };
  68945. }
  68946. var buildPresetChainWalker = makeChainWalker({
  68947. root: (preset) => loadPresetDescriptors(preset),
  68948. env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),
  68949. overrides: (preset, index2) => loadPresetOverridesDescriptors(preset)(index2),
  68950. overridesEnv: (preset, index2, envName) => loadPresetOverridesEnvDescriptors(preset)(index2)(envName),
  68951. createLogger: () => () => {
  68952. }
  68953. });
  68954. exports.buildPresetChainWalker = buildPresetChainWalker;
  68955. var loadPresetDescriptors = (0, _caching.makeWeakCacheSync)((preset) => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors));
  68956. var loadPresetEnvDescriptors = (0, _caching.makeWeakCacheSync)((preset) => (0, _caching.makeStrongCacheSync)((envName) => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName)));
  68957. var loadPresetOverridesDescriptors = (0, _caching.makeWeakCacheSync)((preset) => (0, _caching.makeStrongCacheSync)((index2) => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index2)));
  68958. var loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)((preset) => (0, _caching.makeStrongCacheSync)((index2) => (0, _caching.makeStrongCacheSync)((envName) => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index2, envName))));
  68959. function* buildRootChain(opts, context) {
  68960. let configReport, babelRcReport;
  68961. const programmaticLogger = new _printer.ConfigPrinter();
  68962. const programmaticChain = yield* loadProgrammaticChain({
  68963. options: opts,
  68964. dirname: context.cwd
  68965. }, context, void 0, programmaticLogger);
  68966. if (!programmaticChain)
  68967. return null;
  68968. const programmaticReport = yield* programmaticLogger.output();
  68969. let configFile;
  68970. if (typeof opts.configFile === "string") {
  68971. configFile = yield* (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller);
  68972. } else if (opts.configFile !== false) {
  68973. configFile = yield* (0, _files.findRootConfig)(context.root, context.envName, context.caller);
  68974. }
  68975. let {
  68976. babelrc,
  68977. babelrcRoots
  68978. } = opts;
  68979. let babelrcRootsDirectory = context.cwd;
  68980. const configFileChain = emptyChain();
  68981. const configFileLogger = new _printer.ConfigPrinter();
  68982. if (configFile) {
  68983. const validatedFile = validateConfigFile(configFile);
  68984. const result = yield* loadFileChain(validatedFile, context, void 0, configFileLogger);
  68985. if (!result)
  68986. return null;
  68987. configReport = yield* configFileLogger.output();
  68988. if (babelrc === void 0) {
  68989. babelrc = validatedFile.options.babelrc;
  68990. }
  68991. if (babelrcRoots === void 0) {
  68992. babelrcRootsDirectory = validatedFile.dirname;
  68993. babelrcRoots = validatedFile.options.babelrcRoots;
  68994. }
  68995. mergeChain(configFileChain, result);
  68996. }
  68997. let ignoreFile, babelrcFile;
  68998. let isIgnored = false;
  68999. const fileChain = emptyChain();
  69000. if ((babelrc === true || babelrc === void 0) && typeof context.filename === "string") {
  69001. const pkgData = yield* (0, _files.findPackageData)(context.filename);
  69002. if (pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) {
  69003. ({
  69004. ignore: ignoreFile,
  69005. config: babelrcFile
  69006. } = yield* (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller));
  69007. if (ignoreFile) {
  69008. fileChain.files.add(ignoreFile.filepath);
  69009. }
  69010. if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) {
  69011. isIgnored = true;
  69012. }
  69013. if (babelrcFile && !isIgnored) {
  69014. const validatedFile = validateBabelrcFile(babelrcFile);
  69015. const babelrcLogger = new _printer.ConfigPrinter();
  69016. const result = yield* loadFileChain(validatedFile, context, void 0, babelrcLogger);
  69017. if (!result) {
  69018. isIgnored = true;
  69019. } else {
  69020. babelRcReport = yield* babelrcLogger.output();
  69021. mergeChain(fileChain, result);
  69022. }
  69023. }
  69024. if (babelrcFile && isIgnored) {
  69025. fileChain.files.add(babelrcFile.filepath);
  69026. }
  69027. }
  69028. }
  69029. if (context.showConfig) {
  69030. console.log(`Babel configs on "${context.filename}" (ascending priority):
  69031. ` + [configReport, babelRcReport, programmaticReport].filter((x) => !!x).join("\n\n") + "\n-----End Babel configs-----");
  69032. }
  69033. const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain);
  69034. return {
  69035. plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),
  69036. presets: isIgnored ? [] : dedupDescriptors(chain.presets),
  69037. options: isIgnored ? [] : chain.options.map((o) => normalizeOptions(o)),
  69038. fileHandling: isIgnored ? "ignored" : "transpile",
  69039. ignore: ignoreFile || void 0,
  69040. babelrc: babelrcFile || void 0,
  69041. config: configFile || void 0,
  69042. files: chain.files
  69043. };
  69044. }
  69045. function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) {
  69046. if (typeof babelrcRoots === "boolean")
  69047. return babelrcRoots;
  69048. const absoluteRoot = context.root;
  69049. if (babelrcRoots === void 0) {
  69050. return pkgData.directories.indexOf(absoluteRoot) !== -1;
  69051. }
  69052. let babelrcPatterns = babelrcRoots;
  69053. if (!Array.isArray(babelrcPatterns)) {
  69054. babelrcPatterns = [babelrcPatterns];
  69055. }
  69056. babelrcPatterns = babelrcPatterns.map((pat) => {
  69057. return typeof pat === "string" ? _path().resolve(babelrcRootsDirectory, pat) : pat;
  69058. });
  69059. if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {
  69060. return pkgData.directories.indexOf(absoluteRoot) !== -1;
  69061. }
  69062. return babelrcPatterns.some((pat) => {
  69063. if (typeof pat === "string") {
  69064. pat = (0, _patternToRegex.default)(pat, babelrcRootsDirectory);
  69065. }
  69066. return pkgData.directories.some((directory) => {
  69067. return matchPattern(pat, babelrcRootsDirectory, directory, context);
  69068. });
  69069. });
  69070. }
  69071. var validateConfigFile = (0, _caching.makeWeakCacheSync)((file) => ({
  69072. filepath: file.filepath,
  69073. dirname: file.dirname,
  69074. options: (0, _options.validate)("configfile", file.options, file.filepath)
  69075. }));
  69076. var validateBabelrcFile = (0, _caching.makeWeakCacheSync)((file) => ({
  69077. filepath: file.filepath,
  69078. dirname: file.dirname,
  69079. options: (0, _options.validate)("babelrcfile", file.options, file.filepath)
  69080. }));
  69081. var validateExtendFile = (0, _caching.makeWeakCacheSync)((file) => ({
  69082. filepath: file.filepath,
  69083. dirname: file.dirname,
  69084. options: (0, _options.validate)("extendsfile", file.options, file.filepath)
  69085. }));
  69086. var loadProgrammaticChain = makeChainWalker({
  69087. root: (input) => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors),
  69088. env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName),
  69089. overrides: (input, index2) => buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index2),
  69090. overridesEnv: (input, index2, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index2, envName),
  69091. createLogger: (input, context, baseLogger) => buildProgrammaticLogger(input, context, baseLogger)
  69092. });
  69093. var loadFileChainWalker = makeChainWalker({
  69094. root: (file) => loadFileDescriptors(file),
  69095. env: (file, envName) => loadFileEnvDescriptors(file)(envName),
  69096. overrides: (file, index2) => loadFileOverridesDescriptors(file)(index2),
  69097. overridesEnv: (file, index2, envName) => loadFileOverridesEnvDescriptors(file)(index2)(envName),
  69098. createLogger: (file, context, baseLogger) => buildFileLogger(file.filepath, context, baseLogger)
  69099. });
  69100. function* loadFileChain(input, context, files, baseLogger) {
  69101. const chain = yield* loadFileChainWalker(input, context, files, baseLogger);
  69102. if (chain) {
  69103. chain.files.add(input.filepath);
  69104. }
  69105. return chain;
  69106. }
  69107. var loadFileDescriptors = (0, _caching.makeWeakCacheSync)((file) => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors));
  69108. var loadFileEnvDescriptors = (0, _caching.makeWeakCacheSync)((file) => (0, _caching.makeStrongCacheSync)((envName) => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName)));
  69109. var loadFileOverridesDescriptors = (0, _caching.makeWeakCacheSync)((file) => (0, _caching.makeStrongCacheSync)((index2) => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index2)));
  69110. var loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)((file) => (0, _caching.makeStrongCacheSync)((index2) => (0, _caching.makeStrongCacheSync)((envName) => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index2, envName))));
  69111. function buildFileLogger(filepath, context, baseLogger) {
  69112. if (!baseLogger) {
  69113. return () => {
  69114. };
  69115. }
  69116. return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Config, {
  69117. filepath
  69118. });
  69119. }
  69120. function buildRootDescriptors({
  69121. dirname,
  69122. options
  69123. }, alias, descriptors) {
  69124. return descriptors(dirname, options, alias);
  69125. }
  69126. function buildProgrammaticLogger(_, context, baseLogger) {
  69127. var _context$caller;
  69128. if (!baseLogger) {
  69129. return () => {
  69130. };
  69131. }
  69132. return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Programmatic, {
  69133. callerName: (_context$caller = context.caller) == null ? void 0 : _context$caller.name
  69134. });
  69135. }
  69136. function buildEnvDescriptors({
  69137. dirname,
  69138. options
  69139. }, alias, descriptors, envName) {
  69140. const opts = options.env && options.env[envName];
  69141. return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null;
  69142. }
  69143. function buildOverrideDescriptors({
  69144. dirname,
  69145. options
  69146. }, alias, descriptors, index2) {
  69147. const opts = options.overrides && options.overrides[index2];
  69148. if (!opts)
  69149. throw new Error("Assertion failure - missing override");
  69150. return descriptors(dirname, opts, `${alias}.overrides[${index2}]`);
  69151. }
  69152. function buildOverrideEnvDescriptors({
  69153. dirname,
  69154. options
  69155. }, alias, descriptors, index2, envName) {
  69156. const override = options.overrides && options.overrides[index2];
  69157. if (!override)
  69158. throw new Error("Assertion failure - missing override");
  69159. const opts = override.env && override.env[envName];
  69160. return opts ? descriptors(dirname, opts, `${alias}.overrides[${index2}].env["${envName}"]`) : null;
  69161. }
  69162. function makeChainWalker({
  69163. root: root4,
  69164. env,
  69165. overrides,
  69166. overridesEnv,
  69167. createLogger
  69168. }) {
  69169. return function* chainWalker(input, context, files = /* @__PURE__ */ new Set(), baseLogger) {
  69170. const {
  69171. dirname
  69172. } = input;
  69173. const flattenedConfigs = [];
  69174. const rootOpts = root4(input);
  69175. if (configIsApplicable(rootOpts, dirname, context, input.filepath)) {
  69176. flattenedConfigs.push({
  69177. config: rootOpts,
  69178. envName: void 0,
  69179. index: void 0
  69180. });
  69181. const envOpts = env(input, context.envName);
  69182. if (envOpts && configIsApplicable(envOpts, dirname, context, input.filepath)) {
  69183. flattenedConfigs.push({
  69184. config: envOpts,
  69185. envName: context.envName,
  69186. index: void 0
  69187. });
  69188. }
  69189. (rootOpts.options.overrides || []).forEach((_, index2) => {
  69190. const overrideOps = overrides(input, index2);
  69191. if (configIsApplicable(overrideOps, dirname, context, input.filepath)) {
  69192. flattenedConfigs.push({
  69193. config: overrideOps,
  69194. index: index2,
  69195. envName: void 0
  69196. });
  69197. const overrideEnvOpts = overridesEnv(input, index2, context.envName);
  69198. if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context, input.filepath)) {
  69199. flattenedConfigs.push({
  69200. config: overrideEnvOpts,
  69201. index: index2,
  69202. envName: context.envName
  69203. });
  69204. }
  69205. }
  69206. });
  69207. }
  69208. if (flattenedConfigs.some(({
  69209. config: {
  69210. options: {
  69211. ignore: ignore3,
  69212. only
  69213. }
  69214. }
  69215. }) => shouldIgnore(context, ignore3, only, dirname))) {
  69216. return null;
  69217. }
  69218. const chain = emptyChain();
  69219. const logger = createLogger(input, context, baseLogger);
  69220. for (const {
  69221. config,
  69222. index: index2,
  69223. envName
  69224. } of flattenedConfigs) {
  69225. if (!(yield* mergeExtendsChain(chain, config.options, dirname, context, files, baseLogger))) {
  69226. return null;
  69227. }
  69228. logger(config, index2, envName);
  69229. yield* mergeChainOpts(chain, config);
  69230. }
  69231. return chain;
  69232. };
  69233. }
  69234. function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) {
  69235. if (opts.extends === void 0)
  69236. return true;
  69237. const file = yield* (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller);
  69238. if (files.has(file)) {
  69239. throw new Error(`Configuration cycle detected loading ${file.filepath}.
  69240. File already loaded following the config chain:
  69241. ` + Array.from(files, (file2) => ` - ${file2.filepath}`).join("\n"));
  69242. }
  69243. files.add(file);
  69244. const fileChain = yield* loadFileChain(validateExtendFile(file), context, files, baseLogger);
  69245. files.delete(file);
  69246. if (!fileChain)
  69247. return false;
  69248. mergeChain(chain, fileChain);
  69249. return true;
  69250. }
  69251. function mergeChain(target, source2) {
  69252. target.options.push(...source2.options);
  69253. target.plugins.push(...source2.plugins);
  69254. target.presets.push(...source2.presets);
  69255. for (const file of source2.files) {
  69256. target.files.add(file);
  69257. }
  69258. return target;
  69259. }
  69260. function* mergeChainOpts(target, {
  69261. options,
  69262. plugins,
  69263. presets
  69264. }) {
  69265. target.options.push(options);
  69266. target.plugins.push(...yield* plugins());
  69267. target.presets.push(...yield* presets());
  69268. return target;
  69269. }
  69270. function emptyChain() {
  69271. return {
  69272. options: [],
  69273. presets: [],
  69274. plugins: [],
  69275. files: /* @__PURE__ */ new Set()
  69276. };
  69277. }
  69278. function normalizeOptions(opts) {
  69279. const options = Object.assign({}, opts);
  69280. delete options.extends;
  69281. delete options.env;
  69282. delete options.overrides;
  69283. delete options.plugins;
  69284. delete options.presets;
  69285. delete options.passPerPreset;
  69286. delete options.ignore;
  69287. delete options.only;
  69288. delete options.test;
  69289. delete options.include;
  69290. delete options.exclude;
  69291. if (Object.prototype.hasOwnProperty.call(options, "sourceMap")) {
  69292. options.sourceMaps = options.sourceMap;
  69293. delete options.sourceMap;
  69294. }
  69295. return options;
  69296. }
  69297. function dedupDescriptors(items) {
  69298. const map = /* @__PURE__ */ new Map();
  69299. const descriptors = [];
  69300. for (const item of items) {
  69301. if (typeof item.value === "function") {
  69302. const fnKey = item.value;
  69303. let nameMap = map.get(fnKey);
  69304. if (!nameMap) {
  69305. nameMap = /* @__PURE__ */ new Map();
  69306. map.set(fnKey, nameMap);
  69307. }
  69308. let desc = nameMap.get(item.name);
  69309. if (!desc) {
  69310. desc = {
  69311. value: item
  69312. };
  69313. descriptors.push(desc);
  69314. if (!item.ownPass)
  69315. nameMap.set(item.name, desc);
  69316. } else {
  69317. desc.value = item;
  69318. }
  69319. } else {
  69320. descriptors.push({
  69321. value: item
  69322. });
  69323. }
  69324. }
  69325. return descriptors.reduce((acc, desc) => {
  69326. acc.push(desc.value);
  69327. return acc;
  69328. }, []);
  69329. }
  69330. function configIsApplicable({
  69331. options
  69332. }, dirname, context, configName) {
  69333. return (options.test === void 0 || configFieldIsApplicable(context, options.test, dirname, configName)) && (options.include === void 0 || configFieldIsApplicable(context, options.include, dirname, configName)) && (options.exclude === void 0 || !configFieldIsApplicable(context, options.exclude, dirname, configName));
  69334. }
  69335. function configFieldIsApplicable(context, test, dirname, configName) {
  69336. const patterns = Array.isArray(test) ? test : [test];
  69337. return matchesPatterns(context, patterns, dirname, configName);
  69338. }
  69339. function ignoreListReplacer(_key, value2) {
  69340. if (value2 instanceof RegExp) {
  69341. return String(value2);
  69342. }
  69343. return value2;
  69344. }
  69345. function shouldIgnore(context, ignore3, only, dirname) {
  69346. if (ignore3 && matchesPatterns(context, ignore3, dirname)) {
  69347. var _context$filename;
  69348. const message = `No config is applied to "${(_context$filename = context.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore3, ignoreListReplacer)}\` from "${dirname}"`;
  69349. debug(message);
  69350. if (context.showConfig) {
  69351. console.log(message);
  69352. }
  69353. return true;
  69354. }
  69355. if (only && !matchesPatterns(context, only, dirname)) {
  69356. var _context$filename2;
  69357. const message = `No config is applied to "${(_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only, ignoreListReplacer)}\` from "${dirname}"`;
  69358. debug(message);
  69359. if (context.showConfig) {
  69360. console.log(message);
  69361. }
  69362. return true;
  69363. }
  69364. return false;
  69365. }
  69366. function matchesPatterns(context, patterns, dirname, configName) {
  69367. return patterns.some((pattern) => matchPattern(pattern, dirname, context.filename, context, configName));
  69368. }
  69369. function matchPattern(pattern, dirname, pathToTest, context, configName) {
  69370. if (typeof pattern === "function") {
  69371. return !!(0, _rewriteStackTrace.endHiddenCallStack)(pattern)(pathToTest, {
  69372. dirname,
  69373. envName: context.envName,
  69374. caller: context.caller
  69375. });
  69376. }
  69377. if (typeof pathToTest !== "string") {
  69378. throw new _configError.default(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`, configName);
  69379. }
  69380. if (typeof pattern === "string") {
  69381. pattern = (0, _patternToRegex.default)(pattern, dirname);
  69382. }
  69383. return pattern.test(pathToTest);
  69384. }
  69385. }
  69386. });
  69387. // node_modules/@babel/core/lib/config/validation/plugins.js
  69388. var require_plugins3 = __commonJS({
  69389. "node_modules/@babel/core/lib/config/validation/plugins.js"(exports) {
  69390. "use strict";
  69391. Object.defineProperty(exports, "__esModule", {
  69392. value: true
  69393. });
  69394. exports.validatePluginObject = validatePluginObject;
  69395. var _optionAssertions = require_option_assertions();
  69396. var VALIDATORS = {
  69397. name: _optionAssertions.assertString,
  69398. manipulateOptions: _optionAssertions.assertFunction,
  69399. pre: _optionAssertions.assertFunction,
  69400. post: _optionAssertions.assertFunction,
  69401. inherits: _optionAssertions.assertFunction,
  69402. visitor: assertVisitorMap,
  69403. parserOverride: _optionAssertions.assertFunction,
  69404. generatorOverride: _optionAssertions.assertFunction
  69405. };
  69406. function assertVisitorMap(loc, value2) {
  69407. const obj = (0, _optionAssertions.assertObject)(loc, value2);
  69408. if (obj) {
  69409. Object.keys(obj).forEach((prop) => assertVisitorHandler(prop, obj[prop]));
  69410. if (obj.enter || obj.exit) {
  69411. throw new Error(`${(0, _optionAssertions.msg)(loc)} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`);
  69412. }
  69413. }
  69414. return obj;
  69415. }
  69416. function assertVisitorHandler(key2, value2) {
  69417. if (value2 && typeof value2 === "object") {
  69418. Object.keys(value2).forEach((handler) => {
  69419. if (handler !== "enter" && handler !== "exit") {
  69420. throw new Error(`.visitor["${key2}"] may only have .enter and/or .exit handlers.`);
  69421. }
  69422. });
  69423. } else if (typeof value2 !== "function") {
  69424. throw new Error(`.visitor["${key2}"] must be a function`);
  69425. }
  69426. return value2;
  69427. }
  69428. function validatePluginObject(obj) {
  69429. const rootPath = {
  69430. type: "root",
  69431. source: "plugin"
  69432. };
  69433. Object.keys(obj).forEach((key2) => {
  69434. const validator = VALIDATORS[key2];
  69435. if (validator) {
  69436. const optLoc = {
  69437. type: "option",
  69438. name: key2,
  69439. parent: rootPath
  69440. };
  69441. validator(optLoc, obj[key2]);
  69442. } else {
  69443. const invalidPluginPropertyError = new Error(`.${key2} is not a valid Plugin property`);
  69444. invalidPluginPropertyError.code = "BABEL_UNKNOWN_PLUGIN_PROPERTY";
  69445. throw invalidPluginPropertyError;
  69446. }
  69447. });
  69448. return obj;
  69449. }
  69450. }
  69451. });
  69452. // node_modules/@babel/core/lib/config/helpers/environment.js
  69453. var require_environment = __commonJS({
  69454. "node_modules/@babel/core/lib/config/helpers/environment.js"(exports) {
  69455. "use strict";
  69456. Object.defineProperty(exports, "__esModule", {
  69457. value: true
  69458. });
  69459. exports.getEnv = getEnv;
  69460. function getEnv(defaultValue = "development") {
  69461. return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
  69462. }
  69463. }
  69464. });
  69465. // node_modules/@babel/core/lib/config/partial.js
  69466. var require_partial = __commonJS({
  69467. "node_modules/@babel/core/lib/config/partial.js"(exports) {
  69468. "use strict";
  69469. Object.defineProperty(exports, "__esModule", {
  69470. value: true
  69471. });
  69472. exports.default = loadPrivatePartialConfig;
  69473. exports.loadPartialConfig = void 0;
  69474. function _path() {
  69475. const data3 = __require("path");
  69476. _path = function() {
  69477. return data3;
  69478. };
  69479. return data3;
  69480. }
  69481. function _gensync() {
  69482. const data3 = require_gensync();
  69483. _gensync = function() {
  69484. return data3;
  69485. };
  69486. return data3;
  69487. }
  69488. var _plugin = require_plugin();
  69489. var _util = require_util2();
  69490. var _item = require_item();
  69491. var _configChain = require_config_chain();
  69492. var _environment = require_environment();
  69493. var _options = require_options3();
  69494. var _files = require_files();
  69495. var _resolveTargets = require_resolve_targets();
  69496. var _excluded = ["showIgnoredFiles"];
  69497. function _objectWithoutPropertiesLoose(source2, excluded) {
  69498. if (source2 == null)
  69499. return {};
  69500. var target = {};
  69501. var sourceKeys = Object.keys(source2);
  69502. var key2, i;
  69503. for (i = 0; i < sourceKeys.length; i++) {
  69504. key2 = sourceKeys[i];
  69505. if (excluded.indexOf(key2) >= 0)
  69506. continue;
  69507. target[key2] = source2[key2];
  69508. }
  69509. return target;
  69510. }
  69511. function resolveRootMode(rootDir, rootMode) {
  69512. switch (rootMode) {
  69513. case "root":
  69514. return rootDir;
  69515. case "upward-optional": {
  69516. const upwardRootDir = (0, _files.findConfigUpwards)(rootDir);
  69517. return upwardRootDir === null ? rootDir : upwardRootDir;
  69518. }
  69519. case "upward": {
  69520. const upwardRootDir = (0, _files.findConfigUpwards)(rootDir);
  69521. if (upwardRootDir !== null)
  69522. return upwardRootDir;
  69523. throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not be found when searching upward from "${rootDir}".
  69524. One of the following config files must be in the directory tree: "${_files.ROOT_CONFIG_FILENAMES.join(", ")}".`), {
  69525. code: "BABEL_ROOT_NOT_FOUND",
  69526. dirname: rootDir
  69527. });
  69528. }
  69529. default:
  69530. throw new Error(`Assertion failure - unknown rootMode value.`);
  69531. }
  69532. }
  69533. function* loadPrivatePartialConfig(inputOpts) {
  69534. if (inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts))) {
  69535. throw new Error("Babel options must be an object, null, or undefined");
  69536. }
  69537. const args = inputOpts ? (0, _options.validate)("arguments", inputOpts) : {};
  69538. const {
  69539. envName = (0, _environment.getEnv)(),
  69540. cwd = ".",
  69541. root: rootDir = ".",
  69542. rootMode = "root",
  69543. caller,
  69544. cloneInputAst = true
  69545. } = args;
  69546. const absoluteCwd = _path().resolve(cwd);
  69547. const absoluteRootDir = resolveRootMode(_path().resolve(absoluteCwd, rootDir), rootMode);
  69548. const filename = typeof args.filename === "string" ? _path().resolve(cwd, args.filename) : void 0;
  69549. const showConfigPath = yield* (0, _files.resolveShowConfigPath)(absoluteCwd);
  69550. const context = {
  69551. filename,
  69552. cwd: absoluteCwd,
  69553. root: absoluteRootDir,
  69554. envName,
  69555. caller,
  69556. showConfig: showConfigPath === filename
  69557. };
  69558. const configChain = yield* (0, _configChain.buildRootChain)(args, context);
  69559. if (!configChain)
  69560. return null;
  69561. const merged = {
  69562. assumptions: {}
  69563. };
  69564. configChain.options.forEach((opts) => {
  69565. (0, _util.mergeOptions)(merged, opts);
  69566. });
  69567. const options = Object.assign({}, merged, {
  69568. targets: (0, _resolveTargets.resolveTargets)(merged, absoluteRootDir),
  69569. cloneInputAst,
  69570. babelrc: false,
  69571. configFile: false,
  69572. browserslistConfigFile: false,
  69573. passPerPreset: false,
  69574. envName: context.envName,
  69575. cwd: context.cwd,
  69576. root: context.root,
  69577. rootMode: "root",
  69578. filename: typeof context.filename === "string" ? context.filename : void 0,
  69579. plugins: configChain.plugins.map((descriptor) => (0, _item.createItemFromDescriptor)(descriptor)),
  69580. presets: configChain.presets.map((descriptor) => (0, _item.createItemFromDescriptor)(descriptor))
  69581. });
  69582. return {
  69583. options,
  69584. context,
  69585. fileHandling: configChain.fileHandling,
  69586. ignore: configChain.ignore,
  69587. babelrc: configChain.babelrc,
  69588. config: configChain.config,
  69589. files: configChain.files
  69590. };
  69591. }
  69592. var loadPartialConfig = _gensync()(function* (opts) {
  69593. let showIgnoredFiles = false;
  69594. if (typeof opts === "object" && opts !== null && !Array.isArray(opts)) {
  69595. var _opts = opts;
  69596. ({
  69597. showIgnoredFiles
  69598. } = _opts);
  69599. opts = _objectWithoutPropertiesLoose(_opts, _excluded);
  69600. _opts;
  69601. }
  69602. const result = yield* loadPrivatePartialConfig(opts);
  69603. if (!result)
  69604. return null;
  69605. const {
  69606. options,
  69607. babelrc,
  69608. ignore: ignore3,
  69609. config,
  69610. fileHandling,
  69611. files
  69612. } = result;
  69613. if (fileHandling === "ignored" && !showIgnoredFiles) {
  69614. return null;
  69615. }
  69616. (options.plugins || []).forEach((item) => {
  69617. if (item.value instanceof _plugin.default) {
  69618. throw new Error("Passing cached plugin instances is not supported in babel.loadPartialConfig()");
  69619. }
  69620. });
  69621. return new PartialConfig(options, babelrc ? babelrc.filepath : void 0, ignore3 ? ignore3.filepath : void 0, config ? config.filepath : void 0, fileHandling, files);
  69622. });
  69623. exports.loadPartialConfig = loadPartialConfig;
  69624. var PartialConfig = class {
  69625. constructor(options, babelrc, ignore3, config, fileHandling, files) {
  69626. this.options = void 0;
  69627. this.babelrc = void 0;
  69628. this.babelignore = void 0;
  69629. this.config = void 0;
  69630. this.fileHandling = void 0;
  69631. this.files = void 0;
  69632. this.options = options;
  69633. this.babelignore = ignore3;
  69634. this.babelrc = babelrc;
  69635. this.config = config;
  69636. this.fileHandling = fileHandling;
  69637. this.files = files;
  69638. Object.freeze(this);
  69639. }
  69640. hasFilesystemConfig() {
  69641. return this.babelrc !== void 0 || this.config !== void 0;
  69642. }
  69643. };
  69644. Object.freeze(PartialConfig.prototype);
  69645. }
  69646. });
  69647. // node_modules/@babel/core/lib/config/full.js
  69648. var require_full = __commonJS({
  69649. "node_modules/@babel/core/lib/config/full.js"(exports) {
  69650. "use strict";
  69651. Object.defineProperty(exports, "__esModule", {
  69652. value: true
  69653. });
  69654. exports.default = void 0;
  69655. function _gensync() {
  69656. const data3 = require_gensync();
  69657. _gensync = function() {
  69658. return data3;
  69659. };
  69660. return data3;
  69661. }
  69662. var _async = require_async();
  69663. var _util = require_util2();
  69664. var context = require_lib32();
  69665. var _plugin = require_plugin();
  69666. var _item = require_item();
  69667. var _configChain = require_config_chain();
  69668. var _deepArray = require_deep_array();
  69669. function _traverse() {
  69670. const data3 = require_lib13();
  69671. _traverse = function() {
  69672. return data3;
  69673. };
  69674. return data3;
  69675. }
  69676. var _caching = require_caching();
  69677. var _options = require_options3();
  69678. var _plugins = require_plugins3();
  69679. var _configApi = require_config_api();
  69680. var _partial = require_partial();
  69681. var _configError = require_config_error();
  69682. var _default = _gensync()(function* loadFullConfig(inputOpts) {
  69683. var _opts$assumptions;
  69684. const result = yield* (0, _partial.default)(inputOpts);
  69685. if (!result) {
  69686. return null;
  69687. }
  69688. const {
  69689. options,
  69690. context: context2,
  69691. fileHandling
  69692. } = result;
  69693. if (fileHandling === "ignored") {
  69694. return null;
  69695. }
  69696. const optionDefaults = {};
  69697. const {
  69698. plugins,
  69699. presets
  69700. } = options;
  69701. if (!plugins || !presets) {
  69702. throw new Error("Assertion failure - plugins and presets exist");
  69703. }
  69704. const presetContext = Object.assign({}, context2, {
  69705. targets: options.targets
  69706. });
  69707. const toDescriptor = (item) => {
  69708. const desc = (0, _item.getItemDescriptor)(item);
  69709. if (!desc) {
  69710. throw new Error("Assertion failure - must be config item");
  69711. }
  69712. return desc;
  69713. };
  69714. const presetsDescriptors = presets.map(toDescriptor);
  69715. const initialPluginsDescriptors = plugins.map(toDescriptor);
  69716. const pluginDescriptorsByPass = [[]];
  69717. const passes = [];
  69718. const externalDependencies = [];
  69719. const ignored = yield* enhanceError(context2, function* recursePresetDescriptors(rawPresets, pluginDescriptorsPass) {
  69720. const presets2 = [];
  69721. for (let i = 0; i < rawPresets.length; i++) {
  69722. const descriptor = rawPresets[i];
  69723. if (descriptor.options !== false) {
  69724. try {
  69725. var preset = yield* loadPresetDescriptor(descriptor, presetContext);
  69726. } catch (e) {
  69727. if (e.code === "BABEL_UNKNOWN_OPTION") {
  69728. (0, _options.checkNoUnwrappedItemOptionPairs)(rawPresets, i, "preset", e);
  69729. }
  69730. throw e;
  69731. }
  69732. externalDependencies.push(preset.externalDependencies);
  69733. if (descriptor.ownPass) {
  69734. presets2.push({
  69735. preset: preset.chain,
  69736. pass: []
  69737. });
  69738. } else {
  69739. presets2.unshift({
  69740. preset: preset.chain,
  69741. pass: pluginDescriptorsPass
  69742. });
  69743. }
  69744. }
  69745. }
  69746. if (presets2.length > 0) {
  69747. pluginDescriptorsByPass.splice(1, 0, ...presets2.map((o) => o.pass).filter((p) => p !== pluginDescriptorsPass));
  69748. for (const {
  69749. preset: preset2,
  69750. pass
  69751. } of presets2) {
  69752. if (!preset2)
  69753. return true;
  69754. pass.push(...preset2.plugins);
  69755. const ignored2 = yield* recursePresetDescriptors(preset2.presets, pass);
  69756. if (ignored2)
  69757. return true;
  69758. preset2.options.forEach((opts2) => {
  69759. (0, _util.mergeOptions)(optionDefaults, opts2);
  69760. });
  69761. }
  69762. }
  69763. })(presetsDescriptors, pluginDescriptorsByPass[0]);
  69764. if (ignored)
  69765. return null;
  69766. const opts = optionDefaults;
  69767. (0, _util.mergeOptions)(opts, options);
  69768. const pluginContext = Object.assign({}, presetContext, {
  69769. assumptions: (_opts$assumptions = opts.assumptions) != null ? _opts$assumptions : {}
  69770. });
  69771. yield* enhanceError(context2, function* loadPluginDescriptors() {
  69772. pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);
  69773. for (const descs of pluginDescriptorsByPass) {
  69774. const pass = [];
  69775. passes.push(pass);
  69776. for (let i = 0; i < descs.length; i++) {
  69777. const descriptor = descs[i];
  69778. if (descriptor.options !== false) {
  69779. try {
  69780. var plugin2 = yield* loadPluginDescriptor(descriptor, pluginContext);
  69781. } catch (e) {
  69782. if (e.code === "BABEL_UNKNOWN_PLUGIN_PROPERTY") {
  69783. (0, _options.checkNoUnwrappedItemOptionPairs)(descs, i, "plugin", e);
  69784. }
  69785. throw e;
  69786. }
  69787. pass.push(plugin2);
  69788. externalDependencies.push(plugin2.externalDependencies);
  69789. }
  69790. }
  69791. }
  69792. })();
  69793. opts.plugins = passes[0];
  69794. opts.presets = passes.slice(1).filter((plugins2) => plugins2.length > 0).map((plugins2) => ({
  69795. plugins: plugins2
  69796. }));
  69797. opts.passPerPreset = opts.presets.length > 0;
  69798. return {
  69799. options: opts,
  69800. passes,
  69801. externalDependencies: (0, _deepArray.finalize)(externalDependencies)
  69802. };
  69803. });
  69804. exports.default = _default;
  69805. function enhanceError(context2, fn) {
  69806. return function* (arg1, arg2) {
  69807. try {
  69808. return yield* fn(arg1, arg2);
  69809. } catch (e) {
  69810. if (!/^\[BABEL\]/.test(e.message)) {
  69811. var _context$filename;
  69812. e.message = `[BABEL] ${(_context$filename = context2.filename) != null ? _context$filename : "unknown file"}: ${e.message}`;
  69813. }
  69814. throw e;
  69815. }
  69816. };
  69817. }
  69818. var makeDescriptorLoader = (apiFactory) => (0, _caching.makeWeakCache)(function* ({
  69819. value: value2,
  69820. options,
  69821. dirname,
  69822. alias
  69823. }, cache) {
  69824. if (options === false)
  69825. throw new Error("Assertion failure");
  69826. options = options || {};
  69827. const externalDependencies = [];
  69828. let item = value2;
  69829. if (typeof value2 === "function") {
  69830. const factory = (0, _async.maybeAsync)(value2, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
  69831. const api = Object.assign({}, context, apiFactory(cache, externalDependencies));
  69832. try {
  69833. item = yield* factory(api, options, dirname);
  69834. } catch (e) {
  69835. if (alias) {
  69836. e.message += ` (While processing: ${JSON.stringify(alias)})`;
  69837. }
  69838. throw e;
  69839. }
  69840. }
  69841. if (!item || typeof item !== "object") {
  69842. throw new Error("Plugin/Preset did not return an object.");
  69843. }
  69844. if ((0, _async.isThenable)(item)) {
  69845. yield* [];
  69846. throw new Error(`You appear to be using a promise as a plugin, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version. As an alternative, you can prefix the promise with "await". (While processing: ${JSON.stringify(alias)})`);
  69847. }
  69848. if (externalDependencies.length > 0 && (!cache.configured() || cache.mode() === "forever")) {
  69849. let error = `A plugin/preset has external untracked dependencies (${externalDependencies[0]}), but the cache `;
  69850. if (!cache.configured()) {
  69851. error += `has not been configured to be invalidated when the external dependencies change. `;
  69852. } else {
  69853. error += ` has been configured to never be invalidated. `;
  69854. }
  69855. error += `Plugins/presets should configure their cache to be invalidated when the external dependencies change, for example using \`api.cache.invalidate(() => statSync(filepath).mtimeMs)\` or \`api.cache.never()\`
  69856. (While processing: ${JSON.stringify(alias)})`;
  69857. throw new Error(error);
  69858. }
  69859. return {
  69860. value: item,
  69861. options,
  69862. dirname,
  69863. alias,
  69864. externalDependencies: (0, _deepArray.finalize)(externalDependencies)
  69865. };
  69866. });
  69867. var pluginDescriptorLoader = makeDescriptorLoader(_configApi.makePluginAPI);
  69868. var presetDescriptorLoader = makeDescriptorLoader(_configApi.makePresetAPI);
  69869. var instantiatePlugin = (0, _caching.makeWeakCache)(function* ({
  69870. value: value2,
  69871. options,
  69872. dirname,
  69873. alias,
  69874. externalDependencies
  69875. }, cache) {
  69876. const pluginObj = (0, _plugins.validatePluginObject)(value2);
  69877. const plugin2 = Object.assign({}, pluginObj);
  69878. if (plugin2.visitor) {
  69879. plugin2.visitor = _traverse().default.explode(Object.assign({}, plugin2.visitor));
  69880. }
  69881. if (plugin2.inherits) {
  69882. const inheritsDescriptor = {
  69883. name: void 0,
  69884. alias: `${alias}$inherits`,
  69885. value: plugin2.inherits,
  69886. options,
  69887. dirname
  69888. };
  69889. const inherits = yield* (0, _async.forwardAsync)(loadPluginDescriptor, (run) => {
  69890. return cache.invalidate((data3) => run(inheritsDescriptor, data3));
  69891. });
  69892. plugin2.pre = chain(inherits.pre, plugin2.pre);
  69893. plugin2.post = chain(inherits.post, plugin2.post);
  69894. plugin2.manipulateOptions = chain(inherits.manipulateOptions, plugin2.manipulateOptions);
  69895. plugin2.visitor = _traverse().default.visitors.merge([inherits.visitor || {}, plugin2.visitor || {}]);
  69896. if (inherits.externalDependencies.length > 0) {
  69897. if (externalDependencies.length === 0) {
  69898. externalDependencies = inherits.externalDependencies;
  69899. } else {
  69900. externalDependencies = (0, _deepArray.finalize)([externalDependencies, inherits.externalDependencies]);
  69901. }
  69902. }
  69903. }
  69904. return new _plugin.default(plugin2, options, alias, externalDependencies);
  69905. });
  69906. function* loadPluginDescriptor(descriptor, context2) {
  69907. if (descriptor.value instanceof _plugin.default) {
  69908. if (descriptor.options) {
  69909. throw new Error("Passed options to an existing Plugin instance will not work.");
  69910. }
  69911. return descriptor.value;
  69912. }
  69913. return yield* instantiatePlugin(yield* pluginDescriptorLoader(descriptor, context2), context2);
  69914. }
  69915. var needsFilename = (val) => val && typeof val !== "function";
  69916. var validateIfOptionNeedsFilename = (options, descriptor) => {
  69917. if (needsFilename(options.test) || needsFilename(options.include) || needsFilename(options.exclude)) {
  69918. const formattedPresetName = descriptor.name ? `"${descriptor.name}"` : "/* your preset */";
  69919. throw new _configError.default([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n"));
  69920. }
  69921. };
  69922. var validatePreset = (preset, context2, descriptor) => {
  69923. if (!context2.filename) {
  69924. const {
  69925. options
  69926. } = preset;
  69927. validateIfOptionNeedsFilename(options, descriptor);
  69928. if (options.overrides) {
  69929. options.overrides.forEach((overrideOptions) => validateIfOptionNeedsFilename(overrideOptions, descriptor));
  69930. }
  69931. }
  69932. };
  69933. var instantiatePreset = (0, _caching.makeWeakCacheSync)(({
  69934. value: value2,
  69935. dirname,
  69936. alias,
  69937. externalDependencies
  69938. }) => {
  69939. return {
  69940. options: (0, _options.validate)("preset", value2),
  69941. alias,
  69942. dirname,
  69943. externalDependencies
  69944. };
  69945. });
  69946. function* loadPresetDescriptor(descriptor, context2) {
  69947. const preset = instantiatePreset(yield* presetDescriptorLoader(descriptor, context2));
  69948. validatePreset(preset, context2, descriptor);
  69949. return {
  69950. chain: yield* (0, _configChain.buildPresetChain)(preset, context2),
  69951. externalDependencies: preset.externalDependencies
  69952. };
  69953. }
  69954. function chain(a, b) {
  69955. const fns = [a, b].filter(Boolean);
  69956. if (fns.length <= 1)
  69957. return fns[0];
  69958. return function(...args) {
  69959. for (const fn of fns) {
  69960. fn.apply(this, args);
  69961. }
  69962. };
  69963. }
  69964. }
  69965. });
  69966. // node_modules/@babel/core/lib/config/index.js
  69967. var require_config = __commonJS({
  69968. "node_modules/@babel/core/lib/config/index.js"(exports) {
  69969. "use strict";
  69970. Object.defineProperty(exports, "__esModule", {
  69971. value: true
  69972. });
  69973. exports.createConfigItem = createConfigItem;
  69974. exports.createConfigItemSync = exports.createConfigItemAsync = void 0;
  69975. Object.defineProperty(exports, "default", {
  69976. enumerable: true,
  69977. get: function() {
  69978. return _full.default;
  69979. }
  69980. });
  69981. exports.loadPartialConfigSync = exports.loadPartialConfigAsync = exports.loadPartialConfig = exports.loadOptionsSync = exports.loadOptionsAsync = exports.loadOptions = void 0;
  69982. function _gensync() {
  69983. const data3 = require_gensync();
  69984. _gensync = function() {
  69985. return data3;
  69986. };
  69987. return data3;
  69988. }
  69989. var _full = require_full();
  69990. var _partial = require_partial();
  69991. var _item = require_item();
  69992. var loadOptionsRunner = _gensync()(function* (opts) {
  69993. var _config$options;
  69994. const config = yield* (0, _full.default)(opts);
  69995. return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null;
  69996. });
  69997. var createConfigItemRunner = _gensync()(_item.createConfigItem);
  69998. var maybeErrback = (runner) => (argOrCallback, maybeCallback) => {
  69999. let arg;
  70000. let callback;
  70001. if (maybeCallback === void 0 && typeof argOrCallback === "function") {
  70002. callback = argOrCallback;
  70003. arg = void 0;
  70004. } else {
  70005. callback = maybeCallback;
  70006. arg = argOrCallback;
  70007. }
  70008. if (!callback) {
  70009. return runner.sync(arg);
  70010. }
  70011. runner.errback(arg, callback);
  70012. };
  70013. var loadPartialConfig = maybeErrback(_partial.loadPartialConfig);
  70014. exports.loadPartialConfig = loadPartialConfig;
  70015. var loadPartialConfigSync = _partial.loadPartialConfig.sync;
  70016. exports.loadPartialConfigSync = loadPartialConfigSync;
  70017. var loadPartialConfigAsync = _partial.loadPartialConfig.async;
  70018. exports.loadPartialConfigAsync = loadPartialConfigAsync;
  70019. var loadOptions = maybeErrback(loadOptionsRunner);
  70020. exports.loadOptions = loadOptions;
  70021. var loadOptionsSync = loadOptionsRunner.sync;
  70022. exports.loadOptionsSync = loadOptionsSync;
  70023. var loadOptionsAsync = loadOptionsRunner.async;
  70024. exports.loadOptionsAsync = loadOptionsAsync;
  70025. var createConfigItemSync = createConfigItemRunner.sync;
  70026. exports.createConfigItemSync = createConfigItemSync;
  70027. var createConfigItemAsync = createConfigItemRunner.async;
  70028. exports.createConfigItemAsync = createConfigItemAsync;
  70029. function createConfigItem(target, options, callback) {
  70030. if (callback !== void 0) {
  70031. createConfigItemRunner.errback(target, options, callback);
  70032. } else if (typeof options === "function") {
  70033. createConfigItemRunner.errback(target, void 0, callback);
  70034. } else {
  70035. return createConfigItemRunner.sync(target, options);
  70036. }
  70037. }
  70038. }
  70039. });
  70040. // node_modules/@babel/core/lib/transformation/plugin-pass.js
  70041. var require_plugin_pass = __commonJS({
  70042. "node_modules/@babel/core/lib/transformation/plugin-pass.js"(exports) {
  70043. "use strict";
  70044. Object.defineProperty(exports, "__esModule", {
  70045. value: true
  70046. });
  70047. exports.default = void 0;
  70048. var PluginPass = class {
  70049. constructor(file, key2, options) {
  70050. this._map = /* @__PURE__ */ new Map();
  70051. this.key = void 0;
  70052. this.file = void 0;
  70053. this.opts = void 0;
  70054. this.cwd = void 0;
  70055. this.filename = void 0;
  70056. this.key = key2;
  70057. this.file = file;
  70058. this.opts = options || {};
  70059. this.cwd = file.opts.cwd;
  70060. this.filename = file.opts.filename;
  70061. }
  70062. set(key2, val) {
  70063. this._map.set(key2, val);
  70064. }
  70065. get(key2) {
  70066. return this._map.get(key2);
  70067. }
  70068. availableHelper(name2, versionRange) {
  70069. return this.file.availableHelper(name2, versionRange);
  70070. }
  70071. addHelper(name2) {
  70072. return this.file.addHelper(name2);
  70073. }
  70074. addImport() {
  70075. this.file.addImport();
  70076. }
  70077. buildCodeFrameError(node2, msg, _Error) {
  70078. return this.file.buildCodeFrameError(node2, msg, _Error);
  70079. }
  70080. };
  70081. exports.default = PluginPass;
  70082. {
  70083. PluginPass.prototype.getModuleName = function getModuleName() {
  70084. return this.file.getModuleName();
  70085. };
  70086. }
  70087. }
  70088. });
  70089. // node_modules/@babel/core/lib/transformation/block-hoist-plugin.js
  70090. var require_block_hoist_plugin = __commonJS({
  70091. "node_modules/@babel/core/lib/transformation/block-hoist-plugin.js"(exports) {
  70092. "use strict";
  70093. Object.defineProperty(exports, "__esModule", {
  70094. value: true
  70095. });
  70096. exports.default = loadBlockHoistPlugin;
  70097. function _traverse() {
  70098. const data3 = require_lib13();
  70099. _traverse = function() {
  70100. return data3;
  70101. };
  70102. return data3;
  70103. }
  70104. var _plugin = require_plugin();
  70105. var LOADED_PLUGIN;
  70106. var blockHoistPlugin = {
  70107. name: "internal.blockHoist",
  70108. visitor: {
  70109. Block: {
  70110. exit({
  70111. node: node2
  70112. }) {
  70113. const {
  70114. body
  70115. } = node2;
  70116. let max = Math.pow(2, 30) - 1;
  70117. let hasChange = false;
  70118. for (let i = 0; i < body.length; i++) {
  70119. const n = body[i];
  70120. const p = priority(n);
  70121. if (p > max) {
  70122. hasChange = true;
  70123. break;
  70124. }
  70125. max = p;
  70126. }
  70127. if (!hasChange)
  70128. return;
  70129. node2.body = stableSort(body.slice());
  70130. }
  70131. }
  70132. }
  70133. };
  70134. function loadBlockHoistPlugin() {
  70135. if (!LOADED_PLUGIN) {
  70136. LOADED_PLUGIN = new _plugin.default(Object.assign({}, blockHoistPlugin, {
  70137. visitor: _traverse().default.explode(blockHoistPlugin.visitor)
  70138. }), {});
  70139. }
  70140. return LOADED_PLUGIN;
  70141. }
  70142. function priority(bodyNode) {
  70143. const priority2 = bodyNode == null ? void 0 : bodyNode._blockHoist;
  70144. if (priority2 == null)
  70145. return 1;
  70146. if (priority2 === true)
  70147. return 2;
  70148. return priority2;
  70149. }
  70150. function stableSort(body) {
  70151. const buckets = /* @__PURE__ */ Object.create(null);
  70152. for (let i = 0; i < body.length; i++) {
  70153. const n = body[i];
  70154. const p = priority(n);
  70155. const bucket = buckets[p] || (buckets[p] = []);
  70156. bucket.push(n);
  70157. }
  70158. const keys2 = Object.keys(buckets).map((k) => +k).sort((a, b) => b - a);
  70159. let index2 = 0;
  70160. for (const key2 of keys2) {
  70161. const bucket = buckets[key2];
  70162. for (const n of bucket) {
  70163. body[index2++] = n;
  70164. }
  70165. }
  70166. return body;
  70167. }
  70168. }
  70169. });
  70170. // node_modules/@babel/core/lib/transformation/normalize-opts.js
  70171. var require_normalize_opts = __commonJS({
  70172. "node_modules/@babel/core/lib/transformation/normalize-opts.js"(exports) {
  70173. "use strict";
  70174. Object.defineProperty(exports, "__esModule", {
  70175. value: true
  70176. });
  70177. exports.default = normalizeOptions;
  70178. function _path() {
  70179. const data3 = __require("path");
  70180. _path = function() {
  70181. return data3;
  70182. };
  70183. return data3;
  70184. }
  70185. function normalizeOptions(config) {
  70186. const {
  70187. filename,
  70188. cwd,
  70189. filenameRelative = typeof filename === "string" ? _path().relative(cwd, filename) : "unknown",
  70190. sourceType = "module",
  70191. inputSourceMap,
  70192. sourceMaps = !!inputSourceMap,
  70193. sourceRoot = config.options.moduleRoot,
  70194. sourceFileName = _path().basename(filenameRelative),
  70195. comments = true,
  70196. compact = "auto"
  70197. } = config.options;
  70198. const opts = config.options;
  70199. const options = Object.assign({}, opts, {
  70200. parserOpts: Object.assign({
  70201. sourceType: _path().extname(filenameRelative) === ".mjs" ? "module" : sourceType,
  70202. sourceFileName: filename,
  70203. plugins: []
  70204. }, opts.parserOpts),
  70205. generatorOpts: Object.assign({
  70206. filename,
  70207. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  70208. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  70209. retainLines: opts.retainLines,
  70210. comments,
  70211. shouldPrintComment: opts.shouldPrintComment,
  70212. compact,
  70213. minified: opts.minified,
  70214. sourceMaps,
  70215. sourceRoot,
  70216. sourceFileName
  70217. }, opts.generatorOpts)
  70218. });
  70219. for (const plugins of config.passes) {
  70220. for (const plugin2 of plugins) {
  70221. if (plugin2.manipulateOptions) {
  70222. plugin2.manipulateOptions(options, options.parserOpts);
  70223. }
  70224. }
  70225. }
  70226. return options;
  70227. }
  70228. }
  70229. });
  70230. // node_modules/convert-source-map/index.js
  70231. var require_convert_source_map = __commonJS({
  70232. "node_modules/convert-source-map/index.js"(exports) {
  70233. "use strict";
  70234. var fs = __require("fs");
  70235. var path = __require("path");
  70236. Object.defineProperty(exports, "commentRegex", {
  70237. get: function getCommentRegex() {
  70238. return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg;
  70239. }
  70240. });
  70241. Object.defineProperty(exports, "mapFileCommentRegex", {
  70242. get: function getMapFileCommentRegex() {
  70243. return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
  70244. }
  70245. });
  70246. var decodeBase64;
  70247. if (typeof Buffer !== "undefined") {
  70248. if (typeof Buffer.from === "function") {
  70249. decodeBase64 = decodeBase64WithBufferFrom;
  70250. } else {
  70251. decodeBase64 = decodeBase64WithNewBuffer;
  70252. }
  70253. } else {
  70254. decodeBase64 = decodeBase64WithAtob;
  70255. }
  70256. function decodeBase64WithBufferFrom(base64) {
  70257. return Buffer.from(base64, "base64").toString();
  70258. }
  70259. function decodeBase64WithNewBuffer(base64) {
  70260. if (typeof value === "number") {
  70261. throw new TypeError("The value to decode must not be of type number.");
  70262. }
  70263. return new Buffer(base64, "base64").toString();
  70264. }
  70265. function decodeBase64WithAtob(base64) {
  70266. return decodeURIComponent(escape(atob(base64)));
  70267. }
  70268. function stripComment(sm) {
  70269. return sm.split(",").pop();
  70270. }
  70271. function readFromFileMap(sm, dir) {
  70272. var r = exports.mapFileCommentRegex.exec(sm);
  70273. var filename = r[1] || r[2];
  70274. var filepath = path.resolve(dir, filename);
  70275. try {
  70276. return fs.readFileSync(filepath, "utf8");
  70277. } catch (e) {
  70278. throw new Error("An error occurred while trying to read the map file at " + filepath + "\n" + e);
  70279. }
  70280. }
  70281. function Converter(sm, opts) {
  70282. opts = opts || {};
  70283. if (opts.isFileComment)
  70284. sm = readFromFileMap(sm, opts.commentFileDir);
  70285. if (opts.hasComment)
  70286. sm = stripComment(sm);
  70287. if (opts.isEncoded)
  70288. sm = decodeBase64(sm);
  70289. if (opts.isJSON || opts.isEncoded)
  70290. sm = JSON.parse(sm);
  70291. this.sourcemap = sm;
  70292. }
  70293. Converter.prototype.toJSON = function(space2) {
  70294. return JSON.stringify(this.sourcemap, null, space2);
  70295. };
  70296. if (typeof Buffer !== "undefined") {
  70297. if (typeof Buffer.from === "function") {
  70298. Converter.prototype.toBase64 = encodeBase64WithBufferFrom;
  70299. } else {
  70300. Converter.prototype.toBase64 = encodeBase64WithNewBuffer;
  70301. }
  70302. } else {
  70303. Converter.prototype.toBase64 = encodeBase64WithBtoa;
  70304. }
  70305. function encodeBase64WithBufferFrom() {
  70306. var json = this.toJSON();
  70307. return Buffer.from(json, "utf8").toString("base64");
  70308. }
  70309. function encodeBase64WithNewBuffer() {
  70310. var json = this.toJSON();
  70311. if (typeof json === "number") {
  70312. throw new TypeError("The json to encode must not be of type number.");
  70313. }
  70314. return new Buffer(json, "utf8").toString("base64");
  70315. }
  70316. function encodeBase64WithBtoa() {
  70317. var json = this.toJSON();
  70318. return btoa(unescape(encodeURIComponent(json)));
  70319. }
  70320. Converter.prototype.toComment = function(options) {
  70321. var base64 = this.toBase64();
  70322. var data3 = "sourceMappingURL=data:application/json;charset=utf-8;base64," + base64;
  70323. return options && options.multiline ? "/*# " + data3 + " */" : "//# " + data3;
  70324. };
  70325. Converter.prototype.toObject = function() {
  70326. return JSON.parse(this.toJSON());
  70327. };
  70328. Converter.prototype.addProperty = function(key2, value2) {
  70329. if (this.sourcemap.hasOwnProperty(key2))
  70330. throw new Error('property "' + key2 + '" already exists on the sourcemap, use set property instead');
  70331. return this.setProperty(key2, value2);
  70332. };
  70333. Converter.prototype.setProperty = function(key2, value2) {
  70334. this.sourcemap[key2] = value2;
  70335. return this;
  70336. };
  70337. Converter.prototype.getProperty = function(key2) {
  70338. return this.sourcemap[key2];
  70339. };
  70340. exports.fromObject = function(obj) {
  70341. return new Converter(obj);
  70342. };
  70343. exports.fromJSON = function(json) {
  70344. return new Converter(json, { isJSON: true });
  70345. };
  70346. exports.fromBase64 = function(base64) {
  70347. return new Converter(base64, { isEncoded: true });
  70348. };
  70349. exports.fromComment = function(comment2) {
  70350. comment2 = comment2.replace(/^\/\*/g, "//").replace(/\*\/$/g, "");
  70351. return new Converter(comment2, { isEncoded: true, hasComment: true });
  70352. };
  70353. exports.fromMapFileComment = function(comment2, dir) {
  70354. return new Converter(comment2, { commentFileDir: dir, isFileComment: true, isJSON: true });
  70355. };
  70356. exports.fromSource = function(content3) {
  70357. var m = content3.match(exports.commentRegex);
  70358. return m ? exports.fromComment(m.pop()) : null;
  70359. };
  70360. exports.fromMapFileSource = function(content3, dir) {
  70361. var m = content3.match(exports.mapFileCommentRegex);
  70362. return m ? exports.fromMapFileComment(m.pop(), dir) : null;
  70363. };
  70364. exports.removeComments = function(src) {
  70365. return src.replace(exports.commentRegex, "");
  70366. };
  70367. exports.removeMapFileComments = function(src) {
  70368. return src.replace(exports.mapFileCommentRegex, "");
  70369. };
  70370. exports.generateMapFileComment = function(file, options) {
  70371. var data3 = "sourceMappingURL=" + file;
  70372. return options && options.multiline ? "/*# " + data3 + " */" : "//# " + data3;
  70373. };
  70374. }
  70375. });
  70376. // node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js
  70377. var require_missing_plugin_helper = __commonJS({
  70378. "node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js"(exports) {
  70379. "use strict";
  70380. Object.defineProperty(exports, "__esModule", {
  70381. value: true
  70382. });
  70383. exports.default = generateMissingPluginMessage;
  70384. var pluginNameMap = {
  70385. asyncDoExpressions: {
  70386. syntax: {
  70387. name: "@babel/plugin-syntax-async-do-expressions",
  70388. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions"
  70389. }
  70390. },
  70391. decimal: {
  70392. syntax: {
  70393. name: "@babel/plugin-syntax-decimal",
  70394. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal"
  70395. }
  70396. },
  70397. decorators: {
  70398. syntax: {
  70399. name: "@babel/plugin-syntax-decorators",
  70400. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators"
  70401. },
  70402. transform: {
  70403. name: "@babel/plugin-proposal-decorators",
  70404. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators"
  70405. }
  70406. },
  70407. doExpressions: {
  70408. syntax: {
  70409. name: "@babel/plugin-syntax-do-expressions",
  70410. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions"
  70411. },
  70412. transform: {
  70413. name: "@babel/plugin-proposal-do-expressions",
  70414. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions"
  70415. }
  70416. },
  70417. exportDefaultFrom: {
  70418. syntax: {
  70419. name: "@babel/plugin-syntax-export-default-from",
  70420. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from"
  70421. },
  70422. transform: {
  70423. name: "@babel/plugin-proposal-export-default-from",
  70424. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from"
  70425. }
  70426. },
  70427. flow: {
  70428. syntax: {
  70429. name: "@babel/plugin-syntax-flow",
  70430. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow"
  70431. },
  70432. transform: {
  70433. name: "@babel/preset-flow",
  70434. url: "https://github.com/babel/babel/tree/main/packages/babel-preset-flow"
  70435. }
  70436. },
  70437. functionBind: {
  70438. syntax: {
  70439. name: "@babel/plugin-syntax-function-bind",
  70440. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind"
  70441. },
  70442. transform: {
  70443. name: "@babel/plugin-proposal-function-bind",
  70444. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind"
  70445. }
  70446. },
  70447. functionSent: {
  70448. syntax: {
  70449. name: "@babel/plugin-syntax-function-sent",
  70450. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent"
  70451. },
  70452. transform: {
  70453. name: "@babel/plugin-proposal-function-sent",
  70454. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent"
  70455. }
  70456. },
  70457. jsx: {
  70458. syntax: {
  70459. name: "@babel/plugin-syntax-jsx",
  70460. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx"
  70461. },
  70462. transform: {
  70463. name: "@babel/preset-react",
  70464. url: "https://github.com/babel/babel/tree/main/packages/babel-preset-react"
  70465. }
  70466. },
  70467. importAssertions: {
  70468. syntax: {
  70469. name: "@babel/plugin-syntax-import-assertions",
  70470. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions"
  70471. }
  70472. },
  70473. pipelineOperator: {
  70474. syntax: {
  70475. name: "@babel/plugin-syntax-pipeline-operator",
  70476. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator"
  70477. },
  70478. transform: {
  70479. name: "@babel/plugin-proposal-pipeline-operator",
  70480. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator"
  70481. }
  70482. },
  70483. recordAndTuple: {
  70484. syntax: {
  70485. name: "@babel/plugin-syntax-record-and-tuple",
  70486. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple"
  70487. }
  70488. },
  70489. regexpUnicodeSets: {
  70490. syntax: {
  70491. name: "@babel/plugin-syntax-unicode-sets-regex",
  70492. url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md"
  70493. },
  70494. transform: {
  70495. name: "@babel/plugin-proposal-unicode-sets-regex",
  70496. url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md"
  70497. }
  70498. },
  70499. throwExpressions: {
  70500. syntax: {
  70501. name: "@babel/plugin-syntax-throw-expressions",
  70502. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions"
  70503. },
  70504. transform: {
  70505. name: "@babel/plugin-proposal-throw-expressions",
  70506. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions"
  70507. }
  70508. },
  70509. typescript: {
  70510. syntax: {
  70511. name: "@babel/plugin-syntax-typescript",
  70512. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript"
  70513. },
  70514. transform: {
  70515. name: "@babel/preset-typescript",
  70516. url: "https://github.com/babel/babel/tree/main/packages/babel-preset-typescript"
  70517. }
  70518. }
  70519. };
  70520. {
  70521. Object.assign(pluginNameMap, {
  70522. asyncGenerators: {
  70523. syntax: {
  70524. name: "@babel/plugin-syntax-async-generators",
  70525. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators"
  70526. },
  70527. transform: {
  70528. name: "@babel/plugin-proposal-async-generator-functions",
  70529. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-async-generator-functions"
  70530. }
  70531. },
  70532. classProperties: {
  70533. syntax: {
  70534. name: "@babel/plugin-syntax-class-properties",
  70535. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"
  70536. },
  70537. transform: {
  70538. name: "@babel/plugin-proposal-class-properties",
  70539. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-class-properties"
  70540. }
  70541. },
  70542. classPrivateProperties: {
  70543. syntax: {
  70544. name: "@babel/plugin-syntax-class-properties",
  70545. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"
  70546. },
  70547. transform: {
  70548. name: "@babel/plugin-proposal-class-properties",
  70549. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-class-properties"
  70550. }
  70551. },
  70552. classPrivateMethods: {
  70553. syntax: {
  70554. name: "@babel/plugin-syntax-class-properties",
  70555. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"
  70556. },
  70557. transform: {
  70558. name: "@babel/plugin-proposal-private-methods",
  70559. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-private-methods"
  70560. }
  70561. },
  70562. classStaticBlock: {
  70563. syntax: {
  70564. name: "@babel/plugin-syntax-class-static-block",
  70565. url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block"
  70566. },
  70567. transform: {
  70568. name: "@babel/plugin-proposal-class-static-block",
  70569. url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-class-static-block"
  70570. }
  70571. },
  70572. dynamicImport: {
  70573. syntax: {
  70574. name: "@babel/plugin-syntax-dynamic-import",
  70575. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import"
  70576. }
  70577. },
  70578. exportNamespaceFrom: {
  70579. syntax: {
  70580. name: "@babel/plugin-syntax-export-namespace-from",
  70581. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from"
  70582. },
  70583. transform: {
  70584. name: "@babel/plugin-proposal-export-namespace-from",
  70585. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-namespace-from"
  70586. }
  70587. },
  70588. importMeta: {
  70589. syntax: {
  70590. name: "@babel/plugin-syntax-import-meta",
  70591. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta"
  70592. }
  70593. },
  70594. logicalAssignment: {
  70595. syntax: {
  70596. name: "@babel/plugin-syntax-logical-assignment-operators",
  70597. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators"
  70598. },
  70599. transform: {
  70600. name: "@babel/plugin-proposal-logical-assignment-operators",
  70601. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-logical-assignment-operators"
  70602. }
  70603. },
  70604. moduleStringNames: {
  70605. syntax: {
  70606. name: "@babel/plugin-syntax-module-string-names",
  70607. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names"
  70608. }
  70609. },
  70610. numericSeparator: {
  70611. syntax: {
  70612. name: "@babel/plugin-syntax-numeric-separator",
  70613. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator"
  70614. },
  70615. transform: {
  70616. name: "@babel/plugin-proposal-numeric-separator",
  70617. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-numeric-separator"
  70618. }
  70619. },
  70620. nullishCoalescingOperator: {
  70621. syntax: {
  70622. name: "@babel/plugin-syntax-nullish-coalescing-operator",
  70623. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator"
  70624. },
  70625. transform: {
  70626. name: "@babel/plugin-proposal-nullish-coalescing-operator",
  70627. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator"
  70628. }
  70629. },
  70630. objectRestSpread: {
  70631. syntax: {
  70632. name: "@babel/plugin-syntax-object-rest-spread",
  70633. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread"
  70634. },
  70635. transform: {
  70636. name: "@babel/plugin-proposal-object-rest-spread",
  70637. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-object-rest-spread"
  70638. }
  70639. },
  70640. optionalCatchBinding: {
  70641. syntax: {
  70642. name: "@babel/plugin-syntax-optional-catch-binding",
  70643. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding"
  70644. },
  70645. transform: {
  70646. name: "@babel/plugin-proposal-optional-catch-binding",
  70647. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-optional-catch-binding"
  70648. }
  70649. },
  70650. optionalChaining: {
  70651. syntax: {
  70652. name: "@babel/plugin-syntax-optional-chaining",
  70653. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining"
  70654. },
  70655. transform: {
  70656. name: "@babel/plugin-proposal-optional-chaining",
  70657. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-optional-chaining"
  70658. }
  70659. },
  70660. privateIn: {
  70661. syntax: {
  70662. name: "@babel/plugin-syntax-private-property-in-object",
  70663. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object"
  70664. },
  70665. transform: {
  70666. name: "@babel/plugin-proposal-private-property-in-object",
  70667. url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-private-property-in-object"
  70668. }
  70669. }
  70670. });
  70671. }
  70672. var getNameURLCombination = ({
  70673. name: name2,
  70674. url
  70675. }) => `${name2} (${url})`;
  70676. function generateMissingPluginMessage(missingPluginName, loc, codeFrame) {
  70677. let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled (${loc.line}:${loc.column + 1}):
  70678. ` + codeFrame;
  70679. const pluginInfo = pluginNameMap[missingPluginName];
  70680. if (pluginInfo) {
  70681. const {
  70682. syntax: syntaxPlugin,
  70683. transform: transformPlugin
  70684. } = pluginInfo;
  70685. if (syntaxPlugin) {
  70686. const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);
  70687. if (transformPlugin) {
  70688. const transformPluginInfo = getNameURLCombination(transformPlugin);
  70689. const sectionType = transformPlugin.name.startsWith("@babel/plugin") ? "plugins" : "presets";
  70690. helpMessage += `
  70691. Add ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.
  70692. If you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;
  70693. } else {
  70694. helpMessage += `
  70695. Add ${syntaxPluginInfo} to the 'plugins' section of your Babel config to enable parsing.`;
  70696. }
  70697. }
  70698. }
  70699. return helpMessage;
  70700. }
  70701. }
  70702. });
  70703. // node_modules/@babel/core/lib/parser/index.js
  70704. var require_parser = __commonJS({
  70705. "node_modules/@babel/core/lib/parser/index.js"(exports) {
  70706. "use strict";
  70707. Object.defineProperty(exports, "__esModule", {
  70708. value: true
  70709. });
  70710. exports.default = parser;
  70711. function _parser() {
  70712. const data3 = require_lib9();
  70713. _parser = function() {
  70714. return data3;
  70715. };
  70716. return data3;
  70717. }
  70718. function _codeFrame() {
  70719. const data3 = require_lib8();
  70720. _codeFrame = function() {
  70721. return data3;
  70722. };
  70723. return data3;
  70724. }
  70725. var _missingPluginHelper = require_missing_plugin_helper();
  70726. function* parser(pluginPasses, {
  70727. parserOpts,
  70728. highlightCode = true,
  70729. filename = "unknown"
  70730. }, code2) {
  70731. try {
  70732. const results = [];
  70733. for (const plugins of pluginPasses) {
  70734. for (const plugin2 of plugins) {
  70735. const {
  70736. parserOverride
  70737. } = plugin2;
  70738. if (parserOverride) {
  70739. const ast = parserOverride(code2, parserOpts, _parser().parse);
  70740. if (ast !== void 0)
  70741. results.push(ast);
  70742. }
  70743. }
  70744. }
  70745. if (results.length === 0) {
  70746. return (0, _parser().parse)(code2, parserOpts);
  70747. } else if (results.length === 1) {
  70748. yield* [];
  70749. if (typeof results[0].then === "function") {
  70750. throw new Error(`You appear to be using an async parser plugin, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.`);
  70751. }
  70752. return results[0];
  70753. }
  70754. throw new Error("More than one plugin attempted to override parsing.");
  70755. } catch (err) {
  70756. if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") {
  70757. err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module or sourceType:unambiguous in your Babel config for this file.";
  70758. }
  70759. const {
  70760. loc,
  70761. missingPlugin
  70762. } = err;
  70763. if (loc) {
  70764. const codeFrame = (0, _codeFrame().codeFrameColumns)(code2, {
  70765. start: {
  70766. line: loc.line,
  70767. column: loc.column + 1
  70768. }
  70769. }, {
  70770. highlightCode
  70771. });
  70772. if (missingPlugin) {
  70773. err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame);
  70774. } else {
  70775. err.message = `${filename}: ${err.message}
  70776. ` + codeFrame;
  70777. }
  70778. err.code = "BABEL_PARSE_ERROR";
  70779. }
  70780. throw err;
  70781. }
  70782. }
  70783. }
  70784. });
  70785. // node_modules/@babel/core/lib/transformation/util/clone-deep.js
  70786. var require_clone_deep = __commonJS({
  70787. "node_modules/@babel/core/lib/transformation/util/clone-deep.js"(exports) {
  70788. "use strict";
  70789. Object.defineProperty(exports, "__esModule", {
  70790. value: true
  70791. });
  70792. exports.default = _default;
  70793. function deepClone(value2, cache) {
  70794. if (value2 !== null) {
  70795. if (cache.has(value2))
  70796. return cache.get(value2);
  70797. let cloned;
  70798. if (Array.isArray(value2)) {
  70799. cloned = new Array(value2.length);
  70800. cache.set(value2, cloned);
  70801. for (let i = 0; i < value2.length; i++) {
  70802. cloned[i] = typeof value2[i] !== "object" ? value2[i] : deepClone(value2[i], cache);
  70803. }
  70804. } else {
  70805. cloned = {};
  70806. cache.set(value2, cloned);
  70807. const keys2 = Object.keys(value2);
  70808. for (let i = 0; i < keys2.length; i++) {
  70809. const key2 = keys2[i];
  70810. cloned[key2] = typeof value2[key2] !== "object" ? value2[key2] : deepClone(value2[key2], cache);
  70811. }
  70812. }
  70813. return cloned;
  70814. }
  70815. return value2;
  70816. }
  70817. function _default(value2) {
  70818. if (typeof value2 !== "object")
  70819. return value2;
  70820. return deepClone(value2, /* @__PURE__ */ new Map());
  70821. }
  70822. }
  70823. });
  70824. // node_modules/@babel/core/lib/transformation/normalize-file.js
  70825. var require_normalize_file = __commonJS({
  70826. "node_modules/@babel/core/lib/transformation/normalize-file.js"(exports) {
  70827. "use strict";
  70828. Object.defineProperty(exports, "__esModule", {
  70829. value: true
  70830. });
  70831. exports.default = normalizeFile;
  70832. function _fs() {
  70833. const data3 = __require("fs");
  70834. _fs = function() {
  70835. return data3;
  70836. };
  70837. return data3;
  70838. }
  70839. function _path() {
  70840. const data3 = __require("path");
  70841. _path = function() {
  70842. return data3;
  70843. };
  70844. return data3;
  70845. }
  70846. function _debug() {
  70847. const data3 = require_src();
  70848. _debug = function() {
  70849. return data3;
  70850. };
  70851. return data3;
  70852. }
  70853. function _t() {
  70854. const data3 = require_lib3();
  70855. _t = function() {
  70856. return data3;
  70857. };
  70858. return data3;
  70859. }
  70860. function _convertSourceMap() {
  70861. const data3 = require_convert_source_map();
  70862. _convertSourceMap = function() {
  70863. return data3;
  70864. };
  70865. return data3;
  70866. }
  70867. var _file = require_file();
  70868. var _parser = require_parser();
  70869. var _cloneDeep = require_clone_deep();
  70870. var {
  70871. file,
  70872. traverseFast
  70873. } = _t();
  70874. var debug = _debug()("babel:transform:file");
  70875. var INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/;
  70876. var EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/;
  70877. function* normalizeFile(pluginPasses, options, code2, ast) {
  70878. code2 = `${code2 || ""}`;
  70879. if (ast) {
  70880. if (ast.type === "Program") {
  70881. ast = file(ast, [], []);
  70882. } else if (ast.type !== "File") {
  70883. throw new Error("AST root must be a Program or File node");
  70884. }
  70885. if (options.cloneInputAst) {
  70886. ast = (0, _cloneDeep.default)(ast);
  70887. }
  70888. } else {
  70889. ast = yield* (0, _parser.default)(pluginPasses, options, code2);
  70890. }
  70891. let inputMap = null;
  70892. if (options.inputSourceMap !== false) {
  70893. if (typeof options.inputSourceMap === "object") {
  70894. inputMap = _convertSourceMap().fromObject(options.inputSourceMap);
  70895. }
  70896. if (!inputMap) {
  70897. const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);
  70898. if (lastComment) {
  70899. try {
  70900. inputMap = _convertSourceMap().fromComment(lastComment);
  70901. } catch (err) {
  70902. debug("discarding unknown inline input sourcemap", err);
  70903. }
  70904. }
  70905. }
  70906. if (!inputMap) {
  70907. const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);
  70908. if (typeof options.filename === "string" && lastComment) {
  70909. try {
  70910. const match = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment);
  70911. const inputMapContent = _fs().readFileSync(_path().resolve(_path().dirname(options.filename), match[1]), "utf8");
  70912. inputMap = _convertSourceMap().fromJSON(inputMapContent);
  70913. } catch (err) {
  70914. debug("discarding unknown file input sourcemap", err);
  70915. }
  70916. } else if (lastComment) {
  70917. debug("discarding un-loadable file input sourcemap");
  70918. }
  70919. }
  70920. }
  70921. return new _file.default(options, {
  70922. code: code2,
  70923. ast,
  70924. inputMap
  70925. });
  70926. }
  70927. function extractCommentsFromList(regex2, comments, lastComment) {
  70928. if (comments) {
  70929. comments = comments.filter(({
  70930. value: value2
  70931. }) => {
  70932. if (regex2.test(value2)) {
  70933. lastComment = value2;
  70934. return false;
  70935. }
  70936. return true;
  70937. });
  70938. }
  70939. return [comments, lastComment];
  70940. }
  70941. function extractComments(regex2, ast) {
  70942. let lastComment = null;
  70943. traverseFast(ast, (node2) => {
  70944. [node2.leadingComments, lastComment] = extractCommentsFromList(regex2, node2.leadingComments, lastComment);
  70945. [node2.innerComments, lastComment] = extractCommentsFromList(regex2, node2.innerComments, lastComment);
  70946. [node2.trailingComments, lastComment] = extractCommentsFromList(regex2, node2.trailingComments, lastComment);
  70947. });
  70948. return lastComment;
  70949. }
  70950. }
  70951. });
  70952. // node_modules/@ampproject/remapping/dist/remapping.umd.js
  70953. var require_remapping_umd = __commonJS({
  70954. "node_modules/@ampproject/remapping/dist/remapping.umd.js"(exports, module) {
  70955. (function(global2, factory) {
  70956. typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(require_trace_mapping_umd(), require_gen_mapping_umd()) : typeof define === "function" && define.amd ? define(["@jridgewell/trace-mapping", "@jridgewell/gen-mapping"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.remapping = factory(global2.traceMapping, global2.genMapping));
  70957. })(exports, function(traceMapping, genMapping) {
  70958. "use strict";
  70959. const SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null);
  70960. const EMPTY_SOURCES = [];
  70961. function SegmentObject(source2, line2, column2, name2, content3) {
  70962. return { source: source2, line: line2, column: column2, name: name2, content: content3 };
  70963. }
  70964. function Source(map, sources, source2, content3) {
  70965. return {
  70966. map,
  70967. sources,
  70968. source: source2,
  70969. content: content3
  70970. };
  70971. }
  70972. function MapSource(map, sources) {
  70973. return Source(map, sources, "", null);
  70974. }
  70975. function OriginalSource(source2, content3) {
  70976. return Source(null, EMPTY_SOURCES, source2, content3);
  70977. }
  70978. function traceMappings(tree) {
  70979. const gen = new genMapping.GenMapping({ file: tree.map.file });
  70980. const { sources: rootSources, map } = tree;
  70981. const rootNames = map.names;
  70982. const rootMappings = traceMapping.decodedMappings(map);
  70983. for (let i = 0; i < rootMappings.length; i++) {
  70984. const segments = rootMappings[i];
  70985. for (let j = 0; j < segments.length; j++) {
  70986. const segment = segments[j];
  70987. const genCol = segment[0];
  70988. let traced = SOURCELESS_MAPPING;
  70989. if (segment.length !== 1) {
  70990. const source3 = rootSources[segment[1]];
  70991. traced = originalPositionFor(source3, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : "");
  70992. if (traced == null)
  70993. continue;
  70994. }
  70995. const { column: column2, line: line2, name: name2, content: content3, source: source2 } = traced;
  70996. genMapping.maybeAddSegment(gen, i, genCol, source2, line2, column2, name2);
  70997. if (source2 && content3 != null)
  70998. genMapping.setSourceContent(gen, source2, content3);
  70999. }
  71000. }
  71001. return gen;
  71002. }
  71003. function originalPositionFor(source2, line2, column2, name2) {
  71004. if (!source2.map) {
  71005. return SegmentObject(source2.source, line2, column2, name2, source2.content);
  71006. }
  71007. const segment = traceMapping.traceSegment(source2.map, line2, column2);
  71008. if (segment == null)
  71009. return null;
  71010. if (segment.length === 1)
  71011. return SOURCELESS_MAPPING;
  71012. return originalPositionFor(source2.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source2.map.names[segment[4]] : name2);
  71013. }
  71014. function asArray(value2) {
  71015. if (Array.isArray(value2))
  71016. return value2;
  71017. return [value2];
  71018. }
  71019. function buildSourceMapTree(input, loader) {
  71020. const maps = asArray(input).map((m) => new traceMapping.TraceMap(m, ""));
  71021. const map = maps.pop();
  71022. for (let i = 0; i < maps.length; i++) {
  71023. if (maps[i].sources.length > 1) {
  71024. throw new Error(`Transformation map ${i} must have exactly one source file.
  71025. Did you specify these with the most recent transformation maps first?`);
  71026. }
  71027. }
  71028. let tree = build(map, loader, "", 0);
  71029. for (let i = maps.length - 1; i >= 0; i--) {
  71030. tree = MapSource(maps[i], [tree]);
  71031. }
  71032. return tree;
  71033. }
  71034. function build(map, loader, importer, importerDepth) {
  71035. const { resolvedSources, sourcesContent } = map;
  71036. const depth = importerDepth + 1;
  71037. const children = resolvedSources.map((sourceFile, i) => {
  71038. const ctx = {
  71039. importer,
  71040. depth,
  71041. source: sourceFile || "",
  71042. content: void 0
  71043. };
  71044. const sourceMap = loader(ctx.source, ctx);
  71045. const { source: source2, content: content3 } = ctx;
  71046. if (sourceMap)
  71047. return build(new traceMapping.TraceMap(sourceMap, source2), loader, source2, depth);
  71048. const sourceContent = content3 !== void 0 ? content3 : sourcesContent ? sourcesContent[i] : null;
  71049. return OriginalSource(source2, sourceContent);
  71050. });
  71051. return MapSource(map, children);
  71052. }
  71053. class SourceMap {
  71054. constructor(map, options) {
  71055. const out = options.decodedMappings ? genMapping.toDecodedMap(map) : genMapping.toEncodedMap(map);
  71056. this.version = out.version;
  71057. this.file = out.file;
  71058. this.mappings = out.mappings;
  71059. this.names = out.names;
  71060. this.sourceRoot = out.sourceRoot;
  71061. this.sources = out.sources;
  71062. if (!options.excludeContent) {
  71063. this.sourcesContent = out.sourcesContent;
  71064. }
  71065. }
  71066. toString() {
  71067. return JSON.stringify(this);
  71068. }
  71069. }
  71070. function remapping(input, loader, options) {
  71071. const opts = typeof options === "object" ? options : { excludeContent: !!options, decodedMappings: false };
  71072. const tree = buildSourceMapTree(input, loader);
  71073. return new SourceMap(traceMappings(tree), opts);
  71074. }
  71075. return remapping;
  71076. });
  71077. }
  71078. });
  71079. // node_modules/@babel/core/lib/transformation/file/merge-map.js
  71080. var require_merge_map = __commonJS({
  71081. "node_modules/@babel/core/lib/transformation/file/merge-map.js"(exports) {
  71082. "use strict";
  71083. Object.defineProperty(exports, "__esModule", {
  71084. value: true
  71085. });
  71086. exports.default = mergeSourceMap;
  71087. function _remapping() {
  71088. const data3 = require_remapping_umd();
  71089. _remapping = function() {
  71090. return data3;
  71091. };
  71092. return data3;
  71093. }
  71094. function mergeSourceMap(inputMap, map, sourceFileName) {
  71095. const source2 = sourceFileName.replace(/\\/g, "/");
  71096. let found = false;
  71097. const result = _remapping()(rootless(map), (s, ctx) => {
  71098. if (s === source2 && !found) {
  71099. found = true;
  71100. ctx.source = "";
  71101. return rootless(inputMap);
  71102. }
  71103. return null;
  71104. });
  71105. if (typeof inputMap.sourceRoot === "string") {
  71106. result.sourceRoot = inputMap.sourceRoot;
  71107. }
  71108. return Object.assign({}, result);
  71109. }
  71110. function rootless(map) {
  71111. return Object.assign({}, map, {
  71112. sourceRoot: null
  71113. });
  71114. }
  71115. }
  71116. });
  71117. // node_modules/@babel/core/lib/transformation/file/generate.js
  71118. var require_generate = __commonJS({
  71119. "node_modules/@babel/core/lib/transformation/file/generate.js"(exports) {
  71120. "use strict";
  71121. Object.defineProperty(exports, "__esModule", {
  71122. value: true
  71123. });
  71124. exports.default = generateCode;
  71125. function _convertSourceMap() {
  71126. const data3 = require_convert_source_map();
  71127. _convertSourceMap = function() {
  71128. return data3;
  71129. };
  71130. return data3;
  71131. }
  71132. function _generator() {
  71133. const data3 = require_lib4();
  71134. _generator = function() {
  71135. return data3;
  71136. };
  71137. return data3;
  71138. }
  71139. var _mergeMap = require_merge_map();
  71140. function generateCode(pluginPasses, file) {
  71141. const {
  71142. opts,
  71143. ast,
  71144. code: code2,
  71145. inputMap
  71146. } = file;
  71147. const {
  71148. generatorOpts
  71149. } = opts;
  71150. generatorOpts.inputSourceMap = inputMap == null ? void 0 : inputMap.toObject();
  71151. const results = [];
  71152. for (const plugins of pluginPasses) {
  71153. for (const plugin2 of plugins) {
  71154. const {
  71155. generatorOverride
  71156. } = plugin2;
  71157. if (generatorOverride) {
  71158. const result2 = generatorOverride(ast, generatorOpts, code2, _generator().default);
  71159. if (result2 !== void 0)
  71160. results.push(result2);
  71161. }
  71162. }
  71163. }
  71164. let result;
  71165. if (results.length === 0) {
  71166. result = (0, _generator().default)(ast, generatorOpts, code2);
  71167. } else if (results.length === 1) {
  71168. result = results[0];
  71169. if (typeof result.then === "function") {
  71170. throw new Error(`You appear to be using an async codegen plugin, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.`);
  71171. }
  71172. } else {
  71173. throw new Error("More than one plugin attempted to override codegen.");
  71174. }
  71175. let {
  71176. code: outputCode,
  71177. decodedMap: outputMap = result.map
  71178. } = result;
  71179. if (result.__mergedMap) {
  71180. outputMap = Object.assign({}, result.map);
  71181. } else {
  71182. if (outputMap) {
  71183. if (inputMap) {
  71184. outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap, generatorOpts.sourceFileName);
  71185. } else {
  71186. outputMap = result.map;
  71187. }
  71188. }
  71189. }
  71190. if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") {
  71191. outputCode += "\n" + _convertSourceMap().fromObject(outputMap).toComment();
  71192. }
  71193. if (opts.sourceMaps === "inline") {
  71194. outputMap = null;
  71195. }
  71196. return {
  71197. outputCode,
  71198. outputMap
  71199. };
  71200. }
  71201. }
  71202. });
  71203. // node_modules/@babel/core/lib/transformation/index.js
  71204. var require_transformation = __commonJS({
  71205. "node_modules/@babel/core/lib/transformation/index.js"(exports) {
  71206. "use strict";
  71207. Object.defineProperty(exports, "__esModule", {
  71208. value: true
  71209. });
  71210. exports.run = run;
  71211. function _traverse() {
  71212. const data3 = require_lib13();
  71213. _traverse = function() {
  71214. return data3;
  71215. };
  71216. return data3;
  71217. }
  71218. var _pluginPass = require_plugin_pass();
  71219. var _blockHoistPlugin = require_block_hoist_plugin();
  71220. var _normalizeOpts = require_normalize_opts();
  71221. var _normalizeFile = require_normalize_file();
  71222. var _generate = require_generate();
  71223. var _deepArray = require_deep_array();
  71224. function* run(config, code2, ast) {
  71225. const file = yield* (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code2, ast);
  71226. const opts = file.opts;
  71227. try {
  71228. yield* transformFile(file, config.passes);
  71229. } catch (e) {
  71230. var _opts$filename;
  71231. e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown file"}: ${e.message}`;
  71232. if (!e.code) {
  71233. e.code = "BABEL_TRANSFORM_ERROR";
  71234. }
  71235. throw e;
  71236. }
  71237. let outputCode, outputMap;
  71238. try {
  71239. if (opts.code !== false) {
  71240. ({
  71241. outputCode,
  71242. outputMap
  71243. } = (0, _generate.default)(config.passes, file));
  71244. }
  71245. } catch (e) {
  71246. var _opts$filename2;
  71247. e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown file"}: ${e.message}`;
  71248. if (!e.code) {
  71249. e.code = "BABEL_GENERATE_ERROR";
  71250. }
  71251. throw e;
  71252. }
  71253. return {
  71254. metadata: file.metadata,
  71255. options: opts,
  71256. ast: opts.ast === true ? file.ast : null,
  71257. code: outputCode === void 0 ? null : outputCode,
  71258. map: outputMap === void 0 ? null : outputMap,
  71259. sourceType: file.ast.program.sourceType,
  71260. externalDependencies: (0, _deepArray.flattenToSet)(config.externalDependencies)
  71261. };
  71262. }
  71263. function* transformFile(file, pluginPasses) {
  71264. for (const pluginPairs of pluginPasses) {
  71265. const passPairs = [];
  71266. const passes = [];
  71267. const visitors = [];
  71268. for (const plugin2 of pluginPairs.concat([(0, _blockHoistPlugin.default)()])) {
  71269. const pass = new _pluginPass.default(file, plugin2.key, plugin2.options);
  71270. passPairs.push([plugin2, pass]);
  71271. passes.push(pass);
  71272. visitors.push(plugin2.visitor);
  71273. }
  71274. for (const [plugin2, pass] of passPairs) {
  71275. const fn = plugin2.pre;
  71276. if (fn) {
  71277. const result = fn.call(pass, file);
  71278. yield* [];
  71279. if (isThenable(result)) {
  71280. throw new Error(`You appear to be using an plugin with an async .pre, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.`);
  71281. }
  71282. }
  71283. }
  71284. const visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod);
  71285. (0, _traverse().default)(file.ast, visitor, file.scope);
  71286. for (const [plugin2, pass] of passPairs) {
  71287. const fn = plugin2.post;
  71288. if (fn) {
  71289. const result = fn.call(pass, file);
  71290. yield* [];
  71291. if (isThenable(result)) {
  71292. throw new Error(`You appear to be using an plugin with an async .post, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.`);
  71293. }
  71294. }
  71295. }
  71296. }
  71297. }
  71298. function isThenable(val) {
  71299. return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
  71300. }
  71301. }
  71302. });
  71303. // node_modules/@babel/core/lib/transform-file.js
  71304. var require_transform_file = __commonJS({
  71305. "node_modules/@babel/core/lib/transform-file.js"(exports) {
  71306. "use strict";
  71307. Object.defineProperty(exports, "__esModule", {
  71308. value: true
  71309. });
  71310. exports.transformFile = transformFile;
  71311. exports.transformFileAsync = transformFileAsync;
  71312. exports.transformFileSync = transformFileSync;
  71313. function _gensync() {
  71314. const data3 = require_gensync();
  71315. _gensync = function() {
  71316. return data3;
  71317. };
  71318. return data3;
  71319. }
  71320. var _config = require_config();
  71321. var _transformation = require_transformation();
  71322. var fs = require_fs();
  71323. var transformFileRunner = _gensync()(function* (filename, opts) {
  71324. const options = Object.assign({}, opts, {
  71325. filename
  71326. });
  71327. const config = yield* (0, _config.default)(options);
  71328. if (config === null)
  71329. return null;
  71330. const code2 = yield* fs.readFile(filename, "utf8");
  71331. return yield* (0, _transformation.run)(config, code2);
  71332. });
  71333. function transformFile(...args) {
  71334. transformFileRunner.errback(...args);
  71335. }
  71336. function transformFileSync(...args) {
  71337. return transformFileRunner.sync(...args);
  71338. }
  71339. function transformFileAsync(...args) {
  71340. return transformFileRunner.async(...args);
  71341. }
  71342. }
  71343. });
  71344. // node_modules/@babel/core/lib/config/files/import.cjs
  71345. var require_import = __commonJS({
  71346. "node_modules/@babel/core/lib/config/files/import.cjs"(exports, module) {
  71347. module.exports = function import_(filepath) {
  71348. return import(filepath);
  71349. };
  71350. }
  71351. });
  71352. // node_modules/@babel/preset-typescript/package.json
  71353. var require_package2 = __commonJS({
  71354. "node_modules/@babel/preset-typescript/package.json"(exports, module) {
  71355. module.exports = {
  71356. name: "@babel/preset-typescript",
  71357. version: "7.21.4",
  71358. description: "Babel preset for TypeScript.",
  71359. repository: {
  71360. type: "git",
  71361. url: "https://github.com/babel/babel.git",
  71362. directory: "packages/babel-preset-typescript"
  71363. },
  71364. license: "MIT",
  71365. publishConfig: {
  71366. access: "public"
  71367. },
  71368. main: "./lib/index.js",
  71369. keywords: [
  71370. "babel-preset",
  71371. "typescript"
  71372. ],
  71373. dependencies: {
  71374. "@babel/helper-plugin-utils": "^7.20.2",
  71375. "@babel/helper-validator-option": "^7.21.0",
  71376. "@babel/plugin-syntax-jsx": "^7.21.4",
  71377. "@babel/plugin-transform-modules-commonjs": "^7.21.2",
  71378. "@babel/plugin-transform-typescript": "^7.21.3"
  71379. },
  71380. peerDependencies: {
  71381. "@babel/core": "^7.0.0-0"
  71382. },
  71383. devDependencies: {
  71384. "@babel/core": "^7.21.4",
  71385. "@babel/helper-plugin-test-runner": "^7.18.6"
  71386. },
  71387. homepage: "https://babel.dev/docs/en/next/babel-preset-typescript",
  71388. bugs: "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22area%3A%20typescript%22+is%3Aopen",
  71389. engines: {
  71390. node: ">=6.9.0"
  71391. },
  71392. author: "The Babel Team (https://babel.dev/team)",
  71393. type: "commonjs"
  71394. };
  71395. }
  71396. });
  71397. // node_modules/@babel/helper-plugin-utils/lib/index.js
  71398. var require_lib20 = __commonJS({
  71399. "node_modules/@babel/helper-plugin-utils/lib/index.js"(exports) {
  71400. "use strict";
  71401. Object.defineProperty(exports, "__esModule", {
  71402. value: true
  71403. });
  71404. exports.declare = declare;
  71405. exports.declarePreset = void 0;
  71406. var apiPolyfills = {
  71407. assertVersion: (api) => (range) => {
  71408. throwVersionError(range, api.version);
  71409. },
  71410. targets: () => () => {
  71411. return {};
  71412. },
  71413. assumption: () => () => {
  71414. return void 0;
  71415. }
  71416. };
  71417. function declare(builder) {
  71418. return (api, options, dirname) => {
  71419. var _clonedApi2;
  71420. let clonedApi;
  71421. for (const name2 of Object.keys(apiPolyfills)) {
  71422. var _clonedApi;
  71423. if (api[name2])
  71424. continue;
  71425. clonedApi = (_clonedApi = clonedApi) != null ? _clonedApi : copyApiObject(api);
  71426. clonedApi[name2] = apiPolyfills[name2](clonedApi);
  71427. }
  71428. return builder((_clonedApi2 = clonedApi) != null ? _clonedApi2 : api, options || {}, dirname);
  71429. };
  71430. }
  71431. var declarePreset = declare;
  71432. exports.declarePreset = declarePreset;
  71433. function copyApiObject(api) {
  71434. let proto = null;
  71435. if (typeof api.version === "string" && /^7\./.test(api.version)) {
  71436. proto = Object.getPrototypeOf(api);
  71437. if (proto && (!has2(proto, "version") || !has2(proto, "transform") || !has2(proto, "template") || !has2(proto, "types"))) {
  71438. proto = null;
  71439. }
  71440. }
  71441. return Object.assign({}, proto, api);
  71442. }
  71443. function has2(obj, key2) {
  71444. return Object.prototype.hasOwnProperty.call(obj, key2);
  71445. }
  71446. function throwVersionError(range, version3) {
  71447. if (typeof range === "number") {
  71448. if (!Number.isInteger(range)) {
  71449. throw new Error("Expected string or integer value.");
  71450. }
  71451. range = `^${range}.0.0-0`;
  71452. }
  71453. if (typeof range !== "string") {
  71454. throw new Error("Expected string or integer value.");
  71455. }
  71456. const limit = Error.stackTraceLimit;
  71457. if (typeof limit === "number" && limit < 25) {
  71458. Error.stackTraceLimit = 25;
  71459. }
  71460. let err;
  71461. if (version3.slice(0, 2) === "7.") {
  71462. err = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version3}". You'll need to update your @babel/core version.`);
  71463. } else {
  71464. err = new Error(`Requires Babel "${range}", but was loaded with "${version3}". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.`);
  71465. }
  71466. if (typeof limit === "number") {
  71467. Error.stackTraceLimit = limit;
  71468. }
  71469. throw Object.assign(err, {
  71470. code: "BABEL_VERSION_UNSUPPORTED",
  71471. version: version3,
  71472. range
  71473. });
  71474. }
  71475. }
  71476. });
  71477. // node_modules/@babel/plugin-syntax-typescript/lib/index.js
  71478. var require_lib21 = __commonJS({
  71479. "node_modules/@babel/plugin-syntax-typescript/lib/index.js"(exports) {
  71480. "use strict";
  71481. Object.defineProperty(exports, "__esModule", {
  71482. value: true
  71483. });
  71484. exports.default = void 0;
  71485. var _helperPluginUtils = require_lib20();
  71486. {
  71487. removePlugin = function(plugins, name2) {
  71488. const indices = [];
  71489. plugins.forEach((plugin2, i) => {
  71490. const n = Array.isArray(plugin2) ? plugin2[0] : plugin2;
  71491. if (n === name2) {
  71492. indices.unshift(i);
  71493. }
  71494. });
  71495. for (const i of indices) {
  71496. plugins.splice(i, 1);
  71497. }
  71498. };
  71499. }
  71500. var removePlugin;
  71501. var _default = (0, _helperPluginUtils.declare)((api, opts) => {
  71502. api.assertVersion(7);
  71503. const {
  71504. disallowAmbiguousJSXLike,
  71505. dts
  71506. } = opts;
  71507. {
  71508. var {
  71509. isTSX
  71510. } = opts;
  71511. }
  71512. return {
  71513. name: "syntax-typescript",
  71514. manipulateOptions(opts2, parserOpts) {
  71515. {
  71516. const {
  71517. plugins
  71518. } = parserOpts;
  71519. removePlugin(plugins, "flow");
  71520. removePlugin(plugins, "jsx");
  71521. plugins.push("objectRestSpread", "classProperties");
  71522. if (isTSX) {
  71523. plugins.push("jsx");
  71524. }
  71525. }
  71526. parserOpts.plugins.push(["typescript", {
  71527. disallowAmbiguousJSXLike,
  71528. dts
  71529. }]);
  71530. }
  71531. };
  71532. });
  71533. exports.default = _default;
  71534. }
  71535. });
  71536. // node_modules/@babel/helper-member-expression-to-functions/lib/index.js
  71537. var require_lib22 = __commonJS({
  71538. "node_modules/@babel/helper-member-expression-to-functions/lib/index.js"(exports) {
  71539. "use strict";
  71540. Object.defineProperty(exports, "__esModule", { value: true });
  71541. var _t = require_lib3();
  71542. function _interopNamespace(e) {
  71543. if (e && e.__esModule)
  71544. return e;
  71545. var n = /* @__PURE__ */ Object.create(null);
  71546. if (e) {
  71547. Object.keys(e).forEach(function(k) {
  71548. if (k !== "default") {
  71549. var d = Object.getOwnPropertyDescriptor(e, k);
  71550. Object.defineProperty(n, k, d.get ? d : {
  71551. enumerable: true,
  71552. get: function() {
  71553. return e[k];
  71554. }
  71555. });
  71556. }
  71557. });
  71558. }
  71559. n["default"] = e;
  71560. return Object.freeze(n);
  71561. }
  71562. var _t__namespace = /* @__PURE__ */ _interopNamespace(_t);
  71563. function willPathCastToBoolean(path) {
  71564. const maybeWrapped = path;
  71565. const {
  71566. node: node2,
  71567. parentPath
  71568. } = maybeWrapped;
  71569. if (parentPath.isLogicalExpression()) {
  71570. const {
  71571. operator,
  71572. right
  71573. } = parentPath.node;
  71574. if (operator === "&&" || operator === "||" || operator === "??" && node2 === right) {
  71575. return willPathCastToBoolean(parentPath);
  71576. }
  71577. }
  71578. if (parentPath.isSequenceExpression()) {
  71579. const {
  71580. expressions
  71581. } = parentPath.node;
  71582. if (expressions[expressions.length - 1] === node2) {
  71583. return willPathCastToBoolean(parentPath);
  71584. } else {
  71585. return true;
  71586. }
  71587. }
  71588. return parentPath.isConditional({
  71589. test: node2
  71590. }) || parentPath.isUnaryExpression({
  71591. operator: "!"
  71592. }) || parentPath.isLoop({
  71593. test: node2
  71594. });
  71595. }
  71596. var {
  71597. LOGICAL_OPERATORS,
  71598. arrowFunctionExpression,
  71599. assignmentExpression,
  71600. binaryExpression,
  71601. booleanLiteral,
  71602. callExpression,
  71603. cloneNode,
  71604. conditionalExpression,
  71605. identifier,
  71606. isMemberExpression: isMemberExpression2,
  71607. isOptionalCallExpression,
  71608. isOptionalMemberExpression,
  71609. isUpdateExpression,
  71610. logicalExpression,
  71611. memberExpression,
  71612. nullLiteral,
  71613. optionalCallExpression,
  71614. optionalMemberExpression,
  71615. sequenceExpression,
  71616. updateExpression
  71617. } = _t__namespace;
  71618. var AssignmentMemoiser = class {
  71619. constructor() {
  71620. this._map = void 0;
  71621. this._map = /* @__PURE__ */ new WeakMap();
  71622. }
  71623. has(key2) {
  71624. return this._map.has(key2);
  71625. }
  71626. get(key2) {
  71627. if (!this.has(key2))
  71628. return;
  71629. const record = this._map.get(key2);
  71630. const {
  71631. value: value2
  71632. } = record;
  71633. record.count--;
  71634. if (record.count === 0) {
  71635. return assignmentExpression("=", value2, key2);
  71636. }
  71637. return value2;
  71638. }
  71639. set(key2, value2, count) {
  71640. return this._map.set(key2, {
  71641. count,
  71642. value: value2
  71643. });
  71644. }
  71645. };
  71646. function toNonOptional(path, base2) {
  71647. const {
  71648. node: node2
  71649. } = path;
  71650. if (isOptionalMemberExpression(node2)) {
  71651. return memberExpression(base2, node2.property, node2.computed);
  71652. }
  71653. if (path.isOptionalCallExpression()) {
  71654. const callee = path.get("callee");
  71655. if (path.node.optional && callee.isOptionalMemberExpression()) {
  71656. const object = callee.node.object;
  71657. const context = path.scope.maybeGenerateMemoised(object);
  71658. callee.get("object").replaceWith(assignmentExpression("=", context, object));
  71659. return callExpression(memberExpression(base2, identifier("call")), [context, ...path.node.arguments]);
  71660. }
  71661. return callExpression(base2, path.node.arguments);
  71662. }
  71663. return path.node;
  71664. }
  71665. function isInDetachedTree(path) {
  71666. while (path) {
  71667. if (path.isProgram())
  71668. break;
  71669. const {
  71670. parentPath,
  71671. container,
  71672. listKey
  71673. } = path;
  71674. const parentNode = parentPath.node;
  71675. if (listKey) {
  71676. if (container !== parentNode[listKey]) {
  71677. return true;
  71678. }
  71679. } else {
  71680. if (container !== parentNode)
  71681. return true;
  71682. }
  71683. path = parentPath;
  71684. }
  71685. return false;
  71686. }
  71687. var handle = {
  71688. memoise() {
  71689. },
  71690. handle(member, noDocumentAll) {
  71691. const {
  71692. node: node2,
  71693. parent,
  71694. parentPath,
  71695. scope
  71696. } = member;
  71697. if (member.isOptionalMemberExpression()) {
  71698. if (isInDetachedTree(member))
  71699. return;
  71700. const endPath = member.find(({
  71701. node: node3,
  71702. parent: parent2
  71703. }) => {
  71704. if (isOptionalMemberExpression(parent2)) {
  71705. return parent2.optional || parent2.object !== node3;
  71706. }
  71707. if (isOptionalCallExpression(parent2)) {
  71708. return node3 !== member.node && parent2.optional || parent2.callee !== node3;
  71709. }
  71710. return true;
  71711. });
  71712. if (scope.path.isPattern()) {
  71713. endPath.replaceWith(callExpression(arrowFunctionExpression([], endPath.node), []));
  71714. return;
  71715. }
  71716. const willEndPathCastToBoolean = willPathCastToBoolean(endPath);
  71717. const rootParentPath = endPath.parentPath;
  71718. if (rootParentPath.isUpdateExpression({
  71719. argument: node2
  71720. }) || rootParentPath.isAssignmentExpression({
  71721. left: node2
  71722. })) {
  71723. throw member.buildCodeFrameError(`can't handle assignment`);
  71724. }
  71725. const isDeleteOperation = rootParentPath.isUnaryExpression({
  71726. operator: "delete"
  71727. });
  71728. if (isDeleteOperation && endPath.isOptionalMemberExpression() && endPath.get("property").isPrivateName()) {
  71729. throw member.buildCodeFrameError(`can't delete a private class element`);
  71730. }
  71731. let startingOptional = member;
  71732. for (; ; ) {
  71733. if (startingOptional.isOptionalMemberExpression()) {
  71734. if (startingOptional.node.optional)
  71735. break;
  71736. startingOptional = startingOptional.get("object");
  71737. continue;
  71738. } else if (startingOptional.isOptionalCallExpression()) {
  71739. if (startingOptional.node.optional)
  71740. break;
  71741. startingOptional = startingOptional.get("callee");
  71742. continue;
  71743. }
  71744. throw new Error(`Internal error: unexpected ${startingOptional.node.type}`);
  71745. }
  71746. const startingNode = startingOptional.isOptionalMemberExpression() ? startingOptional.node.object : startingOptional.node.callee;
  71747. const baseNeedsMemoised = scope.maybeGenerateMemoised(startingNode);
  71748. const baseRef = baseNeedsMemoised != null ? baseNeedsMemoised : startingNode;
  71749. const parentIsOptionalCall = parentPath.isOptionalCallExpression({
  71750. callee: node2
  71751. });
  71752. const isOptionalCall = (parent2) => parentIsOptionalCall;
  71753. const parentIsCall = parentPath.isCallExpression({
  71754. callee: node2
  71755. });
  71756. startingOptional.replaceWith(toNonOptional(startingOptional, baseRef));
  71757. if (isOptionalCall()) {
  71758. if (parent.optional) {
  71759. parentPath.replaceWith(this.optionalCall(member, parent.arguments));
  71760. } else {
  71761. parentPath.replaceWith(this.call(member, parent.arguments));
  71762. }
  71763. } else if (parentIsCall) {
  71764. member.replaceWith(this.boundGet(member));
  71765. } else if (this.delete && parentPath.isUnaryExpression({
  71766. operator: "delete"
  71767. })) {
  71768. parentPath.replaceWith(this.delete(member));
  71769. } else {
  71770. member.replaceWith(this.get(member));
  71771. }
  71772. let regular = member.node;
  71773. for (let current3 = member; current3 !== endPath; ) {
  71774. const parentPath2 = current3.parentPath;
  71775. if (parentPath2 === endPath && isOptionalCall() && parent.optional) {
  71776. regular = parentPath2.node;
  71777. break;
  71778. }
  71779. regular = toNonOptional(parentPath2, regular);
  71780. current3 = parentPath2;
  71781. }
  71782. let context;
  71783. const endParentPath = endPath.parentPath;
  71784. if (isMemberExpression2(regular) && endParentPath.isOptionalCallExpression({
  71785. callee: endPath.node,
  71786. optional: true
  71787. })) {
  71788. const {
  71789. object
  71790. } = regular;
  71791. context = member.scope.maybeGenerateMemoised(object);
  71792. if (context) {
  71793. regular.object = assignmentExpression("=", context, object);
  71794. }
  71795. }
  71796. let replacementPath = endPath;
  71797. if (isDeleteOperation) {
  71798. replacementPath = endParentPath;
  71799. regular = endParentPath.node;
  71800. }
  71801. const baseMemoised = baseNeedsMemoised ? assignmentExpression("=", cloneNode(baseRef), cloneNode(startingNode)) : cloneNode(baseRef);
  71802. if (willEndPathCastToBoolean) {
  71803. let nonNullishCheck;
  71804. if (noDocumentAll) {
  71805. nonNullishCheck = binaryExpression("!=", baseMemoised, nullLiteral());
  71806. } else {
  71807. nonNullishCheck = logicalExpression("&&", binaryExpression("!==", baseMemoised, nullLiteral()), binaryExpression("!==", cloneNode(baseRef), scope.buildUndefinedNode()));
  71808. }
  71809. replacementPath.replaceWith(logicalExpression("&&", nonNullishCheck, regular));
  71810. } else {
  71811. let nullishCheck;
  71812. if (noDocumentAll) {
  71813. nullishCheck = binaryExpression("==", baseMemoised, nullLiteral());
  71814. } else {
  71815. nullishCheck = logicalExpression("||", binaryExpression("===", baseMemoised, nullLiteral()), binaryExpression("===", cloneNode(baseRef), scope.buildUndefinedNode()));
  71816. }
  71817. replacementPath.replaceWith(conditionalExpression(nullishCheck, isDeleteOperation ? booleanLiteral(true) : scope.buildUndefinedNode(), regular));
  71818. }
  71819. if (context) {
  71820. const endParent = endParentPath.node;
  71821. endParentPath.replaceWith(optionalCallExpression(optionalMemberExpression(endParent.callee, identifier("call"), false, true), [cloneNode(context), ...endParent.arguments], false));
  71822. }
  71823. return;
  71824. }
  71825. if (isUpdateExpression(parent, {
  71826. argument: node2
  71827. })) {
  71828. if (this.simpleSet) {
  71829. member.replaceWith(this.simpleSet(member));
  71830. return;
  71831. }
  71832. const {
  71833. operator,
  71834. prefix
  71835. } = parent;
  71836. this.memoise(member, 2);
  71837. const ref3 = scope.generateUidIdentifierBasedOnNode(node2);
  71838. scope.push({
  71839. id: ref3
  71840. });
  71841. const seq = [assignmentExpression("=", cloneNode(ref3), this.get(member))];
  71842. if (prefix) {
  71843. seq.push(updateExpression(operator, cloneNode(ref3), prefix));
  71844. const value2 = sequenceExpression(seq);
  71845. parentPath.replaceWith(this.set(member, value2));
  71846. return;
  71847. } else {
  71848. const ref22 = scope.generateUidIdentifierBasedOnNode(node2);
  71849. scope.push({
  71850. id: ref22
  71851. });
  71852. seq.push(assignmentExpression("=", cloneNode(ref22), updateExpression(operator, cloneNode(ref3), prefix)), cloneNode(ref3));
  71853. const value2 = sequenceExpression(seq);
  71854. parentPath.replaceWith(sequenceExpression([this.set(member, value2), cloneNode(ref22)]));
  71855. return;
  71856. }
  71857. }
  71858. if (parentPath.isAssignmentExpression({
  71859. left: node2
  71860. })) {
  71861. if (this.simpleSet) {
  71862. member.replaceWith(this.simpleSet(member));
  71863. return;
  71864. }
  71865. const {
  71866. operator,
  71867. right: value2
  71868. } = parentPath.node;
  71869. if (operator === "=") {
  71870. parentPath.replaceWith(this.set(member, value2));
  71871. } else {
  71872. const operatorTrunc = operator.slice(0, -1);
  71873. if (LOGICAL_OPERATORS.includes(operatorTrunc)) {
  71874. this.memoise(member, 1);
  71875. parentPath.replaceWith(logicalExpression(operatorTrunc, this.get(member), this.set(member, value2)));
  71876. } else {
  71877. this.memoise(member, 2);
  71878. parentPath.replaceWith(this.set(member, binaryExpression(operatorTrunc, this.get(member), value2)));
  71879. }
  71880. }
  71881. return;
  71882. }
  71883. if (parentPath.isCallExpression({
  71884. callee: node2
  71885. })) {
  71886. parentPath.replaceWith(this.call(member, parentPath.node.arguments));
  71887. return;
  71888. }
  71889. if (parentPath.isOptionalCallExpression({
  71890. callee: node2
  71891. })) {
  71892. if (scope.path.isPattern()) {
  71893. parentPath.replaceWith(callExpression(arrowFunctionExpression([], parentPath.node), []));
  71894. return;
  71895. }
  71896. parentPath.replaceWith(this.optionalCall(member, parentPath.node.arguments));
  71897. return;
  71898. }
  71899. if (this.delete && parentPath.isUnaryExpression({
  71900. operator: "delete"
  71901. })) {
  71902. parentPath.replaceWith(this.delete(member));
  71903. return;
  71904. }
  71905. if (parentPath.isForXStatement({
  71906. left: node2
  71907. }) || parentPath.isObjectProperty({
  71908. value: node2
  71909. }) && parentPath.parentPath.isObjectPattern() || parentPath.isAssignmentPattern({
  71910. left: node2
  71911. }) && parentPath.parentPath.isObjectProperty({
  71912. value: parent
  71913. }) && parentPath.parentPath.parentPath.isObjectPattern() || parentPath.isArrayPattern() || parentPath.isAssignmentPattern({
  71914. left: node2
  71915. }) && parentPath.parentPath.isArrayPattern() || parentPath.isRestElement()) {
  71916. member.replaceWith(this.destructureSet(member));
  71917. return;
  71918. }
  71919. if (parentPath.isTaggedTemplateExpression()) {
  71920. member.replaceWith(this.boundGet(member));
  71921. } else {
  71922. member.replaceWith(this.get(member));
  71923. }
  71924. }
  71925. };
  71926. function memberExpressionToFunctions(path, visitor, state) {
  71927. path.traverse(visitor, Object.assign({}, handle, state, {
  71928. memoiser: new AssignmentMemoiser()
  71929. }));
  71930. }
  71931. exports["default"] = memberExpressionToFunctions;
  71932. }
  71933. });
  71934. // node_modules/@babel/helper-optimise-call-expression/lib/index.js
  71935. var require_lib23 = __commonJS({
  71936. "node_modules/@babel/helper-optimise-call-expression/lib/index.js"(exports) {
  71937. "use strict";
  71938. Object.defineProperty(exports, "__esModule", {
  71939. value: true
  71940. });
  71941. exports.default = optimiseCallExpression;
  71942. var _t = require_lib3();
  71943. var {
  71944. callExpression,
  71945. identifier,
  71946. isIdentifier: isIdentifier3,
  71947. isSpreadElement,
  71948. memberExpression,
  71949. optionalCallExpression,
  71950. optionalMemberExpression
  71951. } = _t;
  71952. function optimiseCallExpression(callee, thisNode, args, optional) {
  71953. if (args.length === 1 && isSpreadElement(args[0]) && isIdentifier3(args[0].argument, {
  71954. name: "arguments"
  71955. })) {
  71956. if (optional) {
  71957. return optionalCallExpression(optionalMemberExpression(callee, identifier("apply"), false, true), [thisNode, args[0].argument], false);
  71958. }
  71959. return callExpression(memberExpression(callee, identifier("apply")), [thisNode, args[0].argument]);
  71960. } else {
  71961. if (optional) {
  71962. return optionalCallExpression(optionalMemberExpression(callee, identifier("call"), false, true), [thisNode, ...args], false);
  71963. }
  71964. return callExpression(memberExpression(callee, identifier("call")), [thisNode, ...args]);
  71965. }
  71966. }
  71967. }
  71968. });
  71969. // node_modules/@babel/helper-replace-supers/lib/index.js
  71970. var require_lib24 = __commonJS({
  71971. "node_modules/@babel/helper-replace-supers/lib/index.js"(exports) {
  71972. "use strict";
  71973. Object.defineProperty(exports, "__esModule", {
  71974. value: true
  71975. });
  71976. exports.default = void 0;
  71977. Object.defineProperty(exports, "environmentVisitor", {
  71978. enumerable: true,
  71979. get: function() {
  71980. return _helperEnvironmentVisitor.default;
  71981. }
  71982. });
  71983. Object.defineProperty(exports, "skipAllButComputedKey", {
  71984. enumerable: true,
  71985. get: function() {
  71986. return _helperEnvironmentVisitor.skipAllButComputedKey;
  71987. }
  71988. });
  71989. var _helperEnvironmentVisitor = require_lib6();
  71990. var _helperMemberExpressionToFunctions = require_lib22();
  71991. var _helperOptimiseCallExpression = require_lib23();
  71992. var _template = require_lib11();
  71993. var _traverse = require_lib13();
  71994. var _t = require_lib3();
  71995. var {
  71996. assignmentExpression,
  71997. booleanLiteral,
  71998. callExpression,
  71999. cloneNode,
  72000. identifier,
  72001. memberExpression,
  72002. sequenceExpression,
  72003. stringLiteral: stringLiteral2,
  72004. thisExpression
  72005. } = _t;
  72006. function getPrototypeOfExpression(objectRef, isStatic, file, isPrivateMethod) {
  72007. objectRef = cloneNode(objectRef);
  72008. const targetRef = isStatic || isPrivateMethod ? objectRef : memberExpression(objectRef, identifier("prototype"));
  72009. return callExpression(file.addHelper("getPrototypeOf"), [targetRef]);
  72010. }
  72011. var visitor = _traverse.default.visitors.merge([_helperEnvironmentVisitor.default, {
  72012. Super(path, state) {
  72013. const {
  72014. node: node2,
  72015. parentPath
  72016. } = path;
  72017. if (!parentPath.isMemberExpression({
  72018. object: node2
  72019. }))
  72020. return;
  72021. state.handle(parentPath);
  72022. }
  72023. }]);
  72024. var unshadowSuperBindingVisitor = _traverse.default.visitors.merge([_helperEnvironmentVisitor.default, {
  72025. Scopable(path, {
  72026. refName
  72027. }) {
  72028. const binding = path.scope.getOwnBinding(refName);
  72029. if (binding && binding.identifier.name === refName) {
  72030. path.scope.rename(refName);
  72031. }
  72032. }
  72033. }]);
  72034. var specHandlers = {
  72035. memoise(superMember, count) {
  72036. const {
  72037. scope,
  72038. node: node2
  72039. } = superMember;
  72040. const {
  72041. computed,
  72042. property
  72043. } = node2;
  72044. if (!computed) {
  72045. return;
  72046. }
  72047. const memo = scope.maybeGenerateMemoised(property);
  72048. if (!memo) {
  72049. return;
  72050. }
  72051. this.memoiser.set(property, memo, count);
  72052. },
  72053. prop(superMember) {
  72054. const {
  72055. computed,
  72056. property
  72057. } = superMember.node;
  72058. if (this.memoiser.has(property)) {
  72059. return cloneNode(this.memoiser.get(property));
  72060. }
  72061. if (computed) {
  72062. return cloneNode(property);
  72063. }
  72064. return stringLiteral2(property.name);
  72065. },
  72066. get(superMember) {
  72067. return this._get(superMember, this._getThisRefs());
  72068. },
  72069. _get(superMember, thisRefs) {
  72070. const proto = getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod);
  72071. return callExpression(this.file.addHelper("get"), [
  72072. thisRefs.memo ? sequenceExpression([thisRefs.memo, proto]) : proto,
  72073. this.prop(superMember),
  72074. thisRefs.this
  72075. ]);
  72076. },
  72077. _getThisRefs() {
  72078. if (!this.isDerivedConstructor) {
  72079. return {
  72080. this: thisExpression()
  72081. };
  72082. }
  72083. const thisRef = this.scope.generateDeclaredUidIdentifier("thisSuper");
  72084. return {
  72085. memo: assignmentExpression("=", thisRef, thisExpression()),
  72086. this: cloneNode(thisRef)
  72087. };
  72088. },
  72089. set(superMember, value2) {
  72090. const thisRefs = this._getThisRefs();
  72091. const proto = getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod);
  72092. return callExpression(this.file.addHelper("set"), [
  72093. thisRefs.memo ? sequenceExpression([thisRefs.memo, proto]) : proto,
  72094. this.prop(superMember),
  72095. value2,
  72096. thisRefs.this,
  72097. booleanLiteral(superMember.isInStrictMode())
  72098. ]);
  72099. },
  72100. destructureSet(superMember) {
  72101. throw superMember.buildCodeFrameError(`Destructuring to a super field is not supported yet.`);
  72102. },
  72103. call(superMember, args) {
  72104. const thisRefs = this._getThisRefs();
  72105. return (0, _helperOptimiseCallExpression.default)(this._get(superMember, thisRefs), cloneNode(thisRefs.this), args, false);
  72106. },
  72107. optionalCall(superMember, args) {
  72108. const thisRefs = this._getThisRefs();
  72109. return (0, _helperOptimiseCallExpression.default)(this._get(superMember, thisRefs), cloneNode(thisRefs.this), args, true);
  72110. },
  72111. delete(superMember) {
  72112. if (superMember.node.computed) {
  72113. return sequenceExpression([callExpression(this.file.addHelper("toPropertyKey"), [cloneNode(superMember.node.property)]), _template.default.expression.ast`
  72114. function () { throw new ReferenceError("'delete super[expr]' is invalid"); }()
  72115. `]);
  72116. } else {
  72117. return _template.default.expression.ast`
  72118. function () { throw new ReferenceError("'delete super.prop' is invalid"); }()
  72119. `;
  72120. }
  72121. }
  72122. };
  72123. var looseHandlers = Object.assign({}, specHandlers, {
  72124. prop(superMember) {
  72125. const {
  72126. property
  72127. } = superMember.node;
  72128. if (this.memoiser.has(property)) {
  72129. return cloneNode(this.memoiser.get(property));
  72130. }
  72131. return cloneNode(property);
  72132. },
  72133. get(superMember) {
  72134. const {
  72135. isStatic,
  72136. getSuperRef
  72137. } = this;
  72138. const {
  72139. computed
  72140. } = superMember.node;
  72141. const prop = this.prop(superMember);
  72142. let object;
  72143. if (isStatic) {
  72144. var _getSuperRef;
  72145. object = (_getSuperRef = getSuperRef()) != null ? _getSuperRef : memberExpression(identifier("Function"), identifier("prototype"));
  72146. } else {
  72147. var _getSuperRef2;
  72148. object = memberExpression((_getSuperRef2 = getSuperRef()) != null ? _getSuperRef2 : identifier("Object"), identifier("prototype"));
  72149. }
  72150. return memberExpression(object, prop, computed);
  72151. },
  72152. set(superMember, value2) {
  72153. const {
  72154. computed
  72155. } = superMember.node;
  72156. const prop = this.prop(superMember);
  72157. return assignmentExpression("=", memberExpression(thisExpression(), prop, computed), value2);
  72158. },
  72159. destructureSet(superMember) {
  72160. const {
  72161. computed
  72162. } = superMember.node;
  72163. const prop = this.prop(superMember);
  72164. return memberExpression(thisExpression(), prop, computed);
  72165. },
  72166. call(superMember, args) {
  72167. return (0, _helperOptimiseCallExpression.default)(this.get(superMember), thisExpression(), args, false);
  72168. },
  72169. optionalCall(superMember, args) {
  72170. return (0, _helperOptimiseCallExpression.default)(this.get(superMember), thisExpression(), args, true);
  72171. }
  72172. });
  72173. var ReplaceSupers = class {
  72174. constructor(opts) {
  72175. var _opts$constantSuper;
  72176. const path = opts.methodPath;
  72177. this.methodPath = path;
  72178. this.isDerivedConstructor = path.isClassMethod({
  72179. kind: "constructor"
  72180. }) && !!opts.superRef;
  72181. this.isStatic = path.isObjectMethod() || path.node.static || (path.isStaticBlock == null ? void 0 : path.isStaticBlock());
  72182. this.isPrivateMethod = path.isPrivate() && path.isMethod();
  72183. this.file = opts.file;
  72184. this.constantSuper = (_opts$constantSuper = opts.constantSuper) != null ? _opts$constantSuper : opts.isLoose;
  72185. this.opts = opts;
  72186. }
  72187. getObjectRef() {
  72188. return cloneNode(this.opts.objectRef || this.opts.getObjectRef());
  72189. }
  72190. getSuperRef() {
  72191. if (this.opts.superRef)
  72192. return cloneNode(this.opts.superRef);
  72193. if (this.opts.getSuperRef) {
  72194. return cloneNode(this.opts.getSuperRef());
  72195. }
  72196. }
  72197. replace() {
  72198. if (this.opts.refToPreserve) {
  72199. this.methodPath.traverse(unshadowSuperBindingVisitor, {
  72200. refName: this.opts.refToPreserve.name
  72201. });
  72202. }
  72203. const handler = this.constantSuper ? looseHandlers : specHandlers;
  72204. (0, _helperMemberExpressionToFunctions.default)(this.methodPath, visitor, Object.assign({
  72205. file: this.file,
  72206. scope: this.methodPath.scope,
  72207. isDerivedConstructor: this.isDerivedConstructor,
  72208. isStatic: this.isStatic,
  72209. isPrivateMethod: this.isPrivateMethod,
  72210. getObjectRef: this.getObjectRef.bind(this),
  72211. getSuperRef: this.getSuperRef.bind(this),
  72212. boundGet: handler.get
  72213. }, handler));
  72214. }
  72215. };
  72216. exports.default = ReplaceSupers;
  72217. }
  72218. });
  72219. // node_modules/@babel/helper-annotate-as-pure/lib/index.js
  72220. var require_lib25 = __commonJS({
  72221. "node_modules/@babel/helper-annotate-as-pure/lib/index.js"(exports) {
  72222. "use strict";
  72223. Object.defineProperty(exports, "__esModule", {
  72224. value: true
  72225. });
  72226. exports.default = annotateAsPure;
  72227. var _t = require_lib3();
  72228. var {
  72229. addComment
  72230. } = _t;
  72231. var PURE_ANNOTATION = "#__PURE__";
  72232. var isPureAnnotated = ({
  72233. leadingComments
  72234. }) => !!leadingComments && leadingComments.some((comment2) => /[@#]__PURE__/.test(comment2.value));
  72235. function annotateAsPure(pathOrNode) {
  72236. const node2 = pathOrNode["node"] || pathOrNode;
  72237. if (isPureAnnotated(node2)) {
  72238. return;
  72239. }
  72240. addComment(node2, "leading", PURE_ANNOTATION);
  72241. }
  72242. }
  72243. });
  72244. // node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
  72245. var require_lib26 = __commonJS({
  72246. "node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js"(exports) {
  72247. "use strict";
  72248. Object.defineProperty(exports, "__esModule", {
  72249. value: true
  72250. });
  72251. exports.isTransparentExprWrapper = isTransparentExprWrapper;
  72252. exports.skipTransparentExprWrapperNodes = skipTransparentExprWrapperNodes;
  72253. exports.skipTransparentExprWrappers = skipTransparentExprWrappers;
  72254. var _t = require_lib3();
  72255. var {
  72256. isParenthesizedExpression,
  72257. isTSAsExpression,
  72258. isTSNonNullExpression,
  72259. isTSSatisfiesExpression,
  72260. isTSTypeAssertion,
  72261. isTypeCastExpression
  72262. } = _t;
  72263. function isTransparentExprWrapper(node2) {
  72264. return isTSAsExpression(node2) || isTSSatisfiesExpression(node2) || isTSTypeAssertion(node2) || isTSNonNullExpression(node2) || isTypeCastExpression(node2) || isParenthesizedExpression(node2);
  72265. }
  72266. function skipTransparentExprWrappers(path) {
  72267. while (isTransparentExprWrapper(path.node)) {
  72268. path = path.get("expression");
  72269. }
  72270. return path;
  72271. }
  72272. function skipTransparentExprWrapperNodes(node2) {
  72273. while (isTransparentExprWrapper(node2)) {
  72274. node2 = node2.expression;
  72275. }
  72276. return node2;
  72277. }
  72278. }
  72279. });
  72280. // node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js
  72281. var require_typescript3 = __commonJS({
  72282. "node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js"(exports) {
  72283. "use strict";
  72284. Object.defineProperty(exports, "__esModule", {
  72285. value: true
  72286. });
  72287. exports.assertFieldTransformed = assertFieldTransformed;
  72288. function assertFieldTransformed(path) {
  72289. if (path.node.declare) {
  72290. throw path.buildCodeFrameError(`TypeScript 'declare' fields must first be transformed by @babel/plugin-transform-typescript.
  72291. If you have already enabled that plugin (or '@babel/preset-typescript'), make sure that it runs before any plugin related to additional class features:
  72292. - @babel/plugin-proposal-class-properties
  72293. - @babel/plugin-proposal-private-methods
  72294. - @babel/plugin-proposal-decorators`);
  72295. }
  72296. }
  72297. }
  72298. });
  72299. // node_modules/@babel/helper-create-class-features-plugin/lib/fields.js
  72300. var require_fields = __commonJS({
  72301. "node_modules/@babel/helper-create-class-features-plugin/lib/fields.js"(exports) {
  72302. "use strict";
  72303. Object.defineProperty(exports, "__esModule", {
  72304. value: true
  72305. });
  72306. exports.buildCheckInRHS = buildCheckInRHS;
  72307. exports.buildFieldsInitNodes = buildFieldsInitNodes;
  72308. exports.buildPrivateNamesMap = buildPrivateNamesMap;
  72309. exports.buildPrivateNamesNodes = buildPrivateNamesNodes;
  72310. exports.transformPrivateNamesUsage = transformPrivateNamesUsage;
  72311. var _core = require_lib32();
  72312. var _helperReplaceSupers = require_lib24();
  72313. var _helperEnvironmentVisitor = require_lib6();
  72314. var _helperMemberExpressionToFunctions = require_lib22();
  72315. var _helperOptimiseCallExpression = require_lib23();
  72316. var _helperAnnotateAsPure = require_lib25();
  72317. var _helperSkipTransparentExpressionWrappers = require_lib26();
  72318. var ts = require_typescript3();
  72319. function buildPrivateNamesMap(props) {
  72320. const privateNamesMap = /* @__PURE__ */ new Map();
  72321. for (const prop of props) {
  72322. if (prop.isPrivate()) {
  72323. const {
  72324. name: name2
  72325. } = prop.node.key.id;
  72326. const update = privateNamesMap.has(name2) ? privateNamesMap.get(name2) : {
  72327. id: prop.scope.generateUidIdentifier(name2),
  72328. static: prop.node.static,
  72329. method: !prop.isProperty()
  72330. };
  72331. if (prop.isClassPrivateMethod()) {
  72332. if (prop.node.kind === "get") {
  72333. update.getId = prop.scope.generateUidIdentifier(`get_${name2}`);
  72334. } else if (prop.node.kind === "set") {
  72335. update.setId = prop.scope.generateUidIdentifier(`set_${name2}`);
  72336. } else if (prop.node.kind === "method") {
  72337. update.methodId = prop.scope.generateUidIdentifier(name2);
  72338. }
  72339. }
  72340. privateNamesMap.set(name2, update);
  72341. }
  72342. }
  72343. return privateNamesMap;
  72344. }
  72345. function buildPrivateNamesNodes(privateNamesMap, privateFieldsAsProperties, privateFieldsAsSymbols, state) {
  72346. const initNodes = [];
  72347. for (const [name2, value2] of privateNamesMap) {
  72348. const {
  72349. static: isStatic,
  72350. method: isMethod,
  72351. getId,
  72352. setId
  72353. } = value2;
  72354. const isAccessor = getId || setId;
  72355. const id = _core.types.cloneNode(value2.id);
  72356. let init;
  72357. if (privateFieldsAsProperties) {
  72358. init = _core.types.callExpression(state.addHelper("classPrivateFieldLooseKey"), [_core.types.stringLiteral(name2)]);
  72359. } else if (privateFieldsAsSymbols) {
  72360. init = _core.types.callExpression(_core.types.identifier("Symbol"), [_core.types.stringLiteral(name2)]);
  72361. } else if (!isStatic) {
  72362. init = _core.types.newExpression(_core.types.identifier(!isMethod || isAccessor ? "WeakMap" : "WeakSet"), []);
  72363. }
  72364. if (init) {
  72365. (0, _helperAnnotateAsPure.default)(init);
  72366. initNodes.push(_core.template.statement.ast`var ${id} = ${init}`);
  72367. }
  72368. }
  72369. return initNodes;
  72370. }
  72371. function privateNameVisitorFactory(visitor) {
  72372. const nestedVisitor = _core.traverse.visitors.merge([Object.assign({}, visitor), _helperEnvironmentVisitor.default]);
  72373. const privateNameVisitor2 = Object.assign({}, visitor, {
  72374. Class(path) {
  72375. const {
  72376. privateNamesMap
  72377. } = this;
  72378. const body = path.get("body.body");
  72379. const visiblePrivateNames = new Map(privateNamesMap);
  72380. const redeclared = [];
  72381. for (const prop of body) {
  72382. if (!prop.isPrivate())
  72383. continue;
  72384. const {
  72385. name: name2
  72386. } = prop.node.key.id;
  72387. visiblePrivateNames.delete(name2);
  72388. redeclared.push(name2);
  72389. }
  72390. if (!redeclared.length) {
  72391. return;
  72392. }
  72393. path.get("body").traverse(nestedVisitor, Object.assign({}, this, {
  72394. redeclared
  72395. }));
  72396. path.traverse(privateNameVisitor2, Object.assign({}, this, {
  72397. privateNamesMap: visiblePrivateNames
  72398. }));
  72399. path.skipKey("body");
  72400. }
  72401. });
  72402. return privateNameVisitor2;
  72403. }
  72404. var privateNameVisitor = privateNameVisitorFactory({
  72405. PrivateName(path, {
  72406. noDocumentAll
  72407. }) {
  72408. const {
  72409. privateNamesMap,
  72410. redeclared
  72411. } = this;
  72412. const {
  72413. node: node2,
  72414. parentPath
  72415. } = path;
  72416. if (!parentPath.isMemberExpression({
  72417. property: node2
  72418. }) && !parentPath.isOptionalMemberExpression({
  72419. property: node2
  72420. })) {
  72421. return;
  72422. }
  72423. const {
  72424. name: name2
  72425. } = node2.id;
  72426. if (!privateNamesMap.has(name2))
  72427. return;
  72428. if (redeclared && redeclared.includes(name2))
  72429. return;
  72430. this.handle(parentPath, noDocumentAll);
  72431. }
  72432. });
  72433. function unshadow(name2, scope, innerBinding) {
  72434. while ((_scope = scope) != null && _scope.hasBinding(name2) && !scope.bindingIdentifierEquals(name2, innerBinding)) {
  72435. var _scope;
  72436. scope.rename(name2);
  72437. scope = scope.parent;
  72438. }
  72439. }
  72440. function buildCheckInRHS(rhs, file, inRHSIsObject) {
  72441. if (inRHSIsObject || !(file.availableHelper != null && file.availableHelper("checkInRHS")))
  72442. return rhs;
  72443. return _core.types.callExpression(file.addHelper("checkInRHS"), [rhs]);
  72444. }
  72445. var privateInVisitor = privateNameVisitorFactory({
  72446. BinaryExpression(path, {
  72447. file
  72448. }) {
  72449. const {
  72450. operator,
  72451. left,
  72452. right
  72453. } = path.node;
  72454. if (operator !== "in")
  72455. return;
  72456. if (!_core.types.isPrivateName(left))
  72457. return;
  72458. const {
  72459. privateFieldsAsProperties,
  72460. privateNamesMap,
  72461. redeclared
  72462. } = this;
  72463. const {
  72464. name: name2
  72465. } = left.id;
  72466. if (!privateNamesMap.has(name2))
  72467. return;
  72468. if (redeclared && redeclared.includes(name2))
  72469. return;
  72470. unshadow(this.classRef.name, path.scope, this.innerBinding);
  72471. if (privateFieldsAsProperties) {
  72472. const {
  72473. id: id2
  72474. } = privateNamesMap.get(name2);
  72475. path.replaceWith(_core.template.expression.ast`
  72476. Object.prototype.hasOwnProperty.call(${buildCheckInRHS(right, file)}, ${_core.types.cloneNode(id2)})
  72477. `);
  72478. return;
  72479. }
  72480. const {
  72481. id,
  72482. static: isStatic
  72483. } = privateNamesMap.get(name2);
  72484. if (isStatic) {
  72485. path.replaceWith(_core.template.expression.ast`${buildCheckInRHS(right, file)} === ${_core.types.cloneNode(this.classRef)}`);
  72486. return;
  72487. }
  72488. path.replaceWith(_core.template.expression.ast`${_core.types.cloneNode(id)}.has(${buildCheckInRHS(right, file)})`);
  72489. }
  72490. });
  72491. var privateNameHandlerSpec = {
  72492. memoise(member, count) {
  72493. const {
  72494. scope
  72495. } = member;
  72496. const {
  72497. object
  72498. } = member.node;
  72499. const memo = scope.maybeGenerateMemoised(object);
  72500. if (!memo) {
  72501. return;
  72502. }
  72503. this.memoiser.set(object, memo, count);
  72504. },
  72505. receiver(member) {
  72506. const {
  72507. object
  72508. } = member.node;
  72509. if (this.memoiser.has(object)) {
  72510. return _core.types.cloneNode(this.memoiser.get(object));
  72511. }
  72512. return _core.types.cloneNode(object);
  72513. },
  72514. get(member) {
  72515. const {
  72516. classRef,
  72517. privateNamesMap,
  72518. file,
  72519. innerBinding
  72520. } = this;
  72521. const {
  72522. name: name2
  72523. } = member.node.property.id;
  72524. const {
  72525. id,
  72526. static: isStatic,
  72527. method: isMethod,
  72528. methodId,
  72529. getId,
  72530. setId
  72531. } = privateNamesMap.get(name2);
  72532. const isAccessor = getId || setId;
  72533. if (isStatic) {
  72534. const helperName = isMethod && !isAccessor ? "classStaticPrivateMethodGet" : "classStaticPrivateFieldSpecGet";
  72535. unshadow(classRef.name, member.scope, innerBinding);
  72536. return _core.types.callExpression(file.addHelper(helperName), [this.receiver(member), _core.types.cloneNode(classRef), _core.types.cloneNode(id)]);
  72537. }
  72538. if (isMethod) {
  72539. if (isAccessor) {
  72540. if (!getId && setId) {
  72541. if (file.availableHelper("writeOnlyError")) {
  72542. return _core.types.sequenceExpression([this.receiver(member), _core.types.callExpression(file.addHelper("writeOnlyError"), [_core.types.stringLiteral(`#${name2}`)])]);
  72543. }
  72544. console.warn(`@babel/helpers is outdated, update it to silence this warning.`);
  72545. }
  72546. return _core.types.callExpression(file.addHelper("classPrivateFieldGet"), [this.receiver(member), _core.types.cloneNode(id)]);
  72547. }
  72548. return _core.types.callExpression(file.addHelper("classPrivateMethodGet"), [this.receiver(member), _core.types.cloneNode(id), _core.types.cloneNode(methodId)]);
  72549. }
  72550. return _core.types.callExpression(file.addHelper("classPrivateFieldGet"), [this.receiver(member), _core.types.cloneNode(id)]);
  72551. },
  72552. boundGet(member) {
  72553. this.memoise(member, 1);
  72554. return _core.types.callExpression(_core.types.memberExpression(this.get(member), _core.types.identifier("bind")), [this.receiver(member)]);
  72555. },
  72556. set(member, value2) {
  72557. const {
  72558. classRef,
  72559. privateNamesMap,
  72560. file
  72561. } = this;
  72562. const {
  72563. name: name2
  72564. } = member.node.property.id;
  72565. const {
  72566. id,
  72567. static: isStatic,
  72568. method: isMethod,
  72569. setId,
  72570. getId
  72571. } = privateNamesMap.get(name2);
  72572. const isAccessor = getId || setId;
  72573. if (isStatic) {
  72574. const helperName = isMethod && !isAccessor ? "classStaticPrivateMethodSet" : "classStaticPrivateFieldSpecSet";
  72575. return _core.types.callExpression(file.addHelper(helperName), [this.receiver(member), _core.types.cloneNode(classRef), _core.types.cloneNode(id), value2]);
  72576. }
  72577. if (isMethod) {
  72578. if (setId) {
  72579. return _core.types.callExpression(file.addHelper("classPrivateFieldSet"), [this.receiver(member), _core.types.cloneNode(id), value2]);
  72580. }
  72581. return _core.types.sequenceExpression([this.receiver(member), value2, _core.types.callExpression(file.addHelper("readOnlyError"), [_core.types.stringLiteral(`#${name2}`)])]);
  72582. }
  72583. return _core.types.callExpression(file.addHelper("classPrivateFieldSet"), [this.receiver(member), _core.types.cloneNode(id), value2]);
  72584. },
  72585. destructureSet(member) {
  72586. const {
  72587. classRef,
  72588. privateNamesMap,
  72589. file
  72590. } = this;
  72591. const {
  72592. name: name2
  72593. } = member.node.property.id;
  72594. const {
  72595. id,
  72596. static: isStatic
  72597. } = privateNamesMap.get(name2);
  72598. if (isStatic) {
  72599. try {
  72600. var helper = file.addHelper("classStaticPrivateFieldDestructureSet");
  72601. } catch (_unused) {
  72602. throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \nplease update @babel/helpers to the latest version.");
  72603. }
  72604. return _core.types.memberExpression(_core.types.callExpression(helper, [this.receiver(member), _core.types.cloneNode(classRef), _core.types.cloneNode(id)]), _core.types.identifier("value"));
  72605. }
  72606. return _core.types.memberExpression(_core.types.callExpression(file.addHelper("classPrivateFieldDestructureSet"), [this.receiver(member), _core.types.cloneNode(id)]), _core.types.identifier("value"));
  72607. },
  72608. call(member, args) {
  72609. this.memoise(member, 1);
  72610. return (0, _helperOptimiseCallExpression.default)(this.get(member), this.receiver(member), args, false);
  72611. },
  72612. optionalCall(member, args) {
  72613. this.memoise(member, 1);
  72614. return (0, _helperOptimiseCallExpression.default)(this.get(member), this.receiver(member), args, true);
  72615. }
  72616. };
  72617. var privateNameHandlerLoose = {
  72618. get(member) {
  72619. const {
  72620. privateNamesMap,
  72621. file
  72622. } = this;
  72623. const {
  72624. object
  72625. } = member.node;
  72626. const {
  72627. name: name2
  72628. } = member.node.property.id;
  72629. return _core.template.expression`BASE(REF, PROP)[PROP]`({
  72630. BASE: file.addHelper("classPrivateFieldLooseBase"),
  72631. REF: _core.types.cloneNode(object),
  72632. PROP: _core.types.cloneNode(privateNamesMap.get(name2).id)
  72633. });
  72634. },
  72635. set() {
  72636. throw new Error("private name handler with loose = true don't need set()");
  72637. },
  72638. boundGet(member) {
  72639. return _core.types.callExpression(_core.types.memberExpression(this.get(member), _core.types.identifier("bind")), [_core.types.cloneNode(member.node.object)]);
  72640. },
  72641. simpleSet(member) {
  72642. return this.get(member);
  72643. },
  72644. destructureSet(member) {
  72645. return this.get(member);
  72646. },
  72647. call(member, args) {
  72648. return _core.types.callExpression(this.get(member), args);
  72649. },
  72650. optionalCall(member, args) {
  72651. return _core.types.optionalCallExpression(this.get(member), args, true);
  72652. }
  72653. };
  72654. function transformPrivateNamesUsage(ref3, path, privateNamesMap, {
  72655. privateFieldsAsProperties,
  72656. noDocumentAll,
  72657. innerBinding
  72658. }, state) {
  72659. if (!privateNamesMap.size)
  72660. return;
  72661. const body = path.get("body");
  72662. const handler = privateFieldsAsProperties ? privateNameHandlerLoose : privateNameHandlerSpec;
  72663. (0, _helperMemberExpressionToFunctions.default)(body, privateNameVisitor, Object.assign({
  72664. privateNamesMap,
  72665. classRef: ref3,
  72666. file: state
  72667. }, handler, {
  72668. noDocumentAll,
  72669. innerBinding
  72670. }));
  72671. body.traverse(privateInVisitor, {
  72672. privateNamesMap,
  72673. classRef: ref3,
  72674. file: state,
  72675. privateFieldsAsProperties,
  72676. innerBinding
  72677. });
  72678. }
  72679. function buildPrivateFieldInitLoose(ref3, prop, privateNamesMap) {
  72680. const {
  72681. id
  72682. } = privateNamesMap.get(prop.node.key.id.name);
  72683. const value2 = prop.node.value || prop.scope.buildUndefinedNode();
  72684. return inheritPropComments(_core.template.statement.ast`
  72685. Object.defineProperty(${ref3}, ${_core.types.cloneNode(id)}, {
  72686. // configurable is false by default
  72687. // enumerable is false by default
  72688. writable: true,
  72689. value: ${value2}
  72690. });
  72691. `, prop);
  72692. }
  72693. function buildPrivateInstanceFieldInitSpec(ref3, prop, privateNamesMap, state) {
  72694. const {
  72695. id
  72696. } = privateNamesMap.get(prop.node.key.id.name);
  72697. const value2 = prop.node.value || prop.scope.buildUndefinedNode();
  72698. {
  72699. if (!state.availableHelper("classPrivateFieldInitSpec")) {
  72700. return inheritPropComments(_core.template.statement.ast`${_core.types.cloneNode(id)}.set(${ref3}, {
  72701. // configurable is always false for private elements
  72702. // enumerable is always false for private elements
  72703. writable: true,
  72704. value: ${value2},
  72705. })`, prop);
  72706. }
  72707. }
  72708. const helper = state.addHelper("classPrivateFieldInitSpec");
  72709. return inheritPropComments(_core.template.statement.ast`${helper}(
  72710. ${_core.types.thisExpression()},
  72711. ${_core.types.cloneNode(id)},
  72712. {
  72713. writable: true,
  72714. value: ${value2}
  72715. },
  72716. )`, prop);
  72717. }
  72718. function buildPrivateStaticFieldInitSpec(prop, privateNamesMap) {
  72719. const privateName = privateNamesMap.get(prop.node.key.id.name);
  72720. const {
  72721. id,
  72722. getId,
  72723. setId,
  72724. initAdded
  72725. } = privateName;
  72726. const isAccessor = getId || setId;
  72727. if (!prop.isProperty() && (initAdded || !isAccessor))
  72728. return;
  72729. if (isAccessor) {
  72730. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  72731. initAdded: true
  72732. }));
  72733. return inheritPropComments(_core.template.statement.ast`
  72734. var ${_core.types.cloneNode(id)} = {
  72735. // configurable is false by default
  72736. // enumerable is false by default
  72737. // writable is false by default
  72738. get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},
  72739. set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}
  72740. }
  72741. `, prop);
  72742. }
  72743. const value2 = prop.node.value || prop.scope.buildUndefinedNode();
  72744. return inheritPropComments(_core.template.statement.ast`
  72745. var ${_core.types.cloneNode(id)} = {
  72746. // configurable is false by default
  72747. // enumerable is false by default
  72748. writable: true,
  72749. value: ${value2}
  72750. };
  72751. `, prop);
  72752. }
  72753. function buildPrivateMethodInitLoose(ref3, prop, privateNamesMap) {
  72754. const privateName = privateNamesMap.get(prop.node.key.id.name);
  72755. const {
  72756. methodId,
  72757. id,
  72758. getId,
  72759. setId,
  72760. initAdded
  72761. } = privateName;
  72762. if (initAdded)
  72763. return;
  72764. if (methodId) {
  72765. return inheritPropComments(_core.template.statement.ast`
  72766. Object.defineProperty(${ref3}, ${id}, {
  72767. // configurable is false by default
  72768. // enumerable is false by default
  72769. // writable is false by default
  72770. value: ${methodId.name}
  72771. });
  72772. `, prop);
  72773. }
  72774. const isAccessor = getId || setId;
  72775. if (isAccessor) {
  72776. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  72777. initAdded: true
  72778. }));
  72779. return inheritPropComments(_core.template.statement.ast`
  72780. Object.defineProperty(${ref3}, ${id}, {
  72781. // configurable is false by default
  72782. // enumerable is false by default
  72783. // writable is false by default
  72784. get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},
  72785. set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}
  72786. });
  72787. `, prop);
  72788. }
  72789. }
  72790. function buildPrivateInstanceMethodInitSpec(ref3, prop, privateNamesMap, state) {
  72791. const privateName = privateNamesMap.get(prop.node.key.id.name);
  72792. const {
  72793. getId,
  72794. setId,
  72795. initAdded
  72796. } = privateName;
  72797. if (initAdded)
  72798. return;
  72799. const isAccessor = getId || setId;
  72800. if (isAccessor) {
  72801. return buildPrivateAccessorInitialization(ref3, prop, privateNamesMap, state);
  72802. }
  72803. return buildPrivateInstanceMethodInitialization(ref3, prop, privateNamesMap, state);
  72804. }
  72805. function buildPrivateAccessorInitialization(ref3, prop, privateNamesMap, state) {
  72806. const privateName = privateNamesMap.get(prop.node.key.id.name);
  72807. const {
  72808. id,
  72809. getId,
  72810. setId
  72811. } = privateName;
  72812. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  72813. initAdded: true
  72814. }));
  72815. {
  72816. if (!state.availableHelper("classPrivateFieldInitSpec")) {
  72817. return inheritPropComments(_core.template.statement.ast`
  72818. ${id}.set(${ref3}, {
  72819. get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},
  72820. set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}
  72821. });
  72822. `, prop);
  72823. }
  72824. }
  72825. const helper = state.addHelper("classPrivateFieldInitSpec");
  72826. return inheritPropComments(_core.template.statement.ast`${helper}(
  72827. ${_core.types.thisExpression()},
  72828. ${_core.types.cloneNode(id)},
  72829. {
  72830. get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},
  72831. set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}
  72832. },
  72833. )`, prop);
  72834. }
  72835. function buildPrivateInstanceMethodInitialization(ref3, prop, privateNamesMap, state) {
  72836. const privateName = privateNamesMap.get(prop.node.key.id.name);
  72837. const {
  72838. id
  72839. } = privateName;
  72840. {
  72841. if (!state.availableHelper("classPrivateMethodInitSpec")) {
  72842. return inheritPropComments(_core.template.statement.ast`${id}.add(${ref3})`, prop);
  72843. }
  72844. }
  72845. const helper = state.addHelper("classPrivateMethodInitSpec");
  72846. return inheritPropComments(_core.template.statement.ast`${helper}(
  72847. ${_core.types.thisExpression()},
  72848. ${_core.types.cloneNode(id)}
  72849. )`, prop);
  72850. }
  72851. function buildPublicFieldInitLoose(ref3, prop) {
  72852. const {
  72853. key: key2,
  72854. computed
  72855. } = prop.node;
  72856. const value2 = prop.node.value || prop.scope.buildUndefinedNode();
  72857. return inheritPropComments(_core.types.expressionStatement(_core.types.assignmentExpression("=", _core.types.memberExpression(ref3, key2, computed || _core.types.isLiteral(key2)), value2)), prop);
  72858. }
  72859. function buildPublicFieldInitSpec(ref3, prop, state) {
  72860. const {
  72861. key: key2,
  72862. computed
  72863. } = prop.node;
  72864. const value2 = prop.node.value || prop.scope.buildUndefinedNode();
  72865. return inheritPropComments(_core.types.expressionStatement(_core.types.callExpression(state.addHelper("defineProperty"), [ref3, computed || _core.types.isLiteral(key2) ? key2 : _core.types.stringLiteral(key2.name), value2])), prop);
  72866. }
  72867. function buildPrivateStaticMethodInitLoose(ref3, prop, state, privateNamesMap) {
  72868. const privateName = privateNamesMap.get(prop.node.key.id.name);
  72869. const {
  72870. id,
  72871. methodId,
  72872. getId,
  72873. setId,
  72874. initAdded
  72875. } = privateName;
  72876. if (initAdded)
  72877. return;
  72878. const isAccessor = getId || setId;
  72879. if (isAccessor) {
  72880. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  72881. initAdded: true
  72882. }));
  72883. return inheritPropComments(_core.template.statement.ast`
  72884. Object.defineProperty(${ref3}, ${id}, {
  72885. // configurable is false by default
  72886. // enumerable is false by default
  72887. // writable is false by default
  72888. get: ${getId ? getId.name : prop.scope.buildUndefinedNode()},
  72889. set: ${setId ? setId.name : prop.scope.buildUndefinedNode()}
  72890. })
  72891. `, prop);
  72892. }
  72893. return inheritPropComments(_core.template.statement.ast`
  72894. Object.defineProperty(${ref3}, ${id}, {
  72895. // configurable is false by default
  72896. // enumerable is false by default
  72897. // writable is false by default
  72898. value: ${methodId.name}
  72899. });
  72900. `, prop);
  72901. }
  72902. function buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties = false) {
  72903. const privateName = privateNamesMap.get(prop.node.key.id.name);
  72904. const {
  72905. id,
  72906. methodId,
  72907. getId,
  72908. setId,
  72909. getterDeclared,
  72910. setterDeclared,
  72911. static: isStatic
  72912. } = privateName;
  72913. const {
  72914. params,
  72915. body,
  72916. generator,
  72917. async
  72918. } = prop.node;
  72919. const isGetter = getId && !getterDeclared && params.length === 0;
  72920. const isSetter = setId && !setterDeclared && params.length > 0;
  72921. let declId = methodId;
  72922. if (isGetter) {
  72923. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  72924. getterDeclared: true
  72925. }));
  72926. declId = getId;
  72927. } else if (isSetter) {
  72928. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  72929. setterDeclared: true
  72930. }));
  72931. declId = setId;
  72932. } else if (isStatic && !privateFieldsAsProperties) {
  72933. declId = id;
  72934. }
  72935. return inheritPropComments(_core.types.functionDeclaration(_core.types.cloneNode(declId), params, body, generator, async), prop);
  72936. }
  72937. var thisContextVisitor = _core.traverse.visitors.merge([{
  72938. ThisExpression(path, state) {
  72939. const parent = path.findParent((path2) => !(0, _helperSkipTransparentExpressionWrappers.isTransparentExprWrapper)(path2.node));
  72940. if (_core.types.isUnaryExpression(parent.node, {
  72941. operator: "delete"
  72942. })) {
  72943. path.parentPath.replaceWith(_core.types.booleanLiteral(true));
  72944. return;
  72945. }
  72946. state.needsClassRef = true;
  72947. path.replaceWith(_core.types.cloneNode(state.classRef));
  72948. },
  72949. MetaProperty(path) {
  72950. const meta = path.get("meta");
  72951. const property = path.get("property");
  72952. const {
  72953. scope
  72954. } = path;
  72955. if (meta.isIdentifier({
  72956. name: "new"
  72957. }) && property.isIdentifier({
  72958. name: "target"
  72959. })) {
  72960. path.replaceWith(scope.buildUndefinedNode());
  72961. }
  72962. }
  72963. }, _helperEnvironmentVisitor.default]);
  72964. var innerReferencesVisitor = {
  72965. ReferencedIdentifier(path, state) {
  72966. if (path.scope.bindingIdentifierEquals(path.node.name, state.innerBinding)) {
  72967. state.needsClassRef = true;
  72968. path.node.name = state.classRef.name;
  72969. }
  72970. }
  72971. };
  72972. function replaceThisContext(path, ref3, getSuperRef, file, isStaticBlock, constantSuper, innerBindingRef) {
  72973. var _state$classRef;
  72974. const state = {
  72975. classRef: ref3,
  72976. needsClassRef: false,
  72977. innerBinding: innerBindingRef
  72978. };
  72979. const replacer = new _helperReplaceSupers.default({
  72980. methodPath: path,
  72981. constantSuper,
  72982. file,
  72983. refToPreserve: ref3,
  72984. getSuperRef,
  72985. getObjectRef() {
  72986. state.needsClassRef = true;
  72987. return _core.types.isStaticBlock != null && _core.types.isStaticBlock(path.node) || path.node.static ? ref3 : _core.types.memberExpression(ref3, _core.types.identifier("prototype"));
  72988. }
  72989. });
  72990. replacer.replace();
  72991. if (isStaticBlock || path.isProperty()) {
  72992. path.traverse(thisContextVisitor, state);
  72993. }
  72994. if (innerBindingRef != null && (_state$classRef = state.classRef) != null && _state$classRef.name && state.classRef.name !== (innerBindingRef == null ? void 0 : innerBindingRef.name)) {
  72995. path.traverse(innerReferencesVisitor, state);
  72996. }
  72997. return state.needsClassRef;
  72998. }
  72999. function isNameOrLength({
  73000. key: key2,
  73001. computed
  73002. }) {
  73003. if (key2.type === "Identifier") {
  73004. return !computed && (key2.name === "name" || key2.name === "length");
  73005. }
  73006. if (key2.type === "StringLiteral") {
  73007. return key2.value === "name" || key2.value === "length";
  73008. }
  73009. return false;
  73010. }
  73011. function inheritPropComments(node2, prop) {
  73012. _core.types.inheritLeadingComments(node2, prop.node);
  73013. _core.types.inheritInnerComments(node2, prop.node);
  73014. return node2;
  73015. }
  73016. function buildFieldsInitNodes(ref3, superRef, props, privateNamesMap, state, setPublicClassFields, privateFieldsAsProperties, constantSuper, innerBindingRef) {
  73017. let needsClassRef = false;
  73018. let injectSuperRef;
  73019. const staticNodes = [];
  73020. const instanceNodes = [];
  73021. const pureStaticNodes = [];
  73022. const getSuperRef = _core.types.isIdentifier(superRef) ? () => superRef : () => {
  73023. var _injectSuperRef;
  73024. (_injectSuperRef = injectSuperRef) != null ? _injectSuperRef : injectSuperRef = props[0].scope.generateUidIdentifierBasedOnNode(superRef);
  73025. return injectSuperRef;
  73026. };
  73027. for (const prop of props) {
  73028. prop.isClassProperty() && ts.assertFieldTransformed(prop);
  73029. const isStatic = !(_core.types.isStaticBlock != null && _core.types.isStaticBlock(prop.node)) && prop.node.static;
  73030. const isInstance = !isStatic;
  73031. const isPrivate = prop.isPrivate();
  73032. const isPublic = !isPrivate;
  73033. const isField = prop.isProperty();
  73034. const isMethod = !isField;
  73035. const isStaticBlock = prop.isStaticBlock == null ? void 0 : prop.isStaticBlock();
  73036. if (isStatic || isMethod && isPrivate || isStaticBlock) {
  73037. const replaced = replaceThisContext(prop, ref3, getSuperRef, state, isStaticBlock, constantSuper, innerBindingRef);
  73038. needsClassRef = needsClassRef || replaced;
  73039. }
  73040. switch (true) {
  73041. case isStaticBlock: {
  73042. const blockBody = prop.node.body;
  73043. if (blockBody.length === 1 && _core.types.isExpressionStatement(blockBody[0])) {
  73044. staticNodes.push(inheritPropComments(blockBody[0], prop));
  73045. } else {
  73046. staticNodes.push(_core.types.inheritsComments(_core.template.statement.ast`(() => { ${blockBody} })()`, prop.node));
  73047. }
  73048. break;
  73049. }
  73050. case (isStatic && isPrivate && isField && privateFieldsAsProperties):
  73051. needsClassRef = true;
  73052. staticNodes.push(buildPrivateFieldInitLoose(_core.types.cloneNode(ref3), prop, privateNamesMap));
  73053. break;
  73054. case (isStatic && isPrivate && isField && !privateFieldsAsProperties):
  73055. needsClassRef = true;
  73056. staticNodes.push(buildPrivateStaticFieldInitSpec(prop, privateNamesMap));
  73057. break;
  73058. case (isStatic && isPublic && isField && setPublicClassFields):
  73059. if (!isNameOrLength(prop.node)) {
  73060. needsClassRef = true;
  73061. staticNodes.push(buildPublicFieldInitLoose(_core.types.cloneNode(ref3), prop));
  73062. break;
  73063. }
  73064. case (isStatic && isPublic && isField && !setPublicClassFields):
  73065. needsClassRef = true;
  73066. staticNodes.push(buildPublicFieldInitSpec(_core.types.cloneNode(ref3), prop, state));
  73067. break;
  73068. case (isInstance && isPrivate && isField && privateFieldsAsProperties):
  73069. instanceNodes.push(buildPrivateFieldInitLoose(_core.types.thisExpression(), prop, privateNamesMap));
  73070. break;
  73071. case (isInstance && isPrivate && isField && !privateFieldsAsProperties):
  73072. instanceNodes.push(buildPrivateInstanceFieldInitSpec(_core.types.thisExpression(), prop, privateNamesMap, state));
  73073. break;
  73074. case (isInstance && isPrivate && isMethod && privateFieldsAsProperties):
  73075. instanceNodes.unshift(buildPrivateMethodInitLoose(_core.types.thisExpression(), prop, privateNamesMap));
  73076. pureStaticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties));
  73077. break;
  73078. case (isInstance && isPrivate && isMethod && !privateFieldsAsProperties):
  73079. instanceNodes.unshift(buildPrivateInstanceMethodInitSpec(_core.types.thisExpression(), prop, privateNamesMap, state));
  73080. pureStaticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties));
  73081. break;
  73082. case (isStatic && isPrivate && isMethod && !privateFieldsAsProperties):
  73083. needsClassRef = true;
  73084. staticNodes.unshift(buildPrivateStaticFieldInitSpec(prop, privateNamesMap));
  73085. pureStaticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties));
  73086. break;
  73087. case (isStatic && isPrivate && isMethod && privateFieldsAsProperties):
  73088. needsClassRef = true;
  73089. staticNodes.unshift(buildPrivateStaticMethodInitLoose(_core.types.cloneNode(ref3), prop, state, privateNamesMap));
  73090. pureStaticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties));
  73091. break;
  73092. case (isInstance && isPublic && isField && setPublicClassFields):
  73093. instanceNodes.push(buildPublicFieldInitLoose(_core.types.thisExpression(), prop));
  73094. break;
  73095. case (isInstance && isPublic && isField && !setPublicClassFields):
  73096. instanceNodes.push(buildPublicFieldInitSpec(_core.types.thisExpression(), prop, state));
  73097. break;
  73098. default:
  73099. throw new Error("Unreachable.");
  73100. }
  73101. }
  73102. return {
  73103. staticNodes: staticNodes.filter(Boolean),
  73104. instanceNodes: instanceNodes.filter(Boolean),
  73105. pureStaticNodes: pureStaticNodes.filter(Boolean),
  73106. wrapClass(path) {
  73107. for (const prop of props) {
  73108. prop.node.leadingComments = null;
  73109. prop.remove();
  73110. }
  73111. if (injectSuperRef) {
  73112. path.scope.push({
  73113. id: _core.types.cloneNode(injectSuperRef)
  73114. });
  73115. path.set("superClass", _core.types.assignmentExpression("=", injectSuperRef, path.node.superClass));
  73116. }
  73117. if (!needsClassRef)
  73118. return path;
  73119. if (path.isClassExpression()) {
  73120. path.scope.push({
  73121. id: ref3
  73122. });
  73123. path.replaceWith(_core.types.assignmentExpression("=", _core.types.cloneNode(ref3), path.node));
  73124. } else if (!path.node.id) {
  73125. path.node.id = ref3;
  73126. }
  73127. return path;
  73128. }
  73129. };
  73130. }
  73131. }
  73132. });
  73133. // node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js
  73134. var require_decorators = __commonJS({
  73135. "node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js"(exports) {
  73136. "use strict";
  73137. Object.defineProperty(exports, "__esModule", {
  73138. value: true
  73139. });
  73140. exports.buildDecoratedClass = buildDecoratedClass;
  73141. exports.hasDecorators = hasDecorators;
  73142. exports.hasOwnDecorators = hasOwnDecorators;
  73143. var _core = require_lib32();
  73144. var _helperReplaceSupers = require_lib24();
  73145. var _helperFunctionName = require_lib12();
  73146. function hasOwnDecorators(node2) {
  73147. return !!(node2.decorators && node2.decorators.length);
  73148. }
  73149. function hasDecorators(node2) {
  73150. return hasOwnDecorators(node2) || node2.body.body.some(hasOwnDecorators);
  73151. }
  73152. function prop(key2, value2) {
  73153. if (!value2)
  73154. return null;
  73155. return _core.types.objectProperty(_core.types.identifier(key2), value2);
  73156. }
  73157. function method(key2, body) {
  73158. return _core.types.objectMethod("method", _core.types.identifier(key2), [], _core.types.blockStatement(body));
  73159. }
  73160. function takeDecorators(node2) {
  73161. let result;
  73162. if (node2.decorators && node2.decorators.length > 0) {
  73163. result = _core.types.arrayExpression(node2.decorators.map((decorator) => decorator.expression));
  73164. }
  73165. node2.decorators = void 0;
  73166. return result;
  73167. }
  73168. function getKey(node2) {
  73169. if (node2.computed) {
  73170. return node2.key;
  73171. } else if (_core.types.isIdentifier(node2.key)) {
  73172. return _core.types.stringLiteral(node2.key.name);
  73173. } else {
  73174. return _core.types.stringLiteral(String(node2.key.value));
  73175. }
  73176. }
  73177. function extractElementDescriptor(file, classRef, superRef, path) {
  73178. const isMethod = path.isClassMethod();
  73179. if (path.isPrivate()) {
  73180. throw path.buildCodeFrameError(`Private ${isMethod ? "methods" : "fields"} in decorated classes are not supported yet.`);
  73181. }
  73182. if (path.node.type === "ClassAccessorProperty") {
  73183. throw path.buildCodeFrameError(`Accessor properties are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } instead.`);
  73184. }
  73185. if (path.node.type === "StaticBlock") {
  73186. throw path.buildCodeFrameError(`Static blocks are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } instead.`);
  73187. }
  73188. const {
  73189. node: node2,
  73190. scope
  73191. } = path;
  73192. if (!path.isTSDeclareMethod()) {
  73193. new _helperReplaceSupers.default({
  73194. methodPath: path,
  73195. objectRef: classRef,
  73196. superRef,
  73197. file,
  73198. refToPreserve: classRef
  73199. }).replace();
  73200. }
  73201. const properties = [prop("kind", _core.types.stringLiteral(_core.types.isClassMethod(node2) ? node2.kind : "field")), prop("decorators", takeDecorators(node2)), prop("static", node2.static && _core.types.booleanLiteral(true)), prop("key", getKey(node2))].filter(Boolean);
  73202. if (_core.types.isClassMethod(node2)) {
  73203. const id = node2.computed ? null : node2.key;
  73204. const transformed = _core.types.toExpression(node2);
  73205. properties.push(prop("value", (0, _helperFunctionName.default)({
  73206. node: transformed,
  73207. id,
  73208. scope
  73209. }) || transformed));
  73210. } else if (_core.types.isClassProperty(node2) && node2.value) {
  73211. properties.push(method("value", _core.template.statements.ast`return ${node2.value}`));
  73212. } else {
  73213. properties.push(prop("value", scope.buildUndefinedNode()));
  73214. }
  73215. path.remove();
  73216. return _core.types.objectExpression(properties);
  73217. }
  73218. function addDecorateHelper(file) {
  73219. return file.addHelper("decorate");
  73220. }
  73221. function buildDecoratedClass(ref3, path, elements, file) {
  73222. const {
  73223. node: node2,
  73224. scope
  73225. } = path;
  73226. const initializeId = scope.generateUidIdentifier("initialize");
  73227. const isDeclaration2 = node2.id && path.isDeclaration();
  73228. const isStrict = path.isInStrictMode();
  73229. const {
  73230. superClass
  73231. } = node2;
  73232. node2.type = "ClassDeclaration";
  73233. if (!node2.id)
  73234. node2.id = _core.types.cloneNode(ref3);
  73235. let superId;
  73236. if (superClass) {
  73237. superId = scope.generateUidIdentifierBasedOnNode(node2.superClass, "super");
  73238. node2.superClass = superId;
  73239. }
  73240. const classDecorators = takeDecorators(node2);
  73241. const definitions2 = _core.types.arrayExpression(elements.filter((element2) => !element2.node.abstract && element2.node.type !== "TSIndexSignature").map((path2) => extractElementDescriptor(file, node2.id, superId, path2)));
  73242. const wrapperCall = _core.template.expression.ast`
  73243. ${addDecorateHelper(file)}(
  73244. ${classDecorators || _core.types.nullLiteral()},
  73245. function (${initializeId}, ${superClass ? _core.types.cloneNode(superId) : null}) {
  73246. ${node2}
  73247. return { F: ${_core.types.cloneNode(node2.id)}, d: ${definitions2} };
  73248. },
  73249. ${superClass}
  73250. )
  73251. `;
  73252. if (!isStrict) {
  73253. wrapperCall.arguments[1].body.directives.push(_core.types.directive(_core.types.directiveLiteral("use strict")));
  73254. }
  73255. let replacement = wrapperCall;
  73256. let classPathDesc = "arguments.1.body.body.0";
  73257. if (isDeclaration2) {
  73258. replacement = _core.template.statement.ast`let ${ref3} = ${wrapperCall}`;
  73259. classPathDesc = "declarations.0.init." + classPathDesc;
  73260. }
  73261. return {
  73262. instanceNodes: [_core.template.statement.ast`${_core.types.cloneNode(initializeId)}(this)`],
  73263. wrapClass(path2) {
  73264. path2.replaceWith(replacement);
  73265. return path2.get(classPathDesc);
  73266. }
  73267. };
  73268. }
  73269. }
  73270. });
  73271. // node_modules/@babel/helper-create-class-features-plugin/lib/misc.js
  73272. var require_misc2 = __commonJS({
  73273. "node_modules/@babel/helper-create-class-features-plugin/lib/misc.js"(exports) {
  73274. "use strict";
  73275. Object.defineProperty(exports, "__esModule", {
  73276. value: true
  73277. });
  73278. exports.extractComputedKeys = extractComputedKeys;
  73279. exports.injectInitialization = injectInitialization;
  73280. var _core = require_lib32();
  73281. var _helperEnvironmentVisitor = require_lib6();
  73282. var findBareSupers = _core.traverse.visitors.merge([{
  73283. Super(path) {
  73284. const {
  73285. node: node2,
  73286. parentPath
  73287. } = path;
  73288. if (parentPath.isCallExpression({
  73289. callee: node2
  73290. })) {
  73291. this.push(parentPath);
  73292. }
  73293. }
  73294. }, _helperEnvironmentVisitor.default]);
  73295. var referenceVisitor = {
  73296. "TSTypeAnnotation|TypeAnnotation"(path) {
  73297. path.skip();
  73298. },
  73299. ReferencedIdentifier(path, {
  73300. scope
  73301. }) {
  73302. if (scope.hasOwnBinding(path.node.name)) {
  73303. scope.rename(path.node.name);
  73304. path.skip();
  73305. }
  73306. }
  73307. };
  73308. function handleClassTDZ(path, state) {
  73309. if (state.classBinding && state.classBinding === path.scope.getBinding(path.node.name)) {
  73310. const classNameTDZError = state.file.addHelper("classNameTDZError");
  73311. const throwNode = _core.types.callExpression(classNameTDZError, [_core.types.stringLiteral(path.node.name)]);
  73312. path.replaceWith(_core.types.sequenceExpression([throwNode, path.node]));
  73313. path.skip();
  73314. }
  73315. }
  73316. var classFieldDefinitionEvaluationTDZVisitor = {
  73317. ReferencedIdentifier: handleClassTDZ
  73318. };
  73319. function injectInitialization(path, constructor, nodes, renamer) {
  73320. if (!nodes.length)
  73321. return;
  73322. const isDerived = !!path.node.superClass;
  73323. if (!constructor) {
  73324. const newConstructor = _core.types.classMethod("constructor", _core.types.identifier("constructor"), [], _core.types.blockStatement([]));
  73325. if (isDerived) {
  73326. newConstructor.params = [_core.types.restElement(_core.types.identifier("args"))];
  73327. newConstructor.body.body.push(_core.template.statement.ast`super(...args)`);
  73328. }
  73329. [constructor] = path.get("body").unshiftContainer("body", newConstructor);
  73330. }
  73331. if (renamer) {
  73332. renamer(referenceVisitor, {
  73333. scope: constructor.scope
  73334. });
  73335. }
  73336. if (isDerived) {
  73337. const bareSupers = [];
  73338. constructor.traverse(findBareSupers, bareSupers);
  73339. let isFirst = true;
  73340. for (const bareSuper of bareSupers) {
  73341. if (isFirst) {
  73342. bareSuper.insertAfter(nodes);
  73343. isFirst = false;
  73344. } else {
  73345. bareSuper.insertAfter(nodes.map((n) => _core.types.cloneNode(n)));
  73346. }
  73347. }
  73348. } else {
  73349. constructor.get("body").unshiftContainer("body", nodes);
  73350. }
  73351. }
  73352. function extractComputedKeys(path, computedPaths, file) {
  73353. const declarations = [];
  73354. const state = {
  73355. classBinding: path.node.id && path.scope.getBinding(path.node.id.name),
  73356. file
  73357. };
  73358. for (const computedPath of computedPaths) {
  73359. const computedKey = computedPath.get("key");
  73360. if (computedKey.isReferencedIdentifier()) {
  73361. handleClassTDZ(computedKey, state);
  73362. } else {
  73363. computedKey.traverse(classFieldDefinitionEvaluationTDZVisitor, state);
  73364. }
  73365. const computedNode = computedPath.node;
  73366. if (!computedKey.isConstantExpression()) {
  73367. const ident = path.scope.generateUidIdentifierBasedOnNode(computedNode.key);
  73368. path.scope.push({
  73369. id: ident,
  73370. kind: "let"
  73371. });
  73372. declarations.push(_core.types.expressionStatement(_core.types.assignmentExpression("=", _core.types.cloneNode(ident), computedNode.key)));
  73373. computedNode.key = _core.types.cloneNode(ident);
  73374. }
  73375. }
  73376. return declarations;
  73377. }
  73378. }
  73379. });
  73380. // node_modules/@babel/helper-create-class-features-plugin/lib/features.js
  73381. var require_features = __commonJS({
  73382. "node_modules/@babel/helper-create-class-features-plugin/lib/features.js"(exports) {
  73383. "use strict";
  73384. Object.defineProperty(exports, "__esModule", {
  73385. value: true
  73386. });
  73387. exports.FEATURES = void 0;
  73388. exports.enableFeature = enableFeature;
  73389. exports.isLoose = isLoose;
  73390. exports.shouldTransform = shouldTransform;
  73391. var _decorators = require_decorators();
  73392. var FEATURES = Object.freeze({
  73393. fields: 1 << 1,
  73394. privateMethods: 1 << 2,
  73395. decorators: 1 << 3,
  73396. privateIn: 1 << 4,
  73397. staticBlocks: 1 << 5
  73398. });
  73399. exports.FEATURES = FEATURES;
  73400. var featuresSameLoose = /* @__PURE__ */ new Map([[FEATURES.fields, "@babel/plugin-proposal-class-properties"], [FEATURES.privateMethods, "@babel/plugin-proposal-private-methods"], [FEATURES.privateIn, "@babel/plugin-proposal-private-property-in-object"]]);
  73401. var featuresKey = "@babel/plugin-class-features/featuresKey";
  73402. var looseKey = "@babel/plugin-class-features/looseKey";
  73403. var looseLowPriorityKey = "@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing";
  73404. function enableFeature(file, feature, loose) {
  73405. if (!hasFeature(file, feature) || canIgnoreLoose(file, feature)) {
  73406. file.set(featuresKey, file.get(featuresKey) | feature);
  73407. if (loose === "#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error") {
  73408. setLoose(file, feature, true);
  73409. file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature);
  73410. } else if (loose === "#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error") {
  73411. setLoose(file, feature, false);
  73412. file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature);
  73413. } else {
  73414. setLoose(file, feature, loose);
  73415. }
  73416. }
  73417. let resolvedLoose;
  73418. let higherPriorityPluginName;
  73419. for (const [mask, name2] of featuresSameLoose) {
  73420. if (!hasFeature(file, mask))
  73421. continue;
  73422. const loose2 = isLoose(file, mask);
  73423. if (canIgnoreLoose(file, mask)) {
  73424. continue;
  73425. } else if (resolvedLoose === !loose2) {
  73426. throw new Error("'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled).");
  73427. } else {
  73428. resolvedLoose = loose2;
  73429. higherPriorityPluginName = name2;
  73430. }
  73431. }
  73432. if (resolvedLoose !== void 0) {
  73433. for (const [mask, name2] of featuresSameLoose) {
  73434. if (hasFeature(file, mask) && isLoose(file, mask) !== resolvedLoose) {
  73435. setLoose(file, mask, resolvedLoose);
  73436. console.warn(`Though the "loose" option was set to "${!resolvedLoose}" in your @babel/preset-env config, it will not be used for ${name2} since the "loose" mode option was set to "${resolvedLoose}" for ${higherPriorityPluginName}.
  73437. The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
  73438. ["${name2}", { "loose": ${resolvedLoose} }]
  73439. to the "plugins" section of your Babel config.`);
  73440. }
  73441. }
  73442. }
  73443. }
  73444. function hasFeature(file, feature) {
  73445. return !!(file.get(featuresKey) & feature);
  73446. }
  73447. function isLoose(file, feature) {
  73448. return !!(file.get(looseKey) & feature);
  73449. }
  73450. function setLoose(file, feature, loose) {
  73451. if (loose)
  73452. file.set(looseKey, file.get(looseKey) | feature);
  73453. else
  73454. file.set(looseKey, file.get(looseKey) & ~feature);
  73455. file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) & ~feature);
  73456. }
  73457. function canIgnoreLoose(file, feature) {
  73458. return !!(file.get(looseLowPriorityKey) & feature);
  73459. }
  73460. function shouldTransform(path, file) {
  73461. let decoratorPath = null;
  73462. let publicFieldPath = null;
  73463. let privateFieldPath = null;
  73464. let privateMethodPath = null;
  73465. let staticBlockPath = null;
  73466. if ((0, _decorators.hasOwnDecorators)(path.node)) {
  73467. decoratorPath = path.get("decorators.0");
  73468. }
  73469. for (const el of path.get("body.body")) {
  73470. if (!decoratorPath && (0, _decorators.hasOwnDecorators)(el.node)) {
  73471. decoratorPath = el.get("decorators.0");
  73472. }
  73473. if (!publicFieldPath && el.isClassProperty()) {
  73474. publicFieldPath = el;
  73475. }
  73476. if (!privateFieldPath && el.isClassPrivateProperty()) {
  73477. privateFieldPath = el;
  73478. }
  73479. if (!privateMethodPath && el.isClassPrivateMethod != null && el.isClassPrivateMethod()) {
  73480. privateMethodPath = el;
  73481. }
  73482. if (!staticBlockPath && el.isStaticBlock != null && el.isStaticBlock()) {
  73483. staticBlockPath = el;
  73484. }
  73485. }
  73486. if (decoratorPath && privateFieldPath) {
  73487. throw privateFieldPath.buildCodeFrameError("Private fields in decorated classes are not supported yet.");
  73488. }
  73489. if (decoratorPath && privateMethodPath) {
  73490. throw privateMethodPath.buildCodeFrameError("Private methods in decorated classes are not supported yet.");
  73491. }
  73492. if (decoratorPath && !hasFeature(file, FEATURES.decorators)) {
  73493. throw path.buildCodeFrameError('Decorators are not enabled.\nIf you are using ["@babel/plugin-proposal-decorators", { "version": "legacy" }], make sure it comes *before* "@babel/plugin-proposal-class-properties" and enable loose mode, like so:\n ["@babel/plugin-proposal-decorators", { "version": "legacy" }]\n ["@babel/plugin-proposal-class-properties", { "loose": true }]');
  73494. }
  73495. if (privateMethodPath && !hasFeature(file, FEATURES.privateMethods)) {
  73496. throw privateMethodPath.buildCodeFrameError("Class private methods are not enabled. Please add `@babel/plugin-proposal-private-methods` to your configuration.");
  73497. }
  73498. if ((publicFieldPath || privateFieldPath) && !hasFeature(file, FEATURES.fields) && !hasFeature(file, FEATURES.privateMethods)) {
  73499. throw path.buildCodeFrameError("Class fields are not enabled. Please add `@babel/plugin-proposal-class-properties` to your configuration.");
  73500. }
  73501. if (staticBlockPath && !hasFeature(file, FEATURES.staticBlocks)) {
  73502. throw path.buildCodeFrameError("Static class blocks are not enabled. Please add `@babel/plugin-proposal-class-static-block` to your configuration.");
  73503. }
  73504. if (decoratorPath || privateMethodPath || staticBlockPath) {
  73505. return true;
  73506. }
  73507. if ((publicFieldPath || privateFieldPath) && hasFeature(file, FEATURES.fields)) {
  73508. return true;
  73509. }
  73510. return false;
  73511. }
  73512. }
  73513. });
  73514. // node_modules/@babel/helper-create-class-features-plugin/lib/index.js
  73515. var require_lib27 = __commonJS({
  73516. "node_modules/@babel/helper-create-class-features-plugin/lib/index.js"(exports) {
  73517. "use strict";
  73518. Object.defineProperty(exports, "__esModule", {
  73519. value: true
  73520. });
  73521. Object.defineProperty(exports, "FEATURES", {
  73522. enumerable: true,
  73523. get: function() {
  73524. return _features.FEATURES;
  73525. }
  73526. });
  73527. Object.defineProperty(exports, "buildCheckInRHS", {
  73528. enumerable: true,
  73529. get: function() {
  73530. return _fields.buildCheckInRHS;
  73531. }
  73532. });
  73533. exports.createClassFeaturePlugin = createClassFeaturePlugin;
  73534. Object.defineProperty(exports, "enableFeature", {
  73535. enumerable: true,
  73536. get: function() {
  73537. return _features.enableFeature;
  73538. }
  73539. });
  73540. Object.defineProperty(exports, "injectInitialization", {
  73541. enumerable: true,
  73542. get: function() {
  73543. return _misc.injectInitialization;
  73544. }
  73545. });
  73546. var _core = require_lib32();
  73547. var _helperFunctionName = require_lib12();
  73548. var _helperSplitExportDeclaration = require_lib5();
  73549. var _fields = require_fields();
  73550. var _decorators = require_decorators();
  73551. var _misc = require_misc2();
  73552. var _features = require_features();
  73553. var _typescript = require_typescript3();
  73554. var version3 = "7.21.4".split(".").reduce((v, x) => v * 1e5 + +x, 0);
  73555. var versionKey = "@babel/plugin-class-features/version";
  73556. function createClassFeaturePlugin({
  73557. name: name2,
  73558. feature,
  73559. loose,
  73560. manipulateOptions,
  73561. api = {
  73562. assumption: () => void 0
  73563. },
  73564. inherits
  73565. }) {
  73566. const setPublicClassFields = api.assumption("setPublicClassFields");
  73567. const privateFieldsAsSymbols = api.assumption("privateFieldsAsSymbols");
  73568. const privateFieldsAsProperties = api.assumption("privateFieldsAsProperties");
  73569. const constantSuper = api.assumption("constantSuper");
  73570. const noDocumentAll = api.assumption("noDocumentAll");
  73571. if (privateFieldsAsProperties && privateFieldsAsSymbols) {
  73572. throw new Error(`Cannot enable both the "privateFieldsAsProperties" and "privateFieldsAsSymbols" assumptions as the same time.`);
  73573. }
  73574. const privateFieldsAsSymbolsOrProperties = privateFieldsAsProperties || privateFieldsAsSymbols;
  73575. if (loose === true) {
  73576. const explicit = [];
  73577. if (setPublicClassFields !== void 0) {
  73578. explicit.push(`"setPublicClassFields"`);
  73579. }
  73580. if (privateFieldsAsProperties !== void 0) {
  73581. explicit.push(`"privateFieldsAsProperties"`);
  73582. }
  73583. if (privateFieldsAsSymbols !== void 0) {
  73584. explicit.push(`"privateFieldsAsSymbols"`);
  73585. }
  73586. if (explicit.length !== 0) {
  73587. console.warn(`[${name2}]: You are using the "loose: true" option and you are explicitly setting a value for the ${explicit.join(" and ")} assumption${explicit.length > 1 ? "s" : ""}. The "loose" option can cause incompatibilities with the other class features plugins, so it's recommended that you replace it with the following top-level option:
  73588. "assumptions": {
  73589. "setPublicClassFields": true,
  73590. "privateFieldsAsSymbols": true
  73591. }`);
  73592. }
  73593. }
  73594. return {
  73595. name: name2,
  73596. manipulateOptions,
  73597. inherits,
  73598. pre(file) {
  73599. (0, _features.enableFeature)(file, feature, loose);
  73600. if (!file.get(versionKey) || file.get(versionKey) < version3) {
  73601. file.set(versionKey, version3);
  73602. }
  73603. },
  73604. visitor: {
  73605. Class(path, {
  73606. file
  73607. }) {
  73608. if (file.get(versionKey) !== version3)
  73609. return;
  73610. if (!(0, _features.shouldTransform)(path, file))
  73611. return;
  73612. if (path.isClassDeclaration())
  73613. (0, _typescript.assertFieldTransformed)(path);
  73614. const loose2 = (0, _features.isLoose)(file, feature);
  73615. let constructor;
  73616. const isDecorated = (0, _decorators.hasDecorators)(path.node);
  73617. const props = [];
  73618. const elements = [];
  73619. const computedPaths = [];
  73620. const privateNames = /* @__PURE__ */ new Set();
  73621. const body = path.get("body");
  73622. for (const path2 of body.get("body")) {
  73623. if ((path2.isClassProperty() || path2.isClassMethod()) && path2.node.computed) {
  73624. computedPaths.push(path2);
  73625. }
  73626. if (path2.isPrivate()) {
  73627. const {
  73628. name: name3
  73629. } = path2.node.key.id;
  73630. const getName = `get ${name3}`;
  73631. const setName = `set ${name3}`;
  73632. if (path2.isClassPrivateMethod()) {
  73633. if (path2.node.kind === "get") {
  73634. if (privateNames.has(getName) || privateNames.has(name3) && !privateNames.has(setName)) {
  73635. throw path2.buildCodeFrameError("Duplicate private field");
  73636. }
  73637. privateNames.add(getName).add(name3);
  73638. } else if (path2.node.kind === "set") {
  73639. if (privateNames.has(setName) || privateNames.has(name3) && !privateNames.has(getName)) {
  73640. throw path2.buildCodeFrameError("Duplicate private field");
  73641. }
  73642. privateNames.add(setName).add(name3);
  73643. }
  73644. } else {
  73645. if (privateNames.has(name3) && !privateNames.has(getName) && !privateNames.has(setName) || privateNames.has(name3) && (privateNames.has(getName) || privateNames.has(setName))) {
  73646. throw path2.buildCodeFrameError("Duplicate private field");
  73647. }
  73648. privateNames.add(name3);
  73649. }
  73650. }
  73651. if (path2.isClassMethod({
  73652. kind: "constructor"
  73653. })) {
  73654. constructor = path2;
  73655. } else {
  73656. elements.push(path2);
  73657. if (path2.isProperty() || path2.isPrivate() || path2.isStaticBlock != null && path2.isStaticBlock()) {
  73658. props.push(path2);
  73659. }
  73660. }
  73661. }
  73662. {
  73663. if (!props.length && !isDecorated)
  73664. return;
  73665. }
  73666. const innerBinding = path.node.id;
  73667. let ref3;
  73668. if (!innerBinding || path.isClassExpression()) {
  73669. (0, _helperFunctionName.default)(path);
  73670. ref3 = path.scope.generateUidIdentifier("class");
  73671. } else {
  73672. ref3 = _core.types.cloneNode(path.node.id);
  73673. }
  73674. const privateNamesMap = (0, _fields.buildPrivateNamesMap)(props);
  73675. const privateNamesNodes = (0, _fields.buildPrivateNamesNodes)(privateNamesMap, privateFieldsAsProperties != null ? privateFieldsAsProperties : loose2, privateFieldsAsSymbols != null ? privateFieldsAsSymbols : false, file);
  73676. (0, _fields.transformPrivateNamesUsage)(ref3, path, privateNamesMap, {
  73677. privateFieldsAsProperties: privateFieldsAsSymbolsOrProperties != null ? privateFieldsAsSymbolsOrProperties : loose2,
  73678. noDocumentAll,
  73679. innerBinding
  73680. }, file);
  73681. let keysNodes, staticNodes, instanceNodes, pureStaticNodes, wrapClass;
  73682. {
  73683. if (isDecorated) {
  73684. staticNodes = pureStaticNodes = keysNodes = [];
  73685. ({
  73686. instanceNodes,
  73687. wrapClass
  73688. } = (0, _decorators.buildDecoratedClass)(ref3, path, elements, file));
  73689. } else {
  73690. keysNodes = (0, _misc.extractComputedKeys)(path, computedPaths, file);
  73691. ({
  73692. staticNodes,
  73693. pureStaticNodes,
  73694. instanceNodes,
  73695. wrapClass
  73696. } = (0, _fields.buildFieldsInitNodes)(ref3, path.node.superClass, props, privateNamesMap, file, setPublicClassFields != null ? setPublicClassFields : loose2, privateFieldsAsSymbolsOrProperties != null ? privateFieldsAsSymbolsOrProperties : loose2, constantSuper != null ? constantSuper : loose2, innerBinding));
  73697. }
  73698. }
  73699. if (instanceNodes.length > 0) {
  73700. (0, _misc.injectInitialization)(path, constructor, instanceNodes, (referenceVisitor, state) => {
  73701. {
  73702. if (isDecorated)
  73703. return;
  73704. }
  73705. for (const prop of props) {
  73706. if (_core.types.isStaticBlock != null && _core.types.isStaticBlock(prop.node) || prop.node.static)
  73707. continue;
  73708. prop.traverse(referenceVisitor, state);
  73709. }
  73710. });
  73711. }
  73712. const wrappedPath = wrapClass(path);
  73713. wrappedPath.insertBefore([...privateNamesNodes, ...keysNodes]);
  73714. if (staticNodes.length > 0) {
  73715. wrappedPath.insertAfter(staticNodes);
  73716. }
  73717. if (pureStaticNodes.length > 0) {
  73718. wrappedPath.find((parent) => parent.isStatement() || parent.isDeclaration()).insertAfter(pureStaticNodes);
  73719. }
  73720. },
  73721. ExportDefaultDeclaration(path, {
  73722. file
  73723. }) {
  73724. {
  73725. if (file.get(versionKey) !== version3)
  73726. return;
  73727. const decl = path.get("declaration");
  73728. if (decl.isClassDeclaration() && (0, _decorators.hasDecorators)(decl.node)) {
  73729. if (decl.node.id) {
  73730. (0, _helperSplitExportDeclaration.default)(path);
  73731. } else {
  73732. decl.node.type = "ClassExpression";
  73733. }
  73734. }
  73735. }
  73736. }
  73737. }
  73738. };
  73739. }
  73740. }
  73741. });
  73742. // node_modules/@babel/plugin-transform-typescript/lib/enum.js
  73743. var require_enum = __commonJS({
  73744. "node_modules/@babel/plugin-transform-typescript/lib/enum.js"(exports) {
  73745. "use strict";
  73746. Object.defineProperty(exports, "__esModule", {
  73747. value: true
  73748. });
  73749. exports.default = transpileEnum;
  73750. exports.translateEnumValues = translateEnumValues;
  73751. var _core = require_lib32();
  73752. var _assert = __require("assert");
  73753. var _helperAnnotateAsPure = require_lib25();
  73754. var ENUMS = /* @__PURE__ */ new WeakMap();
  73755. var buildEnumWrapper = _core.template.expression(`
  73756. (function (ID) {
  73757. ASSIGNMENTS;
  73758. return ID;
  73759. })(INIT)
  73760. `);
  73761. function transpileEnum(path, t3) {
  73762. const {
  73763. node: node2,
  73764. parentPath
  73765. } = path;
  73766. if (node2.declare) {
  73767. path.remove();
  73768. return;
  73769. }
  73770. const name2 = node2.id.name;
  73771. const {
  73772. fill,
  73773. data: data3,
  73774. isPure
  73775. } = enumFill(path, t3, node2.id);
  73776. switch (parentPath.type) {
  73777. case "BlockStatement":
  73778. case "ExportNamedDeclaration":
  73779. case "Program": {
  73780. const isGlobal = t3.isProgram(path.parent);
  73781. const isSeen = seen(parentPath);
  73782. let init = t3.objectExpression([]);
  73783. if (isSeen || isGlobal) {
  73784. init = t3.logicalExpression("||", t3.cloneNode(fill.ID), init);
  73785. }
  73786. const enumIIFE = buildEnumWrapper(Object.assign({}, fill, {
  73787. INIT: init
  73788. }));
  73789. if (isPure)
  73790. (0, _helperAnnotateAsPure.default)(enumIIFE);
  73791. if (isSeen) {
  73792. const toReplace = parentPath.isExportDeclaration() ? parentPath : path;
  73793. toReplace.replaceWith(t3.expressionStatement(t3.assignmentExpression("=", t3.cloneNode(node2.id), enumIIFE)));
  73794. } else {
  73795. path.scope.registerDeclaration(path.replaceWith(t3.variableDeclaration(isGlobal ? "var" : "let", [t3.variableDeclarator(node2.id, enumIIFE)]))[0]);
  73796. }
  73797. ENUMS.set(path.scope.getBindingIdentifier(name2), data3);
  73798. break;
  73799. }
  73800. default:
  73801. throw new Error(`Unexpected enum parent '${path.parent.type}`);
  73802. }
  73803. function seen(parentPath2) {
  73804. if (parentPath2.isExportDeclaration()) {
  73805. return seen(parentPath2.parentPath);
  73806. }
  73807. if (parentPath2.getData(name2)) {
  73808. return true;
  73809. } else {
  73810. parentPath2.setData(name2, true);
  73811. return false;
  73812. }
  73813. }
  73814. }
  73815. var buildStringAssignment = (0, _core.template)(`
  73816. ENUM["NAME"] = VALUE;
  73817. `);
  73818. var buildNumericAssignment = (0, _core.template)(`
  73819. ENUM[ENUM["NAME"] = VALUE] = "NAME";
  73820. `);
  73821. var buildEnumMember = (isString, options) => (isString ? buildStringAssignment : buildNumericAssignment)(options);
  73822. function enumFill(path, t3, id) {
  73823. const {
  73824. enumValues: x,
  73825. data: data3,
  73826. isPure
  73827. } = translateEnumValues(path, t3);
  73828. const assignments = x.map(([memberName, memberValue]) => buildEnumMember(t3.isStringLiteral(memberValue), {
  73829. ENUM: t3.cloneNode(id),
  73830. NAME: memberName,
  73831. VALUE: memberValue
  73832. }));
  73833. return {
  73834. fill: {
  73835. ID: t3.cloneNode(id),
  73836. ASSIGNMENTS: assignments
  73837. },
  73838. data: data3,
  73839. isPure
  73840. };
  73841. }
  73842. function ReferencedIdentifier(expr, state) {
  73843. const {
  73844. seen,
  73845. path,
  73846. t: t3
  73847. } = state;
  73848. const name2 = expr.node.name;
  73849. if (seen.has(name2) && !expr.scope.hasOwnBinding(name2)) {
  73850. expr.replaceWith(t3.memberExpression(t3.cloneNode(path.node.id), t3.cloneNode(expr.node)));
  73851. expr.skip();
  73852. }
  73853. }
  73854. var enumSelfReferenceVisitor = {
  73855. ReferencedIdentifier
  73856. };
  73857. function translateEnumValues(path, t3) {
  73858. const seen = /* @__PURE__ */ new Map();
  73859. let constValue = -1;
  73860. let lastName;
  73861. let isPure = true;
  73862. const enumValues = path.get("members").map((memberPath) => {
  73863. const member = memberPath.node;
  73864. const name2 = t3.isIdentifier(member.id) ? member.id.name : member.id.value;
  73865. const initializerPath = memberPath.get("initializer");
  73866. const initializer = member.initializer;
  73867. let value2;
  73868. if (initializer) {
  73869. constValue = computeConstantValue(initializerPath, seen);
  73870. if (constValue !== void 0) {
  73871. seen.set(name2, constValue);
  73872. if (typeof constValue === "number") {
  73873. value2 = t3.numericLiteral(constValue);
  73874. } else {
  73875. _assert(typeof constValue === "string");
  73876. value2 = t3.stringLiteral(constValue);
  73877. }
  73878. } else {
  73879. isPure && (isPure = initializerPath.isPure());
  73880. if (initializerPath.isReferencedIdentifier()) {
  73881. ReferencedIdentifier(initializerPath, {
  73882. t: t3,
  73883. seen,
  73884. path
  73885. });
  73886. } else {
  73887. initializerPath.traverse(enumSelfReferenceVisitor, {
  73888. t: t3,
  73889. seen,
  73890. path
  73891. });
  73892. }
  73893. value2 = initializerPath.node;
  73894. seen.set(name2, void 0);
  73895. }
  73896. } else if (typeof constValue === "number") {
  73897. constValue += 1;
  73898. value2 = t3.numericLiteral(constValue);
  73899. seen.set(name2, constValue);
  73900. } else if (typeof constValue === "string") {
  73901. throw path.buildCodeFrameError("Enum member must have initializer.");
  73902. } else {
  73903. const lastRef = t3.memberExpression(t3.cloneNode(path.node.id), t3.stringLiteral(lastName), true);
  73904. value2 = t3.binaryExpression("+", t3.numericLiteral(1), lastRef);
  73905. seen.set(name2, void 0);
  73906. }
  73907. lastName = name2;
  73908. return [name2, value2];
  73909. });
  73910. return {
  73911. isPure,
  73912. data: seen,
  73913. enumValues
  73914. };
  73915. }
  73916. function computeConstantValue(path, prevMembers, seen = /* @__PURE__ */ new Set()) {
  73917. return evaluate(path);
  73918. function evaluate(path2) {
  73919. const expr = path2.node;
  73920. switch (expr.type) {
  73921. case "MemberExpression":
  73922. return evaluateRef(path2, prevMembers, seen);
  73923. case "StringLiteral":
  73924. return expr.value;
  73925. case "UnaryExpression":
  73926. return evalUnaryExpression(path2);
  73927. case "BinaryExpression":
  73928. return evalBinaryExpression(path2);
  73929. case "NumericLiteral":
  73930. return expr.value;
  73931. case "ParenthesizedExpression":
  73932. return evaluate(path2.get("expression"));
  73933. case "Identifier":
  73934. return evaluateRef(path2, prevMembers, seen);
  73935. case "TemplateLiteral": {
  73936. if (expr.quasis.length === 1) {
  73937. return expr.quasis[0].value.cooked;
  73938. }
  73939. const paths = path2.get("expressions");
  73940. const quasis = expr.quasis;
  73941. let str = "";
  73942. for (let i = 0; i < quasis.length; i++) {
  73943. str += quasis[i].value.cooked;
  73944. if (i + 1 < quasis.length) {
  73945. const value2 = evaluateRef(paths[i], prevMembers, seen);
  73946. if (value2 === void 0)
  73947. return void 0;
  73948. str += value2;
  73949. }
  73950. }
  73951. return str;
  73952. }
  73953. default:
  73954. return void 0;
  73955. }
  73956. }
  73957. function evaluateRef(path2, prevMembers2, seen2) {
  73958. if (path2.isMemberExpression()) {
  73959. const expr = path2.node;
  73960. const obj = expr.object;
  73961. const prop = expr.property;
  73962. if (!_core.types.isIdentifier(obj) || (expr.computed ? !_core.types.isStringLiteral(prop) : !_core.types.isIdentifier(prop))) {
  73963. return;
  73964. }
  73965. const bindingIdentifier = path2.scope.getBindingIdentifier(obj.name);
  73966. const data3 = ENUMS.get(bindingIdentifier);
  73967. if (!data3)
  73968. return;
  73969. return data3.get(prop.computed ? prop.value : prop.name);
  73970. } else if (path2.isIdentifier()) {
  73971. const name2 = path2.node.name;
  73972. let value2 = prevMembers2 == null ? void 0 : prevMembers2.get(name2);
  73973. if (value2 !== void 0) {
  73974. return value2;
  73975. }
  73976. if (seen2.has(path2.node))
  73977. return;
  73978. const bindingInitPath = path2.resolve();
  73979. if (bindingInitPath) {
  73980. seen2.add(path2.node);
  73981. value2 = computeConstantValue(bindingInitPath, void 0, seen2);
  73982. prevMembers2 == null ? void 0 : prevMembers2.set(name2, value2);
  73983. return value2;
  73984. }
  73985. }
  73986. }
  73987. function evalUnaryExpression(path2) {
  73988. const value2 = evaluate(path2.get("argument"));
  73989. if (value2 === void 0) {
  73990. return void 0;
  73991. }
  73992. switch (path2.node.operator) {
  73993. case "+":
  73994. return value2;
  73995. case "-":
  73996. return -value2;
  73997. case "~":
  73998. return ~value2;
  73999. default:
  74000. return void 0;
  74001. }
  74002. }
  74003. function evalBinaryExpression(path2) {
  74004. const left = evaluate(path2.get("left"));
  74005. if (left === void 0) {
  74006. return void 0;
  74007. }
  74008. const right = evaluate(path2.get("right"));
  74009. if (right === void 0) {
  74010. return void 0;
  74011. }
  74012. switch (path2.node.operator) {
  74013. case "|":
  74014. return left | right;
  74015. case "&":
  74016. return left & right;
  74017. case ">>":
  74018. return left >> right;
  74019. case ">>>":
  74020. return left >>> right;
  74021. case "<<":
  74022. return left << right;
  74023. case "^":
  74024. return left ^ right;
  74025. case "*":
  74026. return left * right;
  74027. case "/":
  74028. return left / right;
  74029. case "+":
  74030. return left + right;
  74031. case "-":
  74032. return left - right;
  74033. case "%":
  74034. return left % right;
  74035. case "**":
  74036. return Math.pow(left, right);
  74037. default:
  74038. return void 0;
  74039. }
  74040. }
  74041. }
  74042. }
  74043. });
  74044. // node_modules/@babel/plugin-transform-typescript/lib/const-enum.js
  74045. var require_const_enum = __commonJS({
  74046. "node_modules/@babel/plugin-transform-typescript/lib/const-enum.js"(exports) {
  74047. "use strict";
  74048. Object.defineProperty(exports, "__esModule", {
  74049. value: true
  74050. });
  74051. exports.default = transpileConstEnum;
  74052. var _enum = require_enum();
  74053. function transpileConstEnum(path, t3) {
  74054. const {
  74055. name: name2
  74056. } = path.node.id;
  74057. const parentIsExport = path.parentPath.isExportNamedDeclaration();
  74058. let isExported = parentIsExport;
  74059. if (!isExported && t3.isProgram(path.parent)) {
  74060. isExported = path.parent.body.some((stmt) => t3.isExportNamedDeclaration(stmt) && stmt.exportKind !== "type" && !stmt.source && stmt.specifiers.some((spec) => t3.isExportSpecifier(spec) && spec.exportKind !== "type" && spec.local.name === name2));
  74061. }
  74062. const {
  74063. enumValues: entries
  74064. } = (0, _enum.translateEnumValues)(path, t3);
  74065. if (isExported) {
  74066. const obj = t3.objectExpression(entries.map(([name3, value2]) => t3.objectProperty(t3.isValidIdentifier(name3) ? t3.identifier(name3) : t3.stringLiteral(name3), value2)));
  74067. if (path.scope.hasOwnBinding(name2)) {
  74068. (parentIsExport ? path.parentPath : path).replaceWith(t3.expressionStatement(t3.callExpression(t3.memberExpression(t3.identifier("Object"), t3.identifier("assign")), [path.node.id, obj])));
  74069. } else {
  74070. path.replaceWith(t3.variableDeclaration("var", [t3.variableDeclarator(path.node.id, obj)]));
  74071. path.scope.registerDeclaration(path);
  74072. }
  74073. return;
  74074. }
  74075. const entriesMap = new Map(entries);
  74076. path.scope.path.traverse({
  74077. Scope(path2) {
  74078. if (path2.scope.hasOwnBinding(name2))
  74079. path2.skip();
  74080. },
  74081. MemberExpression(path2) {
  74082. if (!t3.isIdentifier(path2.node.object, {
  74083. name: name2
  74084. }))
  74085. return;
  74086. let key2;
  74087. if (path2.node.computed) {
  74088. if (t3.isStringLiteral(path2.node.property)) {
  74089. key2 = path2.node.property.value;
  74090. } else {
  74091. return;
  74092. }
  74093. } else if (t3.isIdentifier(path2.node.property)) {
  74094. key2 = path2.node.property.name;
  74095. } else {
  74096. return;
  74097. }
  74098. if (!entriesMap.has(key2))
  74099. return;
  74100. path2.replaceWith(t3.cloneNode(entriesMap.get(key2)));
  74101. }
  74102. });
  74103. path.remove();
  74104. }
  74105. }
  74106. });
  74107. // node_modules/@babel/plugin-transform-typescript/lib/namespace.js
  74108. var require_namespace = __commonJS({
  74109. "node_modules/@babel/plugin-transform-typescript/lib/namespace.js"(exports) {
  74110. "use strict";
  74111. Object.defineProperty(exports, "__esModule", {
  74112. value: true
  74113. });
  74114. exports.default = transpileNamespace;
  74115. var _core = require_lib32();
  74116. function transpileNamespace(path, allowNamespaces) {
  74117. if (path.node.declare || path.node.id.type === "StringLiteral") {
  74118. path.remove();
  74119. return;
  74120. }
  74121. if (!allowNamespaces) {
  74122. throw path.get("id").buildCodeFrameError("Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript");
  74123. }
  74124. const name2 = path.node.id.name;
  74125. const value2 = handleNested(path, _core.types.cloneNode(path.node, true));
  74126. const bound = path.scope.hasOwnBinding(name2);
  74127. if (path.parent.type === "ExportNamedDeclaration") {
  74128. if (!bound) {
  74129. path.parentPath.insertAfter(value2);
  74130. path.replaceWith(getDeclaration(name2));
  74131. path.scope.registerDeclaration(path.parentPath);
  74132. } else {
  74133. path.parentPath.replaceWith(value2);
  74134. }
  74135. } else if (bound) {
  74136. path.replaceWith(value2);
  74137. } else {
  74138. path.scope.registerDeclaration(path.replaceWithMultiple([getDeclaration(name2), value2])[0]);
  74139. }
  74140. }
  74141. function getDeclaration(name2) {
  74142. return _core.types.variableDeclaration("let", [_core.types.variableDeclarator(_core.types.identifier(name2))]);
  74143. }
  74144. function getMemberExpression(name2, itemName) {
  74145. return _core.types.memberExpression(_core.types.identifier(name2), _core.types.identifier(itemName));
  74146. }
  74147. function handleVariableDeclaration(node2, name2, hub) {
  74148. if (node2.kind !== "const") {
  74149. throw hub.file.buildCodeFrameError(node2, "Namespaces exporting non-const are not supported by Babel. Change to const or see: https://babeljs.io/docs/en/babel-plugin-transform-typescript");
  74150. }
  74151. const {
  74152. declarations
  74153. } = node2;
  74154. if (declarations.every((declarator) => _core.types.isIdentifier(declarator.id))) {
  74155. for (const declarator of declarations) {
  74156. declarator.init = _core.types.assignmentExpression("=", getMemberExpression(name2, declarator.id.name), declarator.init);
  74157. }
  74158. return [node2];
  74159. }
  74160. const bindingIdentifiers = _core.types.getBindingIdentifiers(node2);
  74161. const assignments = [];
  74162. for (const idName in bindingIdentifiers) {
  74163. assignments.push(_core.types.assignmentExpression("=", getMemberExpression(name2, idName), _core.types.cloneNode(bindingIdentifiers[idName])));
  74164. }
  74165. return [node2, _core.types.expressionStatement(_core.types.sequenceExpression(assignments))];
  74166. }
  74167. function buildNestedAmbientModuleError(path, node2) {
  74168. return path.hub.buildError(node2, "Ambient modules cannot be nested in other modules or namespaces.", Error);
  74169. }
  74170. function handleNested(path, node2, parentExport) {
  74171. const names = /* @__PURE__ */ new Set();
  74172. const realName = node2.id;
  74173. _core.types.assertIdentifier(realName);
  74174. const name2 = path.scope.generateUid(realName.name);
  74175. const namespaceTopLevel = _core.types.isTSModuleBlock(node2.body) ? node2.body.body : [_core.types.exportNamedDeclaration(node2.body)];
  74176. for (let i = 0; i < namespaceTopLevel.length; i++) {
  74177. const subNode = namespaceTopLevel[i];
  74178. switch (subNode.type) {
  74179. case "TSModuleDeclaration": {
  74180. if (!_core.types.isIdentifier(subNode.id)) {
  74181. throw buildNestedAmbientModuleError(path, subNode);
  74182. }
  74183. const transformed = handleNested(path, subNode);
  74184. const moduleName = subNode.id.name;
  74185. if (names.has(moduleName)) {
  74186. namespaceTopLevel[i] = transformed;
  74187. } else {
  74188. names.add(moduleName);
  74189. namespaceTopLevel.splice(i++, 1, getDeclaration(moduleName), transformed);
  74190. }
  74191. continue;
  74192. }
  74193. case "TSEnumDeclaration":
  74194. case "FunctionDeclaration":
  74195. case "ClassDeclaration":
  74196. names.add(subNode.id.name);
  74197. continue;
  74198. case "VariableDeclaration": {
  74199. for (const name3 in _core.types.getBindingIdentifiers(subNode)) {
  74200. names.add(name3);
  74201. }
  74202. continue;
  74203. }
  74204. default:
  74205. continue;
  74206. case "ExportNamedDeclaration":
  74207. }
  74208. if ("declare" in subNode.declaration && subNode.declaration.declare) {
  74209. continue;
  74210. }
  74211. switch (subNode.declaration.type) {
  74212. case "TSEnumDeclaration":
  74213. case "FunctionDeclaration":
  74214. case "ClassDeclaration": {
  74215. const itemName = subNode.declaration.id.name;
  74216. names.add(itemName);
  74217. namespaceTopLevel.splice(i++, 1, subNode.declaration, _core.types.expressionStatement(_core.types.assignmentExpression("=", getMemberExpression(name2, itemName), _core.types.identifier(itemName))));
  74218. break;
  74219. }
  74220. case "VariableDeclaration": {
  74221. const nodes = handleVariableDeclaration(subNode.declaration, name2, path.hub);
  74222. namespaceTopLevel.splice(i, nodes.length, ...nodes);
  74223. i += nodes.length - 1;
  74224. break;
  74225. }
  74226. case "TSModuleDeclaration": {
  74227. if (!_core.types.isIdentifier(subNode.declaration.id)) {
  74228. throw buildNestedAmbientModuleError(path, subNode.declaration);
  74229. }
  74230. const transformed = handleNested(path, subNode.declaration, _core.types.identifier(name2));
  74231. const moduleName = subNode.declaration.id.name;
  74232. if (names.has(moduleName)) {
  74233. namespaceTopLevel[i] = transformed;
  74234. } else {
  74235. names.add(moduleName);
  74236. namespaceTopLevel.splice(i++, 1, getDeclaration(moduleName), transformed);
  74237. }
  74238. }
  74239. }
  74240. }
  74241. let fallthroughValue = _core.types.objectExpression([]);
  74242. if (parentExport) {
  74243. const memberExpr = _core.types.memberExpression(parentExport, realName);
  74244. fallthroughValue = _core.template.expression.ast`
  74245. ${_core.types.cloneNode(memberExpr)} ||
  74246. (${_core.types.cloneNode(memberExpr)} = ${fallthroughValue})
  74247. `;
  74248. }
  74249. return _core.template.statement.ast`
  74250. (function (${_core.types.identifier(name2)}) {
  74251. ${namespaceTopLevel}
  74252. })(${realName} || (${_core.types.cloneNode(realName)} = ${fallthroughValue}));
  74253. `;
  74254. }
  74255. }
  74256. });
  74257. // node_modules/@babel/plugin-transform-typescript/lib/index.js
  74258. var require_lib28 = __commonJS({
  74259. "node_modules/@babel/plugin-transform-typescript/lib/index.js"(exports) {
  74260. "use strict";
  74261. Object.defineProperty(exports, "__esModule", {
  74262. value: true
  74263. });
  74264. exports.default = void 0;
  74265. var _helperPluginUtils = require_lib20();
  74266. var _pluginSyntaxTypescript = require_lib21();
  74267. var _helperCreateClassFeaturesPlugin = require_lib27();
  74268. var _constEnum = require_const_enum();
  74269. var _enum = require_enum();
  74270. var _namespace = require_namespace();
  74271. function isInType(path) {
  74272. switch (path.parent.type) {
  74273. case "TSTypeReference":
  74274. case "TSExpressionWithTypeArguments":
  74275. case "TSTypeQuery":
  74276. return true;
  74277. case "TSQualifiedName":
  74278. return path.parentPath.findParent((path2) => path2.type !== "TSQualifiedName").type !== "TSImportEqualsDeclaration";
  74279. case "ExportSpecifier":
  74280. return path.parent.exportKind === "type" || path.parentPath.parent.exportKind === "type";
  74281. default:
  74282. return false;
  74283. }
  74284. }
  74285. var GLOBAL_TYPES = /* @__PURE__ */ new WeakMap();
  74286. var NEEDS_EXPLICIT_ESM = /* @__PURE__ */ new WeakMap();
  74287. var PARSED_PARAMS = /* @__PURE__ */ new WeakSet();
  74288. function isGlobalType({
  74289. scope
  74290. }, name2) {
  74291. if (scope.hasBinding(name2))
  74292. return false;
  74293. if (GLOBAL_TYPES.get(scope).has(name2))
  74294. return true;
  74295. console.warn(`The exported identifier "${name2}" is not declared in Babel's scope tracker
  74296. as a JavaScript value binding, and "@babel/plugin-transform-typescript"
  74297. never encountered it as a TypeScript type declaration.
  74298. It will be treated as a JavaScript value.
  74299. This problem is likely caused by another plugin injecting
  74300. "${name2}" without registering it in the scope tracker. If you are the author
  74301. of that plugin, please use "scope.registerDeclaration(declarationPath)".`);
  74302. return false;
  74303. }
  74304. function registerGlobalType(programScope, name2) {
  74305. GLOBAL_TYPES.get(programScope).add(name2);
  74306. }
  74307. function safeRemove(path) {
  74308. const ids = path.getBindingIdentifiers();
  74309. for (const name2 of Object.keys(ids)) {
  74310. const binding = path.scope.getBinding(name2);
  74311. if (binding && binding.identifier === ids[name2]) {
  74312. binding.scope.removeBinding(name2);
  74313. }
  74314. }
  74315. path.opts.noScope = true;
  74316. path.remove();
  74317. path.opts.noScope = false;
  74318. }
  74319. var _default = (0, _helperPluginUtils.declare)((api, opts) => {
  74320. const {
  74321. types: t3,
  74322. template
  74323. } = api;
  74324. api.assertVersion(7);
  74325. const JSX_PRAGMA_REGEX = /\*?\s*@jsx((?:Frag)?)\s+([^\s]+)/;
  74326. const {
  74327. allowNamespaces = true,
  74328. jsxPragma = "React.createElement",
  74329. jsxPragmaFrag = "React.Fragment",
  74330. onlyRemoveTypeImports = false,
  74331. optimizeConstEnums = false
  74332. } = opts;
  74333. {
  74334. var {
  74335. allowDeclareFields = false
  74336. } = opts;
  74337. }
  74338. const classMemberVisitors = {
  74339. field(path) {
  74340. const {
  74341. node: node2
  74342. } = path;
  74343. {
  74344. if (!allowDeclareFields && node2.declare) {
  74345. throw path.buildCodeFrameError(`The 'declare' modifier is only allowed when the 'allowDeclareFields' option of @babel/plugin-transform-typescript or @babel/preset-typescript is enabled.`);
  74346. }
  74347. }
  74348. if (node2.declare) {
  74349. if (node2.value) {
  74350. throw path.buildCodeFrameError(`Fields with the 'declare' modifier cannot be initialized here, but only in the constructor`);
  74351. }
  74352. if (!node2.decorators) {
  74353. path.remove();
  74354. }
  74355. } else if (node2.definite) {
  74356. if (node2.value) {
  74357. throw path.buildCodeFrameError(`Definitely assigned fields cannot be initialized here, but only in the constructor`);
  74358. }
  74359. {
  74360. if (!allowDeclareFields && !node2.decorators && !t3.isClassPrivateProperty(node2)) {
  74361. path.remove();
  74362. }
  74363. }
  74364. } else if (node2.abstract) {
  74365. path.remove();
  74366. } else {
  74367. if (!allowDeclareFields && !node2.value && !node2.decorators && !t3.isClassPrivateProperty(node2)) {
  74368. path.remove();
  74369. }
  74370. }
  74371. if (node2.accessibility)
  74372. node2.accessibility = null;
  74373. if (node2.abstract)
  74374. node2.abstract = null;
  74375. if (node2.readonly)
  74376. node2.readonly = null;
  74377. if (node2.optional)
  74378. node2.optional = null;
  74379. if (node2.typeAnnotation)
  74380. node2.typeAnnotation = null;
  74381. if (node2.definite)
  74382. node2.definite = null;
  74383. if (node2.declare)
  74384. node2.declare = null;
  74385. if (node2.override)
  74386. node2.override = null;
  74387. },
  74388. method({
  74389. node: node2
  74390. }) {
  74391. if (node2.accessibility)
  74392. node2.accessibility = null;
  74393. if (node2.abstract)
  74394. node2.abstract = null;
  74395. if (node2.optional)
  74396. node2.optional = null;
  74397. if (node2.override)
  74398. node2.override = null;
  74399. },
  74400. constructor(path, classPath) {
  74401. if (path.node.accessibility)
  74402. path.node.accessibility = null;
  74403. const assigns = [];
  74404. const {
  74405. scope
  74406. } = path;
  74407. for (const paramPath of path.get("params")) {
  74408. const param = paramPath.node;
  74409. if (param.type === "TSParameterProperty") {
  74410. const parameter = param.parameter;
  74411. if (PARSED_PARAMS.has(parameter))
  74412. continue;
  74413. PARSED_PARAMS.add(parameter);
  74414. let id;
  74415. if (t3.isIdentifier(parameter)) {
  74416. id = parameter;
  74417. } else if (t3.isAssignmentPattern(parameter) && t3.isIdentifier(parameter.left)) {
  74418. id = parameter.left;
  74419. } else {
  74420. throw paramPath.buildCodeFrameError("Parameter properties can not be destructuring patterns.");
  74421. }
  74422. assigns.push(template.statement.ast`
  74423. this.${t3.cloneNode(id)} = ${t3.cloneNode(id)}`);
  74424. paramPath.replaceWith(paramPath.get("parameter"));
  74425. scope.registerBinding("param", paramPath);
  74426. }
  74427. }
  74428. (0, _helperCreateClassFeaturesPlugin.injectInitialization)(classPath, path, assigns);
  74429. }
  74430. };
  74431. return {
  74432. name: "transform-typescript",
  74433. inherits: _pluginSyntaxTypescript.default,
  74434. visitor: {
  74435. Pattern: visitPattern,
  74436. Identifier: visitPattern,
  74437. RestElement: visitPattern,
  74438. Program: {
  74439. enter(path, state) {
  74440. const {
  74441. file
  74442. } = state;
  74443. let fileJsxPragma = null;
  74444. let fileJsxPragmaFrag = null;
  74445. const programScope = path.scope;
  74446. if (!GLOBAL_TYPES.has(programScope)) {
  74447. GLOBAL_TYPES.set(programScope, /* @__PURE__ */ new Set());
  74448. }
  74449. if (file.ast.comments) {
  74450. for (const comment2 of file.ast.comments) {
  74451. const jsxMatches = JSX_PRAGMA_REGEX.exec(comment2.value);
  74452. if (jsxMatches) {
  74453. if (jsxMatches[1]) {
  74454. fileJsxPragmaFrag = jsxMatches[2];
  74455. } else {
  74456. fileJsxPragma = jsxMatches[2];
  74457. }
  74458. }
  74459. }
  74460. }
  74461. let pragmaImportName = fileJsxPragma || jsxPragma;
  74462. if (pragmaImportName) {
  74463. [pragmaImportName] = pragmaImportName.split(".");
  74464. }
  74465. let pragmaFragImportName = fileJsxPragmaFrag || jsxPragmaFrag;
  74466. if (pragmaFragImportName) {
  74467. [pragmaFragImportName] = pragmaFragImportName.split(".");
  74468. }
  74469. for (let stmt of path.get("body")) {
  74470. if (stmt.isImportDeclaration()) {
  74471. if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {
  74472. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);
  74473. }
  74474. if (stmt.node.importKind === "type") {
  74475. for (const specifier of stmt.node.specifiers) {
  74476. registerGlobalType(programScope, specifier.local.name);
  74477. }
  74478. stmt.remove();
  74479. continue;
  74480. }
  74481. const importsToRemove = /* @__PURE__ */ new Set();
  74482. const specifiersLength = stmt.node.specifiers.length;
  74483. const isAllSpecifiersElided = () => specifiersLength > 0 && specifiersLength === importsToRemove.size;
  74484. for (const specifier of stmt.node.specifiers) {
  74485. if (specifier.type === "ImportSpecifier" && specifier.importKind === "type") {
  74486. registerGlobalType(programScope, specifier.local.name);
  74487. const binding = stmt.scope.getBinding(specifier.local.name);
  74488. if (binding) {
  74489. importsToRemove.add(binding.path);
  74490. }
  74491. }
  74492. }
  74493. if (onlyRemoveTypeImports) {
  74494. NEEDS_EXPLICIT_ESM.set(path.node, false);
  74495. } else {
  74496. if (stmt.node.specifiers.length === 0) {
  74497. NEEDS_EXPLICIT_ESM.set(path.node, false);
  74498. continue;
  74499. }
  74500. for (const specifier of stmt.node.specifiers) {
  74501. const binding = stmt.scope.getBinding(specifier.local.name);
  74502. if (binding && !importsToRemove.has(binding.path)) {
  74503. if (isImportTypeOnly({
  74504. binding,
  74505. programPath: path,
  74506. pragmaImportName,
  74507. pragmaFragImportName
  74508. })) {
  74509. importsToRemove.add(binding.path);
  74510. } else {
  74511. NEEDS_EXPLICIT_ESM.set(path.node, false);
  74512. }
  74513. }
  74514. }
  74515. }
  74516. if (isAllSpecifiersElided() && !onlyRemoveTypeImports) {
  74517. stmt.remove();
  74518. } else {
  74519. for (const importPath of importsToRemove) {
  74520. importPath.remove();
  74521. }
  74522. }
  74523. continue;
  74524. }
  74525. if (stmt.isExportDeclaration()) {
  74526. stmt = stmt.get("declaration");
  74527. }
  74528. if (stmt.isVariableDeclaration({
  74529. declare: true
  74530. })) {
  74531. for (const name2 of Object.keys(stmt.getBindingIdentifiers())) {
  74532. registerGlobalType(programScope, name2);
  74533. }
  74534. } else if (stmt.isTSTypeAliasDeclaration() || stmt.isTSDeclareFunction() && stmt.get("id").isIdentifier() || stmt.isTSInterfaceDeclaration() || stmt.isClassDeclaration({
  74535. declare: true
  74536. }) || stmt.isTSEnumDeclaration({
  74537. declare: true
  74538. }) || stmt.isTSModuleDeclaration({
  74539. declare: true
  74540. }) && stmt.get("id").isIdentifier()) {
  74541. registerGlobalType(programScope, stmt.node.id.name);
  74542. }
  74543. }
  74544. },
  74545. exit(path) {
  74546. if (path.node.sourceType === "module" && NEEDS_EXPLICIT_ESM.get(path.node)) {
  74547. path.pushContainer("body", t3.exportNamedDeclaration());
  74548. }
  74549. }
  74550. },
  74551. ExportNamedDeclaration(path, state) {
  74552. if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {
  74553. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);
  74554. }
  74555. if (path.node.exportKind === "type") {
  74556. path.remove();
  74557. return;
  74558. }
  74559. if (path.node.source && path.node.specifiers.length > 0 && path.node.specifiers.every((specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind === "type")) {
  74560. path.remove();
  74561. return;
  74562. }
  74563. if (!path.node.source && path.node.specifiers.length > 0 && path.node.specifiers.every((specifier) => t3.isExportSpecifier(specifier) && isGlobalType(path, specifier.local.name))) {
  74564. path.remove();
  74565. return;
  74566. }
  74567. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, false);
  74568. },
  74569. ExportAllDeclaration(path) {
  74570. if (path.node.exportKind === "type")
  74571. path.remove();
  74572. },
  74573. ExportSpecifier(path) {
  74574. const parent = path.parent;
  74575. if (!parent.source && isGlobalType(path, path.node.local.name) || path.node.exportKind === "type") {
  74576. path.remove();
  74577. }
  74578. },
  74579. ExportDefaultDeclaration(path, state) {
  74580. if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {
  74581. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);
  74582. }
  74583. if (t3.isIdentifier(path.node.declaration) && isGlobalType(path, path.node.declaration.name)) {
  74584. path.remove();
  74585. return;
  74586. }
  74587. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, false);
  74588. },
  74589. TSDeclareFunction(path) {
  74590. safeRemove(path);
  74591. },
  74592. TSDeclareMethod(path) {
  74593. safeRemove(path);
  74594. },
  74595. VariableDeclaration(path) {
  74596. if (path.node.declare) {
  74597. safeRemove(path);
  74598. }
  74599. },
  74600. VariableDeclarator({
  74601. node: node2
  74602. }) {
  74603. if (node2.definite)
  74604. node2.definite = null;
  74605. },
  74606. TSIndexSignature(path) {
  74607. path.remove();
  74608. },
  74609. ClassDeclaration(path) {
  74610. const {
  74611. node: node2
  74612. } = path;
  74613. if (node2.declare) {
  74614. safeRemove(path);
  74615. }
  74616. },
  74617. Class(path) {
  74618. const {
  74619. node: node2
  74620. } = path;
  74621. if (node2.typeParameters)
  74622. node2.typeParameters = null;
  74623. if (node2.superTypeParameters)
  74624. node2.superTypeParameters = null;
  74625. if (node2.implements)
  74626. node2.implements = null;
  74627. if (node2.abstract)
  74628. node2.abstract = null;
  74629. path.get("body.body").forEach((child) => {
  74630. if (child.isClassMethod() || child.isClassPrivateMethod()) {
  74631. if (child.node.kind === "constructor") {
  74632. classMemberVisitors.constructor(child, path);
  74633. } else {
  74634. classMemberVisitors.method(child);
  74635. }
  74636. } else if (child.isClassProperty() || child.isClassPrivateProperty() || child.isClassAccessorProperty()) {
  74637. classMemberVisitors.field(child);
  74638. }
  74639. });
  74640. },
  74641. Function(path) {
  74642. const {
  74643. node: node2
  74644. } = path;
  74645. if (node2.typeParameters)
  74646. node2.typeParameters = null;
  74647. if (node2.returnType)
  74648. node2.returnType = null;
  74649. const params = node2.params;
  74650. if (params.length > 0 && t3.isIdentifier(params[0], {
  74651. name: "this"
  74652. })) {
  74653. params.shift();
  74654. }
  74655. },
  74656. TSModuleDeclaration(path) {
  74657. (0, _namespace.default)(path, allowNamespaces);
  74658. },
  74659. TSInterfaceDeclaration(path) {
  74660. path.remove();
  74661. },
  74662. TSTypeAliasDeclaration(path) {
  74663. path.remove();
  74664. },
  74665. TSEnumDeclaration(path) {
  74666. if (optimizeConstEnums && path.node.const) {
  74667. (0, _constEnum.default)(path, t3);
  74668. } else {
  74669. (0, _enum.default)(path, t3);
  74670. }
  74671. },
  74672. TSImportEqualsDeclaration(path) {
  74673. if (t3.isTSExternalModuleReference(path.node.moduleReference)) {
  74674. throw path.buildCodeFrameError(`\`import ${path.node.id.name} = require('${path.node.moduleReference.expression.value}')\` is not supported by @babel/plugin-transform-typescript
  74675. Please consider using \`import ${path.node.id.name} from '${path.node.moduleReference.expression.value}';\` alongside Typescript's --allowSyntheticDefaultImports option.`);
  74676. }
  74677. path.replaceWith(t3.variableDeclaration("var", [t3.variableDeclarator(path.node.id, entityNameToExpr(path.node.moduleReference))]));
  74678. path.scope.registerDeclaration(path);
  74679. },
  74680. TSExportAssignment(path) {
  74681. throw path.buildCodeFrameError("`export =` is not supported by @babel/plugin-transform-typescript\nPlease consider using `export <value>;`.");
  74682. },
  74683. TSTypeAssertion(path) {
  74684. path.replaceWith(path.node.expression);
  74685. },
  74686. [`TSAsExpression${t3.tsSatisfiesExpression ? "|TSSatisfiesExpression" : ""}`](path) {
  74687. let {
  74688. node: node2
  74689. } = path;
  74690. do {
  74691. node2 = node2.expression;
  74692. } while (t3.isTSAsExpression(node2) || t3.isTSSatisfiesExpression != null && t3.isTSSatisfiesExpression(node2));
  74693. path.replaceWith(node2);
  74694. },
  74695. [api.types.tsInstantiationExpression ? "TSNonNullExpression|TSInstantiationExpression" : "TSNonNullExpression"](path) {
  74696. path.replaceWith(path.node.expression);
  74697. },
  74698. CallExpression(path) {
  74699. path.node.typeParameters = null;
  74700. },
  74701. OptionalCallExpression(path) {
  74702. path.node.typeParameters = null;
  74703. },
  74704. NewExpression(path) {
  74705. path.node.typeParameters = null;
  74706. },
  74707. JSXOpeningElement(path) {
  74708. path.node.typeParameters = null;
  74709. },
  74710. TaggedTemplateExpression(path) {
  74711. path.node.typeParameters = null;
  74712. }
  74713. }
  74714. };
  74715. function entityNameToExpr(node2) {
  74716. if (t3.isTSQualifiedName(node2)) {
  74717. return t3.memberExpression(entityNameToExpr(node2.left), node2.right);
  74718. }
  74719. return node2;
  74720. }
  74721. function visitPattern({
  74722. node: node2
  74723. }) {
  74724. if (node2.typeAnnotation)
  74725. node2.typeAnnotation = null;
  74726. if (t3.isIdentifier(node2) && node2.optional)
  74727. node2.optional = null;
  74728. }
  74729. function isImportTypeOnly({
  74730. binding,
  74731. programPath,
  74732. pragmaImportName,
  74733. pragmaFragImportName
  74734. }) {
  74735. for (const path of binding.referencePaths) {
  74736. if (!isInType(path)) {
  74737. return false;
  74738. }
  74739. }
  74740. if (binding.identifier.name !== pragmaImportName && binding.identifier.name !== pragmaFragImportName) {
  74741. return true;
  74742. }
  74743. let sourceFileHasJsx = false;
  74744. programPath.traverse({
  74745. "JSXElement|JSXFragment"(path) {
  74746. sourceFileHasJsx = true;
  74747. path.stop();
  74748. }
  74749. });
  74750. return !sourceFileHasJsx;
  74751. }
  74752. });
  74753. exports.default = _default;
  74754. }
  74755. });
  74756. // node_modules/@babel/plugin-syntax-jsx/lib/index.js
  74757. var require_lib29 = __commonJS({
  74758. "node_modules/@babel/plugin-syntax-jsx/lib/index.js"(exports) {
  74759. "use strict";
  74760. Object.defineProperty(exports, "__esModule", {
  74761. value: true
  74762. });
  74763. exports.default = void 0;
  74764. var _helperPluginUtils = require_lib20();
  74765. var _default = (0, _helperPluginUtils.declare)((api) => {
  74766. api.assertVersion(7);
  74767. return {
  74768. name: "syntax-jsx",
  74769. manipulateOptions(opts, parserOpts) {
  74770. {
  74771. if (parserOpts.plugins.some((p) => (Array.isArray(p) ? p[0] : p) === "typescript")) {
  74772. return;
  74773. }
  74774. }
  74775. parserOpts.plugins.push("jsx");
  74776. }
  74777. };
  74778. });
  74779. exports.default = _default;
  74780. }
  74781. });
  74782. // node_modules/@babel/plugin-transform-modules-commonjs/lib/dynamic-import.js
  74783. var require_dynamic_import2 = __commonJS({
  74784. "node_modules/@babel/plugin-transform-modules-commonjs/lib/dynamic-import.js"(exports) {
  74785. "use strict";
  74786. Object.defineProperty(exports, "__esModule", {
  74787. value: true
  74788. });
  74789. exports.transformDynamicImport = transformDynamicImport;
  74790. var _core = require_lib32();
  74791. var _helperModuleTransforms = require_lib17();
  74792. var requireNoInterop = (source2) => _core.template.expression.ast`require(${source2})`;
  74793. var requireInterop = (source2, file) => _core.types.callExpression(file.addHelper("interopRequireWildcard"), [requireNoInterop(source2)]);
  74794. function transformDynamicImport(path, noInterop, file) {
  74795. const buildRequire = noInterop ? requireNoInterop : requireInterop;
  74796. path.replaceWith((0, _helperModuleTransforms.buildDynamicImport)(path.node, true, false, (specifier) => buildRequire(specifier, file)));
  74797. }
  74798. }
  74799. });
  74800. // node_modules/@babel/plugin-transform-modules-commonjs/lib/index.js
  74801. var require_lib30 = __commonJS({
  74802. "node_modules/@babel/plugin-transform-modules-commonjs/lib/index.js"(exports) {
  74803. "use strict";
  74804. Object.defineProperty(exports, "__esModule", {
  74805. value: true
  74806. });
  74807. exports.default = void 0;
  74808. var _helperPluginUtils = require_lib20();
  74809. var _helperModuleTransforms = require_lib17();
  74810. var _helperSimpleAccess = require_lib16();
  74811. var _core = require_lib32();
  74812. var _dynamicImport = require_dynamic_import2();
  74813. var _default = (0, _helperPluginUtils.declare)((api, options) => {
  74814. var _api$assumption, _api$assumption2, _api$assumption3;
  74815. api.assertVersion(7);
  74816. const {
  74817. strictNamespace = false,
  74818. mjsStrictNamespace = strictNamespace,
  74819. allowTopLevelThis,
  74820. strict,
  74821. strictMode,
  74822. noInterop,
  74823. importInterop,
  74824. lazy = false,
  74825. allowCommonJSExports = true,
  74826. loose = false
  74827. } = options;
  74828. const constantReexports = (_api$assumption = api.assumption("constantReexports")) != null ? _api$assumption : loose;
  74829. const enumerableModuleMeta = (_api$assumption2 = api.assumption("enumerableModuleMeta")) != null ? _api$assumption2 : loose;
  74830. const noIncompleteNsImportDetection = (_api$assumption3 = api.assumption("noIncompleteNsImportDetection")) != null ? _api$assumption3 : false;
  74831. if (typeof lazy !== "boolean" && typeof lazy !== "function" && (!Array.isArray(lazy) || !lazy.every((item) => typeof item === "string"))) {
  74832. throw new Error(`.lazy must be a boolean, array of strings, or a function`);
  74833. }
  74834. if (typeof strictNamespace !== "boolean") {
  74835. throw new Error(`.strictNamespace must be a boolean, or undefined`);
  74836. }
  74837. if (typeof mjsStrictNamespace !== "boolean") {
  74838. throw new Error(`.mjsStrictNamespace must be a boolean, or undefined`);
  74839. }
  74840. const getAssertion = (localName) => _core.template.expression.ast`
  74841. (function(){
  74842. throw new Error(
  74843. "The CommonJS '" + "${localName}" + "' variable is not available in ES6 modules." +
  74844. "Consider setting setting sourceType:script or sourceType:unambiguous in your " +
  74845. "Babel config for this file.");
  74846. })()
  74847. `;
  74848. const moduleExportsVisitor = {
  74849. ReferencedIdentifier(path) {
  74850. const localName = path.node.name;
  74851. if (localName !== "module" && localName !== "exports")
  74852. return;
  74853. const localBinding = path.scope.getBinding(localName);
  74854. const rootBinding = this.scope.getBinding(localName);
  74855. if (rootBinding !== localBinding || path.parentPath.isObjectProperty({
  74856. value: path.node
  74857. }) && path.parentPath.parentPath.isObjectPattern() || path.parentPath.isAssignmentExpression({
  74858. left: path.node
  74859. }) || path.isAssignmentExpression({
  74860. left: path.node
  74861. })) {
  74862. return;
  74863. }
  74864. path.replaceWith(getAssertion(localName));
  74865. },
  74866. UpdateExpression(path) {
  74867. const arg = path.get("argument");
  74868. if (!arg.isIdentifier())
  74869. return;
  74870. const localName = arg.node.name;
  74871. if (localName !== "module" && localName !== "exports")
  74872. return;
  74873. const localBinding = path.scope.getBinding(localName);
  74874. const rootBinding = this.scope.getBinding(localName);
  74875. if (rootBinding !== localBinding)
  74876. return;
  74877. path.replaceWith(_core.types.assignmentExpression(path.node.operator[0] + "=", arg.node, getAssertion(localName)));
  74878. },
  74879. AssignmentExpression(path) {
  74880. const left = path.get("left");
  74881. if (left.isIdentifier()) {
  74882. const localName = left.node.name;
  74883. if (localName !== "module" && localName !== "exports")
  74884. return;
  74885. const localBinding = path.scope.getBinding(localName);
  74886. const rootBinding = this.scope.getBinding(localName);
  74887. if (rootBinding !== localBinding)
  74888. return;
  74889. const right = path.get("right");
  74890. right.replaceWith(_core.types.sequenceExpression([right.node, getAssertion(localName)]));
  74891. } else if (left.isPattern()) {
  74892. const ids = left.getOuterBindingIdentifiers();
  74893. const localName = Object.keys(ids).filter((localName2) => {
  74894. if (localName2 !== "module" && localName2 !== "exports")
  74895. return false;
  74896. return this.scope.getBinding(localName2) === path.scope.getBinding(localName2);
  74897. })[0];
  74898. if (localName) {
  74899. const right = path.get("right");
  74900. right.replaceWith(_core.types.sequenceExpression([right.node, getAssertion(localName)]));
  74901. }
  74902. }
  74903. }
  74904. };
  74905. return {
  74906. name: "transform-modules-commonjs",
  74907. pre() {
  74908. this.file.set("@babel/plugin-transform-modules-*", "commonjs");
  74909. },
  74910. visitor: {
  74911. CallExpression(path) {
  74912. if (!this.file.has("@babel/plugin-proposal-dynamic-import"))
  74913. return;
  74914. if (!_core.types.isImport(path.node.callee))
  74915. return;
  74916. let {
  74917. scope
  74918. } = path;
  74919. do {
  74920. scope.rename("require");
  74921. } while (scope = scope.parent);
  74922. (0, _dynamicImport.transformDynamicImport)(path, noInterop, this.file);
  74923. },
  74924. Program: {
  74925. exit(path, state) {
  74926. if (!(0, _helperModuleTransforms.isModule)(path))
  74927. return;
  74928. path.scope.rename("exports");
  74929. path.scope.rename("module");
  74930. path.scope.rename("require");
  74931. path.scope.rename("__filename");
  74932. path.scope.rename("__dirname");
  74933. if (!allowCommonJSExports) {
  74934. (0, _helperSimpleAccess.default)(path, /* @__PURE__ */ new Set(["module", "exports"]), false);
  74935. path.traverse(moduleExportsVisitor, {
  74936. scope: path.scope
  74937. });
  74938. }
  74939. let moduleName = (0, _helperModuleTransforms.getModuleName)(this.file.opts, options);
  74940. if (moduleName)
  74941. moduleName = _core.types.stringLiteral(moduleName);
  74942. const {
  74943. meta,
  74944. headers
  74945. } = (0, _helperModuleTransforms.rewriteModuleStatementsAndPrepareHeader)(path, {
  74946. exportName: "exports",
  74947. constantReexports,
  74948. enumerableModuleMeta,
  74949. strict,
  74950. strictMode,
  74951. allowTopLevelThis,
  74952. noInterop,
  74953. importInterop,
  74954. lazy,
  74955. esNamespaceOnly: typeof state.filename === "string" && /\.mjs$/.test(state.filename) ? mjsStrictNamespace : strictNamespace,
  74956. noIncompleteNsImportDetection,
  74957. filename: this.file.opts.filename
  74958. });
  74959. for (const [source2, metadata] of meta.source) {
  74960. const loadExpr = _core.types.callExpression(_core.types.identifier("require"), [_core.types.stringLiteral(source2)]);
  74961. let header;
  74962. if ((0, _helperModuleTransforms.isSideEffectImport)(metadata)) {
  74963. if (metadata.lazy)
  74964. throw new Error("Assertion failure");
  74965. header = _core.types.expressionStatement(loadExpr);
  74966. } else {
  74967. if (metadata.lazy && !metadata.referenced) {
  74968. continue;
  74969. }
  74970. const init = (0, _helperModuleTransforms.wrapInterop)(path, loadExpr, metadata.interop) || loadExpr;
  74971. if (metadata.lazy) {
  74972. header = _core.template.statement.ast`
  74973. function ${metadata.name}() {
  74974. const data = ${init};
  74975. ${metadata.name} = function(){ return data; };
  74976. return data;
  74977. }
  74978. `;
  74979. } else {
  74980. header = _core.template.statement.ast`
  74981. var ${metadata.name} = ${init};
  74982. `;
  74983. }
  74984. }
  74985. header.loc = metadata.loc;
  74986. headers.push(header);
  74987. headers.push(...(0, _helperModuleTransforms.buildNamespaceInitStatements)(meta, metadata, constantReexports));
  74988. }
  74989. (0, _helperModuleTransforms.ensureStatementsHoisted)(headers);
  74990. path.unshiftContainer("body", headers);
  74991. path.get("body").forEach((path2) => {
  74992. if (headers.indexOf(path2.node) === -1)
  74993. return;
  74994. if (path2.isVariableDeclaration()) {
  74995. path2.scope.registerDeclaration(path2);
  74996. }
  74997. });
  74998. }
  74999. }
  75000. }
  75001. };
  75002. });
  75003. exports.default = _default;
  75004. }
  75005. });
  75006. // node_modules/@babel/preset-typescript/lib/index.js
  75007. var require_lib31 = __commonJS({
  75008. "node_modules/@babel/preset-typescript/lib/index.js"(exports) {
  75009. "use strict";
  75010. Object.defineProperty(exports, "__esModule", { value: true });
  75011. var helperPluginUtils = require_lib20();
  75012. var transformTypeScript = require_lib28();
  75013. require_lib29();
  75014. var transformModulesCommonJS = require_lib30();
  75015. var helperValidatorOption = require_lib18();
  75016. function _interopDefaultLegacy(e) {
  75017. return e && typeof e === "object" && "default" in e ? e : { "default": e };
  75018. }
  75019. var transformTypeScript__default = /* @__PURE__ */ _interopDefaultLegacy(transformTypeScript);
  75020. var transformModulesCommonJS__default = /* @__PURE__ */ _interopDefaultLegacy(transformModulesCommonJS);
  75021. var v = new helperValidatorOption.OptionValidator("@babel/preset-typescript");
  75022. function normalizeOptions(options = {}) {
  75023. let {
  75024. allowNamespaces = true,
  75025. jsxPragma,
  75026. onlyRemoveTypeImports
  75027. } = options;
  75028. const TopLevelOptions = {
  75029. ignoreExtensions: "ignoreExtensions",
  75030. allowNamespaces: "allowNamespaces",
  75031. disallowAmbiguousJSXLike: "disallowAmbiguousJSXLike",
  75032. jsxPragma: "jsxPragma",
  75033. jsxPragmaFrag: "jsxPragmaFrag",
  75034. onlyRemoveTypeImports: "onlyRemoveTypeImports",
  75035. optimizeConstEnums: "optimizeConstEnums",
  75036. allExtensions: "allExtensions",
  75037. isTSX: "isTSX"
  75038. };
  75039. const jsxPragmaFrag = v.validateStringOption(TopLevelOptions.jsxPragmaFrag, options.jsxPragmaFrag, "React.Fragment");
  75040. {
  75041. var allExtensions = v.validateBooleanOption(TopLevelOptions.allExtensions, options.allExtensions, false);
  75042. var isTSX = v.validateBooleanOption(TopLevelOptions.isTSX, options.isTSX, false);
  75043. if (isTSX) {
  75044. v.invariant(allExtensions, "isTSX:true requires allExtensions:true");
  75045. }
  75046. }
  75047. const ignoreExtensions = v.validateBooleanOption(TopLevelOptions.ignoreExtensions, options.ignoreExtensions, false);
  75048. const disallowAmbiguousJSXLike = v.validateBooleanOption(TopLevelOptions.disallowAmbiguousJSXLike, options.disallowAmbiguousJSXLike, false);
  75049. if (disallowAmbiguousJSXLike) {
  75050. {
  75051. v.invariant(allExtensions, "disallowAmbiguousJSXLike:true requires allExtensions:true");
  75052. }
  75053. }
  75054. const optimizeConstEnums = v.validateBooleanOption(TopLevelOptions.optimizeConstEnums, options.optimizeConstEnums, false);
  75055. const normalized = {
  75056. ignoreExtensions,
  75057. allowNamespaces,
  75058. disallowAmbiguousJSXLike,
  75059. jsxPragma,
  75060. jsxPragmaFrag,
  75061. onlyRemoveTypeImports,
  75062. optimizeConstEnums
  75063. };
  75064. {
  75065. normalized.allExtensions = allExtensions;
  75066. normalized.isTSX = isTSX;
  75067. }
  75068. return normalized;
  75069. }
  75070. var index2 = helperPluginUtils.declarePreset((api, opts) => {
  75071. api.assertVersion(7);
  75072. const {
  75073. allExtensions,
  75074. allowNamespaces,
  75075. disallowAmbiguousJSXLike,
  75076. isTSX,
  75077. jsxPragma,
  75078. jsxPragmaFrag,
  75079. onlyRemoveTypeImports,
  75080. optimizeConstEnums
  75081. } = normalizeOptions(opts);
  75082. const pluginOptions = (disallowAmbiguousJSXLike2) => ({
  75083. allowDeclareFields: opts.allowDeclareFields,
  75084. allowNamespaces,
  75085. disallowAmbiguousJSXLike: disallowAmbiguousJSXLike2,
  75086. jsxPragma,
  75087. jsxPragmaFrag,
  75088. onlyRemoveTypeImports,
  75089. optimizeConstEnums
  75090. });
  75091. const getPlugins = (isTSX2, disallowAmbiguousJSXLike2) => {
  75092. {
  75093. return [[transformTypeScript__default["default"], Object.assign({
  75094. isTSX: isTSX2
  75095. }, pluginOptions(disallowAmbiguousJSXLike2))]];
  75096. }
  75097. };
  75098. return {
  75099. overrides: allExtensions ? [{
  75100. plugins: getPlugins(isTSX, disallowAmbiguousJSXLike)
  75101. }] : [{
  75102. test: /\.ts$/,
  75103. plugins: getPlugins(false, false)
  75104. }, {
  75105. test: /\.mts$/,
  75106. sourceType: "module",
  75107. plugins: getPlugins(false, true)
  75108. }, {
  75109. test: /\.cts$/,
  75110. sourceType: "unambiguous",
  75111. plugins: [[transformModulesCommonJS__default["default"], {
  75112. allowTopLevelThis: true
  75113. }], [transformTypeScript__default["default"], pluginOptions(true)]]
  75114. }, {
  75115. test: /\.tsx$/,
  75116. plugins: getPlugins(true, false)
  75117. }]
  75118. };
  75119. });
  75120. exports["default"] = index2;
  75121. }
  75122. });
  75123. // node_modules/@babel/core/lib/config/files/module-types.js
  75124. var require_module_types = __commonJS({
  75125. "node_modules/@babel/core/lib/config/files/module-types.js"(exports) {
  75126. "use strict";
  75127. Object.defineProperty(exports, "__esModule", {
  75128. value: true
  75129. });
  75130. exports.default = loadCodeDefault;
  75131. exports.supportsESM = void 0;
  75132. var _async = require_async();
  75133. function _path() {
  75134. const data3 = __require("path");
  75135. _path = function() {
  75136. return data3;
  75137. };
  75138. return data3;
  75139. }
  75140. function _url() {
  75141. const data3 = __require("url");
  75142. _url = function() {
  75143. return data3;
  75144. };
  75145. return data3;
  75146. }
  75147. function _semver() {
  75148. const data3 = require_semver();
  75149. _semver = function() {
  75150. return data3;
  75151. };
  75152. return data3;
  75153. }
  75154. var _rewriteStackTrace = require_rewrite_stack_trace();
  75155. var _configError = require_config_error();
  75156. var _transformFile = require_transform_file();
  75157. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key2, arg) {
  75158. try {
  75159. var info = gen[key2](arg);
  75160. var value2 = info.value;
  75161. } catch (error) {
  75162. reject(error);
  75163. return;
  75164. }
  75165. if (info.done) {
  75166. resolve(value2);
  75167. } else {
  75168. Promise.resolve(value2).then(_next, _throw);
  75169. }
  75170. }
  75171. function _asyncToGenerator(fn) {
  75172. return function() {
  75173. var self2 = this, args = arguments;
  75174. return new Promise(function(resolve, reject) {
  75175. var gen = fn.apply(self2, args);
  75176. function _next(value2) {
  75177. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value2);
  75178. }
  75179. function _throw(err) {
  75180. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  75181. }
  75182. _next(void 0);
  75183. });
  75184. };
  75185. }
  75186. var import_;
  75187. try {
  75188. import_ = require_import();
  75189. } catch (_unused) {
  75190. }
  75191. var supportsESM = _semver().satisfies(process.versions.node, "^12.17 || >=13.2");
  75192. exports.supportsESM = supportsESM;
  75193. function* loadCodeDefault(filepath, asyncError, fallbackToTranspiledModule = false) {
  75194. switch (_path().extname(filepath)) {
  75195. case ".cjs":
  75196. return loadCjsDefault(filepath, fallbackToTranspiledModule);
  75197. case ".mjs":
  75198. break;
  75199. case ".cts":
  75200. return loadCtsDefault(filepath);
  75201. default:
  75202. try {
  75203. return loadCjsDefault(filepath, fallbackToTranspiledModule);
  75204. } catch (e) {
  75205. if (e.code !== "ERR_REQUIRE_ESM")
  75206. throw e;
  75207. }
  75208. }
  75209. if (yield* (0, _async.isAsync)()) {
  75210. return yield* (0, _async.waitFor)(loadMjsDefault(filepath));
  75211. }
  75212. throw new _configError.default(asyncError, filepath);
  75213. }
  75214. function loadCtsDefault(filepath) {
  75215. const ext = ".cts";
  75216. const hasTsSupport = !!(__require.extensions[".ts"] || __require.extensions[".cts"] || __require.extensions[".mts"]);
  75217. let handler;
  75218. if (!hasTsSupport) {
  75219. const opts = {
  75220. babelrc: false,
  75221. configFile: false,
  75222. sourceType: "unambiguous",
  75223. sourceMaps: "inline",
  75224. sourceFileName: _path().basename(filepath),
  75225. presets: [[getTSPreset(filepath), Object.assign({
  75226. onlyRemoveTypeImports: true,
  75227. optimizeConstEnums: true
  75228. }, {
  75229. allowDeclareFields: true
  75230. })]]
  75231. };
  75232. handler = function(m, filename) {
  75233. if (handler && filename.endsWith(ext)) {
  75234. try {
  75235. return m._compile((0, _transformFile.transformFileSync)(filename, Object.assign({}, opts, {
  75236. filename
  75237. })).code, filename);
  75238. } catch (error) {
  75239. if (!hasTsSupport) {
  75240. const packageJson = require_package2();
  75241. if (_semver().lte(packageJson.version, "7.21.4")) {
  75242. console.error("`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`.");
  75243. }
  75244. }
  75245. throw error;
  75246. }
  75247. }
  75248. return __require.extensions[".js"](m, filename);
  75249. };
  75250. __require.extensions[ext] = handler;
  75251. }
  75252. try {
  75253. const module2 = (0, _rewriteStackTrace.endHiddenCallStack)(__require)(filepath);
  75254. return module2 != null && module2.__esModule ? module2.default : module2;
  75255. } finally {
  75256. if (!hasTsSupport) {
  75257. if (__require.extensions[ext] === handler)
  75258. delete __require.extensions[ext];
  75259. handler = void 0;
  75260. }
  75261. }
  75262. }
  75263. function loadCjsDefault(filepath, fallbackToTranspiledModule) {
  75264. const module2 = (0, _rewriteStackTrace.endHiddenCallStack)(__require)(filepath);
  75265. return module2 != null && module2.__esModule ? module2.default || (fallbackToTranspiledModule ? module2 : void 0) : module2;
  75266. }
  75267. function loadMjsDefault(_x) {
  75268. return _loadMjsDefault.apply(this, arguments);
  75269. }
  75270. function _loadMjsDefault() {
  75271. _loadMjsDefault = _asyncToGenerator(function* (filepath) {
  75272. if (!import_) {
  75273. throw new _configError.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath);
  75274. }
  75275. const module2 = yield (0, _rewriteStackTrace.endHiddenCallStack)(import_)((0, _url().pathToFileURL)(filepath));
  75276. return module2.default;
  75277. });
  75278. return _loadMjsDefault.apply(this, arguments);
  75279. }
  75280. function getTSPreset(filepath) {
  75281. try {
  75282. return require_lib31();
  75283. } catch (error) {
  75284. if (error.code !== "MODULE_NOT_FOUND")
  75285. throw error;
  75286. let message = "You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!";
  75287. if (process.versions.pnp) {
  75288. message += `
  75289. If you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file:
  75290. packageExtensions:
  75291. "@babel/core@*":
  75292. peerDependencies:
  75293. "@babel/preset-typescript": "*"
  75294. `;
  75295. }
  75296. throw new _configError.default(message, filepath);
  75297. }
  75298. }
  75299. }
  75300. });
  75301. // node_modules/@babel/core/lib/config/files/configuration.js
  75302. var require_configuration = __commonJS({
  75303. "node_modules/@babel/core/lib/config/files/configuration.js"(exports) {
  75304. "use strict";
  75305. Object.defineProperty(exports, "__esModule", {
  75306. value: true
  75307. });
  75308. exports.ROOT_CONFIG_FILENAMES = void 0;
  75309. exports.findConfigUpwards = findConfigUpwards;
  75310. exports.findRelativeConfig = findRelativeConfig;
  75311. exports.findRootConfig = findRootConfig;
  75312. exports.loadConfig = loadConfig;
  75313. exports.resolveShowConfigPath = resolveShowConfigPath;
  75314. function _debug() {
  75315. const data3 = require_src();
  75316. _debug = function() {
  75317. return data3;
  75318. };
  75319. return data3;
  75320. }
  75321. function _fs() {
  75322. const data3 = __require("fs");
  75323. _fs = function() {
  75324. return data3;
  75325. };
  75326. return data3;
  75327. }
  75328. function _path() {
  75329. const data3 = __require("path");
  75330. _path = function() {
  75331. return data3;
  75332. };
  75333. return data3;
  75334. }
  75335. function _json() {
  75336. const data3 = (init_dist(), __toCommonJS(dist_exports));
  75337. _json = function() {
  75338. return data3;
  75339. };
  75340. return data3;
  75341. }
  75342. function _gensync() {
  75343. const data3 = require_gensync();
  75344. _gensync = function() {
  75345. return data3;
  75346. };
  75347. return data3;
  75348. }
  75349. var _caching = require_caching();
  75350. var _configApi = require_config_api();
  75351. var _utils = require_utils2();
  75352. var _moduleTypes = require_module_types();
  75353. var _patternToRegex = require_pattern_to_regex();
  75354. var _configError = require_config_error();
  75355. var fs = require_fs();
  75356. var _rewriteStackTrace = require_rewrite_stack_trace();
  75357. var debug = _debug()("babel:config:loading:files:configuration");
  75358. var ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts"];
  75359. exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES;
  75360. var RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json", ".babelrc.cts"];
  75361. var BABELIGNORE_FILENAME = ".babelignore";
  75362. var LOADING_CONFIGS = /* @__PURE__ */ new Set();
  75363. var readConfigCode = (0, _caching.makeStrongCache)(function* readConfigCode2(filepath, cache) {
  75364. if (!_fs().existsSync(filepath)) {
  75365. cache.never();
  75366. return null;
  75367. }
  75368. if (LOADING_CONFIGS.has(filepath)) {
  75369. cache.never();
  75370. debug("Auto-ignoring usage of config %o.", filepath);
  75371. return {
  75372. filepath,
  75373. dirname: _path().dirname(filepath),
  75374. options: {}
  75375. };
  75376. }
  75377. let options;
  75378. try {
  75379. LOADING_CONFIGS.add(filepath);
  75380. options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration file, which is only supported when running Babel asynchronously.");
  75381. } finally {
  75382. LOADING_CONFIGS.delete(filepath);
  75383. }
  75384. let assertCache = false;
  75385. if (typeof options === "function") {
  75386. yield* [];
  75387. options = (0, _rewriteStackTrace.endHiddenCallStack)(options)((0, _configApi.makeConfigAPI)(cache));
  75388. assertCache = true;
  75389. }
  75390. if (!options || typeof options !== "object" || Array.isArray(options)) {
  75391. throw new _configError.default(`Configuration should be an exported JavaScript object.`, filepath);
  75392. }
  75393. if (typeof options.then === "function") {
  75394. throw new _configError.default(`You appear to be using an async configuration, which your current version of Babel does not support. We may add support for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synchronously return your config.`, filepath);
  75395. }
  75396. if (assertCache && !cache.configured())
  75397. throwConfigError(filepath);
  75398. return {
  75399. filepath,
  75400. dirname: _path().dirname(filepath),
  75401. options
  75402. };
  75403. });
  75404. var packageToBabelConfig = (0, _caching.makeWeakCacheSync)((file) => {
  75405. const babel = file.options["babel"];
  75406. if (typeof babel === "undefined")
  75407. return null;
  75408. if (typeof babel !== "object" || Array.isArray(babel) || babel === null) {
  75409. throw new _configError.default(`.babel property must be an object`, file.filepath);
  75410. }
  75411. return {
  75412. filepath: file.filepath,
  75413. dirname: file.dirname,
  75414. options: babel
  75415. };
  75416. });
  75417. var readConfigJSON5 = (0, _utils.makeStaticFileCache)((filepath, content3) => {
  75418. let options;
  75419. try {
  75420. options = _json().parse(content3);
  75421. } catch (err) {
  75422. throw new _configError.default(`Error while parsing config - ${err.message}`, filepath);
  75423. }
  75424. if (!options)
  75425. throw new _configError.default(`No config detected`, filepath);
  75426. if (typeof options !== "object") {
  75427. throw new _configError.default(`Config returned typeof ${typeof options}`, filepath);
  75428. }
  75429. if (Array.isArray(options)) {
  75430. throw new _configError.default(`Expected config object but found array`, filepath);
  75431. }
  75432. delete options["$schema"];
  75433. return {
  75434. filepath,
  75435. dirname: _path().dirname(filepath),
  75436. options
  75437. };
  75438. });
  75439. var readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content3) => {
  75440. const ignoreDir = _path().dirname(filepath);
  75441. const ignorePatterns = content3.split("\n").map((line2) => line2.replace(/#(.*?)$/, "").trim()).filter((line2) => !!line2);
  75442. for (const pattern of ignorePatterns) {
  75443. if (pattern[0] === "!") {
  75444. throw new _configError.default(`Negation of file paths is not supported.`, filepath);
  75445. }
  75446. }
  75447. return {
  75448. filepath,
  75449. dirname: _path().dirname(filepath),
  75450. ignore: ignorePatterns.map((pattern) => (0, _patternToRegex.default)(pattern, ignoreDir))
  75451. };
  75452. });
  75453. function findConfigUpwards(rootDir) {
  75454. let dirname = rootDir;
  75455. for (; ; ) {
  75456. for (const filename of ROOT_CONFIG_FILENAMES) {
  75457. if (_fs().existsSync(_path().join(dirname, filename))) {
  75458. return dirname;
  75459. }
  75460. }
  75461. const nextDir = _path().dirname(dirname);
  75462. if (dirname === nextDir)
  75463. break;
  75464. dirname = nextDir;
  75465. }
  75466. return null;
  75467. }
  75468. function* findRelativeConfig(packageData, envName, caller) {
  75469. let config = null;
  75470. let ignore3 = null;
  75471. const dirname = _path().dirname(packageData.filepath);
  75472. for (const loc of packageData.directories) {
  75473. if (!config) {
  75474. var _packageData$pkg;
  75475. config = yield* loadOneConfig(RELATIVE_CONFIG_FILENAMES, loc, envName, caller, ((_packageData$pkg = packageData.pkg) == null ? void 0 : _packageData$pkg.dirname) === loc ? packageToBabelConfig(packageData.pkg) : null);
  75476. }
  75477. if (!ignore3) {
  75478. const ignoreLoc = _path().join(loc, BABELIGNORE_FILENAME);
  75479. ignore3 = yield* readIgnoreConfig(ignoreLoc);
  75480. if (ignore3) {
  75481. debug("Found ignore %o from %o.", ignore3.filepath, dirname);
  75482. }
  75483. }
  75484. }
  75485. return {
  75486. config,
  75487. ignore: ignore3
  75488. };
  75489. }
  75490. function findRootConfig(dirname, envName, caller) {
  75491. return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);
  75492. }
  75493. function* loadOneConfig(names, dirname, envName, caller, previousConfig = null) {
  75494. const configs = yield* _gensync().all(names.map((filename) => readConfig(_path().join(dirname, filename), envName, caller)));
  75495. const config = configs.reduce((previousConfig2, config2) => {
  75496. if (config2 && previousConfig2) {
  75497. throw new _configError.default(`Multiple configuration files found. Please remove one:
  75498. - ${_path().basename(previousConfig2.filepath)}
  75499. - ${config2.filepath}
  75500. from ${dirname}`);
  75501. }
  75502. return config2 || previousConfig2;
  75503. }, previousConfig);
  75504. if (config) {
  75505. debug("Found configuration %o from %o.", config.filepath, dirname);
  75506. }
  75507. return config;
  75508. }
  75509. function* loadConfig(name2, dirname, envName, caller) {
  75510. const filepath = (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? __require.resolve : (r, {
  75511. paths: [b]
  75512. }, M = __require("module")) => {
  75513. let f = M._findPath(r, M._nodeModulePaths(b).concat(b));
  75514. if (f)
  75515. return f;
  75516. f = new Error(`Cannot resolve module '${r}'`);
  75517. f.code = "MODULE_NOT_FOUND";
  75518. throw f;
  75519. })(name2, {
  75520. paths: [dirname]
  75521. });
  75522. const conf = yield* readConfig(filepath, envName, caller);
  75523. if (!conf) {
  75524. throw new _configError.default(`Config file contains no configuration data`, filepath);
  75525. }
  75526. debug("Loaded config %o from %o.", name2, dirname);
  75527. return conf;
  75528. }
  75529. function readConfig(filepath, envName, caller) {
  75530. const ext = _path().extname(filepath);
  75531. switch (ext) {
  75532. case ".js":
  75533. case ".cjs":
  75534. case ".mjs":
  75535. case ".cts":
  75536. return readConfigCode(filepath, {
  75537. envName,
  75538. caller
  75539. });
  75540. default:
  75541. return readConfigJSON5(filepath);
  75542. }
  75543. }
  75544. function* resolveShowConfigPath(dirname) {
  75545. const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
  75546. if (targetPath != null) {
  75547. const absolutePath = _path().resolve(dirname, targetPath);
  75548. const stats = yield* fs.stat(absolutePath);
  75549. if (!stats.isFile()) {
  75550. throw new Error(`${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`);
  75551. }
  75552. return absolutePath;
  75553. }
  75554. return null;
  75555. }
  75556. function throwConfigError(filepath) {
  75557. throw new _configError.default(`Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured
  75558. for various types of caching, using the first param of their handler functions:
  75559. module.exports = function(api) {
  75560. // The API exposes the following:
  75561. // Cache the returned value forever and don't call this function again.
  75562. api.cache(true);
  75563. // Don't cache at all. Not recommended because it will be very slow.
  75564. api.cache(false);
  75565. // Cached based on the value of some function. If this function returns a value different from
  75566. // a previously-encountered value, the plugins will re-evaluate.
  75567. var env = api.cache(() => process.env.NODE_ENV);
  75568. // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for
  75569. // any possible NODE_ENV value that might come up during plugin execution.
  75570. var isProd = api.cache(() => process.env.NODE_ENV === "production");
  75571. // .cache(fn) will perform a linear search though instances to find the matching plugin based
  75572. // based on previous instantiated plugins. If you want to recreate the plugin and discard the
  75573. // previous instance whenever something changes, you may use:
  75574. var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production");
  75575. // Note, we also expose the following more-verbose versions of the above examples:
  75576. api.cache.forever(); // api.cache(true)
  75577. api.cache.never(); // api.cache(false)
  75578. api.cache.using(fn); // api.cache(fn)
  75579. // Return the value that will be cached.
  75580. return { };
  75581. };`, filepath);
  75582. }
  75583. }
  75584. });
  75585. // node_modules/@babel/core/lib/vendor/import-meta-resolve.js
  75586. var require_import_meta_resolve = __commonJS({
  75587. "node_modules/@babel/core/lib/vendor/import-meta-resolve.js"(exports) {
  75588. "use strict";
  75589. Object.defineProperty(exports, "__esModule", {
  75590. value: true
  75591. });
  75592. exports.moduleResolve = moduleResolve;
  75593. exports.resolve = resolve;
  75594. function _url() {
  75595. const data3 = __require("url");
  75596. _url = function() {
  75597. return data3;
  75598. };
  75599. return data3;
  75600. }
  75601. function _fs() {
  75602. const data3 = _interopRequireWildcard(__require("fs"), true);
  75603. _fs = function() {
  75604. return data3;
  75605. };
  75606. return data3;
  75607. }
  75608. function _path() {
  75609. const data3 = __require("path");
  75610. _path = function() {
  75611. return data3;
  75612. };
  75613. return data3;
  75614. }
  75615. function _assert() {
  75616. const data3 = __require("assert");
  75617. _assert = function() {
  75618. return data3;
  75619. };
  75620. return data3;
  75621. }
  75622. function _util() {
  75623. const data3 = __require("util");
  75624. _util = function() {
  75625. return data3;
  75626. };
  75627. return data3;
  75628. }
  75629. function _getRequireWildcardCache(nodeInterop) {
  75630. if (typeof WeakMap !== "function")
  75631. return null;
  75632. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  75633. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  75634. return (_getRequireWildcardCache = function(nodeInterop2) {
  75635. return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
  75636. })(nodeInterop);
  75637. }
  75638. function _interopRequireWildcard(obj, nodeInterop) {
  75639. if (!nodeInterop && obj && obj.__esModule) {
  75640. return obj;
  75641. }
  75642. if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
  75643. return { default: obj };
  75644. }
  75645. var cache = _getRequireWildcardCache(nodeInterop);
  75646. if (cache && cache.has(obj)) {
  75647. return cache.get(obj);
  75648. }
  75649. var newObj = {};
  75650. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  75651. for (var key2 in obj) {
  75652. if (key2 !== "default" && Object.prototype.hasOwnProperty.call(obj, key2)) {
  75653. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key2) : null;
  75654. if (desc && (desc.get || desc.set)) {
  75655. Object.defineProperty(newObj, key2, desc);
  75656. } else {
  75657. newObj[key2] = obj[key2];
  75658. }
  75659. }
  75660. }
  75661. newObj.default = obj;
  75662. if (cache) {
  75663. cache.set(obj, newObj);
  75664. }
  75665. return newObj;
  75666. }
  75667. function asyncGeneratorStep(gen, resolve2, reject, _next, _throw, key2, arg) {
  75668. try {
  75669. var info = gen[key2](arg);
  75670. var value2 = info.value;
  75671. } catch (error) {
  75672. reject(error);
  75673. return;
  75674. }
  75675. if (info.done) {
  75676. resolve2(value2);
  75677. } else {
  75678. Promise.resolve(value2).then(_next, _throw);
  75679. }
  75680. }
  75681. function _asyncToGenerator(fn) {
  75682. return function() {
  75683. var self2 = this, args = arguments;
  75684. return new Promise(function(resolve2, reject) {
  75685. var gen = fn.apply(self2, args);
  75686. function _next(value2) {
  75687. asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "next", value2);
  75688. }
  75689. function _throw(err) {
  75690. asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "throw", err);
  75691. }
  75692. _next(void 0);
  75693. });
  75694. };
  75695. }
  75696. var re$3 = {
  75697. exports: {}
  75698. };
  75699. var SEMVER_SPEC_VERSION = "2.0.0";
  75700. var MAX_LENGTH$2 = 256;
  75701. var MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
  75702. var MAX_SAFE_COMPONENT_LENGTH = 16;
  75703. var constants = {
  75704. SEMVER_SPEC_VERSION,
  75705. MAX_LENGTH: MAX_LENGTH$2,
  75706. MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
  75707. MAX_SAFE_COMPONENT_LENGTH
  75708. };
  75709. var debug$1 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
  75710. };
  75711. var debug_1 = debug$1;
  75712. (function(module2, exports2) {
  75713. const {
  75714. MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH2
  75715. } = constants;
  75716. const debug2 = debug_1;
  75717. exports2 = module2.exports = {};
  75718. const re2 = exports2.re = [];
  75719. const src = exports2.src = [];
  75720. const t4 = exports2.t = {};
  75721. let R = 0;
  75722. const createToken = (name2, value2, isGlobal) => {
  75723. const index2 = R++;
  75724. debug2(name2, index2, value2);
  75725. t4[name2] = index2;
  75726. src[index2] = value2;
  75727. re2[index2] = new RegExp(value2, isGlobal ? "g" : void 0);
  75728. };
  75729. createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
  75730. createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
  75731. createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*");
  75732. createToken("MAINVERSION", `(${src[t4.NUMERICIDENTIFIER]})\\.(${src[t4.NUMERICIDENTIFIER]})\\.(${src[t4.NUMERICIDENTIFIER]})`);
  75733. createToken("MAINVERSIONLOOSE", `(${src[t4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t4.NUMERICIDENTIFIERLOOSE]})`);
  75734. createToken("PRERELEASEIDENTIFIER", `(?:${src[t4.NUMERICIDENTIFIER]}|${src[t4.NONNUMERICIDENTIFIER]})`);
  75735. createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t4.NUMERICIDENTIFIERLOOSE]}|${src[t4.NONNUMERICIDENTIFIER]})`);
  75736. createToken("PRERELEASE", `(?:-(${src[t4.PRERELEASEIDENTIFIER]}(?:\\.${src[t4.PRERELEASEIDENTIFIER]})*))`);
  75737. createToken("PRERELEASELOOSE", `(?:-?(${src[t4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t4.PRERELEASEIDENTIFIERLOOSE]})*))`);
  75738. createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+");
  75739. createToken("BUILD", `(?:\\+(${src[t4.BUILDIDENTIFIER]}(?:\\.${src[t4.BUILDIDENTIFIER]})*))`);
  75740. createToken("FULLPLAIN", `v?${src[t4.MAINVERSION]}${src[t4.PRERELEASE]}?${src[t4.BUILD]}?`);
  75741. createToken("FULL", `^${src[t4.FULLPLAIN]}$`);
  75742. createToken("LOOSEPLAIN", `[v=\\s]*${src[t4.MAINVERSIONLOOSE]}${src[t4.PRERELEASELOOSE]}?${src[t4.BUILD]}?`);
  75743. createToken("LOOSE", `^${src[t4.LOOSEPLAIN]}$`);
  75744. createToken("GTLT", "((?:<|>)?=?)");
  75745. createToken("XRANGEIDENTIFIERLOOSE", `${src[t4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
  75746. createToken("XRANGEIDENTIFIER", `${src[t4.NUMERICIDENTIFIER]}|x|X|\\*`);
  75747. createToken("XRANGEPLAIN", `[v=\\s]*(${src[t4.XRANGEIDENTIFIER]})(?:\\.(${src[t4.XRANGEIDENTIFIER]})(?:\\.(${src[t4.XRANGEIDENTIFIER]})(?:${src[t4.PRERELEASE]})?${src[t4.BUILD]}?)?)?`);
  75748. createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t4.XRANGEIDENTIFIERLOOSE]})(?:${src[t4.PRERELEASELOOSE]})?${src[t4.BUILD]}?)?)?`);
  75749. createToken("XRANGE", `^${src[t4.GTLT]}\\s*${src[t4.XRANGEPLAIN]}$`);
  75750. createToken("XRANGELOOSE", `^${src[t4.GTLT]}\\s*${src[t4.XRANGEPLAINLOOSE]}$`);
  75751. createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH2}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?(?:$|[^\\d])`);
  75752. createToken("COERCERTL", src[t4.COERCE], true);
  75753. createToken("LONETILDE", "(?:~>?)");
  75754. createToken("TILDETRIM", `(\\s*)${src[t4.LONETILDE]}\\s+`, true);
  75755. exports2.tildeTrimReplace = "$1~";
  75756. createToken("TILDE", `^${src[t4.LONETILDE]}${src[t4.XRANGEPLAIN]}$`);
  75757. createToken("TILDELOOSE", `^${src[t4.LONETILDE]}${src[t4.XRANGEPLAINLOOSE]}$`);
  75758. createToken("LONECARET", "(?:\\^)");
  75759. createToken("CARETTRIM", `(\\s*)${src[t4.LONECARET]}\\s+`, true);
  75760. exports2.caretTrimReplace = "$1^";
  75761. createToken("CARET", `^${src[t4.LONECARET]}${src[t4.XRANGEPLAIN]}$`);
  75762. createToken("CARETLOOSE", `^${src[t4.LONECARET]}${src[t4.XRANGEPLAINLOOSE]}$`);
  75763. createToken("COMPARATORLOOSE", `^${src[t4.GTLT]}\\s*(${src[t4.LOOSEPLAIN]})$|^$`);
  75764. createToken("COMPARATOR", `^${src[t4.GTLT]}\\s*(${src[t4.FULLPLAIN]})$|^$`);
  75765. createToken("COMPARATORTRIM", `(\\s*)${src[t4.GTLT]}\\s*(${src[t4.LOOSEPLAIN]}|${src[t4.XRANGEPLAIN]})`, true);
  75766. exports2.comparatorTrimReplace = "$1$2$3";
  75767. createToken("HYPHENRANGE", `^\\s*(${src[t4.XRANGEPLAIN]})\\s+-\\s+(${src[t4.XRANGEPLAIN]})\\s*$`);
  75768. createToken("HYPHENRANGELOOSE", `^\\s*(${src[t4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t4.XRANGEPLAINLOOSE]})\\s*$`);
  75769. createToken("STAR", "(<|>)?=?\\s*\\*");
  75770. createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
  75771. createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
  75772. })(re$3, re$3.exports);
  75773. var opts = ["includePrerelease", "loose", "rtl"];
  75774. var parseOptions$2 = (options) => !options ? {} : typeof options !== "object" ? {
  75775. loose: true
  75776. } : opts.filter((k) => options[k]).reduce((o, k) => {
  75777. o[k] = true;
  75778. return o;
  75779. }, {});
  75780. var parseOptions_1 = parseOptions$2;
  75781. var numeric = /^[0-9]+$/;
  75782. var compareIdentifiers$1 = (a, b) => {
  75783. const anum = numeric.test(a);
  75784. const bnum = numeric.test(b);
  75785. if (anum && bnum) {
  75786. a = +a;
  75787. b = +b;
  75788. }
  75789. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  75790. };
  75791. var rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a);
  75792. var identifiers = {
  75793. compareIdentifiers: compareIdentifiers$1,
  75794. rcompareIdentifiers
  75795. };
  75796. var debug = debug_1;
  75797. var {
  75798. MAX_LENGTH: MAX_LENGTH$1,
  75799. MAX_SAFE_INTEGER
  75800. } = constants;
  75801. var {
  75802. re: re$2,
  75803. t: t$2
  75804. } = re$3.exports;
  75805. var parseOptions$1 = parseOptions_1;
  75806. var {
  75807. compareIdentifiers
  75808. } = identifiers;
  75809. var SemVer$c = class {
  75810. constructor(version3, options) {
  75811. options = parseOptions$1(options);
  75812. if (version3 instanceof SemVer$c) {
  75813. if (version3.loose === !!options.loose && version3.includePrerelease === !!options.includePrerelease) {
  75814. return version3;
  75815. } else {
  75816. version3 = version3.version;
  75817. }
  75818. } else if (typeof version3 !== "string") {
  75819. throw new TypeError(`Invalid Version: ${version3}`);
  75820. }
  75821. if (version3.length > MAX_LENGTH$1) {
  75822. throw new TypeError(`version is longer than ${MAX_LENGTH$1} characters`);
  75823. }
  75824. debug("SemVer", version3, options);
  75825. this.options = options;
  75826. this.loose = !!options.loose;
  75827. this.includePrerelease = !!options.includePrerelease;
  75828. const m = version3.trim().match(options.loose ? re$2[t$2.LOOSE] : re$2[t$2.FULL]);
  75829. if (!m) {
  75830. throw new TypeError(`Invalid Version: ${version3}`);
  75831. }
  75832. this.raw = version3;
  75833. this.major = +m[1];
  75834. this.minor = +m[2];
  75835. this.patch = +m[3];
  75836. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  75837. throw new TypeError("Invalid major version");
  75838. }
  75839. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  75840. throw new TypeError("Invalid minor version");
  75841. }
  75842. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  75843. throw new TypeError("Invalid patch version");
  75844. }
  75845. if (!m[4]) {
  75846. this.prerelease = [];
  75847. } else {
  75848. this.prerelease = m[4].split(".").map((id) => {
  75849. if (/^[0-9]+$/.test(id)) {
  75850. const num = +id;
  75851. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  75852. return num;
  75853. }
  75854. }
  75855. return id;
  75856. });
  75857. }
  75858. this.build = m[5] ? m[5].split(".") : [];
  75859. this.format();
  75860. }
  75861. format() {
  75862. this.version = `${this.major}.${this.minor}.${this.patch}`;
  75863. if (this.prerelease.length) {
  75864. this.version += `-${this.prerelease.join(".")}`;
  75865. }
  75866. return this.version;
  75867. }
  75868. toString() {
  75869. return this.version;
  75870. }
  75871. compare(other) {
  75872. debug("SemVer.compare", this.version, this.options, other);
  75873. if (!(other instanceof SemVer$c)) {
  75874. if (typeof other === "string" && other === this.version) {
  75875. return 0;
  75876. }
  75877. other = new SemVer$c(other, this.options);
  75878. }
  75879. if (other.version === this.version) {
  75880. return 0;
  75881. }
  75882. return this.compareMain(other) || this.comparePre(other);
  75883. }
  75884. compareMain(other) {
  75885. if (!(other instanceof SemVer$c)) {
  75886. other = new SemVer$c(other, this.options);
  75887. }
  75888. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  75889. }
  75890. comparePre(other) {
  75891. if (!(other instanceof SemVer$c)) {
  75892. other = new SemVer$c(other, this.options);
  75893. }
  75894. if (this.prerelease.length && !other.prerelease.length) {
  75895. return -1;
  75896. } else if (!this.prerelease.length && other.prerelease.length) {
  75897. return 1;
  75898. } else if (!this.prerelease.length && !other.prerelease.length) {
  75899. return 0;
  75900. }
  75901. let i = 0;
  75902. do {
  75903. const a = this.prerelease[i];
  75904. const b = other.prerelease[i];
  75905. debug("prerelease compare", i, a, b);
  75906. if (a === void 0 && b === void 0) {
  75907. return 0;
  75908. } else if (b === void 0) {
  75909. return 1;
  75910. } else if (a === void 0) {
  75911. return -1;
  75912. } else if (a === b) {
  75913. continue;
  75914. } else {
  75915. return compareIdentifiers(a, b);
  75916. }
  75917. } while (++i);
  75918. }
  75919. compareBuild(other) {
  75920. if (!(other instanceof SemVer$c)) {
  75921. other = new SemVer$c(other, this.options);
  75922. }
  75923. let i = 0;
  75924. do {
  75925. const a = this.build[i];
  75926. const b = other.build[i];
  75927. debug("prerelease compare", i, a, b);
  75928. if (a === void 0 && b === void 0) {
  75929. return 0;
  75930. } else if (b === void 0) {
  75931. return 1;
  75932. } else if (a === void 0) {
  75933. return -1;
  75934. } else if (a === b) {
  75935. continue;
  75936. } else {
  75937. return compareIdentifiers(a, b);
  75938. }
  75939. } while (++i);
  75940. }
  75941. inc(release, identifier) {
  75942. switch (release) {
  75943. case "premajor":
  75944. this.prerelease.length = 0;
  75945. this.patch = 0;
  75946. this.minor = 0;
  75947. this.major++;
  75948. this.inc("pre", identifier);
  75949. break;
  75950. case "preminor":
  75951. this.prerelease.length = 0;
  75952. this.patch = 0;
  75953. this.minor++;
  75954. this.inc("pre", identifier);
  75955. break;
  75956. case "prepatch":
  75957. this.prerelease.length = 0;
  75958. this.inc("patch", identifier);
  75959. this.inc("pre", identifier);
  75960. break;
  75961. case "prerelease":
  75962. if (this.prerelease.length === 0) {
  75963. this.inc("patch", identifier);
  75964. }
  75965. this.inc("pre", identifier);
  75966. break;
  75967. case "major":
  75968. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  75969. this.major++;
  75970. }
  75971. this.minor = 0;
  75972. this.patch = 0;
  75973. this.prerelease = [];
  75974. break;
  75975. case "minor":
  75976. if (this.patch !== 0 || this.prerelease.length === 0) {
  75977. this.minor++;
  75978. }
  75979. this.patch = 0;
  75980. this.prerelease = [];
  75981. break;
  75982. case "patch":
  75983. if (this.prerelease.length === 0) {
  75984. this.patch++;
  75985. }
  75986. this.prerelease = [];
  75987. break;
  75988. case "pre":
  75989. if (this.prerelease.length === 0) {
  75990. this.prerelease = [0];
  75991. } else {
  75992. let i = this.prerelease.length;
  75993. while (--i >= 0) {
  75994. if (typeof this.prerelease[i] === "number") {
  75995. this.prerelease[i]++;
  75996. i = -2;
  75997. }
  75998. }
  75999. if (i === -1) {
  76000. this.prerelease.push(0);
  76001. }
  76002. }
  76003. if (identifier) {
  76004. if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
  76005. if (isNaN(this.prerelease[1])) {
  76006. this.prerelease = [identifier, 0];
  76007. }
  76008. } else {
  76009. this.prerelease = [identifier, 0];
  76010. }
  76011. }
  76012. break;
  76013. default:
  76014. throw new Error(`invalid increment argument: ${release}`);
  76015. }
  76016. this.format();
  76017. this.raw = this.version;
  76018. return this;
  76019. }
  76020. };
  76021. var semver$2 = SemVer$c;
  76022. var {
  76023. MAX_LENGTH
  76024. } = constants;
  76025. var {
  76026. re: re$1,
  76027. t: t$1
  76028. } = re$3.exports;
  76029. var SemVer$b = semver$2;
  76030. var parseOptions = parseOptions_1;
  76031. var parse$5 = (version3, options) => {
  76032. options = parseOptions(options);
  76033. if (version3 instanceof SemVer$b) {
  76034. return version3;
  76035. }
  76036. if (typeof version3 !== "string") {
  76037. return null;
  76038. }
  76039. if (version3.length > MAX_LENGTH) {
  76040. return null;
  76041. }
  76042. const r = options.loose ? re$1[t$1.LOOSE] : re$1[t$1.FULL];
  76043. if (!r.test(version3)) {
  76044. return null;
  76045. }
  76046. try {
  76047. return new SemVer$b(version3, options);
  76048. } catch (er) {
  76049. return null;
  76050. }
  76051. };
  76052. var parse_1 = parse$5;
  76053. var parse$4 = parse_1;
  76054. var valid$1 = (version3, options) => {
  76055. const v = parse$4(version3, options);
  76056. return v ? v.version : null;
  76057. };
  76058. var valid_1 = valid$1;
  76059. var parse$3 = parse_1;
  76060. var clean2 = (version3, options) => {
  76061. const s = parse$3(version3.trim().replace(/^[=v]+/, ""), options);
  76062. return s ? s.version : null;
  76063. };
  76064. var clean_1 = clean2;
  76065. var SemVer$a = semver$2;
  76066. var inc = (version3, release, options, identifier) => {
  76067. if (typeof options === "string") {
  76068. identifier = options;
  76069. options = void 0;
  76070. }
  76071. try {
  76072. return new SemVer$a(version3 instanceof SemVer$a ? version3.version : version3, options).inc(release, identifier).version;
  76073. } catch (er) {
  76074. return null;
  76075. }
  76076. };
  76077. var inc_1 = inc;
  76078. var SemVer$9 = semver$2;
  76079. var compare$a = (a, b, loose) => new SemVer$9(a, loose).compare(new SemVer$9(b, loose));
  76080. var compare_1 = compare$a;
  76081. var compare$9 = compare_1;
  76082. var eq$2 = (a, b, loose) => compare$9(a, b, loose) === 0;
  76083. var eq_1 = eq$2;
  76084. var parse$2 = parse_1;
  76085. var eq$1 = eq_1;
  76086. var diff = (version1, version22) => {
  76087. if (eq$1(version1, version22)) {
  76088. return null;
  76089. } else {
  76090. const v1 = parse$2(version1);
  76091. const v2 = parse$2(version22);
  76092. const hasPre = v1.prerelease.length || v2.prerelease.length;
  76093. const prefix = hasPre ? "pre" : "";
  76094. const defaultResult = hasPre ? "prerelease" : "";
  76095. for (const key2 in v1) {
  76096. if (key2 === "major" || key2 === "minor" || key2 === "patch") {
  76097. if (v1[key2] !== v2[key2]) {
  76098. return prefix + key2;
  76099. }
  76100. }
  76101. }
  76102. return defaultResult;
  76103. }
  76104. };
  76105. var diff_1 = diff;
  76106. var SemVer$8 = semver$2;
  76107. var major = (a, loose) => new SemVer$8(a, loose).major;
  76108. var major_1 = major;
  76109. var SemVer$7 = semver$2;
  76110. var minor = (a, loose) => new SemVer$7(a, loose).minor;
  76111. var minor_1 = minor;
  76112. var SemVer$6 = semver$2;
  76113. var patch3 = (a, loose) => new SemVer$6(a, loose).patch;
  76114. var patch_1 = patch3;
  76115. var parse$1 = parse_1;
  76116. var prerelease = (version3, options) => {
  76117. const parsed = parse$1(version3, options);
  76118. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  76119. };
  76120. var prerelease_1 = prerelease;
  76121. var compare$8 = compare_1;
  76122. var rcompare = (a, b, loose) => compare$8(b, a, loose);
  76123. var rcompare_1 = rcompare;
  76124. var compare$7 = compare_1;
  76125. var compareLoose = (a, b) => compare$7(a, b, true);
  76126. var compareLoose_1 = compareLoose;
  76127. var SemVer$5 = semver$2;
  76128. var compareBuild$2 = (a, b, loose) => {
  76129. const versionA = new SemVer$5(a, loose);
  76130. const versionB = new SemVer$5(b, loose);
  76131. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  76132. };
  76133. var compareBuild_1 = compareBuild$2;
  76134. var compareBuild$1 = compareBuild_1;
  76135. var sort = (list3, loose) => list3.sort((a, b) => compareBuild$1(a, b, loose));
  76136. var sort_1 = sort;
  76137. var compareBuild = compareBuild_1;
  76138. var rsort = (list3, loose) => list3.sort((a, b) => compareBuild(b, a, loose));
  76139. var rsort_1 = rsort;
  76140. var compare$6 = compare_1;
  76141. var gt$3 = (a, b, loose) => compare$6(a, b, loose) > 0;
  76142. var gt_1 = gt$3;
  76143. var compare$5 = compare_1;
  76144. var lt$2 = (a, b, loose) => compare$5(a, b, loose) < 0;
  76145. var lt_1 = lt$2;
  76146. var compare$4 = compare_1;
  76147. var neq$1 = (a, b, loose) => compare$4(a, b, loose) !== 0;
  76148. var neq_1 = neq$1;
  76149. var compare$3 = compare_1;
  76150. var gte$2 = (a, b, loose) => compare$3(a, b, loose) >= 0;
  76151. var gte_1 = gte$2;
  76152. var compare$2 = compare_1;
  76153. var lte$2 = (a, b, loose) => compare$2(a, b, loose) <= 0;
  76154. var lte_1 = lte$2;
  76155. var eq = eq_1;
  76156. var neq = neq_1;
  76157. var gt$2 = gt_1;
  76158. var gte$1 = gte_1;
  76159. var lt$1 = lt_1;
  76160. var lte$1 = lte_1;
  76161. var cmp = (a, op, b, loose) => {
  76162. switch (op) {
  76163. case "===":
  76164. if (typeof a === "object") {
  76165. a = a.version;
  76166. }
  76167. if (typeof b === "object") {
  76168. b = b.version;
  76169. }
  76170. return a === b;
  76171. case "!==":
  76172. if (typeof a === "object") {
  76173. a = a.version;
  76174. }
  76175. if (typeof b === "object") {
  76176. b = b.version;
  76177. }
  76178. return a !== b;
  76179. case "":
  76180. case "=":
  76181. case "==":
  76182. return eq(a, b, loose);
  76183. case "!=":
  76184. return neq(a, b, loose);
  76185. case ">":
  76186. return gt$2(a, b, loose);
  76187. case ">=":
  76188. return gte$1(a, b, loose);
  76189. case "<":
  76190. return lt$1(a, b, loose);
  76191. case "<=":
  76192. return lte$1(a, b, loose);
  76193. default:
  76194. throw new TypeError(`Invalid operator: ${op}`);
  76195. }
  76196. };
  76197. var cmp_1 = cmp;
  76198. var SemVer$4 = semver$2;
  76199. var parse9 = parse_1;
  76200. var {
  76201. re,
  76202. t: t3
  76203. } = re$3.exports;
  76204. var coerce = (version3, options) => {
  76205. if (version3 instanceof SemVer$4) {
  76206. return version3;
  76207. }
  76208. if (typeof version3 === "number") {
  76209. version3 = String(version3);
  76210. }
  76211. if (typeof version3 !== "string") {
  76212. return null;
  76213. }
  76214. options = options || {};
  76215. let match = null;
  76216. if (!options.rtl) {
  76217. match = version3.match(re[t3.COERCE]);
  76218. } else {
  76219. let next;
  76220. while ((next = re[t3.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) {
  76221. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  76222. match = next;
  76223. }
  76224. re[t3.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  76225. }
  76226. re[t3.COERCERTL].lastIndex = -1;
  76227. }
  76228. if (match === null) {
  76229. return null;
  76230. }
  76231. return parse9(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
  76232. };
  76233. var coerce_1 = coerce;
  76234. var iterator;
  76235. var hasRequiredIterator;
  76236. function requireIterator() {
  76237. if (hasRequiredIterator)
  76238. return iterator;
  76239. hasRequiredIterator = 1;
  76240. iterator = function(Yallist) {
  76241. Yallist.prototype[Symbol.iterator] = function* () {
  76242. for (let walker = this.head; walker; walker = walker.next) {
  76243. yield walker.value;
  76244. }
  76245. };
  76246. };
  76247. return iterator;
  76248. }
  76249. var yallist;
  76250. var hasRequiredYallist;
  76251. function requireYallist() {
  76252. if (hasRequiredYallist)
  76253. return yallist;
  76254. hasRequiredYallist = 1;
  76255. yallist = Yallist;
  76256. Yallist.Node = Node5;
  76257. Yallist.create = Yallist;
  76258. function Yallist(list3) {
  76259. var self2 = this;
  76260. if (!(self2 instanceof Yallist)) {
  76261. self2 = new Yallist();
  76262. }
  76263. self2.tail = null;
  76264. self2.head = null;
  76265. self2.length = 0;
  76266. if (list3 && typeof list3.forEach === "function") {
  76267. list3.forEach(function(item) {
  76268. self2.push(item);
  76269. });
  76270. } else if (arguments.length > 0) {
  76271. for (var i = 0, l = arguments.length; i < l; i++) {
  76272. self2.push(arguments[i]);
  76273. }
  76274. }
  76275. return self2;
  76276. }
  76277. Yallist.prototype.removeNode = function(node2) {
  76278. if (node2.list !== this) {
  76279. throw new Error("removing node which does not belong to this list");
  76280. }
  76281. var next = node2.next;
  76282. var prev = node2.prev;
  76283. if (next) {
  76284. next.prev = prev;
  76285. }
  76286. if (prev) {
  76287. prev.next = next;
  76288. }
  76289. if (node2 === this.head) {
  76290. this.head = next;
  76291. }
  76292. if (node2 === this.tail) {
  76293. this.tail = prev;
  76294. }
  76295. node2.list.length--;
  76296. node2.next = null;
  76297. node2.prev = null;
  76298. node2.list = null;
  76299. return next;
  76300. };
  76301. Yallist.prototype.unshiftNode = function(node2) {
  76302. if (node2 === this.head) {
  76303. return;
  76304. }
  76305. if (node2.list) {
  76306. node2.list.removeNode(node2);
  76307. }
  76308. var head = this.head;
  76309. node2.list = this;
  76310. node2.next = head;
  76311. if (head) {
  76312. head.prev = node2;
  76313. }
  76314. this.head = node2;
  76315. if (!this.tail) {
  76316. this.tail = node2;
  76317. }
  76318. this.length++;
  76319. };
  76320. Yallist.prototype.pushNode = function(node2) {
  76321. if (node2 === this.tail) {
  76322. return;
  76323. }
  76324. if (node2.list) {
  76325. node2.list.removeNode(node2);
  76326. }
  76327. var tail = this.tail;
  76328. node2.list = this;
  76329. node2.prev = tail;
  76330. if (tail) {
  76331. tail.next = node2;
  76332. }
  76333. this.tail = node2;
  76334. if (!this.head) {
  76335. this.head = node2;
  76336. }
  76337. this.length++;
  76338. };
  76339. Yallist.prototype.push = function() {
  76340. for (var i = 0, l = arguments.length; i < l; i++) {
  76341. push3(this, arguments[i]);
  76342. }
  76343. return this.length;
  76344. };
  76345. Yallist.prototype.unshift = function() {
  76346. for (var i = 0, l = arguments.length; i < l; i++) {
  76347. unshift(this, arguments[i]);
  76348. }
  76349. return this.length;
  76350. };
  76351. Yallist.prototype.pop = function() {
  76352. if (!this.tail) {
  76353. return void 0;
  76354. }
  76355. var res = this.tail.value;
  76356. this.tail = this.tail.prev;
  76357. if (this.tail) {
  76358. this.tail.next = null;
  76359. } else {
  76360. this.head = null;
  76361. }
  76362. this.length--;
  76363. return res;
  76364. };
  76365. Yallist.prototype.shift = function() {
  76366. if (!this.head) {
  76367. return void 0;
  76368. }
  76369. var res = this.head.value;
  76370. this.head = this.head.next;
  76371. if (this.head) {
  76372. this.head.prev = null;
  76373. } else {
  76374. this.tail = null;
  76375. }
  76376. this.length--;
  76377. return res;
  76378. };
  76379. Yallist.prototype.forEach = function(fn, thisp) {
  76380. thisp = thisp || this;
  76381. for (var walker = this.head, i = 0; walker !== null; i++) {
  76382. fn.call(thisp, walker.value, i, this);
  76383. walker = walker.next;
  76384. }
  76385. };
  76386. Yallist.prototype.forEachReverse = function(fn, thisp) {
  76387. thisp = thisp || this;
  76388. for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
  76389. fn.call(thisp, walker.value, i, this);
  76390. walker = walker.prev;
  76391. }
  76392. };
  76393. Yallist.prototype.get = function(n) {
  76394. for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
  76395. walker = walker.next;
  76396. }
  76397. if (i === n && walker !== null) {
  76398. return walker.value;
  76399. }
  76400. };
  76401. Yallist.prototype.getReverse = function(n) {
  76402. for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
  76403. walker = walker.prev;
  76404. }
  76405. if (i === n && walker !== null) {
  76406. return walker.value;
  76407. }
  76408. };
  76409. Yallist.prototype.map = function(fn, thisp) {
  76410. thisp = thisp || this;
  76411. var res = new Yallist();
  76412. for (var walker = this.head; walker !== null; ) {
  76413. res.push(fn.call(thisp, walker.value, this));
  76414. walker = walker.next;
  76415. }
  76416. return res;
  76417. };
  76418. Yallist.prototype.mapReverse = function(fn, thisp) {
  76419. thisp = thisp || this;
  76420. var res = new Yallist();
  76421. for (var walker = this.tail; walker !== null; ) {
  76422. res.push(fn.call(thisp, walker.value, this));
  76423. walker = walker.prev;
  76424. }
  76425. return res;
  76426. };
  76427. Yallist.prototype.reduce = function(fn, initial) {
  76428. var acc;
  76429. var walker = this.head;
  76430. if (arguments.length > 1) {
  76431. acc = initial;
  76432. } else if (this.head) {
  76433. walker = this.head.next;
  76434. acc = this.head.value;
  76435. } else {
  76436. throw new TypeError("Reduce of empty list with no initial value");
  76437. }
  76438. for (var i = 0; walker !== null; i++) {
  76439. acc = fn(acc, walker.value, i);
  76440. walker = walker.next;
  76441. }
  76442. return acc;
  76443. };
  76444. Yallist.prototype.reduceReverse = function(fn, initial) {
  76445. var acc;
  76446. var walker = this.tail;
  76447. if (arguments.length > 1) {
  76448. acc = initial;
  76449. } else if (this.tail) {
  76450. walker = this.tail.prev;
  76451. acc = this.tail.value;
  76452. } else {
  76453. throw new TypeError("Reduce of empty list with no initial value");
  76454. }
  76455. for (var i = this.length - 1; walker !== null; i--) {
  76456. acc = fn(acc, walker.value, i);
  76457. walker = walker.prev;
  76458. }
  76459. return acc;
  76460. };
  76461. Yallist.prototype.toArray = function() {
  76462. var arr = new Array(this.length);
  76463. for (var i = 0, walker = this.head; walker !== null; i++) {
  76464. arr[i] = walker.value;
  76465. walker = walker.next;
  76466. }
  76467. return arr;
  76468. };
  76469. Yallist.prototype.toArrayReverse = function() {
  76470. var arr = new Array(this.length);
  76471. for (var i = 0, walker = this.tail; walker !== null; i++) {
  76472. arr[i] = walker.value;
  76473. walker = walker.prev;
  76474. }
  76475. return arr;
  76476. };
  76477. Yallist.prototype.slice = function(from, to) {
  76478. to = to || this.length;
  76479. if (to < 0) {
  76480. to += this.length;
  76481. }
  76482. from = from || 0;
  76483. if (from < 0) {
  76484. from += this.length;
  76485. }
  76486. var ret = new Yallist();
  76487. if (to < from || to < 0) {
  76488. return ret;
  76489. }
  76490. if (from < 0) {
  76491. from = 0;
  76492. }
  76493. if (to > this.length) {
  76494. to = this.length;
  76495. }
  76496. for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
  76497. walker = walker.next;
  76498. }
  76499. for (; walker !== null && i < to; i++, walker = walker.next) {
  76500. ret.push(walker.value);
  76501. }
  76502. return ret;
  76503. };
  76504. Yallist.prototype.sliceReverse = function(from, to) {
  76505. to = to || this.length;
  76506. if (to < 0) {
  76507. to += this.length;
  76508. }
  76509. from = from || 0;
  76510. if (from < 0) {
  76511. from += this.length;
  76512. }
  76513. var ret = new Yallist();
  76514. if (to < from || to < 0) {
  76515. return ret;
  76516. }
  76517. if (from < 0) {
  76518. from = 0;
  76519. }
  76520. if (to > this.length) {
  76521. to = this.length;
  76522. }
  76523. for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
  76524. walker = walker.prev;
  76525. }
  76526. for (; walker !== null && i > from; i--, walker = walker.prev) {
  76527. ret.push(walker.value);
  76528. }
  76529. return ret;
  76530. };
  76531. Yallist.prototype.splice = function(start3, deleteCount, ...nodes) {
  76532. if (start3 > this.length) {
  76533. start3 = this.length - 1;
  76534. }
  76535. if (start3 < 0) {
  76536. start3 = this.length + start3;
  76537. }
  76538. for (var i = 0, walker = this.head; walker !== null && i < start3; i++) {
  76539. walker = walker.next;
  76540. }
  76541. var ret = [];
  76542. for (var i = 0; walker && i < deleteCount; i++) {
  76543. ret.push(walker.value);
  76544. walker = this.removeNode(walker);
  76545. }
  76546. if (walker === null) {
  76547. walker = this.tail;
  76548. }
  76549. if (walker !== this.head && walker !== this.tail) {
  76550. walker = walker.prev;
  76551. }
  76552. for (var i = 0; i < nodes.length; i++) {
  76553. walker = insert(this, walker, nodes[i]);
  76554. }
  76555. return ret;
  76556. };
  76557. Yallist.prototype.reverse = function() {
  76558. var head = this.head;
  76559. var tail = this.tail;
  76560. for (var walker = head; walker !== null; walker = walker.prev) {
  76561. var p = walker.prev;
  76562. walker.prev = walker.next;
  76563. walker.next = p;
  76564. }
  76565. this.head = tail;
  76566. this.tail = head;
  76567. return this;
  76568. };
  76569. function insert(self2, node2, value2) {
  76570. var inserted = node2 === self2.head ? new Node5(value2, null, node2, self2) : new Node5(value2, node2, node2.next, self2);
  76571. if (inserted.next === null) {
  76572. self2.tail = inserted;
  76573. }
  76574. if (inserted.prev === null) {
  76575. self2.head = inserted;
  76576. }
  76577. self2.length++;
  76578. return inserted;
  76579. }
  76580. function push3(self2, item) {
  76581. self2.tail = new Node5(item, self2.tail, null, self2);
  76582. if (!self2.head) {
  76583. self2.head = self2.tail;
  76584. }
  76585. self2.length++;
  76586. }
  76587. function unshift(self2, item) {
  76588. self2.head = new Node5(item, null, self2.head, self2);
  76589. if (!self2.tail) {
  76590. self2.tail = self2.head;
  76591. }
  76592. self2.length++;
  76593. }
  76594. function Node5(value2, prev, next, list3) {
  76595. if (!(this instanceof Node5)) {
  76596. return new Node5(value2, prev, next, list3);
  76597. }
  76598. this.list = list3;
  76599. this.value = value2;
  76600. if (prev) {
  76601. prev.next = this;
  76602. this.prev = prev;
  76603. } else {
  76604. this.prev = null;
  76605. }
  76606. if (next) {
  76607. next.prev = this;
  76608. this.next = next;
  76609. } else {
  76610. this.next = null;
  76611. }
  76612. }
  76613. try {
  76614. requireIterator()(Yallist);
  76615. } catch (er) {
  76616. }
  76617. return yallist;
  76618. }
  76619. var lruCache;
  76620. var hasRequiredLruCache;
  76621. function requireLruCache() {
  76622. if (hasRequiredLruCache)
  76623. return lruCache;
  76624. hasRequiredLruCache = 1;
  76625. const Yallist = requireYallist();
  76626. const MAX = Symbol("max");
  76627. const LENGTH = Symbol("length");
  76628. const LENGTH_CALCULATOR = Symbol("lengthCalculator");
  76629. const ALLOW_STALE = Symbol("allowStale");
  76630. const MAX_AGE = Symbol("maxAge");
  76631. const DISPOSE = Symbol("dispose");
  76632. const NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
  76633. const LRU_LIST = Symbol("lruList");
  76634. const CACHE = Symbol("cache");
  76635. const UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
  76636. const naiveLength = () => 1;
  76637. class LRUCache {
  76638. constructor(options) {
  76639. if (typeof options === "number")
  76640. options = {
  76641. max: options
  76642. };
  76643. if (!options)
  76644. options = {};
  76645. if (options.max && (typeof options.max !== "number" || options.max < 0))
  76646. throw new TypeError("max must be a non-negative number");
  76647. this[MAX] = options.max || Infinity;
  76648. const lc = options.length || naiveLength;
  76649. this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
  76650. this[ALLOW_STALE] = options.stale || false;
  76651. if (options.maxAge && typeof options.maxAge !== "number")
  76652. throw new TypeError("maxAge must be a number");
  76653. this[MAX_AGE] = options.maxAge || 0;
  76654. this[DISPOSE] = options.dispose;
  76655. this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
  76656. this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
  76657. this.reset();
  76658. }
  76659. set max(mL) {
  76660. if (typeof mL !== "number" || mL < 0)
  76661. throw new TypeError("max must be a non-negative number");
  76662. this[MAX] = mL || Infinity;
  76663. trim(this);
  76664. }
  76665. get max() {
  76666. return this[MAX];
  76667. }
  76668. set allowStale(allowStale) {
  76669. this[ALLOW_STALE] = !!allowStale;
  76670. }
  76671. get allowStale() {
  76672. return this[ALLOW_STALE];
  76673. }
  76674. set maxAge(mA) {
  76675. if (typeof mA !== "number")
  76676. throw new TypeError("maxAge must be a non-negative number");
  76677. this[MAX_AGE] = mA;
  76678. trim(this);
  76679. }
  76680. get maxAge() {
  76681. return this[MAX_AGE];
  76682. }
  76683. set lengthCalculator(lC) {
  76684. if (typeof lC !== "function")
  76685. lC = naiveLength;
  76686. if (lC !== this[LENGTH_CALCULATOR]) {
  76687. this[LENGTH_CALCULATOR] = lC;
  76688. this[LENGTH] = 0;
  76689. this[LRU_LIST].forEach((hit) => {
  76690. hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
  76691. this[LENGTH] += hit.length;
  76692. });
  76693. }
  76694. trim(this);
  76695. }
  76696. get lengthCalculator() {
  76697. return this[LENGTH_CALCULATOR];
  76698. }
  76699. get length() {
  76700. return this[LENGTH];
  76701. }
  76702. get itemCount() {
  76703. return this[LRU_LIST].length;
  76704. }
  76705. rforEach(fn, thisp) {
  76706. thisp = thisp || this;
  76707. for (let walker = this[LRU_LIST].tail; walker !== null; ) {
  76708. const prev = walker.prev;
  76709. forEachStep(this, fn, walker, thisp);
  76710. walker = prev;
  76711. }
  76712. }
  76713. forEach(fn, thisp) {
  76714. thisp = thisp || this;
  76715. for (let walker = this[LRU_LIST].head; walker !== null; ) {
  76716. const next = walker.next;
  76717. forEachStep(this, fn, walker, thisp);
  76718. walker = next;
  76719. }
  76720. }
  76721. keys() {
  76722. return this[LRU_LIST].toArray().map((k) => k.key);
  76723. }
  76724. values() {
  76725. return this[LRU_LIST].toArray().map((k) => k.value);
  76726. }
  76727. reset() {
  76728. if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
  76729. this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
  76730. }
  76731. this[CACHE] = /* @__PURE__ */ new Map();
  76732. this[LRU_LIST] = new Yallist();
  76733. this[LENGTH] = 0;
  76734. }
  76735. dump() {
  76736. return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
  76737. k: hit.key,
  76738. v: hit.value,
  76739. e: hit.now + (hit.maxAge || 0)
  76740. }).toArray().filter((h) => h);
  76741. }
  76742. dumpLru() {
  76743. return this[LRU_LIST];
  76744. }
  76745. set(key2, value2, maxAge) {
  76746. maxAge = maxAge || this[MAX_AGE];
  76747. if (maxAge && typeof maxAge !== "number")
  76748. throw new TypeError("maxAge must be a number");
  76749. const now = maxAge ? Date.now() : 0;
  76750. const len = this[LENGTH_CALCULATOR](value2, key2);
  76751. if (this[CACHE].has(key2)) {
  76752. if (len > this[MAX]) {
  76753. del(this, this[CACHE].get(key2));
  76754. return false;
  76755. }
  76756. const node2 = this[CACHE].get(key2);
  76757. const item = node2.value;
  76758. if (this[DISPOSE]) {
  76759. if (!this[NO_DISPOSE_ON_SET])
  76760. this[DISPOSE](key2, item.value);
  76761. }
  76762. item.now = now;
  76763. item.maxAge = maxAge;
  76764. item.value = value2;
  76765. this[LENGTH] += len - item.length;
  76766. item.length = len;
  76767. this.get(key2);
  76768. trim(this);
  76769. return true;
  76770. }
  76771. const hit = new Entry(key2, value2, len, now, maxAge);
  76772. if (hit.length > this[MAX]) {
  76773. if (this[DISPOSE])
  76774. this[DISPOSE](key2, value2);
  76775. return false;
  76776. }
  76777. this[LENGTH] += hit.length;
  76778. this[LRU_LIST].unshift(hit);
  76779. this[CACHE].set(key2, this[LRU_LIST].head);
  76780. trim(this);
  76781. return true;
  76782. }
  76783. has(key2) {
  76784. if (!this[CACHE].has(key2))
  76785. return false;
  76786. const hit = this[CACHE].get(key2).value;
  76787. return !isStale(this, hit);
  76788. }
  76789. get(key2) {
  76790. return get(this, key2, true);
  76791. }
  76792. peek(key2) {
  76793. return get(this, key2, false);
  76794. }
  76795. pop() {
  76796. const node2 = this[LRU_LIST].tail;
  76797. if (!node2)
  76798. return null;
  76799. del(this, node2);
  76800. return node2.value;
  76801. }
  76802. del(key2) {
  76803. del(this, this[CACHE].get(key2));
  76804. }
  76805. load(arr) {
  76806. this.reset();
  76807. const now = Date.now();
  76808. for (let l = arr.length - 1; l >= 0; l--) {
  76809. const hit = arr[l];
  76810. const expiresAt = hit.e || 0;
  76811. if (expiresAt === 0)
  76812. this.set(hit.k, hit.v);
  76813. else {
  76814. const maxAge = expiresAt - now;
  76815. if (maxAge > 0) {
  76816. this.set(hit.k, hit.v, maxAge);
  76817. }
  76818. }
  76819. }
  76820. }
  76821. prune() {
  76822. this[CACHE].forEach((value2, key2) => get(this, key2, false));
  76823. }
  76824. }
  76825. const get = (self2, key2, doUse) => {
  76826. const node2 = self2[CACHE].get(key2);
  76827. if (node2) {
  76828. const hit = node2.value;
  76829. if (isStale(self2, hit)) {
  76830. del(self2, node2);
  76831. if (!self2[ALLOW_STALE])
  76832. return void 0;
  76833. } else {
  76834. if (doUse) {
  76835. if (self2[UPDATE_AGE_ON_GET])
  76836. node2.value.now = Date.now();
  76837. self2[LRU_LIST].unshiftNode(node2);
  76838. }
  76839. }
  76840. return hit.value;
  76841. }
  76842. };
  76843. const isStale = (self2, hit) => {
  76844. if (!hit || !hit.maxAge && !self2[MAX_AGE])
  76845. return false;
  76846. const diff2 = Date.now() - hit.now;
  76847. return hit.maxAge ? diff2 > hit.maxAge : self2[MAX_AGE] && diff2 > self2[MAX_AGE];
  76848. };
  76849. const trim = (self2) => {
  76850. if (self2[LENGTH] > self2[MAX]) {
  76851. for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
  76852. const prev = walker.prev;
  76853. del(self2, walker);
  76854. walker = prev;
  76855. }
  76856. }
  76857. };
  76858. const del = (self2, node2) => {
  76859. if (node2) {
  76860. const hit = node2.value;
  76861. if (self2[DISPOSE])
  76862. self2[DISPOSE](hit.key, hit.value);
  76863. self2[LENGTH] -= hit.length;
  76864. self2[CACHE].delete(hit.key);
  76865. self2[LRU_LIST].removeNode(node2);
  76866. }
  76867. };
  76868. class Entry {
  76869. constructor(key2, value2, length, now, maxAge) {
  76870. this.key = key2;
  76871. this.value = value2;
  76872. this.length = length;
  76873. this.now = now;
  76874. this.maxAge = maxAge || 0;
  76875. }
  76876. }
  76877. const forEachStep = (self2, fn, node2, thisp) => {
  76878. let hit = node2.value;
  76879. if (isStale(self2, hit)) {
  76880. del(self2, node2);
  76881. if (!self2[ALLOW_STALE])
  76882. hit = void 0;
  76883. }
  76884. if (hit)
  76885. fn.call(thisp, hit.value, hit.key, self2);
  76886. };
  76887. lruCache = LRUCache;
  76888. return lruCache;
  76889. }
  76890. var range;
  76891. var hasRequiredRange;
  76892. function requireRange() {
  76893. if (hasRequiredRange)
  76894. return range;
  76895. hasRequiredRange = 1;
  76896. class Range2 {
  76897. constructor(range2, options) {
  76898. options = parseOptions2(options);
  76899. if (range2 instanceof Range2) {
  76900. if (range2.loose === !!options.loose && range2.includePrerelease === !!options.includePrerelease) {
  76901. return range2;
  76902. } else {
  76903. return new Range2(range2.raw, options);
  76904. }
  76905. }
  76906. if (range2 instanceof Comparator2) {
  76907. this.raw = range2.value;
  76908. this.set = [[range2]];
  76909. this.format();
  76910. return this;
  76911. }
  76912. this.options = options;
  76913. this.loose = !!options.loose;
  76914. this.includePrerelease = !!options.includePrerelease;
  76915. this.raw = range2;
  76916. this.set = range2.split("||").map((r) => this.parseRange(r.trim())).filter((c2) => c2.length);
  76917. if (!this.set.length) {
  76918. throw new TypeError(`Invalid SemVer Range: ${range2}`);
  76919. }
  76920. if (this.set.length > 1) {
  76921. const first = this.set[0];
  76922. this.set = this.set.filter((c2) => !isNullSet(c2[0]));
  76923. if (this.set.length === 0) {
  76924. this.set = [first];
  76925. } else if (this.set.length > 1) {
  76926. for (const c2 of this.set) {
  76927. if (c2.length === 1 && isAny(c2[0])) {
  76928. this.set = [c2];
  76929. break;
  76930. }
  76931. }
  76932. }
  76933. }
  76934. this.format();
  76935. }
  76936. format() {
  76937. this.range = this.set.map((comps) => {
  76938. return comps.join(" ").trim();
  76939. }).join("||").trim();
  76940. return this.range;
  76941. }
  76942. toString() {
  76943. return this.range;
  76944. }
  76945. parseRange(range2) {
  76946. range2 = range2.trim();
  76947. const memoOpts = Object.keys(this.options).join(",");
  76948. const memoKey = `parseRange:${memoOpts}:${range2}`;
  76949. const cached = cache.get(memoKey);
  76950. if (cached) {
  76951. return cached;
  76952. }
  76953. const loose = this.options.loose;
  76954. const hr = loose ? re2[t4.HYPHENRANGELOOSE] : re2[t4.HYPHENRANGE];
  76955. range2 = range2.replace(hr, hyphenReplace(this.options.includePrerelease));
  76956. debug2("hyphen replace", range2);
  76957. range2 = range2.replace(re2[t4.COMPARATORTRIM], comparatorTrimReplace);
  76958. debug2("comparator trim", range2);
  76959. range2 = range2.replace(re2[t4.TILDETRIM], tildeTrimReplace);
  76960. range2 = range2.replace(re2[t4.CARETTRIM], caretTrimReplace);
  76961. range2 = range2.split(/\s+/).join(" ");
  76962. let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
  76963. if (loose) {
  76964. rangeList = rangeList.filter((comp) => {
  76965. debug2("loose invalid filter", comp, this.options);
  76966. return !!comp.match(re2[t4.COMPARATORLOOSE]);
  76967. });
  76968. }
  76969. debug2("range list", rangeList);
  76970. const rangeMap = /* @__PURE__ */ new Map();
  76971. const comparators = rangeList.map((comp) => new Comparator2(comp, this.options));
  76972. for (const comp of comparators) {
  76973. if (isNullSet(comp)) {
  76974. return [comp];
  76975. }
  76976. rangeMap.set(comp.value, comp);
  76977. }
  76978. if (rangeMap.size > 1 && rangeMap.has("")) {
  76979. rangeMap.delete("");
  76980. }
  76981. const result = [...rangeMap.values()];
  76982. cache.set(memoKey, result);
  76983. return result;
  76984. }
  76985. intersects(range2, options) {
  76986. if (!(range2 instanceof Range2)) {
  76987. throw new TypeError("a Range is required");
  76988. }
  76989. return this.set.some((thisComparators) => {
  76990. return isSatisfiable(thisComparators, options) && range2.set.some((rangeComparators) => {
  76991. return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
  76992. return rangeComparators.every((rangeComparator) => {
  76993. return thisComparator.intersects(rangeComparator, options);
  76994. });
  76995. });
  76996. });
  76997. });
  76998. }
  76999. test(version3) {
  77000. if (!version3) {
  77001. return false;
  77002. }
  77003. if (typeof version3 === "string") {
  77004. try {
  77005. version3 = new SemVer2(version3, this.options);
  77006. } catch (er) {
  77007. return false;
  77008. }
  77009. }
  77010. for (let i = 0; i < this.set.length; i++) {
  77011. if (testSet(this.set[i], version3, this.options)) {
  77012. return true;
  77013. }
  77014. }
  77015. return false;
  77016. }
  77017. }
  77018. range = Range2;
  77019. const LRU = requireLruCache();
  77020. const cache = new LRU({
  77021. max: 1e3
  77022. });
  77023. const parseOptions2 = parseOptions_1;
  77024. const Comparator2 = requireComparator();
  77025. const debug2 = debug_1;
  77026. const SemVer2 = semver$2;
  77027. const {
  77028. re: re2,
  77029. t: t4,
  77030. comparatorTrimReplace,
  77031. tildeTrimReplace,
  77032. caretTrimReplace
  77033. } = re$3.exports;
  77034. const isNullSet = (c2) => c2.value === "<0.0.0-0";
  77035. const isAny = (c2) => c2.value === "";
  77036. const isSatisfiable = (comparators, options) => {
  77037. let result = true;
  77038. const remainingComparators = comparators.slice();
  77039. let testComparator = remainingComparators.pop();
  77040. while (result && remainingComparators.length) {
  77041. result = remainingComparators.every((otherComparator) => {
  77042. return testComparator.intersects(otherComparator, options);
  77043. });
  77044. testComparator = remainingComparators.pop();
  77045. }
  77046. return result;
  77047. };
  77048. const parseComparator = (comp, options) => {
  77049. debug2("comp", comp, options);
  77050. comp = replaceCarets(comp, options);
  77051. debug2("caret", comp);
  77052. comp = replaceTildes(comp, options);
  77053. debug2("tildes", comp);
  77054. comp = replaceXRanges(comp, options);
  77055. debug2("xrange", comp);
  77056. comp = replaceStars(comp, options);
  77057. debug2("stars", comp);
  77058. return comp;
  77059. };
  77060. const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
  77061. const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c2) => {
  77062. return replaceTilde(c2, options);
  77063. }).join(" ");
  77064. const replaceTilde = (comp, options) => {
  77065. const r = options.loose ? re2[t4.TILDELOOSE] : re2[t4.TILDE];
  77066. return comp.replace(r, (_, M, m, p, pr) => {
  77067. debug2("tilde", comp, _, M, m, p, pr);
  77068. let ret;
  77069. if (isX(M)) {
  77070. ret = "";
  77071. } else if (isX(m)) {
  77072. ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
  77073. } else if (isX(p)) {
  77074. ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
  77075. } else if (pr) {
  77076. debug2("replaceTilde pr", pr);
  77077. ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
  77078. } else {
  77079. ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
  77080. }
  77081. debug2("tilde return", ret);
  77082. return ret;
  77083. });
  77084. };
  77085. const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c2) => {
  77086. return replaceCaret(c2, options);
  77087. }).join(" ");
  77088. const replaceCaret = (comp, options) => {
  77089. debug2("caret", comp, options);
  77090. const r = options.loose ? re2[t4.CARETLOOSE] : re2[t4.CARET];
  77091. const z = options.includePrerelease ? "-0" : "";
  77092. return comp.replace(r, (_, M, m, p, pr) => {
  77093. debug2("caret", comp, _, M, m, p, pr);
  77094. let ret;
  77095. if (isX(M)) {
  77096. ret = "";
  77097. } else if (isX(m)) {
  77098. ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
  77099. } else if (isX(p)) {
  77100. if (M === "0") {
  77101. ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
  77102. } else {
  77103. ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
  77104. }
  77105. } else if (pr) {
  77106. debug2("replaceCaret pr", pr);
  77107. if (M === "0") {
  77108. if (m === "0") {
  77109. ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
  77110. } else {
  77111. ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
  77112. }
  77113. } else {
  77114. ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
  77115. }
  77116. } else {
  77117. debug2("no pr");
  77118. if (M === "0") {
  77119. if (m === "0") {
  77120. ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
  77121. } else {
  77122. ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
  77123. }
  77124. } else {
  77125. ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
  77126. }
  77127. }
  77128. debug2("caret return", ret);
  77129. return ret;
  77130. });
  77131. };
  77132. const replaceXRanges = (comp, options) => {
  77133. debug2("replaceXRanges", comp, options);
  77134. return comp.split(/\s+/).map((c2) => {
  77135. return replaceXRange(c2, options);
  77136. }).join(" ");
  77137. };
  77138. const replaceXRange = (comp, options) => {
  77139. comp = comp.trim();
  77140. const r = options.loose ? re2[t4.XRANGELOOSE] : re2[t4.XRANGE];
  77141. return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
  77142. debug2("xRange", comp, ret, gtlt, M, m, p, pr);
  77143. const xM = isX(M);
  77144. const xm = xM || isX(m);
  77145. const xp = xm || isX(p);
  77146. const anyX = xp;
  77147. if (gtlt === "=" && anyX) {
  77148. gtlt = "";
  77149. }
  77150. pr = options.includePrerelease ? "-0" : "";
  77151. if (xM) {
  77152. if (gtlt === ">" || gtlt === "<") {
  77153. ret = "<0.0.0-0";
  77154. } else {
  77155. ret = "*";
  77156. }
  77157. } else if (gtlt && anyX) {
  77158. if (xm) {
  77159. m = 0;
  77160. }
  77161. p = 0;
  77162. if (gtlt === ">") {
  77163. gtlt = ">=";
  77164. if (xm) {
  77165. M = +M + 1;
  77166. m = 0;
  77167. p = 0;
  77168. } else {
  77169. m = +m + 1;
  77170. p = 0;
  77171. }
  77172. } else if (gtlt === "<=") {
  77173. gtlt = "<";
  77174. if (xm) {
  77175. M = +M + 1;
  77176. } else {
  77177. m = +m + 1;
  77178. }
  77179. }
  77180. if (gtlt === "<") {
  77181. pr = "-0";
  77182. }
  77183. ret = `${gtlt + M}.${m}.${p}${pr}`;
  77184. } else if (xm) {
  77185. ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
  77186. } else if (xp) {
  77187. ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
  77188. }
  77189. debug2("xRange return", ret);
  77190. return ret;
  77191. });
  77192. };
  77193. const replaceStars = (comp, options) => {
  77194. debug2("replaceStars", comp, options);
  77195. return comp.trim().replace(re2[t4.STAR], "");
  77196. };
  77197. const replaceGTE0 = (comp, options) => {
  77198. debug2("replaceGTE0", comp, options);
  77199. return comp.trim().replace(re2[options.includePrerelease ? t4.GTE0PRE : t4.GTE0], "");
  77200. };
  77201. const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
  77202. if (isX(fM)) {
  77203. from = "";
  77204. } else if (isX(fm)) {
  77205. from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
  77206. } else if (isX(fp)) {
  77207. from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
  77208. } else if (fpr) {
  77209. from = `>=${from}`;
  77210. } else {
  77211. from = `>=${from}${incPr ? "-0" : ""}`;
  77212. }
  77213. if (isX(tM)) {
  77214. to = "";
  77215. } else if (isX(tm)) {
  77216. to = `<${+tM + 1}.0.0-0`;
  77217. } else if (isX(tp)) {
  77218. to = `<${tM}.${+tm + 1}.0-0`;
  77219. } else if (tpr) {
  77220. to = `<=${tM}.${tm}.${tp}-${tpr}`;
  77221. } else if (incPr) {
  77222. to = `<${tM}.${tm}.${+tp + 1}-0`;
  77223. } else {
  77224. to = `<=${to}`;
  77225. }
  77226. return `${from} ${to}`.trim();
  77227. };
  77228. const testSet = (set, version3, options) => {
  77229. for (let i = 0; i < set.length; i++) {
  77230. if (!set[i].test(version3)) {
  77231. return false;
  77232. }
  77233. }
  77234. if (version3.prerelease.length && !options.includePrerelease) {
  77235. for (let i = 0; i < set.length; i++) {
  77236. debug2(set[i].semver);
  77237. if (set[i].semver === Comparator2.ANY) {
  77238. continue;
  77239. }
  77240. if (set[i].semver.prerelease.length > 0) {
  77241. const allowed = set[i].semver;
  77242. if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) {
  77243. return true;
  77244. }
  77245. }
  77246. }
  77247. return false;
  77248. }
  77249. return true;
  77250. };
  77251. return range;
  77252. }
  77253. var comparator;
  77254. var hasRequiredComparator;
  77255. function requireComparator() {
  77256. if (hasRequiredComparator)
  77257. return comparator;
  77258. hasRequiredComparator = 1;
  77259. const ANY2 = Symbol("SemVer ANY");
  77260. class Comparator2 {
  77261. static get ANY() {
  77262. return ANY2;
  77263. }
  77264. constructor(comp, options) {
  77265. options = parseOptions2(options);
  77266. if (comp instanceof Comparator2) {
  77267. if (comp.loose === !!options.loose) {
  77268. return comp;
  77269. } else {
  77270. comp = comp.value;
  77271. }
  77272. }
  77273. debug2("comparator", comp, options);
  77274. this.options = options;
  77275. this.loose = !!options.loose;
  77276. this.parse(comp);
  77277. if (this.semver === ANY2) {
  77278. this.value = "";
  77279. } else {
  77280. this.value = this.operator + this.semver.version;
  77281. }
  77282. debug2("comp", this);
  77283. }
  77284. parse(comp) {
  77285. const r = this.options.loose ? re2[t4.COMPARATORLOOSE] : re2[t4.COMPARATOR];
  77286. const m = comp.match(r);
  77287. if (!m) {
  77288. throw new TypeError(`Invalid comparator: ${comp}`);
  77289. }
  77290. this.operator = m[1] !== void 0 ? m[1] : "";
  77291. if (this.operator === "=") {
  77292. this.operator = "";
  77293. }
  77294. if (!m[2]) {
  77295. this.semver = ANY2;
  77296. } else {
  77297. this.semver = new SemVer2(m[2], this.options.loose);
  77298. }
  77299. }
  77300. toString() {
  77301. return this.value;
  77302. }
  77303. test(version3) {
  77304. debug2("Comparator.test", version3, this.options.loose);
  77305. if (this.semver === ANY2 || version3 === ANY2) {
  77306. return true;
  77307. }
  77308. if (typeof version3 === "string") {
  77309. try {
  77310. version3 = new SemVer2(version3, this.options);
  77311. } catch (er) {
  77312. return false;
  77313. }
  77314. }
  77315. return cmp2(version3, this.operator, this.semver, this.options);
  77316. }
  77317. intersects(comp, options) {
  77318. if (!(comp instanceof Comparator2)) {
  77319. throw new TypeError("a Comparator is required");
  77320. }
  77321. if (!options || typeof options !== "object") {
  77322. options = {
  77323. loose: !!options,
  77324. includePrerelease: false
  77325. };
  77326. }
  77327. if (this.operator === "") {
  77328. if (this.value === "") {
  77329. return true;
  77330. }
  77331. return new Range2(comp.value, options).test(this.value);
  77332. } else if (comp.operator === "") {
  77333. if (comp.value === "") {
  77334. return true;
  77335. }
  77336. return new Range2(this.value, options).test(comp.semver);
  77337. }
  77338. const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
  77339. const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
  77340. const sameSemVer = this.semver.version === comp.semver.version;
  77341. const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
  77342. const oppositeDirectionsLessThan = cmp2(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
  77343. const oppositeDirectionsGreaterThan = cmp2(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
  77344. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  77345. }
  77346. }
  77347. comparator = Comparator2;
  77348. const parseOptions2 = parseOptions_1;
  77349. const {
  77350. re: re2,
  77351. t: t4
  77352. } = re$3.exports;
  77353. const cmp2 = cmp_1;
  77354. const debug2 = debug_1;
  77355. const SemVer2 = semver$2;
  77356. const Range2 = requireRange();
  77357. return comparator;
  77358. }
  77359. var Range$8 = requireRange();
  77360. var satisfies$3 = (version3, range2, options) => {
  77361. try {
  77362. range2 = new Range$8(range2, options);
  77363. } catch (er) {
  77364. return false;
  77365. }
  77366. return range2.test(version3);
  77367. };
  77368. var satisfies_1 = satisfies$3;
  77369. var Range$7 = requireRange();
  77370. var toComparators = (range2, options) => new Range$7(range2, options).set.map((comp) => comp.map((c2) => c2.value).join(" ").trim().split(" "));
  77371. var toComparators_1 = toComparators;
  77372. var SemVer$3 = semver$2;
  77373. var Range$6 = requireRange();
  77374. var maxSatisfying = (versions, range2, options) => {
  77375. let max = null;
  77376. let maxSV = null;
  77377. let rangeObj = null;
  77378. try {
  77379. rangeObj = new Range$6(range2, options);
  77380. } catch (er) {
  77381. return null;
  77382. }
  77383. versions.forEach((v) => {
  77384. if (rangeObj.test(v)) {
  77385. if (!max || maxSV.compare(v) === -1) {
  77386. max = v;
  77387. maxSV = new SemVer$3(max, options);
  77388. }
  77389. }
  77390. });
  77391. return max;
  77392. };
  77393. var maxSatisfying_1 = maxSatisfying;
  77394. var SemVer$2 = semver$2;
  77395. var Range$5 = requireRange();
  77396. var minSatisfying = (versions, range2, options) => {
  77397. let min = null;
  77398. let minSV = null;
  77399. let rangeObj = null;
  77400. try {
  77401. rangeObj = new Range$5(range2, options);
  77402. } catch (er) {
  77403. return null;
  77404. }
  77405. versions.forEach((v) => {
  77406. if (rangeObj.test(v)) {
  77407. if (!min || minSV.compare(v) === 1) {
  77408. min = v;
  77409. minSV = new SemVer$2(min, options);
  77410. }
  77411. }
  77412. });
  77413. return min;
  77414. };
  77415. var minSatisfying_1 = minSatisfying;
  77416. var SemVer$1 = semver$2;
  77417. var Range$4 = requireRange();
  77418. var gt$1 = gt_1;
  77419. var minVersion = (range2, loose) => {
  77420. range2 = new Range$4(range2, loose);
  77421. let minver = new SemVer$1("0.0.0");
  77422. if (range2.test(minver)) {
  77423. return minver;
  77424. }
  77425. minver = new SemVer$1("0.0.0-0");
  77426. if (range2.test(minver)) {
  77427. return minver;
  77428. }
  77429. minver = null;
  77430. for (let i = 0; i < range2.set.length; ++i) {
  77431. const comparators = range2.set[i];
  77432. let setMin = null;
  77433. comparators.forEach((comparator2) => {
  77434. const compver = new SemVer$1(comparator2.semver.version);
  77435. switch (comparator2.operator) {
  77436. case ">":
  77437. if (compver.prerelease.length === 0) {
  77438. compver.patch++;
  77439. } else {
  77440. compver.prerelease.push(0);
  77441. }
  77442. compver.raw = compver.format();
  77443. case "":
  77444. case ">=":
  77445. if (!setMin || gt$1(compver, setMin)) {
  77446. setMin = compver;
  77447. }
  77448. break;
  77449. case "<":
  77450. case "<=":
  77451. break;
  77452. default:
  77453. throw new Error(`Unexpected operation: ${comparator2.operator}`);
  77454. }
  77455. });
  77456. if (setMin && (!minver || gt$1(minver, setMin))) {
  77457. minver = setMin;
  77458. }
  77459. }
  77460. if (minver && range2.test(minver)) {
  77461. return minver;
  77462. }
  77463. return null;
  77464. };
  77465. var minVersion_1 = minVersion;
  77466. var Range$3 = requireRange();
  77467. var validRange = (range2, options) => {
  77468. try {
  77469. return new Range$3(range2, options).range || "*";
  77470. } catch (er) {
  77471. return null;
  77472. }
  77473. };
  77474. var valid2 = validRange;
  77475. var SemVer = semver$2;
  77476. var Comparator$1 = requireComparator();
  77477. var {
  77478. ANY: ANY$1
  77479. } = Comparator$1;
  77480. var Range$2 = requireRange();
  77481. var satisfies$2 = satisfies_1;
  77482. var gt = gt_1;
  77483. var lt = lt_1;
  77484. var lte = lte_1;
  77485. var gte = gte_1;
  77486. var outside$2 = (version3, range2, hilo, options) => {
  77487. version3 = new SemVer(version3, options);
  77488. range2 = new Range$2(range2, options);
  77489. let gtfn, ltefn, ltfn, comp, ecomp;
  77490. switch (hilo) {
  77491. case ">":
  77492. gtfn = gt;
  77493. ltefn = lte;
  77494. ltfn = lt;
  77495. comp = ">";
  77496. ecomp = ">=";
  77497. break;
  77498. case "<":
  77499. gtfn = lt;
  77500. ltefn = gte;
  77501. ltfn = gt;
  77502. comp = "<";
  77503. ecomp = "<=";
  77504. break;
  77505. default:
  77506. throw new TypeError('Must provide a hilo val of "<" or ">"');
  77507. }
  77508. if (satisfies$2(version3, range2, options)) {
  77509. return false;
  77510. }
  77511. for (let i = 0; i < range2.set.length; ++i) {
  77512. const comparators = range2.set[i];
  77513. let high = null;
  77514. let low = null;
  77515. comparators.forEach((comparator2) => {
  77516. if (comparator2.semver === ANY$1) {
  77517. comparator2 = new Comparator$1(">=0.0.0");
  77518. }
  77519. high = high || comparator2;
  77520. low = low || comparator2;
  77521. if (gtfn(comparator2.semver, high.semver, options)) {
  77522. high = comparator2;
  77523. } else if (ltfn(comparator2.semver, low.semver, options)) {
  77524. low = comparator2;
  77525. }
  77526. });
  77527. if (high.operator === comp || high.operator === ecomp) {
  77528. return false;
  77529. }
  77530. if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) {
  77531. return false;
  77532. } else if (low.operator === ecomp && ltfn(version3, low.semver)) {
  77533. return false;
  77534. }
  77535. }
  77536. return true;
  77537. };
  77538. var outside_1 = outside$2;
  77539. var outside$1 = outside_1;
  77540. var gtr = (version3, range2, options) => outside$1(version3, range2, ">", options);
  77541. var gtr_1 = gtr;
  77542. var outside = outside_1;
  77543. var ltr = (version3, range2, options) => outside(version3, range2, "<", options);
  77544. var ltr_1 = ltr;
  77545. var Range$1 = requireRange();
  77546. var intersects = (r1, r2, options) => {
  77547. r1 = new Range$1(r1, options);
  77548. r2 = new Range$1(r2, options);
  77549. return r1.intersects(r2);
  77550. };
  77551. var intersects_1 = intersects;
  77552. var satisfies$1 = satisfies_1;
  77553. var compare$1 = compare_1;
  77554. var simplify = (versions, range2, options) => {
  77555. const set = [];
  77556. let first = null;
  77557. let prev = null;
  77558. const v = versions.sort((a, b) => compare$1(a, b, options));
  77559. for (const version3 of v) {
  77560. const included = satisfies$1(version3, range2, options);
  77561. if (included) {
  77562. prev = version3;
  77563. if (!first) {
  77564. first = version3;
  77565. }
  77566. } else {
  77567. if (prev) {
  77568. set.push([first, prev]);
  77569. }
  77570. prev = null;
  77571. first = null;
  77572. }
  77573. }
  77574. if (first) {
  77575. set.push([first, null]);
  77576. }
  77577. const ranges = [];
  77578. for (const [min, max] of set) {
  77579. if (min === max) {
  77580. ranges.push(min);
  77581. } else if (!max && min === v[0]) {
  77582. ranges.push("*");
  77583. } else if (!max) {
  77584. ranges.push(`>=${min}`);
  77585. } else if (min === v[0]) {
  77586. ranges.push(`<=${max}`);
  77587. } else {
  77588. ranges.push(`${min} - ${max}`);
  77589. }
  77590. }
  77591. const simplified = ranges.join(" || ");
  77592. const original = typeof range2.raw === "string" ? range2.raw : String(range2);
  77593. return simplified.length < original.length ? simplified : range2;
  77594. };
  77595. var Range = requireRange();
  77596. var Comparator = requireComparator();
  77597. var {
  77598. ANY
  77599. } = Comparator;
  77600. var satisfies = satisfies_1;
  77601. var compare2 = compare_1;
  77602. var subset = (sub, dom, options = {}) => {
  77603. if (sub === dom) {
  77604. return true;
  77605. }
  77606. sub = new Range(sub, options);
  77607. dom = new Range(dom, options);
  77608. let sawNonNull = false;
  77609. OUTER:
  77610. for (const simpleSub of sub.set) {
  77611. for (const simpleDom of dom.set) {
  77612. const isSub = simpleSubset(simpleSub, simpleDom, options);
  77613. sawNonNull = sawNonNull || isSub !== null;
  77614. if (isSub) {
  77615. continue OUTER;
  77616. }
  77617. }
  77618. if (sawNonNull) {
  77619. return false;
  77620. }
  77621. }
  77622. return true;
  77623. };
  77624. var simpleSubset = (sub, dom, options) => {
  77625. if (sub === dom) {
  77626. return true;
  77627. }
  77628. if (sub.length === 1 && sub[0].semver === ANY) {
  77629. if (dom.length === 1 && dom[0].semver === ANY) {
  77630. return true;
  77631. } else if (options.includePrerelease) {
  77632. sub = [new Comparator(">=0.0.0-0")];
  77633. } else {
  77634. sub = [new Comparator(">=0.0.0")];
  77635. }
  77636. }
  77637. if (dom.length === 1 && dom[0].semver === ANY) {
  77638. if (options.includePrerelease) {
  77639. return true;
  77640. } else {
  77641. dom = [new Comparator(">=0.0.0")];
  77642. }
  77643. }
  77644. const eqSet = /* @__PURE__ */ new Set();
  77645. let gt2, lt2;
  77646. for (const c2 of sub) {
  77647. if (c2.operator === ">" || c2.operator === ">=") {
  77648. gt2 = higherGT(gt2, c2, options);
  77649. } else if (c2.operator === "<" || c2.operator === "<=") {
  77650. lt2 = lowerLT(lt2, c2, options);
  77651. } else {
  77652. eqSet.add(c2.semver);
  77653. }
  77654. }
  77655. if (eqSet.size > 1) {
  77656. return null;
  77657. }
  77658. let gtltComp;
  77659. if (gt2 && lt2) {
  77660. gtltComp = compare2(gt2.semver, lt2.semver, options);
  77661. if (gtltComp > 0) {
  77662. return null;
  77663. } else if (gtltComp === 0 && (gt2.operator !== ">=" || lt2.operator !== "<=")) {
  77664. return null;
  77665. }
  77666. }
  77667. for (const eq2 of eqSet) {
  77668. if (gt2 && !satisfies(eq2, String(gt2), options)) {
  77669. return null;
  77670. }
  77671. if (lt2 && !satisfies(eq2, String(lt2), options)) {
  77672. return null;
  77673. }
  77674. for (const c2 of dom) {
  77675. if (!satisfies(eq2, String(c2), options)) {
  77676. return false;
  77677. }
  77678. }
  77679. return true;
  77680. }
  77681. let higher, lower;
  77682. let hasDomLT, hasDomGT;
  77683. let needDomLTPre = lt2 && !options.includePrerelease && lt2.semver.prerelease.length ? lt2.semver : false;
  77684. let needDomGTPre = gt2 && !options.includePrerelease && gt2.semver.prerelease.length ? gt2.semver : false;
  77685. if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt2.operator === "<" && needDomLTPre.prerelease[0] === 0) {
  77686. needDomLTPre = false;
  77687. }
  77688. for (const c2 of dom) {
  77689. hasDomGT = hasDomGT || c2.operator === ">" || c2.operator === ">=";
  77690. hasDomLT = hasDomLT || c2.operator === "<" || c2.operator === "<=";
  77691. if (gt2) {
  77692. if (needDomGTPre) {
  77693. if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomGTPre.major && c2.semver.minor === needDomGTPre.minor && c2.semver.patch === needDomGTPre.patch) {
  77694. needDomGTPre = false;
  77695. }
  77696. }
  77697. if (c2.operator === ">" || c2.operator === ">=") {
  77698. higher = higherGT(gt2, c2, options);
  77699. if (higher === c2 && higher !== gt2) {
  77700. return false;
  77701. }
  77702. } else if (gt2.operator === ">=" && !satisfies(gt2.semver, String(c2), options)) {
  77703. return false;
  77704. }
  77705. }
  77706. if (lt2) {
  77707. if (needDomLTPre) {
  77708. if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomLTPre.major && c2.semver.minor === needDomLTPre.minor && c2.semver.patch === needDomLTPre.patch) {
  77709. needDomLTPre = false;
  77710. }
  77711. }
  77712. if (c2.operator === "<" || c2.operator === "<=") {
  77713. lower = lowerLT(lt2, c2, options);
  77714. if (lower === c2 && lower !== lt2) {
  77715. return false;
  77716. }
  77717. } else if (lt2.operator === "<=" && !satisfies(lt2.semver, String(c2), options)) {
  77718. return false;
  77719. }
  77720. }
  77721. if (!c2.operator && (lt2 || gt2) && gtltComp !== 0) {
  77722. return false;
  77723. }
  77724. }
  77725. if (gt2 && hasDomLT && !lt2 && gtltComp !== 0) {
  77726. return false;
  77727. }
  77728. if (lt2 && hasDomGT && !gt2 && gtltComp !== 0) {
  77729. return false;
  77730. }
  77731. if (needDomGTPre || needDomLTPre) {
  77732. return false;
  77733. }
  77734. return true;
  77735. };
  77736. var higherGT = (a, b, options) => {
  77737. if (!a) {
  77738. return b;
  77739. }
  77740. const comp = compare2(a.semver, b.semver, options);
  77741. return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
  77742. };
  77743. var lowerLT = (a, b, options) => {
  77744. if (!a) {
  77745. return b;
  77746. }
  77747. const comp = compare2(a.semver, b.semver, options);
  77748. return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
  77749. };
  77750. var subset_1 = subset;
  77751. var internalRe = re$3.exports;
  77752. var semver$1 = {
  77753. re: internalRe.re,
  77754. src: internalRe.src,
  77755. tokens: internalRe.t,
  77756. SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
  77757. SemVer: semver$2,
  77758. compareIdentifiers: identifiers.compareIdentifiers,
  77759. rcompareIdentifiers: identifiers.rcompareIdentifiers,
  77760. parse: parse_1,
  77761. valid: valid_1,
  77762. clean: clean_1,
  77763. inc: inc_1,
  77764. diff: diff_1,
  77765. major: major_1,
  77766. minor: minor_1,
  77767. patch: patch_1,
  77768. prerelease: prerelease_1,
  77769. compare: compare_1,
  77770. rcompare: rcompare_1,
  77771. compareLoose: compareLoose_1,
  77772. compareBuild: compareBuild_1,
  77773. sort: sort_1,
  77774. rsort: rsort_1,
  77775. gt: gt_1,
  77776. lt: lt_1,
  77777. eq: eq_1,
  77778. neq: neq_1,
  77779. gte: gte_1,
  77780. lte: lte_1,
  77781. cmp: cmp_1,
  77782. coerce: coerce_1,
  77783. Comparator: requireComparator(),
  77784. Range: requireRange(),
  77785. satisfies: satisfies_1,
  77786. toComparators: toComparators_1,
  77787. maxSatisfying: maxSatisfying_1,
  77788. minSatisfying: minSatisfying_1,
  77789. minVersion: minVersion_1,
  77790. validRange: valid2,
  77791. outside: outside_1,
  77792. gtr: gtr_1,
  77793. ltr: ltr_1,
  77794. intersects: intersects_1,
  77795. simplifyRange: simplify,
  77796. subset: subset_1
  77797. };
  77798. var semver = semver$1;
  77799. var builtins = function({
  77800. version: version3 = process.version,
  77801. experimental = false
  77802. } = {}) {
  77803. var coreModules = ["assert", "buffer", "child_process", "cluster", "console", "constants", "crypto", "dgram", "dns", "domain", "events", "fs", "http", "https", "module", "net", "os", "path", "punycode", "querystring", "readline", "repl", "stream", "string_decoder", "sys", "timers", "tls", "tty", "url", "util", "vm", "zlib"];
  77804. if (semver.lt(version3, "6.0.0"))
  77805. coreModules.push("freelist");
  77806. if (semver.gte(version3, "1.0.0"))
  77807. coreModules.push("v8");
  77808. if (semver.gte(version3, "1.1.0"))
  77809. coreModules.push("process");
  77810. if (semver.gte(version3, "8.0.0"))
  77811. coreModules.push("inspector");
  77812. if (semver.gte(version3, "8.1.0"))
  77813. coreModules.push("async_hooks");
  77814. if (semver.gte(version3, "8.4.0"))
  77815. coreModules.push("http2");
  77816. if (semver.gte(version3, "8.5.0"))
  77817. coreModules.push("perf_hooks");
  77818. if (semver.gte(version3, "10.0.0"))
  77819. coreModules.push("trace_events");
  77820. if (semver.gte(version3, "10.5.0") && (experimental || semver.gte(version3, "12.0.0"))) {
  77821. coreModules.push("worker_threads");
  77822. }
  77823. if (semver.gte(version3, "12.16.0") && experimental) {
  77824. coreModules.push("wasi");
  77825. }
  77826. return coreModules;
  77827. };
  77828. var reader = {
  77829. read: read2
  77830. };
  77831. function read2(jsonPath) {
  77832. return find2(_path().dirname(jsonPath));
  77833. }
  77834. function find2(dir) {
  77835. try {
  77836. const string3 = _fs().default.readFileSync(_path().toNamespacedPath(_path().join(dir, "package.json")), "utf8");
  77837. return {
  77838. string: string3
  77839. };
  77840. } catch (error) {
  77841. if (error.code === "ENOENT") {
  77842. const parent = _path().dirname(dir);
  77843. if (dir !== parent)
  77844. return find2(parent);
  77845. return {
  77846. string: void 0
  77847. };
  77848. }
  77849. throw error;
  77850. }
  77851. }
  77852. var isWindows = process.platform === "win32";
  77853. var own$1 = {}.hasOwnProperty;
  77854. var codes = {};
  77855. var messages2 = /* @__PURE__ */ new Map();
  77856. var nodeInternalPrefix = "__node_internal_";
  77857. var userStackTraceLimit;
  77858. codes.ERR_INVALID_MODULE_SPECIFIER = createError("ERR_INVALID_MODULE_SPECIFIER", (request, reason, base2 = void 0) => {
  77859. return `Invalid module "${request}" ${reason}${base2 ? ` imported from ${base2}` : ""}`;
  77860. }, TypeError);
  77861. codes.ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path, base2, message) => {
  77862. return `Invalid package config ${path}${base2 ? ` while importing ${base2}` : ""}${message ? `. ${message}` : ""}`;
  77863. }, Error);
  77864. codes.ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (pkgPath, key2, target, isImport = false, base2 = void 0) => {
  77865. const relError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
  77866. if (key2 === ".") {
  77867. _assert()(isImport === false);
  77868. return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${pkgPath}package.json${base2 ? ` imported from ${base2}` : ""}${relError ? '; targets must start with "./"' : ""}`;
  77869. }
  77870. return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key2}' in the package config ${pkgPath}package.json${base2 ? ` imported from ${base2}` : ""}${relError ? '; targets must start with "./"' : ""}`;
  77871. }, Error);
  77872. codes.ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path, base2, type = "package") => {
  77873. return `Cannot find ${type} '${path}' imported from ${base2}`;
  77874. }, Error);
  77875. codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base2) => {
  77876. return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base2}`;
  77877. }, TypeError);
  77878. codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError("ERR_PACKAGE_PATH_NOT_EXPORTED", (pkgPath, subpath, base2 = void 0) => {
  77879. if (subpath === ".")
  77880. return `No "exports" main defined in ${pkgPath}package.json${base2 ? ` imported from ${base2}` : ""}`;
  77881. return `Package subpath '${subpath}' is not defined by "exports" in ${pkgPath}package.json${base2 ? ` imported from ${base2}` : ""}`;
  77882. }, Error);
  77883. codes.ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error);
  77884. codes.ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", 'Unknown file extension "%s" for %s', TypeError);
  77885. codes.ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name2, value2, reason = "is invalid") => {
  77886. let inspected = (0, _util().inspect)(value2);
  77887. if (inspected.length > 128) {
  77888. inspected = `${inspected.slice(0, 128)}...`;
  77889. }
  77890. const type = name2.includes(".") ? "property" : "argument";
  77891. return `The ${type} '${name2}' ${reason}. Received ${inspected}`;
  77892. }, TypeError);
  77893. codes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError("ERR_UNSUPPORTED_ESM_URL_SCHEME", (url) => {
  77894. let message = "Only file and data URLs are supported by the default ESM loader";
  77895. if (isWindows && url.protocol.length === 2) {
  77896. message += ". On Windows, absolute paths must be valid file:// URLs";
  77897. }
  77898. message += `. Received protocol '${url.protocol}'`;
  77899. return message;
  77900. }, Error);
  77901. function createError(sym, value2, def) {
  77902. messages2.set(sym, value2);
  77903. return makeNodeErrorWithCode(def, sym);
  77904. }
  77905. function makeNodeErrorWithCode(Base, key2) {
  77906. return NodeError;
  77907. function NodeError(...args) {
  77908. const limit = Error.stackTraceLimit;
  77909. if (isErrorStackTraceLimitWritable())
  77910. Error.stackTraceLimit = 0;
  77911. const error = new Base();
  77912. if (isErrorStackTraceLimitWritable())
  77913. Error.stackTraceLimit = limit;
  77914. const message = getMessage(key2, args, error);
  77915. Object.defineProperty(error, "message", {
  77916. value: message,
  77917. enumerable: false,
  77918. writable: true,
  77919. configurable: true
  77920. });
  77921. Object.defineProperty(error, "toString", {
  77922. value() {
  77923. return `${this.name} [${key2}]: ${this.message}`;
  77924. },
  77925. enumerable: false,
  77926. writable: true,
  77927. configurable: true
  77928. });
  77929. addCodeToName(error, Base.name, key2);
  77930. error.code = key2;
  77931. return error;
  77932. }
  77933. }
  77934. var addCodeToName = hideStackFrames(function(error, name2, code2) {
  77935. error = captureLargerStackTrace(error);
  77936. error.name = `${name2} [${code2}]`;
  77937. error.stack;
  77938. if (name2 === "SystemError") {
  77939. Object.defineProperty(error, "name", {
  77940. value: name2,
  77941. enumerable: false,
  77942. writable: true,
  77943. configurable: true
  77944. });
  77945. } else {
  77946. delete error.name;
  77947. }
  77948. });
  77949. function isErrorStackTraceLimitWritable() {
  77950. const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
  77951. if (desc === void 0) {
  77952. return Object.isExtensible(Error);
  77953. }
  77954. return own$1.call(desc, "writable") ? desc.writable : desc.set !== void 0;
  77955. }
  77956. function hideStackFrames(fn) {
  77957. const hidden = nodeInternalPrefix + fn.name;
  77958. Object.defineProperty(fn, "name", {
  77959. value: hidden
  77960. });
  77961. return fn;
  77962. }
  77963. var captureLargerStackTrace = hideStackFrames(function(error) {
  77964. const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
  77965. if (stackTraceLimitIsWritable) {
  77966. userStackTraceLimit = Error.stackTraceLimit;
  77967. Error.stackTraceLimit = Number.POSITIVE_INFINITY;
  77968. }
  77969. Error.captureStackTrace(error);
  77970. if (stackTraceLimitIsWritable)
  77971. Error.stackTraceLimit = userStackTraceLimit;
  77972. return error;
  77973. });
  77974. function getMessage(key2, args, self2) {
  77975. const message = messages2.get(key2);
  77976. if (typeof message === "function") {
  77977. _assert()(message.length <= args.length, `Code: ${key2}; The provided arguments length (${args.length}) does not match the required ones (${message.length}).`);
  77978. return Reflect.apply(message, self2, args);
  77979. }
  77980. const expectedLength = (message.match(/%[dfijoOs]/g) || []).length;
  77981. _assert()(expectedLength === args.length, `Code: ${key2}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).`);
  77982. if (args.length === 0)
  77983. return message;
  77984. args.unshift(message);
  77985. return Reflect.apply(_util().format, null, args);
  77986. }
  77987. var {
  77988. ERR_UNKNOWN_FILE_EXTENSION
  77989. } = codes;
  77990. var extensionFormatMap = {
  77991. __proto__: null,
  77992. ".cjs": "commonjs",
  77993. ".js": "module",
  77994. ".mjs": "module"
  77995. };
  77996. function defaultGetFormat(url) {
  77997. if (url.startsWith("node:")) {
  77998. return {
  77999. format: "builtin"
  78000. };
  78001. }
  78002. const parsed = new (_url()).URL(url);
  78003. if (parsed.protocol === "data:") {
  78004. const {
  78005. 1: mime
  78006. } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [null, null];
  78007. const format = mime === "text/javascript" ? "module" : null;
  78008. return {
  78009. format
  78010. };
  78011. }
  78012. if (parsed.protocol === "file:") {
  78013. const ext = _path().extname(parsed.pathname);
  78014. let format;
  78015. if (ext === ".js") {
  78016. format = getPackageType(parsed.href) === "module" ? "module" : "commonjs";
  78017. } else {
  78018. format = extensionFormatMap[ext];
  78019. }
  78020. if (!format) {
  78021. throw new ERR_UNKNOWN_FILE_EXTENSION(ext, (0, _url().fileURLToPath)(url));
  78022. }
  78023. return {
  78024. format: format || null
  78025. };
  78026. }
  78027. return {
  78028. format: null
  78029. };
  78030. }
  78031. var listOfBuiltins = builtins();
  78032. var {
  78033. ERR_INVALID_MODULE_SPECIFIER,
  78034. ERR_INVALID_PACKAGE_CONFIG,
  78035. ERR_INVALID_PACKAGE_TARGET,
  78036. ERR_MODULE_NOT_FOUND,
  78037. ERR_PACKAGE_IMPORT_NOT_DEFINED,
  78038. ERR_PACKAGE_PATH_NOT_EXPORTED,
  78039. ERR_UNSUPPORTED_DIR_IMPORT,
  78040. ERR_UNSUPPORTED_ESM_URL_SCHEME,
  78041. ERR_INVALID_ARG_VALUE
  78042. } = codes;
  78043. var own13 = {}.hasOwnProperty;
  78044. var DEFAULT_CONDITIONS = Object.freeze(["node", "import"]);
  78045. var DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS);
  78046. var invalidSegmentRegEx = /(^|\\|\/)(\.\.?|node_modules)(\\|\/|$)/;
  78047. var patternRegEx = /\*/g;
  78048. var encodedSepRegEx = /%2f|%2c/i;
  78049. var emittedPackageWarnings = /* @__PURE__ */ new Set();
  78050. var packageJsonCache = /* @__PURE__ */ new Map();
  78051. function emitFolderMapDeprecation(match, pjsonUrl, isExports, base2) {
  78052. const pjsonPath = (0, _url().fileURLToPath)(pjsonUrl);
  78053. if (emittedPackageWarnings.has(pjsonPath + "|" + match))
  78054. return;
  78055. emittedPackageWarnings.add(pjsonPath + "|" + match);
  78056. process.emitWarning(`Use of deprecated folder mapping "${match}" in the ${isExports ? '"exports"' : '"imports"'} field module resolution of the package at ${pjsonPath}${base2 ? ` imported from ${(0, _url().fileURLToPath)(base2)}` : ""}.
  78057. Update this package.json to use a subpath pattern like "${match}*".`, "DeprecationWarning", "DEP0148");
  78058. }
  78059. function emitLegacyIndexDeprecation(url, packageJsonUrl, base2, main) {
  78060. const {
  78061. format
  78062. } = defaultGetFormat(url.href);
  78063. if (format !== "module")
  78064. return;
  78065. const path = (0, _url().fileURLToPath)(url.href);
  78066. const pkgPath = (0, _url().fileURLToPath)(new (_url()).URL(".", packageJsonUrl));
  78067. const basePath = (0, _url().fileURLToPath)(base2);
  78068. if (main)
  78069. process.emitWarning(`Package ${pkgPath} has a "main" field set to ${JSON.stringify(main)}, excluding the full filename and extension to the resolved file at "${path.slice(pkgPath.length)}", imported from ${basePath}.
  78070. Automatic extension resolution of the "main" field isdeprecated for ES modules.`, "DeprecationWarning", "DEP0151");
  78071. else
  78072. process.emitWarning(`No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${path.slice(pkgPath.length)}", imported from ${basePath}.
  78073. Default "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
  78074. }
  78075. function getConditionsSet(conditions) {
  78076. if (conditions !== void 0 && conditions !== DEFAULT_CONDITIONS) {
  78077. if (!Array.isArray(conditions)) {
  78078. throw new ERR_INVALID_ARG_VALUE("conditions", conditions, "expected an array");
  78079. }
  78080. return new Set(conditions);
  78081. }
  78082. return DEFAULT_CONDITIONS_SET;
  78083. }
  78084. function tryStatSync(path) {
  78085. try {
  78086. return (0, _fs().statSync)(path);
  78087. } catch (_unused) {
  78088. return new (_fs()).Stats();
  78089. }
  78090. }
  78091. function getPackageConfig(path, specifier, base2) {
  78092. const existing = packageJsonCache.get(path);
  78093. if (existing !== void 0) {
  78094. return existing;
  78095. }
  78096. const source2 = reader.read(path).string;
  78097. if (source2 === void 0) {
  78098. const packageConfig2 = {
  78099. pjsonPath: path,
  78100. exists: false,
  78101. main: void 0,
  78102. name: void 0,
  78103. type: "none",
  78104. exports: void 0,
  78105. imports: void 0
  78106. };
  78107. packageJsonCache.set(path, packageConfig2);
  78108. return packageConfig2;
  78109. }
  78110. let packageJson;
  78111. try {
  78112. packageJson = JSON.parse(source2);
  78113. } catch (error) {
  78114. throw new ERR_INVALID_PACKAGE_CONFIG(path, (base2 ? `"${specifier}" from ` : "") + (0, _url().fileURLToPath)(base2 || specifier), error.message);
  78115. }
  78116. const {
  78117. exports: exports2,
  78118. imports,
  78119. main,
  78120. name: name2,
  78121. type
  78122. } = packageJson;
  78123. const packageConfig = {
  78124. pjsonPath: path,
  78125. exists: true,
  78126. main: typeof main === "string" ? main : void 0,
  78127. name: typeof name2 === "string" ? name2 : void 0,
  78128. type: type === "module" || type === "commonjs" ? type : "none",
  78129. exports: exports2,
  78130. imports: imports && typeof imports === "object" ? imports : void 0
  78131. };
  78132. packageJsonCache.set(path, packageConfig);
  78133. return packageConfig;
  78134. }
  78135. function getPackageScopeConfig(resolved) {
  78136. let packageJsonUrl = new (_url()).URL("./package.json", resolved);
  78137. while (true) {
  78138. const packageJsonPath2 = packageJsonUrl.pathname;
  78139. if (packageJsonPath2.endsWith("node_modules/package.json"))
  78140. break;
  78141. const packageConfig2 = getPackageConfig((0, _url().fileURLToPath)(packageJsonUrl), resolved);
  78142. if (packageConfig2.exists)
  78143. return packageConfig2;
  78144. const lastPackageJsonUrl = packageJsonUrl;
  78145. packageJsonUrl = new (_url()).URL("../package.json", packageJsonUrl);
  78146. if (packageJsonUrl.pathname === lastPackageJsonUrl.pathname)
  78147. break;
  78148. }
  78149. const packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl);
  78150. const packageConfig = {
  78151. pjsonPath: packageJsonPath,
  78152. exists: false,
  78153. main: void 0,
  78154. name: void 0,
  78155. type: "none",
  78156. exports: void 0,
  78157. imports: void 0
  78158. };
  78159. packageJsonCache.set(packageJsonPath, packageConfig);
  78160. return packageConfig;
  78161. }
  78162. function fileExists(url) {
  78163. return tryStatSync((0, _url().fileURLToPath)(url)).isFile();
  78164. }
  78165. function legacyMainResolve(packageJsonUrl, packageConfig, base2) {
  78166. let guess;
  78167. if (packageConfig.main !== void 0) {
  78168. guess = new (_url()).URL(`./${packageConfig.main}`, packageJsonUrl);
  78169. if (fileExists(guess))
  78170. return guess;
  78171. const tries2 = [`./${packageConfig.main}.js`, `./${packageConfig.main}.json`, `./${packageConfig.main}.node`, `./${packageConfig.main}/index.js`, `./${packageConfig.main}/index.json`, `./${packageConfig.main}/index.node`];
  78172. let i2 = -1;
  78173. while (++i2 < tries2.length) {
  78174. guess = new (_url()).URL(tries2[i2], packageJsonUrl);
  78175. if (fileExists(guess))
  78176. break;
  78177. guess = void 0;
  78178. }
  78179. if (guess) {
  78180. emitLegacyIndexDeprecation(guess, packageJsonUrl, base2, packageConfig.main);
  78181. return guess;
  78182. }
  78183. }
  78184. const tries = ["./index.js", "./index.json", "./index.node"];
  78185. let i = -1;
  78186. while (++i < tries.length) {
  78187. guess = new (_url()).URL(tries[i], packageJsonUrl);
  78188. if (fileExists(guess))
  78189. break;
  78190. guess = void 0;
  78191. }
  78192. if (guess) {
  78193. emitLegacyIndexDeprecation(guess, packageJsonUrl, base2, packageConfig.main);
  78194. return guess;
  78195. }
  78196. throw new ERR_MODULE_NOT_FOUND((0, _url().fileURLToPath)(new (_url()).URL(".", packageJsonUrl)), (0, _url().fileURLToPath)(base2));
  78197. }
  78198. function finalizeResolution(resolved, base2) {
  78199. if (encodedSepRegEx.test(resolved.pathname))
  78200. throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, 'must not include encoded "/" or "\\" characters', (0, _url().fileURLToPath)(base2));
  78201. const path = (0, _url().fileURLToPath)(resolved);
  78202. const stats = tryStatSync(path.endsWith("/") ? path.slice(-1) : path);
  78203. if (stats.isDirectory()) {
  78204. const error = new ERR_UNSUPPORTED_DIR_IMPORT(path, (0, _url().fileURLToPath)(base2));
  78205. error.url = String(resolved);
  78206. throw error;
  78207. }
  78208. if (!stats.isFile()) {
  78209. throw new ERR_MODULE_NOT_FOUND(path || resolved.pathname, base2 && (0, _url().fileURLToPath)(base2), "module");
  78210. }
  78211. return resolved;
  78212. }
  78213. function throwImportNotDefined(specifier, packageJsonUrl, base2) {
  78214. throw new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && (0, _url().fileURLToPath)(new (_url()).URL(".", packageJsonUrl)), (0, _url().fileURLToPath)(base2));
  78215. }
  78216. function throwExportsNotFound(subpath, packageJsonUrl, base2) {
  78217. throw new ERR_PACKAGE_PATH_NOT_EXPORTED((0, _url().fileURLToPath)(new (_url()).URL(".", packageJsonUrl)), subpath, base2 && (0, _url().fileURLToPath)(base2));
  78218. }
  78219. function throwInvalidSubpath(subpath, packageJsonUrl, internal, base2) {
  78220. const reason = `request is not a valid subpath for the "${internal ? "imports" : "exports"}" resolution of ${(0, _url().fileURLToPath)(packageJsonUrl)}`;
  78221. throw new ERR_INVALID_MODULE_SPECIFIER(subpath, reason, base2 && (0, _url().fileURLToPath)(base2));
  78222. }
  78223. function throwInvalidPackageTarget(subpath, target, packageJsonUrl, internal, base2) {
  78224. target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`;
  78225. throw new ERR_INVALID_PACKAGE_TARGET((0, _url().fileURLToPath)(new (_url()).URL(".", packageJsonUrl)), subpath, target, internal, base2 && (0, _url().fileURLToPath)(base2));
  78226. }
  78227. function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base2, pattern, internal, conditions) {
  78228. if (subpath !== "" && !pattern && target[target.length - 1] !== "/")
  78229. throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base2);
  78230. if (!target.startsWith("./")) {
  78231. if (internal && !target.startsWith("../") && !target.startsWith("/")) {
  78232. let isURL = false;
  78233. try {
  78234. new (_url()).URL(target);
  78235. isURL = true;
  78236. } catch (_unused2) {
  78237. }
  78238. if (!isURL) {
  78239. const exportTarget = pattern ? target.replace(patternRegEx, subpath) : target + subpath;
  78240. return packageResolve(exportTarget, packageJsonUrl, conditions);
  78241. }
  78242. }
  78243. throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base2);
  78244. }
  78245. if (invalidSegmentRegEx.test(target.slice(2)))
  78246. throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base2);
  78247. const resolved = new (_url()).URL(target, packageJsonUrl);
  78248. const resolvedPath = resolved.pathname;
  78249. const packagePath = new (_url()).URL(".", packageJsonUrl).pathname;
  78250. if (!resolvedPath.startsWith(packagePath))
  78251. throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base2);
  78252. if (subpath === "")
  78253. return resolved;
  78254. if (invalidSegmentRegEx.test(subpath))
  78255. throwInvalidSubpath(match + subpath, packageJsonUrl, internal, base2);
  78256. if (pattern)
  78257. return new (_url()).URL(resolved.href.replace(patternRegEx, subpath));
  78258. return new (_url()).URL(subpath, resolved);
  78259. }
  78260. function isArrayIndex(key2) {
  78261. const keyNumber = Number(key2);
  78262. if (`${keyNumber}` !== key2)
  78263. return false;
  78264. return keyNumber >= 0 && keyNumber < 4294967295;
  78265. }
  78266. function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base2, pattern, internal, conditions) {
  78267. if (typeof target === "string") {
  78268. return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base2, pattern, internal, conditions);
  78269. }
  78270. if (Array.isArray(target)) {
  78271. const targetList = target;
  78272. if (targetList.length === 0)
  78273. return null;
  78274. let lastException;
  78275. let i = -1;
  78276. while (++i < targetList.length) {
  78277. const targetItem = targetList[i];
  78278. let resolved;
  78279. try {
  78280. resolved = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base2, pattern, internal, conditions);
  78281. } catch (error) {
  78282. lastException = error;
  78283. if (error.code === "ERR_INVALID_PACKAGE_TARGET")
  78284. continue;
  78285. throw error;
  78286. }
  78287. if (resolved === void 0)
  78288. continue;
  78289. if (resolved === null) {
  78290. lastException = null;
  78291. continue;
  78292. }
  78293. return resolved;
  78294. }
  78295. if (lastException === void 0 || lastException === null) {
  78296. return lastException;
  78297. }
  78298. throw lastException;
  78299. }
  78300. if (typeof target === "object" && target !== null) {
  78301. const keys2 = Object.getOwnPropertyNames(target);
  78302. let i = -1;
  78303. while (++i < keys2.length) {
  78304. const key2 = keys2[i];
  78305. if (isArrayIndex(key2)) {
  78306. throw new ERR_INVALID_PACKAGE_CONFIG((0, _url().fileURLToPath)(packageJsonUrl), base2, '"exports" cannot contain numeric property keys.');
  78307. }
  78308. }
  78309. i = -1;
  78310. while (++i < keys2.length) {
  78311. const key2 = keys2[i];
  78312. if (key2 === "default" || conditions && conditions.has(key2)) {
  78313. const conditionalTarget = target[key2];
  78314. const resolved = resolvePackageTarget(packageJsonUrl, conditionalTarget, subpath, packageSubpath, base2, pattern, internal, conditions);
  78315. if (resolved === void 0)
  78316. continue;
  78317. return resolved;
  78318. }
  78319. }
  78320. return void 0;
  78321. }
  78322. if (target === null) {
  78323. return null;
  78324. }
  78325. throwInvalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base2);
  78326. }
  78327. function isConditionalExportsMainSugar(exports2, packageJsonUrl, base2) {
  78328. if (typeof exports2 === "string" || Array.isArray(exports2))
  78329. return true;
  78330. if (typeof exports2 !== "object" || exports2 === null)
  78331. return false;
  78332. const keys2 = Object.getOwnPropertyNames(exports2);
  78333. let isConditionalSugar = false;
  78334. let i = 0;
  78335. let j = -1;
  78336. while (++j < keys2.length) {
  78337. const key2 = keys2[j];
  78338. const curIsConditionalSugar = key2 === "" || key2[0] !== ".";
  78339. if (i++ === 0) {
  78340. isConditionalSugar = curIsConditionalSugar;
  78341. } else if (isConditionalSugar !== curIsConditionalSugar) {
  78342. throw new ERR_INVALID_PACKAGE_CONFIG((0, _url().fileURLToPath)(packageJsonUrl), base2, `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`);
  78343. }
  78344. }
  78345. return isConditionalSugar;
  78346. }
  78347. function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base2, conditions) {
  78348. let exports2 = packageConfig.exports;
  78349. if (isConditionalExportsMainSugar(exports2, packageJsonUrl, base2))
  78350. exports2 = {
  78351. ".": exports2
  78352. };
  78353. if (own13.call(exports2, packageSubpath)) {
  78354. const target = exports2[packageSubpath];
  78355. const resolved = resolvePackageTarget(packageJsonUrl, target, "", packageSubpath, base2, false, false, conditions);
  78356. if (resolved === null || resolved === void 0)
  78357. throwExportsNotFound(packageSubpath, packageJsonUrl, base2);
  78358. return {
  78359. resolved,
  78360. exact: true
  78361. };
  78362. }
  78363. let bestMatch = "";
  78364. const keys2 = Object.getOwnPropertyNames(exports2);
  78365. let i = -1;
  78366. while (++i < keys2.length) {
  78367. const key2 = keys2[i];
  78368. if (key2[key2.length - 1] === "*" && packageSubpath.startsWith(key2.slice(0, -1)) && packageSubpath.length >= key2.length && key2.length > bestMatch.length) {
  78369. bestMatch = key2;
  78370. } else if (key2[key2.length - 1] === "/" && packageSubpath.startsWith(key2) && key2.length > bestMatch.length) {
  78371. bestMatch = key2;
  78372. }
  78373. }
  78374. if (bestMatch) {
  78375. const target = exports2[bestMatch];
  78376. const pattern = bestMatch[bestMatch.length - 1] === "*";
  78377. const subpath = packageSubpath.slice(bestMatch.length - (pattern ? 1 : 0));
  78378. const resolved = resolvePackageTarget(packageJsonUrl, target, subpath, bestMatch, base2, pattern, false, conditions);
  78379. if (resolved === null || resolved === void 0)
  78380. throwExportsNotFound(packageSubpath, packageJsonUrl, base2);
  78381. if (!pattern)
  78382. emitFolderMapDeprecation(bestMatch, packageJsonUrl, true, base2);
  78383. return {
  78384. resolved,
  78385. exact: pattern
  78386. };
  78387. }
  78388. throwExportsNotFound(packageSubpath, packageJsonUrl, base2);
  78389. }
  78390. function packageImportsResolve(name2, base2, conditions) {
  78391. if (name2 === "#" || name2.startsWith("#/")) {
  78392. const reason = "is not a valid internal imports specifier name";
  78393. throw new ERR_INVALID_MODULE_SPECIFIER(name2, reason, (0, _url().fileURLToPath)(base2));
  78394. }
  78395. let packageJsonUrl;
  78396. const packageConfig = getPackageScopeConfig(base2);
  78397. if (packageConfig.exists) {
  78398. packageJsonUrl = (0, _url().pathToFileURL)(packageConfig.pjsonPath);
  78399. const imports = packageConfig.imports;
  78400. if (imports) {
  78401. if (own13.call(imports, name2)) {
  78402. const resolved = resolvePackageTarget(packageJsonUrl, imports[name2], "", name2, base2, false, true, conditions);
  78403. if (resolved !== null)
  78404. return {
  78405. resolved,
  78406. exact: true
  78407. };
  78408. } else {
  78409. let bestMatch = "";
  78410. const keys2 = Object.getOwnPropertyNames(imports);
  78411. let i = -1;
  78412. while (++i < keys2.length) {
  78413. const key2 = keys2[i];
  78414. if (key2[key2.length - 1] === "*" && name2.startsWith(key2.slice(0, -1)) && name2.length >= key2.length && key2.length > bestMatch.length) {
  78415. bestMatch = key2;
  78416. } else if (key2[key2.length - 1] === "/" && name2.startsWith(key2) && key2.length > bestMatch.length) {
  78417. bestMatch = key2;
  78418. }
  78419. }
  78420. if (bestMatch) {
  78421. const target = imports[bestMatch];
  78422. const pattern = bestMatch[bestMatch.length - 1] === "*";
  78423. const subpath = name2.slice(bestMatch.length - (pattern ? 1 : 0));
  78424. const resolved = resolvePackageTarget(packageJsonUrl, target, subpath, bestMatch, base2, pattern, true, conditions);
  78425. if (resolved !== null) {
  78426. if (!pattern)
  78427. emitFolderMapDeprecation(bestMatch, packageJsonUrl, false, base2);
  78428. return {
  78429. resolved,
  78430. exact: pattern
  78431. };
  78432. }
  78433. }
  78434. }
  78435. }
  78436. }
  78437. throwImportNotDefined(name2, packageJsonUrl, base2);
  78438. }
  78439. function getPackageType(url) {
  78440. const packageConfig = getPackageScopeConfig(url);
  78441. return packageConfig.type;
  78442. }
  78443. function parsePackageName(specifier, base2) {
  78444. let separatorIndex = specifier.indexOf("/");
  78445. let validPackageName = true;
  78446. let isScoped = false;
  78447. if (specifier[0] === "@") {
  78448. isScoped = true;
  78449. if (separatorIndex === -1 || specifier.length === 0) {
  78450. validPackageName = false;
  78451. } else {
  78452. separatorIndex = specifier.indexOf("/", separatorIndex + 1);
  78453. }
  78454. }
  78455. const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);
  78456. let i = -1;
  78457. while (++i < packageName.length) {
  78458. if (packageName[i] === "%" || packageName[i] === "\\") {
  78459. validPackageName = false;
  78460. break;
  78461. }
  78462. }
  78463. if (!validPackageName) {
  78464. throw new ERR_INVALID_MODULE_SPECIFIER(specifier, "is not a valid package name", (0, _url().fileURLToPath)(base2));
  78465. }
  78466. const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex));
  78467. return {
  78468. packageName,
  78469. packageSubpath,
  78470. isScoped
  78471. };
  78472. }
  78473. function packageResolve(specifier, base2, conditions) {
  78474. const {
  78475. packageName,
  78476. packageSubpath,
  78477. isScoped
  78478. } = parsePackageName(specifier, base2);
  78479. const packageConfig = getPackageScopeConfig(base2);
  78480. if (packageConfig.exists) {
  78481. const packageJsonUrl2 = (0, _url().pathToFileURL)(packageConfig.pjsonPath);
  78482. if (packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) {
  78483. return packageExportsResolve(packageJsonUrl2, packageSubpath, packageConfig, base2, conditions).resolved;
  78484. }
  78485. }
  78486. let packageJsonUrl = new (_url()).URL("./node_modules/" + packageName + "/package.json", base2);
  78487. let packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl);
  78488. let lastPath;
  78489. do {
  78490. const stat = tryStatSync(packageJsonPath.slice(0, -13));
  78491. if (!stat.isDirectory()) {
  78492. lastPath = packageJsonPath;
  78493. packageJsonUrl = new (_url()).URL((isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", packageJsonUrl);
  78494. packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl);
  78495. continue;
  78496. }
  78497. const packageConfig2 = getPackageConfig(packageJsonPath, specifier, base2);
  78498. if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null)
  78499. return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig2, base2, conditions).resolved;
  78500. if (packageSubpath === ".")
  78501. return legacyMainResolve(packageJsonUrl, packageConfig2, base2);
  78502. return new (_url()).URL(packageSubpath, packageJsonUrl);
  78503. } while (packageJsonPath.length !== lastPath.length);
  78504. throw new ERR_MODULE_NOT_FOUND(packageName, (0, _url().fileURLToPath)(base2));
  78505. }
  78506. function isRelativeSpecifier(specifier) {
  78507. if (specifier[0] === ".") {
  78508. if (specifier.length === 1 || specifier[1] === "/")
  78509. return true;
  78510. if (specifier[1] === "." && (specifier.length === 2 || specifier[2] === "/")) {
  78511. return true;
  78512. }
  78513. }
  78514. return false;
  78515. }
  78516. function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
  78517. if (specifier === "")
  78518. return false;
  78519. if (specifier[0] === "/")
  78520. return true;
  78521. return isRelativeSpecifier(specifier);
  78522. }
  78523. function moduleResolve(specifier, base2, conditions) {
  78524. let resolved;
  78525. if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {
  78526. resolved = new (_url()).URL(specifier, base2);
  78527. } else if (specifier[0] === "#") {
  78528. ({
  78529. resolved
  78530. } = packageImportsResolve(specifier, base2, conditions));
  78531. } else {
  78532. try {
  78533. resolved = new (_url()).URL(specifier);
  78534. } catch (_unused3) {
  78535. resolved = packageResolve(specifier, base2, conditions);
  78536. }
  78537. }
  78538. return finalizeResolution(resolved, base2);
  78539. }
  78540. function defaultResolve(specifier, context = {}) {
  78541. const {
  78542. parentURL
  78543. } = context;
  78544. let parsed;
  78545. try {
  78546. parsed = new (_url()).URL(specifier);
  78547. if (parsed.protocol === "data:") {
  78548. return {
  78549. url: specifier
  78550. };
  78551. }
  78552. } catch (_unused4) {
  78553. }
  78554. if (parsed && parsed.protocol === "node:")
  78555. return {
  78556. url: specifier
  78557. };
  78558. if (parsed && parsed.protocol !== "file:" && parsed.protocol !== "data:")
  78559. throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed);
  78560. if (listOfBuiltins.includes(specifier)) {
  78561. return {
  78562. url: "node:" + specifier
  78563. };
  78564. }
  78565. if (parentURL.startsWith("data:")) {
  78566. new (_url()).URL(specifier, parentURL);
  78567. }
  78568. const conditions = getConditionsSet(context.conditions);
  78569. let url = moduleResolve(specifier, new (_url()).URL(parentURL), conditions);
  78570. const urlPath = (0, _url().fileURLToPath)(url);
  78571. const real = (0, _fs().realpathSync)(urlPath);
  78572. const old = url;
  78573. url = (0, _url().pathToFileURL)(real + (urlPath.endsWith(_path().sep) ? "/" : ""));
  78574. url.search = old.search;
  78575. url.hash = old.hash;
  78576. return {
  78577. url: `${url}`
  78578. };
  78579. }
  78580. function resolve(_x, _x2) {
  78581. return _resolve.apply(this, arguments);
  78582. }
  78583. function _resolve() {
  78584. _resolve = _asyncToGenerator(function* (specifier, parent) {
  78585. if (!parent) {
  78586. throw new Error("Please pass `parent`: `import-meta-resolve` cannot ponyfill that");
  78587. }
  78588. try {
  78589. return defaultResolve(specifier, {
  78590. parentURL: parent
  78591. }).url;
  78592. } catch (error) {
  78593. return error.code === "ERR_UNSUPPORTED_DIR_IMPORT" ? error.url : Promise.reject(error);
  78594. }
  78595. });
  78596. return _resolve.apply(this, arguments);
  78597. }
  78598. }
  78599. });
  78600. // node_modules/@babel/core/lib/config/files/import-meta-resolve.js
  78601. var require_import_meta_resolve2 = __commonJS({
  78602. "node_modules/@babel/core/lib/config/files/import-meta-resolve.js"(exports) {
  78603. "use strict";
  78604. Object.defineProperty(exports, "__esModule", {
  78605. value: true
  78606. });
  78607. exports.default = resolve;
  78608. var _importMetaResolve = require_import_meta_resolve();
  78609. function asyncGeneratorStep(gen, resolve2, reject, _next, _throw, key2, arg) {
  78610. try {
  78611. var info = gen[key2](arg);
  78612. var value2 = info.value;
  78613. } catch (error) {
  78614. reject(error);
  78615. return;
  78616. }
  78617. if (info.done) {
  78618. resolve2(value2);
  78619. } else {
  78620. Promise.resolve(value2).then(_next, _throw);
  78621. }
  78622. }
  78623. function _asyncToGenerator(fn) {
  78624. return function() {
  78625. var self2 = this, args = arguments;
  78626. return new Promise(function(resolve2, reject) {
  78627. var gen = fn.apply(self2, args);
  78628. function _next(value2) {
  78629. asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "next", value2);
  78630. }
  78631. function _throw(err) {
  78632. asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "throw", err);
  78633. }
  78634. _next(void 0);
  78635. });
  78636. };
  78637. }
  78638. var import_;
  78639. try {
  78640. import_ = require_import();
  78641. } catch (_unused) {
  78642. }
  78643. var importMetaResolveP = import_ && process.execArgv.includes("--experimental-import-meta-resolve") ? import_("data:text/javascript,export default import.meta.resolve").then((m) => m.default || _importMetaResolve.resolve, () => _importMetaResolve.resolve) : Promise.resolve(_importMetaResolve.resolve);
  78644. function resolve(_x, _x2) {
  78645. return _resolve.apply(this, arguments);
  78646. }
  78647. function _resolve() {
  78648. _resolve = _asyncToGenerator(function* (specifier, parent) {
  78649. return (yield importMetaResolveP)(specifier, parent);
  78650. });
  78651. return _resolve.apply(this, arguments);
  78652. }
  78653. }
  78654. });
  78655. // node_modules/@babel/core/lib/config/files/plugins.js
  78656. var require_plugins4 = __commonJS({
  78657. "node_modules/@babel/core/lib/config/files/plugins.js"(exports) {
  78658. "use strict";
  78659. Object.defineProperty(exports, "__esModule", {
  78660. value: true
  78661. });
  78662. exports.loadPlugin = loadPlugin;
  78663. exports.loadPreset = loadPreset;
  78664. exports.resolvePlugin = resolvePlugin;
  78665. exports.resolvePreset = resolvePreset;
  78666. function _debug() {
  78667. const data3 = require_src();
  78668. _debug = function() {
  78669. return data3;
  78670. };
  78671. return data3;
  78672. }
  78673. function _path() {
  78674. const data3 = __require("path");
  78675. _path = function() {
  78676. return data3;
  78677. };
  78678. return data3;
  78679. }
  78680. function _gensync() {
  78681. const data3 = require_gensync();
  78682. _gensync = function() {
  78683. return data3;
  78684. };
  78685. return data3;
  78686. }
  78687. var _async = require_async();
  78688. var _moduleTypes = require_module_types();
  78689. function _url() {
  78690. const data3 = __require("url");
  78691. _url = function() {
  78692. return data3;
  78693. };
  78694. return data3;
  78695. }
  78696. var _importMetaResolve = require_import_meta_resolve2();
  78697. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key2, arg) {
  78698. try {
  78699. var info = gen[key2](arg);
  78700. var value2 = info.value;
  78701. } catch (error) {
  78702. reject(error);
  78703. return;
  78704. }
  78705. if (info.done) {
  78706. resolve(value2);
  78707. } else {
  78708. Promise.resolve(value2).then(_next, _throw);
  78709. }
  78710. }
  78711. function _asyncToGenerator(fn) {
  78712. return function() {
  78713. var self2 = this, args = arguments;
  78714. return new Promise(function(resolve, reject) {
  78715. var gen = fn.apply(self2, args);
  78716. function _next(value2) {
  78717. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value2);
  78718. }
  78719. function _throw(err) {
  78720. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  78721. }
  78722. _next(void 0);
  78723. });
  78724. };
  78725. }
  78726. var debug = _debug()("babel:config:loading:files:plugins");
  78727. var EXACT_RE = /^module:/;
  78728. var BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/;
  78729. var BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-preset-)/;
  78730. var BABEL_PLUGIN_ORG_RE = /^(@babel\/)(?!plugin-|[^/]+\/)/;
  78731. var BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/;
  78732. var OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/;
  78733. var OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/;
  78734. var OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;
  78735. function* resolvePlugin(name2, dirname) {
  78736. return yield* resolveStandardizedName("plugin", name2, dirname);
  78737. }
  78738. function* resolvePreset(name2, dirname) {
  78739. return yield* resolveStandardizedName("preset", name2, dirname);
  78740. }
  78741. function* loadPlugin(name2, dirname) {
  78742. const filepath = yield* resolvePlugin(name2, dirname);
  78743. const value2 = yield* requireModule("plugin", filepath);
  78744. debug("Loaded plugin %o from %o.", name2, dirname);
  78745. return {
  78746. filepath,
  78747. value: value2
  78748. };
  78749. }
  78750. function* loadPreset(name2, dirname) {
  78751. const filepath = yield* resolvePreset(name2, dirname);
  78752. const value2 = yield* requireModule("preset", filepath);
  78753. debug("Loaded preset %o from %o.", name2, dirname);
  78754. return {
  78755. filepath,
  78756. value: value2
  78757. };
  78758. }
  78759. function standardizeName(type, name2) {
  78760. if (_path().isAbsolute(name2))
  78761. return name2;
  78762. const isPreset = type === "preset";
  78763. return name2.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`).replace(EXACT_RE, "");
  78764. }
  78765. function* resolveAlternativesHelper(type, name2) {
  78766. const standardizedName = standardizeName(type, name2);
  78767. const {
  78768. error,
  78769. value: value2
  78770. } = yield standardizedName;
  78771. if (!error)
  78772. return value2;
  78773. if (error.code !== "MODULE_NOT_FOUND")
  78774. throw error;
  78775. if (standardizedName !== name2 && !(yield name2).error) {
  78776. error.message += `
  78777. - If you want to resolve "${name2}", use "module:${name2}"`;
  78778. }
  78779. if (!(yield standardizeName(type, "@babel/" + name2)).error) {
  78780. error.message += `
  78781. - Did you mean "@babel/${name2}"?`;
  78782. }
  78783. const oppositeType = type === "preset" ? "plugin" : "preset";
  78784. if (!(yield standardizeName(oppositeType, name2)).error) {
  78785. error.message += `
  78786. - Did you accidentally pass a ${oppositeType} as a ${type}?`;
  78787. }
  78788. throw error;
  78789. }
  78790. function tryRequireResolve(id, {
  78791. paths: [dirname]
  78792. }) {
  78793. try {
  78794. return {
  78795. error: null,
  78796. value: (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? __require.resolve : (r, {
  78797. paths: [b]
  78798. }, M = __require("module")) => {
  78799. let f = M._findPath(r, M._nodeModulePaths(b).concat(b));
  78800. if (f)
  78801. return f;
  78802. f = new Error(`Cannot resolve module '${r}'`);
  78803. f.code = "MODULE_NOT_FOUND";
  78804. throw f;
  78805. })(id, {
  78806. paths: [dirname]
  78807. })
  78808. };
  78809. } catch (error) {
  78810. return {
  78811. error,
  78812. value: null
  78813. };
  78814. }
  78815. }
  78816. function tryImportMetaResolve(_x, _x2) {
  78817. return _tryImportMetaResolve.apply(this, arguments);
  78818. }
  78819. function _tryImportMetaResolve() {
  78820. _tryImportMetaResolve = _asyncToGenerator(function* (id, options) {
  78821. try {
  78822. return {
  78823. error: null,
  78824. value: yield (0, _importMetaResolve.default)(id, options)
  78825. };
  78826. } catch (error) {
  78827. return {
  78828. error,
  78829. value: null
  78830. };
  78831. }
  78832. });
  78833. return _tryImportMetaResolve.apply(this, arguments);
  78834. }
  78835. function resolveStandardizedNameForRequire(type, name2, dirname) {
  78836. const it = resolveAlternativesHelper(type, name2);
  78837. let res = it.next();
  78838. while (!res.done) {
  78839. res = it.next(tryRequireResolve(res.value, {
  78840. paths: [dirname]
  78841. }));
  78842. }
  78843. return res.value;
  78844. }
  78845. function resolveStandardizedNameForImport(_x3, _x4, _x5) {
  78846. return _resolveStandardizedNameForImport.apply(this, arguments);
  78847. }
  78848. function _resolveStandardizedNameForImport() {
  78849. _resolveStandardizedNameForImport = _asyncToGenerator(function* (type, name2, dirname) {
  78850. const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname, "./babel-virtual-resolve-base.js")).href;
  78851. const it = resolveAlternativesHelper(type, name2);
  78852. let res = it.next();
  78853. while (!res.done) {
  78854. res = it.next(yield tryImportMetaResolve(res.value, parentUrl));
  78855. }
  78856. return (0, _url().fileURLToPath)(res.value);
  78857. });
  78858. return _resolveStandardizedNameForImport.apply(this, arguments);
  78859. }
  78860. var resolveStandardizedName = _gensync()({
  78861. sync(type, name2, dirname = process.cwd()) {
  78862. return resolveStandardizedNameForRequire(type, name2, dirname);
  78863. },
  78864. async(type, name2, dirname = process.cwd()) {
  78865. return _asyncToGenerator(function* () {
  78866. if (!_moduleTypes.supportsESM) {
  78867. return resolveStandardizedNameForRequire(type, name2, dirname);
  78868. }
  78869. try {
  78870. return yield resolveStandardizedNameForImport(type, name2, dirname);
  78871. } catch (e) {
  78872. try {
  78873. return resolveStandardizedNameForRequire(type, name2, dirname);
  78874. } catch (e2) {
  78875. if (e.type === "MODULE_NOT_FOUND")
  78876. throw e;
  78877. if (e2.type === "MODULE_NOT_FOUND")
  78878. throw e2;
  78879. throw e;
  78880. }
  78881. }
  78882. })();
  78883. }
  78884. });
  78885. {
  78886. LOADING_MODULES = /* @__PURE__ */ new Set();
  78887. }
  78888. var LOADING_MODULES;
  78889. function* requireModule(type, name2) {
  78890. {
  78891. if (!(yield* (0, _async.isAsync)()) && LOADING_MODULES.has(name2)) {
  78892. throw new Error(`Reentrant ${type} detected trying to load "${name2}". This module is not ignored and is trying to load itself while compiling itself, leading to a dependency cycle. We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.`);
  78893. }
  78894. }
  78895. try {
  78896. {
  78897. LOADING_MODULES.add(name2);
  78898. }
  78899. return yield* (0, _moduleTypes.default)(name2, `You appear to be using a native ECMAScript module ${type}, which is only supported when running Babel asynchronously.`, true);
  78900. } catch (err) {
  78901. err.message = `[BABEL]: ${err.message} (While processing: ${name2})`;
  78902. throw err;
  78903. } finally {
  78904. {
  78905. LOADING_MODULES.delete(name2);
  78906. }
  78907. }
  78908. }
  78909. }
  78910. });
  78911. // node_modules/@babel/core/lib/config/files/index.js
  78912. var require_files = __commonJS({
  78913. "node_modules/@babel/core/lib/config/files/index.js"(exports) {
  78914. "use strict";
  78915. Object.defineProperty(exports, "__esModule", {
  78916. value: true
  78917. });
  78918. Object.defineProperty(exports, "ROOT_CONFIG_FILENAMES", {
  78919. enumerable: true,
  78920. get: function() {
  78921. return _configuration.ROOT_CONFIG_FILENAMES;
  78922. }
  78923. });
  78924. Object.defineProperty(exports, "findConfigUpwards", {
  78925. enumerable: true,
  78926. get: function() {
  78927. return _configuration.findConfigUpwards;
  78928. }
  78929. });
  78930. Object.defineProperty(exports, "findPackageData", {
  78931. enumerable: true,
  78932. get: function() {
  78933. return _package.findPackageData;
  78934. }
  78935. });
  78936. Object.defineProperty(exports, "findRelativeConfig", {
  78937. enumerable: true,
  78938. get: function() {
  78939. return _configuration.findRelativeConfig;
  78940. }
  78941. });
  78942. Object.defineProperty(exports, "findRootConfig", {
  78943. enumerable: true,
  78944. get: function() {
  78945. return _configuration.findRootConfig;
  78946. }
  78947. });
  78948. Object.defineProperty(exports, "loadConfig", {
  78949. enumerable: true,
  78950. get: function() {
  78951. return _configuration.loadConfig;
  78952. }
  78953. });
  78954. Object.defineProperty(exports, "loadPlugin", {
  78955. enumerable: true,
  78956. get: function() {
  78957. return plugins.loadPlugin;
  78958. }
  78959. });
  78960. Object.defineProperty(exports, "loadPreset", {
  78961. enumerable: true,
  78962. get: function() {
  78963. return plugins.loadPreset;
  78964. }
  78965. });
  78966. exports.resolvePreset = exports.resolvePlugin = void 0;
  78967. Object.defineProperty(exports, "resolveShowConfigPath", {
  78968. enumerable: true,
  78969. get: function() {
  78970. return _configuration.resolveShowConfigPath;
  78971. }
  78972. });
  78973. var _package = require_package();
  78974. var _configuration = require_configuration();
  78975. var plugins = require_plugins4();
  78976. function _gensync() {
  78977. const data3 = require_gensync();
  78978. _gensync = function() {
  78979. return data3;
  78980. };
  78981. return data3;
  78982. }
  78983. var resolvePlugin = _gensync()(plugins.resolvePlugin).sync;
  78984. exports.resolvePlugin = resolvePlugin;
  78985. var resolvePreset = _gensync()(plugins.resolvePreset).sync;
  78986. exports.resolvePreset = resolvePreset;
  78987. }
  78988. });
  78989. // node_modules/@babel/core/lib/transform.js
  78990. var require_transform = __commonJS({
  78991. "node_modules/@babel/core/lib/transform.js"(exports) {
  78992. "use strict";
  78993. Object.defineProperty(exports, "__esModule", {
  78994. value: true
  78995. });
  78996. exports.transform = void 0;
  78997. exports.transformAsync = transformAsync2;
  78998. exports.transformSync = transformSync2;
  78999. function _gensync() {
  79000. const data3 = require_gensync();
  79001. _gensync = function() {
  79002. return data3;
  79003. };
  79004. return data3;
  79005. }
  79006. var _config = require_config();
  79007. var _transformation = require_transformation();
  79008. var _rewriteStackTrace = require_rewrite_stack_trace();
  79009. var transformRunner = _gensync()(function* transform2(code2, opts) {
  79010. const config = yield* (0, _config.default)(opts);
  79011. if (config === null)
  79012. return null;
  79013. return yield* (0, _transformation.run)(config, code2);
  79014. });
  79015. var transform = function transform2(code2, optsOrCallback, maybeCallback) {
  79016. let opts;
  79017. let callback;
  79018. if (typeof optsOrCallback === "function") {
  79019. callback = optsOrCallback;
  79020. opts = void 0;
  79021. } else {
  79022. opts = optsOrCallback;
  79023. callback = maybeCallback;
  79024. }
  79025. if (callback === void 0) {
  79026. {
  79027. return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(code2, opts);
  79028. }
  79029. }
  79030. (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.errback)(code2, opts, callback);
  79031. };
  79032. exports.transform = transform;
  79033. function transformSync2(...args) {
  79034. return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(...args);
  79035. }
  79036. function transformAsync2(...args) {
  79037. return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.async)(...args);
  79038. }
  79039. }
  79040. });
  79041. // node_modules/@babel/core/lib/transform-ast.js
  79042. var require_transform_ast = __commonJS({
  79043. "node_modules/@babel/core/lib/transform-ast.js"(exports) {
  79044. "use strict";
  79045. Object.defineProperty(exports, "__esModule", {
  79046. value: true
  79047. });
  79048. exports.transformFromAst = void 0;
  79049. exports.transformFromAstAsync = transformFromAstAsync;
  79050. exports.transformFromAstSync = transformFromAstSync;
  79051. function _gensync() {
  79052. const data3 = require_gensync();
  79053. _gensync = function() {
  79054. return data3;
  79055. };
  79056. return data3;
  79057. }
  79058. var _config = require_config();
  79059. var _transformation = require_transformation();
  79060. var _rewriteStackTrace = require_rewrite_stack_trace();
  79061. var transformFromAstRunner = _gensync()(function* (ast, code2, opts) {
  79062. const config = yield* (0, _config.default)(opts);
  79063. if (config === null)
  79064. return null;
  79065. if (!ast)
  79066. throw new Error("No AST given");
  79067. return yield* (0, _transformation.run)(config, code2, ast);
  79068. });
  79069. var transformFromAst = function transformFromAst2(ast, code2, optsOrCallback, maybeCallback) {
  79070. let opts;
  79071. let callback;
  79072. if (typeof optsOrCallback === "function") {
  79073. callback = optsOrCallback;
  79074. opts = void 0;
  79075. } else {
  79076. opts = optsOrCallback;
  79077. callback = maybeCallback;
  79078. }
  79079. if (callback === void 0) {
  79080. {
  79081. return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(ast, code2, opts);
  79082. }
  79083. }
  79084. (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.errback)(ast, code2, opts, callback);
  79085. };
  79086. exports.transformFromAst = transformFromAst;
  79087. function transformFromAstSync(...args) {
  79088. return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(...args);
  79089. }
  79090. function transformFromAstAsync(...args) {
  79091. return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.async)(...args);
  79092. }
  79093. }
  79094. });
  79095. // node_modules/@babel/core/lib/parse.js
  79096. var require_parse3 = __commonJS({
  79097. "node_modules/@babel/core/lib/parse.js"(exports) {
  79098. "use strict";
  79099. Object.defineProperty(exports, "__esModule", {
  79100. value: true
  79101. });
  79102. exports.parse = void 0;
  79103. exports.parseAsync = parseAsync;
  79104. exports.parseSync = parseSync;
  79105. function _gensync() {
  79106. const data3 = require_gensync();
  79107. _gensync = function() {
  79108. return data3;
  79109. };
  79110. return data3;
  79111. }
  79112. var _config = require_config();
  79113. var _parser = require_parser();
  79114. var _normalizeOpts = require_normalize_opts();
  79115. var _rewriteStackTrace = require_rewrite_stack_trace();
  79116. var parseRunner = _gensync()(function* parse10(code2, opts) {
  79117. const config = yield* (0, _config.default)(opts);
  79118. if (config === null) {
  79119. return null;
  79120. }
  79121. return yield* (0, _parser.default)(config.passes, (0, _normalizeOpts.default)(config), code2);
  79122. });
  79123. var parse9 = function parse10(code2, opts, callback) {
  79124. if (typeof opts === "function") {
  79125. callback = opts;
  79126. opts = void 0;
  79127. }
  79128. if (callback === void 0) {
  79129. {
  79130. return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(code2, opts);
  79131. }
  79132. }
  79133. (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.errback)(code2, opts, callback);
  79134. };
  79135. exports.parse = parse9;
  79136. function parseSync(...args) {
  79137. return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(...args);
  79138. }
  79139. function parseAsync(...args) {
  79140. return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.async)(...args);
  79141. }
  79142. }
  79143. });
  79144. // node_modules/@babel/core/lib/index.js
  79145. var require_lib32 = __commonJS({
  79146. "node_modules/@babel/core/lib/index.js"(exports) {
  79147. "use strict";
  79148. Object.defineProperty(exports, "__esModule", {
  79149. value: true
  79150. });
  79151. exports.DEFAULT_EXTENSIONS = void 0;
  79152. Object.defineProperty(exports, "File", {
  79153. enumerable: true,
  79154. get: function() {
  79155. return _file.default;
  79156. }
  79157. });
  79158. exports.OptionManager = void 0;
  79159. exports.Plugin = Plugin;
  79160. Object.defineProperty(exports, "buildExternalHelpers", {
  79161. enumerable: true,
  79162. get: function() {
  79163. return _buildExternalHelpers.default;
  79164. }
  79165. });
  79166. Object.defineProperty(exports, "createConfigItem", {
  79167. enumerable: true,
  79168. get: function() {
  79169. return _config.createConfigItem;
  79170. }
  79171. });
  79172. Object.defineProperty(exports, "createConfigItemAsync", {
  79173. enumerable: true,
  79174. get: function() {
  79175. return _config.createConfigItemAsync;
  79176. }
  79177. });
  79178. Object.defineProperty(exports, "createConfigItemSync", {
  79179. enumerable: true,
  79180. get: function() {
  79181. return _config.createConfigItemSync;
  79182. }
  79183. });
  79184. Object.defineProperty(exports, "getEnv", {
  79185. enumerable: true,
  79186. get: function() {
  79187. return _environment.getEnv;
  79188. }
  79189. });
  79190. Object.defineProperty(exports, "loadOptions", {
  79191. enumerable: true,
  79192. get: function() {
  79193. return _config.loadOptions;
  79194. }
  79195. });
  79196. Object.defineProperty(exports, "loadOptionsAsync", {
  79197. enumerable: true,
  79198. get: function() {
  79199. return _config.loadOptionsAsync;
  79200. }
  79201. });
  79202. Object.defineProperty(exports, "loadOptionsSync", {
  79203. enumerable: true,
  79204. get: function() {
  79205. return _config.loadOptionsSync;
  79206. }
  79207. });
  79208. Object.defineProperty(exports, "loadPartialConfig", {
  79209. enumerable: true,
  79210. get: function() {
  79211. return _config.loadPartialConfig;
  79212. }
  79213. });
  79214. Object.defineProperty(exports, "loadPartialConfigAsync", {
  79215. enumerable: true,
  79216. get: function() {
  79217. return _config.loadPartialConfigAsync;
  79218. }
  79219. });
  79220. Object.defineProperty(exports, "loadPartialConfigSync", {
  79221. enumerable: true,
  79222. get: function() {
  79223. return _config.loadPartialConfigSync;
  79224. }
  79225. });
  79226. Object.defineProperty(exports, "parse", {
  79227. enumerable: true,
  79228. get: function() {
  79229. return _parse.parse;
  79230. }
  79231. });
  79232. Object.defineProperty(exports, "parseAsync", {
  79233. enumerable: true,
  79234. get: function() {
  79235. return _parse.parseAsync;
  79236. }
  79237. });
  79238. Object.defineProperty(exports, "parseSync", {
  79239. enumerable: true,
  79240. get: function() {
  79241. return _parse.parseSync;
  79242. }
  79243. });
  79244. Object.defineProperty(exports, "resolvePlugin", {
  79245. enumerable: true,
  79246. get: function() {
  79247. return _files.resolvePlugin;
  79248. }
  79249. });
  79250. Object.defineProperty(exports, "resolvePreset", {
  79251. enumerable: true,
  79252. get: function() {
  79253. return _files.resolvePreset;
  79254. }
  79255. });
  79256. Object.defineProperty((0, exports), "template", {
  79257. enumerable: true,
  79258. get: function() {
  79259. return _template().default;
  79260. }
  79261. });
  79262. Object.defineProperty((0, exports), "tokTypes", {
  79263. enumerable: true,
  79264. get: function() {
  79265. return _parser().tokTypes;
  79266. }
  79267. });
  79268. Object.defineProperty(exports, "transform", {
  79269. enumerable: true,
  79270. get: function() {
  79271. return _transform.transform;
  79272. }
  79273. });
  79274. Object.defineProperty(exports, "transformAsync", {
  79275. enumerable: true,
  79276. get: function() {
  79277. return _transform.transformAsync;
  79278. }
  79279. });
  79280. Object.defineProperty(exports, "transformFile", {
  79281. enumerable: true,
  79282. get: function() {
  79283. return _transformFile.transformFile;
  79284. }
  79285. });
  79286. Object.defineProperty(exports, "transformFileAsync", {
  79287. enumerable: true,
  79288. get: function() {
  79289. return _transformFile.transformFileAsync;
  79290. }
  79291. });
  79292. Object.defineProperty(exports, "transformFileSync", {
  79293. enumerable: true,
  79294. get: function() {
  79295. return _transformFile.transformFileSync;
  79296. }
  79297. });
  79298. Object.defineProperty(exports, "transformFromAst", {
  79299. enumerable: true,
  79300. get: function() {
  79301. return _transformAst.transformFromAst;
  79302. }
  79303. });
  79304. Object.defineProperty(exports, "transformFromAstAsync", {
  79305. enumerable: true,
  79306. get: function() {
  79307. return _transformAst.transformFromAstAsync;
  79308. }
  79309. });
  79310. Object.defineProperty(exports, "transformFromAstSync", {
  79311. enumerable: true,
  79312. get: function() {
  79313. return _transformAst.transformFromAstSync;
  79314. }
  79315. });
  79316. Object.defineProperty(exports, "transformSync", {
  79317. enumerable: true,
  79318. get: function() {
  79319. return _transform.transformSync;
  79320. }
  79321. });
  79322. Object.defineProperty((0, exports), "traverse", {
  79323. enumerable: true,
  79324. get: function() {
  79325. return _traverse().default;
  79326. }
  79327. });
  79328. exports.version = exports.types = void 0;
  79329. var _file = require_file();
  79330. var _buildExternalHelpers = require_build_external_helpers();
  79331. var _files = require_files();
  79332. var _environment = require_environment();
  79333. function _types() {
  79334. const data3 = require_lib3();
  79335. _types = function() {
  79336. return data3;
  79337. };
  79338. return data3;
  79339. }
  79340. Object.defineProperty((0, exports), "types", {
  79341. enumerable: true,
  79342. get: function() {
  79343. return _types();
  79344. }
  79345. });
  79346. function _parser() {
  79347. const data3 = require_lib9();
  79348. _parser = function() {
  79349. return data3;
  79350. };
  79351. return data3;
  79352. }
  79353. function _traverse() {
  79354. const data3 = require_lib13();
  79355. _traverse = function() {
  79356. return data3;
  79357. };
  79358. return data3;
  79359. }
  79360. function _template() {
  79361. const data3 = require_lib11();
  79362. _template = function() {
  79363. return data3;
  79364. };
  79365. return data3;
  79366. }
  79367. var _config = require_config();
  79368. var _transform = require_transform();
  79369. var _transformFile = require_transform_file();
  79370. var _transformAst = require_transform_ast();
  79371. var _parse = require_parse3();
  79372. var thisFile = require_lib32();
  79373. var version3 = "7.21.4";
  79374. exports.version = version3;
  79375. var DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]);
  79376. exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS;
  79377. var OptionManager = class {
  79378. init(opts) {
  79379. return (0, _config.loadOptionsSync)(opts);
  79380. }
  79381. };
  79382. exports.OptionManager = OptionManager;
  79383. function Plugin(alias) {
  79384. throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`);
  79385. }
  79386. }
  79387. });
  79388. // node_modules/@babel/plugin-transform-react-jsx/lib/create-plugin.js
  79389. var require_create_plugin = __commonJS({
  79390. "node_modules/@babel/plugin-transform-react-jsx/lib/create-plugin.js"(exports) {
  79391. "use strict";
  79392. Object.defineProperty(exports, "__esModule", {
  79393. value: true
  79394. });
  79395. exports.default = createPlugin;
  79396. var _pluginSyntaxJsx = require_lib29();
  79397. var _helperPluginUtils = require_lib20();
  79398. var _core = require_lib32();
  79399. var _helperModuleImports = require_lib15();
  79400. var _helperAnnotateAsPure = require_lib25();
  79401. var DEFAULT = {
  79402. importSource: "react",
  79403. runtime: "automatic",
  79404. pragma: "React.createElement",
  79405. pragmaFrag: "React.Fragment"
  79406. };
  79407. var JSX_SOURCE_ANNOTATION_REGEX = /^\s*\*?\s*@jsxImportSource\s+([^\s]+)\s*$/m;
  79408. var JSX_RUNTIME_ANNOTATION_REGEX = /^\s*\*?\s*@jsxRuntime\s+([^\s]+)\s*$/m;
  79409. var JSX_ANNOTATION_REGEX = /^\s*\*?\s*@jsx\s+([^\s]+)\s*$/m;
  79410. var JSX_FRAG_ANNOTATION_REGEX = /^\s*\*?\s*@jsxFrag\s+([^\s]+)\s*$/m;
  79411. var get = (pass, name2) => pass.get(`@babel/plugin-react-jsx/${name2}`);
  79412. var set = (pass, name2, v) => pass.set(`@babel/plugin-react-jsx/${name2}`, v);
  79413. function hasProto(node2) {
  79414. return node2.properties.some((value2) => _core.types.isObjectProperty(value2, {
  79415. computed: false,
  79416. shorthand: false
  79417. }) && (_core.types.isIdentifier(value2.key, {
  79418. name: "__proto__"
  79419. }) || _core.types.isStringLiteral(value2.key, {
  79420. value: "__proto__"
  79421. })));
  79422. }
  79423. function createPlugin({
  79424. name: name2,
  79425. development: development2
  79426. }) {
  79427. return (0, _helperPluginUtils.declare)((_, options) => {
  79428. const {
  79429. pure: PURE_ANNOTATION,
  79430. throwIfNamespace = true,
  79431. filter,
  79432. runtime: RUNTIME_DEFAULT = development2 ? "automatic" : "classic",
  79433. importSource: IMPORT_SOURCE_DEFAULT = DEFAULT.importSource,
  79434. pragma: PRAGMA_DEFAULT = DEFAULT.pragma,
  79435. pragmaFrag: PRAGMA_FRAG_DEFAULT = DEFAULT.pragmaFrag
  79436. } = options;
  79437. {
  79438. var {
  79439. useSpread = false,
  79440. useBuiltIns = false
  79441. } = options;
  79442. if (RUNTIME_DEFAULT === "classic") {
  79443. if (typeof useSpread !== "boolean") {
  79444. throw new Error("transform-react-jsx currently only accepts a boolean option for useSpread (defaults to false)");
  79445. }
  79446. if (typeof useBuiltIns !== "boolean") {
  79447. throw new Error("transform-react-jsx currently only accepts a boolean option for useBuiltIns (defaults to false)");
  79448. }
  79449. if (useSpread && useBuiltIns) {
  79450. throw new Error("transform-react-jsx currently only accepts useBuiltIns or useSpread but not both");
  79451. }
  79452. }
  79453. }
  79454. const injectMetaPropertiesVisitor = {
  79455. JSXOpeningElement(path, state) {
  79456. const attributes = [];
  79457. if (isThisAllowed(path.scope)) {
  79458. attributes.push(_core.types.jsxAttribute(_core.types.jsxIdentifier("__self"), _core.types.jsxExpressionContainer(_core.types.thisExpression())));
  79459. }
  79460. attributes.push(_core.types.jsxAttribute(_core.types.jsxIdentifier("__source"), _core.types.jsxExpressionContainer(makeSource(path, state))));
  79461. path.pushContainer("attributes", attributes);
  79462. }
  79463. };
  79464. return {
  79465. name: name2,
  79466. inherits: _pluginSyntaxJsx.default,
  79467. visitor: {
  79468. JSXNamespacedName(path) {
  79469. if (throwIfNamespace) {
  79470. throw path.buildCodeFrameError(`Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set \`throwIfNamespace: false\` to bypass this warning.`);
  79471. }
  79472. },
  79473. JSXSpreadChild(path) {
  79474. throw path.buildCodeFrameError("Spread children are not supported in React.");
  79475. },
  79476. Program: {
  79477. enter(path, state) {
  79478. const {
  79479. file
  79480. } = state;
  79481. let runtime = RUNTIME_DEFAULT;
  79482. let source2 = IMPORT_SOURCE_DEFAULT;
  79483. let pragma = PRAGMA_DEFAULT;
  79484. let pragmaFrag = PRAGMA_FRAG_DEFAULT;
  79485. let sourceSet = !!options.importSource;
  79486. let pragmaSet = !!options.pragma;
  79487. let pragmaFragSet = !!options.pragmaFrag;
  79488. if (file.ast.comments) {
  79489. for (const comment2 of file.ast.comments) {
  79490. const sourceMatches = JSX_SOURCE_ANNOTATION_REGEX.exec(comment2.value);
  79491. if (sourceMatches) {
  79492. source2 = sourceMatches[1];
  79493. sourceSet = true;
  79494. }
  79495. const runtimeMatches = JSX_RUNTIME_ANNOTATION_REGEX.exec(comment2.value);
  79496. if (runtimeMatches) {
  79497. runtime = runtimeMatches[1];
  79498. }
  79499. const jsxMatches = JSX_ANNOTATION_REGEX.exec(comment2.value);
  79500. if (jsxMatches) {
  79501. pragma = jsxMatches[1];
  79502. pragmaSet = true;
  79503. }
  79504. const jsxFragMatches = JSX_FRAG_ANNOTATION_REGEX.exec(comment2.value);
  79505. if (jsxFragMatches) {
  79506. pragmaFrag = jsxFragMatches[1];
  79507. pragmaFragSet = true;
  79508. }
  79509. }
  79510. }
  79511. set(state, "runtime", runtime);
  79512. if (runtime === "classic") {
  79513. if (sourceSet) {
  79514. throw path.buildCodeFrameError(`importSource cannot be set when runtime is classic.`);
  79515. }
  79516. const createElement = toMemberExpression2(pragma);
  79517. const fragment = toMemberExpression2(pragmaFrag);
  79518. set(state, "id/createElement", () => _core.types.cloneNode(createElement));
  79519. set(state, "id/fragment", () => _core.types.cloneNode(fragment));
  79520. set(state, "defaultPure", pragma === DEFAULT.pragma);
  79521. } else if (runtime === "automatic") {
  79522. if (pragmaSet || pragmaFragSet) {
  79523. throw path.buildCodeFrameError(`pragma and pragmaFrag cannot be set when runtime is automatic.`);
  79524. }
  79525. const define2 = (name3, id) => set(state, name3, createImportLazily(state, path, id, source2));
  79526. define2("id/jsx", development2 ? "jsxDEV" : "jsx");
  79527. define2("id/jsxs", development2 ? "jsxDEV" : "jsxs");
  79528. define2("id/createElement", "createElement");
  79529. define2("id/fragment", "Fragment");
  79530. set(state, "defaultPure", source2 === DEFAULT.importSource);
  79531. } else {
  79532. throw path.buildCodeFrameError(`Runtime must be either "classic" or "automatic".`);
  79533. }
  79534. if (development2) {
  79535. path.traverse(injectMetaPropertiesVisitor, state);
  79536. }
  79537. }
  79538. },
  79539. JSXFragment: {
  79540. exit(path, file) {
  79541. let callExpr;
  79542. if (get(file, "runtime") === "classic") {
  79543. callExpr = buildCreateElementFragmentCall(path, file);
  79544. } else {
  79545. callExpr = buildJSXFragmentCall(path, file);
  79546. }
  79547. path.replaceWith(_core.types.inherits(callExpr, path.node));
  79548. }
  79549. },
  79550. JSXElement: {
  79551. exit(path, file) {
  79552. let callExpr;
  79553. if (get(file, "runtime") === "classic" || shouldUseCreateElement(path)) {
  79554. callExpr = buildCreateElementCall(path, file);
  79555. } else {
  79556. callExpr = buildJSXElementCall(path, file);
  79557. }
  79558. path.replaceWith(_core.types.inherits(callExpr, path.node));
  79559. }
  79560. },
  79561. JSXAttribute(path) {
  79562. if (_core.types.isJSXElement(path.node.value)) {
  79563. path.node.value = _core.types.jsxExpressionContainer(path.node.value);
  79564. }
  79565. }
  79566. }
  79567. };
  79568. function isDerivedClass(classPath) {
  79569. return classPath.node.superClass !== null;
  79570. }
  79571. function isThisAllowed(scope) {
  79572. do {
  79573. const {
  79574. path
  79575. } = scope;
  79576. if (path.isFunctionParent() && !path.isArrowFunctionExpression()) {
  79577. if (!path.isMethod()) {
  79578. return true;
  79579. }
  79580. if (path.node.kind !== "constructor") {
  79581. return true;
  79582. }
  79583. return !isDerivedClass(path.parentPath.parentPath);
  79584. }
  79585. if (path.isTSModuleBlock()) {
  79586. return false;
  79587. }
  79588. } while (scope = scope.parent);
  79589. return true;
  79590. }
  79591. function call(pass, name3, args) {
  79592. const node2 = _core.types.callExpression(get(pass, `id/${name3}`)(), args);
  79593. if (PURE_ANNOTATION != null ? PURE_ANNOTATION : get(pass, "defaultPure"))
  79594. (0, _helperAnnotateAsPure.default)(node2);
  79595. return node2;
  79596. }
  79597. function shouldUseCreateElement(path) {
  79598. const openingPath = path.get("openingElement");
  79599. const attributes = openingPath.node.attributes;
  79600. let seenPropsSpread = false;
  79601. for (let i = 0; i < attributes.length; i++) {
  79602. const attr = attributes[i];
  79603. if (seenPropsSpread && _core.types.isJSXAttribute(attr) && attr.name.name === "key") {
  79604. return true;
  79605. } else if (_core.types.isJSXSpreadAttribute(attr)) {
  79606. seenPropsSpread = true;
  79607. }
  79608. }
  79609. return false;
  79610. }
  79611. function convertJSXIdentifier(node2, parent) {
  79612. if (_core.types.isJSXIdentifier(node2)) {
  79613. if (node2.name === "this" && _core.types.isReferenced(node2, parent)) {
  79614. return _core.types.thisExpression();
  79615. } else if (_core.types.isValidIdentifier(node2.name, false)) {
  79616. node2.type = "Identifier";
  79617. return node2;
  79618. } else {
  79619. return _core.types.stringLiteral(node2.name);
  79620. }
  79621. } else if (_core.types.isJSXMemberExpression(node2)) {
  79622. return _core.types.memberExpression(convertJSXIdentifier(node2.object, node2), convertJSXIdentifier(node2.property, node2));
  79623. } else if (_core.types.isJSXNamespacedName(node2)) {
  79624. return _core.types.stringLiteral(`${node2.namespace.name}:${node2.name.name}`);
  79625. }
  79626. return node2;
  79627. }
  79628. function convertAttributeValue(node2) {
  79629. if (_core.types.isJSXExpressionContainer(node2)) {
  79630. return node2.expression;
  79631. } else {
  79632. return node2;
  79633. }
  79634. }
  79635. function accumulateAttribute(array, attribute) {
  79636. if (_core.types.isJSXSpreadAttribute(attribute.node)) {
  79637. const arg = attribute.node.argument;
  79638. if (_core.types.isObjectExpression(arg) && !hasProto(arg)) {
  79639. array.push(...arg.properties);
  79640. } else {
  79641. array.push(_core.types.spreadElement(arg));
  79642. }
  79643. return array;
  79644. }
  79645. const value2 = convertAttributeValue(attribute.node.name.name !== "key" ? attribute.node.value || _core.types.booleanLiteral(true) : attribute.node.value);
  79646. if (attribute.node.name.name === "key" && value2 === null) {
  79647. throw attribute.buildCodeFrameError('Please provide an explicit key value. Using "key" as a shorthand for "key={true}" is not allowed.');
  79648. }
  79649. if (_core.types.isStringLiteral(value2) && !_core.types.isJSXExpressionContainer(attribute.node.value)) {
  79650. var _value$extra;
  79651. value2.value = value2.value.replace(/\n\s+/g, " ");
  79652. (_value$extra = value2.extra) == null ? true : delete _value$extra.raw;
  79653. }
  79654. if (_core.types.isJSXNamespacedName(attribute.node.name)) {
  79655. attribute.node.name = _core.types.stringLiteral(attribute.node.name.namespace.name + ":" + attribute.node.name.name.name);
  79656. } else if (_core.types.isValidIdentifier(attribute.node.name.name, false)) {
  79657. attribute.node.name.type = "Identifier";
  79658. } else {
  79659. attribute.node.name = _core.types.stringLiteral(attribute.node.name.name);
  79660. }
  79661. array.push(_core.types.inherits(_core.types.objectProperty(attribute.node.name, value2), attribute.node));
  79662. return array;
  79663. }
  79664. function buildChildrenProperty(children) {
  79665. let childrenNode;
  79666. if (children.length === 1) {
  79667. childrenNode = children[0];
  79668. } else if (children.length > 1) {
  79669. childrenNode = _core.types.arrayExpression(children);
  79670. } else {
  79671. return void 0;
  79672. }
  79673. return _core.types.objectProperty(_core.types.identifier("children"), childrenNode);
  79674. }
  79675. function buildJSXElementCall(path, file) {
  79676. const openingPath = path.get("openingElement");
  79677. const args = [getTag(openingPath)];
  79678. const attribsArray = [];
  79679. const extracted = /* @__PURE__ */ Object.create(null);
  79680. for (const attr of openingPath.get("attributes")) {
  79681. if (attr.isJSXAttribute() && _core.types.isJSXIdentifier(attr.node.name)) {
  79682. const {
  79683. name: name3
  79684. } = attr.node.name;
  79685. switch (name3) {
  79686. case "__source":
  79687. case "__self":
  79688. if (extracted[name3])
  79689. throw sourceSelfError(path, name3);
  79690. case "key": {
  79691. const keyValue = convertAttributeValue(attr.node.value);
  79692. if (keyValue === null) {
  79693. throw attr.buildCodeFrameError('Please provide an explicit key value. Using "key" as a shorthand for "key={true}" is not allowed.');
  79694. }
  79695. extracted[name3] = keyValue;
  79696. break;
  79697. }
  79698. default:
  79699. attribsArray.push(attr);
  79700. }
  79701. } else {
  79702. attribsArray.push(attr);
  79703. }
  79704. }
  79705. const children = _core.types.react.buildChildren(path.node);
  79706. let attribs;
  79707. if (attribsArray.length || children.length) {
  79708. attribs = buildJSXOpeningElementAttributes(attribsArray, children);
  79709. } else {
  79710. attribs = _core.types.objectExpression([]);
  79711. }
  79712. args.push(attribs);
  79713. if (development2) {
  79714. var _extracted$key;
  79715. args.push((_extracted$key = extracted.key) != null ? _extracted$key : path.scope.buildUndefinedNode(), _core.types.booleanLiteral(children.length > 1));
  79716. if (extracted.__source) {
  79717. args.push(extracted.__source);
  79718. if (extracted.__self)
  79719. args.push(extracted.__self);
  79720. } else if (extracted.__self) {
  79721. args.push(path.scope.buildUndefinedNode(), extracted.__self);
  79722. }
  79723. } else if (extracted.key !== void 0) {
  79724. args.push(extracted.key);
  79725. }
  79726. return call(file, children.length > 1 ? "jsxs" : "jsx", args);
  79727. }
  79728. function buildJSXOpeningElementAttributes(attribs, children) {
  79729. const props = attribs.reduce(accumulateAttribute, []);
  79730. if ((children == null ? void 0 : children.length) > 0) {
  79731. props.push(buildChildrenProperty(children));
  79732. }
  79733. return _core.types.objectExpression(props);
  79734. }
  79735. function buildJSXFragmentCall(path, file) {
  79736. const args = [get(file, "id/fragment")()];
  79737. const children = _core.types.react.buildChildren(path.node);
  79738. args.push(_core.types.objectExpression(children.length > 0 ? [buildChildrenProperty(children)] : []));
  79739. if (development2) {
  79740. args.push(path.scope.buildUndefinedNode(), _core.types.booleanLiteral(children.length > 1));
  79741. }
  79742. return call(file, children.length > 1 ? "jsxs" : "jsx", args);
  79743. }
  79744. function buildCreateElementFragmentCall(path, file) {
  79745. if (filter && !filter(path.node, file))
  79746. return;
  79747. return call(file, "createElement", [get(file, "id/fragment")(), _core.types.nullLiteral(), ..._core.types.react.buildChildren(path.node)]);
  79748. }
  79749. function buildCreateElementCall(path, file) {
  79750. const openingPath = path.get("openingElement");
  79751. return call(file, "createElement", [getTag(openingPath), buildCreateElementOpeningElementAttributes(file, path, openingPath.get("attributes")), ..._core.types.react.buildChildren(path.node)]);
  79752. }
  79753. function getTag(openingPath) {
  79754. const tagExpr = convertJSXIdentifier(openingPath.node.name, openingPath.node);
  79755. let tagName;
  79756. if (_core.types.isIdentifier(tagExpr)) {
  79757. tagName = tagExpr.name;
  79758. } else if (_core.types.isStringLiteral(tagExpr)) {
  79759. tagName = tagExpr.value;
  79760. }
  79761. if (_core.types.react.isCompatTag(tagName)) {
  79762. return _core.types.stringLiteral(tagName);
  79763. } else {
  79764. return tagExpr;
  79765. }
  79766. }
  79767. function buildCreateElementOpeningElementAttributes(file, path, attribs) {
  79768. const runtime = get(file, "runtime");
  79769. {
  79770. if (runtime !== "automatic") {
  79771. const objs = [];
  79772. const props2 = attribs.reduce(accumulateAttribute, []);
  79773. if (!useSpread) {
  79774. let start3 = 0;
  79775. props2.forEach((prop, i) => {
  79776. if (_core.types.isSpreadElement(prop)) {
  79777. if (i > start3) {
  79778. objs.push(_core.types.objectExpression(props2.slice(start3, i)));
  79779. }
  79780. objs.push(prop.argument);
  79781. start3 = i + 1;
  79782. }
  79783. });
  79784. if (props2.length > start3) {
  79785. objs.push(_core.types.objectExpression(props2.slice(start3)));
  79786. }
  79787. } else if (props2.length) {
  79788. objs.push(_core.types.objectExpression(props2));
  79789. }
  79790. if (!objs.length) {
  79791. return _core.types.nullLiteral();
  79792. }
  79793. if (objs.length === 1) {
  79794. if (!(_core.types.isSpreadElement(props2[0]) && _core.types.isObjectExpression(props2[0].argument))) {
  79795. return objs[0];
  79796. }
  79797. }
  79798. if (!_core.types.isObjectExpression(objs[0])) {
  79799. objs.unshift(_core.types.objectExpression([]));
  79800. }
  79801. const helper = useBuiltIns ? _core.types.memberExpression(_core.types.identifier("Object"), _core.types.identifier("assign")) : file.addHelper("extends");
  79802. return _core.types.callExpression(helper, objs);
  79803. }
  79804. }
  79805. const props = [];
  79806. const found = /* @__PURE__ */ Object.create(null);
  79807. for (const attr of attribs) {
  79808. const name3 = _core.types.isJSXAttribute(attr) && _core.types.isJSXIdentifier(attr.name) && attr.name.name;
  79809. if (runtime === "automatic" && (name3 === "__source" || name3 === "__self")) {
  79810. if (found[name3])
  79811. throw sourceSelfError(path, name3);
  79812. found[name3] = true;
  79813. }
  79814. accumulateAttribute(props, attr);
  79815. }
  79816. return props.length === 1 && _core.types.isSpreadElement(props[0]) && !_core.types.isObjectExpression(props[0].argument) ? props[0].argument : props.length > 0 ? _core.types.objectExpression(props) : _core.types.nullLiteral();
  79817. }
  79818. });
  79819. function getSource(source2, importName) {
  79820. switch (importName) {
  79821. case "Fragment":
  79822. return `${source2}/${development2 ? "jsx-dev-runtime" : "jsx-runtime"}`;
  79823. case "jsxDEV":
  79824. return `${source2}/jsx-dev-runtime`;
  79825. case "jsx":
  79826. case "jsxs":
  79827. return `${source2}/jsx-runtime`;
  79828. case "createElement":
  79829. return source2;
  79830. }
  79831. }
  79832. function createImportLazily(pass, path, importName, source2) {
  79833. return () => {
  79834. const actualSource = getSource(source2, importName);
  79835. if ((0, _helperModuleImports.isModule)(path)) {
  79836. let reference = get(pass, `imports/${importName}`);
  79837. if (reference)
  79838. return _core.types.cloneNode(reference);
  79839. reference = (0, _helperModuleImports.addNamed)(path, importName, actualSource, {
  79840. importedInterop: "uncompiled",
  79841. importPosition: "after"
  79842. });
  79843. set(pass, `imports/${importName}`, reference);
  79844. return reference;
  79845. } else {
  79846. let reference = get(pass, `requires/${actualSource}`);
  79847. if (reference) {
  79848. reference = _core.types.cloneNode(reference);
  79849. } else {
  79850. reference = (0, _helperModuleImports.addNamespace)(path, actualSource, {
  79851. importedInterop: "uncompiled"
  79852. });
  79853. set(pass, `requires/${actualSource}`, reference);
  79854. }
  79855. return _core.types.memberExpression(reference, _core.types.identifier(importName));
  79856. }
  79857. };
  79858. }
  79859. }
  79860. function toMemberExpression2(id) {
  79861. return id.split(".").map((name2) => _core.types.identifier(name2)).reduce((object, property) => _core.types.memberExpression(object, property));
  79862. }
  79863. function makeSource(path, state) {
  79864. const location2 = path.node.loc;
  79865. if (!location2) {
  79866. return path.scope.buildUndefinedNode();
  79867. }
  79868. if (!state.fileNameIdentifier) {
  79869. const {
  79870. filename = ""
  79871. } = state;
  79872. const fileNameIdentifier = path.scope.generateUidIdentifier("_jsxFileName");
  79873. path.scope.getProgramParent().push({
  79874. id: fileNameIdentifier,
  79875. init: _core.types.stringLiteral(filename)
  79876. });
  79877. state.fileNameIdentifier = fileNameIdentifier;
  79878. }
  79879. return makeTrace(_core.types.cloneNode(state.fileNameIdentifier), location2.start.line, location2.start.column);
  79880. }
  79881. function makeTrace(fileNameIdentifier, lineNumber, column0Based) {
  79882. const fileLineLiteral = lineNumber != null ? _core.types.numericLiteral(lineNumber) : _core.types.nullLiteral();
  79883. const fileColumnLiteral = column0Based != null ? _core.types.numericLiteral(column0Based + 1) : _core.types.nullLiteral();
  79884. return _core.template.expression.ast`{
  79885. fileName: ${fileNameIdentifier},
  79886. lineNumber: ${fileLineLiteral},
  79887. columnNumber: ${fileColumnLiteral},
  79888. }`;
  79889. }
  79890. function sourceSelfError(path, name2) {
  79891. const pluginName = `transform-react-jsx-${name2.slice(2)}`;
  79892. return path.buildCodeFrameError(`Duplicate ${name2} prop found. You are most likely using the deprecated ${pluginName} Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.`);
  79893. }
  79894. }
  79895. });
  79896. // node_modules/@babel/plugin-transform-react-jsx/lib/index.js
  79897. var require_lib33 = __commonJS({
  79898. "node_modules/@babel/plugin-transform-react-jsx/lib/index.js"(exports) {
  79899. "use strict";
  79900. Object.defineProperty(exports, "__esModule", {
  79901. value: true
  79902. });
  79903. exports.default = void 0;
  79904. var _createPlugin = require_create_plugin();
  79905. var _default = (0, _createPlugin.default)({
  79906. name: "transform-react-jsx",
  79907. development: false
  79908. });
  79909. exports.default = _default;
  79910. }
  79911. });
  79912. // node_modules/@babel/plugin-transform-react-jsx/lib/development.js
  79913. var require_development = __commonJS({
  79914. "node_modules/@babel/plugin-transform-react-jsx/lib/development.js"(exports) {
  79915. "use strict";
  79916. Object.defineProperty(exports, "__esModule", {
  79917. value: true
  79918. });
  79919. exports.default = void 0;
  79920. var _createPlugin = require_create_plugin();
  79921. var _default = (0, _createPlugin.default)({
  79922. name: "transform-react-jsx/development",
  79923. development: true
  79924. });
  79925. exports.default = _default;
  79926. }
  79927. });
  79928. // node_modules/@babel/plugin-transform-react-jsx-development/lib/index.js
  79929. var require_lib34 = __commonJS({
  79930. "node_modules/@babel/plugin-transform-react-jsx-development/lib/index.js"(exports) {
  79931. "use strict";
  79932. Object.defineProperty(exports, "__esModule", {
  79933. value: true
  79934. });
  79935. Object.defineProperty(exports, "default", {
  79936. enumerable: true,
  79937. get: function() {
  79938. return _development.default;
  79939. }
  79940. });
  79941. var _development = require_development();
  79942. }
  79943. });
  79944. // node_modules/@babel/plugin-transform-react-display-name/lib/index.js
  79945. var require_lib35 = __commonJS({
  79946. "node_modules/@babel/plugin-transform-react-display-name/lib/index.js"(exports) {
  79947. "use strict";
  79948. Object.defineProperty(exports, "__esModule", {
  79949. value: true
  79950. });
  79951. exports.default = void 0;
  79952. var _helperPluginUtils = require_lib20();
  79953. var _path = __require("path");
  79954. var _core = require_lib32();
  79955. var _default = (0, _helperPluginUtils.declare)((api) => {
  79956. api.assertVersion(7);
  79957. function addDisplayName(id, call) {
  79958. const props = call.arguments[0].properties;
  79959. let safe = true;
  79960. for (let i = 0; i < props.length; i++) {
  79961. const prop = props[i];
  79962. if (_core.types.isSpreadElement(prop)) {
  79963. continue;
  79964. }
  79965. const key2 = _core.types.toComputedKey(prop);
  79966. if (_core.types.isStringLiteral(key2, {
  79967. value: "displayName"
  79968. })) {
  79969. safe = false;
  79970. break;
  79971. }
  79972. }
  79973. if (safe) {
  79974. props.unshift(_core.types.objectProperty(_core.types.identifier("displayName"), _core.types.stringLiteral(id)));
  79975. }
  79976. }
  79977. const isCreateClassCallExpression = _core.types.buildMatchMemberExpression("React.createClass");
  79978. const isCreateClassAddon = (callee) => _core.types.isIdentifier(callee, {
  79979. name: "createReactClass"
  79980. });
  79981. function isCreateClass(node2) {
  79982. if (!node2 || !_core.types.isCallExpression(node2))
  79983. return false;
  79984. if (!isCreateClassCallExpression(node2.callee) && !isCreateClassAddon(node2.callee)) {
  79985. return false;
  79986. }
  79987. const args = node2.arguments;
  79988. if (args.length !== 1)
  79989. return false;
  79990. const first = args[0];
  79991. if (!_core.types.isObjectExpression(first))
  79992. return false;
  79993. return true;
  79994. }
  79995. return {
  79996. name: "transform-react-display-name",
  79997. visitor: {
  79998. ExportDefaultDeclaration({
  79999. node: node2
  80000. }, state) {
  80001. if (isCreateClass(node2.declaration)) {
  80002. const filename = state.filename || "unknown";
  80003. let displayName = _path.basename(filename, _path.extname(filename));
  80004. if (displayName === "index") {
  80005. displayName = _path.basename(_path.dirname(filename));
  80006. }
  80007. addDisplayName(displayName, node2.declaration);
  80008. }
  80009. },
  80010. CallExpression(path) {
  80011. const {
  80012. node: node2
  80013. } = path;
  80014. if (!isCreateClass(node2))
  80015. return;
  80016. let id;
  80017. path.find(function(path2) {
  80018. if (path2.isAssignmentExpression()) {
  80019. id = path2.node.left;
  80020. } else if (path2.isObjectProperty()) {
  80021. id = path2.node.key;
  80022. } else if (path2.isVariableDeclarator()) {
  80023. id = path2.node.id;
  80024. } else if (path2.isStatement()) {
  80025. return true;
  80026. }
  80027. if (id)
  80028. return true;
  80029. });
  80030. if (!id)
  80031. return;
  80032. if (_core.types.isMemberExpression(id)) {
  80033. id = id.property;
  80034. }
  80035. if (_core.types.isIdentifier(id)) {
  80036. addDisplayName(id.name, node2);
  80037. }
  80038. }
  80039. }
  80040. };
  80041. });
  80042. exports.default = _default;
  80043. }
  80044. });
  80045. // node_modules/@babel/plugin-transform-react-pure-annotations/lib/index.js
  80046. var require_lib36 = __commonJS({
  80047. "node_modules/@babel/plugin-transform-react-pure-annotations/lib/index.js"(exports) {
  80048. "use strict";
  80049. Object.defineProperty(exports, "__esModule", {
  80050. value: true
  80051. });
  80052. exports.default = void 0;
  80053. var _helperPluginUtils = require_lib20();
  80054. var _helperAnnotateAsPure = require_lib25();
  80055. var _core = require_lib32();
  80056. var PURE_CALLS = [["react", /* @__PURE__ */ new Set(["cloneElement", "createContext", "createElement", "createFactory", "createRef", "forwardRef", "isValidElement", "memo", "lazy"])], ["react-dom", /* @__PURE__ */ new Set(["createPortal"])]];
  80057. var _default = (0, _helperPluginUtils.declare)((api) => {
  80058. api.assertVersion(7);
  80059. return {
  80060. name: "transform-react-pure-annotations",
  80061. visitor: {
  80062. CallExpression(path) {
  80063. if (isReactCall(path)) {
  80064. (0, _helperAnnotateAsPure.default)(path);
  80065. }
  80066. }
  80067. }
  80068. };
  80069. });
  80070. exports.default = _default;
  80071. function isReactCall(path) {
  80072. const calleePath = path.get("callee");
  80073. if (!calleePath.isMemberExpression()) {
  80074. for (const [module2, methods] of PURE_CALLS) {
  80075. for (const method of methods) {
  80076. if (calleePath.referencesImport(module2, method)) {
  80077. return true;
  80078. }
  80079. }
  80080. }
  80081. return false;
  80082. }
  80083. const object = calleePath.get("object");
  80084. const callee = calleePath.node;
  80085. if (!callee.computed && _core.types.isIdentifier(callee.property)) {
  80086. const propertyName = callee.property.name;
  80087. for (const [module2, methods] of PURE_CALLS) {
  80088. if (object.referencesImport(module2, "default") || object.referencesImport(module2, "*")) {
  80089. return methods.has(propertyName);
  80090. }
  80091. }
  80092. }
  80093. return false;
  80094. }
  80095. }
  80096. });
  80097. // node_modules/@babel/preset-react/lib/index.js
  80098. var require_lib37 = __commonJS({
  80099. "node_modules/@babel/preset-react/lib/index.js"(exports) {
  80100. "use strict";
  80101. Object.defineProperty(exports, "__esModule", { value: true });
  80102. var helperPluginUtils = require_lib20();
  80103. var transformReactJSX = require_lib33();
  80104. var transformReactJSXDevelopment = require_lib34();
  80105. var transformReactDisplayName = require_lib35();
  80106. var transformReactPure = require_lib36();
  80107. var helperValidatorOption = require_lib18();
  80108. function _interopDefaultLegacy(e) {
  80109. return e && typeof e === "object" && "default" in e ? e : { "default": e };
  80110. }
  80111. var transformReactJSX__default = /* @__PURE__ */ _interopDefaultLegacy(transformReactJSX);
  80112. var transformReactJSXDevelopment__default = /* @__PURE__ */ _interopDefaultLegacy(transformReactJSXDevelopment);
  80113. var transformReactDisplayName__default = /* @__PURE__ */ _interopDefaultLegacy(transformReactDisplayName);
  80114. var transformReactPure__default = /* @__PURE__ */ _interopDefaultLegacy(transformReactPure);
  80115. new helperValidatorOption.OptionValidator("@babel/preset-react");
  80116. function normalizeOptions(options = {}) {
  80117. {
  80118. let {
  80119. pragma,
  80120. pragmaFrag
  80121. } = options;
  80122. const {
  80123. pure,
  80124. throwIfNamespace = true,
  80125. runtime = "classic",
  80126. importSource,
  80127. useBuiltIns,
  80128. useSpread
  80129. } = options;
  80130. if (runtime === "classic") {
  80131. pragma = pragma || "React.createElement";
  80132. pragmaFrag = pragmaFrag || "React.Fragment";
  80133. }
  80134. const development2 = !!options.development;
  80135. return {
  80136. development: development2,
  80137. importSource,
  80138. pragma,
  80139. pragmaFrag,
  80140. pure,
  80141. runtime,
  80142. throwIfNamespace,
  80143. useBuiltIns,
  80144. useSpread
  80145. };
  80146. }
  80147. }
  80148. var index2 = helperPluginUtils.declarePreset((api, opts) => {
  80149. api.assertVersion(7);
  80150. const {
  80151. development: development2,
  80152. importSource,
  80153. pragma,
  80154. pragmaFrag,
  80155. pure,
  80156. runtime,
  80157. throwIfNamespace
  80158. } = normalizeOptions(opts);
  80159. return {
  80160. plugins: [[development2 ? transformReactJSXDevelopment__default["default"] : transformReactJSX__default["default"], {
  80161. importSource,
  80162. pragma,
  80163. pragmaFrag,
  80164. runtime,
  80165. throwIfNamespace,
  80166. pure,
  80167. useBuiltIns: !!opts.useBuiltIns,
  80168. useSpread: opts.useSpread
  80169. }], transformReactDisplayName__default["default"], pure !== false && transformReactPure__default["default"]].filter(Boolean)
  80170. };
  80171. });
  80172. exports["default"] = index2;
  80173. }
  80174. });
  80175. // node_modules/bail/index.js
  80176. function bail(error) {
  80177. if (error) {
  80178. throw error;
  80179. }
  80180. }
  80181. // node_modules/unified/lib/index.js
  80182. var import_is_buffer2 = __toESM(require_is_buffer(), 1);
  80183. var import_extend = __toESM(require_extend(), 1);
  80184. // node_modules/is-plain-obj/index.js
  80185. function isPlainObject(value2) {
  80186. if (typeof value2 !== "object" || value2 === null) {
  80187. return false;
  80188. }
  80189. const prototype = Object.getPrototypeOf(value2);
  80190. return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value2) && !(Symbol.iterator in value2);
  80191. }
  80192. // node_modules/trough/index.js
  80193. function trough() {
  80194. const fns = [];
  80195. const pipeline = { run, use };
  80196. return pipeline;
  80197. function run(...values) {
  80198. let middlewareIndex = -1;
  80199. const callback = values.pop();
  80200. if (typeof callback !== "function") {
  80201. throw new TypeError("Expected function as last argument, not " + callback);
  80202. }
  80203. next(null, ...values);
  80204. function next(error, ...output) {
  80205. const fn = fns[++middlewareIndex];
  80206. let index2 = -1;
  80207. if (error) {
  80208. callback(error);
  80209. return;
  80210. }
  80211. while (++index2 < values.length) {
  80212. if (output[index2] === null || output[index2] === void 0) {
  80213. output[index2] = values[index2];
  80214. }
  80215. }
  80216. values = output;
  80217. if (fn) {
  80218. wrap(fn, next)(...output);
  80219. } else {
  80220. callback(null, ...output);
  80221. }
  80222. }
  80223. }
  80224. function use(middelware) {
  80225. if (typeof middelware !== "function") {
  80226. throw new TypeError(
  80227. "Expected `middelware` to be a function, not " + middelware
  80228. );
  80229. }
  80230. fns.push(middelware);
  80231. return pipeline;
  80232. }
  80233. }
  80234. function wrap(middleware, callback) {
  80235. let called;
  80236. return wrapped;
  80237. function wrapped(...parameters) {
  80238. const fnExpectsCallback = middleware.length > parameters.length;
  80239. let result;
  80240. if (fnExpectsCallback) {
  80241. parameters.push(done);
  80242. }
  80243. try {
  80244. result = middleware.apply(this, parameters);
  80245. } catch (error) {
  80246. const exception = (
  80247. /** @type {Error} */
  80248. error
  80249. );
  80250. if (fnExpectsCallback && called) {
  80251. throw exception;
  80252. }
  80253. return done(exception);
  80254. }
  80255. if (!fnExpectsCallback) {
  80256. if (result instanceof Promise) {
  80257. result.then(then, done);
  80258. } else if (result instanceof Error) {
  80259. done(result);
  80260. } else {
  80261. then(result);
  80262. }
  80263. }
  80264. }
  80265. function done(error, ...output) {
  80266. if (!called) {
  80267. called = true;
  80268. callback(error, ...output);
  80269. }
  80270. }
  80271. function then(value2) {
  80272. done(null, value2);
  80273. }
  80274. }
  80275. // node_modules/vfile/lib/index.js
  80276. var import_is_buffer = __toESM(require_is_buffer(), 1);
  80277. // node_modules/unist-util-stringify-position/lib/index.js
  80278. function stringifyPosition(value2) {
  80279. if (!value2 || typeof value2 !== "object") {
  80280. return "";
  80281. }
  80282. if ("position" in value2 || "type" in value2) {
  80283. return position(value2.position);
  80284. }
  80285. if ("start" in value2 || "end" in value2) {
  80286. return position(value2);
  80287. }
  80288. if ("line" in value2 || "column" in value2) {
  80289. return point(value2);
  80290. }
  80291. return "";
  80292. }
  80293. function point(point4) {
  80294. return index(point4 && point4.line) + ":" + index(point4 && point4.column);
  80295. }
  80296. function position(pos2) {
  80297. return point(pos2 && pos2.start) + "-" + point(pos2 && pos2.end);
  80298. }
  80299. function index(value2) {
  80300. return value2 && typeof value2 === "number" ? value2 : 1;
  80301. }
  80302. // node_modules/vfile-message/lib/index.js
  80303. var VFileMessage = class extends Error {
  80304. /**
  80305. * Create a message for `reason` at `place` from `origin`.
  80306. *
  80307. * When an error is passed in as `reason`, the `stack` is copied.
  80308. *
  80309. * @param {string | Error | VFileMessage} reason
  80310. * Reason for message, uses the stack and message of the error if given.
  80311. *
  80312. * > 👉 **Note**: you should use markdown.
  80313. * @param {Node | NodeLike | Position | Point | null | undefined} [place]
  80314. * Place in file where the message occurred.
  80315. * @param {string | null | undefined} [origin]
  80316. * Place in code where the message originates (example:
  80317. * `'my-package:my-rule'` or `'my-rule'`).
  80318. * @returns
  80319. * Instance of `VFileMessage`.
  80320. */
  80321. // To do: next major: expose `undefined` everywhere instead of `null`.
  80322. constructor(reason, place, origin) {
  80323. const parts = [null, null];
  80324. let position3 = {
  80325. // @ts-expect-error: we always follows the structure of `position`.
  80326. start: { line: null, column: null },
  80327. // @ts-expect-error: "
  80328. end: { line: null, column: null }
  80329. };
  80330. super();
  80331. if (typeof place === "string") {
  80332. origin = place;
  80333. place = void 0;
  80334. }
  80335. if (typeof origin === "string") {
  80336. const index2 = origin.indexOf(":");
  80337. if (index2 === -1) {
  80338. parts[1] = origin;
  80339. } else {
  80340. parts[0] = origin.slice(0, index2);
  80341. parts[1] = origin.slice(index2 + 1);
  80342. }
  80343. }
  80344. if (place) {
  80345. if ("type" in place || "position" in place) {
  80346. if (place.position) {
  80347. position3 = place.position;
  80348. }
  80349. } else if ("start" in place || "end" in place) {
  80350. position3 = place;
  80351. } else if ("line" in place || "column" in place) {
  80352. position3.start = place;
  80353. }
  80354. }
  80355. this.name = stringifyPosition(place) || "1:1";
  80356. this.message = typeof reason === "object" ? reason.message : reason;
  80357. this.stack = "";
  80358. if (typeof reason === "object" && reason.stack) {
  80359. this.stack = reason.stack;
  80360. }
  80361. this.reason = this.message;
  80362. this.fatal;
  80363. this.line = position3.start.line;
  80364. this.column = position3.start.column;
  80365. this.position = position3;
  80366. this.source = parts[0];
  80367. this.ruleId = parts[1];
  80368. this.file;
  80369. this.actual;
  80370. this.expected;
  80371. this.url;
  80372. this.note;
  80373. }
  80374. };
  80375. VFileMessage.prototype.file = "";
  80376. VFileMessage.prototype.name = "";
  80377. VFileMessage.prototype.reason = "";
  80378. VFileMessage.prototype.message = "";
  80379. VFileMessage.prototype.stack = "";
  80380. VFileMessage.prototype.fatal = null;
  80381. VFileMessage.prototype.column = null;
  80382. VFileMessage.prototype.line = null;
  80383. VFileMessage.prototype.source = null;
  80384. VFileMessage.prototype.ruleId = null;
  80385. VFileMessage.prototype.position = null;
  80386. // node_modules/vfile/lib/minpath.js
  80387. import { default as default2 } from "path";
  80388. // node_modules/vfile/lib/minproc.js
  80389. import { default as default3 } from "process";
  80390. // node_modules/vfile/lib/minurl.js
  80391. import { fileURLToPath } from "url";
  80392. // node_modules/vfile/lib/minurl.shared.js
  80393. function isUrl(fileUrlOrPath) {
  80394. return fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && // @ts-expect-error: indexable.
  80395. fileUrlOrPath.href && // @ts-expect-error: indexable.
  80396. fileUrlOrPath.origin;
  80397. }
  80398. // node_modules/vfile/lib/index.js
  80399. var order = ["history", "path", "basename", "stem", "extname", "dirname"];
  80400. var VFile = class {
  80401. /**
  80402. * Create a new virtual file.
  80403. *
  80404. * `options` is treated as:
  80405. *
  80406. * * `string` or `Buffer` — `{value: options}`
  80407. * * `URL` — `{path: options}`
  80408. * * `VFile` — shallow copies its data over to the new file
  80409. * * `object` — all fields are shallow copied over to the new file
  80410. *
  80411. * Path related fields are set in the following order (least specific to
  80412. * most specific): `history`, `path`, `basename`, `stem`, `extname`,
  80413. * `dirname`.
  80414. *
  80415. * You cannot set `dirname` or `extname` without setting either `history`,
  80416. * `path`, `basename`, or `stem` too.
  80417. *
  80418. * @param {Compatible | null | undefined} [value]
  80419. * File value.
  80420. * @returns
  80421. * New instance.
  80422. */
  80423. constructor(value2) {
  80424. let options;
  80425. if (!value2) {
  80426. options = {};
  80427. } else if (typeof value2 === "string" || buffer(value2)) {
  80428. options = { value: value2 };
  80429. } else if (isUrl(value2)) {
  80430. options = { path: value2 };
  80431. } else {
  80432. options = value2;
  80433. }
  80434. this.data = {};
  80435. this.messages = [];
  80436. this.history = [];
  80437. this.cwd = default3.cwd();
  80438. this.value;
  80439. this.stored;
  80440. this.result;
  80441. this.map;
  80442. let index2 = -1;
  80443. while (++index2 < order.length) {
  80444. const prop2 = order[index2];
  80445. if (prop2 in options && options[prop2] !== void 0 && options[prop2] !== null) {
  80446. this[prop2] = prop2 === "history" ? [...options[prop2]] : options[prop2];
  80447. }
  80448. }
  80449. let prop;
  80450. for (prop in options) {
  80451. if (!order.includes(prop)) {
  80452. this[prop] = options[prop];
  80453. }
  80454. }
  80455. }
  80456. /**
  80457. * Get the full path (example: `'~/index.min.js'`).
  80458. *
  80459. * @returns {string}
  80460. */
  80461. get path() {
  80462. return this.history[this.history.length - 1];
  80463. }
  80464. /**
  80465. * Set the full path (example: `'~/index.min.js'`).
  80466. *
  80467. * Cannot be nullified.
  80468. * You can set a file URL (a `URL` object with a `file:` protocol) which will
  80469. * be turned into a path with `url.fileURLToPath`.
  80470. *
  80471. * @param {string | URL} path
  80472. */
  80473. set path(path) {
  80474. if (isUrl(path)) {
  80475. path = fileURLToPath(path);
  80476. }
  80477. assertNonEmpty(path, "path");
  80478. if (this.path !== path) {
  80479. this.history.push(path);
  80480. }
  80481. }
  80482. /**
  80483. * Get the parent path (example: `'~'`).
  80484. */
  80485. get dirname() {
  80486. return typeof this.path === "string" ? default2.dirname(this.path) : void 0;
  80487. }
  80488. /**
  80489. * Set the parent path (example: `'~'`).
  80490. *
  80491. * Cannot be set if there’s no `path` yet.
  80492. */
  80493. set dirname(dirname) {
  80494. assertPath(this.basename, "dirname");
  80495. this.path = default2.join(dirname || "", this.basename);
  80496. }
  80497. /**
  80498. * Get the basename (including extname) (example: `'index.min.js'`).
  80499. */
  80500. get basename() {
  80501. return typeof this.path === "string" ? default2.basename(this.path) : void 0;
  80502. }
  80503. /**
  80504. * Set basename (including extname) (`'index.min.js'`).
  80505. *
  80506. * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
  80507. * on windows).
  80508. * Cannot be nullified (use `file.path = file.dirname` instead).
  80509. */
  80510. set basename(basename) {
  80511. assertNonEmpty(basename, "basename");
  80512. assertPart(basename, "basename");
  80513. this.path = default2.join(this.dirname || "", basename);
  80514. }
  80515. /**
  80516. * Get the extname (including dot) (example: `'.js'`).
  80517. */
  80518. get extname() {
  80519. return typeof this.path === "string" ? default2.extname(this.path) : void 0;
  80520. }
  80521. /**
  80522. * Set the extname (including dot) (example: `'.js'`).
  80523. *
  80524. * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
  80525. * on windows).
  80526. * Cannot be set if there’s no `path` yet.
  80527. */
  80528. set extname(extname) {
  80529. assertPart(extname, "extname");
  80530. assertPath(this.dirname, "extname");
  80531. if (extname) {
  80532. if (extname.charCodeAt(0) !== 46) {
  80533. throw new Error("`extname` must start with `.`");
  80534. }
  80535. if (extname.includes(".", 1)) {
  80536. throw new Error("`extname` cannot contain multiple dots");
  80537. }
  80538. }
  80539. this.path = default2.join(this.dirname, this.stem + (extname || ""));
  80540. }
  80541. /**
  80542. * Get the stem (basename w/o extname) (example: `'index.min'`).
  80543. */
  80544. get stem() {
  80545. return typeof this.path === "string" ? default2.basename(this.path, this.extname) : void 0;
  80546. }
  80547. /**
  80548. * Set the stem (basename w/o extname) (example: `'index.min'`).
  80549. *
  80550. * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
  80551. * on windows).
  80552. * Cannot be nullified (use `file.path = file.dirname` instead).
  80553. */
  80554. set stem(stem) {
  80555. assertNonEmpty(stem, "stem");
  80556. assertPart(stem, "stem");
  80557. this.path = default2.join(this.dirname || "", stem + (this.extname || ""));
  80558. }
  80559. /**
  80560. * Serialize the file.
  80561. *
  80562. * @param {BufferEncoding | null | undefined} [encoding='utf8']
  80563. * Character encoding to understand `value` as when it’s a `Buffer`
  80564. * (default: `'utf8'`).
  80565. * @returns {string}
  80566. * Serialized file.
  80567. */
  80568. toString(encoding) {
  80569. return (this.value || "").toString(encoding || void 0);
  80570. }
  80571. /**
  80572. * Create a warning message associated with the file.
  80573. *
  80574. * Its `fatal` is set to `false` and `file` is set to the current file path.
  80575. * Its added to `file.messages`.
  80576. *
  80577. * @param {string | Error | VFileMessage} reason
  80578. * Reason for message, uses the stack and message of the error if given.
  80579. * @param {Node | NodeLike | Position | Point | null | undefined} [place]
  80580. * Place in file where the message occurred.
  80581. * @param {string | null | undefined} [origin]
  80582. * Place in code where the message originates (example:
  80583. * `'my-package:my-rule'` or `'my-rule'`).
  80584. * @returns {VFileMessage}
  80585. * Message.
  80586. */
  80587. message(reason, place, origin) {
  80588. const message = new VFileMessage(reason, place, origin);
  80589. if (this.path) {
  80590. message.name = this.path + ":" + message.name;
  80591. message.file = this.path;
  80592. }
  80593. message.fatal = false;
  80594. this.messages.push(message);
  80595. return message;
  80596. }
  80597. /**
  80598. * Create an info message associated with the file.
  80599. *
  80600. * Its `fatal` is set to `null` and `file` is set to the current file path.
  80601. * Its added to `file.messages`.
  80602. *
  80603. * @param {string | Error | VFileMessage} reason
  80604. * Reason for message, uses the stack and message of the error if given.
  80605. * @param {Node | NodeLike | Position | Point | null | undefined} [place]
  80606. * Place in file where the message occurred.
  80607. * @param {string | null | undefined} [origin]
  80608. * Place in code where the message originates (example:
  80609. * `'my-package:my-rule'` or `'my-rule'`).
  80610. * @returns {VFileMessage}
  80611. * Message.
  80612. */
  80613. info(reason, place, origin) {
  80614. const message = this.message(reason, place, origin);
  80615. message.fatal = null;
  80616. return message;
  80617. }
  80618. /**
  80619. * Create a fatal error associated with the file.
  80620. *
  80621. * Its `fatal` is set to `true` and `file` is set to the current file path.
  80622. * Its added to `file.messages`.
  80623. *
  80624. * > 👉 **Note**: a fatal error means that a file is no longer processable.
  80625. *
  80626. * @param {string | Error | VFileMessage} reason
  80627. * Reason for message, uses the stack and message of the error if given.
  80628. * @param {Node | NodeLike | Position | Point | null | undefined} [place]
  80629. * Place in file where the message occurred.
  80630. * @param {string | null | undefined} [origin]
  80631. * Place in code where the message originates (example:
  80632. * `'my-package:my-rule'` or `'my-rule'`).
  80633. * @returns {never}
  80634. * Message.
  80635. * @throws {VFileMessage}
  80636. * Message.
  80637. */
  80638. fail(reason, place, origin) {
  80639. const message = this.message(reason, place, origin);
  80640. message.fatal = true;
  80641. throw message;
  80642. }
  80643. };
  80644. function assertPart(part, name2) {
  80645. if (part && part.includes(default2.sep)) {
  80646. throw new Error(
  80647. "`" + name2 + "` cannot be a path: did not expect `" + default2.sep + "`"
  80648. );
  80649. }
  80650. }
  80651. function assertNonEmpty(part, name2) {
  80652. if (!part) {
  80653. throw new Error("`" + name2 + "` cannot be empty");
  80654. }
  80655. }
  80656. function assertPath(path, name2) {
  80657. if (!path) {
  80658. throw new Error("Setting `" + name2 + "` requires `path` to be set too");
  80659. }
  80660. }
  80661. function buffer(value2) {
  80662. return (0, import_is_buffer.default)(value2);
  80663. }
  80664. // node_modules/unified/lib/index.js
  80665. var unified = base().freeze();
  80666. var own = {}.hasOwnProperty;
  80667. function base() {
  80668. const transformers = trough();
  80669. const attachers = [];
  80670. let namespace = {};
  80671. let frozen;
  80672. let freezeIndex = -1;
  80673. processor.data = data3;
  80674. processor.Parser = void 0;
  80675. processor.Compiler = void 0;
  80676. processor.freeze = freeze;
  80677. processor.attachers = attachers;
  80678. processor.use = use;
  80679. processor.parse = parse9;
  80680. processor.stringify = stringify6;
  80681. processor.run = run;
  80682. processor.runSync = runSync;
  80683. processor.process = process3;
  80684. processor.processSync = processSync;
  80685. return processor;
  80686. function processor() {
  80687. const destination = base();
  80688. let index2 = -1;
  80689. while (++index2 < attachers.length) {
  80690. destination.use(...attachers[index2]);
  80691. }
  80692. destination.data((0, import_extend.default)(true, {}, namespace));
  80693. return destination;
  80694. }
  80695. function data3(key2, value2) {
  80696. if (typeof key2 === "string") {
  80697. if (arguments.length === 2) {
  80698. assertUnfrozen("data", frozen);
  80699. namespace[key2] = value2;
  80700. return processor;
  80701. }
  80702. return own.call(namespace, key2) && namespace[key2] || null;
  80703. }
  80704. if (key2) {
  80705. assertUnfrozen("data", frozen);
  80706. namespace = key2;
  80707. return processor;
  80708. }
  80709. return namespace;
  80710. }
  80711. function freeze() {
  80712. if (frozen) {
  80713. return processor;
  80714. }
  80715. while (++freezeIndex < attachers.length) {
  80716. const [attacher, ...options] = attachers[freezeIndex];
  80717. if (options[0] === false) {
  80718. continue;
  80719. }
  80720. if (options[0] === true) {
  80721. options[0] = void 0;
  80722. }
  80723. const transformer = attacher.call(processor, ...options);
  80724. if (typeof transformer === "function") {
  80725. transformers.use(transformer);
  80726. }
  80727. }
  80728. frozen = true;
  80729. freezeIndex = Number.POSITIVE_INFINITY;
  80730. return processor;
  80731. }
  80732. function use(value2, ...options) {
  80733. let settings;
  80734. assertUnfrozen("use", frozen);
  80735. if (value2 === null || value2 === void 0) {
  80736. } else if (typeof value2 === "function") {
  80737. addPlugin(value2, ...options);
  80738. } else if (typeof value2 === "object") {
  80739. if (Array.isArray(value2)) {
  80740. addList(value2);
  80741. } else {
  80742. addPreset(value2);
  80743. }
  80744. } else {
  80745. throw new TypeError("Expected usable value, not `" + value2 + "`");
  80746. }
  80747. if (settings) {
  80748. namespace.settings = Object.assign(namespace.settings || {}, settings);
  80749. }
  80750. return processor;
  80751. function add(value3) {
  80752. if (typeof value3 === "function") {
  80753. addPlugin(value3);
  80754. } else if (typeof value3 === "object") {
  80755. if (Array.isArray(value3)) {
  80756. const [plugin2, ...options2] = value3;
  80757. addPlugin(plugin2, ...options2);
  80758. } else {
  80759. addPreset(value3);
  80760. }
  80761. } else {
  80762. throw new TypeError("Expected usable value, not `" + value3 + "`");
  80763. }
  80764. }
  80765. function addPreset(result) {
  80766. addList(result.plugins);
  80767. if (result.settings) {
  80768. settings = Object.assign(settings || {}, result.settings);
  80769. }
  80770. }
  80771. function addList(plugins) {
  80772. let index2 = -1;
  80773. if (plugins === null || plugins === void 0) {
  80774. } else if (Array.isArray(plugins)) {
  80775. while (++index2 < plugins.length) {
  80776. const thing = plugins[index2];
  80777. add(thing);
  80778. }
  80779. } else {
  80780. throw new TypeError("Expected a list of plugins, not `" + plugins + "`");
  80781. }
  80782. }
  80783. function addPlugin(plugin2, value3) {
  80784. let index2 = -1;
  80785. let entry;
  80786. while (++index2 < attachers.length) {
  80787. if (attachers[index2][0] === plugin2) {
  80788. entry = attachers[index2];
  80789. break;
  80790. }
  80791. }
  80792. if (entry) {
  80793. if (isPlainObject(entry[1]) && isPlainObject(value3)) {
  80794. value3 = (0, import_extend.default)(true, entry[1], value3);
  80795. }
  80796. entry[1] = value3;
  80797. } else {
  80798. attachers.push([...arguments]);
  80799. }
  80800. }
  80801. }
  80802. function parse9(doc) {
  80803. processor.freeze();
  80804. const file = vfile(doc);
  80805. const Parser5 = processor.Parser;
  80806. assertParser("parse", Parser5);
  80807. if (newable(Parser5, "parse")) {
  80808. return new Parser5(String(file), file).parse();
  80809. }
  80810. return Parser5(String(file), file);
  80811. }
  80812. function stringify6(node2, doc) {
  80813. processor.freeze();
  80814. const file = vfile(doc);
  80815. const Compiler = processor.Compiler;
  80816. assertCompiler("stringify", Compiler);
  80817. assertNode(node2);
  80818. if (newable(Compiler, "compile")) {
  80819. return new Compiler(node2, file).compile();
  80820. }
  80821. return Compiler(node2, file);
  80822. }
  80823. function run(node2, doc, callback) {
  80824. assertNode(node2);
  80825. processor.freeze();
  80826. if (!callback && typeof doc === "function") {
  80827. callback = doc;
  80828. doc = void 0;
  80829. }
  80830. if (!callback) {
  80831. return new Promise(executor);
  80832. }
  80833. executor(null, callback);
  80834. function executor(resolve, reject) {
  80835. transformers.run(node2, vfile(doc), done);
  80836. function done(error, tree, file) {
  80837. tree = tree || node2;
  80838. if (error) {
  80839. reject(error);
  80840. } else if (resolve) {
  80841. resolve(tree);
  80842. } else {
  80843. callback(null, tree, file);
  80844. }
  80845. }
  80846. }
  80847. }
  80848. function runSync(node2, file) {
  80849. let result;
  80850. let complete;
  80851. processor.run(node2, file, done);
  80852. assertDone("runSync", "run", complete);
  80853. return result;
  80854. function done(error, tree) {
  80855. bail(error);
  80856. result = tree;
  80857. complete = true;
  80858. }
  80859. }
  80860. function process3(doc, callback) {
  80861. processor.freeze();
  80862. assertParser("process", processor.Parser);
  80863. assertCompiler("process", processor.Compiler);
  80864. if (!callback) {
  80865. return new Promise(executor);
  80866. }
  80867. executor(null, callback);
  80868. function executor(resolve, reject) {
  80869. const file = vfile(doc);
  80870. processor.run(processor.parse(file), file, (error, tree, file2) => {
  80871. if (error || !tree || !file2) {
  80872. done(error);
  80873. } else {
  80874. const result = processor.stringify(tree, file2);
  80875. if (result === void 0 || result === null) {
  80876. } else if (looksLikeAVFileValue(result)) {
  80877. file2.value = result;
  80878. } else {
  80879. file2.result = result;
  80880. }
  80881. done(error, file2);
  80882. }
  80883. });
  80884. function done(error, file2) {
  80885. if (error || !file2) {
  80886. reject(error);
  80887. } else if (resolve) {
  80888. resolve(file2);
  80889. } else {
  80890. callback(null, file2);
  80891. }
  80892. }
  80893. }
  80894. }
  80895. function processSync(doc) {
  80896. let complete;
  80897. processor.freeze();
  80898. assertParser("processSync", processor.Parser);
  80899. assertCompiler("processSync", processor.Compiler);
  80900. const file = vfile(doc);
  80901. processor.process(file, done);
  80902. assertDone("processSync", "process", complete);
  80903. return file;
  80904. function done(error) {
  80905. complete = true;
  80906. bail(error);
  80907. }
  80908. }
  80909. }
  80910. function newable(value2, name2) {
  80911. return typeof value2 === "function" && // Prototypes do exist.
  80912. // type-coverage:ignore-next-line
  80913. value2.prototype && // A function with keys in its prototype is probably a constructor.
  80914. // Classes’ prototype methods are not enumerable, so we check if some value
  80915. // exists in the prototype.
  80916. // type-coverage:ignore-next-line
  80917. (keys(value2.prototype) || name2 in value2.prototype);
  80918. }
  80919. function keys(value2) {
  80920. let key2;
  80921. for (key2 in value2) {
  80922. if (own.call(value2, key2)) {
  80923. return true;
  80924. }
  80925. }
  80926. return false;
  80927. }
  80928. function assertParser(name2, value2) {
  80929. if (typeof value2 !== "function") {
  80930. throw new TypeError("Cannot `" + name2 + "` without `Parser`");
  80931. }
  80932. }
  80933. function assertCompiler(name2, value2) {
  80934. if (typeof value2 !== "function") {
  80935. throw new TypeError("Cannot `" + name2 + "` without `Compiler`");
  80936. }
  80937. }
  80938. function assertUnfrozen(name2, frozen) {
  80939. if (frozen) {
  80940. throw new Error(
  80941. "Cannot call `" + name2 + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`."
  80942. );
  80943. }
  80944. }
  80945. function assertNode(node2) {
  80946. if (!isPlainObject(node2) || typeof node2.type !== "string") {
  80947. throw new TypeError("Expected node, got `" + node2 + "`");
  80948. }
  80949. }
  80950. function assertDone(name2, asyncName, complete) {
  80951. if (!complete) {
  80952. throw new Error(
  80953. "`" + name2 + "` finished async. Use `" + asyncName + "` instead"
  80954. );
  80955. }
  80956. }
  80957. function vfile(value2) {
  80958. return looksLikeAVFile(value2) ? value2 : new VFile(value2);
  80959. }
  80960. function looksLikeAVFile(value2) {
  80961. return Boolean(
  80962. value2 && typeof value2 === "object" && "message" in value2 && "messages" in value2
  80963. );
  80964. }
  80965. function looksLikeAVFileValue(value2) {
  80966. return typeof value2 === "string" || (0, import_is_buffer2.default)(value2);
  80967. }
  80968. // node_modules/acorn/dist/acorn.mjs
  80969. var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  80970. var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191];
  80971. var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  80972. var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  80973. var reservedWords = {
  80974. 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
  80975. 5: "class enum extends super const export import",
  80976. 6: "enum",
  80977. strict: "implements interface let package private protected public static yield",
  80978. strictBind: "eval arguments"
  80979. };
  80980. var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
  80981. var keywords$1 = {
  80982. 5: ecma5AndLessKeywords,
  80983. "5module": ecma5AndLessKeywords + " export import",
  80984. 6: ecma5AndLessKeywords + " const class extends export import super"
  80985. };
  80986. var keywordRelationalOperator = /^in(stanceof)?$/;
  80987. var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
  80988. var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
  80989. function isInAstralSet(code2, set) {
  80990. var pos2 = 65536;
  80991. for (var i = 0; i < set.length; i += 2) {
  80992. pos2 += set[i];
  80993. if (pos2 > code2) {
  80994. return false;
  80995. }
  80996. pos2 += set[i + 1];
  80997. if (pos2 >= code2) {
  80998. return true;
  80999. }
  81000. }
  81001. return false;
  81002. }
  81003. function isIdentifierStart(code2, astral) {
  81004. if (code2 < 65) {
  81005. return code2 === 36;
  81006. }
  81007. if (code2 < 91) {
  81008. return true;
  81009. }
  81010. if (code2 < 97) {
  81011. return code2 === 95;
  81012. }
  81013. if (code2 < 123) {
  81014. return true;
  81015. }
  81016. if (code2 <= 65535) {
  81017. return code2 >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code2));
  81018. }
  81019. if (astral === false) {
  81020. return false;
  81021. }
  81022. return isInAstralSet(code2, astralIdentifierStartCodes);
  81023. }
  81024. function isIdentifierChar(code2, astral) {
  81025. if (code2 < 48) {
  81026. return code2 === 36;
  81027. }
  81028. if (code2 < 58) {
  81029. return true;
  81030. }
  81031. if (code2 < 65) {
  81032. return false;
  81033. }
  81034. if (code2 < 91) {
  81035. return true;
  81036. }
  81037. if (code2 < 97) {
  81038. return code2 === 95;
  81039. }
  81040. if (code2 < 123) {
  81041. return true;
  81042. }
  81043. if (code2 <= 65535) {
  81044. return code2 >= 170 && nonASCIIidentifier.test(String.fromCharCode(code2));
  81045. }
  81046. if (astral === false) {
  81047. return false;
  81048. }
  81049. return isInAstralSet(code2, astralIdentifierStartCodes) || isInAstralSet(code2, astralIdentifierCodes);
  81050. }
  81051. var TokenType = function TokenType2(label, conf) {
  81052. if (conf === void 0)
  81053. conf = {};
  81054. this.label = label;
  81055. this.keyword = conf.keyword;
  81056. this.beforeExpr = !!conf.beforeExpr;
  81057. this.startsExpr = !!conf.startsExpr;
  81058. this.isLoop = !!conf.isLoop;
  81059. this.isAssign = !!conf.isAssign;
  81060. this.prefix = !!conf.prefix;
  81061. this.postfix = !!conf.postfix;
  81062. this.binop = conf.binop || null;
  81063. this.updateContext = null;
  81064. };
  81065. function binop(name2, prec) {
  81066. return new TokenType(name2, { beforeExpr: true, binop: prec });
  81067. }
  81068. var beforeExpr = { beforeExpr: true };
  81069. var startsExpr = { startsExpr: true };
  81070. var keywords = {};
  81071. function kw(name2, options) {
  81072. if (options === void 0)
  81073. options = {};
  81074. options.keyword = name2;
  81075. return keywords[name2] = new TokenType(name2, options);
  81076. }
  81077. var types$1 = {
  81078. num: new TokenType("num", startsExpr),
  81079. regexp: new TokenType("regexp", startsExpr),
  81080. string: new TokenType("string", startsExpr),
  81081. name: new TokenType("name", startsExpr),
  81082. privateId: new TokenType("privateId", startsExpr),
  81083. eof: new TokenType("eof"),
  81084. // Punctuation token types.
  81085. bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }),
  81086. bracketR: new TokenType("]"),
  81087. braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }),
  81088. braceR: new TokenType("}"),
  81089. parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }),
  81090. parenR: new TokenType(")"),
  81091. comma: new TokenType(",", beforeExpr),
  81092. semi: new TokenType(";", beforeExpr),
  81093. colon: new TokenType(":", beforeExpr),
  81094. dot: new TokenType("."),
  81095. question: new TokenType("?", beforeExpr),
  81096. questionDot: new TokenType("?."),
  81097. arrow: new TokenType("=>", beforeExpr),
  81098. template: new TokenType("template"),
  81099. invalidTemplate: new TokenType("invalidTemplate"),
  81100. ellipsis: new TokenType("...", beforeExpr),
  81101. backQuote: new TokenType("`", startsExpr),
  81102. dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }),
  81103. // Operators. These carry several kinds of properties to help the
  81104. // parser use them properly (the presence of these properties is
  81105. // what categorizes them as operators).
  81106. //
  81107. // `binop`, when present, specifies that this operator is a binary
  81108. // operator, and will refer to its precedence.
  81109. //
  81110. // `prefix` and `postfix` mark the operator as a prefix or postfix
  81111. // unary operator.
  81112. //
  81113. // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
  81114. // binary operators with a very low precedence, that should result
  81115. // in AssignmentExpression nodes.
  81116. eq: new TokenType("=", { beforeExpr: true, isAssign: true }),
  81117. assign: new TokenType("_=", { beforeExpr: true, isAssign: true }),
  81118. incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }),
  81119. prefix: new TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }),
  81120. logicalOR: binop("||", 1),
  81121. logicalAND: binop("&&", 2),
  81122. bitwiseOR: binop("|", 3),
  81123. bitwiseXOR: binop("^", 4),
  81124. bitwiseAND: binop("&", 5),
  81125. equality: binop("==/!=/===/!==", 6),
  81126. relational: binop("</>/<=/>=", 7),
  81127. bitShift: binop("<</>>/>>>", 8),
  81128. plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
  81129. modulo: binop("%", 10),
  81130. star: binop("*", 10),
  81131. slash: binop("/", 10),
  81132. starstar: new TokenType("**", { beforeExpr: true }),
  81133. coalesce: binop("??", 1),
  81134. // Keyword token types.
  81135. _break: kw("break"),
  81136. _case: kw("case", beforeExpr),
  81137. _catch: kw("catch"),
  81138. _continue: kw("continue"),
  81139. _debugger: kw("debugger"),
  81140. _default: kw("default", beforeExpr),
  81141. _do: kw("do", { isLoop: true, beforeExpr: true }),
  81142. _else: kw("else", beforeExpr),
  81143. _finally: kw("finally"),
  81144. _for: kw("for", { isLoop: true }),
  81145. _function: kw("function", startsExpr),
  81146. _if: kw("if"),
  81147. _return: kw("return", beforeExpr),
  81148. _switch: kw("switch"),
  81149. _throw: kw("throw", beforeExpr),
  81150. _try: kw("try"),
  81151. _var: kw("var"),
  81152. _const: kw("const"),
  81153. _while: kw("while", { isLoop: true }),
  81154. _with: kw("with"),
  81155. _new: kw("new", { beforeExpr: true, startsExpr: true }),
  81156. _this: kw("this", startsExpr),
  81157. _super: kw("super", startsExpr),
  81158. _class: kw("class", startsExpr),
  81159. _extends: kw("extends", beforeExpr),
  81160. _export: kw("export"),
  81161. _import: kw("import", startsExpr),
  81162. _null: kw("null", startsExpr),
  81163. _true: kw("true", startsExpr),
  81164. _false: kw("false", startsExpr),
  81165. _in: kw("in", { beforeExpr: true, binop: 7 }),
  81166. _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }),
  81167. _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }),
  81168. _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }),
  81169. _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true })
  81170. };
  81171. var lineBreak = /\r\n?|\n|\u2028|\u2029/;
  81172. var lineBreakG = new RegExp(lineBreak.source, "g");
  81173. function isNewLine(code2) {
  81174. return code2 === 10 || code2 === 13 || code2 === 8232 || code2 === 8233;
  81175. }
  81176. function nextLineBreak(code2, from, end) {
  81177. if (end === void 0)
  81178. end = code2.length;
  81179. for (var i = from; i < end; i++) {
  81180. var next = code2.charCodeAt(i);
  81181. if (isNewLine(next)) {
  81182. return i < end - 1 && next === 13 && code2.charCodeAt(i + 1) === 10 ? i + 2 : i + 1;
  81183. }
  81184. }
  81185. return -1;
  81186. }
  81187. var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
  81188. var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  81189. var ref = Object.prototype;
  81190. var hasOwnProperty = ref.hasOwnProperty;
  81191. var toString = ref.toString;
  81192. var hasOwn = Object.hasOwn || function(obj, propName) {
  81193. return hasOwnProperty.call(obj, propName);
  81194. };
  81195. var isArray = Array.isArray || function(obj) {
  81196. return toString.call(obj) === "[object Array]";
  81197. };
  81198. function wordsRegexp(words) {
  81199. return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
  81200. }
  81201. function codePointToString(code2) {
  81202. if (code2 <= 65535) {
  81203. return String.fromCharCode(code2);
  81204. }
  81205. code2 -= 65536;
  81206. return String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320);
  81207. }
  81208. var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
  81209. var Position = function Position2(line2, col) {
  81210. this.line = line2;
  81211. this.column = col;
  81212. };
  81213. Position.prototype.offset = function offset(n) {
  81214. return new Position(this.line, this.column + n);
  81215. };
  81216. var SourceLocation = function SourceLocation2(p, start3, end) {
  81217. this.start = start3;
  81218. this.end = end;
  81219. if (p.sourceFile !== null) {
  81220. this.source = p.sourceFile;
  81221. }
  81222. };
  81223. function getLineInfo(input, offset3) {
  81224. for (var line2 = 1, cur = 0; ; ) {
  81225. var nextBreak = nextLineBreak(input, cur, offset3);
  81226. if (nextBreak < 0) {
  81227. return new Position(line2, offset3 - cur);
  81228. }
  81229. ++line2;
  81230. cur = nextBreak;
  81231. }
  81232. }
  81233. var defaultOptions = {
  81234. // `ecmaVersion` indicates the ECMAScript version to parse. Must be
  81235. // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
  81236. // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
  81237. // (the latest version the library supports). This influences
  81238. // support for strict mode, the set of reserved words, and support
  81239. // for new syntax features.
  81240. ecmaVersion: null,
  81241. // `sourceType` indicates the mode the code should be parsed in.
  81242. // Can be either `"script"` or `"module"`. This influences global
  81243. // strict mode and parsing of `import` and `export` declarations.
  81244. sourceType: "script",
  81245. // `onInsertedSemicolon` can be a callback that will be called
  81246. // when a semicolon is automatically inserted. It will be passed
  81247. // the position of the comma as an offset, and if `locations` is
  81248. // enabled, it is given the location as a `{line, column}` object
  81249. // as second argument.
  81250. onInsertedSemicolon: null,
  81251. // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
  81252. // trailing commas.
  81253. onTrailingComma: null,
  81254. // By default, reserved words are only enforced if ecmaVersion >= 5.
  81255. // Set `allowReserved` to a boolean value to explicitly turn this on
  81256. // an off. When this option has the value "never", reserved words
  81257. // and keywords can also not be used as property names.
  81258. allowReserved: null,
  81259. // When enabled, a return at the top level is not considered an
  81260. // error.
  81261. allowReturnOutsideFunction: false,
  81262. // When enabled, import/export statements are not constrained to
  81263. // appearing at the top of the program, and an import.meta expression
  81264. // in a script isn't considered an error.
  81265. allowImportExportEverywhere: false,
  81266. // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.
  81267. // When enabled, await identifiers are allowed to appear at the top-level scope,
  81268. // but they are still not allowed in non-async functions.
  81269. allowAwaitOutsideFunction: null,
  81270. // When enabled, super identifiers are not constrained to
  81271. // appearing in methods and do not raise an error when they appear elsewhere.
  81272. allowSuperOutsideMethod: null,
  81273. // When enabled, hashbang directive in the beginning of file is
  81274. // allowed and treated as a line comment. Enabled by default when
  81275. // `ecmaVersion` >= 2023.
  81276. allowHashBang: false,
  81277. // When `locations` is on, `loc` properties holding objects with
  81278. // `start` and `end` properties in `{line, column}` form (with
  81279. // line being 1-based and column 0-based) will be attached to the
  81280. // nodes.
  81281. locations: false,
  81282. // A function can be passed as `onToken` option, which will
  81283. // cause Acorn to call that function with object in the same
  81284. // format as tokens returned from `tokenizer().getToken()`. Note
  81285. // that you are not allowed to call the parser from the
  81286. // callback—that will corrupt its internal state.
  81287. onToken: null,
  81288. // A function can be passed as `onComment` option, which will
  81289. // cause Acorn to call that function with `(block, text, start,
  81290. // end)` parameters whenever a comment is skipped. `block` is a
  81291. // boolean indicating whether this is a block (`/* */`) comment,
  81292. // `text` is the content of the comment, and `start` and `end` are
  81293. // character offsets that denote the start and end of the comment.
  81294. // When the `locations` option is on, two more parameters are
  81295. // passed, the full `{line, column}` locations of the start and
  81296. // end of the comments. Note that you are not allowed to call the
  81297. // parser from the callback—that will corrupt its internal state.
  81298. onComment: null,
  81299. // Nodes have their start and end characters offsets recorded in
  81300. // `start` and `end` properties (directly on the node, rather than
  81301. // the `loc` object, which holds line/column data. To also add a
  81302. // [semi-standardized][range] `range` property holding a `[start,
  81303. // end]` array with the same numbers, set the `ranges` option to
  81304. // `true`.
  81305. //
  81306. // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
  81307. ranges: false,
  81308. // It is possible to parse multiple files into a single AST by
  81309. // passing the tree produced by parsing the first file as
  81310. // `program` option in subsequent parses. This will add the
  81311. // toplevel forms of the parsed file to the `Program` (top) node
  81312. // of an existing parse tree.
  81313. program: null,
  81314. // When `locations` is on, you can pass this to record the source
  81315. // file in every node's `loc` object.
  81316. sourceFile: null,
  81317. // This value, if given, is stored in every node, whether
  81318. // `locations` is on or off.
  81319. directSourceFile: null,
  81320. // When enabled, parenthesized expressions are represented by
  81321. // (non-standard) ParenthesizedExpression nodes
  81322. preserveParens: false
  81323. };
  81324. var warnedAboutEcmaVersion = false;
  81325. function getOptions(opts) {
  81326. var options = {};
  81327. for (var opt in defaultOptions) {
  81328. options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt];
  81329. }
  81330. if (options.ecmaVersion === "latest") {
  81331. options.ecmaVersion = 1e8;
  81332. } else if (options.ecmaVersion == null) {
  81333. if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) {
  81334. warnedAboutEcmaVersion = true;
  81335. console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.");
  81336. }
  81337. options.ecmaVersion = 11;
  81338. } else if (options.ecmaVersion >= 2015) {
  81339. options.ecmaVersion -= 2009;
  81340. }
  81341. if (options.allowReserved == null) {
  81342. options.allowReserved = options.ecmaVersion < 5;
  81343. }
  81344. if (!opts || opts.allowHashBang == null) {
  81345. options.allowHashBang = options.ecmaVersion >= 14;
  81346. }
  81347. if (isArray(options.onToken)) {
  81348. var tokens = options.onToken;
  81349. options.onToken = function(token2) {
  81350. return tokens.push(token2);
  81351. };
  81352. }
  81353. if (isArray(options.onComment)) {
  81354. options.onComment = pushComment(options, options.onComment);
  81355. }
  81356. return options;
  81357. }
  81358. function pushComment(options, array) {
  81359. return function(block, text5, start3, end, startLoc, endLoc) {
  81360. var comment2 = {
  81361. type: block ? "Block" : "Line",
  81362. value: text5,
  81363. start: start3,
  81364. end
  81365. };
  81366. if (options.locations) {
  81367. comment2.loc = new SourceLocation(this, startLoc, endLoc);
  81368. }
  81369. if (options.ranges) {
  81370. comment2.range = [start3, end];
  81371. }
  81372. array.push(comment2);
  81373. };
  81374. }
  81375. var SCOPE_TOP = 1;
  81376. var SCOPE_FUNCTION = 2;
  81377. var SCOPE_ASYNC = 4;
  81378. var SCOPE_GENERATOR = 8;
  81379. var SCOPE_ARROW = 16;
  81380. var SCOPE_SIMPLE_CATCH = 32;
  81381. var SCOPE_SUPER = 64;
  81382. var SCOPE_DIRECT_SUPER = 128;
  81383. var SCOPE_CLASS_STATIC_BLOCK = 256;
  81384. var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
  81385. function functionFlags(async, generator) {
  81386. return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
  81387. }
  81388. var BIND_NONE = 0;
  81389. var BIND_VAR = 1;
  81390. var BIND_LEXICAL = 2;
  81391. var BIND_FUNCTION = 3;
  81392. var BIND_SIMPLE_CATCH = 4;
  81393. var BIND_OUTSIDE = 5;
  81394. var Parser = function Parser2(options, input, startPos) {
  81395. this.options = options = getOptions(options);
  81396. this.sourceFile = options.sourceFile;
  81397. this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
  81398. var reserved = "";
  81399. if (options.allowReserved !== true) {
  81400. reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];
  81401. if (options.sourceType === "module") {
  81402. reserved += " await";
  81403. }
  81404. }
  81405. this.reservedWords = wordsRegexp(reserved);
  81406. var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
  81407. this.reservedWordsStrict = wordsRegexp(reservedStrict);
  81408. this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
  81409. this.input = String(input);
  81410. this.containsEsc = false;
  81411. if (startPos) {
  81412. this.pos = startPos;
  81413. this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
  81414. this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
  81415. } else {
  81416. this.pos = this.lineStart = 0;
  81417. this.curLine = 1;
  81418. }
  81419. this.type = types$1.eof;
  81420. this.value = null;
  81421. this.start = this.end = this.pos;
  81422. this.startLoc = this.endLoc = this.curPosition();
  81423. this.lastTokEndLoc = this.lastTokStartLoc = null;
  81424. this.lastTokStart = this.lastTokEnd = this.pos;
  81425. this.context = this.initialContext();
  81426. this.exprAllowed = true;
  81427. this.inModule = options.sourceType === "module";
  81428. this.strict = this.inModule || this.strictDirective(this.pos);
  81429. this.potentialArrowAt = -1;
  81430. this.potentialArrowInForAwait = false;
  81431. this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
  81432. this.labels = [];
  81433. this.undefinedExports = /* @__PURE__ */ Object.create(null);
  81434. if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") {
  81435. this.skipLineComment(2);
  81436. }
  81437. this.scopeStack = [];
  81438. this.enterScope(SCOPE_TOP);
  81439. this.regexpState = null;
  81440. this.privateNameStack = [];
  81441. };
  81442. var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
  81443. Parser.prototype.parse = function parse() {
  81444. var node2 = this.options.program || this.startNode();
  81445. this.nextToken();
  81446. return this.parseTopLevel(node2);
  81447. };
  81448. prototypeAccessors.inFunction.get = function() {
  81449. return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
  81450. };
  81451. prototypeAccessors.inGenerator.get = function() {
  81452. return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit;
  81453. };
  81454. prototypeAccessors.inAsync.get = function() {
  81455. return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit;
  81456. };
  81457. prototypeAccessors.canAwait.get = function() {
  81458. for (var i = this.scopeStack.length - 1; i >= 0; i--) {
  81459. var scope = this.scopeStack[i];
  81460. if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) {
  81461. return false;
  81462. }
  81463. if (scope.flags & SCOPE_FUNCTION) {
  81464. return (scope.flags & SCOPE_ASYNC) > 0;
  81465. }
  81466. }
  81467. return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
  81468. };
  81469. prototypeAccessors.allowSuper.get = function() {
  81470. var ref3 = this.currentThisScope();
  81471. var flags = ref3.flags;
  81472. var inClassFieldInit = ref3.inClassFieldInit;
  81473. return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod;
  81474. };
  81475. prototypeAccessors.allowDirectSuper.get = function() {
  81476. return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
  81477. };
  81478. prototypeAccessors.treatFunctionsAsVar.get = function() {
  81479. return this.treatFunctionsAsVarInScope(this.currentScope());
  81480. };
  81481. prototypeAccessors.allowNewDotTarget.get = function() {
  81482. var ref3 = this.currentThisScope();
  81483. var flags = ref3.flags;
  81484. var inClassFieldInit = ref3.inClassFieldInit;
  81485. return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit;
  81486. };
  81487. prototypeAccessors.inClassStaticBlock.get = function() {
  81488. return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
  81489. };
  81490. Parser.extend = function extend2() {
  81491. var plugins = [], len = arguments.length;
  81492. while (len--)
  81493. plugins[len] = arguments[len];
  81494. var cls = this;
  81495. for (var i = 0; i < plugins.length; i++) {
  81496. cls = plugins[i](cls);
  81497. }
  81498. return cls;
  81499. };
  81500. Parser.parse = function parse2(input, options) {
  81501. return new this(options, input).parse();
  81502. };
  81503. Parser.parseExpressionAt = function parseExpressionAt(input, pos2, options) {
  81504. var parser = new this(options, input, pos2);
  81505. parser.nextToken();
  81506. return parser.parseExpression();
  81507. };
  81508. Parser.tokenizer = function tokenizer(input, options) {
  81509. return new this(options, input);
  81510. };
  81511. Object.defineProperties(Parser.prototype, prototypeAccessors);
  81512. var pp$9 = Parser.prototype;
  81513. var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
  81514. pp$9.strictDirective = function(start3) {
  81515. if (this.options.ecmaVersion < 5) {
  81516. return false;
  81517. }
  81518. for (; ; ) {
  81519. skipWhiteSpace.lastIndex = start3;
  81520. start3 += skipWhiteSpace.exec(this.input)[0].length;
  81521. var match = literal.exec(this.input.slice(start3));
  81522. if (!match) {
  81523. return false;
  81524. }
  81525. if ((match[1] || match[2]) === "use strict") {
  81526. skipWhiteSpace.lastIndex = start3 + match[0].length;
  81527. var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
  81528. var next = this.input.charAt(end);
  81529. return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
  81530. }
  81531. start3 += match[0].length;
  81532. skipWhiteSpace.lastIndex = start3;
  81533. start3 += skipWhiteSpace.exec(this.input)[0].length;
  81534. if (this.input[start3] === ";") {
  81535. start3++;
  81536. }
  81537. }
  81538. };
  81539. pp$9.eat = function(type) {
  81540. if (this.type === type) {
  81541. this.next();
  81542. return true;
  81543. } else {
  81544. return false;
  81545. }
  81546. };
  81547. pp$9.isContextual = function(name2) {
  81548. return this.type === types$1.name && this.value === name2 && !this.containsEsc;
  81549. };
  81550. pp$9.eatContextual = function(name2) {
  81551. if (!this.isContextual(name2)) {
  81552. return false;
  81553. }
  81554. this.next();
  81555. return true;
  81556. };
  81557. pp$9.expectContextual = function(name2) {
  81558. if (!this.eatContextual(name2)) {
  81559. this.unexpected();
  81560. }
  81561. };
  81562. pp$9.canInsertSemicolon = function() {
  81563. return this.type === types$1.eof || this.type === types$1.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
  81564. };
  81565. pp$9.insertSemicolon = function() {
  81566. if (this.canInsertSemicolon()) {
  81567. if (this.options.onInsertedSemicolon) {
  81568. this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
  81569. }
  81570. return true;
  81571. }
  81572. };
  81573. pp$9.semicolon = function() {
  81574. if (!this.eat(types$1.semi) && !this.insertSemicolon()) {
  81575. this.unexpected();
  81576. }
  81577. };
  81578. pp$9.afterTrailingComma = function(tokType, notNext) {
  81579. if (this.type === tokType) {
  81580. if (this.options.onTrailingComma) {
  81581. this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
  81582. }
  81583. if (!notNext) {
  81584. this.next();
  81585. }
  81586. return true;
  81587. }
  81588. };
  81589. pp$9.expect = function(type) {
  81590. this.eat(type) || this.unexpected();
  81591. };
  81592. pp$9.unexpected = function(pos2) {
  81593. this.raise(pos2 != null ? pos2 : this.start, "Unexpected token");
  81594. };
  81595. var DestructuringErrors = function DestructuringErrors2() {
  81596. this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
  81597. };
  81598. pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {
  81599. if (!refDestructuringErrors) {
  81600. return;
  81601. }
  81602. if (refDestructuringErrors.trailingComma > -1) {
  81603. this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
  81604. }
  81605. var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
  81606. if (parens > -1) {
  81607. this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern");
  81608. }
  81609. };
  81610. pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
  81611. if (!refDestructuringErrors) {
  81612. return false;
  81613. }
  81614. var shorthandAssign = refDestructuringErrors.shorthandAssign;
  81615. var doubleProto = refDestructuringErrors.doubleProto;
  81616. if (!andThrow) {
  81617. return shorthandAssign >= 0 || doubleProto >= 0;
  81618. }
  81619. if (shorthandAssign >= 0) {
  81620. this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns");
  81621. }
  81622. if (doubleProto >= 0) {
  81623. this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
  81624. }
  81625. };
  81626. pp$9.checkYieldAwaitInDefaultParams = function() {
  81627. if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {
  81628. this.raise(this.yieldPos, "Yield expression cannot be a default value");
  81629. }
  81630. if (this.awaitPos) {
  81631. this.raise(this.awaitPos, "Await expression cannot be a default value");
  81632. }
  81633. };
  81634. pp$9.isSimpleAssignTarget = function(expr) {
  81635. if (expr.type === "ParenthesizedExpression") {
  81636. return this.isSimpleAssignTarget(expr.expression);
  81637. }
  81638. return expr.type === "Identifier" || expr.type === "MemberExpression";
  81639. };
  81640. var pp$8 = Parser.prototype;
  81641. pp$8.parseTopLevel = function(node2) {
  81642. var exports = /* @__PURE__ */ Object.create(null);
  81643. if (!node2.body) {
  81644. node2.body = [];
  81645. }
  81646. while (this.type !== types$1.eof) {
  81647. var stmt = this.parseStatement(null, true, exports);
  81648. node2.body.push(stmt);
  81649. }
  81650. if (this.inModule) {
  81651. for (var i = 0, list3 = Object.keys(this.undefinedExports); i < list3.length; i += 1) {
  81652. var name2 = list3[i];
  81653. this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined");
  81654. }
  81655. }
  81656. this.adaptDirectivePrologue(node2.body);
  81657. this.next();
  81658. node2.sourceType = this.options.sourceType;
  81659. return this.finishNode(node2, "Program");
  81660. };
  81661. var loopLabel = { kind: "loop" };
  81662. var switchLabel = { kind: "switch" };
  81663. pp$8.isLet = function(context) {
  81664. if (this.options.ecmaVersion < 6 || !this.isContextual("let")) {
  81665. return false;
  81666. }
  81667. skipWhiteSpace.lastIndex = this.pos;
  81668. var skip = skipWhiteSpace.exec(this.input);
  81669. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  81670. if (nextCh === 91 || nextCh === 92) {
  81671. return true;
  81672. }
  81673. if (context) {
  81674. return false;
  81675. }
  81676. if (nextCh === 123 || nextCh > 55295 && nextCh < 56320) {
  81677. return true;
  81678. }
  81679. if (isIdentifierStart(nextCh, true)) {
  81680. var pos2 = next + 1;
  81681. while (isIdentifierChar(nextCh = this.input.charCodeAt(pos2), true)) {
  81682. ++pos2;
  81683. }
  81684. if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
  81685. return true;
  81686. }
  81687. var ident = this.input.slice(next, pos2);
  81688. if (!keywordRelationalOperator.test(ident)) {
  81689. return true;
  81690. }
  81691. }
  81692. return false;
  81693. };
  81694. pp$8.isAsyncFunction = function() {
  81695. if (this.options.ecmaVersion < 8 || !this.isContextual("async")) {
  81696. return false;
  81697. }
  81698. skipWhiteSpace.lastIndex = this.pos;
  81699. var skip = skipWhiteSpace.exec(this.input);
  81700. var next = this.pos + skip[0].length, after;
  81701. return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
  81702. };
  81703. pp$8.parseStatement = function(context, topLevel, exports) {
  81704. var starttype = this.type, node2 = this.startNode(), kind;
  81705. if (this.isLet(context)) {
  81706. starttype = types$1._var;
  81707. kind = "let";
  81708. }
  81709. switch (starttype) {
  81710. case types$1._break:
  81711. case types$1._continue:
  81712. return this.parseBreakContinueStatement(node2, starttype.keyword);
  81713. case types$1._debugger:
  81714. return this.parseDebuggerStatement(node2);
  81715. case types$1._do:
  81716. return this.parseDoStatement(node2);
  81717. case types$1._for:
  81718. return this.parseForStatement(node2);
  81719. case types$1._function:
  81720. if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) {
  81721. this.unexpected();
  81722. }
  81723. return this.parseFunctionStatement(node2, false, !context);
  81724. case types$1._class:
  81725. if (context) {
  81726. this.unexpected();
  81727. }
  81728. return this.parseClass(node2, true);
  81729. case types$1._if:
  81730. return this.parseIfStatement(node2);
  81731. case types$1._return:
  81732. return this.parseReturnStatement(node2);
  81733. case types$1._switch:
  81734. return this.parseSwitchStatement(node2);
  81735. case types$1._throw:
  81736. return this.parseThrowStatement(node2);
  81737. case types$1._try:
  81738. return this.parseTryStatement(node2);
  81739. case types$1._const:
  81740. case types$1._var:
  81741. kind = kind || this.value;
  81742. if (context && kind !== "var") {
  81743. this.unexpected();
  81744. }
  81745. return this.parseVarStatement(node2, kind);
  81746. case types$1._while:
  81747. return this.parseWhileStatement(node2);
  81748. case types$1._with:
  81749. return this.parseWithStatement(node2);
  81750. case types$1.braceL:
  81751. return this.parseBlock(true, node2);
  81752. case types$1.semi:
  81753. return this.parseEmptyStatement(node2);
  81754. case types$1._export:
  81755. case types$1._import:
  81756. if (this.options.ecmaVersion > 10 && starttype === types$1._import) {
  81757. skipWhiteSpace.lastIndex = this.pos;
  81758. var skip = skipWhiteSpace.exec(this.input);
  81759. var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
  81760. if (nextCh === 40 || nextCh === 46) {
  81761. return this.parseExpressionStatement(node2, this.parseExpression());
  81762. }
  81763. }
  81764. if (!this.options.allowImportExportEverywhere) {
  81765. if (!topLevel) {
  81766. this.raise(this.start, "'import' and 'export' may only appear at the top level");
  81767. }
  81768. if (!this.inModule) {
  81769. this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
  81770. }
  81771. }
  81772. return starttype === types$1._import ? this.parseImport(node2) : this.parseExport(node2, exports);
  81773. default:
  81774. if (this.isAsyncFunction()) {
  81775. if (context) {
  81776. this.unexpected();
  81777. }
  81778. this.next();
  81779. return this.parseFunctionStatement(node2, true, !context);
  81780. }
  81781. var maybeName = this.value, expr = this.parseExpression();
  81782. if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
  81783. return this.parseLabeledStatement(node2, maybeName, expr, context);
  81784. } else {
  81785. return this.parseExpressionStatement(node2, expr);
  81786. }
  81787. }
  81788. };
  81789. pp$8.parseBreakContinueStatement = function(node2, keyword) {
  81790. var isBreak = keyword === "break";
  81791. this.next();
  81792. if (this.eat(types$1.semi) || this.insertSemicolon()) {
  81793. node2.label = null;
  81794. } else if (this.type !== types$1.name) {
  81795. this.unexpected();
  81796. } else {
  81797. node2.label = this.parseIdent();
  81798. this.semicolon();
  81799. }
  81800. var i = 0;
  81801. for (; i < this.labels.length; ++i) {
  81802. var lab = this.labels[i];
  81803. if (node2.label == null || lab.name === node2.label.name) {
  81804. if (lab.kind != null && (isBreak || lab.kind === "loop")) {
  81805. break;
  81806. }
  81807. if (node2.label && isBreak) {
  81808. break;
  81809. }
  81810. }
  81811. }
  81812. if (i === this.labels.length) {
  81813. this.raise(node2.start, "Unsyntactic " + keyword);
  81814. }
  81815. return this.finishNode(node2, isBreak ? "BreakStatement" : "ContinueStatement");
  81816. };
  81817. pp$8.parseDebuggerStatement = function(node2) {
  81818. this.next();
  81819. this.semicolon();
  81820. return this.finishNode(node2, "DebuggerStatement");
  81821. };
  81822. pp$8.parseDoStatement = function(node2) {
  81823. this.next();
  81824. this.labels.push(loopLabel);
  81825. node2.body = this.parseStatement("do");
  81826. this.labels.pop();
  81827. this.expect(types$1._while);
  81828. node2.test = this.parseParenExpression();
  81829. if (this.options.ecmaVersion >= 6) {
  81830. this.eat(types$1.semi);
  81831. } else {
  81832. this.semicolon();
  81833. }
  81834. return this.finishNode(node2, "DoWhileStatement");
  81835. };
  81836. pp$8.parseForStatement = function(node2) {
  81837. this.next();
  81838. var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
  81839. this.labels.push(loopLabel);
  81840. this.enterScope(0);
  81841. this.expect(types$1.parenL);
  81842. if (this.type === types$1.semi) {
  81843. if (awaitAt > -1) {
  81844. this.unexpected(awaitAt);
  81845. }
  81846. return this.parseFor(node2, null);
  81847. }
  81848. var isLet = this.isLet();
  81849. if (this.type === types$1._var || this.type === types$1._const || isLet) {
  81850. var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
  81851. this.next();
  81852. this.parseVar(init$1, true, kind);
  81853. this.finishNode(init$1, "VariableDeclaration");
  81854. if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
  81855. if (this.options.ecmaVersion >= 9) {
  81856. if (this.type === types$1._in) {
  81857. if (awaitAt > -1) {
  81858. this.unexpected(awaitAt);
  81859. }
  81860. } else {
  81861. node2.await = awaitAt > -1;
  81862. }
  81863. }
  81864. return this.parseForIn(node2, init$1);
  81865. }
  81866. if (awaitAt > -1) {
  81867. this.unexpected(awaitAt);
  81868. }
  81869. return this.parseFor(node2, init$1);
  81870. }
  81871. var startsWithLet = this.isContextual("let"), isForOf = false;
  81872. var refDestructuringErrors = new DestructuringErrors();
  81873. var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
  81874. if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  81875. if (this.options.ecmaVersion >= 9) {
  81876. if (this.type === types$1._in) {
  81877. if (awaitAt > -1) {
  81878. this.unexpected(awaitAt);
  81879. }
  81880. } else {
  81881. node2.await = awaitAt > -1;
  81882. }
  81883. }
  81884. if (startsWithLet && isForOf) {
  81885. this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'.");
  81886. }
  81887. this.toAssignable(init, false, refDestructuringErrors);
  81888. this.checkLValPattern(init);
  81889. return this.parseForIn(node2, init);
  81890. } else {
  81891. this.checkExpressionErrors(refDestructuringErrors, true);
  81892. }
  81893. if (awaitAt > -1) {
  81894. this.unexpected(awaitAt);
  81895. }
  81896. return this.parseFor(node2, init);
  81897. };
  81898. pp$8.parseFunctionStatement = function(node2, isAsync, declarationPosition) {
  81899. this.next();
  81900. return this.parseFunction(node2, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);
  81901. };
  81902. pp$8.parseIfStatement = function(node2) {
  81903. this.next();
  81904. node2.test = this.parseParenExpression();
  81905. node2.consequent = this.parseStatement("if");
  81906. node2.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null;
  81907. return this.finishNode(node2, "IfStatement");
  81908. };
  81909. pp$8.parseReturnStatement = function(node2) {
  81910. if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
  81911. this.raise(this.start, "'return' outside of function");
  81912. }
  81913. this.next();
  81914. if (this.eat(types$1.semi) || this.insertSemicolon()) {
  81915. node2.argument = null;
  81916. } else {
  81917. node2.argument = this.parseExpression();
  81918. this.semicolon();
  81919. }
  81920. return this.finishNode(node2, "ReturnStatement");
  81921. };
  81922. pp$8.parseSwitchStatement = function(node2) {
  81923. this.next();
  81924. node2.discriminant = this.parseParenExpression();
  81925. node2.cases = [];
  81926. this.expect(types$1.braceL);
  81927. this.labels.push(switchLabel);
  81928. this.enterScope(0);
  81929. var cur;
  81930. for (var sawDefault = false; this.type !== types$1.braceR; ) {
  81931. if (this.type === types$1._case || this.type === types$1._default) {
  81932. var isCase = this.type === types$1._case;
  81933. if (cur) {
  81934. this.finishNode(cur, "SwitchCase");
  81935. }
  81936. node2.cases.push(cur = this.startNode());
  81937. cur.consequent = [];
  81938. this.next();
  81939. if (isCase) {
  81940. cur.test = this.parseExpression();
  81941. } else {
  81942. if (sawDefault) {
  81943. this.raiseRecoverable(this.lastTokStart, "Multiple default clauses");
  81944. }
  81945. sawDefault = true;
  81946. cur.test = null;
  81947. }
  81948. this.expect(types$1.colon);
  81949. } else {
  81950. if (!cur) {
  81951. this.unexpected();
  81952. }
  81953. cur.consequent.push(this.parseStatement(null));
  81954. }
  81955. }
  81956. this.exitScope();
  81957. if (cur) {
  81958. this.finishNode(cur, "SwitchCase");
  81959. }
  81960. this.next();
  81961. this.labels.pop();
  81962. return this.finishNode(node2, "SwitchStatement");
  81963. };
  81964. pp$8.parseThrowStatement = function(node2) {
  81965. this.next();
  81966. if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) {
  81967. this.raise(this.lastTokEnd, "Illegal newline after throw");
  81968. }
  81969. node2.argument = this.parseExpression();
  81970. this.semicolon();
  81971. return this.finishNode(node2, "ThrowStatement");
  81972. };
  81973. var empty$1 = [];
  81974. pp$8.parseTryStatement = function(node2) {
  81975. this.next();
  81976. node2.block = this.parseBlock();
  81977. node2.handler = null;
  81978. if (this.type === types$1._catch) {
  81979. var clause = this.startNode();
  81980. this.next();
  81981. if (this.eat(types$1.parenL)) {
  81982. clause.param = this.parseBindingAtom();
  81983. var simple = clause.param.type === "Identifier";
  81984. this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);
  81985. this.checkLValPattern(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);
  81986. this.expect(types$1.parenR);
  81987. } else {
  81988. if (this.options.ecmaVersion < 10) {
  81989. this.unexpected();
  81990. }
  81991. clause.param = null;
  81992. this.enterScope(0);
  81993. }
  81994. clause.body = this.parseBlock(false);
  81995. this.exitScope();
  81996. node2.handler = this.finishNode(clause, "CatchClause");
  81997. }
  81998. node2.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
  81999. if (!node2.handler && !node2.finalizer) {
  82000. this.raise(node2.start, "Missing catch or finally clause");
  82001. }
  82002. return this.finishNode(node2, "TryStatement");
  82003. };
  82004. pp$8.parseVarStatement = function(node2, kind) {
  82005. this.next();
  82006. this.parseVar(node2, false, kind);
  82007. this.semicolon();
  82008. return this.finishNode(node2, "VariableDeclaration");
  82009. };
  82010. pp$8.parseWhileStatement = function(node2) {
  82011. this.next();
  82012. node2.test = this.parseParenExpression();
  82013. this.labels.push(loopLabel);
  82014. node2.body = this.parseStatement("while");
  82015. this.labels.pop();
  82016. return this.finishNode(node2, "WhileStatement");
  82017. };
  82018. pp$8.parseWithStatement = function(node2) {
  82019. if (this.strict) {
  82020. this.raise(this.start, "'with' in strict mode");
  82021. }
  82022. this.next();
  82023. node2.object = this.parseParenExpression();
  82024. node2.body = this.parseStatement("with");
  82025. return this.finishNode(node2, "WithStatement");
  82026. };
  82027. pp$8.parseEmptyStatement = function(node2) {
  82028. this.next();
  82029. return this.finishNode(node2, "EmptyStatement");
  82030. };
  82031. pp$8.parseLabeledStatement = function(node2, maybeName, expr, context) {
  82032. for (var i$1 = 0, list3 = this.labels; i$1 < list3.length; i$1 += 1) {
  82033. var label = list3[i$1];
  82034. if (label.name === maybeName) {
  82035. this.raise(expr.start, "Label '" + maybeName + "' is already declared");
  82036. }
  82037. }
  82038. var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null;
  82039. for (var i = this.labels.length - 1; i >= 0; i--) {
  82040. var label$1 = this.labels[i];
  82041. if (label$1.statementStart === node2.start) {
  82042. label$1.statementStart = this.start;
  82043. label$1.kind = kind;
  82044. } else {
  82045. break;
  82046. }
  82047. }
  82048. this.labels.push({ name: maybeName, kind, statementStart: this.start });
  82049. node2.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  82050. this.labels.pop();
  82051. node2.label = expr;
  82052. return this.finishNode(node2, "LabeledStatement");
  82053. };
  82054. pp$8.parseExpressionStatement = function(node2, expr) {
  82055. node2.expression = expr;
  82056. this.semicolon();
  82057. return this.finishNode(node2, "ExpressionStatement");
  82058. };
  82059. pp$8.parseBlock = function(createNewLexicalScope, node2, exitStrict) {
  82060. if (createNewLexicalScope === void 0)
  82061. createNewLexicalScope = true;
  82062. if (node2 === void 0)
  82063. node2 = this.startNode();
  82064. node2.body = [];
  82065. this.expect(types$1.braceL);
  82066. if (createNewLexicalScope) {
  82067. this.enterScope(0);
  82068. }
  82069. while (this.type !== types$1.braceR) {
  82070. var stmt = this.parseStatement(null);
  82071. node2.body.push(stmt);
  82072. }
  82073. if (exitStrict) {
  82074. this.strict = false;
  82075. }
  82076. this.next();
  82077. if (createNewLexicalScope) {
  82078. this.exitScope();
  82079. }
  82080. return this.finishNode(node2, "BlockStatement");
  82081. };
  82082. pp$8.parseFor = function(node2, init) {
  82083. node2.init = init;
  82084. this.expect(types$1.semi);
  82085. node2.test = this.type === types$1.semi ? null : this.parseExpression();
  82086. this.expect(types$1.semi);
  82087. node2.update = this.type === types$1.parenR ? null : this.parseExpression();
  82088. this.expect(types$1.parenR);
  82089. node2.body = this.parseStatement("for");
  82090. this.exitScope();
  82091. this.labels.pop();
  82092. return this.finishNode(node2, "ForStatement");
  82093. };
  82094. pp$8.parseForIn = function(node2, init) {
  82095. var isForIn = this.type === types$1._in;
  82096. this.next();
  82097. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  82098. this.raise(
  82099. init.start,
  82100. (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
  82101. );
  82102. }
  82103. node2.left = init;
  82104. node2.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
  82105. this.expect(types$1.parenR);
  82106. node2.body = this.parseStatement("for");
  82107. this.exitScope();
  82108. this.labels.pop();
  82109. return this.finishNode(node2, isForIn ? "ForInStatement" : "ForOfStatement");
  82110. };
  82111. pp$8.parseVar = function(node2, isFor, kind) {
  82112. node2.declarations = [];
  82113. node2.kind = kind;
  82114. for (; ; ) {
  82115. var decl = this.startNode();
  82116. this.parseVarId(decl, kind);
  82117. if (this.eat(types$1.eq)) {
  82118. decl.init = this.parseMaybeAssign(isFor);
  82119. } else if (kind === "const" && !(this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
  82120. this.unexpected();
  82121. } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) {
  82122. this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
  82123. } else {
  82124. decl.init = null;
  82125. }
  82126. node2.declarations.push(this.finishNode(decl, "VariableDeclarator"));
  82127. if (!this.eat(types$1.comma)) {
  82128. break;
  82129. }
  82130. }
  82131. return node2;
  82132. };
  82133. pp$8.parseVarId = function(decl, kind) {
  82134. decl.id = this.parseBindingAtom();
  82135. this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
  82136. };
  82137. var FUNC_STATEMENT = 1;
  82138. var FUNC_HANGING_STATEMENT = 2;
  82139. var FUNC_NULLABLE_ID = 4;
  82140. pp$8.parseFunction = function(node2, statement, allowExpressionBody, isAsync, forInit) {
  82141. this.initFunction(node2);
  82142. if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
  82143. if (this.type === types$1.star && statement & FUNC_HANGING_STATEMENT) {
  82144. this.unexpected();
  82145. }
  82146. node2.generator = this.eat(types$1.star);
  82147. }
  82148. if (this.options.ecmaVersion >= 8) {
  82149. node2.async = !!isAsync;
  82150. }
  82151. if (statement & FUNC_STATEMENT) {
  82152. node2.id = statement & FUNC_NULLABLE_ID && this.type !== types$1.name ? null : this.parseIdent();
  82153. if (node2.id && !(statement & FUNC_HANGING_STATEMENT)) {
  82154. this.checkLValSimple(node2.id, this.strict || node2.generator || node2.async ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION);
  82155. }
  82156. }
  82157. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  82158. this.yieldPos = 0;
  82159. this.awaitPos = 0;
  82160. this.awaitIdentPos = 0;
  82161. this.enterScope(functionFlags(node2.async, node2.generator));
  82162. if (!(statement & FUNC_STATEMENT)) {
  82163. node2.id = this.type === types$1.name ? this.parseIdent() : null;
  82164. }
  82165. this.parseFunctionParams(node2);
  82166. this.parseFunctionBody(node2, allowExpressionBody, false, forInit);
  82167. this.yieldPos = oldYieldPos;
  82168. this.awaitPos = oldAwaitPos;
  82169. this.awaitIdentPos = oldAwaitIdentPos;
  82170. return this.finishNode(node2, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression");
  82171. };
  82172. pp$8.parseFunctionParams = function(node2) {
  82173. this.expect(types$1.parenL);
  82174. node2.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
  82175. this.checkYieldAwaitInDefaultParams();
  82176. };
  82177. pp$8.parseClass = function(node2, isStatement) {
  82178. this.next();
  82179. var oldStrict = this.strict;
  82180. this.strict = true;
  82181. this.parseClassId(node2, isStatement);
  82182. this.parseClassSuper(node2);
  82183. var privateNameMap = this.enterClassBody();
  82184. var classBody = this.startNode();
  82185. var hadConstructor = false;
  82186. classBody.body = [];
  82187. this.expect(types$1.braceL);
  82188. while (this.type !== types$1.braceR) {
  82189. var element2 = this.parseClassElement(node2.superClass !== null);
  82190. if (element2) {
  82191. classBody.body.push(element2);
  82192. if (element2.type === "MethodDefinition" && element2.kind === "constructor") {
  82193. if (hadConstructor) {
  82194. this.raise(element2.start, "Duplicate constructor in the same class");
  82195. }
  82196. hadConstructor = true;
  82197. } else if (element2.key && element2.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element2)) {
  82198. this.raiseRecoverable(element2.key.start, "Identifier '#" + element2.key.name + "' has already been declared");
  82199. }
  82200. }
  82201. }
  82202. this.strict = oldStrict;
  82203. this.next();
  82204. node2.body = this.finishNode(classBody, "ClassBody");
  82205. this.exitClassBody();
  82206. return this.finishNode(node2, isStatement ? "ClassDeclaration" : "ClassExpression");
  82207. };
  82208. pp$8.parseClassElement = function(constructorAllowsSuper) {
  82209. if (this.eat(types$1.semi)) {
  82210. return null;
  82211. }
  82212. var ecmaVersion = this.options.ecmaVersion;
  82213. var node2 = this.startNode();
  82214. var keyName = "";
  82215. var isGenerator = false;
  82216. var isAsync = false;
  82217. var kind = "method";
  82218. var isStatic = false;
  82219. if (this.eatContextual("static")) {
  82220. if (ecmaVersion >= 13 && this.eat(types$1.braceL)) {
  82221. this.parseClassStaticBlock(node2);
  82222. return node2;
  82223. }
  82224. if (this.isClassElementNameStart() || this.type === types$1.star) {
  82225. isStatic = true;
  82226. } else {
  82227. keyName = "static";
  82228. }
  82229. }
  82230. node2.static = isStatic;
  82231. if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) {
  82232. if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) {
  82233. isAsync = true;
  82234. } else {
  82235. keyName = "async";
  82236. }
  82237. }
  82238. if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) {
  82239. isGenerator = true;
  82240. }
  82241. if (!keyName && !isAsync && !isGenerator) {
  82242. var lastValue = this.value;
  82243. if (this.eatContextual("get") || this.eatContextual("set")) {
  82244. if (this.isClassElementNameStart()) {
  82245. kind = lastValue;
  82246. } else {
  82247. keyName = lastValue;
  82248. }
  82249. }
  82250. }
  82251. if (keyName) {
  82252. node2.computed = false;
  82253. node2.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);
  82254. node2.key.name = keyName;
  82255. this.finishNode(node2.key, "Identifier");
  82256. } else {
  82257. this.parseClassElementName(node2);
  82258. }
  82259. if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
  82260. var isConstructor = !node2.static && checkKeyName(node2, "constructor");
  82261. var allowsDirectSuper = isConstructor && constructorAllowsSuper;
  82262. if (isConstructor && kind !== "method") {
  82263. this.raise(node2.key.start, "Constructor can't have get/set modifier");
  82264. }
  82265. node2.kind = isConstructor ? "constructor" : kind;
  82266. this.parseClassMethod(node2, isGenerator, isAsync, allowsDirectSuper);
  82267. } else {
  82268. this.parseClassField(node2);
  82269. }
  82270. return node2;
  82271. };
  82272. pp$8.isClassElementNameStart = function() {
  82273. return this.type === types$1.name || this.type === types$1.privateId || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword;
  82274. };
  82275. pp$8.parseClassElementName = function(element2) {
  82276. if (this.type === types$1.privateId) {
  82277. if (this.value === "constructor") {
  82278. this.raise(this.start, "Classes can't have an element named '#constructor'");
  82279. }
  82280. element2.computed = false;
  82281. element2.key = this.parsePrivateIdent();
  82282. } else {
  82283. this.parsePropertyName(element2);
  82284. }
  82285. };
  82286. pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
  82287. var key2 = method.key;
  82288. if (method.kind === "constructor") {
  82289. if (isGenerator) {
  82290. this.raise(key2.start, "Constructor can't be a generator");
  82291. }
  82292. if (isAsync) {
  82293. this.raise(key2.start, "Constructor can't be an async method");
  82294. }
  82295. } else if (method.static && checkKeyName(method, "prototype")) {
  82296. this.raise(key2.start, "Classes may not have a static property named prototype");
  82297. }
  82298. var value2 = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
  82299. if (method.kind === "get" && value2.params.length !== 0) {
  82300. this.raiseRecoverable(value2.start, "getter should have no params");
  82301. }
  82302. if (method.kind === "set" && value2.params.length !== 1) {
  82303. this.raiseRecoverable(value2.start, "setter should have exactly one param");
  82304. }
  82305. if (method.kind === "set" && value2.params[0].type === "RestElement") {
  82306. this.raiseRecoverable(value2.params[0].start, "Setter cannot use rest params");
  82307. }
  82308. return this.finishNode(method, "MethodDefinition");
  82309. };
  82310. pp$8.parseClassField = function(field) {
  82311. if (checkKeyName(field, "constructor")) {
  82312. this.raise(field.key.start, "Classes can't have a field named 'constructor'");
  82313. } else if (field.static && checkKeyName(field, "prototype")) {
  82314. this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
  82315. }
  82316. if (this.eat(types$1.eq)) {
  82317. var scope = this.currentThisScope();
  82318. var inClassFieldInit = scope.inClassFieldInit;
  82319. scope.inClassFieldInit = true;
  82320. field.value = this.parseMaybeAssign();
  82321. scope.inClassFieldInit = inClassFieldInit;
  82322. } else {
  82323. field.value = null;
  82324. }
  82325. this.semicolon();
  82326. return this.finishNode(field, "PropertyDefinition");
  82327. };
  82328. pp$8.parseClassStaticBlock = function(node2) {
  82329. node2.body = [];
  82330. var oldLabels = this.labels;
  82331. this.labels = [];
  82332. this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER);
  82333. while (this.type !== types$1.braceR) {
  82334. var stmt = this.parseStatement(null);
  82335. node2.body.push(stmt);
  82336. }
  82337. this.next();
  82338. this.exitScope();
  82339. this.labels = oldLabels;
  82340. return this.finishNode(node2, "StaticBlock");
  82341. };
  82342. pp$8.parseClassId = function(node2, isStatement) {
  82343. if (this.type === types$1.name) {
  82344. node2.id = this.parseIdent();
  82345. if (isStatement) {
  82346. this.checkLValSimple(node2.id, BIND_LEXICAL, false);
  82347. }
  82348. } else {
  82349. if (isStatement === true) {
  82350. this.unexpected();
  82351. }
  82352. node2.id = null;
  82353. }
  82354. };
  82355. pp$8.parseClassSuper = function(node2) {
  82356. node2.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null;
  82357. };
  82358. pp$8.enterClassBody = function() {
  82359. var element2 = { declared: /* @__PURE__ */ Object.create(null), used: [] };
  82360. this.privateNameStack.push(element2);
  82361. return element2.declared;
  82362. };
  82363. pp$8.exitClassBody = function() {
  82364. var ref3 = this.privateNameStack.pop();
  82365. var declared = ref3.declared;
  82366. var used = ref3.used;
  82367. var len = this.privateNameStack.length;
  82368. var parent = len === 0 ? null : this.privateNameStack[len - 1];
  82369. for (var i = 0; i < used.length; ++i) {
  82370. var id = used[i];
  82371. if (!hasOwn(declared, id.name)) {
  82372. if (parent) {
  82373. parent.used.push(id);
  82374. } else {
  82375. this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class");
  82376. }
  82377. }
  82378. }
  82379. };
  82380. function isPrivateNameConflicted(privateNameMap, element2) {
  82381. var name2 = element2.key.name;
  82382. var curr = privateNameMap[name2];
  82383. var next = "true";
  82384. if (element2.type === "MethodDefinition" && (element2.kind === "get" || element2.kind === "set")) {
  82385. next = (element2.static ? "s" : "i") + element2.kind;
  82386. }
  82387. if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") {
  82388. privateNameMap[name2] = "true";
  82389. return false;
  82390. } else if (!curr) {
  82391. privateNameMap[name2] = next;
  82392. return false;
  82393. } else {
  82394. return true;
  82395. }
  82396. }
  82397. function checkKeyName(node2, name2) {
  82398. var computed = node2.computed;
  82399. var key2 = node2.key;
  82400. return !computed && (key2.type === "Identifier" && key2.name === name2 || key2.type === "Literal" && key2.value === name2);
  82401. }
  82402. pp$8.parseExport = function(node2, exports) {
  82403. this.next();
  82404. if (this.eat(types$1.star)) {
  82405. if (this.options.ecmaVersion >= 11) {
  82406. if (this.eatContextual("as")) {
  82407. node2.exported = this.parseModuleExportName();
  82408. this.checkExport(exports, node2.exported, this.lastTokStart);
  82409. } else {
  82410. node2.exported = null;
  82411. }
  82412. }
  82413. this.expectContextual("from");
  82414. if (this.type !== types$1.string) {
  82415. this.unexpected();
  82416. }
  82417. node2.source = this.parseExprAtom();
  82418. this.semicolon();
  82419. return this.finishNode(node2, "ExportAllDeclaration");
  82420. }
  82421. if (this.eat(types$1._default)) {
  82422. this.checkExport(exports, "default", this.lastTokStart);
  82423. var isAsync;
  82424. if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) {
  82425. var fNode = this.startNode();
  82426. this.next();
  82427. if (isAsync) {
  82428. this.next();
  82429. }
  82430. node2.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync);
  82431. } else if (this.type === types$1._class) {
  82432. var cNode = this.startNode();
  82433. node2.declaration = this.parseClass(cNode, "nullableID");
  82434. } else {
  82435. node2.declaration = this.parseMaybeAssign();
  82436. this.semicolon();
  82437. }
  82438. return this.finishNode(node2, "ExportDefaultDeclaration");
  82439. }
  82440. if (this.shouldParseExportStatement()) {
  82441. node2.declaration = this.parseStatement(null);
  82442. if (node2.declaration.type === "VariableDeclaration") {
  82443. this.checkVariableExport(exports, node2.declaration.declarations);
  82444. } else {
  82445. this.checkExport(exports, node2.declaration.id, node2.declaration.id.start);
  82446. }
  82447. node2.specifiers = [];
  82448. node2.source = null;
  82449. } else {
  82450. node2.declaration = null;
  82451. node2.specifiers = this.parseExportSpecifiers(exports);
  82452. if (this.eatContextual("from")) {
  82453. if (this.type !== types$1.string) {
  82454. this.unexpected();
  82455. }
  82456. node2.source = this.parseExprAtom();
  82457. } else {
  82458. for (var i = 0, list3 = node2.specifiers; i < list3.length; i += 1) {
  82459. var spec = list3[i];
  82460. this.checkUnreserved(spec.local);
  82461. this.checkLocalExport(spec.local);
  82462. if (spec.local.type === "Literal") {
  82463. this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
  82464. }
  82465. }
  82466. node2.source = null;
  82467. }
  82468. this.semicolon();
  82469. }
  82470. return this.finishNode(node2, "ExportNamedDeclaration");
  82471. };
  82472. pp$8.checkExport = function(exports, name2, pos2) {
  82473. if (!exports) {
  82474. return;
  82475. }
  82476. if (typeof name2 !== "string") {
  82477. name2 = name2.type === "Identifier" ? name2.name : name2.value;
  82478. }
  82479. if (hasOwn(exports, name2)) {
  82480. this.raiseRecoverable(pos2, "Duplicate export '" + name2 + "'");
  82481. }
  82482. exports[name2] = true;
  82483. };
  82484. pp$8.checkPatternExport = function(exports, pat) {
  82485. var type = pat.type;
  82486. if (type === "Identifier") {
  82487. this.checkExport(exports, pat, pat.start);
  82488. } else if (type === "ObjectPattern") {
  82489. for (var i = 0, list3 = pat.properties; i < list3.length; i += 1) {
  82490. var prop = list3[i];
  82491. this.checkPatternExport(exports, prop);
  82492. }
  82493. } else if (type === "ArrayPattern") {
  82494. for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
  82495. var elt = list$1[i$1];
  82496. if (elt) {
  82497. this.checkPatternExport(exports, elt);
  82498. }
  82499. }
  82500. } else if (type === "Property") {
  82501. this.checkPatternExport(exports, pat.value);
  82502. } else if (type === "AssignmentPattern") {
  82503. this.checkPatternExport(exports, pat.left);
  82504. } else if (type === "RestElement") {
  82505. this.checkPatternExport(exports, pat.argument);
  82506. } else if (type === "ParenthesizedExpression") {
  82507. this.checkPatternExport(exports, pat.expression);
  82508. }
  82509. };
  82510. pp$8.checkVariableExport = function(exports, decls) {
  82511. if (!exports) {
  82512. return;
  82513. }
  82514. for (var i = 0, list3 = decls; i < list3.length; i += 1) {
  82515. var decl = list3[i];
  82516. this.checkPatternExport(exports, decl.id);
  82517. }
  82518. };
  82519. pp$8.shouldParseExportStatement = function() {
  82520. return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
  82521. };
  82522. pp$8.parseExportSpecifiers = function(exports) {
  82523. var nodes = [], first = true;
  82524. this.expect(types$1.braceL);
  82525. while (!this.eat(types$1.braceR)) {
  82526. if (!first) {
  82527. this.expect(types$1.comma);
  82528. if (this.afterTrailingComma(types$1.braceR)) {
  82529. break;
  82530. }
  82531. } else {
  82532. first = false;
  82533. }
  82534. var node2 = this.startNode();
  82535. node2.local = this.parseModuleExportName();
  82536. node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local;
  82537. this.checkExport(
  82538. exports,
  82539. node2.exported,
  82540. node2.exported.start
  82541. );
  82542. nodes.push(this.finishNode(node2, "ExportSpecifier"));
  82543. }
  82544. return nodes;
  82545. };
  82546. pp$8.parseImport = function(node2) {
  82547. this.next();
  82548. if (this.type === types$1.string) {
  82549. node2.specifiers = empty$1;
  82550. node2.source = this.parseExprAtom();
  82551. } else {
  82552. node2.specifiers = this.parseImportSpecifiers();
  82553. this.expectContextual("from");
  82554. node2.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected();
  82555. }
  82556. this.semicolon();
  82557. return this.finishNode(node2, "ImportDeclaration");
  82558. };
  82559. pp$8.parseImportSpecifiers = function() {
  82560. var nodes = [], first = true;
  82561. if (this.type === types$1.name) {
  82562. var node2 = this.startNode();
  82563. node2.local = this.parseIdent();
  82564. this.checkLValSimple(node2.local, BIND_LEXICAL);
  82565. nodes.push(this.finishNode(node2, "ImportDefaultSpecifier"));
  82566. if (!this.eat(types$1.comma)) {
  82567. return nodes;
  82568. }
  82569. }
  82570. if (this.type === types$1.star) {
  82571. var node$1 = this.startNode();
  82572. this.next();
  82573. this.expectContextual("as");
  82574. node$1.local = this.parseIdent();
  82575. this.checkLValSimple(node$1.local, BIND_LEXICAL);
  82576. nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
  82577. return nodes;
  82578. }
  82579. this.expect(types$1.braceL);
  82580. while (!this.eat(types$1.braceR)) {
  82581. if (!first) {
  82582. this.expect(types$1.comma);
  82583. if (this.afterTrailingComma(types$1.braceR)) {
  82584. break;
  82585. }
  82586. } else {
  82587. first = false;
  82588. }
  82589. var node$2 = this.startNode();
  82590. node$2.imported = this.parseModuleExportName();
  82591. if (this.eatContextual("as")) {
  82592. node$2.local = this.parseIdent();
  82593. } else {
  82594. this.checkUnreserved(node$2.imported);
  82595. node$2.local = node$2.imported;
  82596. }
  82597. this.checkLValSimple(node$2.local, BIND_LEXICAL);
  82598. nodes.push(this.finishNode(node$2, "ImportSpecifier"));
  82599. }
  82600. return nodes;
  82601. };
  82602. pp$8.parseModuleExportName = function() {
  82603. if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {
  82604. var stringLiteral2 = this.parseLiteral(this.value);
  82605. if (loneSurrogate.test(stringLiteral2.value)) {
  82606. this.raise(stringLiteral2.start, "An export name cannot include a lone surrogate.");
  82607. }
  82608. return stringLiteral2;
  82609. }
  82610. return this.parseIdent(true);
  82611. };
  82612. pp$8.adaptDirectivePrologue = function(statements) {
  82613. for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
  82614. statements[i].directive = statements[i].expression.raw.slice(1, -1);
  82615. }
  82616. };
  82617. pp$8.isDirectiveCandidate = function(statement) {
  82618. return this.options.ecmaVersion >= 5 && statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && // Reject parenthesized strings.
  82619. (this.input[statement.start] === '"' || this.input[statement.start] === "'");
  82620. };
  82621. var pp$7 = Parser.prototype;
  82622. pp$7.toAssignable = function(node2, isBinding, refDestructuringErrors) {
  82623. if (this.options.ecmaVersion >= 6 && node2) {
  82624. switch (node2.type) {
  82625. case "Identifier":
  82626. if (this.inAsync && node2.name === "await") {
  82627. this.raise(node2.start, "Cannot use 'await' as identifier inside an async function");
  82628. }
  82629. break;
  82630. case "ObjectPattern":
  82631. case "ArrayPattern":
  82632. case "AssignmentPattern":
  82633. case "RestElement":
  82634. break;
  82635. case "ObjectExpression":
  82636. node2.type = "ObjectPattern";
  82637. if (refDestructuringErrors) {
  82638. this.checkPatternErrors(refDestructuringErrors, true);
  82639. }
  82640. for (var i = 0, list3 = node2.properties; i < list3.length; i += 1) {
  82641. var prop = list3[i];
  82642. this.toAssignable(prop, isBinding);
  82643. if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
  82644. this.raise(prop.argument.start, "Unexpected token");
  82645. }
  82646. }
  82647. break;
  82648. case "Property":
  82649. if (node2.kind !== "init") {
  82650. this.raise(node2.key.start, "Object pattern can't contain getter or setter");
  82651. }
  82652. this.toAssignable(node2.value, isBinding);
  82653. break;
  82654. case "ArrayExpression":
  82655. node2.type = "ArrayPattern";
  82656. if (refDestructuringErrors) {
  82657. this.checkPatternErrors(refDestructuringErrors, true);
  82658. }
  82659. this.toAssignableList(node2.elements, isBinding);
  82660. break;
  82661. case "SpreadElement":
  82662. node2.type = "RestElement";
  82663. this.toAssignable(node2.argument, isBinding);
  82664. if (node2.argument.type === "AssignmentPattern") {
  82665. this.raise(node2.argument.start, "Rest elements cannot have a default value");
  82666. }
  82667. break;
  82668. case "AssignmentExpression":
  82669. if (node2.operator !== "=") {
  82670. this.raise(node2.left.end, "Only '=' operator can be used for specifying default value.");
  82671. }
  82672. node2.type = "AssignmentPattern";
  82673. delete node2.operator;
  82674. this.toAssignable(node2.left, isBinding);
  82675. break;
  82676. case "ParenthesizedExpression":
  82677. this.toAssignable(node2.expression, isBinding, refDestructuringErrors);
  82678. break;
  82679. case "ChainExpression":
  82680. this.raiseRecoverable(node2.start, "Optional chaining cannot appear in left-hand side");
  82681. break;
  82682. case "MemberExpression":
  82683. if (!isBinding) {
  82684. break;
  82685. }
  82686. default:
  82687. this.raise(node2.start, "Assigning to rvalue");
  82688. }
  82689. } else if (refDestructuringErrors) {
  82690. this.checkPatternErrors(refDestructuringErrors, true);
  82691. }
  82692. return node2;
  82693. };
  82694. pp$7.toAssignableList = function(exprList, isBinding) {
  82695. var end = exprList.length;
  82696. for (var i = 0; i < end; i++) {
  82697. var elt = exprList[i];
  82698. if (elt) {
  82699. this.toAssignable(elt, isBinding);
  82700. }
  82701. }
  82702. if (end) {
  82703. var last = exprList[end - 1];
  82704. if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") {
  82705. this.unexpected(last.argument.start);
  82706. }
  82707. }
  82708. return exprList;
  82709. };
  82710. pp$7.parseSpread = function(refDestructuringErrors) {
  82711. var node2 = this.startNode();
  82712. this.next();
  82713. node2.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  82714. return this.finishNode(node2, "SpreadElement");
  82715. };
  82716. pp$7.parseRestBinding = function() {
  82717. var node2 = this.startNode();
  82718. this.next();
  82719. if (this.options.ecmaVersion === 6 && this.type !== types$1.name) {
  82720. this.unexpected();
  82721. }
  82722. node2.argument = this.parseBindingAtom();
  82723. return this.finishNode(node2, "RestElement");
  82724. };
  82725. pp$7.parseBindingAtom = function() {
  82726. if (this.options.ecmaVersion >= 6) {
  82727. switch (this.type) {
  82728. case types$1.bracketL:
  82729. var node2 = this.startNode();
  82730. this.next();
  82731. node2.elements = this.parseBindingList(types$1.bracketR, true, true);
  82732. return this.finishNode(node2, "ArrayPattern");
  82733. case types$1.braceL:
  82734. return this.parseObj(true);
  82735. }
  82736. }
  82737. return this.parseIdent();
  82738. };
  82739. pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
  82740. var elts = [], first = true;
  82741. while (!this.eat(close)) {
  82742. if (first) {
  82743. first = false;
  82744. } else {
  82745. this.expect(types$1.comma);
  82746. }
  82747. if (allowEmpty && this.type === types$1.comma) {
  82748. elts.push(null);
  82749. } else if (allowTrailingComma && this.afterTrailingComma(close)) {
  82750. break;
  82751. } else if (this.type === types$1.ellipsis) {
  82752. var rest = this.parseRestBinding();
  82753. this.parseBindingListItem(rest);
  82754. elts.push(rest);
  82755. if (this.type === types$1.comma) {
  82756. this.raise(this.start, "Comma is not permitted after the rest element");
  82757. }
  82758. this.expect(close);
  82759. break;
  82760. } else {
  82761. var elem = this.parseMaybeDefault(this.start, this.startLoc);
  82762. this.parseBindingListItem(elem);
  82763. elts.push(elem);
  82764. }
  82765. }
  82766. return elts;
  82767. };
  82768. pp$7.parseBindingListItem = function(param) {
  82769. return param;
  82770. };
  82771. pp$7.parseMaybeDefault = function(startPos, startLoc, left) {
  82772. left = left || this.parseBindingAtom();
  82773. if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) {
  82774. return left;
  82775. }
  82776. var node2 = this.startNodeAt(startPos, startLoc);
  82777. node2.left = left;
  82778. node2.right = this.parseMaybeAssign();
  82779. return this.finishNode(node2, "AssignmentPattern");
  82780. };
  82781. pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
  82782. if (bindingType === void 0)
  82783. bindingType = BIND_NONE;
  82784. var isBind = bindingType !== BIND_NONE;
  82785. switch (expr.type) {
  82786. case "Identifier":
  82787. if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {
  82788. this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
  82789. }
  82790. if (isBind) {
  82791. if (bindingType === BIND_LEXICAL && expr.name === "let") {
  82792. this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name");
  82793. }
  82794. if (checkClashes) {
  82795. if (hasOwn(checkClashes, expr.name)) {
  82796. this.raiseRecoverable(expr.start, "Argument name clash");
  82797. }
  82798. checkClashes[expr.name] = true;
  82799. }
  82800. if (bindingType !== BIND_OUTSIDE) {
  82801. this.declareName(expr.name, bindingType, expr.start);
  82802. }
  82803. }
  82804. break;
  82805. case "ChainExpression":
  82806. this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
  82807. break;
  82808. case "MemberExpression":
  82809. if (isBind) {
  82810. this.raiseRecoverable(expr.start, "Binding member expression");
  82811. }
  82812. break;
  82813. case "ParenthesizedExpression":
  82814. if (isBind) {
  82815. this.raiseRecoverable(expr.start, "Binding parenthesized expression");
  82816. }
  82817. return this.checkLValSimple(expr.expression, bindingType, checkClashes);
  82818. default:
  82819. this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
  82820. }
  82821. };
  82822. pp$7.checkLValPattern = function(expr, bindingType, checkClashes) {
  82823. if (bindingType === void 0)
  82824. bindingType = BIND_NONE;
  82825. switch (expr.type) {
  82826. case "ObjectPattern":
  82827. for (var i = 0, list3 = expr.properties; i < list3.length; i += 1) {
  82828. var prop = list3[i];
  82829. this.checkLValInnerPattern(prop, bindingType, checkClashes);
  82830. }
  82831. break;
  82832. case "ArrayPattern":
  82833. for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
  82834. var elem = list$1[i$1];
  82835. if (elem) {
  82836. this.checkLValInnerPattern(elem, bindingType, checkClashes);
  82837. }
  82838. }
  82839. break;
  82840. default:
  82841. this.checkLValSimple(expr, bindingType, checkClashes);
  82842. }
  82843. };
  82844. pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
  82845. if (bindingType === void 0)
  82846. bindingType = BIND_NONE;
  82847. switch (expr.type) {
  82848. case "Property":
  82849. this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
  82850. break;
  82851. case "AssignmentPattern":
  82852. this.checkLValPattern(expr.left, bindingType, checkClashes);
  82853. break;
  82854. case "RestElement":
  82855. this.checkLValPattern(expr.argument, bindingType, checkClashes);
  82856. break;
  82857. default:
  82858. this.checkLValPattern(expr, bindingType, checkClashes);
  82859. }
  82860. };
  82861. var TokContext = function TokContext2(token2, isExpr, preserveSpace, override, generator) {
  82862. this.token = token2;
  82863. this.isExpr = !!isExpr;
  82864. this.preserveSpace = !!preserveSpace;
  82865. this.override = override;
  82866. this.generator = !!generator;
  82867. };
  82868. var types = {
  82869. b_stat: new TokContext("{", false),
  82870. b_expr: new TokContext("{", true),
  82871. b_tmpl: new TokContext("${", false),
  82872. p_stat: new TokContext("(", false),
  82873. p_expr: new TokContext("(", true),
  82874. q_tmpl: new TokContext("`", true, true, function(p) {
  82875. return p.tryReadTemplateToken();
  82876. }),
  82877. f_stat: new TokContext("function", false),
  82878. f_expr: new TokContext("function", true),
  82879. f_expr_gen: new TokContext("function", true, false, null, true),
  82880. f_gen: new TokContext("function", false, false, null, true)
  82881. };
  82882. var pp$6 = Parser.prototype;
  82883. pp$6.initialContext = function() {
  82884. return [types.b_stat];
  82885. };
  82886. pp$6.curContext = function() {
  82887. return this.context[this.context.length - 1];
  82888. };
  82889. pp$6.braceIsBlock = function(prevType) {
  82890. var parent = this.curContext();
  82891. if (parent === types.f_expr || parent === types.f_stat) {
  82892. return true;
  82893. }
  82894. if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) {
  82895. return !parent.isExpr;
  82896. }
  82897. if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) {
  82898. return lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
  82899. }
  82900. if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) {
  82901. return true;
  82902. }
  82903. if (prevType === types$1.braceL) {
  82904. return parent === types.b_stat;
  82905. }
  82906. if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) {
  82907. return false;
  82908. }
  82909. return !this.exprAllowed;
  82910. };
  82911. pp$6.inGeneratorContext = function() {
  82912. for (var i = this.context.length - 1; i >= 1; i--) {
  82913. var context = this.context[i];
  82914. if (context.token === "function") {
  82915. return context.generator;
  82916. }
  82917. }
  82918. return false;
  82919. };
  82920. pp$6.updateContext = function(prevType) {
  82921. var update, type = this.type;
  82922. if (type.keyword && prevType === types$1.dot) {
  82923. this.exprAllowed = false;
  82924. } else if (update = type.updateContext) {
  82925. update.call(this, prevType);
  82926. } else {
  82927. this.exprAllowed = type.beforeExpr;
  82928. }
  82929. };
  82930. pp$6.overrideContext = function(tokenCtx) {
  82931. if (this.curContext() !== tokenCtx) {
  82932. this.context[this.context.length - 1] = tokenCtx;
  82933. }
  82934. };
  82935. types$1.parenR.updateContext = types$1.braceR.updateContext = function() {
  82936. if (this.context.length === 1) {
  82937. this.exprAllowed = true;
  82938. return;
  82939. }
  82940. var out = this.context.pop();
  82941. if (out === types.b_stat && this.curContext().token === "function") {
  82942. out = this.context.pop();
  82943. }
  82944. this.exprAllowed = !out.isExpr;
  82945. };
  82946. types$1.braceL.updateContext = function(prevType) {
  82947. this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
  82948. this.exprAllowed = true;
  82949. };
  82950. types$1.dollarBraceL.updateContext = function() {
  82951. this.context.push(types.b_tmpl);
  82952. this.exprAllowed = true;
  82953. };
  82954. types$1.parenL.updateContext = function(prevType) {
  82955. var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while;
  82956. this.context.push(statementParens ? types.p_stat : types.p_expr);
  82957. this.exprAllowed = true;
  82958. };
  82959. types$1.incDec.updateContext = function() {
  82960. };
  82961. types$1._function.updateContext = types$1._class.updateContext = function(prevType) {
  82962. if (prevType.beforeExpr && prevType !== types$1._else && !(prevType === types$1.semi && this.curContext() !== types.p_stat) && !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) {
  82963. this.context.push(types.f_expr);
  82964. } else {
  82965. this.context.push(types.f_stat);
  82966. }
  82967. this.exprAllowed = false;
  82968. };
  82969. types$1.backQuote.updateContext = function() {
  82970. if (this.curContext() === types.q_tmpl) {
  82971. this.context.pop();
  82972. } else {
  82973. this.context.push(types.q_tmpl);
  82974. }
  82975. this.exprAllowed = false;
  82976. };
  82977. types$1.star.updateContext = function(prevType) {
  82978. if (prevType === types$1._function) {
  82979. var index2 = this.context.length - 1;
  82980. if (this.context[index2] === types.f_expr) {
  82981. this.context[index2] = types.f_expr_gen;
  82982. } else {
  82983. this.context[index2] = types.f_gen;
  82984. }
  82985. }
  82986. this.exprAllowed = true;
  82987. };
  82988. types$1.name.updateContext = function(prevType) {
  82989. var allowed = false;
  82990. if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) {
  82991. if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) {
  82992. allowed = true;
  82993. }
  82994. }
  82995. this.exprAllowed = allowed;
  82996. };
  82997. var pp$5 = Parser.prototype;
  82998. pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
  82999. if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") {
  83000. return;
  83001. }
  83002. if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {
  83003. return;
  83004. }
  83005. var key2 = prop.key;
  83006. var name2;
  83007. switch (key2.type) {
  83008. case "Identifier":
  83009. name2 = key2.name;
  83010. break;
  83011. case "Literal":
  83012. name2 = String(key2.value);
  83013. break;
  83014. default:
  83015. return;
  83016. }
  83017. var kind = prop.kind;
  83018. if (this.options.ecmaVersion >= 6) {
  83019. if (name2 === "__proto__" && kind === "init") {
  83020. if (propHash.proto) {
  83021. if (refDestructuringErrors) {
  83022. if (refDestructuringErrors.doubleProto < 0) {
  83023. refDestructuringErrors.doubleProto = key2.start;
  83024. }
  83025. } else {
  83026. this.raiseRecoverable(key2.start, "Redefinition of __proto__ property");
  83027. }
  83028. }
  83029. propHash.proto = true;
  83030. }
  83031. return;
  83032. }
  83033. name2 = "$" + name2;
  83034. var other = propHash[name2];
  83035. if (other) {
  83036. var redefinition;
  83037. if (kind === "init") {
  83038. redefinition = this.strict && other.init || other.get || other.set;
  83039. } else {
  83040. redefinition = other.init || other[kind];
  83041. }
  83042. if (redefinition) {
  83043. this.raiseRecoverable(key2.start, "Redefinition of property");
  83044. }
  83045. } else {
  83046. other = propHash[name2] = {
  83047. init: false,
  83048. get: false,
  83049. set: false
  83050. };
  83051. }
  83052. other[kind] = true;
  83053. };
  83054. pp$5.parseExpression = function(forInit, refDestructuringErrors) {
  83055. var startPos = this.start, startLoc = this.startLoc;
  83056. var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
  83057. if (this.type === types$1.comma) {
  83058. var node2 = this.startNodeAt(startPos, startLoc);
  83059. node2.expressions = [expr];
  83060. while (this.eat(types$1.comma)) {
  83061. node2.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
  83062. }
  83063. return this.finishNode(node2, "SequenceExpression");
  83064. }
  83065. return expr;
  83066. };
  83067. pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
  83068. if (this.isContextual("yield")) {
  83069. if (this.inGenerator) {
  83070. return this.parseYield(forInit);
  83071. } else {
  83072. this.exprAllowed = false;
  83073. }
  83074. }
  83075. var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
  83076. if (refDestructuringErrors) {
  83077. oldParenAssign = refDestructuringErrors.parenthesizedAssign;
  83078. oldTrailingComma = refDestructuringErrors.trailingComma;
  83079. oldDoubleProto = refDestructuringErrors.doubleProto;
  83080. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
  83081. } else {
  83082. refDestructuringErrors = new DestructuringErrors();
  83083. ownDestructuringErrors = true;
  83084. }
  83085. var startPos = this.start, startLoc = this.startLoc;
  83086. if (this.type === types$1.parenL || this.type === types$1.name) {
  83087. this.potentialArrowAt = this.start;
  83088. this.potentialArrowInForAwait = forInit === "await";
  83089. }
  83090. var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
  83091. if (afterLeftParse) {
  83092. left = afterLeftParse.call(this, left, startPos, startLoc);
  83093. }
  83094. if (this.type.isAssign) {
  83095. var node2 = this.startNodeAt(startPos, startLoc);
  83096. node2.operator = this.value;
  83097. if (this.type === types$1.eq) {
  83098. left = this.toAssignable(left, false, refDestructuringErrors);
  83099. }
  83100. if (!ownDestructuringErrors) {
  83101. refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
  83102. }
  83103. if (refDestructuringErrors.shorthandAssign >= left.start) {
  83104. refDestructuringErrors.shorthandAssign = -1;
  83105. }
  83106. if (this.type === types$1.eq) {
  83107. this.checkLValPattern(left);
  83108. } else {
  83109. this.checkLValSimple(left);
  83110. }
  83111. node2.left = left;
  83112. this.next();
  83113. node2.right = this.parseMaybeAssign(forInit);
  83114. if (oldDoubleProto > -1) {
  83115. refDestructuringErrors.doubleProto = oldDoubleProto;
  83116. }
  83117. return this.finishNode(node2, "AssignmentExpression");
  83118. } else {
  83119. if (ownDestructuringErrors) {
  83120. this.checkExpressionErrors(refDestructuringErrors, true);
  83121. }
  83122. }
  83123. if (oldParenAssign > -1) {
  83124. refDestructuringErrors.parenthesizedAssign = oldParenAssign;
  83125. }
  83126. if (oldTrailingComma > -1) {
  83127. refDestructuringErrors.trailingComma = oldTrailingComma;
  83128. }
  83129. return left;
  83130. };
  83131. pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
  83132. var startPos = this.start, startLoc = this.startLoc;
  83133. var expr = this.parseExprOps(forInit, refDestructuringErrors);
  83134. if (this.checkExpressionErrors(refDestructuringErrors)) {
  83135. return expr;
  83136. }
  83137. if (this.eat(types$1.question)) {
  83138. var node2 = this.startNodeAt(startPos, startLoc);
  83139. node2.test = expr;
  83140. node2.consequent = this.parseMaybeAssign();
  83141. this.expect(types$1.colon);
  83142. node2.alternate = this.parseMaybeAssign(forInit);
  83143. return this.finishNode(node2, "ConditionalExpression");
  83144. }
  83145. return expr;
  83146. };
  83147. pp$5.parseExprOps = function(forInit, refDestructuringErrors) {
  83148. var startPos = this.start, startLoc = this.startLoc;
  83149. var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit);
  83150. if (this.checkExpressionErrors(refDestructuringErrors)) {
  83151. return expr;
  83152. }
  83153. return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit);
  83154. };
  83155. pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
  83156. var prec = this.type.binop;
  83157. if (prec != null && (!forInit || this.type !== types$1._in)) {
  83158. if (prec > minPrec) {
  83159. var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND;
  83160. var coalesce = this.type === types$1.coalesce;
  83161. if (coalesce) {
  83162. prec = types$1.logicalAND.binop;
  83163. }
  83164. var op = this.value;
  83165. this.next();
  83166. var startPos = this.start, startLoc = this.startLoc;
  83167. var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);
  83168. var node2 = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
  83169. if (logical && this.type === types$1.coalesce || coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND)) {
  83170. this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
  83171. }
  83172. return this.parseExprOp(node2, leftStartPos, leftStartLoc, minPrec, forInit);
  83173. }
  83174. }
  83175. return left;
  83176. };
  83177. pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) {
  83178. if (right.type === "PrivateIdentifier") {
  83179. this.raise(right.start, "Private identifier can only be left side of binary expression");
  83180. }
  83181. var node2 = this.startNodeAt(startPos, startLoc);
  83182. node2.left = left;
  83183. node2.operator = op;
  83184. node2.right = right;
  83185. return this.finishNode(node2, logical ? "LogicalExpression" : "BinaryExpression");
  83186. };
  83187. pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
  83188. var startPos = this.start, startLoc = this.startLoc, expr;
  83189. if (this.isContextual("await") && this.canAwait) {
  83190. expr = this.parseAwait(forInit);
  83191. sawUnary = true;
  83192. } else if (this.type.prefix) {
  83193. var node2 = this.startNode(), update = this.type === types$1.incDec;
  83194. node2.operator = this.value;
  83195. node2.prefix = true;
  83196. this.next();
  83197. node2.argument = this.parseMaybeUnary(null, true, update, forInit);
  83198. this.checkExpressionErrors(refDestructuringErrors, true);
  83199. if (update) {
  83200. this.checkLValSimple(node2.argument);
  83201. } else if (this.strict && node2.operator === "delete" && node2.argument.type === "Identifier") {
  83202. this.raiseRecoverable(node2.start, "Deleting local variable in strict mode");
  83203. } else if (node2.operator === "delete" && isPrivateFieldAccess(node2.argument)) {
  83204. this.raiseRecoverable(node2.start, "Private fields can not be deleted");
  83205. } else {
  83206. sawUnary = true;
  83207. }
  83208. expr = this.finishNode(node2, update ? "UpdateExpression" : "UnaryExpression");
  83209. } else if (!sawUnary && this.type === types$1.privateId) {
  83210. if (forInit || this.privateNameStack.length === 0) {
  83211. this.unexpected();
  83212. }
  83213. expr = this.parsePrivateIdent();
  83214. if (this.type !== types$1._in) {
  83215. this.unexpected();
  83216. }
  83217. } else {
  83218. expr = this.parseExprSubscripts(refDestructuringErrors, forInit);
  83219. if (this.checkExpressionErrors(refDestructuringErrors)) {
  83220. return expr;
  83221. }
  83222. while (this.type.postfix && !this.canInsertSemicolon()) {
  83223. var node$1 = this.startNodeAt(startPos, startLoc);
  83224. node$1.operator = this.value;
  83225. node$1.prefix = false;
  83226. node$1.argument = expr;
  83227. this.checkLValSimple(expr);
  83228. this.next();
  83229. expr = this.finishNode(node$1, "UpdateExpression");
  83230. }
  83231. }
  83232. if (!incDec && this.eat(types$1.starstar)) {
  83233. if (sawUnary) {
  83234. this.unexpected(this.lastTokStart);
  83235. } else {
  83236. return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false);
  83237. }
  83238. } else {
  83239. return expr;
  83240. }
  83241. };
  83242. function isPrivateFieldAccess(node2) {
  83243. return node2.type === "MemberExpression" && node2.property.type === "PrivateIdentifier" || node2.type === "ChainExpression" && isPrivateFieldAccess(node2.expression);
  83244. }
  83245. pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
  83246. var startPos = this.start, startLoc = this.startLoc;
  83247. var expr = this.parseExprAtom(refDestructuringErrors, forInit);
  83248. if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
  83249. return expr;
  83250. }
  83251. var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
  83252. if (refDestructuringErrors && result.type === "MemberExpression") {
  83253. if (refDestructuringErrors.parenthesizedAssign >= result.start) {
  83254. refDestructuringErrors.parenthesizedAssign = -1;
  83255. }
  83256. if (refDestructuringErrors.parenthesizedBind >= result.start) {
  83257. refDestructuringErrors.parenthesizedBind = -1;
  83258. }
  83259. if (refDestructuringErrors.trailingComma >= result.start) {
  83260. refDestructuringErrors.trailingComma = -1;
  83261. }
  83262. }
  83263. return result;
  83264. };
  83265. pp$5.parseSubscripts = function(base2, startPos, startLoc, noCalls, forInit) {
  83266. var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base2.type === "Identifier" && base2.name === "async" && this.lastTokEnd === base2.end && !this.canInsertSemicolon() && base2.end - base2.start === 5 && this.potentialArrowAt === base2.start;
  83267. var optionalChained = false;
  83268. while (true) {
  83269. var element2 = this.parseSubscript(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
  83270. if (element2.optional) {
  83271. optionalChained = true;
  83272. }
  83273. if (element2 === base2 || element2.type === "ArrowFunctionExpression") {
  83274. if (optionalChained) {
  83275. var chainNode = this.startNodeAt(startPos, startLoc);
  83276. chainNode.expression = element2;
  83277. element2 = this.finishNode(chainNode, "ChainExpression");
  83278. }
  83279. return element2;
  83280. }
  83281. base2 = element2;
  83282. }
  83283. };
  83284. pp$5.parseSubscript = function(base2, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
  83285. var optionalSupported = this.options.ecmaVersion >= 11;
  83286. var optional = optionalSupported && this.eat(types$1.questionDot);
  83287. if (noCalls && optional) {
  83288. this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
  83289. }
  83290. var computed = this.eat(types$1.bracketL);
  83291. if (computed || optional && this.type !== types$1.parenL && this.type !== types$1.backQuote || this.eat(types$1.dot)) {
  83292. var node2 = this.startNodeAt(startPos, startLoc);
  83293. node2.object = base2;
  83294. if (computed) {
  83295. node2.property = this.parseExpression();
  83296. this.expect(types$1.bracketR);
  83297. } else if (this.type === types$1.privateId && base2.type !== "Super") {
  83298. node2.property = this.parsePrivateIdent();
  83299. } else {
  83300. node2.property = this.parseIdent(this.options.allowReserved !== "never");
  83301. }
  83302. node2.computed = !!computed;
  83303. if (optionalSupported) {
  83304. node2.optional = optional;
  83305. }
  83306. base2 = this.finishNode(node2, "MemberExpression");
  83307. } else if (!noCalls && this.eat(types$1.parenL)) {
  83308. var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  83309. this.yieldPos = 0;
  83310. this.awaitPos = 0;
  83311. this.awaitIdentPos = 0;
  83312. var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
  83313. if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types$1.arrow)) {
  83314. this.checkPatternErrors(refDestructuringErrors, false);
  83315. this.checkYieldAwaitInDefaultParams();
  83316. if (this.awaitIdentPos > 0) {
  83317. this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function");
  83318. }
  83319. this.yieldPos = oldYieldPos;
  83320. this.awaitPos = oldAwaitPos;
  83321. this.awaitIdentPos = oldAwaitIdentPos;
  83322. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit);
  83323. }
  83324. this.checkExpressionErrors(refDestructuringErrors, true);
  83325. this.yieldPos = oldYieldPos || this.yieldPos;
  83326. this.awaitPos = oldAwaitPos || this.awaitPos;
  83327. this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
  83328. var node$1 = this.startNodeAt(startPos, startLoc);
  83329. node$1.callee = base2;
  83330. node$1.arguments = exprList;
  83331. if (optionalSupported) {
  83332. node$1.optional = optional;
  83333. }
  83334. base2 = this.finishNode(node$1, "CallExpression");
  83335. } else if (this.type === types$1.backQuote) {
  83336. if (optional || optionalChained) {
  83337. this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
  83338. }
  83339. var node$2 = this.startNodeAt(startPos, startLoc);
  83340. node$2.tag = base2;
  83341. node$2.quasi = this.parseTemplate({ isTagged: true });
  83342. base2 = this.finishNode(node$2, "TaggedTemplateExpression");
  83343. }
  83344. return base2;
  83345. };
  83346. pp$5.parseExprAtom = function(refDestructuringErrors, forInit) {
  83347. if (this.type === types$1.slash) {
  83348. this.readRegexp();
  83349. }
  83350. var node2, canBeArrow = this.potentialArrowAt === this.start;
  83351. switch (this.type) {
  83352. case types$1._super:
  83353. if (!this.allowSuper) {
  83354. this.raise(this.start, "'super' keyword outside a method");
  83355. }
  83356. node2 = this.startNode();
  83357. this.next();
  83358. if (this.type === types$1.parenL && !this.allowDirectSuper) {
  83359. this.raise(node2.start, "super() call outside constructor of a subclass");
  83360. }
  83361. if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) {
  83362. this.unexpected();
  83363. }
  83364. return this.finishNode(node2, "Super");
  83365. case types$1._this:
  83366. node2 = this.startNode();
  83367. this.next();
  83368. return this.finishNode(node2, "ThisExpression");
  83369. case types$1.name:
  83370. var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
  83371. var id = this.parseIdent(false);
  83372. if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) {
  83373. this.overrideContext(types.f_expr);
  83374. return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit);
  83375. }
  83376. if (canBeArrow && !this.canInsertSemicolon()) {
  83377. if (this.eat(types$1.arrow)) {
  83378. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit);
  83379. }
  83380. if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) {
  83381. id = this.parseIdent(false);
  83382. if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) {
  83383. this.unexpected();
  83384. }
  83385. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit);
  83386. }
  83387. }
  83388. return id;
  83389. case types$1.regexp:
  83390. var value2 = this.value;
  83391. node2 = this.parseLiteral(value2.value);
  83392. node2.regex = { pattern: value2.pattern, flags: value2.flags };
  83393. return node2;
  83394. case types$1.num:
  83395. case types$1.string:
  83396. return this.parseLiteral(this.value);
  83397. case types$1._null:
  83398. case types$1._true:
  83399. case types$1._false:
  83400. node2 = this.startNode();
  83401. node2.value = this.type === types$1._null ? null : this.type === types$1._true;
  83402. node2.raw = this.type.keyword;
  83403. this.next();
  83404. return this.finishNode(node2, "Literal");
  83405. case types$1.parenL:
  83406. var start3 = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
  83407. if (refDestructuringErrors) {
  83408. if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {
  83409. refDestructuringErrors.parenthesizedAssign = start3;
  83410. }
  83411. if (refDestructuringErrors.parenthesizedBind < 0) {
  83412. refDestructuringErrors.parenthesizedBind = start3;
  83413. }
  83414. }
  83415. return expr;
  83416. case types$1.bracketL:
  83417. node2 = this.startNode();
  83418. this.next();
  83419. node2.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors);
  83420. return this.finishNode(node2, "ArrayExpression");
  83421. case types$1.braceL:
  83422. this.overrideContext(types.b_expr);
  83423. return this.parseObj(false, refDestructuringErrors);
  83424. case types$1._function:
  83425. node2 = this.startNode();
  83426. this.next();
  83427. return this.parseFunction(node2, 0);
  83428. case types$1._class:
  83429. return this.parseClass(this.startNode(), false);
  83430. case types$1._new:
  83431. return this.parseNew();
  83432. case types$1.backQuote:
  83433. return this.parseTemplate();
  83434. case types$1._import:
  83435. if (this.options.ecmaVersion >= 11) {
  83436. return this.parseExprImport();
  83437. } else {
  83438. return this.unexpected();
  83439. }
  83440. default:
  83441. this.unexpected();
  83442. }
  83443. };
  83444. pp$5.parseExprImport = function() {
  83445. var node2 = this.startNode();
  83446. if (this.containsEsc) {
  83447. this.raiseRecoverable(this.start, "Escape sequence in keyword import");
  83448. }
  83449. var meta = this.parseIdent(true);
  83450. switch (this.type) {
  83451. case types$1.parenL:
  83452. return this.parseDynamicImport(node2);
  83453. case types$1.dot:
  83454. node2.meta = meta;
  83455. return this.parseImportMeta(node2);
  83456. default:
  83457. this.unexpected();
  83458. }
  83459. };
  83460. pp$5.parseDynamicImport = function(node2) {
  83461. this.next();
  83462. node2.source = this.parseMaybeAssign();
  83463. if (!this.eat(types$1.parenR)) {
  83464. var errorPos = this.start;
  83465. if (this.eat(types$1.comma) && this.eat(types$1.parenR)) {
  83466. this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
  83467. } else {
  83468. this.unexpected(errorPos);
  83469. }
  83470. }
  83471. return this.finishNode(node2, "ImportExpression");
  83472. };
  83473. pp$5.parseImportMeta = function(node2) {
  83474. this.next();
  83475. var containsEsc = this.containsEsc;
  83476. node2.property = this.parseIdent(true);
  83477. if (node2.property.name !== "meta") {
  83478. this.raiseRecoverable(node2.property.start, "The only valid meta property for import is 'import.meta'");
  83479. }
  83480. if (containsEsc) {
  83481. this.raiseRecoverable(node2.start, "'import.meta' must not contain escaped characters");
  83482. }
  83483. if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) {
  83484. this.raiseRecoverable(node2.start, "Cannot use 'import.meta' outside a module");
  83485. }
  83486. return this.finishNode(node2, "MetaProperty");
  83487. };
  83488. pp$5.parseLiteral = function(value2) {
  83489. var node2 = this.startNode();
  83490. node2.value = value2;
  83491. node2.raw = this.input.slice(this.start, this.end);
  83492. if (node2.raw.charCodeAt(node2.raw.length - 1) === 110) {
  83493. node2.bigint = node2.raw.slice(0, -1).replace(/_/g, "");
  83494. }
  83495. this.next();
  83496. return this.finishNode(node2, "Literal");
  83497. };
  83498. pp$5.parseParenExpression = function() {
  83499. this.expect(types$1.parenL);
  83500. var val = this.parseExpression();
  83501. this.expect(types$1.parenR);
  83502. return val;
  83503. };
  83504. pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
  83505. var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
  83506. if (this.options.ecmaVersion >= 6) {
  83507. this.next();
  83508. var innerStartPos = this.start, innerStartLoc = this.startLoc;
  83509. var exprList = [], first = true, lastIsComma = false;
  83510. var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
  83511. this.yieldPos = 0;
  83512. this.awaitPos = 0;
  83513. while (this.type !== types$1.parenR) {
  83514. first ? first = false : this.expect(types$1.comma);
  83515. if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) {
  83516. lastIsComma = true;
  83517. break;
  83518. } else if (this.type === types$1.ellipsis) {
  83519. spreadStart = this.start;
  83520. exprList.push(this.parseParenItem(this.parseRestBinding()));
  83521. if (this.type === types$1.comma) {
  83522. this.raise(this.start, "Comma is not permitted after the rest element");
  83523. }
  83524. break;
  83525. } else {
  83526. exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
  83527. }
  83528. }
  83529. var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
  83530. this.expect(types$1.parenR);
  83531. if (canBeArrow && !this.canInsertSemicolon() && this.eat(types$1.arrow)) {
  83532. this.checkPatternErrors(refDestructuringErrors, false);
  83533. this.checkYieldAwaitInDefaultParams();
  83534. this.yieldPos = oldYieldPos;
  83535. this.awaitPos = oldAwaitPos;
  83536. return this.parseParenArrowList(startPos, startLoc, exprList, forInit);
  83537. }
  83538. if (!exprList.length || lastIsComma) {
  83539. this.unexpected(this.lastTokStart);
  83540. }
  83541. if (spreadStart) {
  83542. this.unexpected(spreadStart);
  83543. }
  83544. this.checkExpressionErrors(refDestructuringErrors, true);
  83545. this.yieldPos = oldYieldPos || this.yieldPos;
  83546. this.awaitPos = oldAwaitPos || this.awaitPos;
  83547. if (exprList.length > 1) {
  83548. val = this.startNodeAt(innerStartPos, innerStartLoc);
  83549. val.expressions = exprList;
  83550. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  83551. } else {
  83552. val = exprList[0];
  83553. }
  83554. } else {
  83555. val = this.parseParenExpression();
  83556. }
  83557. if (this.options.preserveParens) {
  83558. var par = this.startNodeAt(startPos, startLoc);
  83559. par.expression = val;
  83560. return this.finishNode(par, "ParenthesizedExpression");
  83561. } else {
  83562. return val;
  83563. }
  83564. };
  83565. pp$5.parseParenItem = function(item) {
  83566. return item;
  83567. };
  83568. pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
  83569. return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit);
  83570. };
  83571. var empty = [];
  83572. pp$5.parseNew = function() {
  83573. if (this.containsEsc) {
  83574. this.raiseRecoverable(this.start, "Escape sequence in keyword new");
  83575. }
  83576. var node2 = this.startNode();
  83577. var meta = this.parseIdent(true);
  83578. if (this.options.ecmaVersion >= 6 && this.eat(types$1.dot)) {
  83579. node2.meta = meta;
  83580. var containsEsc = this.containsEsc;
  83581. node2.property = this.parseIdent(true);
  83582. if (node2.property.name !== "target") {
  83583. this.raiseRecoverable(node2.property.start, "The only valid meta property for new is 'new.target'");
  83584. }
  83585. if (containsEsc) {
  83586. this.raiseRecoverable(node2.start, "'new.target' must not contain escaped characters");
  83587. }
  83588. if (!this.allowNewDotTarget) {
  83589. this.raiseRecoverable(node2.start, "'new.target' can only be used in functions and class static block");
  83590. }
  83591. return this.finishNode(node2, "MetaProperty");
  83592. }
  83593. var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types$1._import;
  83594. node2.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true, false);
  83595. if (isImport && node2.callee.type === "ImportExpression") {
  83596. this.raise(startPos, "Cannot use new with import()");
  83597. }
  83598. if (this.eat(types$1.parenL)) {
  83599. node2.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false);
  83600. } else {
  83601. node2.arguments = empty;
  83602. }
  83603. return this.finishNode(node2, "NewExpression");
  83604. };
  83605. pp$5.parseTemplateElement = function(ref3) {
  83606. var isTagged = ref3.isTagged;
  83607. var elem = this.startNode();
  83608. if (this.type === types$1.invalidTemplate) {
  83609. if (!isTagged) {
  83610. this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
  83611. }
  83612. elem.value = {
  83613. raw: this.value,
  83614. cooked: null
  83615. };
  83616. } else {
  83617. elem.value = {
  83618. raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
  83619. cooked: this.value
  83620. };
  83621. }
  83622. this.next();
  83623. elem.tail = this.type === types$1.backQuote;
  83624. return this.finishNode(elem, "TemplateElement");
  83625. };
  83626. pp$5.parseTemplate = function(ref3) {
  83627. if (ref3 === void 0)
  83628. ref3 = {};
  83629. var isTagged = ref3.isTagged;
  83630. if (isTagged === void 0)
  83631. isTagged = false;
  83632. var node2 = this.startNode();
  83633. this.next();
  83634. node2.expressions = [];
  83635. var curElt = this.parseTemplateElement({ isTagged });
  83636. node2.quasis = [curElt];
  83637. while (!curElt.tail) {
  83638. if (this.type === types$1.eof) {
  83639. this.raise(this.pos, "Unterminated template literal");
  83640. }
  83641. this.expect(types$1.dollarBraceL);
  83642. node2.expressions.push(this.parseExpression());
  83643. this.expect(types$1.braceR);
  83644. node2.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
  83645. }
  83646. this.next();
  83647. return this.finishNode(node2, "TemplateLiteral");
  83648. };
  83649. pp$5.isAsyncProp = function(prop) {
  83650. return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$1.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
  83651. };
  83652. pp$5.parseObj = function(isPattern, refDestructuringErrors) {
  83653. var node2 = this.startNode(), first = true, propHash = {};
  83654. node2.properties = [];
  83655. this.next();
  83656. while (!this.eat(types$1.braceR)) {
  83657. if (!first) {
  83658. this.expect(types$1.comma);
  83659. if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) {
  83660. break;
  83661. }
  83662. } else {
  83663. first = false;
  83664. }
  83665. var prop = this.parseProperty(isPattern, refDestructuringErrors);
  83666. if (!isPattern) {
  83667. this.checkPropClash(prop, propHash, refDestructuringErrors);
  83668. }
  83669. node2.properties.push(prop);
  83670. }
  83671. return this.finishNode(node2, isPattern ? "ObjectPattern" : "ObjectExpression");
  83672. };
  83673. pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
  83674. var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
  83675. if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {
  83676. if (isPattern) {
  83677. prop.argument = this.parseIdent(false);
  83678. if (this.type === types$1.comma) {
  83679. this.raise(this.start, "Comma is not permitted after the rest element");
  83680. }
  83681. return this.finishNode(prop, "RestElement");
  83682. }
  83683. prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
  83684. if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
  83685. refDestructuringErrors.trailingComma = this.start;
  83686. }
  83687. return this.finishNode(prop, "SpreadElement");
  83688. }
  83689. if (this.options.ecmaVersion >= 6) {
  83690. prop.method = false;
  83691. prop.shorthand = false;
  83692. if (isPattern || refDestructuringErrors) {
  83693. startPos = this.start;
  83694. startLoc = this.startLoc;
  83695. }
  83696. if (!isPattern) {
  83697. isGenerator = this.eat(types$1.star);
  83698. }
  83699. }
  83700. var containsEsc = this.containsEsc;
  83701. this.parsePropertyName(prop);
  83702. if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
  83703. isAsync = true;
  83704. isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
  83705. this.parsePropertyName(prop);
  83706. } else {
  83707. isAsync = false;
  83708. }
  83709. this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
  83710. return this.finishNode(prop, "Property");
  83711. };
  83712. pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
  83713. if ((isGenerator || isAsync) && this.type === types$1.colon) {
  83714. this.unexpected();
  83715. }
  83716. if (this.eat(types$1.colon)) {
  83717. prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
  83718. prop.kind = "init";
  83719. } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
  83720. if (isPattern) {
  83721. this.unexpected();
  83722. }
  83723. prop.kind = "init";
  83724. prop.method = true;
  83725. prop.value = this.parseMethod(isGenerator, isAsync);
  83726. } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) {
  83727. if (isGenerator || isAsync) {
  83728. this.unexpected();
  83729. }
  83730. prop.kind = prop.key.name;
  83731. this.parsePropertyName(prop);
  83732. prop.value = this.parseMethod(false);
  83733. var paramCount = prop.kind === "get" ? 0 : 1;
  83734. if (prop.value.params.length !== paramCount) {
  83735. var start3 = prop.value.start;
  83736. if (prop.kind === "get") {
  83737. this.raiseRecoverable(start3, "getter should have no params");
  83738. } else {
  83739. this.raiseRecoverable(start3, "setter should have exactly one param");
  83740. }
  83741. } else {
  83742. if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
  83743. this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
  83744. }
  83745. }
  83746. } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
  83747. if (isGenerator || isAsync) {
  83748. this.unexpected();
  83749. }
  83750. this.checkUnreserved(prop.key);
  83751. if (prop.key.name === "await" && !this.awaitIdentPos) {
  83752. this.awaitIdentPos = startPos;
  83753. }
  83754. prop.kind = "init";
  83755. if (isPattern) {
  83756. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  83757. } else if (this.type === types$1.eq && refDestructuringErrors) {
  83758. if (refDestructuringErrors.shorthandAssign < 0) {
  83759. refDestructuringErrors.shorthandAssign = this.start;
  83760. }
  83761. prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
  83762. } else {
  83763. prop.value = this.copyNode(prop.key);
  83764. }
  83765. prop.shorthand = true;
  83766. } else {
  83767. this.unexpected();
  83768. }
  83769. };
  83770. pp$5.parsePropertyName = function(prop) {
  83771. if (this.options.ecmaVersion >= 6) {
  83772. if (this.eat(types$1.bracketL)) {
  83773. prop.computed = true;
  83774. prop.key = this.parseMaybeAssign();
  83775. this.expect(types$1.bracketR);
  83776. return prop.key;
  83777. } else {
  83778. prop.computed = false;
  83779. }
  83780. }
  83781. return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
  83782. };
  83783. pp$5.initFunction = function(node2) {
  83784. node2.id = null;
  83785. if (this.options.ecmaVersion >= 6) {
  83786. node2.generator = node2.expression = false;
  83787. }
  83788. if (this.options.ecmaVersion >= 8) {
  83789. node2.async = false;
  83790. }
  83791. };
  83792. pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
  83793. var node2 = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  83794. this.initFunction(node2);
  83795. if (this.options.ecmaVersion >= 6) {
  83796. node2.generator = isGenerator;
  83797. }
  83798. if (this.options.ecmaVersion >= 8) {
  83799. node2.async = !!isAsync;
  83800. }
  83801. this.yieldPos = 0;
  83802. this.awaitPos = 0;
  83803. this.awaitIdentPos = 0;
  83804. this.enterScope(functionFlags(isAsync, node2.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
  83805. this.expect(types$1.parenL);
  83806. node2.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
  83807. this.checkYieldAwaitInDefaultParams();
  83808. this.parseFunctionBody(node2, false, true, false);
  83809. this.yieldPos = oldYieldPos;
  83810. this.awaitPos = oldAwaitPos;
  83811. this.awaitIdentPos = oldAwaitIdentPos;
  83812. return this.finishNode(node2, "FunctionExpression");
  83813. };
  83814. pp$5.parseArrowExpression = function(node2, params, isAsync, forInit) {
  83815. var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
  83816. this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
  83817. this.initFunction(node2);
  83818. if (this.options.ecmaVersion >= 8) {
  83819. node2.async = !!isAsync;
  83820. }
  83821. this.yieldPos = 0;
  83822. this.awaitPos = 0;
  83823. this.awaitIdentPos = 0;
  83824. node2.params = this.toAssignableList(params, true);
  83825. this.parseFunctionBody(node2, true, false, forInit);
  83826. this.yieldPos = oldYieldPos;
  83827. this.awaitPos = oldAwaitPos;
  83828. this.awaitIdentPos = oldAwaitIdentPos;
  83829. return this.finishNode(node2, "ArrowFunctionExpression");
  83830. };
  83831. pp$5.parseFunctionBody = function(node2, isArrowFunction, isMethod, forInit) {
  83832. var isExpression = isArrowFunction && this.type !== types$1.braceL;
  83833. var oldStrict = this.strict, useStrict = false;
  83834. if (isExpression) {
  83835. node2.body = this.parseMaybeAssign(forInit);
  83836. node2.expression = true;
  83837. this.checkParams(node2, false);
  83838. } else {
  83839. var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node2.params);
  83840. if (!oldStrict || nonSimple) {
  83841. useStrict = this.strictDirective(this.end);
  83842. if (useStrict && nonSimple) {
  83843. this.raiseRecoverable(node2.start, "Illegal 'use strict' directive in function with non-simple parameter list");
  83844. }
  83845. }
  83846. var oldLabels = this.labels;
  83847. this.labels = [];
  83848. if (useStrict) {
  83849. this.strict = true;
  83850. }
  83851. this.checkParams(node2, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node2.params));
  83852. if (this.strict && node2.id) {
  83853. this.checkLValSimple(node2.id, BIND_OUTSIDE);
  83854. }
  83855. node2.body = this.parseBlock(false, void 0, useStrict && !oldStrict);
  83856. node2.expression = false;
  83857. this.adaptDirectivePrologue(node2.body.body);
  83858. this.labels = oldLabels;
  83859. }
  83860. this.exitScope();
  83861. };
  83862. pp$5.isSimpleParamList = function(params) {
  83863. for (var i = 0, list3 = params; i < list3.length; i += 1) {
  83864. var param = list3[i];
  83865. if (param.type !== "Identifier") {
  83866. return false;
  83867. }
  83868. }
  83869. return true;
  83870. };
  83871. pp$5.checkParams = function(node2, allowDuplicates) {
  83872. var nameHash = /* @__PURE__ */ Object.create(null);
  83873. for (var i = 0, list3 = node2.params; i < list3.length; i += 1) {
  83874. var param = list3[i];
  83875. this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);
  83876. }
  83877. };
  83878. pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
  83879. var elts = [], first = true;
  83880. while (!this.eat(close)) {
  83881. if (!first) {
  83882. this.expect(types$1.comma);
  83883. if (allowTrailingComma && this.afterTrailingComma(close)) {
  83884. break;
  83885. }
  83886. } else {
  83887. first = false;
  83888. }
  83889. var elt = void 0;
  83890. if (allowEmpty && this.type === types$1.comma) {
  83891. elt = null;
  83892. } else if (this.type === types$1.ellipsis) {
  83893. elt = this.parseSpread(refDestructuringErrors);
  83894. if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) {
  83895. refDestructuringErrors.trailingComma = this.start;
  83896. }
  83897. } else {
  83898. elt = this.parseMaybeAssign(false, refDestructuringErrors);
  83899. }
  83900. elts.push(elt);
  83901. }
  83902. return elts;
  83903. };
  83904. pp$5.checkUnreserved = function(ref3) {
  83905. var start3 = ref3.start;
  83906. var end = ref3.end;
  83907. var name2 = ref3.name;
  83908. if (this.inGenerator && name2 === "yield") {
  83909. this.raiseRecoverable(start3, "Cannot use 'yield' as identifier inside a generator");
  83910. }
  83911. if (this.inAsync && name2 === "await") {
  83912. this.raiseRecoverable(start3, "Cannot use 'await' as identifier inside an async function");
  83913. }
  83914. if (this.currentThisScope().inClassFieldInit && name2 === "arguments") {
  83915. this.raiseRecoverable(start3, "Cannot use 'arguments' in class field initializer");
  83916. }
  83917. if (this.inClassStaticBlock && (name2 === "arguments" || name2 === "await")) {
  83918. this.raise(start3, "Cannot use " + name2 + " in class static initialization block");
  83919. }
  83920. if (this.keywords.test(name2)) {
  83921. this.raise(start3, "Unexpected keyword '" + name2 + "'");
  83922. }
  83923. if (this.options.ecmaVersion < 6 && this.input.slice(start3, end).indexOf("\\") !== -1) {
  83924. return;
  83925. }
  83926. var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
  83927. if (re.test(name2)) {
  83928. if (!this.inAsync && name2 === "await") {
  83929. this.raiseRecoverable(start3, "Cannot use keyword 'await' outside an async function");
  83930. }
  83931. this.raiseRecoverable(start3, "The keyword '" + name2 + "' is reserved");
  83932. }
  83933. };
  83934. pp$5.parseIdent = function(liberal) {
  83935. var node2 = this.startNode();
  83936. if (this.type === types$1.name) {
  83937. node2.name = this.value;
  83938. } else if (this.type.keyword) {
  83939. node2.name = this.type.keyword;
  83940. if ((node2.name === "class" || node2.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
  83941. this.context.pop();
  83942. }
  83943. } else {
  83944. this.unexpected();
  83945. }
  83946. this.next(!!liberal);
  83947. this.finishNode(node2, "Identifier");
  83948. if (!liberal) {
  83949. this.checkUnreserved(node2);
  83950. if (node2.name === "await" && !this.awaitIdentPos) {
  83951. this.awaitIdentPos = node2.start;
  83952. }
  83953. }
  83954. return node2;
  83955. };
  83956. pp$5.parsePrivateIdent = function() {
  83957. var node2 = this.startNode();
  83958. if (this.type === types$1.privateId) {
  83959. node2.name = this.value;
  83960. } else {
  83961. this.unexpected();
  83962. }
  83963. this.next();
  83964. this.finishNode(node2, "PrivateIdentifier");
  83965. if (this.privateNameStack.length === 0) {
  83966. this.raise(node2.start, "Private field '#" + node2.name + "' must be declared in an enclosing class");
  83967. } else {
  83968. this.privateNameStack[this.privateNameStack.length - 1].used.push(node2);
  83969. }
  83970. return node2;
  83971. };
  83972. pp$5.parseYield = function(forInit) {
  83973. if (!this.yieldPos) {
  83974. this.yieldPos = this.start;
  83975. }
  83976. var node2 = this.startNode();
  83977. this.next();
  83978. if (this.type === types$1.semi || this.canInsertSemicolon() || this.type !== types$1.star && !this.type.startsExpr) {
  83979. node2.delegate = false;
  83980. node2.argument = null;
  83981. } else {
  83982. node2.delegate = this.eat(types$1.star);
  83983. node2.argument = this.parseMaybeAssign(forInit);
  83984. }
  83985. return this.finishNode(node2, "YieldExpression");
  83986. };
  83987. pp$5.parseAwait = function(forInit) {
  83988. if (!this.awaitPos) {
  83989. this.awaitPos = this.start;
  83990. }
  83991. var node2 = this.startNode();
  83992. this.next();
  83993. node2.argument = this.parseMaybeUnary(null, true, false, forInit);
  83994. return this.finishNode(node2, "AwaitExpression");
  83995. };
  83996. var pp$4 = Parser.prototype;
  83997. pp$4.raise = function(pos2, message) {
  83998. var loc = getLineInfo(this.input, pos2);
  83999. message += " (" + loc.line + ":" + loc.column + ")";
  84000. var err = new SyntaxError(message);
  84001. err.pos = pos2;
  84002. err.loc = loc;
  84003. err.raisedAt = this.pos;
  84004. throw err;
  84005. };
  84006. pp$4.raiseRecoverable = pp$4.raise;
  84007. pp$4.curPosition = function() {
  84008. if (this.options.locations) {
  84009. return new Position(this.curLine, this.pos - this.lineStart);
  84010. }
  84011. };
  84012. var pp$3 = Parser.prototype;
  84013. var Scope = function Scope2(flags) {
  84014. this.flags = flags;
  84015. this.var = [];
  84016. this.lexical = [];
  84017. this.functions = [];
  84018. this.inClassFieldInit = false;
  84019. };
  84020. pp$3.enterScope = function(flags) {
  84021. this.scopeStack.push(new Scope(flags));
  84022. };
  84023. pp$3.exitScope = function() {
  84024. this.scopeStack.pop();
  84025. };
  84026. pp$3.treatFunctionsAsVarInScope = function(scope) {
  84027. return scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_TOP;
  84028. };
  84029. pp$3.declareName = function(name2, bindingType, pos2) {
  84030. var redeclared = false;
  84031. if (bindingType === BIND_LEXICAL) {
  84032. var scope = this.currentScope();
  84033. redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1;
  84034. scope.lexical.push(name2);
  84035. if (this.inModule && scope.flags & SCOPE_TOP) {
  84036. delete this.undefinedExports[name2];
  84037. }
  84038. } else if (bindingType === BIND_SIMPLE_CATCH) {
  84039. var scope$1 = this.currentScope();
  84040. scope$1.lexical.push(name2);
  84041. } else if (bindingType === BIND_FUNCTION) {
  84042. var scope$2 = this.currentScope();
  84043. if (this.treatFunctionsAsVar) {
  84044. redeclared = scope$2.lexical.indexOf(name2) > -1;
  84045. } else {
  84046. redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1;
  84047. }
  84048. scope$2.functions.push(name2);
  84049. } else {
  84050. for (var i = this.scopeStack.length - 1; i >= 0; --i) {
  84051. var scope$3 = this.scopeStack[i];
  84052. if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) {
  84053. redeclared = true;
  84054. break;
  84055. }
  84056. scope$3.var.push(name2);
  84057. if (this.inModule && scope$3.flags & SCOPE_TOP) {
  84058. delete this.undefinedExports[name2];
  84059. }
  84060. if (scope$3.flags & SCOPE_VAR) {
  84061. break;
  84062. }
  84063. }
  84064. }
  84065. if (redeclared) {
  84066. this.raiseRecoverable(pos2, "Identifier '" + name2 + "' has already been declared");
  84067. }
  84068. };
  84069. pp$3.checkLocalExport = function(id) {
  84070. if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) {
  84071. this.undefinedExports[id.name] = id;
  84072. }
  84073. };
  84074. pp$3.currentScope = function() {
  84075. return this.scopeStack[this.scopeStack.length - 1];
  84076. };
  84077. pp$3.currentVarScope = function() {
  84078. for (var i = this.scopeStack.length - 1; ; i--) {
  84079. var scope = this.scopeStack[i];
  84080. if (scope.flags & SCOPE_VAR) {
  84081. return scope;
  84082. }
  84083. }
  84084. };
  84085. pp$3.currentThisScope = function() {
  84086. for (var i = this.scopeStack.length - 1; ; i--) {
  84087. var scope = this.scopeStack[i];
  84088. if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) {
  84089. return scope;
  84090. }
  84091. }
  84092. };
  84093. var Node = function Node2(parser, pos2, loc) {
  84094. this.type = "";
  84095. this.start = pos2;
  84096. this.end = 0;
  84097. if (parser.options.locations) {
  84098. this.loc = new SourceLocation(parser, loc);
  84099. }
  84100. if (parser.options.directSourceFile) {
  84101. this.sourceFile = parser.options.directSourceFile;
  84102. }
  84103. if (parser.options.ranges) {
  84104. this.range = [pos2, 0];
  84105. }
  84106. };
  84107. var pp$2 = Parser.prototype;
  84108. pp$2.startNode = function() {
  84109. return new Node(this, this.start, this.startLoc);
  84110. };
  84111. pp$2.startNodeAt = function(pos2, loc) {
  84112. return new Node(this, pos2, loc);
  84113. };
  84114. function finishNodeAt(node2, type, pos2, loc) {
  84115. node2.type = type;
  84116. node2.end = pos2;
  84117. if (this.options.locations) {
  84118. node2.loc.end = loc;
  84119. }
  84120. if (this.options.ranges) {
  84121. node2.range[1] = pos2;
  84122. }
  84123. return node2;
  84124. }
  84125. pp$2.finishNode = function(node2, type) {
  84126. return finishNodeAt.call(this, node2, type, this.lastTokEnd, this.lastTokEndLoc);
  84127. };
  84128. pp$2.finishNodeAt = function(node2, type, pos2, loc) {
  84129. return finishNodeAt.call(this, node2, type, pos2, loc);
  84130. };
  84131. pp$2.copyNode = function(node2) {
  84132. var newNode = new Node(this, node2.start, this.startLoc);
  84133. for (var prop in node2) {
  84134. newNode[prop] = node2[prop];
  84135. }
  84136. return newNode;
  84137. };
  84138. var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
  84139. var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
  84140. var ecma11BinaryProperties = ecma10BinaryProperties;
  84141. var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
  84142. var ecma13BinaryProperties = ecma12BinaryProperties;
  84143. var ecma14BinaryProperties = ecma13BinaryProperties;
  84144. var unicodeBinaryProperties = {
  84145. 9: ecma9BinaryProperties,
  84146. 10: ecma10BinaryProperties,
  84147. 11: ecma11BinaryProperties,
  84148. 12: ecma12BinaryProperties,
  84149. 13: ecma13BinaryProperties,
  84150. 14: ecma14BinaryProperties
  84151. };
  84152. var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
  84153. var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
  84154. var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
  84155. var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
  84156. var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
  84157. var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
  84158. var ecma14ScriptValues = ecma13ScriptValues + " Kawi Nag_Mundari Nagm";
  84159. var unicodeScriptValues = {
  84160. 9: ecma9ScriptValues,
  84161. 10: ecma10ScriptValues,
  84162. 11: ecma11ScriptValues,
  84163. 12: ecma12ScriptValues,
  84164. 13: ecma13ScriptValues,
  84165. 14: ecma14ScriptValues
  84166. };
  84167. var data = {};
  84168. function buildUnicodeData(ecmaVersion) {
  84169. var d = data[ecmaVersion] = {
  84170. binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues),
  84171. nonBinary: {
  84172. General_Category: wordsRegexp(unicodeGeneralCategoryValues),
  84173. Script: wordsRegexp(unicodeScriptValues[ecmaVersion])
  84174. }
  84175. };
  84176. d.nonBinary.Script_Extensions = d.nonBinary.Script;
  84177. d.nonBinary.gc = d.nonBinary.General_Category;
  84178. d.nonBinary.sc = d.nonBinary.Script;
  84179. d.nonBinary.scx = d.nonBinary.Script_Extensions;
  84180. }
  84181. for (i = 0, list3 = [9, 10, 11, 12, 13, 14]; i < list3.length; i += 1) {
  84182. ecmaVersion = list3[i];
  84183. buildUnicodeData(ecmaVersion);
  84184. }
  84185. var ecmaVersion;
  84186. var i;
  84187. var list3;
  84188. var pp$1 = Parser.prototype;
  84189. var RegExpValidationState = function RegExpValidationState2(parser) {
  84190. this.parser = parser;
  84191. this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
  84192. this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion];
  84193. this.source = "";
  84194. this.flags = "";
  84195. this.start = 0;
  84196. this.switchU = false;
  84197. this.switchN = false;
  84198. this.pos = 0;
  84199. this.lastIntValue = 0;
  84200. this.lastStringValue = "";
  84201. this.lastAssertionIsQuantifiable = false;
  84202. this.numCapturingParens = 0;
  84203. this.maxBackReference = 0;
  84204. this.groupNames = [];
  84205. this.backReferenceNames = [];
  84206. };
  84207. RegExpValidationState.prototype.reset = function reset(start3, pattern, flags) {
  84208. var unicode2 = flags.indexOf("u") !== -1;
  84209. this.start = start3 | 0;
  84210. this.source = pattern + "";
  84211. this.flags = flags;
  84212. this.switchU = unicode2 && this.parser.options.ecmaVersion >= 6;
  84213. this.switchN = unicode2 && this.parser.options.ecmaVersion >= 9;
  84214. };
  84215. RegExpValidationState.prototype.raise = function raise(message) {
  84216. this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
  84217. };
  84218. RegExpValidationState.prototype.at = function at(i, forceU) {
  84219. if (forceU === void 0)
  84220. forceU = false;
  84221. var s = this.source;
  84222. var l = s.length;
  84223. if (i >= l) {
  84224. return -1;
  84225. }
  84226. var c2 = s.charCodeAt(i);
  84227. if (!(forceU || this.switchU) || c2 <= 55295 || c2 >= 57344 || i + 1 >= l) {
  84228. return c2;
  84229. }
  84230. var next = s.charCodeAt(i + 1);
  84231. return next >= 56320 && next <= 57343 ? (c2 << 10) + next - 56613888 : c2;
  84232. };
  84233. RegExpValidationState.prototype.nextIndex = function nextIndex(i, forceU) {
  84234. if (forceU === void 0)
  84235. forceU = false;
  84236. var s = this.source;
  84237. var l = s.length;
  84238. if (i >= l) {
  84239. return l;
  84240. }
  84241. var c2 = s.charCodeAt(i), next;
  84242. if (!(forceU || this.switchU) || c2 <= 55295 || c2 >= 57344 || i + 1 >= l || (next = s.charCodeAt(i + 1)) < 56320 || next > 57343) {
  84243. return i + 1;
  84244. }
  84245. return i + 2;
  84246. };
  84247. RegExpValidationState.prototype.current = function current(forceU) {
  84248. if (forceU === void 0)
  84249. forceU = false;
  84250. return this.at(this.pos, forceU);
  84251. };
  84252. RegExpValidationState.prototype.lookahead = function lookahead(forceU) {
  84253. if (forceU === void 0)
  84254. forceU = false;
  84255. return this.at(this.nextIndex(this.pos, forceU), forceU);
  84256. };
  84257. RegExpValidationState.prototype.advance = function advance(forceU) {
  84258. if (forceU === void 0)
  84259. forceU = false;
  84260. this.pos = this.nextIndex(this.pos, forceU);
  84261. };
  84262. RegExpValidationState.prototype.eat = function eat(ch, forceU) {
  84263. if (forceU === void 0)
  84264. forceU = false;
  84265. if (this.current(forceU) === ch) {
  84266. this.advance(forceU);
  84267. return true;
  84268. }
  84269. return false;
  84270. };
  84271. pp$1.validateRegExpFlags = function(state) {
  84272. var validFlags = state.validFlags;
  84273. var flags = state.flags;
  84274. for (var i = 0; i < flags.length; i++) {
  84275. var flag = flags.charAt(i);
  84276. if (validFlags.indexOf(flag) === -1) {
  84277. this.raise(state.start, "Invalid regular expression flag");
  84278. }
  84279. if (flags.indexOf(flag, i + 1) > -1) {
  84280. this.raise(state.start, "Duplicate regular expression flag");
  84281. }
  84282. }
  84283. };
  84284. pp$1.validateRegExpPattern = function(state) {
  84285. this.regexp_pattern(state);
  84286. if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
  84287. state.switchN = true;
  84288. this.regexp_pattern(state);
  84289. }
  84290. };
  84291. pp$1.regexp_pattern = function(state) {
  84292. state.pos = 0;
  84293. state.lastIntValue = 0;
  84294. state.lastStringValue = "";
  84295. state.lastAssertionIsQuantifiable = false;
  84296. state.numCapturingParens = 0;
  84297. state.maxBackReference = 0;
  84298. state.groupNames.length = 0;
  84299. state.backReferenceNames.length = 0;
  84300. this.regexp_disjunction(state);
  84301. if (state.pos !== state.source.length) {
  84302. if (state.eat(
  84303. 41
  84304. /* ) */
  84305. )) {
  84306. state.raise("Unmatched ')'");
  84307. }
  84308. if (state.eat(
  84309. 93
  84310. /* ] */
  84311. ) || state.eat(
  84312. 125
  84313. /* } */
  84314. )) {
  84315. state.raise("Lone quantifier brackets");
  84316. }
  84317. }
  84318. if (state.maxBackReference > state.numCapturingParens) {
  84319. state.raise("Invalid escape");
  84320. }
  84321. for (var i = 0, list3 = state.backReferenceNames; i < list3.length; i += 1) {
  84322. var name2 = list3[i];
  84323. if (state.groupNames.indexOf(name2) === -1) {
  84324. state.raise("Invalid named capture referenced");
  84325. }
  84326. }
  84327. };
  84328. pp$1.regexp_disjunction = function(state) {
  84329. this.regexp_alternative(state);
  84330. while (state.eat(
  84331. 124
  84332. /* | */
  84333. )) {
  84334. this.regexp_alternative(state);
  84335. }
  84336. if (this.regexp_eatQuantifier(state, true)) {
  84337. state.raise("Nothing to repeat");
  84338. }
  84339. if (state.eat(
  84340. 123
  84341. /* { */
  84342. )) {
  84343. state.raise("Lone quantifier brackets");
  84344. }
  84345. };
  84346. pp$1.regexp_alternative = function(state) {
  84347. while (state.pos < state.source.length && this.regexp_eatTerm(state)) {
  84348. }
  84349. };
  84350. pp$1.regexp_eatTerm = function(state) {
  84351. if (this.regexp_eatAssertion(state)) {
  84352. if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
  84353. if (state.switchU) {
  84354. state.raise("Invalid quantifier");
  84355. }
  84356. }
  84357. return true;
  84358. }
  84359. if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
  84360. this.regexp_eatQuantifier(state);
  84361. return true;
  84362. }
  84363. return false;
  84364. };
  84365. pp$1.regexp_eatAssertion = function(state) {
  84366. var start3 = state.pos;
  84367. state.lastAssertionIsQuantifiable = false;
  84368. if (state.eat(
  84369. 94
  84370. /* ^ */
  84371. ) || state.eat(
  84372. 36
  84373. /* $ */
  84374. )) {
  84375. return true;
  84376. }
  84377. if (state.eat(
  84378. 92
  84379. /* \ */
  84380. )) {
  84381. if (state.eat(
  84382. 66
  84383. /* B */
  84384. ) || state.eat(
  84385. 98
  84386. /* b */
  84387. )) {
  84388. return true;
  84389. }
  84390. state.pos = start3;
  84391. }
  84392. if (state.eat(
  84393. 40
  84394. /* ( */
  84395. ) && state.eat(
  84396. 63
  84397. /* ? */
  84398. )) {
  84399. var lookbehind = false;
  84400. if (this.options.ecmaVersion >= 9) {
  84401. lookbehind = state.eat(
  84402. 60
  84403. /* < */
  84404. );
  84405. }
  84406. if (state.eat(
  84407. 61
  84408. /* = */
  84409. ) || state.eat(
  84410. 33
  84411. /* ! */
  84412. )) {
  84413. this.regexp_disjunction(state);
  84414. if (!state.eat(
  84415. 41
  84416. /* ) */
  84417. )) {
  84418. state.raise("Unterminated group");
  84419. }
  84420. state.lastAssertionIsQuantifiable = !lookbehind;
  84421. return true;
  84422. }
  84423. }
  84424. state.pos = start3;
  84425. return false;
  84426. };
  84427. pp$1.regexp_eatQuantifier = function(state, noError) {
  84428. if (noError === void 0)
  84429. noError = false;
  84430. if (this.regexp_eatQuantifierPrefix(state, noError)) {
  84431. state.eat(
  84432. 63
  84433. /* ? */
  84434. );
  84435. return true;
  84436. }
  84437. return false;
  84438. };
  84439. pp$1.regexp_eatQuantifierPrefix = function(state, noError) {
  84440. return state.eat(
  84441. 42
  84442. /* * */
  84443. ) || state.eat(
  84444. 43
  84445. /* + */
  84446. ) || state.eat(
  84447. 63
  84448. /* ? */
  84449. ) || this.regexp_eatBracedQuantifier(state, noError);
  84450. };
  84451. pp$1.regexp_eatBracedQuantifier = function(state, noError) {
  84452. var start3 = state.pos;
  84453. if (state.eat(
  84454. 123
  84455. /* { */
  84456. )) {
  84457. var min = 0, max = -1;
  84458. if (this.regexp_eatDecimalDigits(state)) {
  84459. min = state.lastIntValue;
  84460. if (state.eat(
  84461. 44
  84462. /* , */
  84463. ) && this.regexp_eatDecimalDigits(state)) {
  84464. max = state.lastIntValue;
  84465. }
  84466. if (state.eat(
  84467. 125
  84468. /* } */
  84469. )) {
  84470. if (max !== -1 && max < min && !noError) {
  84471. state.raise("numbers out of order in {} quantifier");
  84472. }
  84473. return true;
  84474. }
  84475. }
  84476. if (state.switchU && !noError) {
  84477. state.raise("Incomplete quantifier");
  84478. }
  84479. state.pos = start3;
  84480. }
  84481. return false;
  84482. };
  84483. pp$1.regexp_eatAtom = function(state) {
  84484. return this.regexp_eatPatternCharacters(state) || state.eat(
  84485. 46
  84486. /* . */
  84487. ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
  84488. };
  84489. pp$1.regexp_eatReverseSolidusAtomEscape = function(state) {
  84490. var start3 = state.pos;
  84491. if (state.eat(
  84492. 92
  84493. /* \ */
  84494. )) {
  84495. if (this.regexp_eatAtomEscape(state)) {
  84496. return true;
  84497. }
  84498. state.pos = start3;
  84499. }
  84500. return false;
  84501. };
  84502. pp$1.regexp_eatUncapturingGroup = function(state) {
  84503. var start3 = state.pos;
  84504. if (state.eat(
  84505. 40
  84506. /* ( */
  84507. )) {
  84508. if (state.eat(
  84509. 63
  84510. /* ? */
  84511. ) && state.eat(
  84512. 58
  84513. /* : */
  84514. )) {
  84515. this.regexp_disjunction(state);
  84516. if (state.eat(
  84517. 41
  84518. /* ) */
  84519. )) {
  84520. return true;
  84521. }
  84522. state.raise("Unterminated group");
  84523. }
  84524. state.pos = start3;
  84525. }
  84526. return false;
  84527. };
  84528. pp$1.regexp_eatCapturingGroup = function(state) {
  84529. if (state.eat(
  84530. 40
  84531. /* ( */
  84532. )) {
  84533. if (this.options.ecmaVersion >= 9) {
  84534. this.regexp_groupSpecifier(state);
  84535. } else if (state.current() === 63) {
  84536. state.raise("Invalid group");
  84537. }
  84538. this.regexp_disjunction(state);
  84539. if (state.eat(
  84540. 41
  84541. /* ) */
  84542. )) {
  84543. state.numCapturingParens += 1;
  84544. return true;
  84545. }
  84546. state.raise("Unterminated group");
  84547. }
  84548. return false;
  84549. };
  84550. pp$1.regexp_eatExtendedAtom = function(state) {
  84551. return state.eat(
  84552. 46
  84553. /* . */
  84554. ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
  84555. };
  84556. pp$1.regexp_eatInvalidBracedQuantifier = function(state) {
  84557. if (this.regexp_eatBracedQuantifier(state, true)) {
  84558. state.raise("Nothing to repeat");
  84559. }
  84560. return false;
  84561. };
  84562. pp$1.regexp_eatSyntaxCharacter = function(state) {
  84563. var ch = state.current();
  84564. if (isSyntaxCharacter(ch)) {
  84565. state.lastIntValue = ch;
  84566. state.advance();
  84567. return true;
  84568. }
  84569. return false;
  84570. };
  84571. function isSyntaxCharacter(ch) {
  84572. return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
  84573. }
  84574. pp$1.regexp_eatPatternCharacters = function(state) {
  84575. var start3 = state.pos;
  84576. var ch = 0;
  84577. while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {
  84578. state.advance();
  84579. }
  84580. return state.pos !== start3;
  84581. };
  84582. pp$1.regexp_eatExtendedPatternCharacter = function(state) {
  84583. var ch = state.current();
  84584. if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) {
  84585. state.advance();
  84586. return true;
  84587. }
  84588. return false;
  84589. };
  84590. pp$1.regexp_groupSpecifier = function(state) {
  84591. if (state.eat(
  84592. 63
  84593. /* ? */
  84594. )) {
  84595. if (this.regexp_eatGroupName(state)) {
  84596. if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
  84597. state.raise("Duplicate capture group name");
  84598. }
  84599. state.groupNames.push(state.lastStringValue);
  84600. return;
  84601. }
  84602. state.raise("Invalid group");
  84603. }
  84604. };
  84605. pp$1.regexp_eatGroupName = function(state) {
  84606. state.lastStringValue = "";
  84607. if (state.eat(
  84608. 60
  84609. /* < */
  84610. )) {
  84611. if (this.regexp_eatRegExpIdentifierName(state) && state.eat(
  84612. 62
  84613. /* > */
  84614. )) {
  84615. return true;
  84616. }
  84617. state.raise("Invalid capture group name");
  84618. }
  84619. return false;
  84620. };
  84621. pp$1.regexp_eatRegExpIdentifierName = function(state) {
  84622. state.lastStringValue = "";
  84623. if (this.regexp_eatRegExpIdentifierStart(state)) {
  84624. state.lastStringValue += codePointToString(state.lastIntValue);
  84625. while (this.regexp_eatRegExpIdentifierPart(state)) {
  84626. state.lastStringValue += codePointToString(state.lastIntValue);
  84627. }
  84628. return true;
  84629. }
  84630. return false;
  84631. };
  84632. pp$1.regexp_eatRegExpIdentifierStart = function(state) {
  84633. var start3 = state.pos;
  84634. var forceU = this.options.ecmaVersion >= 11;
  84635. var ch = state.current(forceU);
  84636. state.advance(forceU);
  84637. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  84638. ch = state.lastIntValue;
  84639. }
  84640. if (isRegExpIdentifierStart(ch)) {
  84641. state.lastIntValue = ch;
  84642. return true;
  84643. }
  84644. state.pos = start3;
  84645. return false;
  84646. };
  84647. function isRegExpIdentifierStart(ch) {
  84648. return isIdentifierStart(ch, true) || ch === 36 || ch === 95;
  84649. }
  84650. pp$1.regexp_eatRegExpIdentifierPart = function(state) {
  84651. var start3 = state.pos;
  84652. var forceU = this.options.ecmaVersion >= 11;
  84653. var ch = state.current(forceU);
  84654. state.advance(forceU);
  84655. if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
  84656. ch = state.lastIntValue;
  84657. }
  84658. if (isRegExpIdentifierPart(ch)) {
  84659. state.lastIntValue = ch;
  84660. return true;
  84661. }
  84662. state.pos = start3;
  84663. return false;
  84664. };
  84665. function isRegExpIdentifierPart(ch) {
  84666. return isIdentifierChar(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
  84667. }
  84668. pp$1.regexp_eatAtomEscape = function(state) {
  84669. if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {
  84670. return true;
  84671. }
  84672. if (state.switchU) {
  84673. if (state.current() === 99) {
  84674. state.raise("Invalid unicode escape");
  84675. }
  84676. state.raise("Invalid escape");
  84677. }
  84678. return false;
  84679. };
  84680. pp$1.regexp_eatBackReference = function(state) {
  84681. var start3 = state.pos;
  84682. if (this.regexp_eatDecimalEscape(state)) {
  84683. var n = state.lastIntValue;
  84684. if (state.switchU) {
  84685. if (n > state.maxBackReference) {
  84686. state.maxBackReference = n;
  84687. }
  84688. return true;
  84689. }
  84690. if (n <= state.numCapturingParens) {
  84691. return true;
  84692. }
  84693. state.pos = start3;
  84694. }
  84695. return false;
  84696. };
  84697. pp$1.regexp_eatKGroupName = function(state) {
  84698. if (state.eat(
  84699. 107
  84700. /* k */
  84701. )) {
  84702. if (this.regexp_eatGroupName(state)) {
  84703. state.backReferenceNames.push(state.lastStringValue);
  84704. return true;
  84705. }
  84706. state.raise("Invalid named reference");
  84707. }
  84708. return false;
  84709. };
  84710. pp$1.regexp_eatCharacterEscape = function(state) {
  84711. return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
  84712. };
  84713. pp$1.regexp_eatCControlLetter = function(state) {
  84714. var start3 = state.pos;
  84715. if (state.eat(
  84716. 99
  84717. /* c */
  84718. )) {
  84719. if (this.regexp_eatControlLetter(state)) {
  84720. return true;
  84721. }
  84722. state.pos = start3;
  84723. }
  84724. return false;
  84725. };
  84726. pp$1.regexp_eatZero = function(state) {
  84727. if (state.current() === 48 && !isDecimalDigit(state.lookahead())) {
  84728. state.lastIntValue = 0;
  84729. state.advance();
  84730. return true;
  84731. }
  84732. return false;
  84733. };
  84734. pp$1.regexp_eatControlEscape = function(state) {
  84735. var ch = state.current();
  84736. if (ch === 116) {
  84737. state.lastIntValue = 9;
  84738. state.advance();
  84739. return true;
  84740. }
  84741. if (ch === 110) {
  84742. state.lastIntValue = 10;
  84743. state.advance();
  84744. return true;
  84745. }
  84746. if (ch === 118) {
  84747. state.lastIntValue = 11;
  84748. state.advance();
  84749. return true;
  84750. }
  84751. if (ch === 102) {
  84752. state.lastIntValue = 12;
  84753. state.advance();
  84754. return true;
  84755. }
  84756. if (ch === 114) {
  84757. state.lastIntValue = 13;
  84758. state.advance();
  84759. return true;
  84760. }
  84761. return false;
  84762. };
  84763. pp$1.regexp_eatControlLetter = function(state) {
  84764. var ch = state.current();
  84765. if (isControlLetter(ch)) {
  84766. state.lastIntValue = ch % 32;
  84767. state.advance();
  84768. return true;
  84769. }
  84770. return false;
  84771. };
  84772. function isControlLetter(ch) {
  84773. return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
  84774. }
  84775. pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
  84776. if (forceU === void 0)
  84777. forceU = false;
  84778. var start3 = state.pos;
  84779. var switchU = forceU || state.switchU;
  84780. if (state.eat(
  84781. 117
  84782. /* u */
  84783. )) {
  84784. if (this.regexp_eatFixedHexDigits(state, 4)) {
  84785. var lead = state.lastIntValue;
  84786. if (switchU && lead >= 55296 && lead <= 56319) {
  84787. var leadSurrogateEnd = state.pos;
  84788. if (state.eat(
  84789. 92
  84790. /* \ */
  84791. ) && state.eat(
  84792. 117
  84793. /* u */
  84794. ) && this.regexp_eatFixedHexDigits(state, 4)) {
  84795. var trail = state.lastIntValue;
  84796. if (trail >= 56320 && trail <= 57343) {
  84797. state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536;
  84798. return true;
  84799. }
  84800. }
  84801. state.pos = leadSurrogateEnd;
  84802. state.lastIntValue = lead;
  84803. }
  84804. return true;
  84805. }
  84806. if (switchU && state.eat(
  84807. 123
  84808. /* { */
  84809. ) && this.regexp_eatHexDigits(state) && state.eat(
  84810. 125
  84811. /* } */
  84812. ) && isValidUnicode(state.lastIntValue)) {
  84813. return true;
  84814. }
  84815. if (switchU) {
  84816. state.raise("Invalid unicode escape");
  84817. }
  84818. state.pos = start3;
  84819. }
  84820. return false;
  84821. };
  84822. function isValidUnicode(ch) {
  84823. return ch >= 0 && ch <= 1114111;
  84824. }
  84825. pp$1.regexp_eatIdentityEscape = function(state) {
  84826. if (state.switchU) {
  84827. if (this.regexp_eatSyntaxCharacter(state)) {
  84828. return true;
  84829. }
  84830. if (state.eat(
  84831. 47
  84832. /* / */
  84833. )) {
  84834. state.lastIntValue = 47;
  84835. return true;
  84836. }
  84837. return false;
  84838. }
  84839. var ch = state.current();
  84840. if (ch !== 99 && (!state.switchN || ch !== 107)) {
  84841. state.lastIntValue = ch;
  84842. state.advance();
  84843. return true;
  84844. }
  84845. return false;
  84846. };
  84847. pp$1.regexp_eatDecimalEscape = function(state) {
  84848. state.lastIntValue = 0;
  84849. var ch = state.current();
  84850. if (ch >= 49 && ch <= 57) {
  84851. do {
  84852. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  84853. state.advance();
  84854. } while ((ch = state.current()) >= 48 && ch <= 57);
  84855. return true;
  84856. }
  84857. return false;
  84858. };
  84859. pp$1.regexp_eatCharacterClassEscape = function(state) {
  84860. var ch = state.current();
  84861. if (isCharacterClassEscape(ch)) {
  84862. state.lastIntValue = -1;
  84863. state.advance();
  84864. return true;
  84865. }
  84866. if (state.switchU && this.options.ecmaVersion >= 9 && (ch === 80 || ch === 112)) {
  84867. state.lastIntValue = -1;
  84868. state.advance();
  84869. if (state.eat(
  84870. 123
  84871. /* { */
  84872. ) && this.regexp_eatUnicodePropertyValueExpression(state) && state.eat(
  84873. 125
  84874. /* } */
  84875. )) {
  84876. return true;
  84877. }
  84878. state.raise("Invalid property name");
  84879. }
  84880. return false;
  84881. };
  84882. function isCharacterClassEscape(ch) {
  84883. return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
  84884. }
  84885. pp$1.regexp_eatUnicodePropertyValueExpression = function(state) {
  84886. var start3 = state.pos;
  84887. if (this.regexp_eatUnicodePropertyName(state) && state.eat(
  84888. 61
  84889. /* = */
  84890. )) {
  84891. var name2 = state.lastStringValue;
  84892. if (this.regexp_eatUnicodePropertyValue(state)) {
  84893. var value2 = state.lastStringValue;
  84894. this.regexp_validateUnicodePropertyNameAndValue(state, name2, value2);
  84895. return true;
  84896. }
  84897. }
  84898. state.pos = start3;
  84899. if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
  84900. var nameOrValue = state.lastStringValue;
  84901. this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
  84902. return true;
  84903. }
  84904. return false;
  84905. };
  84906. pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value2) {
  84907. if (!hasOwn(state.unicodeProperties.nonBinary, name2)) {
  84908. state.raise("Invalid property name");
  84909. }
  84910. if (!state.unicodeProperties.nonBinary[name2].test(value2)) {
  84911. state.raise("Invalid property value");
  84912. }
  84913. };
  84914. pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
  84915. if (!state.unicodeProperties.binary.test(nameOrValue)) {
  84916. state.raise("Invalid property name");
  84917. }
  84918. };
  84919. pp$1.regexp_eatUnicodePropertyName = function(state) {
  84920. var ch = 0;
  84921. state.lastStringValue = "";
  84922. while (isUnicodePropertyNameCharacter(ch = state.current())) {
  84923. state.lastStringValue += codePointToString(ch);
  84924. state.advance();
  84925. }
  84926. return state.lastStringValue !== "";
  84927. };
  84928. function isUnicodePropertyNameCharacter(ch) {
  84929. return isControlLetter(ch) || ch === 95;
  84930. }
  84931. pp$1.regexp_eatUnicodePropertyValue = function(state) {
  84932. var ch = 0;
  84933. state.lastStringValue = "";
  84934. while (isUnicodePropertyValueCharacter(ch = state.current())) {
  84935. state.lastStringValue += codePointToString(ch);
  84936. state.advance();
  84937. }
  84938. return state.lastStringValue !== "";
  84939. };
  84940. function isUnicodePropertyValueCharacter(ch) {
  84941. return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch);
  84942. }
  84943. pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
  84944. return this.regexp_eatUnicodePropertyValue(state);
  84945. };
  84946. pp$1.regexp_eatCharacterClass = function(state) {
  84947. if (state.eat(
  84948. 91
  84949. /* [ */
  84950. )) {
  84951. state.eat(
  84952. 94
  84953. /* ^ */
  84954. );
  84955. this.regexp_classRanges(state);
  84956. if (state.eat(
  84957. 93
  84958. /* ] */
  84959. )) {
  84960. return true;
  84961. }
  84962. state.raise("Unterminated character class");
  84963. }
  84964. return false;
  84965. };
  84966. pp$1.regexp_classRanges = function(state) {
  84967. while (this.regexp_eatClassAtom(state)) {
  84968. var left = state.lastIntValue;
  84969. if (state.eat(
  84970. 45
  84971. /* - */
  84972. ) && this.regexp_eatClassAtom(state)) {
  84973. var right = state.lastIntValue;
  84974. if (state.switchU && (left === -1 || right === -1)) {
  84975. state.raise("Invalid character class");
  84976. }
  84977. if (left !== -1 && right !== -1 && left > right) {
  84978. state.raise("Range out of order in character class");
  84979. }
  84980. }
  84981. }
  84982. };
  84983. pp$1.regexp_eatClassAtom = function(state) {
  84984. var start3 = state.pos;
  84985. if (state.eat(
  84986. 92
  84987. /* \ */
  84988. )) {
  84989. if (this.regexp_eatClassEscape(state)) {
  84990. return true;
  84991. }
  84992. if (state.switchU) {
  84993. var ch$1 = state.current();
  84994. if (ch$1 === 99 || isOctalDigit(ch$1)) {
  84995. state.raise("Invalid class escape");
  84996. }
  84997. state.raise("Invalid escape");
  84998. }
  84999. state.pos = start3;
  85000. }
  85001. var ch = state.current();
  85002. if (ch !== 93) {
  85003. state.lastIntValue = ch;
  85004. state.advance();
  85005. return true;
  85006. }
  85007. return false;
  85008. };
  85009. pp$1.regexp_eatClassEscape = function(state) {
  85010. var start3 = state.pos;
  85011. if (state.eat(
  85012. 98
  85013. /* b */
  85014. )) {
  85015. state.lastIntValue = 8;
  85016. return true;
  85017. }
  85018. if (state.switchU && state.eat(
  85019. 45
  85020. /* - */
  85021. )) {
  85022. state.lastIntValue = 45;
  85023. return true;
  85024. }
  85025. if (!state.switchU && state.eat(
  85026. 99
  85027. /* c */
  85028. )) {
  85029. if (this.regexp_eatClassControlLetter(state)) {
  85030. return true;
  85031. }
  85032. state.pos = start3;
  85033. }
  85034. return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
  85035. };
  85036. pp$1.regexp_eatClassControlLetter = function(state) {
  85037. var ch = state.current();
  85038. if (isDecimalDigit(ch) || ch === 95) {
  85039. state.lastIntValue = ch % 32;
  85040. state.advance();
  85041. return true;
  85042. }
  85043. return false;
  85044. };
  85045. pp$1.regexp_eatHexEscapeSequence = function(state) {
  85046. var start3 = state.pos;
  85047. if (state.eat(
  85048. 120
  85049. /* x */
  85050. )) {
  85051. if (this.regexp_eatFixedHexDigits(state, 2)) {
  85052. return true;
  85053. }
  85054. if (state.switchU) {
  85055. state.raise("Invalid escape");
  85056. }
  85057. state.pos = start3;
  85058. }
  85059. return false;
  85060. };
  85061. pp$1.regexp_eatDecimalDigits = function(state) {
  85062. var start3 = state.pos;
  85063. var ch = 0;
  85064. state.lastIntValue = 0;
  85065. while (isDecimalDigit(ch = state.current())) {
  85066. state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
  85067. state.advance();
  85068. }
  85069. return state.pos !== start3;
  85070. };
  85071. function isDecimalDigit(ch) {
  85072. return ch >= 48 && ch <= 57;
  85073. }
  85074. pp$1.regexp_eatHexDigits = function(state) {
  85075. var start3 = state.pos;
  85076. var ch = 0;
  85077. state.lastIntValue = 0;
  85078. while (isHexDigit(ch = state.current())) {
  85079. state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
  85080. state.advance();
  85081. }
  85082. return state.pos !== start3;
  85083. };
  85084. function isHexDigit(ch) {
  85085. return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
  85086. }
  85087. function hexToInt(ch) {
  85088. if (ch >= 65 && ch <= 70) {
  85089. return 10 + (ch - 65);
  85090. }
  85091. if (ch >= 97 && ch <= 102) {
  85092. return 10 + (ch - 97);
  85093. }
  85094. return ch - 48;
  85095. }
  85096. pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) {
  85097. if (this.regexp_eatOctalDigit(state)) {
  85098. var n1 = state.lastIntValue;
  85099. if (this.regexp_eatOctalDigit(state)) {
  85100. var n2 = state.lastIntValue;
  85101. if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
  85102. state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
  85103. } else {
  85104. state.lastIntValue = n1 * 8 + n2;
  85105. }
  85106. } else {
  85107. state.lastIntValue = n1;
  85108. }
  85109. return true;
  85110. }
  85111. return false;
  85112. };
  85113. pp$1.regexp_eatOctalDigit = function(state) {
  85114. var ch = state.current();
  85115. if (isOctalDigit(ch)) {
  85116. state.lastIntValue = ch - 48;
  85117. state.advance();
  85118. return true;
  85119. }
  85120. state.lastIntValue = 0;
  85121. return false;
  85122. };
  85123. function isOctalDigit(ch) {
  85124. return ch >= 48 && ch <= 55;
  85125. }
  85126. pp$1.regexp_eatFixedHexDigits = function(state, length) {
  85127. var start3 = state.pos;
  85128. state.lastIntValue = 0;
  85129. for (var i = 0; i < length; ++i) {
  85130. var ch = state.current();
  85131. if (!isHexDigit(ch)) {
  85132. state.pos = start3;
  85133. return false;
  85134. }
  85135. state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
  85136. state.advance();
  85137. }
  85138. return true;
  85139. };
  85140. var Token = function Token2(p) {
  85141. this.type = p.type;
  85142. this.value = p.value;
  85143. this.start = p.start;
  85144. this.end = p.end;
  85145. if (p.options.locations) {
  85146. this.loc = new SourceLocation(p, p.startLoc, p.endLoc);
  85147. }
  85148. if (p.options.ranges) {
  85149. this.range = [p.start, p.end];
  85150. }
  85151. };
  85152. var pp = Parser.prototype;
  85153. pp.next = function(ignoreEscapeSequenceInKeyword) {
  85154. if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) {
  85155. this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword);
  85156. }
  85157. if (this.options.onToken) {
  85158. this.options.onToken(new Token(this));
  85159. }
  85160. this.lastTokEnd = this.end;
  85161. this.lastTokStart = this.start;
  85162. this.lastTokEndLoc = this.endLoc;
  85163. this.lastTokStartLoc = this.startLoc;
  85164. this.nextToken();
  85165. };
  85166. pp.getToken = function() {
  85167. this.next();
  85168. return new Token(this);
  85169. };
  85170. if (typeof Symbol !== "undefined") {
  85171. pp[Symbol.iterator] = function() {
  85172. var this$1$1 = this;
  85173. return {
  85174. next: function() {
  85175. var token2 = this$1$1.getToken();
  85176. return {
  85177. done: token2.type === types$1.eof,
  85178. value: token2
  85179. };
  85180. }
  85181. };
  85182. };
  85183. }
  85184. pp.nextToken = function() {
  85185. var curContext = this.curContext();
  85186. if (!curContext || !curContext.preserveSpace) {
  85187. this.skipSpace();
  85188. }
  85189. this.start = this.pos;
  85190. if (this.options.locations) {
  85191. this.startLoc = this.curPosition();
  85192. }
  85193. if (this.pos >= this.input.length) {
  85194. return this.finishToken(types$1.eof);
  85195. }
  85196. if (curContext.override) {
  85197. return curContext.override(this);
  85198. } else {
  85199. this.readToken(this.fullCharCodeAtPos());
  85200. }
  85201. };
  85202. pp.readToken = function(code2) {
  85203. if (isIdentifierStart(code2, this.options.ecmaVersion >= 6) || code2 === 92) {
  85204. return this.readWord();
  85205. }
  85206. return this.getTokenFromCode(code2);
  85207. };
  85208. pp.fullCharCodeAtPos = function() {
  85209. var code2 = this.input.charCodeAt(this.pos);
  85210. if (code2 <= 55295 || code2 >= 56320) {
  85211. return code2;
  85212. }
  85213. var next = this.input.charCodeAt(this.pos + 1);
  85214. return next <= 56319 || next >= 57344 ? code2 : (code2 << 10) + next - 56613888;
  85215. };
  85216. pp.skipBlockComment = function() {
  85217. var startLoc = this.options.onComment && this.curPosition();
  85218. var start3 = this.pos, end = this.input.indexOf("*/", this.pos += 2);
  85219. if (end === -1) {
  85220. this.raise(this.pos - 2, "Unterminated comment");
  85221. }
  85222. this.pos = end + 2;
  85223. if (this.options.locations) {
  85224. for (var nextBreak = void 0, pos2 = start3; (nextBreak = nextLineBreak(this.input, pos2, this.pos)) > -1; ) {
  85225. ++this.curLine;
  85226. pos2 = this.lineStart = nextBreak;
  85227. }
  85228. }
  85229. if (this.options.onComment) {
  85230. this.options.onComment(
  85231. true,
  85232. this.input.slice(start3 + 2, end),
  85233. start3,
  85234. this.pos,
  85235. startLoc,
  85236. this.curPosition()
  85237. );
  85238. }
  85239. };
  85240. pp.skipLineComment = function(startSkip) {
  85241. var start3 = this.pos;
  85242. var startLoc = this.options.onComment && this.curPosition();
  85243. var ch = this.input.charCodeAt(this.pos += startSkip);
  85244. while (this.pos < this.input.length && !isNewLine(ch)) {
  85245. ch = this.input.charCodeAt(++this.pos);
  85246. }
  85247. if (this.options.onComment) {
  85248. this.options.onComment(
  85249. false,
  85250. this.input.slice(start3 + startSkip, this.pos),
  85251. start3,
  85252. this.pos,
  85253. startLoc,
  85254. this.curPosition()
  85255. );
  85256. }
  85257. };
  85258. pp.skipSpace = function() {
  85259. loop:
  85260. while (this.pos < this.input.length) {
  85261. var ch = this.input.charCodeAt(this.pos);
  85262. switch (ch) {
  85263. case 32:
  85264. case 160:
  85265. ++this.pos;
  85266. break;
  85267. case 13:
  85268. if (this.input.charCodeAt(this.pos + 1) === 10) {
  85269. ++this.pos;
  85270. }
  85271. case 10:
  85272. case 8232:
  85273. case 8233:
  85274. ++this.pos;
  85275. if (this.options.locations) {
  85276. ++this.curLine;
  85277. this.lineStart = this.pos;
  85278. }
  85279. break;
  85280. case 47:
  85281. switch (this.input.charCodeAt(this.pos + 1)) {
  85282. case 42:
  85283. this.skipBlockComment();
  85284. break;
  85285. case 47:
  85286. this.skipLineComment(2);
  85287. break;
  85288. default:
  85289. break loop;
  85290. }
  85291. break;
  85292. default:
  85293. if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
  85294. ++this.pos;
  85295. } else {
  85296. break loop;
  85297. }
  85298. }
  85299. }
  85300. };
  85301. pp.finishToken = function(type, val) {
  85302. this.end = this.pos;
  85303. if (this.options.locations) {
  85304. this.endLoc = this.curPosition();
  85305. }
  85306. var prevType = this.type;
  85307. this.type = type;
  85308. this.value = val;
  85309. this.updateContext(prevType);
  85310. };
  85311. pp.readToken_dot = function() {
  85312. var next = this.input.charCodeAt(this.pos + 1);
  85313. if (next >= 48 && next <= 57) {
  85314. return this.readNumber(true);
  85315. }
  85316. var next2 = this.input.charCodeAt(this.pos + 2);
  85317. if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
  85318. this.pos += 3;
  85319. return this.finishToken(types$1.ellipsis);
  85320. } else {
  85321. ++this.pos;
  85322. return this.finishToken(types$1.dot);
  85323. }
  85324. };
  85325. pp.readToken_slash = function() {
  85326. var next = this.input.charCodeAt(this.pos + 1);
  85327. if (this.exprAllowed) {
  85328. ++this.pos;
  85329. return this.readRegexp();
  85330. }
  85331. if (next === 61) {
  85332. return this.finishOp(types$1.assign, 2);
  85333. }
  85334. return this.finishOp(types$1.slash, 1);
  85335. };
  85336. pp.readToken_mult_modulo_exp = function(code2) {
  85337. var next = this.input.charCodeAt(this.pos + 1);
  85338. var size = 1;
  85339. var tokentype = code2 === 42 ? types$1.star : types$1.modulo;
  85340. if (this.options.ecmaVersion >= 7 && code2 === 42 && next === 42) {
  85341. ++size;
  85342. tokentype = types$1.starstar;
  85343. next = this.input.charCodeAt(this.pos + 2);
  85344. }
  85345. if (next === 61) {
  85346. return this.finishOp(types$1.assign, size + 1);
  85347. }
  85348. return this.finishOp(tokentype, size);
  85349. };
  85350. pp.readToken_pipe_amp = function(code2) {
  85351. var next = this.input.charCodeAt(this.pos + 1);
  85352. if (next === code2) {
  85353. if (this.options.ecmaVersion >= 12) {
  85354. var next2 = this.input.charCodeAt(this.pos + 2);
  85355. if (next2 === 61) {
  85356. return this.finishOp(types$1.assign, 3);
  85357. }
  85358. }
  85359. return this.finishOp(code2 === 124 ? types$1.logicalOR : types$1.logicalAND, 2);
  85360. }
  85361. if (next === 61) {
  85362. return this.finishOp(types$1.assign, 2);
  85363. }
  85364. return this.finishOp(code2 === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1);
  85365. };
  85366. pp.readToken_caret = function() {
  85367. var next = this.input.charCodeAt(this.pos + 1);
  85368. if (next === 61) {
  85369. return this.finishOp(types$1.assign, 2);
  85370. }
  85371. return this.finishOp(types$1.bitwiseXOR, 1);
  85372. };
  85373. pp.readToken_plus_min = function(code2) {
  85374. var next = this.input.charCodeAt(this.pos + 1);
  85375. if (next === code2) {
  85376. if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
  85377. this.skipLineComment(3);
  85378. this.skipSpace();
  85379. return this.nextToken();
  85380. }
  85381. return this.finishOp(types$1.incDec, 2);
  85382. }
  85383. if (next === 61) {
  85384. return this.finishOp(types$1.assign, 2);
  85385. }
  85386. return this.finishOp(types$1.plusMin, 1);
  85387. };
  85388. pp.readToken_lt_gt = function(code2) {
  85389. var next = this.input.charCodeAt(this.pos + 1);
  85390. var size = 1;
  85391. if (next === code2) {
  85392. size = code2 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
  85393. if (this.input.charCodeAt(this.pos + size) === 61) {
  85394. return this.finishOp(types$1.assign, size + 1);
  85395. }
  85396. return this.finishOp(types$1.bitShift, size);
  85397. }
  85398. if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
  85399. this.skipLineComment(4);
  85400. this.skipSpace();
  85401. return this.nextToken();
  85402. }
  85403. if (next === 61) {
  85404. size = 2;
  85405. }
  85406. return this.finishOp(types$1.relational, size);
  85407. };
  85408. pp.readToken_eq_excl = function(code2) {
  85409. var next = this.input.charCodeAt(this.pos + 1);
  85410. if (next === 61) {
  85411. return this.finishOp(types$1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
  85412. }
  85413. if (code2 === 61 && next === 62 && this.options.ecmaVersion >= 6) {
  85414. this.pos += 2;
  85415. return this.finishToken(types$1.arrow);
  85416. }
  85417. return this.finishOp(code2 === 61 ? types$1.eq : types$1.prefix, 1);
  85418. };
  85419. pp.readToken_question = function() {
  85420. var ecmaVersion = this.options.ecmaVersion;
  85421. if (ecmaVersion >= 11) {
  85422. var next = this.input.charCodeAt(this.pos + 1);
  85423. if (next === 46) {
  85424. var next2 = this.input.charCodeAt(this.pos + 2);
  85425. if (next2 < 48 || next2 > 57) {
  85426. return this.finishOp(types$1.questionDot, 2);
  85427. }
  85428. }
  85429. if (next === 63) {
  85430. if (ecmaVersion >= 12) {
  85431. var next2$1 = this.input.charCodeAt(this.pos + 2);
  85432. if (next2$1 === 61) {
  85433. return this.finishOp(types$1.assign, 3);
  85434. }
  85435. }
  85436. return this.finishOp(types$1.coalesce, 2);
  85437. }
  85438. }
  85439. return this.finishOp(types$1.question, 1);
  85440. };
  85441. pp.readToken_numberSign = function() {
  85442. var ecmaVersion = this.options.ecmaVersion;
  85443. var code2 = 35;
  85444. if (ecmaVersion >= 13) {
  85445. ++this.pos;
  85446. code2 = this.fullCharCodeAtPos();
  85447. if (isIdentifierStart(code2, true) || code2 === 92) {
  85448. return this.finishToken(types$1.privateId, this.readWord1());
  85449. }
  85450. }
  85451. this.raise(this.pos, "Unexpected character '" + codePointToString(code2) + "'");
  85452. };
  85453. pp.getTokenFromCode = function(code2) {
  85454. switch (code2) {
  85455. case 46:
  85456. return this.readToken_dot();
  85457. case 40:
  85458. ++this.pos;
  85459. return this.finishToken(types$1.parenL);
  85460. case 41:
  85461. ++this.pos;
  85462. return this.finishToken(types$1.parenR);
  85463. case 59:
  85464. ++this.pos;
  85465. return this.finishToken(types$1.semi);
  85466. case 44:
  85467. ++this.pos;
  85468. return this.finishToken(types$1.comma);
  85469. case 91:
  85470. ++this.pos;
  85471. return this.finishToken(types$1.bracketL);
  85472. case 93:
  85473. ++this.pos;
  85474. return this.finishToken(types$1.bracketR);
  85475. case 123:
  85476. ++this.pos;
  85477. return this.finishToken(types$1.braceL);
  85478. case 125:
  85479. ++this.pos;
  85480. return this.finishToken(types$1.braceR);
  85481. case 58:
  85482. ++this.pos;
  85483. return this.finishToken(types$1.colon);
  85484. case 96:
  85485. if (this.options.ecmaVersion < 6) {
  85486. break;
  85487. }
  85488. ++this.pos;
  85489. return this.finishToken(types$1.backQuote);
  85490. case 48:
  85491. var next = this.input.charCodeAt(this.pos + 1);
  85492. if (next === 120 || next === 88) {
  85493. return this.readRadixNumber(16);
  85494. }
  85495. if (this.options.ecmaVersion >= 6) {
  85496. if (next === 111 || next === 79) {
  85497. return this.readRadixNumber(8);
  85498. }
  85499. if (next === 98 || next === 66) {
  85500. return this.readRadixNumber(2);
  85501. }
  85502. }
  85503. case 49:
  85504. case 50:
  85505. case 51:
  85506. case 52:
  85507. case 53:
  85508. case 54:
  85509. case 55:
  85510. case 56:
  85511. case 57:
  85512. return this.readNumber(false);
  85513. case 34:
  85514. case 39:
  85515. return this.readString(code2);
  85516. case 47:
  85517. return this.readToken_slash();
  85518. case 37:
  85519. case 42:
  85520. return this.readToken_mult_modulo_exp(code2);
  85521. case 124:
  85522. case 38:
  85523. return this.readToken_pipe_amp(code2);
  85524. case 94:
  85525. return this.readToken_caret();
  85526. case 43:
  85527. case 45:
  85528. return this.readToken_plus_min(code2);
  85529. case 60:
  85530. case 62:
  85531. return this.readToken_lt_gt(code2);
  85532. case 61:
  85533. case 33:
  85534. return this.readToken_eq_excl(code2);
  85535. case 63:
  85536. return this.readToken_question();
  85537. case 126:
  85538. return this.finishOp(types$1.prefix, 1);
  85539. case 35:
  85540. return this.readToken_numberSign();
  85541. }
  85542. this.raise(this.pos, "Unexpected character '" + codePointToString(code2) + "'");
  85543. };
  85544. pp.finishOp = function(type, size) {
  85545. var str = this.input.slice(this.pos, this.pos + size);
  85546. this.pos += size;
  85547. return this.finishToken(type, str);
  85548. };
  85549. pp.readRegexp = function() {
  85550. var escaped, inClass, start3 = this.pos;
  85551. for (; ; ) {
  85552. if (this.pos >= this.input.length) {
  85553. this.raise(start3, "Unterminated regular expression");
  85554. }
  85555. var ch = this.input.charAt(this.pos);
  85556. if (lineBreak.test(ch)) {
  85557. this.raise(start3, "Unterminated regular expression");
  85558. }
  85559. if (!escaped) {
  85560. if (ch === "[") {
  85561. inClass = true;
  85562. } else if (ch === "]" && inClass) {
  85563. inClass = false;
  85564. } else if (ch === "/" && !inClass) {
  85565. break;
  85566. }
  85567. escaped = ch === "\\";
  85568. } else {
  85569. escaped = false;
  85570. }
  85571. ++this.pos;
  85572. }
  85573. var pattern = this.input.slice(start3, this.pos);
  85574. ++this.pos;
  85575. var flagsStart = this.pos;
  85576. var flags = this.readWord1();
  85577. if (this.containsEsc) {
  85578. this.unexpected(flagsStart);
  85579. }
  85580. var state = this.regexpState || (this.regexpState = new RegExpValidationState(this));
  85581. state.reset(start3, pattern, flags);
  85582. this.validateRegExpFlags(state);
  85583. this.validateRegExpPattern(state);
  85584. var value2 = null;
  85585. try {
  85586. value2 = new RegExp(pattern, flags);
  85587. } catch (e) {
  85588. }
  85589. return this.finishToken(types$1.regexp, { pattern, flags, value: value2 });
  85590. };
  85591. pp.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
  85592. var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0;
  85593. var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
  85594. var start3 = this.pos, total = 0, lastCode = 0;
  85595. for (var i = 0, e = len == null ? Infinity : len; i < e; ++i, ++this.pos) {
  85596. var code2 = this.input.charCodeAt(this.pos), val = void 0;
  85597. if (allowSeparators && code2 === 95) {
  85598. if (isLegacyOctalNumericLiteral) {
  85599. this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals");
  85600. }
  85601. if (lastCode === 95) {
  85602. this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore");
  85603. }
  85604. if (i === 0) {
  85605. this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits");
  85606. }
  85607. lastCode = code2;
  85608. continue;
  85609. }
  85610. if (code2 >= 97) {
  85611. val = code2 - 97 + 10;
  85612. } else if (code2 >= 65) {
  85613. val = code2 - 65 + 10;
  85614. } else if (code2 >= 48 && code2 <= 57) {
  85615. val = code2 - 48;
  85616. } else {
  85617. val = Infinity;
  85618. }
  85619. if (val >= radix) {
  85620. break;
  85621. }
  85622. lastCode = code2;
  85623. total = total * radix + val;
  85624. }
  85625. if (allowSeparators && lastCode === 95) {
  85626. this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits");
  85627. }
  85628. if (this.pos === start3 || len != null && this.pos - start3 !== len) {
  85629. return null;
  85630. }
  85631. return total;
  85632. };
  85633. function stringToNumber(str, isLegacyOctalNumericLiteral) {
  85634. if (isLegacyOctalNumericLiteral) {
  85635. return parseInt(str, 8);
  85636. }
  85637. return parseFloat(str.replace(/_/g, ""));
  85638. }
  85639. function stringToBigInt(str) {
  85640. if (typeof BigInt !== "function") {
  85641. return null;
  85642. }
  85643. return BigInt(str.replace(/_/g, ""));
  85644. }
  85645. pp.readRadixNumber = function(radix) {
  85646. var start3 = this.pos;
  85647. this.pos += 2;
  85648. var val = this.readInt(radix);
  85649. if (val == null) {
  85650. this.raise(this.start + 2, "Expected number in radix " + radix);
  85651. }
  85652. if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {
  85653. val = stringToBigInt(this.input.slice(start3, this.pos));
  85654. ++this.pos;
  85655. } else if (isIdentifierStart(this.fullCharCodeAtPos())) {
  85656. this.raise(this.pos, "Identifier directly after number");
  85657. }
  85658. return this.finishToken(types$1.num, val);
  85659. };
  85660. pp.readNumber = function(startsWithDot) {
  85661. var start3 = this.pos;
  85662. if (!startsWithDot && this.readInt(10, void 0, true) === null) {
  85663. this.raise(start3, "Invalid number");
  85664. }
  85665. var octal = this.pos - start3 >= 2 && this.input.charCodeAt(start3) === 48;
  85666. if (octal && this.strict) {
  85667. this.raise(start3, "Invalid number");
  85668. }
  85669. var next = this.input.charCodeAt(this.pos);
  85670. if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
  85671. var val$1 = stringToBigInt(this.input.slice(start3, this.pos));
  85672. ++this.pos;
  85673. if (isIdentifierStart(this.fullCharCodeAtPos())) {
  85674. this.raise(this.pos, "Identifier directly after number");
  85675. }
  85676. return this.finishToken(types$1.num, val$1);
  85677. }
  85678. if (octal && /[89]/.test(this.input.slice(start3, this.pos))) {
  85679. octal = false;
  85680. }
  85681. if (next === 46 && !octal) {
  85682. ++this.pos;
  85683. this.readInt(10);
  85684. next = this.input.charCodeAt(this.pos);
  85685. }
  85686. if ((next === 69 || next === 101) && !octal) {
  85687. next = this.input.charCodeAt(++this.pos);
  85688. if (next === 43 || next === 45) {
  85689. ++this.pos;
  85690. }
  85691. if (this.readInt(10) === null) {
  85692. this.raise(start3, "Invalid number");
  85693. }
  85694. }
  85695. if (isIdentifierStart(this.fullCharCodeAtPos())) {
  85696. this.raise(this.pos, "Identifier directly after number");
  85697. }
  85698. var val = stringToNumber(this.input.slice(start3, this.pos), octal);
  85699. return this.finishToken(types$1.num, val);
  85700. };
  85701. pp.readCodePoint = function() {
  85702. var ch = this.input.charCodeAt(this.pos), code2;
  85703. if (ch === 123) {
  85704. if (this.options.ecmaVersion < 6) {
  85705. this.unexpected();
  85706. }
  85707. var codePos = ++this.pos;
  85708. code2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
  85709. ++this.pos;
  85710. if (code2 > 1114111) {
  85711. this.invalidStringToken(codePos, "Code point out of bounds");
  85712. }
  85713. } else {
  85714. code2 = this.readHexChar(4);
  85715. }
  85716. return code2;
  85717. };
  85718. pp.readString = function(quote) {
  85719. var out = "", chunkStart = ++this.pos;
  85720. for (; ; ) {
  85721. if (this.pos >= this.input.length) {
  85722. this.raise(this.start, "Unterminated string constant");
  85723. }
  85724. var ch = this.input.charCodeAt(this.pos);
  85725. if (ch === quote) {
  85726. break;
  85727. }
  85728. if (ch === 92) {
  85729. out += this.input.slice(chunkStart, this.pos);
  85730. out += this.readEscapedChar(false);
  85731. chunkStart = this.pos;
  85732. } else if (ch === 8232 || ch === 8233) {
  85733. if (this.options.ecmaVersion < 10) {
  85734. this.raise(this.start, "Unterminated string constant");
  85735. }
  85736. ++this.pos;
  85737. if (this.options.locations) {
  85738. this.curLine++;
  85739. this.lineStart = this.pos;
  85740. }
  85741. } else {
  85742. if (isNewLine(ch)) {
  85743. this.raise(this.start, "Unterminated string constant");
  85744. }
  85745. ++this.pos;
  85746. }
  85747. }
  85748. out += this.input.slice(chunkStart, this.pos++);
  85749. return this.finishToken(types$1.string, out);
  85750. };
  85751. var INVALID_TEMPLATE_ESCAPE_ERROR = {};
  85752. pp.tryReadTemplateToken = function() {
  85753. this.inTemplateElement = true;
  85754. try {
  85755. this.readTmplToken();
  85756. } catch (err) {
  85757. if (err === INVALID_TEMPLATE_ESCAPE_ERROR) {
  85758. this.readInvalidTemplateToken();
  85759. } else {
  85760. throw err;
  85761. }
  85762. }
  85763. this.inTemplateElement = false;
  85764. };
  85765. pp.invalidStringToken = function(position3, message) {
  85766. if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
  85767. throw INVALID_TEMPLATE_ESCAPE_ERROR;
  85768. } else {
  85769. this.raise(position3, message);
  85770. }
  85771. };
  85772. pp.readTmplToken = function() {
  85773. var out = "", chunkStart = this.pos;
  85774. for (; ; ) {
  85775. if (this.pos >= this.input.length) {
  85776. this.raise(this.start, "Unterminated template");
  85777. }
  85778. var ch = this.input.charCodeAt(this.pos);
  85779. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
  85780. if (this.pos === this.start && (this.type === types$1.template || this.type === types$1.invalidTemplate)) {
  85781. if (ch === 36) {
  85782. this.pos += 2;
  85783. return this.finishToken(types$1.dollarBraceL);
  85784. } else {
  85785. ++this.pos;
  85786. return this.finishToken(types$1.backQuote);
  85787. }
  85788. }
  85789. out += this.input.slice(chunkStart, this.pos);
  85790. return this.finishToken(types$1.template, out);
  85791. }
  85792. if (ch === 92) {
  85793. out += this.input.slice(chunkStart, this.pos);
  85794. out += this.readEscapedChar(true);
  85795. chunkStart = this.pos;
  85796. } else if (isNewLine(ch)) {
  85797. out += this.input.slice(chunkStart, this.pos);
  85798. ++this.pos;
  85799. switch (ch) {
  85800. case 13:
  85801. if (this.input.charCodeAt(this.pos) === 10) {
  85802. ++this.pos;
  85803. }
  85804. case 10:
  85805. out += "\n";
  85806. break;
  85807. default:
  85808. out += String.fromCharCode(ch);
  85809. break;
  85810. }
  85811. if (this.options.locations) {
  85812. ++this.curLine;
  85813. this.lineStart = this.pos;
  85814. }
  85815. chunkStart = this.pos;
  85816. } else {
  85817. ++this.pos;
  85818. }
  85819. }
  85820. };
  85821. pp.readInvalidTemplateToken = function() {
  85822. for (; this.pos < this.input.length; this.pos++) {
  85823. switch (this.input[this.pos]) {
  85824. case "\\":
  85825. ++this.pos;
  85826. break;
  85827. case "$":
  85828. if (this.input[this.pos + 1] !== "{") {
  85829. break;
  85830. }
  85831. case "`":
  85832. return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos));
  85833. }
  85834. }
  85835. this.raise(this.start, "Unterminated template");
  85836. };
  85837. pp.readEscapedChar = function(inTemplate) {
  85838. var ch = this.input.charCodeAt(++this.pos);
  85839. ++this.pos;
  85840. switch (ch) {
  85841. case 110:
  85842. return "\n";
  85843. case 114:
  85844. return "\r";
  85845. case 120:
  85846. return String.fromCharCode(this.readHexChar(2));
  85847. case 117:
  85848. return codePointToString(this.readCodePoint());
  85849. case 116:
  85850. return " ";
  85851. case 98:
  85852. return "\b";
  85853. case 118:
  85854. return "\v";
  85855. case 102:
  85856. return "\f";
  85857. case 13:
  85858. if (this.input.charCodeAt(this.pos) === 10) {
  85859. ++this.pos;
  85860. }
  85861. case 10:
  85862. if (this.options.locations) {
  85863. this.lineStart = this.pos;
  85864. ++this.curLine;
  85865. }
  85866. return "";
  85867. case 56:
  85868. case 57:
  85869. if (this.strict) {
  85870. this.invalidStringToken(
  85871. this.pos - 1,
  85872. "Invalid escape sequence"
  85873. );
  85874. }
  85875. if (inTemplate) {
  85876. var codePos = this.pos - 1;
  85877. this.invalidStringToken(
  85878. codePos,
  85879. "Invalid escape sequence in template string"
  85880. );
  85881. }
  85882. default:
  85883. if (ch >= 48 && ch <= 55) {
  85884. var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
  85885. var octal = parseInt(octalStr, 8);
  85886. if (octal > 255) {
  85887. octalStr = octalStr.slice(0, -1);
  85888. octal = parseInt(octalStr, 8);
  85889. }
  85890. this.pos += octalStr.length - 1;
  85891. ch = this.input.charCodeAt(this.pos);
  85892. if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
  85893. this.invalidStringToken(
  85894. this.pos - 1 - octalStr.length,
  85895. inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"
  85896. );
  85897. }
  85898. return String.fromCharCode(octal);
  85899. }
  85900. if (isNewLine(ch)) {
  85901. return "";
  85902. }
  85903. return String.fromCharCode(ch);
  85904. }
  85905. };
  85906. pp.readHexChar = function(len) {
  85907. var codePos = this.pos;
  85908. var n = this.readInt(16, len);
  85909. if (n === null) {
  85910. this.invalidStringToken(codePos, "Bad character escape sequence");
  85911. }
  85912. return n;
  85913. };
  85914. pp.readWord1 = function() {
  85915. this.containsEsc = false;
  85916. var word = "", first = true, chunkStart = this.pos;
  85917. var astral = this.options.ecmaVersion >= 6;
  85918. while (this.pos < this.input.length) {
  85919. var ch = this.fullCharCodeAtPos();
  85920. if (isIdentifierChar(ch, astral)) {
  85921. this.pos += ch <= 65535 ? 1 : 2;
  85922. } else if (ch === 92) {
  85923. this.containsEsc = true;
  85924. word += this.input.slice(chunkStart, this.pos);
  85925. var escStart = this.pos;
  85926. if (this.input.charCodeAt(++this.pos) !== 117) {
  85927. this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX");
  85928. }
  85929. ++this.pos;
  85930. var esc = this.readCodePoint();
  85931. if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) {
  85932. this.invalidStringToken(escStart, "Invalid Unicode escape");
  85933. }
  85934. word += codePointToString(esc);
  85935. chunkStart = this.pos;
  85936. } else {
  85937. break;
  85938. }
  85939. first = false;
  85940. }
  85941. return word + this.input.slice(chunkStart, this.pos);
  85942. };
  85943. pp.readWord = function() {
  85944. var word = this.readWord1();
  85945. var type = types$1.name;
  85946. if (this.keywords.test(word)) {
  85947. type = keywords[word];
  85948. }
  85949. return this.finishToken(type, word);
  85950. };
  85951. var version = "8.8.2";
  85952. Parser.acorn = {
  85953. Parser,
  85954. version,
  85955. defaultOptions,
  85956. Position,
  85957. SourceLocation,
  85958. getLineInfo,
  85959. Node,
  85960. TokenType,
  85961. tokTypes: types$1,
  85962. keywordTypes: keywords,
  85963. TokContext,
  85964. tokContexts: types,
  85965. isIdentifierChar,
  85966. isIdentifierStart,
  85967. Token,
  85968. isNewLine,
  85969. lineBreak,
  85970. lineBreakG,
  85971. nonASCIIwhitespace
  85972. };
  85973. // node_modules/micromark-extension-mdxjs/index.js
  85974. var import_acorn_jsx = __toESM(require_acorn_jsx(), 1);
  85975. // node_modules/micromark-util-chunked/index.js
  85976. function splice(list3, start3, remove, items) {
  85977. const end = list3.length;
  85978. let chunkStart = 0;
  85979. let parameters;
  85980. if (start3 < 0) {
  85981. start3 = -start3 > end ? 0 : end + start3;
  85982. } else {
  85983. start3 = start3 > end ? end : start3;
  85984. }
  85985. remove = remove > 0 ? remove : 0;
  85986. if (items.length < 1e4) {
  85987. parameters = Array.from(items);
  85988. parameters.unshift(start3, remove);
  85989. [].splice.apply(list3, parameters);
  85990. } else {
  85991. if (remove)
  85992. [].splice.apply(list3, [start3, remove]);
  85993. while (chunkStart < items.length) {
  85994. parameters = items.slice(chunkStart, chunkStart + 1e4);
  85995. parameters.unshift(start3, 0);
  85996. [].splice.apply(list3, parameters);
  85997. chunkStart += 1e4;
  85998. start3 += 1e4;
  85999. }
  86000. }
  86001. }
  86002. function push(list3, items) {
  86003. if (list3.length > 0) {
  86004. splice(list3, list3.length, 0, items);
  86005. return list3;
  86006. }
  86007. return items;
  86008. }
  86009. // node_modules/micromark-util-combine-extensions/index.js
  86010. var hasOwnProperty3 = {}.hasOwnProperty;
  86011. function combineExtensions(extensions) {
  86012. const all4 = {};
  86013. let index2 = -1;
  86014. while (++index2 < extensions.length) {
  86015. syntaxExtension(all4, extensions[index2]);
  86016. }
  86017. return all4;
  86018. }
  86019. function syntaxExtension(all4, extension2) {
  86020. let hook;
  86021. for (hook in extension2) {
  86022. const maybe = hasOwnProperty3.call(all4, hook) ? all4[hook] : void 0;
  86023. const left = maybe || (all4[hook] = {});
  86024. const right = extension2[hook];
  86025. let code2;
  86026. for (code2 in right) {
  86027. if (!hasOwnProperty3.call(left, code2))
  86028. left[code2] = [];
  86029. const value2 = right[code2];
  86030. constructs(
  86031. // @ts-expect-error Looks like a list.
  86032. left[code2],
  86033. Array.isArray(value2) ? value2 : value2 ? [value2] : []
  86034. );
  86035. }
  86036. }
  86037. }
  86038. function constructs(existing, list3) {
  86039. let index2 = -1;
  86040. const before = [];
  86041. while (++index2 < list3.length) {
  86042. ;
  86043. (list3[index2].add === "after" ? existing : before).push(list3[index2]);
  86044. }
  86045. splice(existing, 0, 0, before);
  86046. }
  86047. // node_modules/micromark-util-character/lib/unicode-punctuation-regex.js
  86048. var unicodePunctuationRegex = /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;
  86049. // node_modules/micromark-util-character/index.js
  86050. var asciiAlpha = regexCheck(/[A-Za-z]/);
  86051. var asciiDigit = regexCheck(/\d/);
  86052. var asciiHexDigit = regexCheck(/[\dA-Fa-f]/);
  86053. var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
  86054. var asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);
  86055. var asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
  86056. function asciiControl(code2) {
  86057. return (
  86058. // Special whitespace codes (which have negative values), C0 and Control
  86059. // character DEL
  86060. code2 !== null && (code2 < 32 || code2 === 127)
  86061. );
  86062. }
  86063. function markdownLineEndingOrSpace(code2) {
  86064. return code2 !== null && (code2 < 0 || code2 === 32);
  86065. }
  86066. function markdownLineEnding(code2) {
  86067. return code2 !== null && code2 < -2;
  86068. }
  86069. function markdownSpace(code2) {
  86070. return code2 === -2 || code2 === -1 || code2 === 32;
  86071. }
  86072. var unicodeWhitespace = regexCheck(/\s/);
  86073. var unicodePunctuation = regexCheck(unicodePunctuationRegex);
  86074. function regexCheck(regex2) {
  86075. return check;
  86076. function check(code2) {
  86077. return code2 !== null && regex2.test(String.fromCharCode(code2));
  86078. }
  86079. }
  86080. // node_modules/micromark-factory-space/index.js
  86081. function factorySpace(effects, ok2, type, max) {
  86082. const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
  86083. let size = 0;
  86084. return start3;
  86085. function start3(code2) {
  86086. if (markdownSpace(code2)) {
  86087. effects.enter(type);
  86088. return prefix(code2);
  86089. }
  86090. return ok2(code2);
  86091. }
  86092. function prefix(code2) {
  86093. if (markdownSpace(code2) && size++ < limit) {
  86094. effects.consume(code2);
  86095. return prefix;
  86096. }
  86097. effects.exit(type);
  86098. return ok2(code2);
  86099. }
  86100. }
  86101. // node_modules/unist-util-position-from-estree/lib/index.js
  86102. function positionFromEstree(node2) {
  86103. const nodeLike = node2 || {};
  86104. const loc = nodeLike.loc || {};
  86105. const range = nodeLike.range || [0, 0];
  86106. const startColumn = loc.start ? numberOrUndefined(loc.start.column) : void 0;
  86107. const endColumn = loc.end ? numberOrUndefined(loc.end.column) : void 0;
  86108. return {
  86109. start: {
  86110. // @ts-expect-error: return no point / no position next major.
  86111. line: loc.start ? numberOrUndefined(loc.start.line) : void 0,
  86112. // @ts-expect-error: return no point / no position next major.
  86113. column: startColumn === void 0 ? void 0 : startColumn + 1,
  86114. offset: numberOrUndefined(range[0] || nodeLike.start)
  86115. },
  86116. end: {
  86117. // @ts-expect-error: return no point / no position next major.
  86118. line: loc.end ? numberOrUndefined(loc.end.line) : void 0,
  86119. // @ts-expect-error: return no point / no position next major.
  86120. column: endColumn === void 0 ? void 0 : endColumn + 1,
  86121. offset: numberOrUndefined(range[1] || nodeLike.end)
  86122. }
  86123. };
  86124. }
  86125. function numberOrUndefined(value2) {
  86126. return typeof value2 === "number" && value2 > -1 ? value2 : void 0;
  86127. }
  86128. // node_modules/estree-util-visit/lib/color.js
  86129. function color(d) {
  86130. return "\x1B[33m" + d + "\x1B[39m";
  86131. }
  86132. // node_modules/estree-util-visit/lib/index.js
  86133. var own2 = {}.hasOwnProperty;
  86134. var CONTINUE = Symbol("continue");
  86135. var EXIT = Symbol("exit");
  86136. var SKIP = Symbol("skip");
  86137. function visit(tree, visitor) {
  86138. let enter;
  86139. let leave;
  86140. if (typeof visitor === "function") {
  86141. enter = visitor;
  86142. } else if (visitor && typeof visitor === "object") {
  86143. if (visitor.enter)
  86144. enter = visitor.enter;
  86145. if (visitor.leave)
  86146. leave = visitor.leave;
  86147. }
  86148. build(tree, null, null, [])();
  86149. function build(node2, key2, index2, parents) {
  86150. if (nodelike(node2)) {
  86151. visit3.displayName = "node (" + color(node2.type) + ")";
  86152. }
  86153. return visit3;
  86154. function visit3() {
  86155. const result = enter ? toResult(enter(node2, key2, index2, parents)) : [];
  86156. if (result[0] === EXIT) {
  86157. return result;
  86158. }
  86159. if (result[0] !== SKIP) {
  86160. let cKey;
  86161. for (cKey in node2) {
  86162. if (own2.call(node2, cKey) && node2[cKey] && typeof node2[cKey] === "object" && // @ts-expect-error: custom esast extension.
  86163. cKey !== "data" && // @ts-expect-error: custom esast extension.
  86164. cKey !== "position") {
  86165. const grandparents = parents.concat(node2);
  86166. const value2 = node2[cKey];
  86167. if (Array.isArray(value2)) {
  86168. const nodes = (
  86169. /** @type {Array<unknown>} */
  86170. value2
  86171. );
  86172. let cIndex = 0;
  86173. while (cIndex > -1 && cIndex < nodes.length) {
  86174. const subvalue = nodes[cIndex];
  86175. if (nodelike(subvalue)) {
  86176. const subresult = build(
  86177. subvalue,
  86178. cKey,
  86179. cIndex,
  86180. grandparents
  86181. )();
  86182. if (subresult[0] === EXIT)
  86183. return subresult;
  86184. cIndex = typeof subresult[1] === "number" ? subresult[1] : cIndex + 1;
  86185. } else {
  86186. cIndex++;
  86187. }
  86188. }
  86189. } else if (nodelike(value2)) {
  86190. const subresult = build(value2, cKey, null, grandparents)();
  86191. if (subresult[0] === EXIT)
  86192. return subresult;
  86193. }
  86194. }
  86195. }
  86196. }
  86197. return leave ? toResult(leave(node2, key2, index2, parents)) : result;
  86198. }
  86199. }
  86200. }
  86201. function toResult(value2) {
  86202. if (Array.isArray(value2)) {
  86203. return value2;
  86204. }
  86205. if (typeof value2 === "number") {
  86206. return [CONTINUE, value2];
  86207. }
  86208. return [value2];
  86209. }
  86210. function nodelike(value2) {
  86211. return Boolean(
  86212. value2 && typeof value2 === "object" && "type" in value2 && typeof value2.type === "string" && value2.type.length > 0
  86213. );
  86214. }
  86215. // node_modules/vfile-location/lib/index.js
  86216. function location(file) {
  86217. const value2 = String(file);
  86218. const indices = [];
  86219. const search2 = /\r?\n|\r/g;
  86220. while (search2.test(value2)) {
  86221. indices.push(search2.lastIndex);
  86222. }
  86223. indices.push(value2.length + 1);
  86224. return { toPoint, toOffset };
  86225. function toPoint(offset3) {
  86226. let index2 = -1;
  86227. if (typeof offset3 === "number" && offset3 > -1 && offset3 < indices[indices.length - 1]) {
  86228. while (++index2 < indices.length) {
  86229. if (indices[index2] > offset3) {
  86230. return {
  86231. line: index2 + 1,
  86232. column: offset3 - (index2 > 0 ? indices[index2 - 1] : 0) + 1,
  86233. offset: offset3
  86234. };
  86235. }
  86236. }
  86237. }
  86238. return { line: void 0, column: void 0, offset: void 0 };
  86239. }
  86240. function toOffset(point4) {
  86241. const line2 = point4 && point4.line;
  86242. const column2 = point4 && point4.column;
  86243. if (typeof line2 === "number" && typeof column2 === "number" && !Number.isNaN(line2) && !Number.isNaN(column2) && line2 - 1 in indices) {
  86244. const offset3 = (indices[line2 - 2] || 0) + column2 - 1 || 0;
  86245. if (offset3 > -1 && offset3 < indices[indices.length - 1]) {
  86246. return offset3;
  86247. }
  86248. }
  86249. return -1;
  86250. }
  86251. }
  86252. // node_modules/micromark-util-events-to-acorn/index.js
  86253. function eventsToAcorn(events, options) {
  86254. const prefix = options.prefix || "";
  86255. const suffix = options.suffix || "";
  86256. const acornOptions = Object.assign({}, options.acornOptions);
  86257. const comments = [];
  86258. const tokens = [];
  86259. const onComment = acornOptions.onComment;
  86260. const onToken = acornOptions.onToken;
  86261. const chunks = [];
  86262. const lines = {};
  86263. let index2 = -1;
  86264. let swallow = false;
  86265. let estree;
  86266. let exception;
  86267. let startLine;
  86268. const acornConfig = Object.assign({}, acornOptions, {
  86269. onComment: comments,
  86270. preserveParens: true
  86271. });
  86272. if (onToken) {
  86273. acornConfig.onToken = tokens;
  86274. }
  86275. if (options.start) {
  86276. startLine = options.start.line;
  86277. lines[startLine] = options.start;
  86278. }
  86279. while (++index2 < events.length) {
  86280. const [kind, token2, context] = events[index2];
  86281. if (kind === "exit") {
  86282. chunks.push(context.sliceSerialize(token2));
  86283. setPoint(token2.start);
  86284. setPoint(token2.end);
  86285. }
  86286. }
  86287. const source2 = chunks.join("");
  86288. const value2 = prefix + source2 + suffix;
  86289. const isEmptyExpression = options.expression && empty3(source2);
  86290. const place = location(source2);
  86291. if (isEmptyExpression && !options.allowEmpty) {
  86292. throw new VFileMessage("Unexpected empty expression", parseOffsetToUnistPoint(0), "micromark-extension-mdx-expression:unexpected-empty-expression");
  86293. }
  86294. try {
  86295. estree = options.expression && !isEmptyExpression ? options.acorn.parseExpressionAt(value2, 0, acornConfig) : options.acorn.parse(value2, acornConfig);
  86296. } catch (error_) {
  86297. const error = (
  86298. /** @type {AcornError} */
  86299. error_
  86300. );
  86301. const point4 = parseOffsetToUnistPoint(error.pos);
  86302. error.message = String(error.message).replace(/ \(\d+:\d+\)$/, "");
  86303. error.pos = point4.offset;
  86304. error.loc = {
  86305. line: point4.line,
  86306. column: point4.column - 1
  86307. };
  86308. exception = error;
  86309. swallow = error.raisedAt >= prefix.length + source2.length || // Broken comments are raised at their start, not their end.
  86310. error.message === "Unterminated comment";
  86311. }
  86312. if (estree && options.expression && !isEmptyExpression) {
  86313. if (empty3(value2.slice(estree.end, value2.length - suffix.length))) {
  86314. estree = {
  86315. type: "Program",
  86316. start: 0,
  86317. end: prefix.length + source2.length,
  86318. // @ts-expect-error: It’s good.
  86319. body: [{
  86320. type: "ExpressionStatement",
  86321. expression: estree,
  86322. start: 0,
  86323. end: prefix.length + source2.length
  86324. }],
  86325. sourceType: "module",
  86326. comments: []
  86327. };
  86328. } else {
  86329. const point4 = parseOffsetToUnistPoint(estree.end);
  86330. exception = new Error("Unexpected content after expression");
  86331. exception.pos = point4.offset;
  86332. exception.loc = {
  86333. line: point4.line,
  86334. column: point4.column - 1
  86335. };
  86336. estree = void 0;
  86337. }
  86338. }
  86339. if (estree) {
  86340. estree.comments = comments;
  86341. visit(estree, (esnode, field, index3, parents) => {
  86342. let context = (
  86343. /** @type {AcornNode | Array<AcornNode>} */
  86344. parents[parents.length - 1]
  86345. );
  86346. let prop = field;
  86347. if (esnode.type === "ParenthesizedExpression" && context && prop) {
  86348. if (typeof index3 === "number") {
  86349. context = context[prop];
  86350. prop = index3;
  86351. }
  86352. context[prop] = esnode.expression;
  86353. }
  86354. fixPosition(esnode);
  86355. });
  86356. if (Array.isArray(onComment)) {
  86357. onComment.push(...comments);
  86358. } else if (typeof onComment === "function") {
  86359. for (const comment2 of comments) {
  86360. onComment(comment2.type === "Block", comment2.value, comment2.start, comment2.end, comment2.loc.start, comment2.loc.end);
  86361. }
  86362. }
  86363. for (const token2 of tokens) {
  86364. fixPosition(token2);
  86365. if (Array.isArray(onToken)) {
  86366. onToken.push(token2);
  86367. } else {
  86368. onToken(token2);
  86369. }
  86370. }
  86371. }
  86372. return {
  86373. estree,
  86374. error: exception,
  86375. swallow
  86376. };
  86377. function fixPosition(nodeOrToken) {
  86378. const pointStart2 = parseOffsetToUnistPoint(nodeOrToken.start);
  86379. const pointEnd2 = parseOffsetToUnistPoint(nodeOrToken.end);
  86380. nodeOrToken.start = pointStart2.offset;
  86381. nodeOrToken.end = pointEnd2.offset;
  86382. nodeOrToken.loc = {
  86383. start: {
  86384. line: pointStart2.line,
  86385. column: pointStart2.column - 1,
  86386. offset: pointStart2.offset
  86387. },
  86388. end: {
  86389. line: pointEnd2.line,
  86390. column: pointEnd2.column - 1,
  86391. offset: pointEnd2.offset
  86392. }
  86393. };
  86394. nodeOrToken.range = [nodeOrToken.start, nodeOrToken.end];
  86395. }
  86396. function parseOffsetToUnistPoint(acornOffset) {
  86397. let sourceOffset = acornOffset - prefix.length;
  86398. if (sourceOffset < 0) {
  86399. sourceOffset = 0;
  86400. } else if (sourceOffset > source2.length) {
  86401. sourceOffset = source2.length;
  86402. }
  86403. const pointInSource = place.toPoint(sourceOffset);
  86404. const line2 = startLine + (pointInSource.line - 1);
  86405. const column2 = lines[line2].column + (pointInSource.column - 1);
  86406. const offset3 = lines[line2].offset + (pointInSource.column - 1);
  86407. return (
  86408. /** @type {Point} */
  86409. {
  86410. line: line2,
  86411. column: column2,
  86412. offset: offset3
  86413. }
  86414. );
  86415. }
  86416. function setPoint(point4) {
  86417. if (!startLine || point4.line < startLine) {
  86418. startLine = point4.line;
  86419. }
  86420. if (!(point4.line in lines) || lines[point4.line].offset > point4.offset) {
  86421. lines[point4.line] = point4;
  86422. }
  86423. }
  86424. }
  86425. function empty3(value2) {
  86426. return /^\s*$/.test(value2.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g, ""));
  86427. }
  86428. // node_modules/micromark-factory-mdx-expression/index.js
  86429. function factoryMdxExpression(effects, ok2, type, markerType, chunkType, acorn, acornOptions, addResult, spread, allowEmpty, allowLazy, startColumn) {
  86430. const self2 = this;
  86431. const eventStart = this.events.length + 3;
  86432. const tail = this.events[this.events.length - 1];
  86433. const initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
  86434. const prefixExpressionIndent = initialPrefix ? initialPrefix + 1 : 0;
  86435. let balance = 1;
  86436. let startPosition;
  86437. let lastCrash;
  86438. return start3;
  86439. function start3(code2) {
  86440. effects.enter(type);
  86441. effects.enter(markerType);
  86442. effects.consume(code2);
  86443. effects.exit(markerType);
  86444. startPosition = self2.now();
  86445. return atBreak;
  86446. }
  86447. function atBreak(code2) {
  86448. if (code2 === null) {
  86449. throw lastCrash || new VFileMessage(
  86450. "Unexpected end of file in expression, expected a corresponding closing brace for `{`",
  86451. self2.now(),
  86452. "micromark-extension-mdx-expression:unexpected-eof"
  86453. );
  86454. }
  86455. if (code2 === 125) {
  86456. return atClosingBrace(code2);
  86457. }
  86458. if (markdownLineEnding(code2)) {
  86459. effects.enter("lineEnding");
  86460. effects.consume(code2);
  86461. effects.exit("lineEnding");
  86462. const prefixTagIndent = startColumn ? startColumn + 4 - self2.now().column : 0;
  86463. const indent = Math.max(prefixExpressionIndent, prefixTagIndent);
  86464. return indent ? factorySpace(effects, atBreak, "linePrefix", indent) : atBreak;
  86465. }
  86466. const now = self2.now();
  86467. if (now.line !== startPosition.line && !allowLazy && self2.parser.lazy[now.line]) {
  86468. throw new VFileMessage(
  86469. "Unexpected end of file in expression, expected a corresponding closing brace for `{`",
  86470. self2.now(),
  86471. "micromark-extension-mdx-expression:unexpected-eof"
  86472. );
  86473. }
  86474. effects.enter(chunkType);
  86475. return inside(code2);
  86476. }
  86477. function inside(code2) {
  86478. if (code2 === null || code2 === 125 || markdownLineEnding(code2)) {
  86479. effects.exit(chunkType);
  86480. return atBreak(code2);
  86481. }
  86482. if (code2 === 123 && !acorn) {
  86483. effects.consume(code2);
  86484. balance++;
  86485. return inside;
  86486. }
  86487. effects.consume(code2);
  86488. return inside;
  86489. }
  86490. function atClosingBrace(code2) {
  86491. balance--;
  86492. if (!acorn) {
  86493. if (balance) {
  86494. effects.enter(chunkType);
  86495. effects.consume(code2);
  86496. return inside;
  86497. }
  86498. effects.enter(markerType);
  86499. effects.consume(code2);
  86500. effects.exit(markerType);
  86501. effects.exit(type);
  86502. return ok2;
  86503. }
  86504. const result = eventsToAcorn(self2.events.slice(eventStart), {
  86505. acorn,
  86506. acornOptions,
  86507. start: startPosition,
  86508. expression: true,
  86509. allowEmpty,
  86510. prefix: spread ? "({" : "",
  86511. suffix: spread ? "})" : ""
  86512. });
  86513. const estree = result.estree;
  86514. if (spread && estree) {
  86515. const head = estree.body[0];
  86516. if (head.type !== "ExpressionStatement" || head.expression.type !== "ObjectExpression") {
  86517. throw new VFileMessage(
  86518. "Unexpected `" + head.type + "` in code: expected an object spread (`{...spread}`)",
  86519. positionFromEstree(head).start,
  86520. "micromark-extension-mdx-expression:non-spread"
  86521. );
  86522. } else if (head.expression.properties[1]) {
  86523. throw new VFileMessage(
  86524. "Unexpected extra content in spread: only a single spread is supported",
  86525. positionFromEstree(head.expression.properties[1]).start,
  86526. "micromark-extension-mdx-expression:spread-extra"
  86527. );
  86528. } else if (head.expression.properties[0] && head.expression.properties[0].type !== "SpreadElement") {
  86529. throw new VFileMessage(
  86530. "Unexpected `" + head.expression.properties[0].type + "` in code: only spread elements are supported",
  86531. positionFromEstree(head.expression.properties[0]).start,
  86532. "micromark-extension-mdx-expression:non-spread"
  86533. );
  86534. }
  86535. }
  86536. if (result.error) {
  86537. lastCrash = new VFileMessage(
  86538. "Could not parse expression with acorn: " + result.error.message,
  86539. {
  86540. // @ts-expect-error: fine.
  86541. line: result.error.loc.line,
  86542. // @ts-expect-error: fine.
  86543. column: result.error.loc.column + 1,
  86544. // @ts-expect-error: fine.
  86545. offset: result.error.pos
  86546. },
  86547. "micromark-extension-mdx-expression:acorn"
  86548. );
  86549. if (code2 !== null && result.swallow) {
  86550. effects.enter(chunkType);
  86551. effects.consume(code2);
  86552. return inside;
  86553. }
  86554. throw lastCrash;
  86555. }
  86556. effects.enter(markerType);
  86557. effects.consume(code2);
  86558. effects.exit(markerType);
  86559. Object.assign(
  86560. effects.exit(type),
  86561. addResult ? {
  86562. estree
  86563. } : void 0
  86564. );
  86565. return ok2;
  86566. }
  86567. }
  86568. // node_modules/micromark-extension-mdx-expression/lib/syntax.js
  86569. function mdxExpression(options) {
  86570. const options_ = options || {};
  86571. const addResult = options_.addResult;
  86572. const acorn = options_.acorn;
  86573. const spread = options_.spread;
  86574. let allowEmpty = options_.allowEmpty;
  86575. let acornOptions;
  86576. if (allowEmpty === null || allowEmpty === void 0) {
  86577. allowEmpty = true;
  86578. }
  86579. if (acorn) {
  86580. if (!acorn.parseExpressionAt) {
  86581. throw new Error(
  86582. "Expected a proper `acorn` instance passed in as `options.acorn`"
  86583. );
  86584. }
  86585. acornOptions = Object.assign(
  86586. {
  86587. ecmaVersion: 2020,
  86588. sourceType: "module"
  86589. },
  86590. options_.acornOptions
  86591. );
  86592. } else if (options_.acornOptions || options_.addResult) {
  86593. throw new Error("Expected an `acorn` instance passed in as `options.acorn`");
  86594. }
  86595. return {
  86596. flow: {
  86597. [123]: {
  86598. tokenize: tokenizeFlowExpression,
  86599. concrete: true
  86600. }
  86601. },
  86602. text: {
  86603. [123]: {
  86604. tokenize: tokenizeTextExpression
  86605. }
  86606. }
  86607. };
  86608. function tokenizeFlowExpression(effects, ok2, nok) {
  86609. const self2 = this;
  86610. return start3;
  86611. function start3(code2) {
  86612. return factoryMdxExpression.call(
  86613. self2,
  86614. effects,
  86615. factorySpace(effects, after, "whitespace"),
  86616. "mdxFlowExpression",
  86617. "mdxFlowExpressionMarker",
  86618. "mdxFlowExpressionChunk",
  86619. acorn,
  86620. acornOptions,
  86621. addResult,
  86622. spread,
  86623. allowEmpty
  86624. )(code2);
  86625. }
  86626. function after(code2) {
  86627. return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  86628. }
  86629. }
  86630. function tokenizeTextExpression(effects, ok2) {
  86631. const self2 = this;
  86632. return start3;
  86633. function start3(code2) {
  86634. return factoryMdxExpression.call(
  86635. self2,
  86636. effects,
  86637. ok2,
  86638. "mdxTextExpression",
  86639. "mdxTextExpressionMarker",
  86640. "mdxTextExpressionChunk",
  86641. acorn,
  86642. acornOptions,
  86643. addResult,
  86644. spread,
  86645. allowEmpty,
  86646. true
  86647. )(code2);
  86648. }
  86649. }
  86650. }
  86651. // node_modules/estree-util-is-identifier-name/lib/regex.js
  86652. var start = /[$A-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;
  86653. var cont = /[\d\u00B7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]/;
  86654. // node_modules/estree-util-is-identifier-name/lib/index.js
  86655. function start2(code2) {
  86656. return start.test(String.fromCharCode(code2));
  86657. }
  86658. function cont2(code2) {
  86659. const character = String.fromCharCode(code2);
  86660. return start.test(character) || cont.test(character);
  86661. }
  86662. function name(name2) {
  86663. let index2 = -1;
  86664. while (++index2 < name2.length) {
  86665. if (!(index2 ? cont2 : start2)(name2.charCodeAt(index2)))
  86666. return false;
  86667. }
  86668. return index2 > 0;
  86669. }
  86670. // node_modules/micromark-extension-mdx-jsx/lib/factory-tag.js
  86671. var lazyLineEnd = {
  86672. tokenize: tokenizeLazyLineEnd,
  86673. partial: true
  86674. };
  86675. function factoryTag(effects, ok2, nok, acorn, acornOptions, addResult, allowLazy, tagType, tagMarkerType, tagClosingMarkerType, tagSelfClosingMarker, tagNameType, tagNamePrimaryType, tagNameMemberMarkerType, tagNameMemberType, tagNamePrefixMarkerType, tagNameLocalType, tagExpressionAttributeType, tagExpressionAttributeMarkerType, tagExpressionAttributeValueType, tagAttributeType, tagAttributeNameType, tagAttributeNamePrimaryType, tagAttributeNamePrefixMarkerType, tagAttributeNameLocalType, tagAttributeInitializerMarkerType, tagAttributeValueLiteralType, tagAttributeValueLiteralMarkerType, tagAttributeValueLiteralValueType, tagAttributeValueExpressionType, tagAttributeValueExpressionMarkerType, tagAttributeValueExpressionValueType) {
  86676. const self2 = this;
  86677. let returnState;
  86678. let marker;
  86679. let startPoint;
  86680. return start3;
  86681. function start3(code2) {
  86682. startPoint = self2.now();
  86683. effects.enter(tagType);
  86684. effects.enter(tagMarkerType);
  86685. effects.consume(code2);
  86686. effects.exit(tagMarkerType);
  86687. return afterStart;
  86688. }
  86689. function afterStart(code2) {
  86690. if (markdownLineEnding(code2) || markdownSpace(code2)) {
  86691. return nok(code2);
  86692. }
  86693. returnState = beforeName;
  86694. return optionalEsWhitespace(code2);
  86695. }
  86696. function beforeName(code2) {
  86697. if (code2 === 47) {
  86698. effects.enter(tagClosingMarkerType);
  86699. effects.consume(code2);
  86700. effects.exit(tagClosingMarkerType);
  86701. returnState = beforeClosingTagName;
  86702. return optionalEsWhitespace;
  86703. }
  86704. if (code2 === 62) {
  86705. return tagEnd(code2);
  86706. }
  86707. if (code2 !== null && start2(code2)) {
  86708. effects.enter(tagNameType);
  86709. effects.enter(tagNamePrimaryType);
  86710. effects.consume(code2);
  86711. return primaryName;
  86712. }
  86713. crash(
  86714. code2,
  86715. "before name",
  86716. "a character that can start a name, such as a letter, `$`, or `_`" + (code2 === 33 ? " (note: to create a comment in MDX, use `{/* text */}`)" : "")
  86717. );
  86718. }
  86719. function beforeClosingTagName(code2) {
  86720. if (code2 === 62) {
  86721. return tagEnd(code2);
  86722. }
  86723. if (code2 !== null && start2(code2)) {
  86724. effects.enter(tagNameType);
  86725. effects.enter(tagNamePrimaryType);
  86726. effects.consume(code2);
  86727. return primaryName;
  86728. }
  86729. crash(
  86730. code2,
  86731. "before name",
  86732. "a character that can start a name, such as a letter, `$`, or `_`" + (code2 === 42 || code2 === 47 ? " (note: JS comments in JSX tags are not supported in MDX)" : "")
  86733. );
  86734. }
  86735. function primaryName(code2) {
  86736. if (code2 === 45 || code2 !== null && cont2(code2)) {
  86737. effects.consume(code2);
  86738. return primaryName;
  86739. }
  86740. if (code2 === 46 || code2 === 47 || code2 === 58 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  86741. effects.exit(tagNamePrimaryType);
  86742. returnState = afterPrimaryName;
  86743. return optionalEsWhitespace(code2);
  86744. }
  86745. crash(
  86746. code2,
  86747. "in name",
  86748. "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag" + (code2 === 64 ? " (note: to create a link in MDX, use `[text](url)`)" : "")
  86749. );
  86750. }
  86751. function afterPrimaryName(code2) {
  86752. if (code2 === 46) {
  86753. effects.enter(tagNameMemberMarkerType);
  86754. effects.consume(code2);
  86755. effects.exit(tagNameMemberMarkerType);
  86756. returnState = beforeMemberName;
  86757. return optionalEsWhitespace;
  86758. }
  86759. if (code2 === 58) {
  86760. effects.enter(tagNamePrefixMarkerType);
  86761. effects.consume(code2);
  86762. effects.exit(tagNamePrefixMarkerType);
  86763. returnState = beforeLocalName;
  86764. return optionalEsWhitespace;
  86765. }
  86766. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  86767. effects.exit(tagNameType);
  86768. return beforeAttribute(code2);
  86769. }
  86770. crash(
  86771. code2,
  86772. "after name",
  86773. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  86774. );
  86775. }
  86776. function beforeMemberName(code2) {
  86777. if (code2 !== null && start2(code2)) {
  86778. effects.enter(tagNameMemberType);
  86779. effects.consume(code2);
  86780. return memberName;
  86781. }
  86782. crash(
  86783. code2,
  86784. "before member name",
  86785. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  86786. );
  86787. }
  86788. function memberName(code2) {
  86789. if (code2 === 45 || code2 !== null && cont2(code2)) {
  86790. effects.consume(code2);
  86791. return memberName;
  86792. }
  86793. if (code2 === 46 || code2 === 47 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  86794. effects.exit(tagNameMemberType);
  86795. returnState = afterMemberName;
  86796. return optionalEsWhitespace(code2);
  86797. }
  86798. crash(
  86799. code2,
  86800. "in member name",
  86801. "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag" + (code2 === 64 ? " (note: to create a link in MDX, use `[text](url)`)" : "")
  86802. );
  86803. }
  86804. function afterMemberName(code2) {
  86805. if (code2 === 46) {
  86806. effects.enter(tagNameMemberMarkerType);
  86807. effects.consume(code2);
  86808. effects.exit(tagNameMemberMarkerType);
  86809. returnState = beforeMemberName;
  86810. return optionalEsWhitespace;
  86811. }
  86812. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  86813. effects.exit(tagNameType);
  86814. return beforeAttribute(code2);
  86815. }
  86816. crash(
  86817. code2,
  86818. "after member name",
  86819. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  86820. );
  86821. }
  86822. function beforeLocalName(code2) {
  86823. if (code2 !== null && start2(code2)) {
  86824. effects.enter(tagNameLocalType);
  86825. effects.consume(code2);
  86826. return localName;
  86827. }
  86828. crash(
  86829. code2,
  86830. "before local name",
  86831. "a character that can start a name, such as a letter, `$`, or `_`" + (code2 === 43 || code2 !== null && code2 > 46 && code2 < 58 ? (
  86832. /* `/` - `9` */
  86833. " (note: to create a link in MDX, use `[text](url)`)"
  86834. ) : "")
  86835. );
  86836. }
  86837. function localName(code2) {
  86838. if (code2 === 45 || code2 !== null && cont2(code2)) {
  86839. effects.consume(code2);
  86840. return localName;
  86841. }
  86842. if (code2 === 47 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  86843. effects.exit(tagNameLocalType);
  86844. returnState = afterLocalName;
  86845. return optionalEsWhitespace(code2);
  86846. }
  86847. crash(
  86848. code2,
  86849. "in local name",
  86850. "a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"
  86851. );
  86852. }
  86853. function afterLocalName(code2) {
  86854. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  86855. effects.exit(tagNameType);
  86856. return beforeAttribute(code2);
  86857. }
  86858. crash(
  86859. code2,
  86860. "after local name",
  86861. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  86862. );
  86863. }
  86864. function beforeAttribute(code2) {
  86865. if (code2 === 47) {
  86866. effects.enter(tagSelfClosingMarker);
  86867. effects.consume(code2);
  86868. effects.exit(tagSelfClosingMarker);
  86869. returnState = selfClosing;
  86870. return optionalEsWhitespace;
  86871. }
  86872. if (code2 === 62) {
  86873. return tagEnd(code2);
  86874. }
  86875. if (code2 === 123) {
  86876. return factoryMdxExpression.call(
  86877. self2,
  86878. effects,
  86879. afterAttributeExpression,
  86880. tagExpressionAttributeType,
  86881. tagExpressionAttributeMarkerType,
  86882. tagExpressionAttributeValueType,
  86883. acorn,
  86884. acornOptions,
  86885. addResult,
  86886. true,
  86887. false,
  86888. allowLazy,
  86889. startPoint.column
  86890. )(code2);
  86891. }
  86892. if (code2 !== null && start2(code2)) {
  86893. effects.enter(tagAttributeType);
  86894. effects.enter(tagAttributeNameType);
  86895. effects.enter(tagAttributeNamePrimaryType);
  86896. effects.consume(code2);
  86897. return attributePrimaryName;
  86898. }
  86899. crash(
  86900. code2,
  86901. "before attribute name",
  86902. "a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag"
  86903. );
  86904. }
  86905. function afterAttributeExpression(code2) {
  86906. returnState = beforeAttribute;
  86907. return optionalEsWhitespace(code2);
  86908. }
  86909. function attributePrimaryName(code2) {
  86910. if (code2 === 45 || code2 !== null && cont2(code2)) {
  86911. effects.consume(code2);
  86912. return attributePrimaryName;
  86913. }
  86914. if (code2 === 47 || code2 === 58 || code2 === 61 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  86915. effects.exit(tagAttributeNamePrimaryType);
  86916. returnState = afterAttributePrimaryName;
  86917. return optionalEsWhitespace(code2);
  86918. }
  86919. crash(
  86920. code2,
  86921. "in attribute name",
  86922. "an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag"
  86923. );
  86924. }
  86925. function afterAttributePrimaryName(code2) {
  86926. if (code2 === 58) {
  86927. effects.enter(tagAttributeNamePrefixMarkerType);
  86928. effects.consume(code2);
  86929. effects.exit(tagAttributeNamePrefixMarkerType);
  86930. returnState = beforeAttributeLocalName;
  86931. return optionalEsWhitespace;
  86932. }
  86933. if (code2 === 61) {
  86934. effects.exit(tagAttributeNameType);
  86935. effects.enter(tagAttributeInitializerMarkerType);
  86936. effects.consume(code2);
  86937. effects.exit(tagAttributeInitializerMarkerType);
  86938. returnState = beforeAttributeValue;
  86939. return optionalEsWhitespace;
  86940. }
  86941. if (code2 === 47 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || code2 !== null && start2(code2)) {
  86942. effects.exit(tagAttributeNameType);
  86943. effects.exit(tagAttributeType);
  86944. returnState = beforeAttribute;
  86945. return optionalEsWhitespace(code2);
  86946. }
  86947. crash(
  86948. code2,
  86949. "after attribute name",
  86950. "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"
  86951. );
  86952. }
  86953. function beforeAttributeLocalName(code2) {
  86954. if (code2 !== null && start2(code2)) {
  86955. effects.enter(tagAttributeNameLocalType);
  86956. effects.consume(code2);
  86957. return attributeLocalName;
  86958. }
  86959. crash(
  86960. code2,
  86961. "before local attribute name",
  86962. "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"
  86963. );
  86964. }
  86965. function attributeLocalName(code2) {
  86966. if (code2 === 45 || code2 !== null && cont2(code2)) {
  86967. effects.consume(code2);
  86968. return attributeLocalName;
  86969. }
  86970. if (code2 === 47 || code2 === 61 || code2 === 62 || code2 === 123 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  86971. effects.exit(tagAttributeNameLocalType);
  86972. effects.exit(tagAttributeNameType);
  86973. returnState = afterAttributeLocalName;
  86974. return optionalEsWhitespace(code2);
  86975. }
  86976. crash(
  86977. code2,
  86978. "in local attribute name",
  86979. "an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag"
  86980. );
  86981. }
  86982. function afterAttributeLocalName(code2) {
  86983. if (code2 === 61) {
  86984. effects.enter(tagAttributeInitializerMarkerType);
  86985. effects.consume(code2);
  86986. effects.exit(tagAttributeInitializerMarkerType);
  86987. returnState = beforeAttributeValue;
  86988. return optionalEsWhitespace;
  86989. }
  86990. if (code2 === 47 || code2 === 62 || code2 === 123 || code2 !== null && start2(code2)) {
  86991. effects.exit(tagAttributeType);
  86992. return beforeAttribute(code2);
  86993. }
  86994. crash(
  86995. code2,
  86996. "after local attribute name",
  86997. "a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag"
  86998. );
  86999. }
  87000. function beforeAttributeValue(code2) {
  87001. if (code2 === 34 || code2 === 39) {
  87002. effects.enter(tagAttributeValueLiteralType);
  87003. effects.enter(tagAttributeValueLiteralMarkerType);
  87004. effects.consume(code2);
  87005. effects.exit(tagAttributeValueLiteralMarkerType);
  87006. marker = code2;
  87007. return attributeValueQuotedStart;
  87008. }
  87009. if (code2 === 123) {
  87010. return factoryMdxExpression.call(
  87011. self2,
  87012. effects,
  87013. afterAttributeValueExpression,
  87014. tagAttributeValueExpressionType,
  87015. tagAttributeValueExpressionMarkerType,
  87016. tagAttributeValueExpressionValueType,
  87017. acorn,
  87018. acornOptions,
  87019. addResult,
  87020. false,
  87021. false,
  87022. allowLazy,
  87023. startPoint.column
  87024. )(code2);
  87025. }
  87026. crash(
  87027. code2,
  87028. "before attribute value",
  87029. "a character that can start an attribute value, such as `\"`, `'`, or `{`" + (code2 === 60 ? " (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)" : "")
  87030. );
  87031. }
  87032. function afterAttributeValueExpression(code2) {
  87033. effects.exit(tagAttributeType);
  87034. returnState = beforeAttribute;
  87035. return optionalEsWhitespace(code2);
  87036. }
  87037. function attributeValueQuotedStart(code2) {
  87038. if (code2 === null) {
  87039. crash(
  87040. code2,
  87041. "in attribute value",
  87042. "a corresponding closing quote `" + String.fromCharCode(marker) + "`"
  87043. );
  87044. }
  87045. if (code2 === marker) {
  87046. effects.enter(tagAttributeValueLiteralMarkerType);
  87047. effects.consume(code2);
  87048. effects.exit(tagAttributeValueLiteralMarkerType);
  87049. effects.exit(tagAttributeValueLiteralType);
  87050. effects.exit(tagAttributeType);
  87051. marker = void 0;
  87052. returnState = beforeAttribute;
  87053. return optionalEsWhitespace;
  87054. }
  87055. if (markdownLineEnding(code2)) {
  87056. returnState = attributeValueQuotedStart;
  87057. return optionalEsWhitespace(code2);
  87058. }
  87059. effects.enter(tagAttributeValueLiteralValueType);
  87060. return attributeValueQuoted(code2);
  87061. }
  87062. function attributeValueQuoted(code2) {
  87063. if (code2 === null || code2 === marker || markdownLineEnding(code2)) {
  87064. effects.exit(tagAttributeValueLiteralValueType);
  87065. return attributeValueQuotedStart(code2);
  87066. }
  87067. effects.consume(code2);
  87068. return attributeValueQuoted;
  87069. }
  87070. function selfClosing(code2) {
  87071. if (code2 === 62) {
  87072. return tagEnd(code2);
  87073. }
  87074. crash(
  87075. code2,
  87076. "after self-closing slash",
  87077. "`>` to end the tag" + (code2 === 42 || code2 === 47 ? " (note: JS comments in JSX tags are not supported in MDX)" : "")
  87078. );
  87079. }
  87080. function tagEnd(code2) {
  87081. effects.enter(tagMarkerType);
  87082. effects.consume(code2);
  87083. effects.exit(tagMarkerType);
  87084. effects.exit(tagType);
  87085. return ok2;
  87086. }
  87087. function optionalEsWhitespace(code2) {
  87088. if (markdownLineEnding(code2)) {
  87089. if (allowLazy) {
  87090. effects.enter("lineEnding");
  87091. effects.consume(code2);
  87092. effects.exit("lineEnding");
  87093. return factorySpace(effects, optionalEsWhitespace, "linePrefix", 4);
  87094. }
  87095. return effects.attempt(
  87096. lazyLineEnd,
  87097. factorySpace(effects, optionalEsWhitespace, "linePrefix", 4),
  87098. crashEol
  87099. )(code2);
  87100. }
  87101. if (markdownSpace(code2) || unicodeWhitespace(code2)) {
  87102. effects.enter("esWhitespace");
  87103. return optionalEsWhitespaceContinue(code2);
  87104. }
  87105. return returnState(code2);
  87106. }
  87107. function optionalEsWhitespaceContinue(code2) {
  87108. if (markdownLineEnding(code2) || !(markdownSpace(code2) || unicodeWhitespace(code2))) {
  87109. effects.exit("esWhitespace");
  87110. return optionalEsWhitespace(code2);
  87111. }
  87112. effects.consume(code2);
  87113. return optionalEsWhitespaceContinue;
  87114. }
  87115. function crashEol() {
  87116. throw new VFileMessage(
  87117. "Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",
  87118. self2.now(),
  87119. "micromark-extension-mdx-jsx:unexpected-eof"
  87120. );
  87121. }
  87122. function crash(code2, at3, expect) {
  87123. throw new VFileMessage(
  87124. "Unexpected " + (code2 === null ? "end of file" : "character `" + (code2 === 96 ? "` ` `" : String.fromCharCode(code2)) + "` (" + serializeCharCode(code2) + ")") + " " + at3 + ", expected " + expect,
  87125. self2.now(),
  87126. "micromark-extension-mdx-jsx:unexpected-" + (code2 === null ? "eof" : "character")
  87127. );
  87128. }
  87129. }
  87130. function tokenizeLazyLineEnd(effects, ok2, nok) {
  87131. const self2 = this;
  87132. return start3;
  87133. function start3(code2) {
  87134. effects.enter("lineEnding");
  87135. effects.consume(code2);
  87136. effects.exit("lineEnding");
  87137. return lineStart;
  87138. }
  87139. function lineStart(code2) {
  87140. return self2.parser.lazy[self2.now().line] ? nok(code2) : ok2(code2);
  87141. }
  87142. }
  87143. function serializeCharCode(code2) {
  87144. return "U+" + code2.toString(16).toUpperCase().padStart(4, "0");
  87145. }
  87146. // node_modules/micromark-extension-mdx-jsx/lib/jsx-text.js
  87147. function jsxText(acorn, acornOptions, addResult) {
  87148. return {
  87149. tokenize: tokenizeJsxText
  87150. };
  87151. function tokenizeJsxText(effects, ok2, nok) {
  87152. return factoryTag.call(
  87153. this,
  87154. effects,
  87155. ok2,
  87156. nok,
  87157. acorn,
  87158. acornOptions,
  87159. addResult,
  87160. true,
  87161. "mdxJsxTextTag",
  87162. "mdxJsxTextTagMarker",
  87163. "mdxJsxTextTagClosingMarker",
  87164. "mdxJsxTextTagSelfClosingMarker",
  87165. "mdxJsxTextTagName",
  87166. "mdxJsxTextTagNamePrimary",
  87167. "mdxJsxTextTagNameMemberMarker",
  87168. "mdxJsxTextTagNameMember",
  87169. "mdxJsxTextTagNamePrefixMarker",
  87170. "mdxJsxTextTagNameLocal",
  87171. "mdxJsxTextTagExpressionAttribute",
  87172. "mdxJsxTextTagExpressionAttributeMarker",
  87173. "mdxJsxTextTagExpressionAttributeValue",
  87174. "mdxJsxTextTagAttribute",
  87175. "mdxJsxTextTagAttributeName",
  87176. "mdxJsxTextTagAttributeNamePrimary",
  87177. "mdxJsxTextTagAttributeNamePrefixMarker",
  87178. "mdxJsxTextTagAttributeNameLocal",
  87179. "mdxJsxTextTagAttributeInitializerMarker",
  87180. "mdxJsxTextTagAttributeValueLiteral",
  87181. "mdxJsxTextTagAttributeValueLiteralMarker",
  87182. "mdxJsxTextTagAttributeValueLiteralValue",
  87183. "mdxJsxTextTagAttributeValueExpression",
  87184. "mdxJsxTextTagAttributeValueExpressionMarker",
  87185. "mdxJsxTextTagAttributeValueExpressionValue"
  87186. );
  87187. }
  87188. }
  87189. // node_modules/micromark-extension-mdx-jsx/lib/jsx-flow.js
  87190. function jsxFlow(acorn, acornOptions, addResult) {
  87191. return {
  87192. tokenize: tokenizeJsxFlow,
  87193. concrete: true
  87194. };
  87195. function tokenizeJsxFlow(effects, ok2, nok) {
  87196. const self2 = this;
  87197. return start3;
  87198. function start3(code2) {
  87199. return factoryTag.call(
  87200. self2,
  87201. effects,
  87202. factorySpace(effects, after, "whitespace"),
  87203. nok,
  87204. acorn,
  87205. acornOptions,
  87206. addResult,
  87207. false,
  87208. "mdxJsxFlowTag",
  87209. "mdxJsxFlowTagMarker",
  87210. "mdxJsxFlowTagClosingMarker",
  87211. "mdxJsxFlowTagSelfClosingMarker",
  87212. "mdxJsxFlowTagName",
  87213. "mdxJsxFlowTagNamePrimary",
  87214. "mdxJsxFlowTagNameMemberMarker",
  87215. "mdxJsxFlowTagNameMember",
  87216. "mdxJsxFlowTagNamePrefixMarker",
  87217. "mdxJsxFlowTagNameLocal",
  87218. "mdxJsxFlowTagExpressionAttribute",
  87219. "mdxJsxFlowTagExpressionAttributeMarker",
  87220. "mdxJsxFlowTagExpressionAttributeValue",
  87221. "mdxJsxFlowTagAttribute",
  87222. "mdxJsxFlowTagAttributeName",
  87223. "mdxJsxFlowTagAttributeNamePrimary",
  87224. "mdxJsxFlowTagAttributeNamePrefixMarker",
  87225. "mdxJsxFlowTagAttributeNameLocal",
  87226. "mdxJsxFlowTagAttributeInitializerMarker",
  87227. "mdxJsxFlowTagAttributeValueLiteral",
  87228. "mdxJsxFlowTagAttributeValueLiteralMarker",
  87229. "mdxJsxFlowTagAttributeValueLiteralValue",
  87230. "mdxJsxFlowTagAttributeValueExpression",
  87231. "mdxJsxFlowTagAttributeValueExpressionMarker",
  87232. "mdxJsxFlowTagAttributeValueExpressionValue"
  87233. )(code2);
  87234. }
  87235. function after(code2) {
  87236. return code2 === 60 ? start3(code2) : code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  87237. }
  87238. }
  87239. }
  87240. // node_modules/micromark-extension-mdx-jsx/lib/syntax.js
  87241. function mdxJsx(options = {}) {
  87242. const acorn = options.acorn;
  87243. let acornOptions;
  87244. if (acorn) {
  87245. if (!acorn.parse || !acorn.parseExpressionAt) {
  87246. throw new Error(
  87247. "Expected a proper `acorn` instance passed in as `options.acorn`"
  87248. );
  87249. }
  87250. acornOptions = Object.assign(
  87251. {
  87252. ecmaVersion: 2020,
  87253. sourceType: "module"
  87254. },
  87255. options.acornOptions,
  87256. {
  87257. locations: true
  87258. }
  87259. );
  87260. } else if (options.acornOptions || options.addResult) {
  87261. throw new Error("Expected an `acorn` instance passed in as `options.acorn`");
  87262. }
  87263. return {
  87264. flow: {
  87265. [60]: jsxFlow(acorn, acornOptions, options.addResult)
  87266. },
  87267. text: {
  87268. [60]: jsxText(acorn, acornOptions, options.addResult)
  87269. }
  87270. };
  87271. }
  87272. // node_modules/micromark-extension-mdx-md/index.js
  87273. var mdxMd = {
  87274. disable: { null: ["autolink", "codeIndented", "htmlFlow", "htmlText"] }
  87275. };
  87276. // node_modules/micromark-util-classify-character/index.js
  87277. function classifyCharacter(code2) {
  87278. if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
  87279. return 1;
  87280. }
  87281. if (unicodePunctuation(code2)) {
  87282. return 2;
  87283. }
  87284. }
  87285. // node_modules/micromark-util-resolve-all/index.js
  87286. function resolveAll(constructs2, events, context) {
  87287. const called = [];
  87288. let index2 = -1;
  87289. while (++index2 < constructs2.length) {
  87290. const resolve = constructs2[index2].resolveAll;
  87291. if (resolve && !called.includes(resolve)) {
  87292. events = resolve(events, context);
  87293. called.push(resolve);
  87294. }
  87295. }
  87296. return events;
  87297. }
  87298. // node_modules/micromark-core-commonmark/lib/attention.js
  87299. var attention = {
  87300. name: "attention",
  87301. tokenize: tokenizeAttention,
  87302. resolveAll: resolveAllAttention
  87303. };
  87304. function resolveAllAttention(events, context) {
  87305. let index2 = -1;
  87306. let open;
  87307. let group;
  87308. let text5;
  87309. let openingSequence;
  87310. let closingSequence;
  87311. let use;
  87312. let nextEvents;
  87313. let offset3;
  87314. while (++index2 < events.length) {
  87315. if (events[index2][0] === "enter" && events[index2][1].type === "attentionSequence" && events[index2][1]._close) {
  87316. open = index2;
  87317. while (open--) {
  87318. if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && // If the markers are the same:
  87319. context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index2][1]).charCodeAt(0)) {
  87320. if ((events[open][1]._close || events[index2][1]._open) && (events[index2][1].end.offset - events[index2][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index2][1].end.offset - events[index2][1].start.offset) % 3)) {
  87321. continue;
  87322. }
  87323. use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index2][1].end.offset - events[index2][1].start.offset > 1 ? 2 : 1;
  87324. const start3 = Object.assign({}, events[open][1].end);
  87325. const end = Object.assign({}, events[index2][1].start);
  87326. movePoint(start3, -use);
  87327. movePoint(end, use);
  87328. openingSequence = {
  87329. type: use > 1 ? "strongSequence" : "emphasisSequence",
  87330. start: start3,
  87331. end: Object.assign({}, events[open][1].end)
  87332. };
  87333. closingSequence = {
  87334. type: use > 1 ? "strongSequence" : "emphasisSequence",
  87335. start: Object.assign({}, events[index2][1].start),
  87336. end
  87337. };
  87338. text5 = {
  87339. type: use > 1 ? "strongText" : "emphasisText",
  87340. start: Object.assign({}, events[open][1].end),
  87341. end: Object.assign({}, events[index2][1].start)
  87342. };
  87343. group = {
  87344. type: use > 1 ? "strong" : "emphasis",
  87345. start: Object.assign({}, openingSequence.start),
  87346. end: Object.assign({}, closingSequence.end)
  87347. };
  87348. events[open][1].end = Object.assign({}, openingSequence.start);
  87349. events[index2][1].start = Object.assign({}, closingSequence.end);
  87350. nextEvents = [];
  87351. if (events[open][1].end.offset - events[open][1].start.offset) {
  87352. nextEvents = push(nextEvents, [
  87353. ["enter", events[open][1], context],
  87354. ["exit", events[open][1], context]
  87355. ]);
  87356. }
  87357. nextEvents = push(nextEvents, [
  87358. ["enter", group, context],
  87359. ["enter", openingSequence, context],
  87360. ["exit", openingSequence, context],
  87361. ["enter", text5, context]
  87362. ]);
  87363. nextEvents = push(
  87364. nextEvents,
  87365. resolveAll(
  87366. context.parser.constructs.insideSpan.null,
  87367. events.slice(open + 1, index2),
  87368. context
  87369. )
  87370. );
  87371. nextEvents = push(nextEvents, [
  87372. ["exit", text5, context],
  87373. ["enter", closingSequence, context],
  87374. ["exit", closingSequence, context],
  87375. ["exit", group, context]
  87376. ]);
  87377. if (events[index2][1].end.offset - events[index2][1].start.offset) {
  87378. offset3 = 2;
  87379. nextEvents = push(nextEvents, [
  87380. ["enter", events[index2][1], context],
  87381. ["exit", events[index2][1], context]
  87382. ]);
  87383. } else {
  87384. offset3 = 0;
  87385. }
  87386. splice(events, open - 1, index2 - open + 3, nextEvents);
  87387. index2 = open + nextEvents.length - offset3 - 2;
  87388. break;
  87389. }
  87390. }
  87391. }
  87392. }
  87393. index2 = -1;
  87394. while (++index2 < events.length) {
  87395. if (events[index2][1].type === "attentionSequence") {
  87396. events[index2][1].type = "data";
  87397. }
  87398. }
  87399. return events;
  87400. }
  87401. function tokenizeAttention(effects, ok2) {
  87402. const attentionMarkers2 = this.parser.constructs.attentionMarkers.null;
  87403. const previous2 = this.previous;
  87404. const before = classifyCharacter(previous2);
  87405. let marker;
  87406. return start3;
  87407. function start3(code2) {
  87408. effects.enter("attentionSequence");
  87409. marker = code2;
  87410. return sequence(code2);
  87411. }
  87412. function sequence(code2) {
  87413. if (code2 === marker) {
  87414. effects.consume(code2);
  87415. return sequence;
  87416. }
  87417. const token2 = effects.exit("attentionSequence");
  87418. const after = classifyCharacter(code2);
  87419. const open = !after || after === 2 && before || attentionMarkers2.includes(code2);
  87420. const close = !before || before === 2 && after || attentionMarkers2.includes(previous2);
  87421. token2._open = Boolean(marker === 42 ? open : open && (before || !close));
  87422. token2._close = Boolean(marker === 42 ? close : close && (after || !open));
  87423. return ok2(code2);
  87424. }
  87425. }
  87426. function movePoint(point4, offset3) {
  87427. point4.column += offset3;
  87428. point4.offset += offset3;
  87429. point4._bufferIndex += offset3;
  87430. }
  87431. // node_modules/micromark-core-commonmark/lib/autolink.js
  87432. var autolink = {
  87433. name: "autolink",
  87434. tokenize: tokenizeAutolink
  87435. };
  87436. function tokenizeAutolink(effects, ok2, nok) {
  87437. let size = 1;
  87438. return start3;
  87439. function start3(code2) {
  87440. effects.enter("autolink");
  87441. effects.enter("autolinkMarker");
  87442. effects.consume(code2);
  87443. effects.exit("autolinkMarker");
  87444. effects.enter("autolinkProtocol");
  87445. return open;
  87446. }
  87447. function open(code2) {
  87448. if (asciiAlpha(code2)) {
  87449. effects.consume(code2);
  87450. return schemeOrEmailAtext;
  87451. }
  87452. return asciiAtext(code2) ? emailAtext(code2) : nok(code2);
  87453. }
  87454. function schemeOrEmailAtext(code2) {
  87455. return code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2) ? schemeInsideOrEmailAtext(code2) : emailAtext(code2);
  87456. }
  87457. function schemeInsideOrEmailAtext(code2) {
  87458. if (code2 === 58) {
  87459. effects.consume(code2);
  87460. return urlInside;
  87461. }
  87462. if ((code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) && size++ < 32) {
  87463. effects.consume(code2);
  87464. return schemeInsideOrEmailAtext;
  87465. }
  87466. return emailAtext(code2);
  87467. }
  87468. function urlInside(code2) {
  87469. if (code2 === 62) {
  87470. effects.exit("autolinkProtocol");
  87471. return end(code2);
  87472. }
  87473. if (code2 === null || code2 === 32 || code2 === 60 || asciiControl(code2)) {
  87474. return nok(code2);
  87475. }
  87476. effects.consume(code2);
  87477. return urlInside;
  87478. }
  87479. function emailAtext(code2) {
  87480. if (code2 === 64) {
  87481. effects.consume(code2);
  87482. size = 0;
  87483. return emailAtSignOrDot;
  87484. }
  87485. if (asciiAtext(code2)) {
  87486. effects.consume(code2);
  87487. return emailAtext;
  87488. }
  87489. return nok(code2);
  87490. }
  87491. function emailAtSignOrDot(code2) {
  87492. return asciiAlphanumeric(code2) ? emailLabel(code2) : nok(code2);
  87493. }
  87494. function emailLabel(code2) {
  87495. if (code2 === 46) {
  87496. effects.consume(code2);
  87497. size = 0;
  87498. return emailAtSignOrDot;
  87499. }
  87500. if (code2 === 62) {
  87501. effects.exit("autolinkProtocol").type = "autolinkEmail";
  87502. return end(code2);
  87503. }
  87504. return emailValue(code2);
  87505. }
  87506. function emailValue(code2) {
  87507. if ((code2 === 45 || asciiAlphanumeric(code2)) && size++ < 63) {
  87508. effects.consume(code2);
  87509. return code2 === 45 ? emailValue : emailLabel;
  87510. }
  87511. return nok(code2);
  87512. }
  87513. function end(code2) {
  87514. effects.enter("autolinkMarker");
  87515. effects.consume(code2);
  87516. effects.exit("autolinkMarker");
  87517. effects.exit("autolink");
  87518. return ok2;
  87519. }
  87520. }
  87521. // node_modules/micromark-core-commonmark/lib/blank-line.js
  87522. var blankLine = {
  87523. tokenize: tokenizeBlankLine,
  87524. partial: true
  87525. };
  87526. function tokenizeBlankLine(effects, ok2, nok) {
  87527. return factorySpace(effects, afterWhitespace, "linePrefix");
  87528. function afterWhitespace(code2) {
  87529. return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  87530. }
  87531. }
  87532. // node_modules/micromark-core-commonmark/lib/block-quote.js
  87533. var blockQuote = {
  87534. name: "blockQuote",
  87535. tokenize: tokenizeBlockQuoteStart,
  87536. continuation: {
  87537. tokenize: tokenizeBlockQuoteContinuation
  87538. },
  87539. exit
  87540. };
  87541. function tokenizeBlockQuoteStart(effects, ok2, nok) {
  87542. const self2 = this;
  87543. return start3;
  87544. function start3(code2) {
  87545. if (code2 === 62) {
  87546. const state = self2.containerState;
  87547. if (!state.open) {
  87548. effects.enter("blockQuote", {
  87549. _container: true
  87550. });
  87551. state.open = true;
  87552. }
  87553. effects.enter("blockQuotePrefix");
  87554. effects.enter("blockQuoteMarker");
  87555. effects.consume(code2);
  87556. effects.exit("blockQuoteMarker");
  87557. return after;
  87558. }
  87559. return nok(code2);
  87560. }
  87561. function after(code2) {
  87562. if (markdownSpace(code2)) {
  87563. effects.enter("blockQuotePrefixWhitespace");
  87564. effects.consume(code2);
  87565. effects.exit("blockQuotePrefixWhitespace");
  87566. effects.exit("blockQuotePrefix");
  87567. return ok2;
  87568. }
  87569. effects.exit("blockQuotePrefix");
  87570. return ok2(code2);
  87571. }
  87572. }
  87573. function tokenizeBlockQuoteContinuation(effects, ok2, nok) {
  87574. return factorySpace(
  87575. effects,
  87576. effects.attempt(blockQuote, ok2, nok),
  87577. "linePrefix",
  87578. this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  87579. );
  87580. }
  87581. function exit(effects) {
  87582. effects.exit("blockQuote");
  87583. }
  87584. // node_modules/micromark-core-commonmark/lib/character-escape.js
  87585. var characterEscape = {
  87586. name: "characterEscape",
  87587. tokenize: tokenizeCharacterEscape
  87588. };
  87589. function tokenizeCharacterEscape(effects, ok2, nok) {
  87590. return start3;
  87591. function start3(code2) {
  87592. effects.enter("characterEscape");
  87593. effects.enter("escapeMarker");
  87594. effects.consume(code2);
  87595. effects.exit("escapeMarker");
  87596. return open;
  87597. }
  87598. function open(code2) {
  87599. if (asciiPunctuation(code2)) {
  87600. effects.enter("characterEscapeValue");
  87601. effects.consume(code2);
  87602. effects.exit("characterEscapeValue");
  87603. effects.exit("characterEscape");
  87604. return ok2;
  87605. }
  87606. return nok(code2);
  87607. }
  87608. }
  87609. // node_modules/character-entities/index.js
  87610. var characterEntities = {
  87611. AElig: "\xC6",
  87612. AMP: "&",
  87613. Aacute: "\xC1",
  87614. Abreve: "\u0102",
  87615. Acirc: "\xC2",
  87616. Acy: "\u0410",
  87617. Afr: "\u{1D504}",
  87618. Agrave: "\xC0",
  87619. Alpha: "\u0391",
  87620. Amacr: "\u0100",
  87621. And: "\u2A53",
  87622. Aogon: "\u0104",
  87623. Aopf: "\u{1D538}",
  87624. ApplyFunction: "\u2061",
  87625. Aring: "\xC5",
  87626. Ascr: "\u{1D49C}",
  87627. Assign: "\u2254",
  87628. Atilde: "\xC3",
  87629. Auml: "\xC4",
  87630. Backslash: "\u2216",
  87631. Barv: "\u2AE7",
  87632. Barwed: "\u2306",
  87633. Bcy: "\u0411",
  87634. Because: "\u2235",
  87635. Bernoullis: "\u212C",
  87636. Beta: "\u0392",
  87637. Bfr: "\u{1D505}",
  87638. Bopf: "\u{1D539}",
  87639. Breve: "\u02D8",
  87640. Bscr: "\u212C",
  87641. Bumpeq: "\u224E",
  87642. CHcy: "\u0427",
  87643. COPY: "\xA9",
  87644. Cacute: "\u0106",
  87645. Cap: "\u22D2",
  87646. CapitalDifferentialD: "\u2145",
  87647. Cayleys: "\u212D",
  87648. Ccaron: "\u010C",
  87649. Ccedil: "\xC7",
  87650. Ccirc: "\u0108",
  87651. Cconint: "\u2230",
  87652. Cdot: "\u010A",
  87653. Cedilla: "\xB8",
  87654. CenterDot: "\xB7",
  87655. Cfr: "\u212D",
  87656. Chi: "\u03A7",
  87657. CircleDot: "\u2299",
  87658. CircleMinus: "\u2296",
  87659. CirclePlus: "\u2295",
  87660. CircleTimes: "\u2297",
  87661. ClockwiseContourIntegral: "\u2232",
  87662. CloseCurlyDoubleQuote: "\u201D",
  87663. CloseCurlyQuote: "\u2019",
  87664. Colon: "\u2237",
  87665. Colone: "\u2A74",
  87666. Congruent: "\u2261",
  87667. Conint: "\u222F",
  87668. ContourIntegral: "\u222E",
  87669. Copf: "\u2102",
  87670. Coproduct: "\u2210",
  87671. CounterClockwiseContourIntegral: "\u2233",
  87672. Cross: "\u2A2F",
  87673. Cscr: "\u{1D49E}",
  87674. Cup: "\u22D3",
  87675. CupCap: "\u224D",
  87676. DD: "\u2145",
  87677. DDotrahd: "\u2911",
  87678. DJcy: "\u0402",
  87679. DScy: "\u0405",
  87680. DZcy: "\u040F",
  87681. Dagger: "\u2021",
  87682. Darr: "\u21A1",
  87683. Dashv: "\u2AE4",
  87684. Dcaron: "\u010E",
  87685. Dcy: "\u0414",
  87686. Del: "\u2207",
  87687. Delta: "\u0394",
  87688. Dfr: "\u{1D507}",
  87689. DiacriticalAcute: "\xB4",
  87690. DiacriticalDot: "\u02D9",
  87691. DiacriticalDoubleAcute: "\u02DD",
  87692. DiacriticalGrave: "`",
  87693. DiacriticalTilde: "\u02DC",
  87694. Diamond: "\u22C4",
  87695. DifferentialD: "\u2146",
  87696. Dopf: "\u{1D53B}",
  87697. Dot: "\xA8",
  87698. DotDot: "\u20DC",
  87699. DotEqual: "\u2250",
  87700. DoubleContourIntegral: "\u222F",
  87701. DoubleDot: "\xA8",
  87702. DoubleDownArrow: "\u21D3",
  87703. DoubleLeftArrow: "\u21D0",
  87704. DoubleLeftRightArrow: "\u21D4",
  87705. DoubleLeftTee: "\u2AE4",
  87706. DoubleLongLeftArrow: "\u27F8",
  87707. DoubleLongLeftRightArrow: "\u27FA",
  87708. DoubleLongRightArrow: "\u27F9",
  87709. DoubleRightArrow: "\u21D2",
  87710. DoubleRightTee: "\u22A8",
  87711. DoubleUpArrow: "\u21D1",
  87712. DoubleUpDownArrow: "\u21D5",
  87713. DoubleVerticalBar: "\u2225",
  87714. DownArrow: "\u2193",
  87715. DownArrowBar: "\u2913",
  87716. DownArrowUpArrow: "\u21F5",
  87717. DownBreve: "\u0311",
  87718. DownLeftRightVector: "\u2950",
  87719. DownLeftTeeVector: "\u295E",
  87720. DownLeftVector: "\u21BD",
  87721. DownLeftVectorBar: "\u2956",
  87722. DownRightTeeVector: "\u295F",
  87723. DownRightVector: "\u21C1",
  87724. DownRightVectorBar: "\u2957",
  87725. DownTee: "\u22A4",
  87726. DownTeeArrow: "\u21A7",
  87727. Downarrow: "\u21D3",
  87728. Dscr: "\u{1D49F}",
  87729. Dstrok: "\u0110",
  87730. ENG: "\u014A",
  87731. ETH: "\xD0",
  87732. Eacute: "\xC9",
  87733. Ecaron: "\u011A",
  87734. Ecirc: "\xCA",
  87735. Ecy: "\u042D",
  87736. Edot: "\u0116",
  87737. Efr: "\u{1D508}",
  87738. Egrave: "\xC8",
  87739. Element: "\u2208",
  87740. Emacr: "\u0112",
  87741. EmptySmallSquare: "\u25FB",
  87742. EmptyVerySmallSquare: "\u25AB",
  87743. Eogon: "\u0118",
  87744. Eopf: "\u{1D53C}",
  87745. Epsilon: "\u0395",
  87746. Equal: "\u2A75",
  87747. EqualTilde: "\u2242",
  87748. Equilibrium: "\u21CC",
  87749. Escr: "\u2130",
  87750. Esim: "\u2A73",
  87751. Eta: "\u0397",
  87752. Euml: "\xCB",
  87753. Exists: "\u2203",
  87754. ExponentialE: "\u2147",
  87755. Fcy: "\u0424",
  87756. Ffr: "\u{1D509}",
  87757. FilledSmallSquare: "\u25FC",
  87758. FilledVerySmallSquare: "\u25AA",
  87759. Fopf: "\u{1D53D}",
  87760. ForAll: "\u2200",
  87761. Fouriertrf: "\u2131",
  87762. Fscr: "\u2131",
  87763. GJcy: "\u0403",
  87764. GT: ">",
  87765. Gamma: "\u0393",
  87766. Gammad: "\u03DC",
  87767. Gbreve: "\u011E",
  87768. Gcedil: "\u0122",
  87769. Gcirc: "\u011C",
  87770. Gcy: "\u0413",
  87771. Gdot: "\u0120",
  87772. Gfr: "\u{1D50A}",
  87773. Gg: "\u22D9",
  87774. Gopf: "\u{1D53E}",
  87775. GreaterEqual: "\u2265",
  87776. GreaterEqualLess: "\u22DB",
  87777. GreaterFullEqual: "\u2267",
  87778. GreaterGreater: "\u2AA2",
  87779. GreaterLess: "\u2277",
  87780. GreaterSlantEqual: "\u2A7E",
  87781. GreaterTilde: "\u2273",
  87782. Gscr: "\u{1D4A2}",
  87783. Gt: "\u226B",
  87784. HARDcy: "\u042A",
  87785. Hacek: "\u02C7",
  87786. Hat: "^",
  87787. Hcirc: "\u0124",
  87788. Hfr: "\u210C",
  87789. HilbertSpace: "\u210B",
  87790. Hopf: "\u210D",
  87791. HorizontalLine: "\u2500",
  87792. Hscr: "\u210B",
  87793. Hstrok: "\u0126",
  87794. HumpDownHump: "\u224E",
  87795. HumpEqual: "\u224F",
  87796. IEcy: "\u0415",
  87797. IJlig: "\u0132",
  87798. IOcy: "\u0401",
  87799. Iacute: "\xCD",
  87800. Icirc: "\xCE",
  87801. Icy: "\u0418",
  87802. Idot: "\u0130",
  87803. Ifr: "\u2111",
  87804. Igrave: "\xCC",
  87805. Im: "\u2111",
  87806. Imacr: "\u012A",
  87807. ImaginaryI: "\u2148",
  87808. Implies: "\u21D2",
  87809. Int: "\u222C",
  87810. Integral: "\u222B",
  87811. Intersection: "\u22C2",
  87812. InvisibleComma: "\u2063",
  87813. InvisibleTimes: "\u2062",
  87814. Iogon: "\u012E",
  87815. Iopf: "\u{1D540}",
  87816. Iota: "\u0399",
  87817. Iscr: "\u2110",
  87818. Itilde: "\u0128",
  87819. Iukcy: "\u0406",
  87820. Iuml: "\xCF",
  87821. Jcirc: "\u0134",
  87822. Jcy: "\u0419",
  87823. Jfr: "\u{1D50D}",
  87824. Jopf: "\u{1D541}",
  87825. Jscr: "\u{1D4A5}",
  87826. Jsercy: "\u0408",
  87827. Jukcy: "\u0404",
  87828. KHcy: "\u0425",
  87829. KJcy: "\u040C",
  87830. Kappa: "\u039A",
  87831. Kcedil: "\u0136",
  87832. Kcy: "\u041A",
  87833. Kfr: "\u{1D50E}",
  87834. Kopf: "\u{1D542}",
  87835. Kscr: "\u{1D4A6}",
  87836. LJcy: "\u0409",
  87837. LT: "<",
  87838. Lacute: "\u0139",
  87839. Lambda: "\u039B",
  87840. Lang: "\u27EA",
  87841. Laplacetrf: "\u2112",
  87842. Larr: "\u219E",
  87843. Lcaron: "\u013D",
  87844. Lcedil: "\u013B",
  87845. Lcy: "\u041B",
  87846. LeftAngleBracket: "\u27E8",
  87847. LeftArrow: "\u2190",
  87848. LeftArrowBar: "\u21E4",
  87849. LeftArrowRightArrow: "\u21C6",
  87850. LeftCeiling: "\u2308",
  87851. LeftDoubleBracket: "\u27E6",
  87852. LeftDownTeeVector: "\u2961",
  87853. LeftDownVector: "\u21C3",
  87854. LeftDownVectorBar: "\u2959",
  87855. LeftFloor: "\u230A",
  87856. LeftRightArrow: "\u2194",
  87857. LeftRightVector: "\u294E",
  87858. LeftTee: "\u22A3",
  87859. LeftTeeArrow: "\u21A4",
  87860. LeftTeeVector: "\u295A",
  87861. LeftTriangle: "\u22B2",
  87862. LeftTriangleBar: "\u29CF",
  87863. LeftTriangleEqual: "\u22B4",
  87864. LeftUpDownVector: "\u2951",
  87865. LeftUpTeeVector: "\u2960",
  87866. LeftUpVector: "\u21BF",
  87867. LeftUpVectorBar: "\u2958",
  87868. LeftVector: "\u21BC",
  87869. LeftVectorBar: "\u2952",
  87870. Leftarrow: "\u21D0",
  87871. Leftrightarrow: "\u21D4",
  87872. LessEqualGreater: "\u22DA",
  87873. LessFullEqual: "\u2266",
  87874. LessGreater: "\u2276",
  87875. LessLess: "\u2AA1",
  87876. LessSlantEqual: "\u2A7D",
  87877. LessTilde: "\u2272",
  87878. Lfr: "\u{1D50F}",
  87879. Ll: "\u22D8",
  87880. Lleftarrow: "\u21DA",
  87881. Lmidot: "\u013F",
  87882. LongLeftArrow: "\u27F5",
  87883. LongLeftRightArrow: "\u27F7",
  87884. LongRightArrow: "\u27F6",
  87885. Longleftarrow: "\u27F8",
  87886. Longleftrightarrow: "\u27FA",
  87887. Longrightarrow: "\u27F9",
  87888. Lopf: "\u{1D543}",
  87889. LowerLeftArrow: "\u2199",
  87890. LowerRightArrow: "\u2198",
  87891. Lscr: "\u2112",
  87892. Lsh: "\u21B0",
  87893. Lstrok: "\u0141",
  87894. Lt: "\u226A",
  87895. Map: "\u2905",
  87896. Mcy: "\u041C",
  87897. MediumSpace: "\u205F",
  87898. Mellintrf: "\u2133",
  87899. Mfr: "\u{1D510}",
  87900. MinusPlus: "\u2213",
  87901. Mopf: "\u{1D544}",
  87902. Mscr: "\u2133",
  87903. Mu: "\u039C",
  87904. NJcy: "\u040A",
  87905. Nacute: "\u0143",
  87906. Ncaron: "\u0147",
  87907. Ncedil: "\u0145",
  87908. Ncy: "\u041D",
  87909. NegativeMediumSpace: "\u200B",
  87910. NegativeThickSpace: "\u200B",
  87911. NegativeThinSpace: "\u200B",
  87912. NegativeVeryThinSpace: "\u200B",
  87913. NestedGreaterGreater: "\u226B",
  87914. NestedLessLess: "\u226A",
  87915. NewLine: "\n",
  87916. Nfr: "\u{1D511}",
  87917. NoBreak: "\u2060",
  87918. NonBreakingSpace: "\xA0",
  87919. Nopf: "\u2115",
  87920. Not: "\u2AEC",
  87921. NotCongruent: "\u2262",
  87922. NotCupCap: "\u226D",
  87923. NotDoubleVerticalBar: "\u2226",
  87924. NotElement: "\u2209",
  87925. NotEqual: "\u2260",
  87926. NotEqualTilde: "\u2242\u0338",
  87927. NotExists: "\u2204",
  87928. NotGreater: "\u226F",
  87929. NotGreaterEqual: "\u2271",
  87930. NotGreaterFullEqual: "\u2267\u0338",
  87931. NotGreaterGreater: "\u226B\u0338",
  87932. NotGreaterLess: "\u2279",
  87933. NotGreaterSlantEqual: "\u2A7E\u0338",
  87934. NotGreaterTilde: "\u2275",
  87935. NotHumpDownHump: "\u224E\u0338",
  87936. NotHumpEqual: "\u224F\u0338",
  87937. NotLeftTriangle: "\u22EA",
  87938. NotLeftTriangleBar: "\u29CF\u0338",
  87939. NotLeftTriangleEqual: "\u22EC",
  87940. NotLess: "\u226E",
  87941. NotLessEqual: "\u2270",
  87942. NotLessGreater: "\u2278",
  87943. NotLessLess: "\u226A\u0338",
  87944. NotLessSlantEqual: "\u2A7D\u0338",
  87945. NotLessTilde: "\u2274",
  87946. NotNestedGreaterGreater: "\u2AA2\u0338",
  87947. NotNestedLessLess: "\u2AA1\u0338",
  87948. NotPrecedes: "\u2280",
  87949. NotPrecedesEqual: "\u2AAF\u0338",
  87950. NotPrecedesSlantEqual: "\u22E0",
  87951. NotReverseElement: "\u220C",
  87952. NotRightTriangle: "\u22EB",
  87953. NotRightTriangleBar: "\u29D0\u0338",
  87954. NotRightTriangleEqual: "\u22ED",
  87955. NotSquareSubset: "\u228F\u0338",
  87956. NotSquareSubsetEqual: "\u22E2",
  87957. NotSquareSuperset: "\u2290\u0338",
  87958. NotSquareSupersetEqual: "\u22E3",
  87959. NotSubset: "\u2282\u20D2",
  87960. NotSubsetEqual: "\u2288",
  87961. NotSucceeds: "\u2281",
  87962. NotSucceedsEqual: "\u2AB0\u0338",
  87963. NotSucceedsSlantEqual: "\u22E1",
  87964. NotSucceedsTilde: "\u227F\u0338",
  87965. NotSuperset: "\u2283\u20D2",
  87966. NotSupersetEqual: "\u2289",
  87967. NotTilde: "\u2241",
  87968. NotTildeEqual: "\u2244",
  87969. NotTildeFullEqual: "\u2247",
  87970. NotTildeTilde: "\u2249",
  87971. NotVerticalBar: "\u2224",
  87972. Nscr: "\u{1D4A9}",
  87973. Ntilde: "\xD1",
  87974. Nu: "\u039D",
  87975. OElig: "\u0152",
  87976. Oacute: "\xD3",
  87977. Ocirc: "\xD4",
  87978. Ocy: "\u041E",
  87979. Odblac: "\u0150",
  87980. Ofr: "\u{1D512}",
  87981. Ograve: "\xD2",
  87982. Omacr: "\u014C",
  87983. Omega: "\u03A9",
  87984. Omicron: "\u039F",
  87985. Oopf: "\u{1D546}",
  87986. OpenCurlyDoubleQuote: "\u201C",
  87987. OpenCurlyQuote: "\u2018",
  87988. Or: "\u2A54",
  87989. Oscr: "\u{1D4AA}",
  87990. Oslash: "\xD8",
  87991. Otilde: "\xD5",
  87992. Otimes: "\u2A37",
  87993. Ouml: "\xD6",
  87994. OverBar: "\u203E",
  87995. OverBrace: "\u23DE",
  87996. OverBracket: "\u23B4",
  87997. OverParenthesis: "\u23DC",
  87998. PartialD: "\u2202",
  87999. Pcy: "\u041F",
  88000. Pfr: "\u{1D513}",
  88001. Phi: "\u03A6",
  88002. Pi: "\u03A0",
  88003. PlusMinus: "\xB1",
  88004. Poincareplane: "\u210C",
  88005. Popf: "\u2119",
  88006. Pr: "\u2ABB",
  88007. Precedes: "\u227A",
  88008. PrecedesEqual: "\u2AAF",
  88009. PrecedesSlantEqual: "\u227C",
  88010. PrecedesTilde: "\u227E",
  88011. Prime: "\u2033",
  88012. Product: "\u220F",
  88013. Proportion: "\u2237",
  88014. Proportional: "\u221D",
  88015. Pscr: "\u{1D4AB}",
  88016. Psi: "\u03A8",
  88017. QUOT: '"',
  88018. Qfr: "\u{1D514}",
  88019. Qopf: "\u211A",
  88020. Qscr: "\u{1D4AC}",
  88021. RBarr: "\u2910",
  88022. REG: "\xAE",
  88023. Racute: "\u0154",
  88024. Rang: "\u27EB",
  88025. Rarr: "\u21A0",
  88026. Rarrtl: "\u2916",
  88027. Rcaron: "\u0158",
  88028. Rcedil: "\u0156",
  88029. Rcy: "\u0420",
  88030. Re: "\u211C",
  88031. ReverseElement: "\u220B",
  88032. ReverseEquilibrium: "\u21CB",
  88033. ReverseUpEquilibrium: "\u296F",
  88034. Rfr: "\u211C",
  88035. Rho: "\u03A1",
  88036. RightAngleBracket: "\u27E9",
  88037. RightArrow: "\u2192",
  88038. RightArrowBar: "\u21E5",
  88039. RightArrowLeftArrow: "\u21C4",
  88040. RightCeiling: "\u2309",
  88041. RightDoubleBracket: "\u27E7",
  88042. RightDownTeeVector: "\u295D",
  88043. RightDownVector: "\u21C2",
  88044. RightDownVectorBar: "\u2955",
  88045. RightFloor: "\u230B",
  88046. RightTee: "\u22A2",
  88047. RightTeeArrow: "\u21A6",
  88048. RightTeeVector: "\u295B",
  88049. RightTriangle: "\u22B3",
  88050. RightTriangleBar: "\u29D0",
  88051. RightTriangleEqual: "\u22B5",
  88052. RightUpDownVector: "\u294F",
  88053. RightUpTeeVector: "\u295C",
  88054. RightUpVector: "\u21BE",
  88055. RightUpVectorBar: "\u2954",
  88056. RightVector: "\u21C0",
  88057. RightVectorBar: "\u2953",
  88058. Rightarrow: "\u21D2",
  88059. Ropf: "\u211D",
  88060. RoundImplies: "\u2970",
  88061. Rrightarrow: "\u21DB",
  88062. Rscr: "\u211B",
  88063. Rsh: "\u21B1",
  88064. RuleDelayed: "\u29F4",
  88065. SHCHcy: "\u0429",
  88066. SHcy: "\u0428",
  88067. SOFTcy: "\u042C",
  88068. Sacute: "\u015A",
  88069. Sc: "\u2ABC",
  88070. Scaron: "\u0160",
  88071. Scedil: "\u015E",
  88072. Scirc: "\u015C",
  88073. Scy: "\u0421",
  88074. Sfr: "\u{1D516}",
  88075. ShortDownArrow: "\u2193",
  88076. ShortLeftArrow: "\u2190",
  88077. ShortRightArrow: "\u2192",
  88078. ShortUpArrow: "\u2191",
  88079. Sigma: "\u03A3",
  88080. SmallCircle: "\u2218",
  88081. Sopf: "\u{1D54A}",
  88082. Sqrt: "\u221A",
  88083. Square: "\u25A1",
  88084. SquareIntersection: "\u2293",
  88085. SquareSubset: "\u228F",
  88086. SquareSubsetEqual: "\u2291",
  88087. SquareSuperset: "\u2290",
  88088. SquareSupersetEqual: "\u2292",
  88089. SquareUnion: "\u2294",
  88090. Sscr: "\u{1D4AE}",
  88091. Star: "\u22C6",
  88092. Sub: "\u22D0",
  88093. Subset: "\u22D0",
  88094. SubsetEqual: "\u2286",
  88095. Succeeds: "\u227B",
  88096. SucceedsEqual: "\u2AB0",
  88097. SucceedsSlantEqual: "\u227D",
  88098. SucceedsTilde: "\u227F",
  88099. SuchThat: "\u220B",
  88100. Sum: "\u2211",
  88101. Sup: "\u22D1",
  88102. Superset: "\u2283",
  88103. SupersetEqual: "\u2287",
  88104. Supset: "\u22D1",
  88105. THORN: "\xDE",
  88106. TRADE: "\u2122",
  88107. TSHcy: "\u040B",
  88108. TScy: "\u0426",
  88109. Tab: " ",
  88110. Tau: "\u03A4",
  88111. Tcaron: "\u0164",
  88112. Tcedil: "\u0162",
  88113. Tcy: "\u0422",
  88114. Tfr: "\u{1D517}",
  88115. Therefore: "\u2234",
  88116. Theta: "\u0398",
  88117. ThickSpace: "\u205F\u200A",
  88118. ThinSpace: "\u2009",
  88119. Tilde: "\u223C",
  88120. TildeEqual: "\u2243",
  88121. TildeFullEqual: "\u2245",
  88122. TildeTilde: "\u2248",
  88123. Topf: "\u{1D54B}",
  88124. TripleDot: "\u20DB",
  88125. Tscr: "\u{1D4AF}",
  88126. Tstrok: "\u0166",
  88127. Uacute: "\xDA",
  88128. Uarr: "\u219F",
  88129. Uarrocir: "\u2949",
  88130. Ubrcy: "\u040E",
  88131. Ubreve: "\u016C",
  88132. Ucirc: "\xDB",
  88133. Ucy: "\u0423",
  88134. Udblac: "\u0170",
  88135. Ufr: "\u{1D518}",
  88136. Ugrave: "\xD9",
  88137. Umacr: "\u016A",
  88138. UnderBar: "_",
  88139. UnderBrace: "\u23DF",
  88140. UnderBracket: "\u23B5",
  88141. UnderParenthesis: "\u23DD",
  88142. Union: "\u22C3",
  88143. UnionPlus: "\u228E",
  88144. Uogon: "\u0172",
  88145. Uopf: "\u{1D54C}",
  88146. UpArrow: "\u2191",
  88147. UpArrowBar: "\u2912",
  88148. UpArrowDownArrow: "\u21C5",
  88149. UpDownArrow: "\u2195",
  88150. UpEquilibrium: "\u296E",
  88151. UpTee: "\u22A5",
  88152. UpTeeArrow: "\u21A5",
  88153. Uparrow: "\u21D1",
  88154. Updownarrow: "\u21D5",
  88155. UpperLeftArrow: "\u2196",
  88156. UpperRightArrow: "\u2197",
  88157. Upsi: "\u03D2",
  88158. Upsilon: "\u03A5",
  88159. Uring: "\u016E",
  88160. Uscr: "\u{1D4B0}",
  88161. Utilde: "\u0168",
  88162. Uuml: "\xDC",
  88163. VDash: "\u22AB",
  88164. Vbar: "\u2AEB",
  88165. Vcy: "\u0412",
  88166. Vdash: "\u22A9",
  88167. Vdashl: "\u2AE6",
  88168. Vee: "\u22C1",
  88169. Verbar: "\u2016",
  88170. Vert: "\u2016",
  88171. VerticalBar: "\u2223",
  88172. VerticalLine: "|",
  88173. VerticalSeparator: "\u2758",
  88174. VerticalTilde: "\u2240",
  88175. VeryThinSpace: "\u200A",
  88176. Vfr: "\u{1D519}",
  88177. Vopf: "\u{1D54D}",
  88178. Vscr: "\u{1D4B1}",
  88179. Vvdash: "\u22AA",
  88180. Wcirc: "\u0174",
  88181. Wedge: "\u22C0",
  88182. Wfr: "\u{1D51A}",
  88183. Wopf: "\u{1D54E}",
  88184. Wscr: "\u{1D4B2}",
  88185. Xfr: "\u{1D51B}",
  88186. Xi: "\u039E",
  88187. Xopf: "\u{1D54F}",
  88188. Xscr: "\u{1D4B3}",
  88189. YAcy: "\u042F",
  88190. YIcy: "\u0407",
  88191. YUcy: "\u042E",
  88192. Yacute: "\xDD",
  88193. Ycirc: "\u0176",
  88194. Ycy: "\u042B",
  88195. Yfr: "\u{1D51C}",
  88196. Yopf: "\u{1D550}",
  88197. Yscr: "\u{1D4B4}",
  88198. Yuml: "\u0178",
  88199. ZHcy: "\u0416",
  88200. Zacute: "\u0179",
  88201. Zcaron: "\u017D",
  88202. Zcy: "\u0417",
  88203. Zdot: "\u017B",
  88204. ZeroWidthSpace: "\u200B",
  88205. Zeta: "\u0396",
  88206. Zfr: "\u2128",
  88207. Zopf: "\u2124",
  88208. Zscr: "\u{1D4B5}",
  88209. aacute: "\xE1",
  88210. abreve: "\u0103",
  88211. ac: "\u223E",
  88212. acE: "\u223E\u0333",
  88213. acd: "\u223F",
  88214. acirc: "\xE2",
  88215. acute: "\xB4",
  88216. acy: "\u0430",
  88217. aelig: "\xE6",
  88218. af: "\u2061",
  88219. afr: "\u{1D51E}",
  88220. agrave: "\xE0",
  88221. alefsym: "\u2135",
  88222. aleph: "\u2135",
  88223. alpha: "\u03B1",
  88224. amacr: "\u0101",
  88225. amalg: "\u2A3F",
  88226. amp: "&",
  88227. and: "\u2227",
  88228. andand: "\u2A55",
  88229. andd: "\u2A5C",
  88230. andslope: "\u2A58",
  88231. andv: "\u2A5A",
  88232. ang: "\u2220",
  88233. ange: "\u29A4",
  88234. angle: "\u2220",
  88235. angmsd: "\u2221",
  88236. angmsdaa: "\u29A8",
  88237. angmsdab: "\u29A9",
  88238. angmsdac: "\u29AA",
  88239. angmsdad: "\u29AB",
  88240. angmsdae: "\u29AC",
  88241. angmsdaf: "\u29AD",
  88242. angmsdag: "\u29AE",
  88243. angmsdah: "\u29AF",
  88244. angrt: "\u221F",
  88245. angrtvb: "\u22BE",
  88246. angrtvbd: "\u299D",
  88247. angsph: "\u2222",
  88248. angst: "\xC5",
  88249. angzarr: "\u237C",
  88250. aogon: "\u0105",
  88251. aopf: "\u{1D552}",
  88252. ap: "\u2248",
  88253. apE: "\u2A70",
  88254. apacir: "\u2A6F",
  88255. ape: "\u224A",
  88256. apid: "\u224B",
  88257. apos: "'",
  88258. approx: "\u2248",
  88259. approxeq: "\u224A",
  88260. aring: "\xE5",
  88261. ascr: "\u{1D4B6}",
  88262. ast: "*",
  88263. asymp: "\u2248",
  88264. asympeq: "\u224D",
  88265. atilde: "\xE3",
  88266. auml: "\xE4",
  88267. awconint: "\u2233",
  88268. awint: "\u2A11",
  88269. bNot: "\u2AED",
  88270. backcong: "\u224C",
  88271. backepsilon: "\u03F6",
  88272. backprime: "\u2035",
  88273. backsim: "\u223D",
  88274. backsimeq: "\u22CD",
  88275. barvee: "\u22BD",
  88276. barwed: "\u2305",
  88277. barwedge: "\u2305",
  88278. bbrk: "\u23B5",
  88279. bbrktbrk: "\u23B6",
  88280. bcong: "\u224C",
  88281. bcy: "\u0431",
  88282. bdquo: "\u201E",
  88283. becaus: "\u2235",
  88284. because: "\u2235",
  88285. bemptyv: "\u29B0",
  88286. bepsi: "\u03F6",
  88287. bernou: "\u212C",
  88288. beta: "\u03B2",
  88289. beth: "\u2136",
  88290. between: "\u226C",
  88291. bfr: "\u{1D51F}",
  88292. bigcap: "\u22C2",
  88293. bigcirc: "\u25EF",
  88294. bigcup: "\u22C3",
  88295. bigodot: "\u2A00",
  88296. bigoplus: "\u2A01",
  88297. bigotimes: "\u2A02",
  88298. bigsqcup: "\u2A06",
  88299. bigstar: "\u2605",
  88300. bigtriangledown: "\u25BD",
  88301. bigtriangleup: "\u25B3",
  88302. biguplus: "\u2A04",
  88303. bigvee: "\u22C1",
  88304. bigwedge: "\u22C0",
  88305. bkarow: "\u290D",
  88306. blacklozenge: "\u29EB",
  88307. blacksquare: "\u25AA",
  88308. blacktriangle: "\u25B4",
  88309. blacktriangledown: "\u25BE",
  88310. blacktriangleleft: "\u25C2",
  88311. blacktriangleright: "\u25B8",
  88312. blank: "\u2423",
  88313. blk12: "\u2592",
  88314. blk14: "\u2591",
  88315. blk34: "\u2593",
  88316. block: "\u2588",
  88317. bne: "=\u20E5",
  88318. bnequiv: "\u2261\u20E5",
  88319. bnot: "\u2310",
  88320. bopf: "\u{1D553}",
  88321. bot: "\u22A5",
  88322. bottom: "\u22A5",
  88323. bowtie: "\u22C8",
  88324. boxDL: "\u2557",
  88325. boxDR: "\u2554",
  88326. boxDl: "\u2556",
  88327. boxDr: "\u2553",
  88328. boxH: "\u2550",
  88329. boxHD: "\u2566",
  88330. boxHU: "\u2569",
  88331. boxHd: "\u2564",
  88332. boxHu: "\u2567",
  88333. boxUL: "\u255D",
  88334. boxUR: "\u255A",
  88335. boxUl: "\u255C",
  88336. boxUr: "\u2559",
  88337. boxV: "\u2551",
  88338. boxVH: "\u256C",
  88339. boxVL: "\u2563",
  88340. boxVR: "\u2560",
  88341. boxVh: "\u256B",
  88342. boxVl: "\u2562",
  88343. boxVr: "\u255F",
  88344. boxbox: "\u29C9",
  88345. boxdL: "\u2555",
  88346. boxdR: "\u2552",
  88347. boxdl: "\u2510",
  88348. boxdr: "\u250C",
  88349. boxh: "\u2500",
  88350. boxhD: "\u2565",
  88351. boxhU: "\u2568",
  88352. boxhd: "\u252C",
  88353. boxhu: "\u2534",
  88354. boxminus: "\u229F",
  88355. boxplus: "\u229E",
  88356. boxtimes: "\u22A0",
  88357. boxuL: "\u255B",
  88358. boxuR: "\u2558",
  88359. boxul: "\u2518",
  88360. boxur: "\u2514",
  88361. boxv: "\u2502",
  88362. boxvH: "\u256A",
  88363. boxvL: "\u2561",
  88364. boxvR: "\u255E",
  88365. boxvh: "\u253C",
  88366. boxvl: "\u2524",
  88367. boxvr: "\u251C",
  88368. bprime: "\u2035",
  88369. breve: "\u02D8",
  88370. brvbar: "\xA6",
  88371. bscr: "\u{1D4B7}",
  88372. bsemi: "\u204F",
  88373. bsim: "\u223D",
  88374. bsime: "\u22CD",
  88375. bsol: "\\",
  88376. bsolb: "\u29C5",
  88377. bsolhsub: "\u27C8",
  88378. bull: "\u2022",
  88379. bullet: "\u2022",
  88380. bump: "\u224E",
  88381. bumpE: "\u2AAE",
  88382. bumpe: "\u224F",
  88383. bumpeq: "\u224F",
  88384. cacute: "\u0107",
  88385. cap: "\u2229",
  88386. capand: "\u2A44",
  88387. capbrcup: "\u2A49",
  88388. capcap: "\u2A4B",
  88389. capcup: "\u2A47",
  88390. capdot: "\u2A40",
  88391. caps: "\u2229\uFE00",
  88392. caret: "\u2041",
  88393. caron: "\u02C7",
  88394. ccaps: "\u2A4D",
  88395. ccaron: "\u010D",
  88396. ccedil: "\xE7",
  88397. ccirc: "\u0109",
  88398. ccups: "\u2A4C",
  88399. ccupssm: "\u2A50",
  88400. cdot: "\u010B",
  88401. cedil: "\xB8",
  88402. cemptyv: "\u29B2",
  88403. cent: "\xA2",
  88404. centerdot: "\xB7",
  88405. cfr: "\u{1D520}",
  88406. chcy: "\u0447",
  88407. check: "\u2713",
  88408. checkmark: "\u2713",
  88409. chi: "\u03C7",
  88410. cir: "\u25CB",
  88411. cirE: "\u29C3",
  88412. circ: "\u02C6",
  88413. circeq: "\u2257",
  88414. circlearrowleft: "\u21BA",
  88415. circlearrowright: "\u21BB",
  88416. circledR: "\xAE",
  88417. circledS: "\u24C8",
  88418. circledast: "\u229B",
  88419. circledcirc: "\u229A",
  88420. circleddash: "\u229D",
  88421. cire: "\u2257",
  88422. cirfnint: "\u2A10",
  88423. cirmid: "\u2AEF",
  88424. cirscir: "\u29C2",
  88425. clubs: "\u2663",
  88426. clubsuit: "\u2663",
  88427. colon: ":",
  88428. colone: "\u2254",
  88429. coloneq: "\u2254",
  88430. comma: ",",
  88431. commat: "@",
  88432. comp: "\u2201",
  88433. compfn: "\u2218",
  88434. complement: "\u2201",
  88435. complexes: "\u2102",
  88436. cong: "\u2245",
  88437. congdot: "\u2A6D",
  88438. conint: "\u222E",
  88439. copf: "\u{1D554}",
  88440. coprod: "\u2210",
  88441. copy: "\xA9",
  88442. copysr: "\u2117",
  88443. crarr: "\u21B5",
  88444. cross: "\u2717",
  88445. cscr: "\u{1D4B8}",
  88446. csub: "\u2ACF",
  88447. csube: "\u2AD1",
  88448. csup: "\u2AD0",
  88449. csupe: "\u2AD2",
  88450. ctdot: "\u22EF",
  88451. cudarrl: "\u2938",
  88452. cudarrr: "\u2935",
  88453. cuepr: "\u22DE",
  88454. cuesc: "\u22DF",
  88455. cularr: "\u21B6",
  88456. cularrp: "\u293D",
  88457. cup: "\u222A",
  88458. cupbrcap: "\u2A48",
  88459. cupcap: "\u2A46",
  88460. cupcup: "\u2A4A",
  88461. cupdot: "\u228D",
  88462. cupor: "\u2A45",
  88463. cups: "\u222A\uFE00",
  88464. curarr: "\u21B7",
  88465. curarrm: "\u293C",
  88466. curlyeqprec: "\u22DE",
  88467. curlyeqsucc: "\u22DF",
  88468. curlyvee: "\u22CE",
  88469. curlywedge: "\u22CF",
  88470. curren: "\xA4",
  88471. curvearrowleft: "\u21B6",
  88472. curvearrowright: "\u21B7",
  88473. cuvee: "\u22CE",
  88474. cuwed: "\u22CF",
  88475. cwconint: "\u2232",
  88476. cwint: "\u2231",
  88477. cylcty: "\u232D",
  88478. dArr: "\u21D3",
  88479. dHar: "\u2965",
  88480. dagger: "\u2020",
  88481. daleth: "\u2138",
  88482. darr: "\u2193",
  88483. dash: "\u2010",
  88484. dashv: "\u22A3",
  88485. dbkarow: "\u290F",
  88486. dblac: "\u02DD",
  88487. dcaron: "\u010F",
  88488. dcy: "\u0434",
  88489. dd: "\u2146",
  88490. ddagger: "\u2021",
  88491. ddarr: "\u21CA",
  88492. ddotseq: "\u2A77",
  88493. deg: "\xB0",
  88494. delta: "\u03B4",
  88495. demptyv: "\u29B1",
  88496. dfisht: "\u297F",
  88497. dfr: "\u{1D521}",
  88498. dharl: "\u21C3",
  88499. dharr: "\u21C2",
  88500. diam: "\u22C4",
  88501. diamond: "\u22C4",
  88502. diamondsuit: "\u2666",
  88503. diams: "\u2666",
  88504. die: "\xA8",
  88505. digamma: "\u03DD",
  88506. disin: "\u22F2",
  88507. div: "\xF7",
  88508. divide: "\xF7",
  88509. divideontimes: "\u22C7",
  88510. divonx: "\u22C7",
  88511. djcy: "\u0452",
  88512. dlcorn: "\u231E",
  88513. dlcrop: "\u230D",
  88514. dollar: "$",
  88515. dopf: "\u{1D555}",
  88516. dot: "\u02D9",
  88517. doteq: "\u2250",
  88518. doteqdot: "\u2251",
  88519. dotminus: "\u2238",
  88520. dotplus: "\u2214",
  88521. dotsquare: "\u22A1",
  88522. doublebarwedge: "\u2306",
  88523. downarrow: "\u2193",
  88524. downdownarrows: "\u21CA",
  88525. downharpoonleft: "\u21C3",
  88526. downharpoonright: "\u21C2",
  88527. drbkarow: "\u2910",
  88528. drcorn: "\u231F",
  88529. drcrop: "\u230C",
  88530. dscr: "\u{1D4B9}",
  88531. dscy: "\u0455",
  88532. dsol: "\u29F6",
  88533. dstrok: "\u0111",
  88534. dtdot: "\u22F1",
  88535. dtri: "\u25BF",
  88536. dtrif: "\u25BE",
  88537. duarr: "\u21F5",
  88538. duhar: "\u296F",
  88539. dwangle: "\u29A6",
  88540. dzcy: "\u045F",
  88541. dzigrarr: "\u27FF",
  88542. eDDot: "\u2A77",
  88543. eDot: "\u2251",
  88544. eacute: "\xE9",
  88545. easter: "\u2A6E",
  88546. ecaron: "\u011B",
  88547. ecir: "\u2256",
  88548. ecirc: "\xEA",
  88549. ecolon: "\u2255",
  88550. ecy: "\u044D",
  88551. edot: "\u0117",
  88552. ee: "\u2147",
  88553. efDot: "\u2252",
  88554. efr: "\u{1D522}",
  88555. eg: "\u2A9A",
  88556. egrave: "\xE8",
  88557. egs: "\u2A96",
  88558. egsdot: "\u2A98",
  88559. el: "\u2A99",
  88560. elinters: "\u23E7",
  88561. ell: "\u2113",
  88562. els: "\u2A95",
  88563. elsdot: "\u2A97",
  88564. emacr: "\u0113",
  88565. empty: "\u2205",
  88566. emptyset: "\u2205",
  88567. emptyv: "\u2205",
  88568. emsp13: "\u2004",
  88569. emsp14: "\u2005",
  88570. emsp: "\u2003",
  88571. eng: "\u014B",
  88572. ensp: "\u2002",
  88573. eogon: "\u0119",
  88574. eopf: "\u{1D556}",
  88575. epar: "\u22D5",
  88576. eparsl: "\u29E3",
  88577. eplus: "\u2A71",
  88578. epsi: "\u03B5",
  88579. epsilon: "\u03B5",
  88580. epsiv: "\u03F5",
  88581. eqcirc: "\u2256",
  88582. eqcolon: "\u2255",
  88583. eqsim: "\u2242",
  88584. eqslantgtr: "\u2A96",
  88585. eqslantless: "\u2A95",
  88586. equals: "=",
  88587. equest: "\u225F",
  88588. equiv: "\u2261",
  88589. equivDD: "\u2A78",
  88590. eqvparsl: "\u29E5",
  88591. erDot: "\u2253",
  88592. erarr: "\u2971",
  88593. escr: "\u212F",
  88594. esdot: "\u2250",
  88595. esim: "\u2242",
  88596. eta: "\u03B7",
  88597. eth: "\xF0",
  88598. euml: "\xEB",
  88599. euro: "\u20AC",
  88600. excl: "!",
  88601. exist: "\u2203",
  88602. expectation: "\u2130",
  88603. exponentiale: "\u2147",
  88604. fallingdotseq: "\u2252",
  88605. fcy: "\u0444",
  88606. female: "\u2640",
  88607. ffilig: "\uFB03",
  88608. fflig: "\uFB00",
  88609. ffllig: "\uFB04",
  88610. ffr: "\u{1D523}",
  88611. filig: "\uFB01",
  88612. fjlig: "fj",
  88613. flat: "\u266D",
  88614. fllig: "\uFB02",
  88615. fltns: "\u25B1",
  88616. fnof: "\u0192",
  88617. fopf: "\u{1D557}",
  88618. forall: "\u2200",
  88619. fork: "\u22D4",
  88620. forkv: "\u2AD9",
  88621. fpartint: "\u2A0D",
  88622. frac12: "\xBD",
  88623. frac13: "\u2153",
  88624. frac14: "\xBC",
  88625. frac15: "\u2155",
  88626. frac16: "\u2159",
  88627. frac18: "\u215B",
  88628. frac23: "\u2154",
  88629. frac25: "\u2156",
  88630. frac34: "\xBE",
  88631. frac35: "\u2157",
  88632. frac38: "\u215C",
  88633. frac45: "\u2158",
  88634. frac56: "\u215A",
  88635. frac58: "\u215D",
  88636. frac78: "\u215E",
  88637. frasl: "\u2044",
  88638. frown: "\u2322",
  88639. fscr: "\u{1D4BB}",
  88640. gE: "\u2267",
  88641. gEl: "\u2A8C",
  88642. gacute: "\u01F5",
  88643. gamma: "\u03B3",
  88644. gammad: "\u03DD",
  88645. gap: "\u2A86",
  88646. gbreve: "\u011F",
  88647. gcirc: "\u011D",
  88648. gcy: "\u0433",
  88649. gdot: "\u0121",
  88650. ge: "\u2265",
  88651. gel: "\u22DB",
  88652. geq: "\u2265",
  88653. geqq: "\u2267",
  88654. geqslant: "\u2A7E",
  88655. ges: "\u2A7E",
  88656. gescc: "\u2AA9",
  88657. gesdot: "\u2A80",
  88658. gesdoto: "\u2A82",
  88659. gesdotol: "\u2A84",
  88660. gesl: "\u22DB\uFE00",
  88661. gesles: "\u2A94",
  88662. gfr: "\u{1D524}",
  88663. gg: "\u226B",
  88664. ggg: "\u22D9",
  88665. gimel: "\u2137",
  88666. gjcy: "\u0453",
  88667. gl: "\u2277",
  88668. glE: "\u2A92",
  88669. gla: "\u2AA5",
  88670. glj: "\u2AA4",
  88671. gnE: "\u2269",
  88672. gnap: "\u2A8A",
  88673. gnapprox: "\u2A8A",
  88674. gne: "\u2A88",
  88675. gneq: "\u2A88",
  88676. gneqq: "\u2269",
  88677. gnsim: "\u22E7",
  88678. gopf: "\u{1D558}",
  88679. grave: "`",
  88680. gscr: "\u210A",
  88681. gsim: "\u2273",
  88682. gsime: "\u2A8E",
  88683. gsiml: "\u2A90",
  88684. gt: ">",
  88685. gtcc: "\u2AA7",
  88686. gtcir: "\u2A7A",
  88687. gtdot: "\u22D7",
  88688. gtlPar: "\u2995",
  88689. gtquest: "\u2A7C",
  88690. gtrapprox: "\u2A86",
  88691. gtrarr: "\u2978",
  88692. gtrdot: "\u22D7",
  88693. gtreqless: "\u22DB",
  88694. gtreqqless: "\u2A8C",
  88695. gtrless: "\u2277",
  88696. gtrsim: "\u2273",
  88697. gvertneqq: "\u2269\uFE00",
  88698. gvnE: "\u2269\uFE00",
  88699. hArr: "\u21D4",
  88700. hairsp: "\u200A",
  88701. half: "\xBD",
  88702. hamilt: "\u210B",
  88703. hardcy: "\u044A",
  88704. harr: "\u2194",
  88705. harrcir: "\u2948",
  88706. harrw: "\u21AD",
  88707. hbar: "\u210F",
  88708. hcirc: "\u0125",
  88709. hearts: "\u2665",
  88710. heartsuit: "\u2665",
  88711. hellip: "\u2026",
  88712. hercon: "\u22B9",
  88713. hfr: "\u{1D525}",
  88714. hksearow: "\u2925",
  88715. hkswarow: "\u2926",
  88716. hoarr: "\u21FF",
  88717. homtht: "\u223B",
  88718. hookleftarrow: "\u21A9",
  88719. hookrightarrow: "\u21AA",
  88720. hopf: "\u{1D559}",
  88721. horbar: "\u2015",
  88722. hscr: "\u{1D4BD}",
  88723. hslash: "\u210F",
  88724. hstrok: "\u0127",
  88725. hybull: "\u2043",
  88726. hyphen: "\u2010",
  88727. iacute: "\xED",
  88728. ic: "\u2063",
  88729. icirc: "\xEE",
  88730. icy: "\u0438",
  88731. iecy: "\u0435",
  88732. iexcl: "\xA1",
  88733. iff: "\u21D4",
  88734. ifr: "\u{1D526}",
  88735. igrave: "\xEC",
  88736. ii: "\u2148",
  88737. iiiint: "\u2A0C",
  88738. iiint: "\u222D",
  88739. iinfin: "\u29DC",
  88740. iiota: "\u2129",
  88741. ijlig: "\u0133",
  88742. imacr: "\u012B",
  88743. image: "\u2111",
  88744. imagline: "\u2110",
  88745. imagpart: "\u2111",
  88746. imath: "\u0131",
  88747. imof: "\u22B7",
  88748. imped: "\u01B5",
  88749. in: "\u2208",
  88750. incare: "\u2105",
  88751. infin: "\u221E",
  88752. infintie: "\u29DD",
  88753. inodot: "\u0131",
  88754. int: "\u222B",
  88755. intcal: "\u22BA",
  88756. integers: "\u2124",
  88757. intercal: "\u22BA",
  88758. intlarhk: "\u2A17",
  88759. intprod: "\u2A3C",
  88760. iocy: "\u0451",
  88761. iogon: "\u012F",
  88762. iopf: "\u{1D55A}",
  88763. iota: "\u03B9",
  88764. iprod: "\u2A3C",
  88765. iquest: "\xBF",
  88766. iscr: "\u{1D4BE}",
  88767. isin: "\u2208",
  88768. isinE: "\u22F9",
  88769. isindot: "\u22F5",
  88770. isins: "\u22F4",
  88771. isinsv: "\u22F3",
  88772. isinv: "\u2208",
  88773. it: "\u2062",
  88774. itilde: "\u0129",
  88775. iukcy: "\u0456",
  88776. iuml: "\xEF",
  88777. jcirc: "\u0135",
  88778. jcy: "\u0439",
  88779. jfr: "\u{1D527}",
  88780. jmath: "\u0237",
  88781. jopf: "\u{1D55B}",
  88782. jscr: "\u{1D4BF}",
  88783. jsercy: "\u0458",
  88784. jukcy: "\u0454",
  88785. kappa: "\u03BA",
  88786. kappav: "\u03F0",
  88787. kcedil: "\u0137",
  88788. kcy: "\u043A",
  88789. kfr: "\u{1D528}",
  88790. kgreen: "\u0138",
  88791. khcy: "\u0445",
  88792. kjcy: "\u045C",
  88793. kopf: "\u{1D55C}",
  88794. kscr: "\u{1D4C0}",
  88795. lAarr: "\u21DA",
  88796. lArr: "\u21D0",
  88797. lAtail: "\u291B",
  88798. lBarr: "\u290E",
  88799. lE: "\u2266",
  88800. lEg: "\u2A8B",
  88801. lHar: "\u2962",
  88802. lacute: "\u013A",
  88803. laemptyv: "\u29B4",
  88804. lagran: "\u2112",
  88805. lambda: "\u03BB",
  88806. lang: "\u27E8",
  88807. langd: "\u2991",
  88808. langle: "\u27E8",
  88809. lap: "\u2A85",
  88810. laquo: "\xAB",
  88811. larr: "\u2190",
  88812. larrb: "\u21E4",
  88813. larrbfs: "\u291F",
  88814. larrfs: "\u291D",
  88815. larrhk: "\u21A9",
  88816. larrlp: "\u21AB",
  88817. larrpl: "\u2939",
  88818. larrsim: "\u2973",
  88819. larrtl: "\u21A2",
  88820. lat: "\u2AAB",
  88821. latail: "\u2919",
  88822. late: "\u2AAD",
  88823. lates: "\u2AAD\uFE00",
  88824. lbarr: "\u290C",
  88825. lbbrk: "\u2772",
  88826. lbrace: "{",
  88827. lbrack: "[",
  88828. lbrke: "\u298B",
  88829. lbrksld: "\u298F",
  88830. lbrkslu: "\u298D",
  88831. lcaron: "\u013E",
  88832. lcedil: "\u013C",
  88833. lceil: "\u2308",
  88834. lcub: "{",
  88835. lcy: "\u043B",
  88836. ldca: "\u2936",
  88837. ldquo: "\u201C",
  88838. ldquor: "\u201E",
  88839. ldrdhar: "\u2967",
  88840. ldrushar: "\u294B",
  88841. ldsh: "\u21B2",
  88842. le: "\u2264",
  88843. leftarrow: "\u2190",
  88844. leftarrowtail: "\u21A2",
  88845. leftharpoondown: "\u21BD",
  88846. leftharpoonup: "\u21BC",
  88847. leftleftarrows: "\u21C7",
  88848. leftrightarrow: "\u2194",
  88849. leftrightarrows: "\u21C6",
  88850. leftrightharpoons: "\u21CB",
  88851. leftrightsquigarrow: "\u21AD",
  88852. leftthreetimes: "\u22CB",
  88853. leg: "\u22DA",
  88854. leq: "\u2264",
  88855. leqq: "\u2266",
  88856. leqslant: "\u2A7D",
  88857. les: "\u2A7D",
  88858. lescc: "\u2AA8",
  88859. lesdot: "\u2A7F",
  88860. lesdoto: "\u2A81",
  88861. lesdotor: "\u2A83",
  88862. lesg: "\u22DA\uFE00",
  88863. lesges: "\u2A93",
  88864. lessapprox: "\u2A85",
  88865. lessdot: "\u22D6",
  88866. lesseqgtr: "\u22DA",
  88867. lesseqqgtr: "\u2A8B",
  88868. lessgtr: "\u2276",
  88869. lesssim: "\u2272",
  88870. lfisht: "\u297C",
  88871. lfloor: "\u230A",
  88872. lfr: "\u{1D529}",
  88873. lg: "\u2276",
  88874. lgE: "\u2A91",
  88875. lhard: "\u21BD",
  88876. lharu: "\u21BC",
  88877. lharul: "\u296A",
  88878. lhblk: "\u2584",
  88879. ljcy: "\u0459",
  88880. ll: "\u226A",
  88881. llarr: "\u21C7",
  88882. llcorner: "\u231E",
  88883. llhard: "\u296B",
  88884. lltri: "\u25FA",
  88885. lmidot: "\u0140",
  88886. lmoust: "\u23B0",
  88887. lmoustache: "\u23B0",
  88888. lnE: "\u2268",
  88889. lnap: "\u2A89",
  88890. lnapprox: "\u2A89",
  88891. lne: "\u2A87",
  88892. lneq: "\u2A87",
  88893. lneqq: "\u2268",
  88894. lnsim: "\u22E6",
  88895. loang: "\u27EC",
  88896. loarr: "\u21FD",
  88897. lobrk: "\u27E6",
  88898. longleftarrow: "\u27F5",
  88899. longleftrightarrow: "\u27F7",
  88900. longmapsto: "\u27FC",
  88901. longrightarrow: "\u27F6",
  88902. looparrowleft: "\u21AB",
  88903. looparrowright: "\u21AC",
  88904. lopar: "\u2985",
  88905. lopf: "\u{1D55D}",
  88906. loplus: "\u2A2D",
  88907. lotimes: "\u2A34",
  88908. lowast: "\u2217",
  88909. lowbar: "_",
  88910. loz: "\u25CA",
  88911. lozenge: "\u25CA",
  88912. lozf: "\u29EB",
  88913. lpar: "(",
  88914. lparlt: "\u2993",
  88915. lrarr: "\u21C6",
  88916. lrcorner: "\u231F",
  88917. lrhar: "\u21CB",
  88918. lrhard: "\u296D",
  88919. lrm: "\u200E",
  88920. lrtri: "\u22BF",
  88921. lsaquo: "\u2039",
  88922. lscr: "\u{1D4C1}",
  88923. lsh: "\u21B0",
  88924. lsim: "\u2272",
  88925. lsime: "\u2A8D",
  88926. lsimg: "\u2A8F",
  88927. lsqb: "[",
  88928. lsquo: "\u2018",
  88929. lsquor: "\u201A",
  88930. lstrok: "\u0142",
  88931. lt: "<",
  88932. ltcc: "\u2AA6",
  88933. ltcir: "\u2A79",
  88934. ltdot: "\u22D6",
  88935. lthree: "\u22CB",
  88936. ltimes: "\u22C9",
  88937. ltlarr: "\u2976",
  88938. ltquest: "\u2A7B",
  88939. ltrPar: "\u2996",
  88940. ltri: "\u25C3",
  88941. ltrie: "\u22B4",
  88942. ltrif: "\u25C2",
  88943. lurdshar: "\u294A",
  88944. luruhar: "\u2966",
  88945. lvertneqq: "\u2268\uFE00",
  88946. lvnE: "\u2268\uFE00",
  88947. mDDot: "\u223A",
  88948. macr: "\xAF",
  88949. male: "\u2642",
  88950. malt: "\u2720",
  88951. maltese: "\u2720",
  88952. map: "\u21A6",
  88953. mapsto: "\u21A6",
  88954. mapstodown: "\u21A7",
  88955. mapstoleft: "\u21A4",
  88956. mapstoup: "\u21A5",
  88957. marker: "\u25AE",
  88958. mcomma: "\u2A29",
  88959. mcy: "\u043C",
  88960. mdash: "\u2014",
  88961. measuredangle: "\u2221",
  88962. mfr: "\u{1D52A}",
  88963. mho: "\u2127",
  88964. micro: "\xB5",
  88965. mid: "\u2223",
  88966. midast: "*",
  88967. midcir: "\u2AF0",
  88968. middot: "\xB7",
  88969. minus: "\u2212",
  88970. minusb: "\u229F",
  88971. minusd: "\u2238",
  88972. minusdu: "\u2A2A",
  88973. mlcp: "\u2ADB",
  88974. mldr: "\u2026",
  88975. mnplus: "\u2213",
  88976. models: "\u22A7",
  88977. mopf: "\u{1D55E}",
  88978. mp: "\u2213",
  88979. mscr: "\u{1D4C2}",
  88980. mstpos: "\u223E",
  88981. mu: "\u03BC",
  88982. multimap: "\u22B8",
  88983. mumap: "\u22B8",
  88984. nGg: "\u22D9\u0338",
  88985. nGt: "\u226B\u20D2",
  88986. nGtv: "\u226B\u0338",
  88987. nLeftarrow: "\u21CD",
  88988. nLeftrightarrow: "\u21CE",
  88989. nLl: "\u22D8\u0338",
  88990. nLt: "\u226A\u20D2",
  88991. nLtv: "\u226A\u0338",
  88992. nRightarrow: "\u21CF",
  88993. nVDash: "\u22AF",
  88994. nVdash: "\u22AE",
  88995. nabla: "\u2207",
  88996. nacute: "\u0144",
  88997. nang: "\u2220\u20D2",
  88998. nap: "\u2249",
  88999. napE: "\u2A70\u0338",
  89000. napid: "\u224B\u0338",
  89001. napos: "\u0149",
  89002. napprox: "\u2249",
  89003. natur: "\u266E",
  89004. natural: "\u266E",
  89005. naturals: "\u2115",
  89006. nbsp: "\xA0",
  89007. nbump: "\u224E\u0338",
  89008. nbumpe: "\u224F\u0338",
  89009. ncap: "\u2A43",
  89010. ncaron: "\u0148",
  89011. ncedil: "\u0146",
  89012. ncong: "\u2247",
  89013. ncongdot: "\u2A6D\u0338",
  89014. ncup: "\u2A42",
  89015. ncy: "\u043D",
  89016. ndash: "\u2013",
  89017. ne: "\u2260",
  89018. neArr: "\u21D7",
  89019. nearhk: "\u2924",
  89020. nearr: "\u2197",
  89021. nearrow: "\u2197",
  89022. nedot: "\u2250\u0338",
  89023. nequiv: "\u2262",
  89024. nesear: "\u2928",
  89025. nesim: "\u2242\u0338",
  89026. nexist: "\u2204",
  89027. nexists: "\u2204",
  89028. nfr: "\u{1D52B}",
  89029. ngE: "\u2267\u0338",
  89030. nge: "\u2271",
  89031. ngeq: "\u2271",
  89032. ngeqq: "\u2267\u0338",
  89033. ngeqslant: "\u2A7E\u0338",
  89034. nges: "\u2A7E\u0338",
  89035. ngsim: "\u2275",
  89036. ngt: "\u226F",
  89037. ngtr: "\u226F",
  89038. nhArr: "\u21CE",
  89039. nharr: "\u21AE",
  89040. nhpar: "\u2AF2",
  89041. ni: "\u220B",
  89042. nis: "\u22FC",
  89043. nisd: "\u22FA",
  89044. niv: "\u220B",
  89045. njcy: "\u045A",
  89046. nlArr: "\u21CD",
  89047. nlE: "\u2266\u0338",
  89048. nlarr: "\u219A",
  89049. nldr: "\u2025",
  89050. nle: "\u2270",
  89051. nleftarrow: "\u219A",
  89052. nleftrightarrow: "\u21AE",
  89053. nleq: "\u2270",
  89054. nleqq: "\u2266\u0338",
  89055. nleqslant: "\u2A7D\u0338",
  89056. nles: "\u2A7D\u0338",
  89057. nless: "\u226E",
  89058. nlsim: "\u2274",
  89059. nlt: "\u226E",
  89060. nltri: "\u22EA",
  89061. nltrie: "\u22EC",
  89062. nmid: "\u2224",
  89063. nopf: "\u{1D55F}",
  89064. not: "\xAC",
  89065. notin: "\u2209",
  89066. notinE: "\u22F9\u0338",
  89067. notindot: "\u22F5\u0338",
  89068. notinva: "\u2209",
  89069. notinvb: "\u22F7",
  89070. notinvc: "\u22F6",
  89071. notni: "\u220C",
  89072. notniva: "\u220C",
  89073. notnivb: "\u22FE",
  89074. notnivc: "\u22FD",
  89075. npar: "\u2226",
  89076. nparallel: "\u2226",
  89077. nparsl: "\u2AFD\u20E5",
  89078. npart: "\u2202\u0338",
  89079. npolint: "\u2A14",
  89080. npr: "\u2280",
  89081. nprcue: "\u22E0",
  89082. npre: "\u2AAF\u0338",
  89083. nprec: "\u2280",
  89084. npreceq: "\u2AAF\u0338",
  89085. nrArr: "\u21CF",
  89086. nrarr: "\u219B",
  89087. nrarrc: "\u2933\u0338",
  89088. nrarrw: "\u219D\u0338",
  89089. nrightarrow: "\u219B",
  89090. nrtri: "\u22EB",
  89091. nrtrie: "\u22ED",
  89092. nsc: "\u2281",
  89093. nsccue: "\u22E1",
  89094. nsce: "\u2AB0\u0338",
  89095. nscr: "\u{1D4C3}",
  89096. nshortmid: "\u2224",
  89097. nshortparallel: "\u2226",
  89098. nsim: "\u2241",
  89099. nsime: "\u2244",
  89100. nsimeq: "\u2244",
  89101. nsmid: "\u2224",
  89102. nspar: "\u2226",
  89103. nsqsube: "\u22E2",
  89104. nsqsupe: "\u22E3",
  89105. nsub: "\u2284",
  89106. nsubE: "\u2AC5\u0338",
  89107. nsube: "\u2288",
  89108. nsubset: "\u2282\u20D2",
  89109. nsubseteq: "\u2288",
  89110. nsubseteqq: "\u2AC5\u0338",
  89111. nsucc: "\u2281",
  89112. nsucceq: "\u2AB0\u0338",
  89113. nsup: "\u2285",
  89114. nsupE: "\u2AC6\u0338",
  89115. nsupe: "\u2289",
  89116. nsupset: "\u2283\u20D2",
  89117. nsupseteq: "\u2289",
  89118. nsupseteqq: "\u2AC6\u0338",
  89119. ntgl: "\u2279",
  89120. ntilde: "\xF1",
  89121. ntlg: "\u2278",
  89122. ntriangleleft: "\u22EA",
  89123. ntrianglelefteq: "\u22EC",
  89124. ntriangleright: "\u22EB",
  89125. ntrianglerighteq: "\u22ED",
  89126. nu: "\u03BD",
  89127. num: "#",
  89128. numero: "\u2116",
  89129. numsp: "\u2007",
  89130. nvDash: "\u22AD",
  89131. nvHarr: "\u2904",
  89132. nvap: "\u224D\u20D2",
  89133. nvdash: "\u22AC",
  89134. nvge: "\u2265\u20D2",
  89135. nvgt: ">\u20D2",
  89136. nvinfin: "\u29DE",
  89137. nvlArr: "\u2902",
  89138. nvle: "\u2264\u20D2",
  89139. nvlt: "<\u20D2",
  89140. nvltrie: "\u22B4\u20D2",
  89141. nvrArr: "\u2903",
  89142. nvrtrie: "\u22B5\u20D2",
  89143. nvsim: "\u223C\u20D2",
  89144. nwArr: "\u21D6",
  89145. nwarhk: "\u2923",
  89146. nwarr: "\u2196",
  89147. nwarrow: "\u2196",
  89148. nwnear: "\u2927",
  89149. oS: "\u24C8",
  89150. oacute: "\xF3",
  89151. oast: "\u229B",
  89152. ocir: "\u229A",
  89153. ocirc: "\xF4",
  89154. ocy: "\u043E",
  89155. odash: "\u229D",
  89156. odblac: "\u0151",
  89157. odiv: "\u2A38",
  89158. odot: "\u2299",
  89159. odsold: "\u29BC",
  89160. oelig: "\u0153",
  89161. ofcir: "\u29BF",
  89162. ofr: "\u{1D52C}",
  89163. ogon: "\u02DB",
  89164. ograve: "\xF2",
  89165. ogt: "\u29C1",
  89166. ohbar: "\u29B5",
  89167. ohm: "\u03A9",
  89168. oint: "\u222E",
  89169. olarr: "\u21BA",
  89170. olcir: "\u29BE",
  89171. olcross: "\u29BB",
  89172. oline: "\u203E",
  89173. olt: "\u29C0",
  89174. omacr: "\u014D",
  89175. omega: "\u03C9",
  89176. omicron: "\u03BF",
  89177. omid: "\u29B6",
  89178. ominus: "\u2296",
  89179. oopf: "\u{1D560}",
  89180. opar: "\u29B7",
  89181. operp: "\u29B9",
  89182. oplus: "\u2295",
  89183. or: "\u2228",
  89184. orarr: "\u21BB",
  89185. ord: "\u2A5D",
  89186. order: "\u2134",
  89187. orderof: "\u2134",
  89188. ordf: "\xAA",
  89189. ordm: "\xBA",
  89190. origof: "\u22B6",
  89191. oror: "\u2A56",
  89192. orslope: "\u2A57",
  89193. orv: "\u2A5B",
  89194. oscr: "\u2134",
  89195. oslash: "\xF8",
  89196. osol: "\u2298",
  89197. otilde: "\xF5",
  89198. otimes: "\u2297",
  89199. otimesas: "\u2A36",
  89200. ouml: "\xF6",
  89201. ovbar: "\u233D",
  89202. par: "\u2225",
  89203. para: "\xB6",
  89204. parallel: "\u2225",
  89205. parsim: "\u2AF3",
  89206. parsl: "\u2AFD",
  89207. part: "\u2202",
  89208. pcy: "\u043F",
  89209. percnt: "%",
  89210. period: ".",
  89211. permil: "\u2030",
  89212. perp: "\u22A5",
  89213. pertenk: "\u2031",
  89214. pfr: "\u{1D52D}",
  89215. phi: "\u03C6",
  89216. phiv: "\u03D5",
  89217. phmmat: "\u2133",
  89218. phone: "\u260E",
  89219. pi: "\u03C0",
  89220. pitchfork: "\u22D4",
  89221. piv: "\u03D6",
  89222. planck: "\u210F",
  89223. planckh: "\u210E",
  89224. plankv: "\u210F",
  89225. plus: "+",
  89226. plusacir: "\u2A23",
  89227. plusb: "\u229E",
  89228. pluscir: "\u2A22",
  89229. plusdo: "\u2214",
  89230. plusdu: "\u2A25",
  89231. pluse: "\u2A72",
  89232. plusmn: "\xB1",
  89233. plussim: "\u2A26",
  89234. plustwo: "\u2A27",
  89235. pm: "\xB1",
  89236. pointint: "\u2A15",
  89237. popf: "\u{1D561}",
  89238. pound: "\xA3",
  89239. pr: "\u227A",
  89240. prE: "\u2AB3",
  89241. prap: "\u2AB7",
  89242. prcue: "\u227C",
  89243. pre: "\u2AAF",
  89244. prec: "\u227A",
  89245. precapprox: "\u2AB7",
  89246. preccurlyeq: "\u227C",
  89247. preceq: "\u2AAF",
  89248. precnapprox: "\u2AB9",
  89249. precneqq: "\u2AB5",
  89250. precnsim: "\u22E8",
  89251. precsim: "\u227E",
  89252. prime: "\u2032",
  89253. primes: "\u2119",
  89254. prnE: "\u2AB5",
  89255. prnap: "\u2AB9",
  89256. prnsim: "\u22E8",
  89257. prod: "\u220F",
  89258. profalar: "\u232E",
  89259. profline: "\u2312",
  89260. profsurf: "\u2313",
  89261. prop: "\u221D",
  89262. propto: "\u221D",
  89263. prsim: "\u227E",
  89264. prurel: "\u22B0",
  89265. pscr: "\u{1D4C5}",
  89266. psi: "\u03C8",
  89267. puncsp: "\u2008",
  89268. qfr: "\u{1D52E}",
  89269. qint: "\u2A0C",
  89270. qopf: "\u{1D562}",
  89271. qprime: "\u2057",
  89272. qscr: "\u{1D4C6}",
  89273. quaternions: "\u210D",
  89274. quatint: "\u2A16",
  89275. quest: "?",
  89276. questeq: "\u225F",
  89277. quot: '"',
  89278. rAarr: "\u21DB",
  89279. rArr: "\u21D2",
  89280. rAtail: "\u291C",
  89281. rBarr: "\u290F",
  89282. rHar: "\u2964",
  89283. race: "\u223D\u0331",
  89284. racute: "\u0155",
  89285. radic: "\u221A",
  89286. raemptyv: "\u29B3",
  89287. rang: "\u27E9",
  89288. rangd: "\u2992",
  89289. range: "\u29A5",
  89290. rangle: "\u27E9",
  89291. raquo: "\xBB",
  89292. rarr: "\u2192",
  89293. rarrap: "\u2975",
  89294. rarrb: "\u21E5",
  89295. rarrbfs: "\u2920",
  89296. rarrc: "\u2933",
  89297. rarrfs: "\u291E",
  89298. rarrhk: "\u21AA",
  89299. rarrlp: "\u21AC",
  89300. rarrpl: "\u2945",
  89301. rarrsim: "\u2974",
  89302. rarrtl: "\u21A3",
  89303. rarrw: "\u219D",
  89304. ratail: "\u291A",
  89305. ratio: "\u2236",
  89306. rationals: "\u211A",
  89307. rbarr: "\u290D",
  89308. rbbrk: "\u2773",
  89309. rbrace: "}",
  89310. rbrack: "]",
  89311. rbrke: "\u298C",
  89312. rbrksld: "\u298E",
  89313. rbrkslu: "\u2990",
  89314. rcaron: "\u0159",
  89315. rcedil: "\u0157",
  89316. rceil: "\u2309",
  89317. rcub: "}",
  89318. rcy: "\u0440",
  89319. rdca: "\u2937",
  89320. rdldhar: "\u2969",
  89321. rdquo: "\u201D",
  89322. rdquor: "\u201D",
  89323. rdsh: "\u21B3",
  89324. real: "\u211C",
  89325. realine: "\u211B",
  89326. realpart: "\u211C",
  89327. reals: "\u211D",
  89328. rect: "\u25AD",
  89329. reg: "\xAE",
  89330. rfisht: "\u297D",
  89331. rfloor: "\u230B",
  89332. rfr: "\u{1D52F}",
  89333. rhard: "\u21C1",
  89334. rharu: "\u21C0",
  89335. rharul: "\u296C",
  89336. rho: "\u03C1",
  89337. rhov: "\u03F1",
  89338. rightarrow: "\u2192",
  89339. rightarrowtail: "\u21A3",
  89340. rightharpoondown: "\u21C1",
  89341. rightharpoonup: "\u21C0",
  89342. rightleftarrows: "\u21C4",
  89343. rightleftharpoons: "\u21CC",
  89344. rightrightarrows: "\u21C9",
  89345. rightsquigarrow: "\u219D",
  89346. rightthreetimes: "\u22CC",
  89347. ring: "\u02DA",
  89348. risingdotseq: "\u2253",
  89349. rlarr: "\u21C4",
  89350. rlhar: "\u21CC",
  89351. rlm: "\u200F",
  89352. rmoust: "\u23B1",
  89353. rmoustache: "\u23B1",
  89354. rnmid: "\u2AEE",
  89355. roang: "\u27ED",
  89356. roarr: "\u21FE",
  89357. robrk: "\u27E7",
  89358. ropar: "\u2986",
  89359. ropf: "\u{1D563}",
  89360. roplus: "\u2A2E",
  89361. rotimes: "\u2A35",
  89362. rpar: ")",
  89363. rpargt: "\u2994",
  89364. rppolint: "\u2A12",
  89365. rrarr: "\u21C9",
  89366. rsaquo: "\u203A",
  89367. rscr: "\u{1D4C7}",
  89368. rsh: "\u21B1",
  89369. rsqb: "]",
  89370. rsquo: "\u2019",
  89371. rsquor: "\u2019",
  89372. rthree: "\u22CC",
  89373. rtimes: "\u22CA",
  89374. rtri: "\u25B9",
  89375. rtrie: "\u22B5",
  89376. rtrif: "\u25B8",
  89377. rtriltri: "\u29CE",
  89378. ruluhar: "\u2968",
  89379. rx: "\u211E",
  89380. sacute: "\u015B",
  89381. sbquo: "\u201A",
  89382. sc: "\u227B",
  89383. scE: "\u2AB4",
  89384. scap: "\u2AB8",
  89385. scaron: "\u0161",
  89386. sccue: "\u227D",
  89387. sce: "\u2AB0",
  89388. scedil: "\u015F",
  89389. scirc: "\u015D",
  89390. scnE: "\u2AB6",
  89391. scnap: "\u2ABA",
  89392. scnsim: "\u22E9",
  89393. scpolint: "\u2A13",
  89394. scsim: "\u227F",
  89395. scy: "\u0441",
  89396. sdot: "\u22C5",
  89397. sdotb: "\u22A1",
  89398. sdote: "\u2A66",
  89399. seArr: "\u21D8",
  89400. searhk: "\u2925",
  89401. searr: "\u2198",
  89402. searrow: "\u2198",
  89403. sect: "\xA7",
  89404. semi: ";",
  89405. seswar: "\u2929",
  89406. setminus: "\u2216",
  89407. setmn: "\u2216",
  89408. sext: "\u2736",
  89409. sfr: "\u{1D530}",
  89410. sfrown: "\u2322",
  89411. sharp: "\u266F",
  89412. shchcy: "\u0449",
  89413. shcy: "\u0448",
  89414. shortmid: "\u2223",
  89415. shortparallel: "\u2225",
  89416. shy: "\xAD",
  89417. sigma: "\u03C3",
  89418. sigmaf: "\u03C2",
  89419. sigmav: "\u03C2",
  89420. sim: "\u223C",
  89421. simdot: "\u2A6A",
  89422. sime: "\u2243",
  89423. simeq: "\u2243",
  89424. simg: "\u2A9E",
  89425. simgE: "\u2AA0",
  89426. siml: "\u2A9D",
  89427. simlE: "\u2A9F",
  89428. simne: "\u2246",
  89429. simplus: "\u2A24",
  89430. simrarr: "\u2972",
  89431. slarr: "\u2190",
  89432. smallsetminus: "\u2216",
  89433. smashp: "\u2A33",
  89434. smeparsl: "\u29E4",
  89435. smid: "\u2223",
  89436. smile: "\u2323",
  89437. smt: "\u2AAA",
  89438. smte: "\u2AAC",
  89439. smtes: "\u2AAC\uFE00",
  89440. softcy: "\u044C",
  89441. sol: "/",
  89442. solb: "\u29C4",
  89443. solbar: "\u233F",
  89444. sopf: "\u{1D564}",
  89445. spades: "\u2660",
  89446. spadesuit: "\u2660",
  89447. spar: "\u2225",
  89448. sqcap: "\u2293",
  89449. sqcaps: "\u2293\uFE00",
  89450. sqcup: "\u2294",
  89451. sqcups: "\u2294\uFE00",
  89452. sqsub: "\u228F",
  89453. sqsube: "\u2291",
  89454. sqsubset: "\u228F",
  89455. sqsubseteq: "\u2291",
  89456. sqsup: "\u2290",
  89457. sqsupe: "\u2292",
  89458. sqsupset: "\u2290",
  89459. sqsupseteq: "\u2292",
  89460. squ: "\u25A1",
  89461. square: "\u25A1",
  89462. squarf: "\u25AA",
  89463. squf: "\u25AA",
  89464. srarr: "\u2192",
  89465. sscr: "\u{1D4C8}",
  89466. ssetmn: "\u2216",
  89467. ssmile: "\u2323",
  89468. sstarf: "\u22C6",
  89469. star: "\u2606",
  89470. starf: "\u2605",
  89471. straightepsilon: "\u03F5",
  89472. straightphi: "\u03D5",
  89473. strns: "\xAF",
  89474. sub: "\u2282",
  89475. subE: "\u2AC5",
  89476. subdot: "\u2ABD",
  89477. sube: "\u2286",
  89478. subedot: "\u2AC3",
  89479. submult: "\u2AC1",
  89480. subnE: "\u2ACB",
  89481. subne: "\u228A",
  89482. subplus: "\u2ABF",
  89483. subrarr: "\u2979",
  89484. subset: "\u2282",
  89485. subseteq: "\u2286",
  89486. subseteqq: "\u2AC5",
  89487. subsetneq: "\u228A",
  89488. subsetneqq: "\u2ACB",
  89489. subsim: "\u2AC7",
  89490. subsub: "\u2AD5",
  89491. subsup: "\u2AD3",
  89492. succ: "\u227B",
  89493. succapprox: "\u2AB8",
  89494. succcurlyeq: "\u227D",
  89495. succeq: "\u2AB0",
  89496. succnapprox: "\u2ABA",
  89497. succneqq: "\u2AB6",
  89498. succnsim: "\u22E9",
  89499. succsim: "\u227F",
  89500. sum: "\u2211",
  89501. sung: "\u266A",
  89502. sup1: "\xB9",
  89503. sup2: "\xB2",
  89504. sup3: "\xB3",
  89505. sup: "\u2283",
  89506. supE: "\u2AC6",
  89507. supdot: "\u2ABE",
  89508. supdsub: "\u2AD8",
  89509. supe: "\u2287",
  89510. supedot: "\u2AC4",
  89511. suphsol: "\u27C9",
  89512. suphsub: "\u2AD7",
  89513. suplarr: "\u297B",
  89514. supmult: "\u2AC2",
  89515. supnE: "\u2ACC",
  89516. supne: "\u228B",
  89517. supplus: "\u2AC0",
  89518. supset: "\u2283",
  89519. supseteq: "\u2287",
  89520. supseteqq: "\u2AC6",
  89521. supsetneq: "\u228B",
  89522. supsetneqq: "\u2ACC",
  89523. supsim: "\u2AC8",
  89524. supsub: "\u2AD4",
  89525. supsup: "\u2AD6",
  89526. swArr: "\u21D9",
  89527. swarhk: "\u2926",
  89528. swarr: "\u2199",
  89529. swarrow: "\u2199",
  89530. swnwar: "\u292A",
  89531. szlig: "\xDF",
  89532. target: "\u2316",
  89533. tau: "\u03C4",
  89534. tbrk: "\u23B4",
  89535. tcaron: "\u0165",
  89536. tcedil: "\u0163",
  89537. tcy: "\u0442",
  89538. tdot: "\u20DB",
  89539. telrec: "\u2315",
  89540. tfr: "\u{1D531}",
  89541. there4: "\u2234",
  89542. therefore: "\u2234",
  89543. theta: "\u03B8",
  89544. thetasym: "\u03D1",
  89545. thetav: "\u03D1",
  89546. thickapprox: "\u2248",
  89547. thicksim: "\u223C",
  89548. thinsp: "\u2009",
  89549. thkap: "\u2248",
  89550. thksim: "\u223C",
  89551. thorn: "\xFE",
  89552. tilde: "\u02DC",
  89553. times: "\xD7",
  89554. timesb: "\u22A0",
  89555. timesbar: "\u2A31",
  89556. timesd: "\u2A30",
  89557. tint: "\u222D",
  89558. toea: "\u2928",
  89559. top: "\u22A4",
  89560. topbot: "\u2336",
  89561. topcir: "\u2AF1",
  89562. topf: "\u{1D565}",
  89563. topfork: "\u2ADA",
  89564. tosa: "\u2929",
  89565. tprime: "\u2034",
  89566. trade: "\u2122",
  89567. triangle: "\u25B5",
  89568. triangledown: "\u25BF",
  89569. triangleleft: "\u25C3",
  89570. trianglelefteq: "\u22B4",
  89571. triangleq: "\u225C",
  89572. triangleright: "\u25B9",
  89573. trianglerighteq: "\u22B5",
  89574. tridot: "\u25EC",
  89575. trie: "\u225C",
  89576. triminus: "\u2A3A",
  89577. triplus: "\u2A39",
  89578. trisb: "\u29CD",
  89579. tritime: "\u2A3B",
  89580. trpezium: "\u23E2",
  89581. tscr: "\u{1D4C9}",
  89582. tscy: "\u0446",
  89583. tshcy: "\u045B",
  89584. tstrok: "\u0167",
  89585. twixt: "\u226C",
  89586. twoheadleftarrow: "\u219E",
  89587. twoheadrightarrow: "\u21A0",
  89588. uArr: "\u21D1",
  89589. uHar: "\u2963",
  89590. uacute: "\xFA",
  89591. uarr: "\u2191",
  89592. ubrcy: "\u045E",
  89593. ubreve: "\u016D",
  89594. ucirc: "\xFB",
  89595. ucy: "\u0443",
  89596. udarr: "\u21C5",
  89597. udblac: "\u0171",
  89598. udhar: "\u296E",
  89599. ufisht: "\u297E",
  89600. ufr: "\u{1D532}",
  89601. ugrave: "\xF9",
  89602. uharl: "\u21BF",
  89603. uharr: "\u21BE",
  89604. uhblk: "\u2580",
  89605. ulcorn: "\u231C",
  89606. ulcorner: "\u231C",
  89607. ulcrop: "\u230F",
  89608. ultri: "\u25F8",
  89609. umacr: "\u016B",
  89610. uml: "\xA8",
  89611. uogon: "\u0173",
  89612. uopf: "\u{1D566}",
  89613. uparrow: "\u2191",
  89614. updownarrow: "\u2195",
  89615. upharpoonleft: "\u21BF",
  89616. upharpoonright: "\u21BE",
  89617. uplus: "\u228E",
  89618. upsi: "\u03C5",
  89619. upsih: "\u03D2",
  89620. upsilon: "\u03C5",
  89621. upuparrows: "\u21C8",
  89622. urcorn: "\u231D",
  89623. urcorner: "\u231D",
  89624. urcrop: "\u230E",
  89625. uring: "\u016F",
  89626. urtri: "\u25F9",
  89627. uscr: "\u{1D4CA}",
  89628. utdot: "\u22F0",
  89629. utilde: "\u0169",
  89630. utri: "\u25B5",
  89631. utrif: "\u25B4",
  89632. uuarr: "\u21C8",
  89633. uuml: "\xFC",
  89634. uwangle: "\u29A7",
  89635. vArr: "\u21D5",
  89636. vBar: "\u2AE8",
  89637. vBarv: "\u2AE9",
  89638. vDash: "\u22A8",
  89639. vangrt: "\u299C",
  89640. varepsilon: "\u03F5",
  89641. varkappa: "\u03F0",
  89642. varnothing: "\u2205",
  89643. varphi: "\u03D5",
  89644. varpi: "\u03D6",
  89645. varpropto: "\u221D",
  89646. varr: "\u2195",
  89647. varrho: "\u03F1",
  89648. varsigma: "\u03C2",
  89649. varsubsetneq: "\u228A\uFE00",
  89650. varsubsetneqq: "\u2ACB\uFE00",
  89651. varsupsetneq: "\u228B\uFE00",
  89652. varsupsetneqq: "\u2ACC\uFE00",
  89653. vartheta: "\u03D1",
  89654. vartriangleleft: "\u22B2",
  89655. vartriangleright: "\u22B3",
  89656. vcy: "\u0432",
  89657. vdash: "\u22A2",
  89658. vee: "\u2228",
  89659. veebar: "\u22BB",
  89660. veeeq: "\u225A",
  89661. vellip: "\u22EE",
  89662. verbar: "|",
  89663. vert: "|",
  89664. vfr: "\u{1D533}",
  89665. vltri: "\u22B2",
  89666. vnsub: "\u2282\u20D2",
  89667. vnsup: "\u2283\u20D2",
  89668. vopf: "\u{1D567}",
  89669. vprop: "\u221D",
  89670. vrtri: "\u22B3",
  89671. vscr: "\u{1D4CB}",
  89672. vsubnE: "\u2ACB\uFE00",
  89673. vsubne: "\u228A\uFE00",
  89674. vsupnE: "\u2ACC\uFE00",
  89675. vsupne: "\u228B\uFE00",
  89676. vzigzag: "\u299A",
  89677. wcirc: "\u0175",
  89678. wedbar: "\u2A5F",
  89679. wedge: "\u2227",
  89680. wedgeq: "\u2259",
  89681. weierp: "\u2118",
  89682. wfr: "\u{1D534}",
  89683. wopf: "\u{1D568}",
  89684. wp: "\u2118",
  89685. wr: "\u2240",
  89686. wreath: "\u2240",
  89687. wscr: "\u{1D4CC}",
  89688. xcap: "\u22C2",
  89689. xcirc: "\u25EF",
  89690. xcup: "\u22C3",
  89691. xdtri: "\u25BD",
  89692. xfr: "\u{1D535}",
  89693. xhArr: "\u27FA",
  89694. xharr: "\u27F7",
  89695. xi: "\u03BE",
  89696. xlArr: "\u27F8",
  89697. xlarr: "\u27F5",
  89698. xmap: "\u27FC",
  89699. xnis: "\u22FB",
  89700. xodot: "\u2A00",
  89701. xopf: "\u{1D569}",
  89702. xoplus: "\u2A01",
  89703. xotime: "\u2A02",
  89704. xrArr: "\u27F9",
  89705. xrarr: "\u27F6",
  89706. xscr: "\u{1D4CD}",
  89707. xsqcup: "\u2A06",
  89708. xuplus: "\u2A04",
  89709. xutri: "\u25B3",
  89710. xvee: "\u22C1",
  89711. xwedge: "\u22C0",
  89712. yacute: "\xFD",
  89713. yacy: "\u044F",
  89714. ycirc: "\u0177",
  89715. ycy: "\u044B",
  89716. yen: "\xA5",
  89717. yfr: "\u{1D536}",
  89718. yicy: "\u0457",
  89719. yopf: "\u{1D56A}",
  89720. yscr: "\u{1D4CE}",
  89721. yucy: "\u044E",
  89722. yuml: "\xFF",
  89723. zacute: "\u017A",
  89724. zcaron: "\u017E",
  89725. zcy: "\u0437",
  89726. zdot: "\u017C",
  89727. zeetrf: "\u2128",
  89728. zeta: "\u03B6",
  89729. zfr: "\u{1D537}",
  89730. zhcy: "\u0436",
  89731. zigrarr: "\u21DD",
  89732. zopf: "\u{1D56B}",
  89733. zscr: "\u{1D4CF}",
  89734. zwj: "\u200D",
  89735. zwnj: "\u200C"
  89736. };
  89737. // node_modules/decode-named-character-reference/index.js
  89738. var own3 = {}.hasOwnProperty;
  89739. function decodeNamedCharacterReference(value2) {
  89740. return own3.call(characterEntities, value2) ? characterEntities[value2] : false;
  89741. }
  89742. // node_modules/micromark-core-commonmark/lib/character-reference.js
  89743. var characterReference = {
  89744. name: "characterReference",
  89745. tokenize: tokenizeCharacterReference
  89746. };
  89747. function tokenizeCharacterReference(effects, ok2, nok) {
  89748. const self2 = this;
  89749. let size = 0;
  89750. let max;
  89751. let test;
  89752. return start3;
  89753. function start3(code2) {
  89754. effects.enter("characterReference");
  89755. effects.enter("characterReferenceMarker");
  89756. effects.consume(code2);
  89757. effects.exit("characterReferenceMarker");
  89758. return open;
  89759. }
  89760. function open(code2) {
  89761. if (code2 === 35) {
  89762. effects.enter("characterReferenceMarkerNumeric");
  89763. effects.consume(code2);
  89764. effects.exit("characterReferenceMarkerNumeric");
  89765. return numeric;
  89766. }
  89767. effects.enter("characterReferenceValue");
  89768. max = 31;
  89769. test = asciiAlphanumeric;
  89770. return value2(code2);
  89771. }
  89772. function numeric(code2) {
  89773. if (code2 === 88 || code2 === 120) {
  89774. effects.enter("characterReferenceMarkerHexadecimal");
  89775. effects.consume(code2);
  89776. effects.exit("characterReferenceMarkerHexadecimal");
  89777. effects.enter("characterReferenceValue");
  89778. max = 6;
  89779. test = asciiHexDigit;
  89780. return value2;
  89781. }
  89782. effects.enter("characterReferenceValue");
  89783. max = 7;
  89784. test = asciiDigit;
  89785. return value2(code2);
  89786. }
  89787. function value2(code2) {
  89788. let token2;
  89789. if (code2 === 59 && size) {
  89790. token2 = effects.exit("characterReferenceValue");
  89791. if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self2.sliceSerialize(token2))) {
  89792. return nok(code2);
  89793. }
  89794. effects.enter("characterReferenceMarker");
  89795. effects.consume(code2);
  89796. effects.exit("characterReferenceMarker");
  89797. effects.exit("characterReference");
  89798. return ok2;
  89799. }
  89800. if (test(code2) && size++ < max) {
  89801. effects.consume(code2);
  89802. return value2;
  89803. }
  89804. return nok(code2);
  89805. }
  89806. }
  89807. // node_modules/micromark-core-commonmark/lib/code-fenced.js
  89808. var codeFenced = {
  89809. name: "codeFenced",
  89810. tokenize: tokenizeCodeFenced,
  89811. concrete: true
  89812. };
  89813. function tokenizeCodeFenced(effects, ok2, nok) {
  89814. const self2 = this;
  89815. const closingFenceConstruct = {
  89816. tokenize: tokenizeClosingFence,
  89817. partial: true
  89818. };
  89819. const nonLazyLine = {
  89820. tokenize: tokenizeNonLazyLine,
  89821. partial: true
  89822. };
  89823. const tail = this.events[this.events.length - 1];
  89824. const initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
  89825. let sizeOpen = 0;
  89826. let marker;
  89827. return start3;
  89828. function start3(code2) {
  89829. effects.enter("codeFenced");
  89830. effects.enter("codeFencedFence");
  89831. effects.enter("codeFencedFenceSequence");
  89832. marker = code2;
  89833. return sequenceOpen(code2);
  89834. }
  89835. function sequenceOpen(code2) {
  89836. if (code2 === marker) {
  89837. effects.consume(code2);
  89838. sizeOpen++;
  89839. return sequenceOpen;
  89840. }
  89841. effects.exit("codeFencedFenceSequence");
  89842. return sizeOpen < 3 ? nok(code2) : factorySpace(effects, infoOpen, "whitespace")(code2);
  89843. }
  89844. function infoOpen(code2) {
  89845. if (code2 === null || markdownLineEnding(code2)) {
  89846. return openAfter(code2);
  89847. }
  89848. effects.enter("codeFencedFenceInfo");
  89849. effects.enter("chunkString", {
  89850. contentType: "string"
  89851. });
  89852. return info(code2);
  89853. }
  89854. function info(code2) {
  89855. if (code2 === null || markdownLineEndingOrSpace(code2)) {
  89856. effects.exit("chunkString");
  89857. effects.exit("codeFencedFenceInfo");
  89858. return factorySpace(effects, infoAfter, "whitespace")(code2);
  89859. }
  89860. if (code2 === 96 && code2 === marker)
  89861. return nok(code2);
  89862. effects.consume(code2);
  89863. return info;
  89864. }
  89865. function infoAfter(code2) {
  89866. if (code2 === null || markdownLineEnding(code2)) {
  89867. return openAfter(code2);
  89868. }
  89869. effects.enter("codeFencedFenceMeta");
  89870. effects.enter("chunkString", {
  89871. contentType: "string"
  89872. });
  89873. return meta(code2);
  89874. }
  89875. function meta(code2) {
  89876. if (code2 === null || markdownLineEnding(code2)) {
  89877. effects.exit("chunkString");
  89878. effects.exit("codeFencedFenceMeta");
  89879. return openAfter(code2);
  89880. }
  89881. if (code2 === 96 && code2 === marker)
  89882. return nok(code2);
  89883. effects.consume(code2);
  89884. return meta;
  89885. }
  89886. function openAfter(code2) {
  89887. effects.exit("codeFencedFence");
  89888. return self2.interrupt ? ok2(code2) : contentStart(code2);
  89889. }
  89890. function contentStart(code2) {
  89891. if (code2 === null) {
  89892. return after(code2);
  89893. }
  89894. if (markdownLineEnding(code2)) {
  89895. return effects.attempt(
  89896. nonLazyLine,
  89897. effects.attempt(
  89898. closingFenceConstruct,
  89899. after,
  89900. initialPrefix ? factorySpace(
  89901. effects,
  89902. contentStart,
  89903. "linePrefix",
  89904. initialPrefix + 1
  89905. ) : contentStart
  89906. ),
  89907. after
  89908. )(code2);
  89909. }
  89910. effects.enter("codeFlowValue");
  89911. return contentContinue(code2);
  89912. }
  89913. function contentContinue(code2) {
  89914. if (code2 === null || markdownLineEnding(code2)) {
  89915. effects.exit("codeFlowValue");
  89916. return contentStart(code2);
  89917. }
  89918. effects.consume(code2);
  89919. return contentContinue;
  89920. }
  89921. function after(code2) {
  89922. effects.exit("codeFenced");
  89923. return ok2(code2);
  89924. }
  89925. function tokenizeNonLazyLine(effects2, ok3, nok2) {
  89926. const self3 = this;
  89927. return start4;
  89928. function start4(code2) {
  89929. effects2.enter("lineEnding");
  89930. effects2.consume(code2);
  89931. effects2.exit("lineEnding");
  89932. return lineStart;
  89933. }
  89934. function lineStart(code2) {
  89935. return self3.parser.lazy[self3.now().line] ? nok2(code2) : ok3(code2);
  89936. }
  89937. }
  89938. function tokenizeClosingFence(effects2, ok3, nok2) {
  89939. let size = 0;
  89940. return factorySpace(
  89941. effects2,
  89942. closingSequenceStart,
  89943. "linePrefix",
  89944. this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  89945. );
  89946. function closingSequenceStart(code2) {
  89947. effects2.enter("codeFencedFence");
  89948. effects2.enter("codeFencedFenceSequence");
  89949. return closingSequence(code2);
  89950. }
  89951. function closingSequence(code2) {
  89952. if (code2 === marker) {
  89953. effects2.consume(code2);
  89954. size++;
  89955. return closingSequence;
  89956. }
  89957. if (size < sizeOpen)
  89958. return nok2(code2);
  89959. effects2.exit("codeFencedFenceSequence");
  89960. return factorySpace(effects2, closingSequenceEnd, "whitespace")(code2);
  89961. }
  89962. function closingSequenceEnd(code2) {
  89963. if (code2 === null || markdownLineEnding(code2)) {
  89964. effects2.exit("codeFencedFence");
  89965. return ok3(code2);
  89966. }
  89967. return nok2(code2);
  89968. }
  89969. }
  89970. }
  89971. // node_modules/micromark-core-commonmark/lib/code-indented.js
  89972. var codeIndented = {
  89973. name: "codeIndented",
  89974. tokenize: tokenizeCodeIndented
  89975. };
  89976. var indentedContent = {
  89977. tokenize: tokenizeIndentedContent,
  89978. partial: true
  89979. };
  89980. function tokenizeCodeIndented(effects, ok2, nok) {
  89981. const self2 = this;
  89982. return start3;
  89983. function start3(code2) {
  89984. effects.enter("codeIndented");
  89985. return factorySpace(effects, afterStartPrefix, "linePrefix", 4 + 1)(code2);
  89986. }
  89987. function afterStartPrefix(code2) {
  89988. const tail = self2.events[self2.events.length - 1];
  89989. return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? afterPrefix(code2) : nok(code2);
  89990. }
  89991. function afterPrefix(code2) {
  89992. if (code2 === null) {
  89993. return after(code2);
  89994. }
  89995. if (markdownLineEnding(code2)) {
  89996. return effects.attempt(indentedContent, afterPrefix, after)(code2);
  89997. }
  89998. effects.enter("codeFlowValue");
  89999. return content3(code2);
  90000. }
  90001. function content3(code2) {
  90002. if (code2 === null || markdownLineEnding(code2)) {
  90003. effects.exit("codeFlowValue");
  90004. return afterPrefix(code2);
  90005. }
  90006. effects.consume(code2);
  90007. return content3;
  90008. }
  90009. function after(code2) {
  90010. effects.exit("codeIndented");
  90011. return ok2(code2);
  90012. }
  90013. }
  90014. function tokenizeIndentedContent(effects, ok2, nok) {
  90015. const self2 = this;
  90016. return start3;
  90017. function start3(code2) {
  90018. if (self2.parser.lazy[self2.now().line]) {
  90019. return nok(code2);
  90020. }
  90021. if (markdownLineEnding(code2)) {
  90022. effects.enter("lineEnding");
  90023. effects.consume(code2);
  90024. effects.exit("lineEnding");
  90025. return start3;
  90026. }
  90027. return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code2);
  90028. }
  90029. function afterPrefix(code2) {
  90030. const tail = self2.events[self2.events.length - 1];
  90031. return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok2(code2) : markdownLineEnding(code2) ? start3(code2) : nok(code2);
  90032. }
  90033. }
  90034. // node_modules/micromark-core-commonmark/lib/code-text.js
  90035. var codeText = {
  90036. name: "codeText",
  90037. tokenize: tokenizeCodeText,
  90038. resolve: resolveCodeText,
  90039. previous
  90040. };
  90041. function resolveCodeText(events) {
  90042. let tailExitIndex = events.length - 4;
  90043. let headEnterIndex = 3;
  90044. let index2;
  90045. let enter;
  90046. if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) {
  90047. index2 = headEnterIndex;
  90048. while (++index2 < tailExitIndex) {
  90049. if (events[index2][1].type === "codeTextData") {
  90050. events[headEnterIndex][1].type = "codeTextPadding";
  90051. events[tailExitIndex][1].type = "codeTextPadding";
  90052. headEnterIndex += 2;
  90053. tailExitIndex -= 2;
  90054. break;
  90055. }
  90056. }
  90057. }
  90058. index2 = headEnterIndex - 1;
  90059. tailExitIndex++;
  90060. while (++index2 <= tailExitIndex) {
  90061. if (enter === void 0) {
  90062. if (index2 !== tailExitIndex && events[index2][1].type !== "lineEnding") {
  90063. enter = index2;
  90064. }
  90065. } else if (index2 === tailExitIndex || events[index2][1].type === "lineEnding") {
  90066. events[enter][1].type = "codeTextData";
  90067. if (index2 !== enter + 2) {
  90068. events[enter][1].end = events[index2 - 1][1].end;
  90069. events.splice(enter + 2, index2 - enter - 2);
  90070. tailExitIndex -= index2 - enter - 2;
  90071. index2 = enter + 2;
  90072. }
  90073. enter = void 0;
  90074. }
  90075. }
  90076. return events;
  90077. }
  90078. function previous(code2) {
  90079. return code2 !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
  90080. }
  90081. function tokenizeCodeText(effects, ok2, nok) {
  90082. const self2 = this;
  90083. let sizeOpen = 0;
  90084. let size;
  90085. let token2;
  90086. return start3;
  90087. function start3(code2) {
  90088. effects.enter("codeText");
  90089. effects.enter("codeTextSequence");
  90090. return openingSequence(code2);
  90091. }
  90092. function openingSequence(code2) {
  90093. if (code2 === 96) {
  90094. effects.consume(code2);
  90095. sizeOpen++;
  90096. return openingSequence;
  90097. }
  90098. effects.exit("codeTextSequence");
  90099. return gap(code2);
  90100. }
  90101. function gap(code2) {
  90102. if (code2 === null) {
  90103. return nok(code2);
  90104. }
  90105. if (code2 === 96) {
  90106. token2 = effects.enter("codeTextSequence");
  90107. size = 0;
  90108. return closingSequence(code2);
  90109. }
  90110. if (code2 === 32) {
  90111. effects.enter("space");
  90112. effects.consume(code2);
  90113. effects.exit("space");
  90114. return gap;
  90115. }
  90116. if (markdownLineEnding(code2)) {
  90117. effects.enter("lineEnding");
  90118. effects.consume(code2);
  90119. effects.exit("lineEnding");
  90120. return gap;
  90121. }
  90122. effects.enter("codeTextData");
  90123. return data3(code2);
  90124. }
  90125. function data3(code2) {
  90126. if (code2 === null || code2 === 32 || code2 === 96 || markdownLineEnding(code2)) {
  90127. effects.exit("codeTextData");
  90128. return gap(code2);
  90129. }
  90130. effects.consume(code2);
  90131. return data3;
  90132. }
  90133. function closingSequence(code2) {
  90134. if (code2 === 96) {
  90135. effects.consume(code2);
  90136. size++;
  90137. return closingSequence;
  90138. }
  90139. if (size === sizeOpen) {
  90140. effects.exit("codeTextSequence");
  90141. effects.exit("codeText");
  90142. return ok2(code2);
  90143. }
  90144. token2.type = "codeTextData";
  90145. return data3(code2);
  90146. }
  90147. }
  90148. // node_modules/micromark-util-subtokenize/index.js
  90149. function subtokenize(events) {
  90150. const jumps = {};
  90151. let index2 = -1;
  90152. let event;
  90153. let lineIndex;
  90154. let otherIndex;
  90155. let otherEvent;
  90156. let parameters;
  90157. let subevents;
  90158. let more;
  90159. while (++index2 < events.length) {
  90160. while (index2 in jumps) {
  90161. index2 = jumps[index2];
  90162. }
  90163. event = events[index2];
  90164. if (index2 && event[1].type === "chunkFlow" && events[index2 - 1][1].type === "listItemPrefix") {
  90165. subevents = event[1]._tokenizer.events;
  90166. otherIndex = 0;
  90167. if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") {
  90168. otherIndex += 2;
  90169. }
  90170. if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") {
  90171. while (++otherIndex < subevents.length) {
  90172. if (subevents[otherIndex][1].type === "content") {
  90173. break;
  90174. }
  90175. if (subevents[otherIndex][1].type === "chunkText") {
  90176. subevents[otherIndex][1]._isInFirstContentOfListItem = true;
  90177. otherIndex++;
  90178. }
  90179. }
  90180. }
  90181. }
  90182. if (event[0] === "enter") {
  90183. if (event[1].contentType) {
  90184. Object.assign(jumps, subcontent(events, index2));
  90185. index2 = jumps[index2];
  90186. more = true;
  90187. }
  90188. } else if (event[1]._container) {
  90189. otherIndex = index2;
  90190. lineIndex = void 0;
  90191. while (otherIndex--) {
  90192. otherEvent = events[otherIndex];
  90193. if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") {
  90194. if (otherEvent[0] === "enter") {
  90195. if (lineIndex) {
  90196. events[lineIndex][1].type = "lineEndingBlank";
  90197. }
  90198. otherEvent[1].type = "lineEnding";
  90199. lineIndex = otherIndex;
  90200. }
  90201. } else {
  90202. break;
  90203. }
  90204. }
  90205. if (lineIndex) {
  90206. event[1].end = Object.assign({}, events[lineIndex][1].start);
  90207. parameters = events.slice(lineIndex, index2);
  90208. parameters.unshift(event);
  90209. splice(events, lineIndex, index2 - lineIndex + 1, parameters);
  90210. }
  90211. }
  90212. }
  90213. return !more;
  90214. }
  90215. function subcontent(events, eventIndex) {
  90216. const token2 = events[eventIndex][1];
  90217. const context = events[eventIndex][2];
  90218. let startPosition = eventIndex - 1;
  90219. const startPositions = [];
  90220. const tokenizer4 = token2._tokenizer || context.parser[token2.contentType](token2.start);
  90221. const childEvents = tokenizer4.events;
  90222. const jumps = [];
  90223. const gaps = {};
  90224. let stream;
  90225. let previous2;
  90226. let index2 = -1;
  90227. let current3 = token2;
  90228. let adjust = 0;
  90229. let start3 = 0;
  90230. const breaks = [start3];
  90231. while (current3) {
  90232. while (events[++startPosition][1] !== current3) {
  90233. }
  90234. startPositions.push(startPosition);
  90235. if (!current3._tokenizer) {
  90236. stream = context.sliceStream(current3);
  90237. if (!current3.next) {
  90238. stream.push(null);
  90239. }
  90240. if (previous2) {
  90241. tokenizer4.defineSkip(current3.start);
  90242. }
  90243. if (current3._isInFirstContentOfListItem) {
  90244. tokenizer4._gfmTasklistFirstContentOfListItem = true;
  90245. }
  90246. tokenizer4.write(stream);
  90247. if (current3._isInFirstContentOfListItem) {
  90248. tokenizer4._gfmTasklistFirstContentOfListItem = void 0;
  90249. }
  90250. }
  90251. previous2 = current3;
  90252. current3 = current3.next;
  90253. }
  90254. current3 = token2;
  90255. while (++index2 < childEvents.length) {
  90256. if (
  90257. // Find a void token that includes a break.
  90258. childEvents[index2][0] === "exit" && childEvents[index2 - 1][0] === "enter" && childEvents[index2][1].type === childEvents[index2 - 1][1].type && childEvents[index2][1].start.line !== childEvents[index2][1].end.line
  90259. ) {
  90260. start3 = index2 + 1;
  90261. breaks.push(start3);
  90262. current3._tokenizer = void 0;
  90263. current3.previous = void 0;
  90264. current3 = current3.next;
  90265. }
  90266. }
  90267. tokenizer4.events = [];
  90268. if (current3) {
  90269. current3._tokenizer = void 0;
  90270. current3.previous = void 0;
  90271. } else {
  90272. breaks.pop();
  90273. }
  90274. index2 = breaks.length;
  90275. while (index2--) {
  90276. const slice2 = childEvents.slice(breaks[index2], breaks[index2 + 1]);
  90277. const start4 = startPositions.pop();
  90278. jumps.unshift([start4, start4 + slice2.length - 1]);
  90279. splice(events, start4, 2, slice2);
  90280. }
  90281. index2 = -1;
  90282. while (++index2 < jumps.length) {
  90283. gaps[adjust + jumps[index2][0]] = adjust + jumps[index2][1];
  90284. adjust += jumps[index2][1] - jumps[index2][0] - 1;
  90285. }
  90286. return gaps;
  90287. }
  90288. // node_modules/micromark-core-commonmark/lib/content.js
  90289. var content = {
  90290. tokenize: tokenizeContent,
  90291. resolve: resolveContent
  90292. };
  90293. var continuationConstruct = {
  90294. tokenize: tokenizeContinuation,
  90295. partial: true
  90296. };
  90297. function resolveContent(events) {
  90298. subtokenize(events);
  90299. return events;
  90300. }
  90301. function tokenizeContent(effects, ok2) {
  90302. let previous2;
  90303. return start3;
  90304. function start3(code2) {
  90305. effects.enter("content");
  90306. previous2 = effects.enter("chunkContent", {
  90307. contentType: "content"
  90308. });
  90309. return data3(code2);
  90310. }
  90311. function data3(code2) {
  90312. if (code2 === null) {
  90313. return contentEnd(code2);
  90314. }
  90315. if (markdownLineEnding(code2)) {
  90316. return effects.check(
  90317. continuationConstruct,
  90318. contentContinue,
  90319. contentEnd
  90320. )(code2);
  90321. }
  90322. effects.consume(code2);
  90323. return data3;
  90324. }
  90325. function contentEnd(code2) {
  90326. effects.exit("chunkContent");
  90327. effects.exit("content");
  90328. return ok2(code2);
  90329. }
  90330. function contentContinue(code2) {
  90331. effects.consume(code2);
  90332. effects.exit("chunkContent");
  90333. previous2.next = effects.enter("chunkContent", {
  90334. contentType: "content",
  90335. previous: previous2
  90336. });
  90337. previous2 = previous2.next;
  90338. return data3;
  90339. }
  90340. }
  90341. function tokenizeContinuation(effects, ok2, nok) {
  90342. const self2 = this;
  90343. return startLookahead;
  90344. function startLookahead(code2) {
  90345. effects.exit("chunkContent");
  90346. effects.enter("lineEnding");
  90347. effects.consume(code2);
  90348. effects.exit("lineEnding");
  90349. return factorySpace(effects, prefixed, "linePrefix");
  90350. }
  90351. function prefixed(code2) {
  90352. if (code2 === null || markdownLineEnding(code2)) {
  90353. return nok(code2);
  90354. }
  90355. const tail = self2.events[self2.events.length - 1];
  90356. if (!self2.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) {
  90357. return ok2(code2);
  90358. }
  90359. return effects.interrupt(self2.parser.constructs.flow, nok, ok2)(code2);
  90360. }
  90361. }
  90362. // node_modules/micromark-factory-destination/index.js
  90363. function factoryDestination(effects, ok2, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
  90364. const limit = max || Number.POSITIVE_INFINITY;
  90365. let balance = 0;
  90366. return start3;
  90367. function start3(code2) {
  90368. if (code2 === 60) {
  90369. effects.enter(type);
  90370. effects.enter(literalType);
  90371. effects.enter(literalMarkerType);
  90372. effects.consume(code2);
  90373. effects.exit(literalMarkerType);
  90374. return destinationEnclosedBefore;
  90375. }
  90376. if (code2 === null || code2 === 41 || asciiControl(code2)) {
  90377. return nok(code2);
  90378. }
  90379. effects.enter(type);
  90380. effects.enter(rawType);
  90381. effects.enter(stringType);
  90382. effects.enter("chunkString", {
  90383. contentType: "string"
  90384. });
  90385. return destinationRaw(code2);
  90386. }
  90387. function destinationEnclosedBefore(code2) {
  90388. if (code2 === 62) {
  90389. effects.enter(literalMarkerType);
  90390. effects.consume(code2);
  90391. effects.exit(literalMarkerType);
  90392. effects.exit(literalType);
  90393. effects.exit(type);
  90394. return ok2;
  90395. }
  90396. effects.enter(stringType);
  90397. effects.enter("chunkString", {
  90398. contentType: "string"
  90399. });
  90400. return destinationEnclosed(code2);
  90401. }
  90402. function destinationEnclosed(code2) {
  90403. if (code2 === 62) {
  90404. effects.exit("chunkString");
  90405. effects.exit(stringType);
  90406. return destinationEnclosedBefore(code2);
  90407. }
  90408. if (code2 === null || code2 === 60 || markdownLineEnding(code2)) {
  90409. return nok(code2);
  90410. }
  90411. effects.consume(code2);
  90412. return code2 === 92 ? destinationEnclosedEscape : destinationEnclosed;
  90413. }
  90414. function destinationEnclosedEscape(code2) {
  90415. if (code2 === 60 || code2 === 62 || code2 === 92) {
  90416. effects.consume(code2);
  90417. return destinationEnclosed;
  90418. }
  90419. return destinationEnclosed(code2);
  90420. }
  90421. function destinationRaw(code2) {
  90422. if (code2 === 40) {
  90423. if (++balance > limit)
  90424. return nok(code2);
  90425. effects.consume(code2);
  90426. return destinationRaw;
  90427. }
  90428. if (code2 === 41) {
  90429. if (!balance--) {
  90430. effects.exit("chunkString");
  90431. effects.exit(stringType);
  90432. effects.exit(rawType);
  90433. effects.exit(type);
  90434. return ok2(code2);
  90435. }
  90436. effects.consume(code2);
  90437. return destinationRaw;
  90438. }
  90439. if (code2 === null || markdownLineEndingOrSpace(code2)) {
  90440. if (balance)
  90441. return nok(code2);
  90442. effects.exit("chunkString");
  90443. effects.exit(stringType);
  90444. effects.exit(rawType);
  90445. effects.exit(type);
  90446. return ok2(code2);
  90447. }
  90448. if (asciiControl(code2))
  90449. return nok(code2);
  90450. effects.consume(code2);
  90451. return code2 === 92 ? destinationRawEscape : destinationRaw;
  90452. }
  90453. function destinationRawEscape(code2) {
  90454. if (code2 === 40 || code2 === 41 || code2 === 92) {
  90455. effects.consume(code2);
  90456. return destinationRaw;
  90457. }
  90458. return destinationRaw(code2);
  90459. }
  90460. }
  90461. // node_modules/micromark-factory-label/index.js
  90462. function factoryLabel(effects, ok2, nok, type, markerType, stringType) {
  90463. const self2 = this;
  90464. let size = 0;
  90465. let data3;
  90466. return start3;
  90467. function start3(code2) {
  90468. effects.enter(type);
  90469. effects.enter(markerType);
  90470. effects.consume(code2);
  90471. effects.exit(markerType);
  90472. effects.enter(stringType);
  90473. return atBreak;
  90474. }
  90475. function atBreak(code2) {
  90476. if (code2 === null || code2 === 91 || code2 === 93 && !data3 || /* To do: remove in the future once we’ve switched from
  90477. * `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
  90478. * which doesn’t need this */
  90479. /* Hidden footnotes hook */
  90480. /* c8 ignore next 3 */
  90481. code2 === 94 && !size && "_hiddenFootnoteSupport" in self2.parser.constructs || size > 999) {
  90482. return nok(code2);
  90483. }
  90484. if (code2 === 93) {
  90485. effects.exit(stringType);
  90486. effects.enter(markerType);
  90487. effects.consume(code2);
  90488. effects.exit(markerType);
  90489. effects.exit(type);
  90490. return ok2;
  90491. }
  90492. if (markdownLineEnding(code2)) {
  90493. effects.enter("lineEnding");
  90494. effects.consume(code2);
  90495. effects.exit("lineEnding");
  90496. return atBreak;
  90497. }
  90498. effects.enter("chunkString", {
  90499. contentType: "string"
  90500. });
  90501. return label(code2);
  90502. }
  90503. function label(code2) {
  90504. if (code2 === null || code2 === 91 || code2 === 93 || markdownLineEnding(code2) || size++ > 999) {
  90505. effects.exit("chunkString");
  90506. return atBreak(code2);
  90507. }
  90508. effects.consume(code2);
  90509. data3 = data3 || !markdownSpace(code2);
  90510. return code2 === 92 ? labelEscape : label;
  90511. }
  90512. function labelEscape(code2) {
  90513. if (code2 === 91 || code2 === 92 || code2 === 93) {
  90514. effects.consume(code2);
  90515. size++;
  90516. return label;
  90517. }
  90518. return label(code2);
  90519. }
  90520. }
  90521. // node_modules/micromark-factory-title/index.js
  90522. function factoryTitle(effects, ok2, nok, type, markerType, stringType) {
  90523. let marker;
  90524. return start3;
  90525. function start3(code2) {
  90526. effects.enter(type);
  90527. effects.enter(markerType);
  90528. effects.consume(code2);
  90529. effects.exit(markerType);
  90530. marker = code2 === 40 ? 41 : code2;
  90531. return atFirstTitleBreak;
  90532. }
  90533. function atFirstTitleBreak(code2) {
  90534. if (code2 === marker) {
  90535. effects.enter(markerType);
  90536. effects.consume(code2);
  90537. effects.exit(markerType);
  90538. effects.exit(type);
  90539. return ok2;
  90540. }
  90541. effects.enter(stringType);
  90542. return atTitleBreak(code2);
  90543. }
  90544. function atTitleBreak(code2) {
  90545. if (code2 === marker) {
  90546. effects.exit(stringType);
  90547. return atFirstTitleBreak(marker);
  90548. }
  90549. if (code2 === null) {
  90550. return nok(code2);
  90551. }
  90552. if (markdownLineEnding(code2)) {
  90553. effects.enter("lineEnding");
  90554. effects.consume(code2);
  90555. effects.exit("lineEnding");
  90556. return factorySpace(effects, atTitleBreak, "linePrefix");
  90557. }
  90558. effects.enter("chunkString", {
  90559. contentType: "string"
  90560. });
  90561. return title(code2);
  90562. }
  90563. function title(code2) {
  90564. if (code2 === marker || code2 === null || markdownLineEnding(code2)) {
  90565. effects.exit("chunkString");
  90566. return atTitleBreak(code2);
  90567. }
  90568. effects.consume(code2);
  90569. return code2 === 92 ? titleEscape : title;
  90570. }
  90571. function titleEscape(code2) {
  90572. if (code2 === marker || code2 === 92) {
  90573. effects.consume(code2);
  90574. return title;
  90575. }
  90576. return title(code2);
  90577. }
  90578. }
  90579. // node_modules/micromark-factory-whitespace/index.js
  90580. function factoryWhitespace(effects, ok2) {
  90581. let seen;
  90582. return start3;
  90583. function start3(code2) {
  90584. if (markdownLineEnding(code2)) {
  90585. effects.enter("lineEnding");
  90586. effects.consume(code2);
  90587. effects.exit("lineEnding");
  90588. seen = true;
  90589. return start3;
  90590. }
  90591. if (markdownSpace(code2)) {
  90592. return factorySpace(
  90593. effects,
  90594. start3,
  90595. seen ? "linePrefix" : "lineSuffix"
  90596. )(code2);
  90597. }
  90598. return ok2(code2);
  90599. }
  90600. }
  90601. // node_modules/micromark-util-normalize-identifier/index.js
  90602. function normalizeIdentifier(value2) {
  90603. return value2.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
  90604. }
  90605. // node_modules/micromark-core-commonmark/lib/definition.js
  90606. var definition = {
  90607. name: "definition",
  90608. tokenize: tokenizeDefinition
  90609. };
  90610. var titleConstruct = {
  90611. tokenize: tokenizeTitle,
  90612. partial: true
  90613. };
  90614. function tokenizeDefinition(effects, ok2, nok) {
  90615. const self2 = this;
  90616. let identifier;
  90617. return start3;
  90618. function start3(code2) {
  90619. effects.enter("definition");
  90620. return factoryLabel.call(
  90621. self2,
  90622. effects,
  90623. labelAfter,
  90624. nok,
  90625. "definitionLabel",
  90626. "definitionLabelMarker",
  90627. "definitionLabelString"
  90628. )(code2);
  90629. }
  90630. function labelAfter(code2) {
  90631. identifier = normalizeIdentifier(
  90632. self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1)
  90633. );
  90634. if (code2 === 58) {
  90635. effects.enter("definitionMarker");
  90636. effects.consume(code2);
  90637. effects.exit("definitionMarker");
  90638. return factoryWhitespace(
  90639. effects,
  90640. factoryDestination(
  90641. effects,
  90642. effects.attempt(
  90643. titleConstruct,
  90644. factorySpace(effects, after, "whitespace"),
  90645. factorySpace(effects, after, "whitespace")
  90646. ),
  90647. nok,
  90648. "definitionDestination",
  90649. "definitionDestinationLiteral",
  90650. "definitionDestinationLiteralMarker",
  90651. "definitionDestinationRaw",
  90652. "definitionDestinationString"
  90653. )
  90654. );
  90655. }
  90656. return nok(code2);
  90657. }
  90658. function after(code2) {
  90659. if (code2 === null || markdownLineEnding(code2)) {
  90660. effects.exit("definition");
  90661. if (!self2.parser.defined.includes(identifier)) {
  90662. self2.parser.defined.push(identifier);
  90663. }
  90664. return ok2(code2);
  90665. }
  90666. return nok(code2);
  90667. }
  90668. }
  90669. function tokenizeTitle(effects, ok2, nok) {
  90670. return start3;
  90671. function start3(code2) {
  90672. return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, before)(code2) : nok(code2);
  90673. }
  90674. function before(code2) {
  90675. if (code2 === 34 || code2 === 39 || code2 === 40) {
  90676. return factoryTitle(
  90677. effects,
  90678. factorySpace(effects, after, "whitespace"),
  90679. nok,
  90680. "definitionTitle",
  90681. "definitionTitleMarker",
  90682. "definitionTitleString"
  90683. )(code2);
  90684. }
  90685. return nok(code2);
  90686. }
  90687. function after(code2) {
  90688. return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);
  90689. }
  90690. }
  90691. // node_modules/micromark-core-commonmark/lib/hard-break-escape.js
  90692. var hardBreakEscape = {
  90693. name: "hardBreakEscape",
  90694. tokenize: tokenizeHardBreakEscape
  90695. };
  90696. function tokenizeHardBreakEscape(effects, ok2, nok) {
  90697. return start3;
  90698. function start3(code2) {
  90699. effects.enter("hardBreakEscape");
  90700. effects.enter("escapeMarker");
  90701. effects.consume(code2);
  90702. return open;
  90703. }
  90704. function open(code2) {
  90705. if (markdownLineEnding(code2)) {
  90706. effects.exit("escapeMarker");
  90707. effects.exit("hardBreakEscape");
  90708. return ok2(code2);
  90709. }
  90710. return nok(code2);
  90711. }
  90712. }
  90713. // node_modules/micromark-core-commonmark/lib/heading-atx.js
  90714. var headingAtx = {
  90715. name: "headingAtx",
  90716. tokenize: tokenizeHeadingAtx,
  90717. resolve: resolveHeadingAtx
  90718. };
  90719. function resolveHeadingAtx(events, context) {
  90720. let contentEnd = events.length - 2;
  90721. let contentStart = 3;
  90722. let content3;
  90723. let text5;
  90724. if (events[contentStart][1].type === "whitespace") {
  90725. contentStart += 2;
  90726. }
  90727. if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") {
  90728. contentEnd -= 2;
  90729. }
  90730. if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) {
  90731. contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
  90732. }
  90733. if (contentEnd > contentStart) {
  90734. content3 = {
  90735. type: "atxHeadingText",
  90736. start: events[contentStart][1].start,
  90737. end: events[contentEnd][1].end
  90738. };
  90739. text5 = {
  90740. type: "chunkText",
  90741. start: events[contentStart][1].start,
  90742. end: events[contentEnd][1].end,
  90743. // @ts-expect-error Constants are fine to assign.
  90744. contentType: "text"
  90745. };
  90746. splice(events, contentStart, contentEnd - contentStart + 1, [
  90747. ["enter", content3, context],
  90748. ["enter", text5, context],
  90749. ["exit", text5, context],
  90750. ["exit", content3, context]
  90751. ]);
  90752. }
  90753. return events;
  90754. }
  90755. function tokenizeHeadingAtx(effects, ok2, nok) {
  90756. const self2 = this;
  90757. let size = 0;
  90758. return start3;
  90759. function start3(code2) {
  90760. effects.enter("atxHeading");
  90761. effects.enter("atxHeadingSequence");
  90762. return fenceOpenInside(code2);
  90763. }
  90764. function fenceOpenInside(code2) {
  90765. if (code2 === 35 && size++ < 6) {
  90766. effects.consume(code2);
  90767. return fenceOpenInside;
  90768. }
  90769. if (code2 === null || markdownLineEndingOrSpace(code2)) {
  90770. effects.exit("atxHeadingSequence");
  90771. return self2.interrupt ? ok2(code2) : headingBreak(code2);
  90772. }
  90773. return nok(code2);
  90774. }
  90775. function headingBreak(code2) {
  90776. if (code2 === 35) {
  90777. effects.enter("atxHeadingSequence");
  90778. return sequence(code2);
  90779. }
  90780. if (code2 === null || markdownLineEnding(code2)) {
  90781. effects.exit("atxHeading");
  90782. return ok2(code2);
  90783. }
  90784. if (markdownSpace(code2)) {
  90785. return factorySpace(effects, headingBreak, "whitespace")(code2);
  90786. }
  90787. effects.enter("atxHeadingText");
  90788. return data3(code2);
  90789. }
  90790. function sequence(code2) {
  90791. if (code2 === 35) {
  90792. effects.consume(code2);
  90793. return sequence;
  90794. }
  90795. effects.exit("atxHeadingSequence");
  90796. return headingBreak(code2);
  90797. }
  90798. function data3(code2) {
  90799. if (code2 === null || code2 === 35 || markdownLineEndingOrSpace(code2)) {
  90800. effects.exit("atxHeadingText");
  90801. return headingBreak(code2);
  90802. }
  90803. effects.consume(code2);
  90804. return data3;
  90805. }
  90806. }
  90807. // node_modules/micromark-util-html-tag-name/index.js
  90808. var htmlBlockNames = [
  90809. "address",
  90810. "article",
  90811. "aside",
  90812. "base",
  90813. "basefont",
  90814. "blockquote",
  90815. "body",
  90816. "caption",
  90817. "center",
  90818. "col",
  90819. "colgroup",
  90820. "dd",
  90821. "details",
  90822. "dialog",
  90823. "dir",
  90824. "div",
  90825. "dl",
  90826. "dt",
  90827. "fieldset",
  90828. "figcaption",
  90829. "figure",
  90830. "footer",
  90831. "form",
  90832. "frame",
  90833. "frameset",
  90834. "h1",
  90835. "h2",
  90836. "h3",
  90837. "h4",
  90838. "h5",
  90839. "h6",
  90840. "head",
  90841. "header",
  90842. "hr",
  90843. "html",
  90844. "iframe",
  90845. "legend",
  90846. "li",
  90847. "link",
  90848. "main",
  90849. "menu",
  90850. "menuitem",
  90851. "nav",
  90852. "noframes",
  90853. "ol",
  90854. "optgroup",
  90855. "option",
  90856. "p",
  90857. "param",
  90858. "section",
  90859. "summary",
  90860. "table",
  90861. "tbody",
  90862. "td",
  90863. "tfoot",
  90864. "th",
  90865. "thead",
  90866. "title",
  90867. "tr",
  90868. "track",
  90869. "ul"
  90870. ];
  90871. var htmlRawNames = ["pre", "script", "style", "textarea"];
  90872. // node_modules/micromark-core-commonmark/lib/html-flow.js
  90873. var htmlFlow = {
  90874. name: "htmlFlow",
  90875. tokenize: tokenizeHtmlFlow,
  90876. resolveTo: resolveToHtmlFlow,
  90877. concrete: true
  90878. };
  90879. var nextBlankConstruct = {
  90880. tokenize: tokenizeNextBlank,
  90881. partial: true
  90882. };
  90883. function resolveToHtmlFlow(events) {
  90884. let index2 = events.length;
  90885. while (index2--) {
  90886. if (events[index2][0] === "enter" && events[index2][1].type === "htmlFlow") {
  90887. break;
  90888. }
  90889. }
  90890. if (index2 > 1 && events[index2 - 2][1].type === "linePrefix") {
  90891. events[index2][1].start = events[index2 - 2][1].start;
  90892. events[index2 + 1][1].start = events[index2 - 2][1].start;
  90893. events.splice(index2 - 2, 2);
  90894. }
  90895. return events;
  90896. }
  90897. function tokenizeHtmlFlow(effects, ok2, nok) {
  90898. const self2 = this;
  90899. let kind;
  90900. let startTag;
  90901. let buffer3;
  90902. let index2;
  90903. let marker;
  90904. return start3;
  90905. function start3(code2) {
  90906. effects.enter("htmlFlow");
  90907. effects.enter("htmlFlowData");
  90908. effects.consume(code2);
  90909. return open;
  90910. }
  90911. function open(code2) {
  90912. if (code2 === 33) {
  90913. effects.consume(code2);
  90914. return declarationStart;
  90915. }
  90916. if (code2 === 47) {
  90917. effects.consume(code2);
  90918. return tagCloseStart;
  90919. }
  90920. if (code2 === 63) {
  90921. effects.consume(code2);
  90922. kind = 3;
  90923. return self2.interrupt ? ok2 : continuationDeclarationInside;
  90924. }
  90925. if (asciiAlpha(code2)) {
  90926. effects.consume(code2);
  90927. buffer3 = String.fromCharCode(code2);
  90928. startTag = true;
  90929. return tagName;
  90930. }
  90931. return nok(code2);
  90932. }
  90933. function declarationStart(code2) {
  90934. if (code2 === 45) {
  90935. effects.consume(code2);
  90936. kind = 2;
  90937. return commentOpenInside;
  90938. }
  90939. if (code2 === 91) {
  90940. effects.consume(code2);
  90941. kind = 5;
  90942. buffer3 = "CDATA[";
  90943. index2 = 0;
  90944. return cdataOpenInside;
  90945. }
  90946. if (asciiAlpha(code2)) {
  90947. effects.consume(code2);
  90948. kind = 4;
  90949. return self2.interrupt ? ok2 : continuationDeclarationInside;
  90950. }
  90951. return nok(code2);
  90952. }
  90953. function commentOpenInside(code2) {
  90954. if (code2 === 45) {
  90955. effects.consume(code2);
  90956. return self2.interrupt ? ok2 : continuationDeclarationInside;
  90957. }
  90958. return nok(code2);
  90959. }
  90960. function cdataOpenInside(code2) {
  90961. if (code2 === buffer3.charCodeAt(index2++)) {
  90962. effects.consume(code2);
  90963. return index2 === buffer3.length ? self2.interrupt ? ok2 : continuation : cdataOpenInside;
  90964. }
  90965. return nok(code2);
  90966. }
  90967. function tagCloseStart(code2) {
  90968. if (asciiAlpha(code2)) {
  90969. effects.consume(code2);
  90970. buffer3 = String.fromCharCode(code2);
  90971. return tagName;
  90972. }
  90973. return nok(code2);
  90974. }
  90975. function tagName(code2) {
  90976. if (code2 === null || code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
  90977. if (code2 !== 47 && startTag && htmlRawNames.includes(buffer3.toLowerCase())) {
  90978. kind = 1;
  90979. return self2.interrupt ? ok2(code2) : continuation(code2);
  90980. }
  90981. if (htmlBlockNames.includes(buffer3.toLowerCase())) {
  90982. kind = 6;
  90983. if (code2 === 47) {
  90984. effects.consume(code2);
  90985. return basicSelfClosing;
  90986. }
  90987. return self2.interrupt ? ok2(code2) : continuation(code2);
  90988. }
  90989. kind = 7;
  90990. return self2.interrupt && !self2.parser.lazy[self2.now().line] ? nok(code2) : startTag ? completeAttributeNameBefore(code2) : completeClosingTagAfter(code2);
  90991. }
  90992. if (code2 === 45 || asciiAlphanumeric(code2)) {
  90993. effects.consume(code2);
  90994. buffer3 += String.fromCharCode(code2);
  90995. return tagName;
  90996. }
  90997. return nok(code2);
  90998. }
  90999. function basicSelfClosing(code2) {
  91000. if (code2 === 62) {
  91001. effects.consume(code2);
  91002. return self2.interrupt ? ok2 : continuation;
  91003. }
  91004. return nok(code2);
  91005. }
  91006. function completeClosingTagAfter(code2) {
  91007. if (markdownSpace(code2)) {
  91008. effects.consume(code2);
  91009. return completeClosingTagAfter;
  91010. }
  91011. return completeEnd(code2);
  91012. }
  91013. function completeAttributeNameBefore(code2) {
  91014. if (code2 === 47) {
  91015. effects.consume(code2);
  91016. return completeEnd;
  91017. }
  91018. if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) {
  91019. effects.consume(code2);
  91020. return completeAttributeName;
  91021. }
  91022. if (markdownSpace(code2)) {
  91023. effects.consume(code2);
  91024. return completeAttributeNameBefore;
  91025. }
  91026. return completeEnd(code2);
  91027. }
  91028. function completeAttributeName(code2) {
  91029. if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) {
  91030. effects.consume(code2);
  91031. return completeAttributeName;
  91032. }
  91033. return completeAttributeNameAfter(code2);
  91034. }
  91035. function completeAttributeNameAfter(code2) {
  91036. if (code2 === 61) {
  91037. effects.consume(code2);
  91038. return completeAttributeValueBefore;
  91039. }
  91040. if (markdownSpace(code2)) {
  91041. effects.consume(code2);
  91042. return completeAttributeNameAfter;
  91043. }
  91044. return completeAttributeNameBefore(code2);
  91045. }
  91046. function completeAttributeValueBefore(code2) {
  91047. if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) {
  91048. return nok(code2);
  91049. }
  91050. if (code2 === 34 || code2 === 39) {
  91051. effects.consume(code2);
  91052. marker = code2;
  91053. return completeAttributeValueQuoted;
  91054. }
  91055. if (markdownSpace(code2)) {
  91056. effects.consume(code2);
  91057. return completeAttributeValueBefore;
  91058. }
  91059. marker = null;
  91060. return completeAttributeValueUnquoted(code2);
  91061. }
  91062. function completeAttributeValueQuoted(code2) {
  91063. if (code2 === null || markdownLineEnding(code2)) {
  91064. return nok(code2);
  91065. }
  91066. if (code2 === marker) {
  91067. effects.consume(code2);
  91068. return completeAttributeValueQuotedAfter;
  91069. }
  91070. effects.consume(code2);
  91071. return completeAttributeValueQuoted;
  91072. }
  91073. function completeAttributeValueUnquoted(code2) {
  91074. if (code2 === null || code2 === 34 || code2 === 39 || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96 || markdownLineEndingOrSpace(code2)) {
  91075. return completeAttributeNameAfter(code2);
  91076. }
  91077. effects.consume(code2);
  91078. return completeAttributeValueUnquoted;
  91079. }
  91080. function completeAttributeValueQuotedAfter(code2) {
  91081. if (code2 === 47 || code2 === 62 || markdownSpace(code2)) {
  91082. return completeAttributeNameBefore(code2);
  91083. }
  91084. return nok(code2);
  91085. }
  91086. function completeEnd(code2) {
  91087. if (code2 === 62) {
  91088. effects.consume(code2);
  91089. return completeAfter;
  91090. }
  91091. return nok(code2);
  91092. }
  91093. function completeAfter(code2) {
  91094. if (markdownSpace(code2)) {
  91095. effects.consume(code2);
  91096. return completeAfter;
  91097. }
  91098. return code2 === null || markdownLineEnding(code2) ? continuation(code2) : nok(code2);
  91099. }
  91100. function continuation(code2) {
  91101. if (code2 === 45 && kind === 2) {
  91102. effects.consume(code2);
  91103. return continuationCommentInside;
  91104. }
  91105. if (code2 === 60 && kind === 1) {
  91106. effects.consume(code2);
  91107. return continuationRawTagOpen;
  91108. }
  91109. if (code2 === 62 && kind === 4) {
  91110. effects.consume(code2);
  91111. return continuationClose;
  91112. }
  91113. if (code2 === 63 && kind === 3) {
  91114. effects.consume(code2);
  91115. return continuationDeclarationInside;
  91116. }
  91117. if (code2 === 93 && kind === 5) {
  91118. effects.consume(code2);
  91119. return continuationCharacterDataInside;
  91120. }
  91121. if (markdownLineEnding(code2) && (kind === 6 || kind === 7)) {
  91122. return effects.check(
  91123. nextBlankConstruct,
  91124. continuationClose,
  91125. continuationAtLineEnding
  91126. )(code2);
  91127. }
  91128. if (code2 === null || markdownLineEnding(code2)) {
  91129. return continuationAtLineEnding(code2);
  91130. }
  91131. effects.consume(code2);
  91132. return continuation;
  91133. }
  91134. function continuationAtLineEnding(code2) {
  91135. effects.exit("htmlFlowData");
  91136. return htmlContinueStart(code2);
  91137. }
  91138. function htmlContinueStart(code2) {
  91139. if (code2 === null) {
  91140. return done(code2);
  91141. }
  91142. if (markdownLineEnding(code2)) {
  91143. return effects.attempt(
  91144. {
  91145. tokenize: htmlLineEnd,
  91146. partial: true
  91147. },
  91148. htmlContinueStart,
  91149. done
  91150. )(code2);
  91151. }
  91152. effects.enter("htmlFlowData");
  91153. return continuation(code2);
  91154. }
  91155. function htmlLineEnd(effects2, ok3, nok2) {
  91156. return start4;
  91157. function start4(code2) {
  91158. effects2.enter("lineEnding");
  91159. effects2.consume(code2);
  91160. effects2.exit("lineEnding");
  91161. return lineStart;
  91162. }
  91163. function lineStart(code2) {
  91164. return self2.parser.lazy[self2.now().line] ? nok2(code2) : ok3(code2);
  91165. }
  91166. }
  91167. function continuationCommentInside(code2) {
  91168. if (code2 === 45) {
  91169. effects.consume(code2);
  91170. return continuationDeclarationInside;
  91171. }
  91172. return continuation(code2);
  91173. }
  91174. function continuationRawTagOpen(code2) {
  91175. if (code2 === 47) {
  91176. effects.consume(code2);
  91177. buffer3 = "";
  91178. return continuationRawEndTag;
  91179. }
  91180. return continuation(code2);
  91181. }
  91182. function continuationRawEndTag(code2) {
  91183. if (code2 === 62 && htmlRawNames.includes(buffer3.toLowerCase())) {
  91184. effects.consume(code2);
  91185. return continuationClose;
  91186. }
  91187. if (asciiAlpha(code2) && buffer3.length < 8) {
  91188. effects.consume(code2);
  91189. buffer3 += String.fromCharCode(code2);
  91190. return continuationRawEndTag;
  91191. }
  91192. return continuation(code2);
  91193. }
  91194. function continuationCharacterDataInside(code2) {
  91195. if (code2 === 93) {
  91196. effects.consume(code2);
  91197. return continuationDeclarationInside;
  91198. }
  91199. return continuation(code2);
  91200. }
  91201. function continuationDeclarationInside(code2) {
  91202. if (code2 === 62) {
  91203. effects.consume(code2);
  91204. return continuationClose;
  91205. }
  91206. if (code2 === 45 && kind === 2) {
  91207. effects.consume(code2);
  91208. return continuationDeclarationInside;
  91209. }
  91210. return continuation(code2);
  91211. }
  91212. function continuationClose(code2) {
  91213. if (code2 === null || markdownLineEnding(code2)) {
  91214. effects.exit("htmlFlowData");
  91215. return done(code2);
  91216. }
  91217. effects.consume(code2);
  91218. return continuationClose;
  91219. }
  91220. function done(code2) {
  91221. effects.exit("htmlFlow");
  91222. return ok2(code2);
  91223. }
  91224. }
  91225. function tokenizeNextBlank(effects, ok2, nok) {
  91226. return start3;
  91227. function start3(code2) {
  91228. effects.exit("htmlFlowData");
  91229. effects.enter("lineEndingBlank");
  91230. effects.consume(code2);
  91231. effects.exit("lineEndingBlank");
  91232. return effects.attempt(blankLine, ok2, nok);
  91233. }
  91234. }
  91235. // node_modules/micromark-core-commonmark/lib/html-text.js
  91236. var htmlText = {
  91237. name: "htmlText",
  91238. tokenize: tokenizeHtmlText
  91239. };
  91240. function tokenizeHtmlText(effects, ok2, nok) {
  91241. const self2 = this;
  91242. let marker;
  91243. let buffer3;
  91244. let index2;
  91245. let returnState;
  91246. return start3;
  91247. function start3(code2) {
  91248. effects.enter("htmlText");
  91249. effects.enter("htmlTextData");
  91250. effects.consume(code2);
  91251. return open;
  91252. }
  91253. function open(code2) {
  91254. if (code2 === 33) {
  91255. effects.consume(code2);
  91256. return declarationOpen;
  91257. }
  91258. if (code2 === 47) {
  91259. effects.consume(code2);
  91260. return tagCloseStart;
  91261. }
  91262. if (code2 === 63) {
  91263. effects.consume(code2);
  91264. return instruction;
  91265. }
  91266. if (asciiAlpha(code2)) {
  91267. effects.consume(code2);
  91268. return tagOpen;
  91269. }
  91270. return nok(code2);
  91271. }
  91272. function declarationOpen(code2) {
  91273. if (code2 === 45) {
  91274. effects.consume(code2);
  91275. return commentOpen;
  91276. }
  91277. if (code2 === 91) {
  91278. effects.consume(code2);
  91279. buffer3 = "CDATA[";
  91280. index2 = 0;
  91281. return cdataOpen;
  91282. }
  91283. if (asciiAlpha(code2)) {
  91284. effects.consume(code2);
  91285. return declaration;
  91286. }
  91287. return nok(code2);
  91288. }
  91289. function commentOpen(code2) {
  91290. if (code2 === 45) {
  91291. effects.consume(code2);
  91292. return commentStart;
  91293. }
  91294. return nok(code2);
  91295. }
  91296. function commentStart(code2) {
  91297. if (code2 === null || code2 === 62) {
  91298. return nok(code2);
  91299. }
  91300. if (code2 === 45) {
  91301. effects.consume(code2);
  91302. return commentStartDash;
  91303. }
  91304. return comment2(code2);
  91305. }
  91306. function commentStartDash(code2) {
  91307. if (code2 === null || code2 === 62) {
  91308. return nok(code2);
  91309. }
  91310. return comment2(code2);
  91311. }
  91312. function comment2(code2) {
  91313. if (code2 === null) {
  91314. return nok(code2);
  91315. }
  91316. if (code2 === 45) {
  91317. effects.consume(code2);
  91318. return commentClose;
  91319. }
  91320. if (markdownLineEnding(code2)) {
  91321. returnState = comment2;
  91322. return atLineEnding(code2);
  91323. }
  91324. effects.consume(code2);
  91325. return comment2;
  91326. }
  91327. function commentClose(code2) {
  91328. if (code2 === 45) {
  91329. effects.consume(code2);
  91330. return end;
  91331. }
  91332. return comment2(code2);
  91333. }
  91334. function cdataOpen(code2) {
  91335. if (code2 === buffer3.charCodeAt(index2++)) {
  91336. effects.consume(code2);
  91337. return index2 === buffer3.length ? cdata : cdataOpen;
  91338. }
  91339. return nok(code2);
  91340. }
  91341. function cdata(code2) {
  91342. if (code2 === null) {
  91343. return nok(code2);
  91344. }
  91345. if (code2 === 93) {
  91346. effects.consume(code2);
  91347. return cdataClose;
  91348. }
  91349. if (markdownLineEnding(code2)) {
  91350. returnState = cdata;
  91351. return atLineEnding(code2);
  91352. }
  91353. effects.consume(code2);
  91354. return cdata;
  91355. }
  91356. function cdataClose(code2) {
  91357. if (code2 === 93) {
  91358. effects.consume(code2);
  91359. return cdataEnd;
  91360. }
  91361. return cdata(code2);
  91362. }
  91363. function cdataEnd(code2) {
  91364. if (code2 === 62) {
  91365. return end(code2);
  91366. }
  91367. if (code2 === 93) {
  91368. effects.consume(code2);
  91369. return cdataEnd;
  91370. }
  91371. return cdata(code2);
  91372. }
  91373. function declaration(code2) {
  91374. if (code2 === null || code2 === 62) {
  91375. return end(code2);
  91376. }
  91377. if (markdownLineEnding(code2)) {
  91378. returnState = declaration;
  91379. return atLineEnding(code2);
  91380. }
  91381. effects.consume(code2);
  91382. return declaration;
  91383. }
  91384. function instruction(code2) {
  91385. if (code2 === null) {
  91386. return nok(code2);
  91387. }
  91388. if (code2 === 63) {
  91389. effects.consume(code2);
  91390. return instructionClose;
  91391. }
  91392. if (markdownLineEnding(code2)) {
  91393. returnState = instruction;
  91394. return atLineEnding(code2);
  91395. }
  91396. effects.consume(code2);
  91397. return instruction;
  91398. }
  91399. function instructionClose(code2) {
  91400. return code2 === 62 ? end(code2) : instruction(code2);
  91401. }
  91402. function tagCloseStart(code2) {
  91403. if (asciiAlpha(code2)) {
  91404. effects.consume(code2);
  91405. return tagClose;
  91406. }
  91407. return nok(code2);
  91408. }
  91409. function tagClose(code2) {
  91410. if (code2 === 45 || asciiAlphanumeric(code2)) {
  91411. effects.consume(code2);
  91412. return tagClose;
  91413. }
  91414. return tagCloseBetween(code2);
  91415. }
  91416. function tagCloseBetween(code2) {
  91417. if (markdownLineEnding(code2)) {
  91418. returnState = tagCloseBetween;
  91419. return atLineEnding(code2);
  91420. }
  91421. if (markdownSpace(code2)) {
  91422. effects.consume(code2);
  91423. return tagCloseBetween;
  91424. }
  91425. return end(code2);
  91426. }
  91427. function tagOpen(code2) {
  91428. if (code2 === 45 || asciiAlphanumeric(code2)) {
  91429. effects.consume(code2);
  91430. return tagOpen;
  91431. }
  91432. if (code2 === 47 || code2 === 62 || markdownLineEndingOrSpace(code2)) {
  91433. return tagOpenBetween(code2);
  91434. }
  91435. return nok(code2);
  91436. }
  91437. function tagOpenBetween(code2) {
  91438. if (code2 === 47) {
  91439. effects.consume(code2);
  91440. return end;
  91441. }
  91442. if (code2 === 58 || code2 === 95 || asciiAlpha(code2)) {
  91443. effects.consume(code2);
  91444. return tagOpenAttributeName;
  91445. }
  91446. if (markdownLineEnding(code2)) {
  91447. returnState = tagOpenBetween;
  91448. return atLineEnding(code2);
  91449. }
  91450. if (markdownSpace(code2)) {
  91451. effects.consume(code2);
  91452. return tagOpenBetween;
  91453. }
  91454. return end(code2);
  91455. }
  91456. function tagOpenAttributeName(code2) {
  91457. if (code2 === 45 || code2 === 46 || code2 === 58 || code2 === 95 || asciiAlphanumeric(code2)) {
  91458. effects.consume(code2);
  91459. return tagOpenAttributeName;
  91460. }
  91461. return tagOpenAttributeNameAfter(code2);
  91462. }
  91463. function tagOpenAttributeNameAfter(code2) {
  91464. if (code2 === 61) {
  91465. effects.consume(code2);
  91466. return tagOpenAttributeValueBefore;
  91467. }
  91468. if (markdownLineEnding(code2)) {
  91469. returnState = tagOpenAttributeNameAfter;
  91470. return atLineEnding(code2);
  91471. }
  91472. if (markdownSpace(code2)) {
  91473. effects.consume(code2);
  91474. return tagOpenAttributeNameAfter;
  91475. }
  91476. return tagOpenBetween(code2);
  91477. }
  91478. function tagOpenAttributeValueBefore(code2) {
  91479. if (code2 === null || code2 === 60 || code2 === 61 || code2 === 62 || code2 === 96) {
  91480. return nok(code2);
  91481. }
  91482. if (code2 === 34 || code2 === 39) {
  91483. effects.consume(code2);
  91484. marker = code2;
  91485. return tagOpenAttributeValueQuoted;
  91486. }
  91487. if (markdownLineEnding(code2)) {
  91488. returnState = tagOpenAttributeValueBefore;
  91489. return atLineEnding(code2);
  91490. }
  91491. if (markdownSpace(code2)) {
  91492. effects.consume(code2);
  91493. return tagOpenAttributeValueBefore;
  91494. }
  91495. effects.consume(code2);
  91496. marker = void 0;
  91497. return tagOpenAttributeValueUnquoted;
  91498. }
  91499. function tagOpenAttributeValueQuoted(code2) {
  91500. if (code2 === marker) {
  91501. effects.consume(code2);
  91502. return tagOpenAttributeValueQuotedAfter;
  91503. }
  91504. if (code2 === null) {
  91505. return nok(code2);
  91506. }
  91507. if (markdownLineEnding(code2)) {
  91508. returnState = tagOpenAttributeValueQuoted;
  91509. return atLineEnding(code2);
  91510. }
  91511. effects.consume(code2);
  91512. return tagOpenAttributeValueQuoted;
  91513. }
  91514. function tagOpenAttributeValueQuotedAfter(code2) {
  91515. if (code2 === 62 || code2 === 47 || markdownLineEndingOrSpace(code2)) {
  91516. return tagOpenBetween(code2);
  91517. }
  91518. return nok(code2);
  91519. }
  91520. function tagOpenAttributeValueUnquoted(code2) {
  91521. if (code2 === null || code2 === 34 || code2 === 39 || code2 === 60 || code2 === 61 || code2 === 96) {
  91522. return nok(code2);
  91523. }
  91524. if (code2 === 62 || markdownLineEndingOrSpace(code2)) {
  91525. return tagOpenBetween(code2);
  91526. }
  91527. effects.consume(code2);
  91528. return tagOpenAttributeValueUnquoted;
  91529. }
  91530. function atLineEnding(code2) {
  91531. effects.exit("htmlTextData");
  91532. effects.enter("lineEnding");
  91533. effects.consume(code2);
  91534. effects.exit("lineEnding");
  91535. return factorySpace(
  91536. effects,
  91537. afterPrefix,
  91538. "linePrefix",
  91539. self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  91540. );
  91541. }
  91542. function afterPrefix(code2) {
  91543. effects.enter("htmlTextData");
  91544. return returnState(code2);
  91545. }
  91546. function end(code2) {
  91547. if (code2 === 62) {
  91548. effects.consume(code2);
  91549. effects.exit("htmlTextData");
  91550. effects.exit("htmlText");
  91551. return ok2;
  91552. }
  91553. return nok(code2);
  91554. }
  91555. }
  91556. // node_modules/micromark-core-commonmark/lib/label-end.js
  91557. var labelEnd = {
  91558. name: "labelEnd",
  91559. tokenize: tokenizeLabelEnd,
  91560. resolveTo: resolveToLabelEnd,
  91561. resolveAll: resolveAllLabelEnd
  91562. };
  91563. var resourceConstruct = {
  91564. tokenize: tokenizeResource
  91565. };
  91566. var fullReferenceConstruct = {
  91567. tokenize: tokenizeFullReference
  91568. };
  91569. var collapsedReferenceConstruct = {
  91570. tokenize: tokenizeCollapsedReference
  91571. };
  91572. function resolveAllLabelEnd(events) {
  91573. let index2 = -1;
  91574. let token2;
  91575. while (++index2 < events.length) {
  91576. token2 = events[index2][1];
  91577. if (token2.type === "labelImage" || token2.type === "labelLink" || token2.type === "labelEnd") {
  91578. events.splice(index2 + 1, token2.type === "labelImage" ? 4 : 2);
  91579. token2.type = "data";
  91580. index2++;
  91581. }
  91582. }
  91583. return events;
  91584. }
  91585. function resolveToLabelEnd(events, context) {
  91586. let index2 = events.length;
  91587. let offset3 = 0;
  91588. let token2;
  91589. let open;
  91590. let close;
  91591. let media;
  91592. while (index2--) {
  91593. token2 = events[index2][1];
  91594. if (open) {
  91595. if (token2.type === "link" || token2.type === "labelLink" && token2._inactive) {
  91596. break;
  91597. }
  91598. if (events[index2][0] === "enter" && token2.type === "labelLink") {
  91599. token2._inactive = true;
  91600. }
  91601. } else if (close) {
  91602. if (events[index2][0] === "enter" && (token2.type === "labelImage" || token2.type === "labelLink") && !token2._balanced) {
  91603. open = index2;
  91604. if (token2.type !== "labelLink") {
  91605. offset3 = 2;
  91606. break;
  91607. }
  91608. }
  91609. } else if (token2.type === "labelEnd") {
  91610. close = index2;
  91611. }
  91612. }
  91613. const group = {
  91614. type: events[open][1].type === "labelLink" ? "link" : "image",
  91615. start: Object.assign({}, events[open][1].start),
  91616. end: Object.assign({}, events[events.length - 1][1].end)
  91617. };
  91618. const label = {
  91619. type: "label",
  91620. start: Object.assign({}, events[open][1].start),
  91621. end: Object.assign({}, events[close][1].end)
  91622. };
  91623. const text5 = {
  91624. type: "labelText",
  91625. start: Object.assign({}, events[open + offset3 + 2][1].end),
  91626. end: Object.assign({}, events[close - 2][1].start)
  91627. };
  91628. media = [
  91629. ["enter", group, context],
  91630. ["enter", label, context]
  91631. ];
  91632. media = push(media, events.slice(open + 1, open + offset3 + 3));
  91633. media = push(media, [["enter", text5, context]]);
  91634. media = push(
  91635. media,
  91636. resolveAll(
  91637. context.parser.constructs.insideSpan.null,
  91638. events.slice(open + offset3 + 4, close - 3),
  91639. context
  91640. )
  91641. );
  91642. media = push(media, [
  91643. ["exit", text5, context],
  91644. events[close - 2],
  91645. events[close - 1],
  91646. ["exit", label, context]
  91647. ]);
  91648. media = push(media, events.slice(close + 1));
  91649. media = push(media, [["exit", group, context]]);
  91650. splice(events, open, events.length, media);
  91651. return events;
  91652. }
  91653. function tokenizeLabelEnd(effects, ok2, nok) {
  91654. const self2 = this;
  91655. let index2 = self2.events.length;
  91656. let labelStart;
  91657. let defined;
  91658. while (index2--) {
  91659. if ((self2.events[index2][1].type === "labelImage" || self2.events[index2][1].type === "labelLink") && !self2.events[index2][1]._balanced) {
  91660. labelStart = self2.events[index2][1];
  91661. break;
  91662. }
  91663. }
  91664. return start3;
  91665. function start3(code2) {
  91666. if (!labelStart) {
  91667. return nok(code2);
  91668. }
  91669. if (labelStart._inactive)
  91670. return balanced(code2);
  91671. defined = self2.parser.defined.includes(
  91672. normalizeIdentifier(
  91673. self2.sliceSerialize({
  91674. start: labelStart.end,
  91675. end: self2.now()
  91676. })
  91677. )
  91678. );
  91679. effects.enter("labelEnd");
  91680. effects.enter("labelMarker");
  91681. effects.consume(code2);
  91682. effects.exit("labelMarker");
  91683. effects.exit("labelEnd");
  91684. return afterLabelEnd;
  91685. }
  91686. function afterLabelEnd(code2) {
  91687. if (code2 === 40) {
  91688. return effects.attempt(
  91689. resourceConstruct,
  91690. ok2,
  91691. defined ? ok2 : balanced
  91692. )(code2);
  91693. }
  91694. if (code2 === 91) {
  91695. return effects.attempt(
  91696. fullReferenceConstruct,
  91697. ok2,
  91698. defined ? effects.attempt(collapsedReferenceConstruct, ok2, balanced) : balanced
  91699. )(code2);
  91700. }
  91701. return defined ? ok2(code2) : balanced(code2);
  91702. }
  91703. function balanced(code2) {
  91704. labelStart._balanced = true;
  91705. return nok(code2);
  91706. }
  91707. }
  91708. function tokenizeResource(effects, ok2, nok) {
  91709. return start3;
  91710. function start3(code2) {
  91711. effects.enter("resource");
  91712. effects.enter("resourceMarker");
  91713. effects.consume(code2);
  91714. effects.exit("resourceMarker");
  91715. return factoryWhitespace(effects, open);
  91716. }
  91717. function open(code2) {
  91718. if (code2 === 41) {
  91719. return end(code2);
  91720. }
  91721. return factoryDestination(
  91722. effects,
  91723. destinationAfter,
  91724. nok,
  91725. "resourceDestination",
  91726. "resourceDestinationLiteral",
  91727. "resourceDestinationLiteralMarker",
  91728. "resourceDestinationRaw",
  91729. "resourceDestinationString",
  91730. 32
  91731. )(code2);
  91732. }
  91733. function destinationAfter(code2) {
  91734. return markdownLineEndingOrSpace(code2) ? factoryWhitespace(effects, between2)(code2) : end(code2);
  91735. }
  91736. function between2(code2) {
  91737. if (code2 === 34 || code2 === 39 || code2 === 40) {
  91738. return factoryTitle(
  91739. effects,
  91740. factoryWhitespace(effects, end),
  91741. nok,
  91742. "resourceTitle",
  91743. "resourceTitleMarker",
  91744. "resourceTitleString"
  91745. )(code2);
  91746. }
  91747. return end(code2);
  91748. }
  91749. function end(code2) {
  91750. if (code2 === 41) {
  91751. effects.enter("resourceMarker");
  91752. effects.consume(code2);
  91753. effects.exit("resourceMarker");
  91754. effects.exit("resource");
  91755. return ok2;
  91756. }
  91757. return nok(code2);
  91758. }
  91759. }
  91760. function tokenizeFullReference(effects, ok2, nok) {
  91761. const self2 = this;
  91762. return start3;
  91763. function start3(code2) {
  91764. return factoryLabel.call(
  91765. self2,
  91766. effects,
  91767. afterLabel,
  91768. nok,
  91769. "reference",
  91770. "referenceMarker",
  91771. "referenceString"
  91772. )(code2);
  91773. }
  91774. function afterLabel(code2) {
  91775. return self2.parser.defined.includes(
  91776. normalizeIdentifier(
  91777. self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1)
  91778. )
  91779. ) ? ok2(code2) : nok(code2);
  91780. }
  91781. }
  91782. function tokenizeCollapsedReference(effects, ok2, nok) {
  91783. return start3;
  91784. function start3(code2) {
  91785. effects.enter("reference");
  91786. effects.enter("referenceMarker");
  91787. effects.consume(code2);
  91788. effects.exit("referenceMarker");
  91789. return open;
  91790. }
  91791. function open(code2) {
  91792. if (code2 === 93) {
  91793. effects.enter("referenceMarker");
  91794. effects.consume(code2);
  91795. effects.exit("referenceMarker");
  91796. effects.exit("reference");
  91797. return ok2;
  91798. }
  91799. return nok(code2);
  91800. }
  91801. }
  91802. // node_modules/micromark-core-commonmark/lib/label-start-image.js
  91803. var labelStartImage = {
  91804. name: "labelStartImage",
  91805. tokenize: tokenizeLabelStartImage,
  91806. resolveAll: labelEnd.resolveAll
  91807. };
  91808. function tokenizeLabelStartImage(effects, ok2, nok) {
  91809. const self2 = this;
  91810. return start3;
  91811. function start3(code2) {
  91812. effects.enter("labelImage");
  91813. effects.enter("labelImageMarker");
  91814. effects.consume(code2);
  91815. effects.exit("labelImageMarker");
  91816. return open;
  91817. }
  91818. function open(code2) {
  91819. if (code2 === 91) {
  91820. effects.enter("labelMarker");
  91821. effects.consume(code2);
  91822. effects.exit("labelMarker");
  91823. effects.exit("labelImage");
  91824. return after;
  91825. }
  91826. return nok(code2);
  91827. }
  91828. function after(code2) {
  91829. return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok2(code2);
  91830. }
  91831. }
  91832. // node_modules/micromark-core-commonmark/lib/label-start-link.js
  91833. var labelStartLink = {
  91834. name: "labelStartLink",
  91835. tokenize: tokenizeLabelStartLink,
  91836. resolveAll: labelEnd.resolveAll
  91837. };
  91838. function tokenizeLabelStartLink(effects, ok2, nok) {
  91839. const self2 = this;
  91840. return start3;
  91841. function start3(code2) {
  91842. effects.enter("labelLink");
  91843. effects.enter("labelMarker");
  91844. effects.consume(code2);
  91845. effects.exit("labelMarker");
  91846. effects.exit("labelLink");
  91847. return after;
  91848. }
  91849. function after(code2) {
  91850. return code2 === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code2) : ok2(code2);
  91851. }
  91852. }
  91853. // node_modules/micromark-core-commonmark/lib/line-ending.js
  91854. var lineEnding = {
  91855. name: "lineEnding",
  91856. tokenize: tokenizeLineEnding
  91857. };
  91858. function tokenizeLineEnding(effects, ok2) {
  91859. return start3;
  91860. function start3(code2) {
  91861. effects.enter("lineEnding");
  91862. effects.consume(code2);
  91863. effects.exit("lineEnding");
  91864. return factorySpace(effects, ok2, "linePrefix");
  91865. }
  91866. }
  91867. // node_modules/micromark-core-commonmark/lib/thematic-break.js
  91868. var thematicBreak = {
  91869. name: "thematicBreak",
  91870. tokenize: tokenizeThematicBreak
  91871. };
  91872. function tokenizeThematicBreak(effects, ok2, nok) {
  91873. let size = 0;
  91874. let marker;
  91875. return start3;
  91876. function start3(code2) {
  91877. effects.enter("thematicBreak");
  91878. marker = code2;
  91879. return atBreak(code2);
  91880. }
  91881. function atBreak(code2) {
  91882. if (code2 === marker) {
  91883. effects.enter("thematicBreakSequence");
  91884. return sequence(code2);
  91885. }
  91886. if (markdownSpace(code2)) {
  91887. return factorySpace(effects, atBreak, "whitespace")(code2);
  91888. }
  91889. if (size < 3 || code2 !== null && !markdownLineEnding(code2)) {
  91890. return nok(code2);
  91891. }
  91892. effects.exit("thematicBreak");
  91893. return ok2(code2);
  91894. }
  91895. function sequence(code2) {
  91896. if (code2 === marker) {
  91897. effects.consume(code2);
  91898. size++;
  91899. return sequence;
  91900. }
  91901. effects.exit("thematicBreakSequence");
  91902. return atBreak(code2);
  91903. }
  91904. }
  91905. // node_modules/micromark-core-commonmark/lib/list.js
  91906. var list = {
  91907. name: "list",
  91908. tokenize: tokenizeListStart,
  91909. continuation: {
  91910. tokenize: tokenizeListContinuation
  91911. },
  91912. exit: tokenizeListEnd
  91913. };
  91914. var listItemPrefixWhitespaceConstruct = {
  91915. tokenize: tokenizeListItemPrefixWhitespace,
  91916. partial: true
  91917. };
  91918. var indentConstruct = {
  91919. tokenize: tokenizeIndent,
  91920. partial: true
  91921. };
  91922. function tokenizeListStart(effects, ok2, nok) {
  91923. const self2 = this;
  91924. const tail = self2.events[self2.events.length - 1];
  91925. let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
  91926. let size = 0;
  91927. return start3;
  91928. function start3(code2) {
  91929. const kind = self2.containerState.type || (code2 === 42 || code2 === 43 || code2 === 45 ? "listUnordered" : "listOrdered");
  91930. if (kind === "listUnordered" ? !self2.containerState.marker || code2 === self2.containerState.marker : asciiDigit(code2)) {
  91931. if (!self2.containerState.type) {
  91932. self2.containerState.type = kind;
  91933. effects.enter(kind, {
  91934. _container: true
  91935. });
  91936. }
  91937. if (kind === "listUnordered") {
  91938. effects.enter("listItemPrefix");
  91939. return code2 === 42 || code2 === 45 ? effects.check(thematicBreak, nok, atMarker)(code2) : atMarker(code2);
  91940. }
  91941. if (!self2.interrupt || code2 === 49) {
  91942. effects.enter("listItemPrefix");
  91943. effects.enter("listItemValue");
  91944. return inside(code2);
  91945. }
  91946. }
  91947. return nok(code2);
  91948. }
  91949. function inside(code2) {
  91950. if (asciiDigit(code2) && ++size < 10) {
  91951. effects.consume(code2);
  91952. return inside;
  91953. }
  91954. if ((!self2.interrupt || size < 2) && (self2.containerState.marker ? code2 === self2.containerState.marker : code2 === 41 || code2 === 46)) {
  91955. effects.exit("listItemValue");
  91956. return atMarker(code2);
  91957. }
  91958. return nok(code2);
  91959. }
  91960. function atMarker(code2) {
  91961. effects.enter("listItemMarker");
  91962. effects.consume(code2);
  91963. effects.exit("listItemMarker");
  91964. self2.containerState.marker = self2.containerState.marker || code2;
  91965. return effects.check(
  91966. blankLine,
  91967. // Can’t be empty when interrupting.
  91968. self2.interrupt ? nok : onBlank,
  91969. effects.attempt(
  91970. listItemPrefixWhitespaceConstruct,
  91971. endOfPrefix,
  91972. otherPrefix
  91973. )
  91974. );
  91975. }
  91976. function onBlank(code2) {
  91977. self2.containerState.initialBlankLine = true;
  91978. initialSize++;
  91979. return endOfPrefix(code2);
  91980. }
  91981. function otherPrefix(code2) {
  91982. if (markdownSpace(code2)) {
  91983. effects.enter("listItemPrefixWhitespace");
  91984. effects.consume(code2);
  91985. effects.exit("listItemPrefixWhitespace");
  91986. return endOfPrefix;
  91987. }
  91988. return nok(code2);
  91989. }
  91990. function endOfPrefix(code2) {
  91991. self2.containerState.size = initialSize + self2.sliceSerialize(effects.exit("listItemPrefix"), true).length;
  91992. return ok2(code2);
  91993. }
  91994. }
  91995. function tokenizeListContinuation(effects, ok2, nok) {
  91996. const self2 = this;
  91997. self2.containerState._closeFlow = void 0;
  91998. return effects.check(blankLine, onBlank, notBlank);
  91999. function onBlank(code2) {
  92000. self2.containerState.furtherBlankLines = self2.containerState.furtherBlankLines || self2.containerState.initialBlankLine;
  92001. return factorySpace(
  92002. effects,
  92003. ok2,
  92004. "listItemIndent",
  92005. self2.containerState.size + 1
  92006. )(code2);
  92007. }
  92008. function notBlank(code2) {
  92009. if (self2.containerState.furtherBlankLines || !markdownSpace(code2)) {
  92010. self2.containerState.furtherBlankLines = void 0;
  92011. self2.containerState.initialBlankLine = void 0;
  92012. return notInCurrentItem(code2);
  92013. }
  92014. self2.containerState.furtherBlankLines = void 0;
  92015. self2.containerState.initialBlankLine = void 0;
  92016. return effects.attempt(indentConstruct, ok2, notInCurrentItem)(code2);
  92017. }
  92018. function notInCurrentItem(code2) {
  92019. self2.containerState._closeFlow = true;
  92020. self2.interrupt = void 0;
  92021. return factorySpace(
  92022. effects,
  92023. effects.attempt(list, ok2, nok),
  92024. "linePrefix",
  92025. self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  92026. )(code2);
  92027. }
  92028. }
  92029. function tokenizeIndent(effects, ok2, nok) {
  92030. const self2 = this;
  92031. return factorySpace(
  92032. effects,
  92033. afterPrefix,
  92034. "listItemIndent",
  92035. self2.containerState.size + 1
  92036. );
  92037. function afterPrefix(code2) {
  92038. const tail = self2.events[self2.events.length - 1];
  92039. return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], true).length === self2.containerState.size ? ok2(code2) : nok(code2);
  92040. }
  92041. }
  92042. function tokenizeListEnd(effects) {
  92043. effects.exit(this.containerState.type);
  92044. }
  92045. function tokenizeListItemPrefixWhitespace(effects, ok2, nok) {
  92046. const self2 = this;
  92047. return factorySpace(
  92048. effects,
  92049. afterPrefix,
  92050. "listItemPrefixWhitespace",
  92051. self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1
  92052. );
  92053. function afterPrefix(code2) {
  92054. const tail = self2.events[self2.events.length - 1];
  92055. return !markdownSpace(code2) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok2(code2) : nok(code2);
  92056. }
  92057. }
  92058. // node_modules/micromark-core-commonmark/lib/setext-underline.js
  92059. var setextUnderline = {
  92060. name: "setextUnderline",
  92061. tokenize: tokenizeSetextUnderline,
  92062. resolveTo: resolveToSetextUnderline
  92063. };
  92064. function resolveToSetextUnderline(events, context) {
  92065. let index2 = events.length;
  92066. let content3;
  92067. let text5;
  92068. let definition2;
  92069. while (index2--) {
  92070. if (events[index2][0] === "enter") {
  92071. if (events[index2][1].type === "content") {
  92072. content3 = index2;
  92073. break;
  92074. }
  92075. if (events[index2][1].type === "paragraph") {
  92076. text5 = index2;
  92077. }
  92078. } else {
  92079. if (events[index2][1].type === "content") {
  92080. events.splice(index2, 1);
  92081. }
  92082. if (!definition2 && events[index2][1].type === "definition") {
  92083. definition2 = index2;
  92084. }
  92085. }
  92086. }
  92087. const heading2 = {
  92088. type: "setextHeading",
  92089. start: Object.assign({}, events[text5][1].start),
  92090. end: Object.assign({}, events[events.length - 1][1].end)
  92091. };
  92092. events[text5][1].type = "setextHeadingText";
  92093. if (definition2) {
  92094. events.splice(text5, 0, ["enter", heading2, context]);
  92095. events.splice(definition2 + 1, 0, ["exit", events[content3][1], context]);
  92096. events[content3][1].end = Object.assign({}, events[definition2][1].end);
  92097. } else {
  92098. events[content3][1] = heading2;
  92099. }
  92100. events.push(["exit", heading2, context]);
  92101. return events;
  92102. }
  92103. function tokenizeSetextUnderline(effects, ok2, nok) {
  92104. const self2 = this;
  92105. let index2 = self2.events.length;
  92106. let marker;
  92107. let paragraph2;
  92108. while (index2--) {
  92109. if (self2.events[index2][1].type !== "lineEnding" && self2.events[index2][1].type !== "linePrefix" && self2.events[index2][1].type !== "content") {
  92110. paragraph2 = self2.events[index2][1].type === "paragraph";
  92111. break;
  92112. }
  92113. }
  92114. return start3;
  92115. function start3(code2) {
  92116. if (!self2.parser.lazy[self2.now().line] && (self2.interrupt || paragraph2)) {
  92117. effects.enter("setextHeadingLine");
  92118. effects.enter("setextHeadingLineSequence");
  92119. marker = code2;
  92120. return closingSequence(code2);
  92121. }
  92122. return nok(code2);
  92123. }
  92124. function closingSequence(code2) {
  92125. if (code2 === marker) {
  92126. effects.consume(code2);
  92127. return closingSequence;
  92128. }
  92129. effects.exit("setextHeadingLineSequence");
  92130. return factorySpace(effects, closingSequenceEnd, "lineSuffix")(code2);
  92131. }
  92132. function closingSequenceEnd(code2) {
  92133. if (code2 === null || markdownLineEnding(code2)) {
  92134. effects.exit("setextHeadingLine");
  92135. return ok2(code2);
  92136. }
  92137. return nok(code2);
  92138. }
  92139. }
  92140. // node_modules/micromark-extension-mdxjs-esm/lib/syntax.js
  92141. var nextBlankConstruct2 = {
  92142. tokenize: tokenizeNextBlank2,
  92143. partial: true
  92144. };
  92145. var allowedAcornTypes = /* @__PURE__ */ new Set([
  92146. "ExportAllDeclaration",
  92147. "ExportDefaultDeclaration",
  92148. "ExportNamedDeclaration",
  92149. "ImportDeclaration"
  92150. ]);
  92151. function mdxjsEsm(options) {
  92152. const exportImportConstruct = {
  92153. tokenize: tokenizeExportImport,
  92154. concrete: true
  92155. };
  92156. if (!options || !options.acorn || !options.acorn.parse) {
  92157. throw new Error("Expected an `acorn` instance passed in as `options.acorn`");
  92158. }
  92159. const acorn = options.acorn;
  92160. const acornOptions = Object.assign(
  92161. {
  92162. ecmaVersion: 2020,
  92163. sourceType: "module"
  92164. },
  92165. options.acornOptions
  92166. );
  92167. return {
  92168. flow: {
  92169. [101]: exportImportConstruct,
  92170. [105]: exportImportConstruct
  92171. }
  92172. };
  92173. function tokenizeExportImport(effects, ok2, nok) {
  92174. const self2 = this;
  92175. const definedModuleSpecifiers = (
  92176. // @ts-expect-error: hush
  92177. self2.parser.definedModuleSpecifiers || // @ts-expect-error: hush
  92178. (self2.parser.definedModuleSpecifiers = [])
  92179. );
  92180. const eventStart = this.events.length + 1;
  92181. let index2 = 0;
  92182. let buffer3;
  92183. return self2.interrupt ? nok : start3;
  92184. function start3(code2) {
  92185. if (self2.now().column > 1)
  92186. return nok(code2);
  92187. buffer3 = code2 === 101 ? "export" : "import";
  92188. effects.enter("mdxjsEsm");
  92189. effects.enter("mdxjsEsmData");
  92190. return keyword(code2);
  92191. }
  92192. function keyword(code2) {
  92193. if (code2 === buffer3.charCodeAt(index2++)) {
  92194. effects.consume(code2);
  92195. return index2 === buffer3.length ? after : keyword;
  92196. }
  92197. return nok(code2);
  92198. }
  92199. function after(code2) {
  92200. if (unicodeWhitespace(code2)) {
  92201. effects.consume(code2);
  92202. return rest;
  92203. }
  92204. return nok(code2);
  92205. }
  92206. function rest(code2) {
  92207. if (code2 === null) {
  92208. return atEndOfData(code2);
  92209. }
  92210. if (markdownLineEnding(code2)) {
  92211. return effects.check(nextBlankConstruct2, atEndOfData, atEol)(code2);
  92212. }
  92213. effects.consume(code2);
  92214. return rest;
  92215. }
  92216. function atEol(code2) {
  92217. effects.exit("mdxjsEsmData");
  92218. return lineStart(code2);
  92219. }
  92220. function lineStart(code2) {
  92221. if (markdownLineEnding(code2)) {
  92222. effects.enter("lineEnding");
  92223. effects.consume(code2);
  92224. effects.exit("lineEnding");
  92225. return lineStart;
  92226. }
  92227. if (code2 === null) {
  92228. return atEnd(code2);
  92229. }
  92230. effects.enter("mdxjsEsmData");
  92231. return rest(code2);
  92232. }
  92233. function atEndOfData(code2) {
  92234. effects.exit("mdxjsEsmData");
  92235. return atEnd(code2);
  92236. }
  92237. function atEnd(code2) {
  92238. let index3 = -1;
  92239. const result = eventsToAcorn(self2.events.slice(eventStart), {
  92240. acorn,
  92241. acornOptions,
  92242. prefix: definedModuleSpecifiers.length > 0 ? "var " + definedModuleSpecifiers.join(",") + "\n" : ""
  92243. });
  92244. if (code2 !== null && result.swallow) {
  92245. return lineStart(code2);
  92246. }
  92247. if (result.error) {
  92248. throw new VFileMessage(
  92249. "Could not parse import/exports with acorn: " + String(result.error),
  92250. {
  92251. // @ts-expect-error: hush
  92252. line: result.error.loc.line,
  92253. // @ts-expect-error: hush
  92254. column: result.error.loc.column + 1,
  92255. // @ts-expect-error: hush
  92256. offset: result.error.pos
  92257. },
  92258. "micromark-extension-mdxjs-esm:acorn"
  92259. );
  92260. }
  92261. if (definedModuleSpecifiers.length > 0) {
  92262. result.estree.body.shift();
  92263. }
  92264. while (++index3 < result.estree.body.length) {
  92265. const node2 = result.estree.body[index3];
  92266. if (!allowedAcornTypes.has(node2.type)) {
  92267. throw new VFileMessage(
  92268. "Unexpected `" + node2.type + "` in code: only import/exports are supported",
  92269. positionFromEstree(node2),
  92270. "micromark-extension-mdxjs-esm:non-esm"
  92271. );
  92272. }
  92273. if (node2.type === "ImportDeclaration" && !self2.interrupt) {
  92274. let index4 = -1;
  92275. while (++index4 < node2.specifiers.length) {
  92276. definedModuleSpecifiers.push(node2.specifiers[index4].local.name);
  92277. }
  92278. }
  92279. }
  92280. Object.assign(
  92281. effects.exit("mdxjsEsm"),
  92282. options.addResult ? {
  92283. estree: result.estree
  92284. } : void 0
  92285. );
  92286. return ok2(code2);
  92287. }
  92288. }
  92289. }
  92290. function tokenizeNextBlank2(effects, ok2, nok) {
  92291. return start3;
  92292. function start3(code2) {
  92293. effects.exit("mdxjsEsmData");
  92294. effects.enter("lineEndingBlank");
  92295. effects.consume(code2);
  92296. effects.exit("lineEndingBlank");
  92297. return effects.attempt(blankLine, ok2, nok);
  92298. }
  92299. }
  92300. // node_modules/micromark-extension-mdxjs/index.js
  92301. function mdxjs(options) {
  92302. const settings = Object.assign(
  92303. {
  92304. acorn: Parser.extend((0, import_acorn_jsx.default)()),
  92305. acornOptions: { ecmaVersion: 2020, sourceType: "module" },
  92306. addResult: true
  92307. },
  92308. options
  92309. );
  92310. return combineExtensions([
  92311. mdxjsEsm(settings),
  92312. mdxExpression(settings),
  92313. mdxJsx(settings),
  92314. mdxMd
  92315. ]);
  92316. }
  92317. // node_modules/mdast-util-mdx-expression/lib/index.js
  92318. var mdxExpressionFromMarkdown = {
  92319. enter: {
  92320. mdxFlowExpression: enterMdxFlowExpression,
  92321. mdxTextExpression: enterMdxTextExpression
  92322. },
  92323. exit: {
  92324. mdxFlowExpression: exitMdxExpression,
  92325. mdxFlowExpressionChunk: exitMdxExpressionData,
  92326. mdxTextExpression: exitMdxExpression,
  92327. mdxTextExpressionChunk: exitMdxExpressionData
  92328. }
  92329. };
  92330. var mdxExpressionToMarkdown = {
  92331. handlers: {
  92332. mdxFlowExpression: handleMdxExpression,
  92333. mdxTextExpression: handleMdxExpression
  92334. },
  92335. unsafe: [
  92336. { character: "{", inConstruct: ["phrasing"] },
  92337. { atBreak: true, character: "{" }
  92338. ]
  92339. };
  92340. function enterMdxFlowExpression(token2) {
  92341. this.enter({ type: "mdxFlowExpression", value: "" }, token2);
  92342. this.buffer();
  92343. }
  92344. function enterMdxTextExpression(token2) {
  92345. this.enter({ type: "mdxTextExpression", value: "" }, token2);
  92346. this.buffer();
  92347. }
  92348. function exitMdxExpression(token2) {
  92349. const value2 = this.resume();
  92350. const estree = token2.estree;
  92351. const node2 = (
  92352. /** @type {MdxFlowExpression | MdxTextExpression} */
  92353. this.exit(token2)
  92354. );
  92355. node2.value = value2;
  92356. if (estree) {
  92357. node2.data = { estree };
  92358. }
  92359. }
  92360. function exitMdxExpressionData(token2) {
  92361. this.config.enter.data.call(this, token2);
  92362. this.config.exit.data.call(this, token2);
  92363. }
  92364. function handleMdxExpression(node2) {
  92365. const value2 = node2.value || "";
  92366. return "{" + value2 + "}";
  92367. }
  92368. // node_modules/ccount/index.js
  92369. function ccount(value2, character) {
  92370. const source2 = String(value2);
  92371. if (typeof character !== "string") {
  92372. throw new TypeError("Expected character");
  92373. }
  92374. let count = 0;
  92375. let index2 = source2.indexOf(character);
  92376. while (index2 !== -1) {
  92377. count++;
  92378. index2 = source2.indexOf(character, index2 + character.length);
  92379. }
  92380. return count;
  92381. }
  92382. // node_modules/character-entities-legacy/index.js
  92383. var characterEntitiesLegacy = [
  92384. "AElig",
  92385. "AMP",
  92386. "Aacute",
  92387. "Acirc",
  92388. "Agrave",
  92389. "Aring",
  92390. "Atilde",
  92391. "Auml",
  92392. "COPY",
  92393. "Ccedil",
  92394. "ETH",
  92395. "Eacute",
  92396. "Ecirc",
  92397. "Egrave",
  92398. "Euml",
  92399. "GT",
  92400. "Iacute",
  92401. "Icirc",
  92402. "Igrave",
  92403. "Iuml",
  92404. "LT",
  92405. "Ntilde",
  92406. "Oacute",
  92407. "Ocirc",
  92408. "Ograve",
  92409. "Oslash",
  92410. "Otilde",
  92411. "Ouml",
  92412. "QUOT",
  92413. "REG",
  92414. "THORN",
  92415. "Uacute",
  92416. "Ucirc",
  92417. "Ugrave",
  92418. "Uuml",
  92419. "Yacute",
  92420. "aacute",
  92421. "acirc",
  92422. "acute",
  92423. "aelig",
  92424. "agrave",
  92425. "amp",
  92426. "aring",
  92427. "atilde",
  92428. "auml",
  92429. "brvbar",
  92430. "ccedil",
  92431. "cedil",
  92432. "cent",
  92433. "copy",
  92434. "curren",
  92435. "deg",
  92436. "divide",
  92437. "eacute",
  92438. "ecirc",
  92439. "egrave",
  92440. "eth",
  92441. "euml",
  92442. "frac12",
  92443. "frac14",
  92444. "frac34",
  92445. "gt",
  92446. "iacute",
  92447. "icirc",
  92448. "iexcl",
  92449. "igrave",
  92450. "iquest",
  92451. "iuml",
  92452. "laquo",
  92453. "lt",
  92454. "macr",
  92455. "micro",
  92456. "middot",
  92457. "nbsp",
  92458. "not",
  92459. "ntilde",
  92460. "oacute",
  92461. "ocirc",
  92462. "ograve",
  92463. "ordf",
  92464. "ordm",
  92465. "oslash",
  92466. "otilde",
  92467. "ouml",
  92468. "para",
  92469. "plusmn",
  92470. "pound",
  92471. "quot",
  92472. "raquo",
  92473. "reg",
  92474. "sect",
  92475. "shy",
  92476. "sup1",
  92477. "sup2",
  92478. "sup3",
  92479. "szlig",
  92480. "thorn",
  92481. "times",
  92482. "uacute",
  92483. "ucirc",
  92484. "ugrave",
  92485. "uml",
  92486. "uuml",
  92487. "yacute",
  92488. "yen",
  92489. "yuml"
  92490. ];
  92491. // node_modules/character-reference-invalid/index.js
  92492. var characterReferenceInvalid = {
  92493. 0: "\uFFFD",
  92494. 128: "\u20AC",
  92495. 130: "\u201A",
  92496. 131: "\u0192",
  92497. 132: "\u201E",
  92498. 133: "\u2026",
  92499. 134: "\u2020",
  92500. 135: "\u2021",
  92501. 136: "\u02C6",
  92502. 137: "\u2030",
  92503. 138: "\u0160",
  92504. 139: "\u2039",
  92505. 140: "\u0152",
  92506. 142: "\u017D",
  92507. 145: "\u2018",
  92508. 146: "\u2019",
  92509. 147: "\u201C",
  92510. 148: "\u201D",
  92511. 149: "\u2022",
  92512. 150: "\u2013",
  92513. 151: "\u2014",
  92514. 152: "\u02DC",
  92515. 153: "\u2122",
  92516. 154: "\u0161",
  92517. 155: "\u203A",
  92518. 156: "\u0153",
  92519. 158: "\u017E",
  92520. 159: "\u0178"
  92521. };
  92522. // node_modules/is-decimal/index.js
  92523. function isDecimal(character) {
  92524. const code2 = typeof character === "string" ? character.charCodeAt(0) : character;
  92525. return code2 >= 48 && code2 <= 57;
  92526. }
  92527. // node_modules/is-hexadecimal/index.js
  92528. function isHexadecimal(character) {
  92529. const code2 = typeof character === "string" ? character.charCodeAt(0) : character;
  92530. return code2 >= 97 && code2 <= 102 || code2 >= 65 && code2 <= 70 || code2 >= 48 && code2 <= 57;
  92531. }
  92532. // node_modules/is-alphabetical/index.js
  92533. function isAlphabetical(character) {
  92534. const code2 = typeof character === "string" ? character.charCodeAt(0) : character;
  92535. return code2 >= 97 && code2 <= 122 || code2 >= 65 && code2 <= 90;
  92536. }
  92537. // node_modules/is-alphanumerical/index.js
  92538. function isAlphanumerical(character) {
  92539. return isAlphabetical(character) || isDecimal(character);
  92540. }
  92541. // node_modules/parse-entities/lib/index.js
  92542. var fromCharCode = String.fromCharCode;
  92543. var messages = [
  92544. "",
  92545. /* 1: Non terminated (named) */
  92546. "Named character references must be terminated by a semicolon",
  92547. /* 2: Non terminated (numeric) */
  92548. "Numeric character references must be terminated by a semicolon",
  92549. /* 3: Empty (named) */
  92550. "Named character references cannot be empty",
  92551. /* 4: Empty (numeric) */
  92552. "Numeric character references cannot be empty",
  92553. /* 5: Unknown (named) */
  92554. "Named character references must be known",
  92555. /* 6: Disallowed (numeric) */
  92556. "Numeric character references cannot be disallowed",
  92557. /* 7: Prohibited (numeric) */
  92558. "Numeric character references cannot be outside the permissible Unicode range"
  92559. ];
  92560. function parseEntities(value2, options = {}) {
  92561. const additional = typeof options.additional === "string" ? options.additional.charCodeAt(0) : options.additional;
  92562. const result = [];
  92563. let index2 = 0;
  92564. let lines = -1;
  92565. let queue = "";
  92566. let point4;
  92567. let indent;
  92568. if (options.position) {
  92569. if ("start" in options.position || "indent" in options.position) {
  92570. indent = options.position.indent;
  92571. point4 = options.position.start;
  92572. } else {
  92573. point4 = options.position;
  92574. }
  92575. }
  92576. let line2 = (point4 ? point4.line : 0) || 1;
  92577. let column2 = (point4 ? point4.column : 0) || 1;
  92578. let previous2 = now();
  92579. let character;
  92580. index2--;
  92581. while (++index2 <= value2.length) {
  92582. if (character === 10) {
  92583. column2 = (indent ? indent[lines] : 0) || 1;
  92584. }
  92585. character = value2.charCodeAt(index2);
  92586. if (character === 38) {
  92587. const following = value2.charCodeAt(index2 + 1);
  92588. if (following === 9 || following === 10 || following === 12 || following === 32 || following === 38 || following === 60 || Number.isNaN(following) || additional && following === additional) {
  92589. queue += fromCharCode(character);
  92590. column2++;
  92591. continue;
  92592. }
  92593. const start3 = index2 + 1;
  92594. let begin = start3;
  92595. let end = start3;
  92596. let type;
  92597. if (following === 35) {
  92598. end = ++begin;
  92599. const following2 = value2.charCodeAt(end);
  92600. if (following2 === 88 || following2 === 120) {
  92601. type = "hexadecimal";
  92602. end = ++begin;
  92603. } else {
  92604. type = "decimal";
  92605. }
  92606. } else {
  92607. type = "named";
  92608. }
  92609. let characterReferenceCharacters = "";
  92610. let characterReference2 = "";
  92611. let characters = "";
  92612. const test = type === "named" ? isAlphanumerical : type === "decimal" ? isDecimal : isHexadecimal;
  92613. end--;
  92614. while (++end <= value2.length) {
  92615. const following2 = value2.charCodeAt(end);
  92616. if (!test(following2)) {
  92617. break;
  92618. }
  92619. characters += fromCharCode(following2);
  92620. if (type === "named" && characterEntitiesLegacy.includes(characters)) {
  92621. characterReferenceCharacters = characters;
  92622. characterReference2 = decodeNamedCharacterReference(characters);
  92623. }
  92624. }
  92625. let terminated = value2.charCodeAt(end) === 59;
  92626. if (terminated) {
  92627. end++;
  92628. const namedReference = type === "named" ? decodeNamedCharacterReference(characters) : false;
  92629. if (namedReference) {
  92630. characterReferenceCharacters = characters;
  92631. characterReference2 = namedReference;
  92632. }
  92633. }
  92634. let diff = 1 + end - start3;
  92635. let reference = "";
  92636. if (!terminated && options.nonTerminated === false) {
  92637. } else if (!characters) {
  92638. if (type !== "named") {
  92639. warning(4, diff);
  92640. }
  92641. } else if (type === "named") {
  92642. if (terminated && !characterReference2) {
  92643. warning(5, 1);
  92644. } else {
  92645. if (characterReferenceCharacters !== characters) {
  92646. end = begin + characterReferenceCharacters.length;
  92647. diff = 1 + end - begin;
  92648. terminated = false;
  92649. }
  92650. if (!terminated) {
  92651. const reason = characterReferenceCharacters ? 1 : 3;
  92652. if (options.attribute) {
  92653. const following2 = value2.charCodeAt(end);
  92654. if (following2 === 61) {
  92655. warning(reason, diff);
  92656. characterReference2 = "";
  92657. } else if (isAlphanumerical(following2)) {
  92658. characterReference2 = "";
  92659. } else {
  92660. warning(reason, diff);
  92661. }
  92662. } else {
  92663. warning(reason, diff);
  92664. }
  92665. }
  92666. }
  92667. reference = characterReference2;
  92668. } else {
  92669. if (!terminated) {
  92670. warning(2, diff);
  92671. }
  92672. let referenceCode = Number.parseInt(
  92673. characters,
  92674. type === "hexadecimal" ? 16 : 10
  92675. );
  92676. if (prohibited(referenceCode)) {
  92677. warning(7, diff);
  92678. reference = fromCharCode(
  92679. 65533
  92680. /* `�` */
  92681. );
  92682. } else if (referenceCode in characterReferenceInvalid) {
  92683. warning(6, diff);
  92684. reference = characterReferenceInvalid[referenceCode];
  92685. } else {
  92686. let output = "";
  92687. if (disallowed(referenceCode)) {
  92688. warning(6, diff);
  92689. }
  92690. if (referenceCode > 65535) {
  92691. referenceCode -= 65536;
  92692. output += fromCharCode(referenceCode >>> (10 & 1023) | 55296);
  92693. referenceCode = 56320 | referenceCode & 1023;
  92694. }
  92695. reference = output + fromCharCode(referenceCode);
  92696. }
  92697. }
  92698. if (reference) {
  92699. flush();
  92700. previous2 = now();
  92701. index2 = end - 1;
  92702. column2 += end - start3 + 1;
  92703. result.push(reference);
  92704. const next = now();
  92705. next.offset++;
  92706. if (options.reference) {
  92707. options.reference.call(
  92708. options.referenceContext,
  92709. reference,
  92710. { start: previous2, end: next },
  92711. value2.slice(start3 - 1, end)
  92712. );
  92713. }
  92714. previous2 = next;
  92715. } else {
  92716. characters = value2.slice(start3 - 1, end);
  92717. queue += characters;
  92718. column2 += characters.length;
  92719. index2 = end - 1;
  92720. }
  92721. } else {
  92722. if (character === 10) {
  92723. line2++;
  92724. lines++;
  92725. column2 = 0;
  92726. }
  92727. if (Number.isNaN(character)) {
  92728. flush();
  92729. } else {
  92730. queue += fromCharCode(character);
  92731. column2++;
  92732. }
  92733. }
  92734. }
  92735. return result.join("");
  92736. function now() {
  92737. return {
  92738. line: line2,
  92739. column: column2,
  92740. offset: index2 + ((point4 ? point4.offset : 0) || 0)
  92741. };
  92742. }
  92743. function warning(code2, offset3) {
  92744. let position3;
  92745. if (options.warning) {
  92746. position3 = now();
  92747. position3.column += offset3;
  92748. position3.offset += offset3;
  92749. options.warning.call(
  92750. options.warningContext,
  92751. messages[code2],
  92752. position3,
  92753. code2
  92754. );
  92755. }
  92756. }
  92757. function flush() {
  92758. if (queue) {
  92759. result.push(queue);
  92760. if (options.text) {
  92761. options.text.call(options.textContext, queue, {
  92762. start: previous2,
  92763. end: now()
  92764. });
  92765. }
  92766. queue = "";
  92767. }
  92768. }
  92769. }
  92770. function prohibited(code2) {
  92771. return code2 >= 55296 && code2 <= 57343 || code2 > 1114111;
  92772. }
  92773. function disallowed(code2) {
  92774. return code2 >= 1 && code2 <= 8 || code2 === 11 || code2 >= 13 && code2 <= 31 || code2 >= 127 && code2 <= 159 || code2 >= 64976 && code2 <= 65007 || (code2 & 65535) === 65535 || (code2 & 65535) === 65534;
  92775. }
  92776. // node_modules/stringify-entities/lib/core.js
  92777. function core(value2, options) {
  92778. value2 = value2.replace(
  92779. options.subset ? charactersToExpression(options.subset) : /["&'<>`]/g,
  92780. basic
  92781. );
  92782. if (options.subset || options.escapeOnly) {
  92783. return value2;
  92784. }
  92785. return value2.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, surrogate).replace(
  92786. // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
  92787. /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,
  92788. basic
  92789. );
  92790. function surrogate(pair, index2, all4) {
  92791. return options.format(
  92792. (pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536,
  92793. all4.charCodeAt(index2 + 2),
  92794. options
  92795. );
  92796. }
  92797. function basic(character, index2, all4) {
  92798. return options.format(
  92799. character.charCodeAt(0),
  92800. all4.charCodeAt(index2 + 1),
  92801. options
  92802. );
  92803. }
  92804. }
  92805. function charactersToExpression(subset) {
  92806. const groups = [];
  92807. let index2 = -1;
  92808. while (++index2 < subset.length) {
  92809. groups.push(subset[index2].replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"));
  92810. }
  92811. return new RegExp("(?:" + groups.join("|") + ")", "g");
  92812. }
  92813. // node_modules/stringify-entities/lib/util/format-basic.js
  92814. function formatBasic(code2) {
  92815. return "&#x" + code2.toString(16).toUpperCase() + ";";
  92816. }
  92817. // node_modules/stringify-entities/lib/index.js
  92818. function stringifyEntitiesLight(value2, options) {
  92819. return core(value2, Object.assign({ format: formatBasic }, options));
  92820. }
  92821. // node_modules/mdast-util-to-markdown/lib/util/container-flow.js
  92822. function containerFlow(parent, state, info) {
  92823. const indexStack = state.indexStack;
  92824. const children = parent.children || [];
  92825. const tracker = state.createTracker(info);
  92826. const results = [];
  92827. let index2 = -1;
  92828. indexStack.push(-1);
  92829. while (++index2 < children.length) {
  92830. const child = children[index2];
  92831. indexStack[indexStack.length - 1] = index2;
  92832. results.push(
  92833. tracker.move(
  92834. state.handle(child, parent, state, {
  92835. before: "\n",
  92836. after: "\n",
  92837. ...tracker.current()
  92838. })
  92839. )
  92840. );
  92841. if (child.type !== "list") {
  92842. state.bulletLastUsed = void 0;
  92843. }
  92844. if (index2 < children.length - 1) {
  92845. results.push(
  92846. tracker.move(between(child, children[index2 + 1], parent, state))
  92847. );
  92848. }
  92849. }
  92850. indexStack.pop();
  92851. return results.join("");
  92852. }
  92853. function between(left, right, parent, state) {
  92854. let index2 = state.join.length;
  92855. while (index2--) {
  92856. const result = state.join[index2](left, right, parent, state);
  92857. if (result === true || result === 1) {
  92858. break;
  92859. }
  92860. if (typeof result === "number") {
  92861. return "\n".repeat(1 + result);
  92862. }
  92863. if (result === false) {
  92864. return "\n\n<!---->\n\n";
  92865. }
  92866. }
  92867. return "\n\n";
  92868. }
  92869. // node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
  92870. function containerPhrasing(parent, state, info) {
  92871. const indexStack = state.indexStack;
  92872. const children = parent.children || [];
  92873. const results = [];
  92874. let index2 = -1;
  92875. let before = info.before;
  92876. indexStack.push(-1);
  92877. let tracker = state.createTracker(info);
  92878. while (++index2 < children.length) {
  92879. const child = children[index2];
  92880. let after;
  92881. indexStack[indexStack.length - 1] = index2;
  92882. if (index2 + 1 < children.length) {
  92883. let handle = state.handle.handlers[children[index2 + 1].type];
  92884. if (handle && handle.peek)
  92885. handle = handle.peek;
  92886. after = handle ? handle(children[index2 + 1], parent, state, {
  92887. before: "",
  92888. after: "",
  92889. ...tracker.current()
  92890. }).charAt(0) : "";
  92891. } else {
  92892. after = info.after;
  92893. }
  92894. if (results.length > 0 && (before === "\r" || before === "\n") && child.type === "html") {
  92895. results[results.length - 1] = results[results.length - 1].replace(
  92896. /(\r?\n|\r)$/,
  92897. " "
  92898. );
  92899. before = " ";
  92900. tracker = state.createTracker(info);
  92901. tracker.move(results.join(""));
  92902. }
  92903. results.push(
  92904. tracker.move(
  92905. state.handle(child, parent, state, {
  92906. ...tracker.current(),
  92907. before,
  92908. after
  92909. })
  92910. )
  92911. );
  92912. before = results[results.length - 1].slice(-1);
  92913. }
  92914. indexStack.pop();
  92915. return results.join("");
  92916. }
  92917. // node_modules/mdast-util-to-markdown/lib/util/indent-lines.js
  92918. var eol = /\r?\n|\r/g;
  92919. function indentLines(value2, map) {
  92920. const result = [];
  92921. let start3 = 0;
  92922. let line2 = 0;
  92923. let match;
  92924. while (match = eol.exec(value2)) {
  92925. one3(value2.slice(start3, match.index));
  92926. result.push(match[0]);
  92927. start3 = match.index + match[0].length;
  92928. line2++;
  92929. }
  92930. one3(value2.slice(start3));
  92931. return result.join("");
  92932. function one3(value3) {
  92933. result.push(map(value3, line2, !value3));
  92934. }
  92935. }
  92936. // node_modules/mdast-util-to-markdown/lib/util/track.js
  92937. function track(config) {
  92938. const options = config || {};
  92939. const now = options.now || {};
  92940. let lineShift = options.lineShift || 0;
  92941. let line2 = now.line || 1;
  92942. let column2 = now.column || 1;
  92943. return { move, current: current3, shift };
  92944. function current3() {
  92945. return { now: { line: line2, column: column2 }, lineShift };
  92946. }
  92947. function shift(value2) {
  92948. lineShift += value2;
  92949. }
  92950. function move(input) {
  92951. const value2 = input || "";
  92952. const chunks = value2.split(/\r?\n|\r/g);
  92953. const tail = chunks[chunks.length - 1];
  92954. line2 += chunks.length - 1;
  92955. column2 = chunks.length === 1 ? column2 + tail.length : 1 + tail.length + lineShift;
  92956. return value2;
  92957. }
  92958. }
  92959. // node_modules/mdast-util-mdx-jsx/lib/index.js
  92960. function mdxJsxFromMarkdown() {
  92961. return {
  92962. canContainEols: ["mdxJsxTextElement"],
  92963. enter: {
  92964. mdxJsxFlowTag: enterMdxJsxTag,
  92965. mdxJsxFlowTagClosingMarker: enterMdxJsxTagClosingMarker,
  92966. mdxJsxFlowTagAttribute: enterMdxJsxTagAttribute,
  92967. mdxJsxFlowTagExpressionAttribute: enterMdxJsxTagExpressionAttribute,
  92968. mdxJsxFlowTagAttributeValueLiteral: buffer3,
  92969. mdxJsxFlowTagAttributeValueExpression: buffer3,
  92970. mdxJsxFlowTagSelfClosingMarker: enterMdxJsxTagSelfClosingMarker,
  92971. mdxJsxTextTag: enterMdxJsxTag,
  92972. mdxJsxTextTagClosingMarker: enterMdxJsxTagClosingMarker,
  92973. mdxJsxTextTagAttribute: enterMdxJsxTagAttribute,
  92974. mdxJsxTextTagExpressionAttribute: enterMdxJsxTagExpressionAttribute,
  92975. mdxJsxTextTagAttributeValueLiteral: buffer3,
  92976. mdxJsxTextTagAttributeValueExpression: buffer3,
  92977. mdxJsxTextTagSelfClosingMarker: enterMdxJsxTagSelfClosingMarker
  92978. },
  92979. exit: {
  92980. mdxJsxFlowTagClosingMarker: exitMdxJsxTagClosingMarker,
  92981. mdxJsxFlowTagNamePrimary: exitMdxJsxTagNamePrimary,
  92982. mdxJsxFlowTagNameMember: exitMdxJsxTagNameMember,
  92983. mdxJsxFlowTagNameLocal: exitMdxJsxTagNameLocal,
  92984. mdxJsxFlowTagExpressionAttribute: exitMdxJsxTagExpressionAttribute,
  92985. mdxJsxFlowTagExpressionAttributeValue: data3,
  92986. mdxJsxFlowTagAttributeNamePrimary: exitMdxJsxTagAttributeNamePrimary,
  92987. mdxJsxFlowTagAttributeNameLocal: exitMdxJsxTagAttributeNameLocal,
  92988. mdxJsxFlowTagAttributeValueLiteral: exitMdxJsxTagAttributeValueLiteral,
  92989. mdxJsxFlowTagAttributeValueLiteralValue: data3,
  92990. mdxJsxFlowTagAttributeValueExpression: exitMdxJsxTagAttributeValueExpression,
  92991. mdxJsxFlowTagAttributeValueExpressionValue: data3,
  92992. mdxJsxFlowTagSelfClosingMarker: exitMdxJsxTagSelfClosingMarker,
  92993. mdxJsxFlowTag: exitMdxJsxTag,
  92994. mdxJsxTextTagClosingMarker: exitMdxJsxTagClosingMarker,
  92995. mdxJsxTextTagNamePrimary: exitMdxJsxTagNamePrimary,
  92996. mdxJsxTextTagNameMember: exitMdxJsxTagNameMember,
  92997. mdxJsxTextTagNameLocal: exitMdxJsxTagNameLocal,
  92998. mdxJsxTextTagExpressionAttribute: exitMdxJsxTagExpressionAttribute,
  92999. mdxJsxTextTagExpressionAttributeValue: data3,
  93000. mdxJsxTextTagAttributeNamePrimary: exitMdxJsxTagAttributeNamePrimary,
  93001. mdxJsxTextTagAttributeNameLocal: exitMdxJsxTagAttributeNameLocal,
  93002. mdxJsxTextTagAttributeValueLiteral: exitMdxJsxTagAttributeValueLiteral,
  93003. mdxJsxTextTagAttributeValueLiteralValue: data3,
  93004. mdxJsxTextTagAttributeValueExpression: exitMdxJsxTagAttributeValueExpression,
  93005. mdxJsxTextTagAttributeValueExpressionValue: data3,
  93006. mdxJsxTextTagSelfClosingMarker: exitMdxJsxTagSelfClosingMarker,
  93007. mdxJsxTextTag: exitMdxJsxTag
  93008. }
  93009. };
  93010. function buffer3() {
  93011. this.buffer();
  93012. }
  93013. function data3(token2) {
  93014. this.config.enter.data.call(this, token2);
  93015. this.config.exit.data.call(this, token2);
  93016. }
  93017. function enterMdxJsxTag(token2) {
  93018. const tag = {
  93019. name: void 0,
  93020. attributes: [],
  93021. close: false,
  93022. selfClosing: false,
  93023. start: token2.start,
  93024. end: token2.end
  93025. };
  93026. if (!this.getData("mdxJsxTagStack"))
  93027. this.setData("mdxJsxTagStack", []);
  93028. this.setData("mdxJsxTag", tag);
  93029. this.buffer();
  93030. }
  93031. function enterMdxJsxTagClosingMarker(token2) {
  93032. const stack2 = (
  93033. /** @type {Array<Tag>} */
  93034. this.getData("mdxJsxTagStack")
  93035. );
  93036. if (stack2.length === 0) {
  93037. throw new VFileMessage(
  93038. "Unexpected closing slash `/` in tag, expected an open tag first",
  93039. { start: token2.start, end: token2.end },
  93040. "mdast-util-mdx-jsx:unexpected-closing-slash"
  93041. );
  93042. }
  93043. }
  93044. function enterMdxJsxTagAnyAttribute(token2) {
  93045. const tag = (
  93046. /** @type {Tag} */
  93047. this.getData("mdxJsxTag")
  93048. );
  93049. if (tag.close) {
  93050. throw new VFileMessage(
  93051. "Unexpected attribute in closing tag, expected the end of the tag",
  93052. { start: token2.start, end: token2.end },
  93053. "mdast-util-mdx-jsx:unexpected-attribute"
  93054. );
  93055. }
  93056. }
  93057. function enterMdxJsxTagSelfClosingMarker(token2) {
  93058. const tag = (
  93059. /** @type {Tag} */
  93060. this.getData("mdxJsxTag")
  93061. );
  93062. if (tag.close) {
  93063. throw new VFileMessage(
  93064. "Unexpected self-closing slash `/` in closing tag, expected the end of the tag",
  93065. { start: token2.start, end: token2.end },
  93066. "mdast-util-mdx-jsx:unexpected-self-closing-slash"
  93067. );
  93068. }
  93069. }
  93070. function exitMdxJsxTagClosingMarker() {
  93071. const tag = (
  93072. /** @type {Tag} */
  93073. this.getData("mdxJsxTag")
  93074. );
  93075. tag.close = true;
  93076. }
  93077. function exitMdxJsxTagNamePrimary(token2) {
  93078. const tag = (
  93079. /** @type {Tag} */
  93080. this.getData("mdxJsxTag")
  93081. );
  93082. tag.name = this.sliceSerialize(token2);
  93083. }
  93084. function exitMdxJsxTagNameMember(token2) {
  93085. const tag = (
  93086. /** @type {Tag} */
  93087. this.getData("mdxJsxTag")
  93088. );
  93089. tag.name += "." + this.sliceSerialize(token2);
  93090. }
  93091. function exitMdxJsxTagNameLocal(token2) {
  93092. const tag = (
  93093. /** @type {Tag} */
  93094. this.getData("mdxJsxTag")
  93095. );
  93096. tag.name += ":" + this.sliceSerialize(token2);
  93097. }
  93098. function enterMdxJsxTagAttribute(token2) {
  93099. const tag = (
  93100. /** @type {Tag} */
  93101. this.getData("mdxJsxTag")
  93102. );
  93103. enterMdxJsxTagAnyAttribute.call(this, token2);
  93104. tag.attributes.push({ type: "mdxJsxAttribute", name: "", value: null });
  93105. }
  93106. function enterMdxJsxTagExpressionAttribute(token2) {
  93107. const tag = (
  93108. /** @type {Tag} */
  93109. this.getData("mdxJsxTag")
  93110. );
  93111. enterMdxJsxTagAnyAttribute.call(this, token2);
  93112. tag.attributes.push({ type: "mdxJsxExpressionAttribute", value: "" });
  93113. this.buffer();
  93114. }
  93115. function exitMdxJsxTagExpressionAttribute(token2) {
  93116. const tag = (
  93117. /** @type {Tag} */
  93118. this.getData("mdxJsxTag")
  93119. );
  93120. const tail = (
  93121. /** @type {MdxJsxExpressionAttribute} */
  93122. tag.attributes[tag.attributes.length - 1]
  93123. );
  93124. const estree = token2.estree;
  93125. tail.value = this.resume();
  93126. if (estree) {
  93127. tail.data = { estree };
  93128. }
  93129. }
  93130. function exitMdxJsxTagAttributeNamePrimary(token2) {
  93131. const tag = (
  93132. /** @type {Tag} */
  93133. this.getData("mdxJsxTag")
  93134. );
  93135. const node2 = (
  93136. /** @type {MdxJsxAttribute} */
  93137. tag.attributes[tag.attributes.length - 1]
  93138. );
  93139. node2.name = this.sliceSerialize(token2);
  93140. }
  93141. function exitMdxJsxTagAttributeNameLocal(token2) {
  93142. const tag = (
  93143. /** @type {Tag} */
  93144. this.getData("mdxJsxTag")
  93145. );
  93146. const node2 = (
  93147. /** @type {MdxJsxAttribute} */
  93148. tag.attributes[tag.attributes.length - 1]
  93149. );
  93150. node2.name += ":" + this.sliceSerialize(token2);
  93151. }
  93152. function exitMdxJsxTagAttributeValueLiteral() {
  93153. const tag = (
  93154. /** @type {Tag} */
  93155. this.getData("mdxJsxTag")
  93156. );
  93157. tag.attributes[tag.attributes.length - 1].value = parseEntities(
  93158. this.resume(),
  93159. { nonTerminated: false }
  93160. );
  93161. }
  93162. function exitMdxJsxTagAttributeValueExpression(token2) {
  93163. const tag = (
  93164. /** @type {Tag} */
  93165. this.getData("mdxJsxTag")
  93166. );
  93167. const tail = (
  93168. /** @type {MdxJsxAttribute} */
  93169. tag.attributes[tag.attributes.length - 1]
  93170. );
  93171. const node2 = { type: "mdxJsxAttributeValueExpression", value: this.resume() };
  93172. const estree = token2.estree;
  93173. if (estree) {
  93174. node2.data = { estree };
  93175. }
  93176. tail.value = node2;
  93177. }
  93178. function exitMdxJsxTagSelfClosingMarker() {
  93179. const tag = (
  93180. /** @type {Tag} */
  93181. this.getData("mdxJsxTag")
  93182. );
  93183. tag.selfClosing = true;
  93184. }
  93185. function exitMdxJsxTag(token2) {
  93186. const tag = (
  93187. /** @type {Tag} */
  93188. this.getData("mdxJsxTag")
  93189. );
  93190. const stack2 = (
  93191. /** @type {Array<Tag>} */
  93192. this.getData("mdxJsxTagStack")
  93193. );
  93194. const tail = stack2[stack2.length - 1];
  93195. if (tag.close && tail.name !== tag.name) {
  93196. throw new VFileMessage(
  93197. "Unexpected closing tag `" + serializeAbbreviatedTag(tag) + "`, expected corresponding closing tag for `" + serializeAbbreviatedTag(tail) + "` (" + stringifyPosition(tail) + ")",
  93198. { start: token2.start, end: token2.end },
  93199. "mdast-util-mdx-jsx:end-tag-mismatch"
  93200. );
  93201. }
  93202. this.resume();
  93203. if (tag.close) {
  93204. stack2.pop();
  93205. } else {
  93206. this.enter(
  93207. {
  93208. type: token2.type === "mdxJsxTextTag" ? "mdxJsxTextElement" : "mdxJsxFlowElement",
  93209. name: tag.name || null,
  93210. attributes: tag.attributes,
  93211. children: []
  93212. },
  93213. token2,
  93214. onErrorRightIsTag
  93215. );
  93216. }
  93217. if (tag.selfClosing || tag.close) {
  93218. this.exit(token2, onErrorLeftIsTag);
  93219. } else {
  93220. stack2.push(tag);
  93221. }
  93222. }
  93223. function onErrorRightIsTag(closing, open) {
  93224. const tag = (
  93225. /** @type {Tag} */
  93226. this.getData("mdxJsxTag")
  93227. );
  93228. const place = closing ? " before the end of `" + closing.type + "`" : "";
  93229. const position3 = closing ? { start: closing.start, end: closing.end } : void 0;
  93230. throw new VFileMessage(
  93231. "Expected a closing tag for `" + serializeAbbreviatedTag(tag) + "` (" + stringifyPosition({ start: open.start, end: open.end }) + ")" + place,
  93232. position3,
  93233. "mdast-util-mdx-jsx:end-tag-mismatch"
  93234. );
  93235. }
  93236. function onErrorLeftIsTag(a, b) {
  93237. const tag = (
  93238. /** @type {Tag} */
  93239. this.getData("mdxJsxTag")
  93240. );
  93241. throw new VFileMessage(
  93242. "Expected the closing tag `" + serializeAbbreviatedTag(tag) + "` either after the end of `" + b.type + "` (" + stringifyPosition(b.end) + ") or another opening tag after the start of `" + b.type + "` (" + stringifyPosition(b.start) + ")",
  93243. { start: a.start, end: a.end },
  93244. "mdast-util-mdx-jsx:end-tag-mismatch"
  93245. );
  93246. }
  93247. function serializeAbbreviatedTag(tag) {
  93248. return "<" + (tag.close ? "/" : "") + (tag.name || "") + ">";
  93249. }
  93250. }
  93251. function mdxJsxToMarkdown(options) {
  93252. const options_ = options || {};
  93253. const quote = options_.quote || '"';
  93254. const quoteSmart = options_.quoteSmart || false;
  93255. const tightSelfClosing = options_.tightSelfClosing || false;
  93256. const printWidth = options_.printWidth || Number.POSITIVE_INFINITY;
  93257. const alternative = quote === '"' ? "'" : '"';
  93258. if (quote !== '"' && quote !== "'") {
  93259. throw new Error(
  93260. "Cannot serialize attribute values with `" + quote + "` for `options.quote`, expected `\"`, or `'`"
  93261. );
  93262. }
  93263. mdxElement.peek = peekElement;
  93264. return {
  93265. handlers: {
  93266. mdxJsxFlowElement: mdxElement,
  93267. mdxJsxTextElement: mdxElement
  93268. },
  93269. unsafe: [
  93270. { character: "<", inConstruct: ["phrasing"] },
  93271. { atBreak: true, character: "<" }
  93272. ],
  93273. // Always generate fenced code (never indented code).
  93274. fences: true,
  93275. // Always generate links with resources (never autolinks).
  93276. resourceLink: true
  93277. };
  93278. function mdxElement(node2, _, context, safeOptions) {
  93279. const tracker = track(safeOptions);
  93280. const selfClosing = node2.name && (!node2.children || node2.children.length === 0);
  93281. const exit2 = context.enter(node2.type);
  93282. let index2 = -1;
  93283. const serializedAttributes = [];
  93284. let value2 = tracker.move("<" + (node2.name || ""));
  93285. if (node2.attributes && node2.attributes.length > 0) {
  93286. if (!node2.name) {
  93287. throw new Error("Cannot serialize fragment w/ attributes");
  93288. }
  93289. while (++index2 < node2.attributes.length) {
  93290. const attribute = node2.attributes[index2];
  93291. let result;
  93292. if (attribute.type === "mdxJsxExpressionAttribute") {
  93293. result = "{" + (attribute.value || "") + "}";
  93294. } else {
  93295. if (!attribute.name) {
  93296. throw new Error("Cannot serialize attribute w/o name");
  93297. }
  93298. const value3 = attribute.value;
  93299. const left = attribute.name;
  93300. let right = "";
  93301. if (value3 === void 0 || value3 === null) {
  93302. } else if (typeof value3 === "object") {
  93303. right = "{" + (value3.value || "") + "}";
  93304. } else {
  93305. const appliedQuote = quoteSmart && ccount(value3, quote) > ccount(value3, alternative) ? alternative : quote;
  93306. right = appliedQuote + stringifyEntitiesLight(value3, { subset: [appliedQuote] }) + appliedQuote;
  93307. }
  93308. result = left + (right ? "=" : "") + right;
  93309. }
  93310. serializedAttributes.push(result);
  93311. }
  93312. }
  93313. let attributesOnTheirOwnLine = false;
  93314. const attributesOnOneLine = serializedAttributes.join(" ");
  93315. if (
  93316. // Block:
  93317. node2.type === "mdxJsxFlowElement" && // Including a line ending (expressions).
  93318. (/\r?\n|\r/.test(attributesOnOneLine) || // Current position (including `<tag`).
  93319. tracker.current().now.column + // -1 because columns, +1 for ` ` before attributes.
  93320. // Attributes joined by spaces.
  93321. attributesOnOneLine.length + // ` />`.
  93322. (selfClosing ? tightSelfClosing ? 2 : 3 : 1) > printWidth)
  93323. ) {
  93324. attributesOnTheirOwnLine = true;
  93325. }
  93326. if (attributesOnTheirOwnLine) {
  93327. value2 += tracker.move(
  93328. "\n" + indentLines(serializedAttributes.join("\n"), map)
  93329. );
  93330. } else if (attributesOnOneLine) {
  93331. value2 += tracker.move(" " + attributesOnOneLine);
  93332. }
  93333. if (attributesOnTheirOwnLine) {
  93334. value2 += tracker.move("\n");
  93335. }
  93336. if (selfClosing) {
  93337. value2 += tracker.move(
  93338. (tightSelfClosing || attributesOnTheirOwnLine ? "" : " ") + "/"
  93339. );
  93340. }
  93341. value2 += tracker.move(">");
  93342. if (node2.children && node2.children.length > 0) {
  93343. if (node2.type === "mdxJsxFlowElement") {
  93344. tracker.shift(2);
  93345. value2 += tracker.move("\n");
  93346. value2 += tracker.move(
  93347. indentLines(containerFlow(node2, context, tracker.current()), map)
  93348. );
  93349. value2 += tracker.move("\n");
  93350. } else {
  93351. value2 += tracker.move(
  93352. containerPhrasing(node2, context, {
  93353. ...tracker.current(),
  93354. before: "<",
  93355. after: ">"
  93356. })
  93357. );
  93358. }
  93359. }
  93360. if (!selfClosing) {
  93361. value2 += tracker.move("</" + (node2.name || "") + ">");
  93362. }
  93363. exit2();
  93364. return value2;
  93365. }
  93366. function map(line2, _, blank) {
  93367. return (blank ? "" : " ") + line2;
  93368. }
  93369. function peekElement() {
  93370. return "<";
  93371. }
  93372. }
  93373. // node_modules/mdast-util-mdxjs-esm/lib/index.js
  93374. var mdxjsEsmFromMarkdown = {
  93375. enter: { mdxjsEsm: enterMdxjsEsm },
  93376. exit: { mdxjsEsm: exitMdxjsEsm, mdxjsEsmData: exitMdxjsEsmData }
  93377. };
  93378. var mdxjsEsmToMarkdown = { handlers: { mdxjsEsm: handleMdxjsEsm } };
  93379. function enterMdxjsEsm(token2) {
  93380. this.enter({ type: "mdxjsEsm", value: "" }, token2);
  93381. this.buffer();
  93382. }
  93383. function exitMdxjsEsm(token2) {
  93384. const value2 = this.resume();
  93385. const node2 = (
  93386. /** @type {MdxjsEsm} */
  93387. this.exit(token2)
  93388. );
  93389. const estree = token2.estree;
  93390. node2.value = value2;
  93391. if (estree) {
  93392. node2.data = { estree };
  93393. }
  93394. }
  93395. function exitMdxjsEsmData(token2) {
  93396. this.config.enter.data.call(this, token2);
  93397. this.config.exit.data.call(this, token2);
  93398. }
  93399. function handleMdxjsEsm(node2) {
  93400. return node2.value || "";
  93401. }
  93402. // node_modules/mdast-util-mdx/index.js
  93403. function mdxFromMarkdown() {
  93404. return [mdxExpressionFromMarkdown, mdxJsxFromMarkdown(), mdxjsEsmFromMarkdown];
  93405. }
  93406. function mdxToMarkdown(options) {
  93407. return {
  93408. extensions: [
  93409. mdxExpressionToMarkdown,
  93410. mdxJsxToMarkdown(options),
  93411. mdxjsEsmToMarkdown
  93412. ]
  93413. };
  93414. }
  93415. // node_modules/remark-mdx/index.js
  93416. function remarkMdx(options) {
  93417. const data3 = this.data();
  93418. add("micromarkExtensions", mdxjs(options));
  93419. add("fromMarkdownExtensions", mdxFromMarkdown());
  93420. add("toMarkdownExtensions", mdxToMarkdown(options));
  93421. function add(field, value2) {
  93422. const list3 = (
  93423. /** @type {Array<unknown>} */
  93424. // Other extensions
  93425. /* c8 ignore next 2 */
  93426. data3[field] ? data3[field] : data3[field] = []
  93427. );
  93428. list3.push(value2);
  93429. }
  93430. }
  93431. // node_modules/mdast-util-to-string/lib/index.js
  93432. var emptyOptions = {};
  93433. function toString3(value2, options) {
  93434. const settings = options || emptyOptions;
  93435. const includeImageAlt = typeof settings.includeImageAlt === "boolean" ? settings.includeImageAlt : true;
  93436. const includeHtml = typeof settings.includeHtml === "boolean" ? settings.includeHtml : true;
  93437. return one(value2, includeImageAlt, includeHtml);
  93438. }
  93439. function one(value2, includeImageAlt, includeHtml) {
  93440. if (node(value2)) {
  93441. if ("value" in value2) {
  93442. return value2.type === "html" && !includeHtml ? "" : value2.value;
  93443. }
  93444. if (includeImageAlt && "alt" in value2 && value2.alt) {
  93445. return value2.alt;
  93446. }
  93447. if ("children" in value2) {
  93448. return all(value2.children, includeImageAlt, includeHtml);
  93449. }
  93450. }
  93451. if (Array.isArray(value2)) {
  93452. return all(value2, includeImageAlt, includeHtml);
  93453. }
  93454. return "";
  93455. }
  93456. function all(values, includeImageAlt, includeHtml) {
  93457. const result = [];
  93458. let index2 = -1;
  93459. while (++index2 < values.length) {
  93460. result[index2] = one(values[index2], includeImageAlt, includeHtml);
  93461. }
  93462. return result.join("");
  93463. }
  93464. function node(value2) {
  93465. return Boolean(value2 && typeof value2 === "object");
  93466. }
  93467. // node_modules/micromark/lib/initialize/content.js
  93468. var content2 = {
  93469. tokenize: initializeContent
  93470. };
  93471. function initializeContent(effects) {
  93472. const contentStart = effects.attempt(
  93473. this.parser.constructs.contentInitial,
  93474. afterContentStartConstruct,
  93475. paragraphInitial
  93476. );
  93477. let previous2;
  93478. return contentStart;
  93479. function afterContentStartConstruct(code2) {
  93480. if (code2 === null) {
  93481. effects.consume(code2);
  93482. return;
  93483. }
  93484. effects.enter("lineEnding");
  93485. effects.consume(code2);
  93486. effects.exit("lineEnding");
  93487. return factorySpace(effects, contentStart, "linePrefix");
  93488. }
  93489. function paragraphInitial(code2) {
  93490. effects.enter("paragraph");
  93491. return lineStart(code2);
  93492. }
  93493. function lineStart(code2) {
  93494. const token2 = effects.enter("chunkText", {
  93495. contentType: "text",
  93496. previous: previous2
  93497. });
  93498. if (previous2) {
  93499. previous2.next = token2;
  93500. }
  93501. previous2 = token2;
  93502. return data3(code2);
  93503. }
  93504. function data3(code2) {
  93505. if (code2 === null) {
  93506. effects.exit("chunkText");
  93507. effects.exit("paragraph");
  93508. effects.consume(code2);
  93509. return;
  93510. }
  93511. if (markdownLineEnding(code2)) {
  93512. effects.consume(code2);
  93513. effects.exit("chunkText");
  93514. return lineStart;
  93515. }
  93516. effects.consume(code2);
  93517. return data3;
  93518. }
  93519. }
  93520. // node_modules/micromark/lib/initialize/document.js
  93521. var document2 = {
  93522. tokenize: initializeDocument
  93523. };
  93524. var containerConstruct = {
  93525. tokenize: tokenizeContainer
  93526. };
  93527. function initializeDocument(effects) {
  93528. const self2 = this;
  93529. const stack2 = [];
  93530. let continued = 0;
  93531. let childFlow;
  93532. let childToken;
  93533. let lineStartOffset;
  93534. return start3;
  93535. function start3(code2) {
  93536. if (continued < stack2.length) {
  93537. const item = stack2[continued];
  93538. self2.containerState = item[1];
  93539. return effects.attempt(
  93540. item[0].continuation,
  93541. documentContinue,
  93542. checkNewContainers
  93543. )(code2);
  93544. }
  93545. return checkNewContainers(code2);
  93546. }
  93547. function documentContinue(code2) {
  93548. continued++;
  93549. if (self2.containerState._closeFlow) {
  93550. self2.containerState._closeFlow = void 0;
  93551. if (childFlow) {
  93552. closeFlow();
  93553. }
  93554. const indexBeforeExits = self2.events.length;
  93555. let indexBeforeFlow = indexBeforeExits;
  93556. let point4;
  93557. while (indexBeforeFlow--) {
  93558. if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
  93559. point4 = self2.events[indexBeforeFlow][1].end;
  93560. break;
  93561. }
  93562. }
  93563. exitContainers(continued);
  93564. let index2 = indexBeforeExits;
  93565. while (index2 < self2.events.length) {
  93566. self2.events[index2][1].end = Object.assign({}, point4);
  93567. index2++;
  93568. }
  93569. splice(
  93570. self2.events,
  93571. indexBeforeFlow + 1,
  93572. 0,
  93573. self2.events.slice(indexBeforeExits)
  93574. );
  93575. self2.events.length = index2;
  93576. return checkNewContainers(code2);
  93577. }
  93578. return start3(code2);
  93579. }
  93580. function checkNewContainers(code2) {
  93581. if (continued === stack2.length) {
  93582. if (!childFlow) {
  93583. return documentContinued(code2);
  93584. }
  93585. if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {
  93586. return flowStart(code2);
  93587. }
  93588. self2.interrupt = Boolean(
  93589. childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack
  93590. );
  93591. }
  93592. self2.containerState = {};
  93593. return effects.check(
  93594. containerConstruct,
  93595. thereIsANewContainer,
  93596. thereIsNoNewContainer
  93597. )(code2);
  93598. }
  93599. function thereIsANewContainer(code2) {
  93600. if (childFlow)
  93601. closeFlow();
  93602. exitContainers(continued);
  93603. return documentContinued(code2);
  93604. }
  93605. function thereIsNoNewContainer(code2) {
  93606. self2.parser.lazy[self2.now().line] = continued !== stack2.length;
  93607. lineStartOffset = self2.now().offset;
  93608. return flowStart(code2);
  93609. }
  93610. function documentContinued(code2) {
  93611. self2.containerState = {};
  93612. return effects.attempt(
  93613. containerConstruct,
  93614. containerContinue,
  93615. flowStart
  93616. )(code2);
  93617. }
  93618. function containerContinue(code2) {
  93619. continued++;
  93620. stack2.push([self2.currentConstruct, self2.containerState]);
  93621. return documentContinued(code2);
  93622. }
  93623. function flowStart(code2) {
  93624. if (code2 === null) {
  93625. if (childFlow)
  93626. closeFlow();
  93627. exitContainers(0);
  93628. effects.consume(code2);
  93629. return;
  93630. }
  93631. childFlow = childFlow || self2.parser.flow(self2.now());
  93632. effects.enter("chunkFlow", {
  93633. contentType: "flow",
  93634. previous: childToken,
  93635. _tokenizer: childFlow
  93636. });
  93637. return flowContinue(code2);
  93638. }
  93639. function flowContinue(code2) {
  93640. if (code2 === null) {
  93641. writeToChild(effects.exit("chunkFlow"), true);
  93642. exitContainers(0);
  93643. effects.consume(code2);
  93644. return;
  93645. }
  93646. if (markdownLineEnding(code2)) {
  93647. effects.consume(code2);
  93648. writeToChild(effects.exit("chunkFlow"));
  93649. continued = 0;
  93650. self2.interrupt = void 0;
  93651. return start3;
  93652. }
  93653. effects.consume(code2);
  93654. return flowContinue;
  93655. }
  93656. function writeToChild(token2, eof) {
  93657. const stream = self2.sliceStream(token2);
  93658. if (eof)
  93659. stream.push(null);
  93660. token2.previous = childToken;
  93661. if (childToken)
  93662. childToken.next = token2;
  93663. childToken = token2;
  93664. childFlow.defineSkip(token2.start);
  93665. childFlow.write(stream);
  93666. if (self2.parser.lazy[token2.start.line]) {
  93667. let index2 = childFlow.events.length;
  93668. while (index2--) {
  93669. if (
  93670. // The token starts before the line ending…
  93671. childFlow.events[index2][1].start.offset < lineStartOffset && // …and either is not ended yet…
  93672. (!childFlow.events[index2][1].end || // …or ends after it.
  93673. childFlow.events[index2][1].end.offset > lineStartOffset)
  93674. ) {
  93675. return;
  93676. }
  93677. }
  93678. const indexBeforeExits = self2.events.length;
  93679. let indexBeforeFlow = indexBeforeExits;
  93680. let seen;
  93681. let point4;
  93682. while (indexBeforeFlow--) {
  93683. if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
  93684. if (seen) {
  93685. point4 = self2.events[indexBeforeFlow][1].end;
  93686. break;
  93687. }
  93688. seen = true;
  93689. }
  93690. }
  93691. exitContainers(continued);
  93692. index2 = indexBeforeExits;
  93693. while (index2 < self2.events.length) {
  93694. self2.events[index2][1].end = Object.assign({}, point4);
  93695. index2++;
  93696. }
  93697. splice(
  93698. self2.events,
  93699. indexBeforeFlow + 1,
  93700. 0,
  93701. self2.events.slice(indexBeforeExits)
  93702. );
  93703. self2.events.length = index2;
  93704. }
  93705. }
  93706. function exitContainers(size) {
  93707. let index2 = stack2.length;
  93708. while (index2-- > size) {
  93709. const entry = stack2[index2];
  93710. self2.containerState = entry[1];
  93711. entry[0].exit.call(self2, effects);
  93712. }
  93713. stack2.length = size;
  93714. }
  93715. function closeFlow() {
  93716. childFlow.write([null]);
  93717. childToken = void 0;
  93718. childFlow = void 0;
  93719. self2.containerState._closeFlow = void 0;
  93720. }
  93721. }
  93722. function tokenizeContainer(effects, ok2, nok) {
  93723. return factorySpace(
  93724. effects,
  93725. effects.attempt(this.parser.constructs.document, ok2, nok),
  93726. "linePrefix",
  93727. this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  93728. );
  93729. }
  93730. // node_modules/micromark/lib/initialize/flow.js
  93731. var flow = {
  93732. tokenize: initializeFlow
  93733. };
  93734. function initializeFlow(effects) {
  93735. const self2 = this;
  93736. const initial = effects.attempt(
  93737. // Try to parse a blank line.
  93738. blankLine,
  93739. atBlankEnding,
  93740. // Try to parse initial flow (essentially, only code).
  93741. effects.attempt(
  93742. this.parser.constructs.flowInitial,
  93743. afterConstruct,
  93744. factorySpace(
  93745. effects,
  93746. effects.attempt(
  93747. this.parser.constructs.flow,
  93748. afterConstruct,
  93749. effects.attempt(content, afterConstruct)
  93750. ),
  93751. "linePrefix"
  93752. )
  93753. )
  93754. );
  93755. return initial;
  93756. function atBlankEnding(code2) {
  93757. if (code2 === null) {
  93758. effects.consume(code2);
  93759. return;
  93760. }
  93761. effects.enter("lineEndingBlank");
  93762. effects.consume(code2);
  93763. effects.exit("lineEndingBlank");
  93764. self2.currentConstruct = void 0;
  93765. return initial;
  93766. }
  93767. function afterConstruct(code2) {
  93768. if (code2 === null) {
  93769. effects.consume(code2);
  93770. return;
  93771. }
  93772. effects.enter("lineEnding");
  93773. effects.consume(code2);
  93774. effects.exit("lineEnding");
  93775. self2.currentConstruct = void 0;
  93776. return initial;
  93777. }
  93778. }
  93779. // node_modules/micromark/lib/initialize/text.js
  93780. var resolver = {
  93781. resolveAll: createResolver()
  93782. };
  93783. var string = initializeFactory("string");
  93784. var text = initializeFactory("text");
  93785. function initializeFactory(field) {
  93786. return {
  93787. tokenize: initializeText,
  93788. resolveAll: createResolver(
  93789. field === "text" ? resolveAllLineSuffixes : void 0
  93790. )
  93791. };
  93792. function initializeText(effects) {
  93793. const self2 = this;
  93794. const constructs2 = this.parser.constructs[field];
  93795. const text5 = effects.attempt(constructs2, start3, notText);
  93796. return start3;
  93797. function start3(code2) {
  93798. return atBreak(code2) ? text5(code2) : notText(code2);
  93799. }
  93800. function notText(code2) {
  93801. if (code2 === null) {
  93802. effects.consume(code2);
  93803. return;
  93804. }
  93805. effects.enter("data");
  93806. effects.consume(code2);
  93807. return data3;
  93808. }
  93809. function data3(code2) {
  93810. if (atBreak(code2)) {
  93811. effects.exit("data");
  93812. return text5(code2);
  93813. }
  93814. effects.consume(code2);
  93815. return data3;
  93816. }
  93817. function atBreak(code2) {
  93818. if (code2 === null) {
  93819. return true;
  93820. }
  93821. const list3 = constructs2[code2];
  93822. let index2 = -1;
  93823. if (list3) {
  93824. while (++index2 < list3.length) {
  93825. const item = list3[index2];
  93826. if (!item.previous || item.previous.call(self2, self2.previous)) {
  93827. return true;
  93828. }
  93829. }
  93830. }
  93831. return false;
  93832. }
  93833. }
  93834. }
  93835. function createResolver(extraResolver) {
  93836. return resolveAllText;
  93837. function resolveAllText(events, context) {
  93838. let index2 = -1;
  93839. let enter;
  93840. while (++index2 <= events.length) {
  93841. if (enter === void 0) {
  93842. if (events[index2] && events[index2][1].type === "data") {
  93843. enter = index2;
  93844. index2++;
  93845. }
  93846. } else if (!events[index2] || events[index2][1].type !== "data") {
  93847. if (index2 !== enter + 2) {
  93848. events[enter][1].end = events[index2 - 1][1].end;
  93849. events.splice(enter + 2, index2 - enter - 2);
  93850. index2 = enter + 2;
  93851. }
  93852. enter = void 0;
  93853. }
  93854. }
  93855. return extraResolver ? extraResolver(events, context) : events;
  93856. }
  93857. }
  93858. function resolveAllLineSuffixes(events, context) {
  93859. let eventIndex = 0;
  93860. while (++eventIndex <= events.length) {
  93861. if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
  93862. const data3 = events[eventIndex - 1][1];
  93863. const chunks = context.sliceStream(data3);
  93864. let index2 = chunks.length;
  93865. let bufferIndex = -1;
  93866. let size = 0;
  93867. let tabs;
  93868. while (index2--) {
  93869. const chunk = chunks[index2];
  93870. if (typeof chunk === "string") {
  93871. bufferIndex = chunk.length;
  93872. while (chunk.charCodeAt(bufferIndex - 1) === 32) {
  93873. size++;
  93874. bufferIndex--;
  93875. }
  93876. if (bufferIndex)
  93877. break;
  93878. bufferIndex = -1;
  93879. } else if (chunk === -2) {
  93880. tabs = true;
  93881. size++;
  93882. } else if (chunk === -1) {
  93883. } else {
  93884. index2++;
  93885. break;
  93886. }
  93887. }
  93888. if (size) {
  93889. const token2 = {
  93890. type: eventIndex === events.length || tabs || size < 2 ? "lineSuffix" : "hardBreakTrailing",
  93891. start: {
  93892. line: data3.end.line,
  93893. column: data3.end.column - size,
  93894. offset: data3.end.offset - size,
  93895. _index: data3.start._index + index2,
  93896. _bufferIndex: index2 ? bufferIndex : data3.start._bufferIndex + bufferIndex
  93897. },
  93898. end: Object.assign({}, data3.end)
  93899. };
  93900. data3.end = Object.assign({}, token2.start);
  93901. if (data3.start.offset === data3.end.offset) {
  93902. Object.assign(data3, token2);
  93903. } else {
  93904. events.splice(
  93905. eventIndex,
  93906. 0,
  93907. ["enter", token2, context],
  93908. ["exit", token2, context]
  93909. );
  93910. eventIndex += 2;
  93911. }
  93912. }
  93913. eventIndex++;
  93914. }
  93915. }
  93916. return events;
  93917. }
  93918. // node_modules/micromark/lib/create-tokenizer.js
  93919. function createTokenizer(parser, initialize, from) {
  93920. let point4 = Object.assign(
  93921. from ? Object.assign({}, from) : {
  93922. line: 1,
  93923. column: 1,
  93924. offset: 0
  93925. },
  93926. {
  93927. _index: 0,
  93928. _bufferIndex: -1
  93929. }
  93930. );
  93931. const columnStart = {};
  93932. const resolveAllConstructs = [];
  93933. let chunks = [];
  93934. let stack2 = [];
  93935. let consumed = true;
  93936. const effects = {
  93937. consume,
  93938. enter,
  93939. exit: exit2,
  93940. attempt: constructFactory(onsuccessfulconstruct),
  93941. check: constructFactory(onsuccessfulcheck),
  93942. interrupt: constructFactory(onsuccessfulcheck, {
  93943. interrupt: true
  93944. })
  93945. };
  93946. const context = {
  93947. previous: null,
  93948. code: null,
  93949. containerState: {},
  93950. events: [],
  93951. parser,
  93952. sliceStream,
  93953. sliceSerialize,
  93954. now,
  93955. defineSkip,
  93956. write
  93957. };
  93958. let state = initialize.tokenize.call(context, effects);
  93959. let expectedCode;
  93960. if (initialize.resolveAll) {
  93961. resolveAllConstructs.push(initialize);
  93962. }
  93963. return context;
  93964. function write(slice2) {
  93965. chunks = push(chunks, slice2);
  93966. main();
  93967. if (chunks[chunks.length - 1] !== null) {
  93968. return [];
  93969. }
  93970. addResult(initialize, 0);
  93971. context.events = resolveAll(resolveAllConstructs, context.events, context);
  93972. return context.events;
  93973. }
  93974. function sliceSerialize(token2, expandTabs) {
  93975. return serializeChunks(sliceStream(token2), expandTabs);
  93976. }
  93977. function sliceStream(token2) {
  93978. return sliceChunks(chunks, token2);
  93979. }
  93980. function now() {
  93981. return Object.assign({}, point4);
  93982. }
  93983. function defineSkip(value2) {
  93984. columnStart[value2.line] = value2.column;
  93985. accountForPotentialSkip();
  93986. }
  93987. function main() {
  93988. let chunkIndex;
  93989. while (point4._index < chunks.length) {
  93990. const chunk = chunks[point4._index];
  93991. if (typeof chunk === "string") {
  93992. chunkIndex = point4._index;
  93993. if (point4._bufferIndex < 0) {
  93994. point4._bufferIndex = 0;
  93995. }
  93996. while (point4._index === chunkIndex && point4._bufferIndex < chunk.length) {
  93997. go(chunk.charCodeAt(point4._bufferIndex));
  93998. }
  93999. } else {
  94000. go(chunk);
  94001. }
  94002. }
  94003. }
  94004. function go(code2) {
  94005. consumed = void 0;
  94006. expectedCode = code2;
  94007. state = state(code2);
  94008. }
  94009. function consume(code2) {
  94010. if (markdownLineEnding(code2)) {
  94011. point4.line++;
  94012. point4.column = 1;
  94013. point4.offset += code2 === -3 ? 2 : 1;
  94014. accountForPotentialSkip();
  94015. } else if (code2 !== -1) {
  94016. point4.column++;
  94017. point4.offset++;
  94018. }
  94019. if (point4._bufferIndex < 0) {
  94020. point4._index++;
  94021. } else {
  94022. point4._bufferIndex++;
  94023. if (point4._bufferIndex === chunks[point4._index].length) {
  94024. point4._bufferIndex = -1;
  94025. point4._index++;
  94026. }
  94027. }
  94028. context.previous = code2;
  94029. consumed = true;
  94030. }
  94031. function enter(type, fields) {
  94032. const token2 = fields || {};
  94033. token2.type = type;
  94034. token2.start = now();
  94035. context.events.push(["enter", token2, context]);
  94036. stack2.push(token2);
  94037. return token2;
  94038. }
  94039. function exit2(type) {
  94040. const token2 = stack2.pop();
  94041. token2.end = now();
  94042. context.events.push(["exit", token2, context]);
  94043. return token2;
  94044. }
  94045. function onsuccessfulconstruct(construct, info) {
  94046. addResult(construct, info.from);
  94047. }
  94048. function onsuccessfulcheck(_, info) {
  94049. info.restore();
  94050. }
  94051. function constructFactory(onreturn, fields) {
  94052. return hook;
  94053. function hook(constructs2, returnState, bogusState) {
  94054. let listOfConstructs;
  94055. let constructIndex;
  94056. let currentConstruct;
  94057. let info;
  94058. return Array.isArray(constructs2) ? (
  94059. /* c8 ignore next 1 */
  94060. handleListOfConstructs(constructs2)
  94061. ) : "tokenize" in constructs2 ? handleListOfConstructs([constructs2]) : handleMapOfConstructs(constructs2);
  94062. function handleMapOfConstructs(map) {
  94063. return start3;
  94064. function start3(code2) {
  94065. const def = code2 !== null && map[code2];
  94066. const all4 = code2 !== null && map.null;
  94067. const list3 = [
  94068. // To do: add more extension tests.
  94069. /* c8 ignore next 2 */
  94070. ...Array.isArray(def) ? def : def ? [def] : [],
  94071. ...Array.isArray(all4) ? all4 : all4 ? [all4] : []
  94072. ];
  94073. return handleListOfConstructs(list3)(code2);
  94074. }
  94075. }
  94076. function handleListOfConstructs(list3) {
  94077. listOfConstructs = list3;
  94078. constructIndex = 0;
  94079. if (list3.length === 0) {
  94080. return bogusState;
  94081. }
  94082. return handleConstruct(list3[constructIndex]);
  94083. }
  94084. function handleConstruct(construct) {
  94085. return start3;
  94086. function start3(code2) {
  94087. info = store();
  94088. currentConstruct = construct;
  94089. if (!construct.partial) {
  94090. context.currentConstruct = construct;
  94091. }
  94092. if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) {
  94093. return nok(code2);
  94094. }
  94095. return construct.tokenize.call(
  94096. // If we do have fields, create an object w/ `context` as its
  94097. // prototype.
  94098. // This allows a “live binding”, which is needed for `interrupt`.
  94099. fields ? Object.assign(Object.create(context), fields) : context,
  94100. effects,
  94101. ok2,
  94102. nok
  94103. )(code2);
  94104. }
  94105. }
  94106. function ok2(code2) {
  94107. consumed = true;
  94108. onreturn(currentConstruct, info);
  94109. return returnState;
  94110. }
  94111. function nok(code2) {
  94112. consumed = true;
  94113. info.restore();
  94114. if (++constructIndex < listOfConstructs.length) {
  94115. return handleConstruct(listOfConstructs[constructIndex]);
  94116. }
  94117. return bogusState;
  94118. }
  94119. }
  94120. }
  94121. function addResult(construct, from2) {
  94122. if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {
  94123. resolveAllConstructs.push(construct);
  94124. }
  94125. if (construct.resolve) {
  94126. splice(
  94127. context.events,
  94128. from2,
  94129. context.events.length - from2,
  94130. construct.resolve(context.events.slice(from2), context)
  94131. );
  94132. }
  94133. if (construct.resolveTo) {
  94134. context.events = construct.resolveTo(context.events, context);
  94135. }
  94136. }
  94137. function store() {
  94138. const startPoint = now();
  94139. const startPrevious = context.previous;
  94140. const startCurrentConstruct = context.currentConstruct;
  94141. const startEventsIndex = context.events.length;
  94142. const startStack = Array.from(stack2);
  94143. return {
  94144. restore,
  94145. from: startEventsIndex
  94146. };
  94147. function restore() {
  94148. point4 = startPoint;
  94149. context.previous = startPrevious;
  94150. context.currentConstruct = startCurrentConstruct;
  94151. context.events.length = startEventsIndex;
  94152. stack2 = startStack;
  94153. accountForPotentialSkip();
  94154. }
  94155. }
  94156. function accountForPotentialSkip() {
  94157. if (point4.line in columnStart && point4.column < 2) {
  94158. point4.column = columnStart[point4.line];
  94159. point4.offset += columnStart[point4.line] - 1;
  94160. }
  94161. }
  94162. }
  94163. function sliceChunks(chunks, token2) {
  94164. const startIndex = token2.start._index;
  94165. const startBufferIndex = token2.start._bufferIndex;
  94166. const endIndex = token2.end._index;
  94167. const endBufferIndex = token2.end._bufferIndex;
  94168. let view;
  94169. if (startIndex === endIndex) {
  94170. view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];
  94171. } else {
  94172. view = chunks.slice(startIndex, endIndex);
  94173. if (startBufferIndex > -1) {
  94174. view[0] = view[0].slice(startBufferIndex);
  94175. }
  94176. if (endBufferIndex > 0) {
  94177. view.push(chunks[endIndex].slice(0, endBufferIndex));
  94178. }
  94179. }
  94180. return view;
  94181. }
  94182. function serializeChunks(chunks, expandTabs) {
  94183. let index2 = -1;
  94184. const result = [];
  94185. let atTab;
  94186. while (++index2 < chunks.length) {
  94187. const chunk = chunks[index2];
  94188. let value2;
  94189. if (typeof chunk === "string") {
  94190. value2 = chunk;
  94191. } else
  94192. switch (chunk) {
  94193. case -5: {
  94194. value2 = "\r";
  94195. break;
  94196. }
  94197. case -4: {
  94198. value2 = "\n";
  94199. break;
  94200. }
  94201. case -3: {
  94202. value2 = "\r\n";
  94203. break;
  94204. }
  94205. case -2: {
  94206. value2 = expandTabs ? " " : " ";
  94207. break;
  94208. }
  94209. case -1: {
  94210. if (!expandTabs && atTab)
  94211. continue;
  94212. value2 = " ";
  94213. break;
  94214. }
  94215. default: {
  94216. value2 = String.fromCharCode(chunk);
  94217. }
  94218. }
  94219. atTab = chunk === -2;
  94220. result.push(value2);
  94221. }
  94222. return result.join("");
  94223. }
  94224. // node_modules/micromark/lib/constructs.js
  94225. var constructs_exports = {};
  94226. __export(constructs_exports, {
  94227. attentionMarkers: () => attentionMarkers,
  94228. contentInitial: () => contentInitial,
  94229. disable: () => disable,
  94230. document: () => document3,
  94231. flow: () => flow2,
  94232. flowInitial: () => flowInitial,
  94233. insideSpan: () => insideSpan,
  94234. string: () => string2,
  94235. text: () => text2
  94236. });
  94237. var document3 = {
  94238. [42]: list,
  94239. [43]: list,
  94240. [45]: list,
  94241. [48]: list,
  94242. [49]: list,
  94243. [50]: list,
  94244. [51]: list,
  94245. [52]: list,
  94246. [53]: list,
  94247. [54]: list,
  94248. [55]: list,
  94249. [56]: list,
  94250. [57]: list,
  94251. [62]: blockQuote
  94252. };
  94253. var contentInitial = {
  94254. [91]: definition
  94255. };
  94256. var flowInitial = {
  94257. [-2]: codeIndented,
  94258. [-1]: codeIndented,
  94259. [32]: codeIndented
  94260. };
  94261. var flow2 = {
  94262. [35]: headingAtx,
  94263. [42]: thematicBreak,
  94264. [45]: [setextUnderline, thematicBreak],
  94265. [60]: htmlFlow,
  94266. [61]: setextUnderline,
  94267. [95]: thematicBreak,
  94268. [96]: codeFenced,
  94269. [126]: codeFenced
  94270. };
  94271. var string2 = {
  94272. [38]: characterReference,
  94273. [92]: characterEscape
  94274. };
  94275. var text2 = {
  94276. [-5]: lineEnding,
  94277. [-4]: lineEnding,
  94278. [-3]: lineEnding,
  94279. [33]: labelStartImage,
  94280. [38]: characterReference,
  94281. [42]: attention,
  94282. [60]: [autolink, htmlText],
  94283. [91]: labelStartLink,
  94284. [92]: [hardBreakEscape, characterEscape],
  94285. [93]: labelEnd,
  94286. [95]: attention,
  94287. [96]: codeText
  94288. };
  94289. var insideSpan = {
  94290. null: [attention, resolver]
  94291. };
  94292. var attentionMarkers = {
  94293. null: [42, 95]
  94294. };
  94295. var disable = {
  94296. null: []
  94297. };
  94298. // node_modules/micromark/lib/parse.js
  94299. function parse6(options = {}) {
  94300. const constructs2 = combineExtensions(
  94301. // @ts-expect-error Same as above.
  94302. [constructs_exports].concat(options.extensions || [])
  94303. );
  94304. const parser = {
  94305. defined: [],
  94306. lazy: {},
  94307. constructs: constructs2,
  94308. content: create4(content2),
  94309. document: create4(document2),
  94310. flow: create4(flow),
  94311. string: create4(string),
  94312. text: create4(text)
  94313. };
  94314. return parser;
  94315. function create4(initial) {
  94316. return creator;
  94317. function creator(from) {
  94318. return createTokenizer(parser, initial, from);
  94319. }
  94320. }
  94321. }
  94322. // node_modules/micromark/lib/preprocess.js
  94323. var search = /[\0\t\n\r]/g;
  94324. function preprocess() {
  94325. let column2 = 1;
  94326. let buffer3 = "";
  94327. let start3 = true;
  94328. let atCarriageReturn;
  94329. return preprocessor;
  94330. function preprocessor(value2, encoding, end) {
  94331. const chunks = [];
  94332. let match;
  94333. let next;
  94334. let startPosition;
  94335. let endPosition;
  94336. let code2;
  94337. value2 = buffer3 + value2.toString(encoding);
  94338. startPosition = 0;
  94339. buffer3 = "";
  94340. if (start3) {
  94341. if (value2.charCodeAt(0) === 65279) {
  94342. startPosition++;
  94343. }
  94344. start3 = void 0;
  94345. }
  94346. while (startPosition < value2.length) {
  94347. search.lastIndex = startPosition;
  94348. match = search.exec(value2);
  94349. endPosition = match && match.index !== void 0 ? match.index : value2.length;
  94350. code2 = value2.charCodeAt(endPosition);
  94351. if (!match) {
  94352. buffer3 = value2.slice(startPosition);
  94353. break;
  94354. }
  94355. if (code2 === 10 && startPosition === endPosition && atCarriageReturn) {
  94356. chunks.push(-3);
  94357. atCarriageReturn = void 0;
  94358. } else {
  94359. if (atCarriageReturn) {
  94360. chunks.push(-5);
  94361. atCarriageReturn = void 0;
  94362. }
  94363. if (startPosition < endPosition) {
  94364. chunks.push(value2.slice(startPosition, endPosition));
  94365. column2 += endPosition - startPosition;
  94366. }
  94367. switch (code2) {
  94368. case 0: {
  94369. chunks.push(65533);
  94370. column2++;
  94371. break;
  94372. }
  94373. case 9: {
  94374. next = Math.ceil(column2 / 4) * 4;
  94375. chunks.push(-2);
  94376. while (column2++ < next)
  94377. chunks.push(-1);
  94378. break;
  94379. }
  94380. case 10: {
  94381. chunks.push(-4);
  94382. column2 = 1;
  94383. break;
  94384. }
  94385. default: {
  94386. atCarriageReturn = true;
  94387. column2 = 1;
  94388. }
  94389. }
  94390. }
  94391. startPosition = endPosition + 1;
  94392. }
  94393. if (end) {
  94394. if (atCarriageReturn)
  94395. chunks.push(-5);
  94396. if (buffer3)
  94397. chunks.push(buffer3);
  94398. chunks.push(null);
  94399. }
  94400. return chunks;
  94401. }
  94402. }
  94403. // node_modules/micromark/lib/postprocess.js
  94404. function postprocess(events) {
  94405. while (!subtokenize(events)) {
  94406. }
  94407. return events;
  94408. }
  94409. // node_modules/micromark-util-decode-numeric-character-reference/index.js
  94410. function decodeNumericCharacterReference(value2, base2) {
  94411. const code2 = Number.parseInt(value2, base2);
  94412. if (
  94413. // C0 except for HT, LF, FF, CR, space
  94414. code2 < 9 || code2 === 11 || code2 > 13 && code2 < 32 || // Control character (DEL) of the basic block and C1 controls.
  94415. code2 > 126 && code2 < 160 || // Lone high surrogates and low surrogates.
  94416. code2 > 55295 && code2 < 57344 || // Noncharacters.
  94417. code2 > 64975 && code2 < 65008 || (code2 & 65535) === 65535 || (code2 & 65535) === 65534 || // Out of range
  94418. code2 > 1114111
  94419. ) {
  94420. return "\uFFFD";
  94421. }
  94422. return String.fromCharCode(code2);
  94423. }
  94424. // node_modules/micromark-util-decode-string/index.js
  94425. var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
  94426. function decodeString(value2) {
  94427. return value2.replace(characterEscapeOrReference, decode);
  94428. }
  94429. function decode($0, $1, $2) {
  94430. if ($1) {
  94431. return $1;
  94432. }
  94433. const head = $2.charCodeAt(0);
  94434. if (head === 35) {
  94435. const head2 = $2.charCodeAt(1);
  94436. const hex = head2 === 120 || head2 === 88;
  94437. return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);
  94438. }
  94439. return decodeNamedCharacterReference($2) || $0;
  94440. }
  94441. // node_modules/mdast-util-from-markdown/lib/index.js
  94442. var own4 = {}.hasOwnProperty;
  94443. var fromMarkdown = (
  94444. /**
  94445. * @type {(
  94446. * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &
  94447. * ((value: Value, options?: Options | null | undefined) => Root)
  94448. * )}
  94449. */
  94450. /**
  94451. * @param {Value} value
  94452. * @param {Encoding | Options | null | undefined} [encoding]
  94453. * @param {Options | null | undefined} [options]
  94454. * @returns {Root}
  94455. */
  94456. function(value2, encoding, options) {
  94457. if (typeof encoding !== "string") {
  94458. options = encoding;
  94459. encoding = void 0;
  94460. }
  94461. return compiler(options)(
  94462. postprocess(
  94463. // @ts-expect-error: micromark types need to accept `null`.
  94464. parse6(options).document().write(preprocess()(value2, encoding, true))
  94465. )
  94466. );
  94467. }
  94468. );
  94469. function compiler(options) {
  94470. const config = {
  94471. transforms: [],
  94472. canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
  94473. enter: {
  94474. autolink: opener(link2),
  94475. autolinkProtocol: onenterdata,
  94476. autolinkEmail: onenterdata,
  94477. atxHeading: opener(heading2),
  94478. blockQuote: opener(blockQuote2),
  94479. characterEscape: onenterdata,
  94480. characterReference: onenterdata,
  94481. codeFenced: opener(codeFlow),
  94482. codeFencedFenceInfo: buffer3,
  94483. codeFencedFenceMeta: buffer3,
  94484. codeIndented: opener(codeFlow, buffer3),
  94485. codeText: opener(codeText2, buffer3),
  94486. codeTextData: onenterdata,
  94487. data: onenterdata,
  94488. codeFlowValue: onenterdata,
  94489. definition: opener(definition2),
  94490. definitionDestinationString: buffer3,
  94491. definitionLabelString: buffer3,
  94492. definitionTitleString: buffer3,
  94493. emphasis: opener(emphasis2),
  94494. hardBreakEscape: opener(hardBreak2),
  94495. hardBreakTrailing: opener(hardBreak2),
  94496. htmlFlow: opener(html4, buffer3),
  94497. htmlFlowData: onenterdata,
  94498. htmlText: opener(html4, buffer3),
  94499. htmlTextData: onenterdata,
  94500. image: opener(image2),
  94501. label: buffer3,
  94502. link: opener(link2),
  94503. listItem: opener(listItem2),
  94504. listItemValue: onenterlistitemvalue,
  94505. listOrdered: opener(list3, onenterlistordered),
  94506. listUnordered: opener(list3),
  94507. paragraph: opener(paragraph2),
  94508. reference: onenterreference,
  94509. referenceString: buffer3,
  94510. resourceDestinationString: buffer3,
  94511. resourceTitleString: buffer3,
  94512. setextHeading: opener(heading2),
  94513. strong: opener(strong2),
  94514. thematicBreak: opener(thematicBreak3)
  94515. },
  94516. exit: {
  94517. atxHeading: closer(),
  94518. atxHeadingSequence: onexitatxheadingsequence,
  94519. autolink: closer(),
  94520. autolinkEmail: onexitautolinkemail,
  94521. autolinkProtocol: onexitautolinkprotocol,
  94522. blockQuote: closer(),
  94523. characterEscapeValue: onexitdata,
  94524. characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,
  94525. characterReferenceMarkerNumeric: onexitcharacterreferencemarker,
  94526. characterReferenceValue: onexitcharacterreferencevalue,
  94527. codeFenced: closer(onexitcodefenced),
  94528. codeFencedFence: onexitcodefencedfence,
  94529. codeFencedFenceInfo: onexitcodefencedfenceinfo,
  94530. codeFencedFenceMeta: onexitcodefencedfencemeta,
  94531. codeFlowValue: onexitdata,
  94532. codeIndented: closer(onexitcodeindented),
  94533. codeText: closer(onexitcodetext),
  94534. codeTextData: onexitdata,
  94535. data: onexitdata,
  94536. definition: closer(),
  94537. definitionDestinationString: onexitdefinitiondestinationstring,
  94538. definitionLabelString: onexitdefinitionlabelstring,
  94539. definitionTitleString: onexitdefinitiontitlestring,
  94540. emphasis: closer(),
  94541. hardBreakEscape: closer(onexithardbreak),
  94542. hardBreakTrailing: closer(onexithardbreak),
  94543. htmlFlow: closer(onexithtmlflow),
  94544. htmlFlowData: onexitdata,
  94545. htmlText: closer(onexithtmltext),
  94546. htmlTextData: onexitdata,
  94547. image: closer(onexitimage),
  94548. label: onexitlabel,
  94549. labelText: onexitlabeltext,
  94550. lineEnding: onexitlineending,
  94551. link: closer(onexitlink),
  94552. listItem: closer(),
  94553. listOrdered: closer(),
  94554. listUnordered: closer(),
  94555. paragraph: closer(),
  94556. referenceString: onexitreferencestring,
  94557. resourceDestinationString: onexitresourcedestinationstring,
  94558. resourceTitleString: onexitresourcetitlestring,
  94559. resource: onexitresource,
  94560. setextHeading: closer(onexitsetextheading),
  94561. setextHeadingLineSequence: onexitsetextheadinglinesequence,
  94562. setextHeadingText: onexitsetextheadingtext,
  94563. strong: closer(),
  94564. thematicBreak: closer()
  94565. }
  94566. };
  94567. configure(config, (options || {}).mdastExtensions || []);
  94568. const data3 = {};
  94569. return compile3;
  94570. function compile3(events) {
  94571. let tree = {
  94572. type: "root",
  94573. children: []
  94574. };
  94575. const context = {
  94576. stack: [tree],
  94577. tokenStack: [],
  94578. config,
  94579. enter,
  94580. exit: exit2,
  94581. buffer: buffer3,
  94582. resume,
  94583. setData,
  94584. getData
  94585. };
  94586. const listStack = [];
  94587. let index2 = -1;
  94588. while (++index2 < events.length) {
  94589. if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") {
  94590. if (events[index2][0] === "enter") {
  94591. listStack.push(index2);
  94592. } else {
  94593. const tail = listStack.pop();
  94594. index2 = prepareList(events, tail, index2);
  94595. }
  94596. }
  94597. }
  94598. index2 = -1;
  94599. while (++index2 < events.length) {
  94600. const handler = config[events[index2][0]];
  94601. if (own4.call(handler, events[index2][1].type)) {
  94602. handler[events[index2][1].type].call(
  94603. Object.assign(
  94604. {
  94605. sliceSerialize: events[index2][2].sliceSerialize
  94606. },
  94607. context
  94608. ),
  94609. events[index2][1]
  94610. );
  94611. }
  94612. }
  94613. if (context.tokenStack.length > 0) {
  94614. const tail = context.tokenStack[context.tokenStack.length - 1];
  94615. const handler = tail[1] || defaultOnError;
  94616. handler.call(context, void 0, tail[0]);
  94617. }
  94618. tree.position = {
  94619. start: point2(
  94620. events.length > 0 ? events[0][1].start : {
  94621. line: 1,
  94622. column: 1,
  94623. offset: 0
  94624. }
  94625. ),
  94626. end: point2(
  94627. events.length > 0 ? events[events.length - 2][1].end : {
  94628. line: 1,
  94629. column: 1,
  94630. offset: 0
  94631. }
  94632. )
  94633. };
  94634. index2 = -1;
  94635. while (++index2 < config.transforms.length) {
  94636. tree = config.transforms[index2](tree) || tree;
  94637. }
  94638. return tree;
  94639. }
  94640. function prepareList(events, start3, length) {
  94641. let index2 = start3 - 1;
  94642. let containerBalance = -1;
  94643. let listSpread = false;
  94644. let listItem3;
  94645. let lineIndex;
  94646. let firstBlankLineIndex;
  94647. let atMarker;
  94648. while (++index2 <= length) {
  94649. const event = events[index2];
  94650. if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") {
  94651. if (event[0] === "enter") {
  94652. containerBalance++;
  94653. } else {
  94654. containerBalance--;
  94655. }
  94656. atMarker = void 0;
  94657. } else if (event[1].type === "lineEndingBlank") {
  94658. if (event[0] === "enter") {
  94659. if (listItem3 && !atMarker && !containerBalance && !firstBlankLineIndex) {
  94660. firstBlankLineIndex = index2;
  94661. }
  94662. atMarker = void 0;
  94663. }
  94664. } else if (event[1].type === "linePrefix" || event[1].type === "listItemValue" || event[1].type === "listItemMarker" || event[1].type === "listItemPrefix" || event[1].type === "listItemPrefixWhitespace") {
  94665. } else {
  94666. atMarker = void 0;
  94667. }
  94668. if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) {
  94669. if (listItem3) {
  94670. let tailIndex = index2;
  94671. lineIndex = void 0;
  94672. while (tailIndex--) {
  94673. const tailEvent = events[tailIndex];
  94674. if (tailEvent[1].type === "lineEnding" || tailEvent[1].type === "lineEndingBlank") {
  94675. if (tailEvent[0] === "exit")
  94676. continue;
  94677. if (lineIndex) {
  94678. events[lineIndex][1].type = "lineEndingBlank";
  94679. listSpread = true;
  94680. }
  94681. tailEvent[1].type = "lineEnding";
  94682. lineIndex = tailIndex;
  94683. } else if (tailEvent[1].type === "linePrefix" || tailEvent[1].type === "blockQuotePrefix" || tailEvent[1].type === "blockQuotePrefixWhitespace" || tailEvent[1].type === "blockQuoteMarker" || tailEvent[1].type === "listItemIndent") {
  94684. } else {
  94685. break;
  94686. }
  94687. }
  94688. if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) {
  94689. listItem3._spread = true;
  94690. }
  94691. listItem3.end = Object.assign(
  94692. {},
  94693. lineIndex ? events[lineIndex][1].start : event[1].end
  94694. );
  94695. events.splice(lineIndex || index2, 0, ["exit", listItem3, event[2]]);
  94696. index2++;
  94697. length++;
  94698. }
  94699. if (event[1].type === "listItemPrefix") {
  94700. listItem3 = {
  94701. type: "listItem",
  94702. // @ts-expect-error Patched
  94703. _spread: false,
  94704. start: Object.assign({}, event[1].start)
  94705. };
  94706. events.splice(index2, 0, ["enter", listItem3, event[2]]);
  94707. index2++;
  94708. length++;
  94709. firstBlankLineIndex = void 0;
  94710. atMarker = true;
  94711. }
  94712. }
  94713. }
  94714. events[start3][1]._spread = listSpread;
  94715. return length;
  94716. }
  94717. function setData(key2, value2) {
  94718. data3[key2] = value2;
  94719. }
  94720. function getData(key2) {
  94721. return data3[key2];
  94722. }
  94723. function opener(create4, and) {
  94724. return open;
  94725. function open(token2) {
  94726. enter.call(this, create4(token2), token2);
  94727. if (and)
  94728. and.call(this, token2);
  94729. }
  94730. }
  94731. function buffer3() {
  94732. this.stack.push({
  94733. type: "fragment",
  94734. children: []
  94735. });
  94736. }
  94737. function enter(node2, token2, errorHandler) {
  94738. const parent = this.stack[this.stack.length - 1];
  94739. parent.children.push(node2);
  94740. this.stack.push(node2);
  94741. this.tokenStack.push([token2, errorHandler]);
  94742. node2.position = {
  94743. start: point2(token2.start)
  94744. };
  94745. return node2;
  94746. }
  94747. function closer(and) {
  94748. return close;
  94749. function close(token2) {
  94750. if (and)
  94751. and.call(this, token2);
  94752. exit2.call(this, token2);
  94753. }
  94754. }
  94755. function exit2(token2, onExitError) {
  94756. const node2 = this.stack.pop();
  94757. const open = this.tokenStack.pop();
  94758. if (!open) {
  94759. throw new Error(
  94760. "Cannot close `" + token2.type + "` (" + stringifyPosition({
  94761. start: token2.start,
  94762. end: token2.end
  94763. }) + "): it\u2019s not open"
  94764. );
  94765. } else if (open[0].type !== token2.type) {
  94766. if (onExitError) {
  94767. onExitError.call(this, token2, open[0]);
  94768. } else {
  94769. const handler = open[1] || defaultOnError;
  94770. handler.call(this, token2, open[0]);
  94771. }
  94772. }
  94773. node2.position.end = point2(token2.end);
  94774. return node2;
  94775. }
  94776. function resume() {
  94777. return toString3(this.stack.pop());
  94778. }
  94779. function onenterlistordered() {
  94780. setData("expectingFirstListItemValue", true);
  94781. }
  94782. function onenterlistitemvalue(token2) {
  94783. if (getData("expectingFirstListItemValue")) {
  94784. const ancestor = this.stack[this.stack.length - 2];
  94785. ancestor.start = Number.parseInt(this.sliceSerialize(token2), 10);
  94786. setData("expectingFirstListItemValue");
  94787. }
  94788. }
  94789. function onexitcodefencedfenceinfo() {
  94790. const data4 = this.resume();
  94791. const node2 = this.stack[this.stack.length - 1];
  94792. node2.lang = data4;
  94793. }
  94794. function onexitcodefencedfencemeta() {
  94795. const data4 = this.resume();
  94796. const node2 = this.stack[this.stack.length - 1];
  94797. node2.meta = data4;
  94798. }
  94799. function onexitcodefencedfence() {
  94800. if (getData("flowCodeInside"))
  94801. return;
  94802. this.buffer();
  94803. setData("flowCodeInside", true);
  94804. }
  94805. function onexitcodefenced() {
  94806. const data4 = this.resume();
  94807. const node2 = this.stack[this.stack.length - 1];
  94808. node2.value = data4.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, "");
  94809. setData("flowCodeInside");
  94810. }
  94811. function onexitcodeindented() {
  94812. const data4 = this.resume();
  94813. const node2 = this.stack[this.stack.length - 1];
  94814. node2.value = data4.replace(/(\r?\n|\r)$/g, "");
  94815. }
  94816. function onexitdefinitionlabelstring(token2) {
  94817. const label = this.resume();
  94818. const node2 = this.stack[this.stack.length - 1];
  94819. node2.label = label;
  94820. node2.identifier = normalizeIdentifier(
  94821. this.sliceSerialize(token2)
  94822. ).toLowerCase();
  94823. }
  94824. function onexitdefinitiontitlestring() {
  94825. const data4 = this.resume();
  94826. const node2 = this.stack[this.stack.length - 1];
  94827. node2.title = data4;
  94828. }
  94829. function onexitdefinitiondestinationstring() {
  94830. const data4 = this.resume();
  94831. const node2 = this.stack[this.stack.length - 1];
  94832. node2.url = data4;
  94833. }
  94834. function onexitatxheadingsequence(token2) {
  94835. const node2 = this.stack[this.stack.length - 1];
  94836. if (!node2.depth) {
  94837. const depth = this.sliceSerialize(token2).length;
  94838. node2.depth = depth;
  94839. }
  94840. }
  94841. function onexitsetextheadingtext() {
  94842. setData("setextHeadingSlurpLineEnding", true);
  94843. }
  94844. function onexitsetextheadinglinesequence(token2) {
  94845. const node2 = this.stack[this.stack.length - 1];
  94846. node2.depth = this.sliceSerialize(token2).charCodeAt(0) === 61 ? 1 : 2;
  94847. }
  94848. function onexitsetextheading() {
  94849. setData("setextHeadingSlurpLineEnding");
  94850. }
  94851. function onenterdata(token2) {
  94852. const node2 = this.stack[this.stack.length - 1];
  94853. let tail = node2.children[node2.children.length - 1];
  94854. if (!tail || tail.type !== "text") {
  94855. tail = text5();
  94856. tail.position = {
  94857. start: point2(token2.start)
  94858. };
  94859. node2.children.push(tail);
  94860. }
  94861. this.stack.push(tail);
  94862. }
  94863. function onexitdata(token2) {
  94864. const tail = this.stack.pop();
  94865. tail.value += this.sliceSerialize(token2);
  94866. tail.position.end = point2(token2.end);
  94867. }
  94868. function onexitlineending(token2) {
  94869. const context = this.stack[this.stack.length - 1];
  94870. if (getData("atHardBreak")) {
  94871. const tail = context.children[context.children.length - 1];
  94872. tail.position.end = point2(token2.end);
  94873. setData("atHardBreak");
  94874. return;
  94875. }
  94876. if (!getData("setextHeadingSlurpLineEnding") && config.canContainEols.includes(context.type)) {
  94877. onenterdata.call(this, token2);
  94878. onexitdata.call(this, token2);
  94879. }
  94880. }
  94881. function onexithardbreak() {
  94882. setData("atHardBreak", true);
  94883. }
  94884. function onexithtmlflow() {
  94885. const data4 = this.resume();
  94886. const node2 = this.stack[this.stack.length - 1];
  94887. node2.value = data4;
  94888. }
  94889. function onexithtmltext() {
  94890. const data4 = this.resume();
  94891. const node2 = this.stack[this.stack.length - 1];
  94892. node2.value = data4;
  94893. }
  94894. function onexitcodetext() {
  94895. const data4 = this.resume();
  94896. const node2 = this.stack[this.stack.length - 1];
  94897. node2.value = data4;
  94898. }
  94899. function onexitlink() {
  94900. const node2 = this.stack[this.stack.length - 1];
  94901. if (getData("inReference")) {
  94902. const referenceType = getData("referenceType") || "shortcut";
  94903. node2.type += "Reference";
  94904. node2.referenceType = referenceType;
  94905. delete node2.url;
  94906. delete node2.title;
  94907. } else {
  94908. delete node2.identifier;
  94909. delete node2.label;
  94910. }
  94911. setData("referenceType");
  94912. }
  94913. function onexitimage() {
  94914. const node2 = this.stack[this.stack.length - 1];
  94915. if (getData("inReference")) {
  94916. const referenceType = getData("referenceType") || "shortcut";
  94917. node2.type += "Reference";
  94918. node2.referenceType = referenceType;
  94919. delete node2.url;
  94920. delete node2.title;
  94921. } else {
  94922. delete node2.identifier;
  94923. delete node2.label;
  94924. }
  94925. setData("referenceType");
  94926. }
  94927. function onexitlabeltext(token2) {
  94928. const string3 = this.sliceSerialize(token2);
  94929. const ancestor = this.stack[this.stack.length - 2];
  94930. ancestor.label = decodeString(string3);
  94931. ancestor.identifier = normalizeIdentifier(string3).toLowerCase();
  94932. }
  94933. function onexitlabel() {
  94934. const fragment = this.stack[this.stack.length - 1];
  94935. const value2 = this.resume();
  94936. const node2 = this.stack[this.stack.length - 1];
  94937. setData("inReference", true);
  94938. if (node2.type === "link") {
  94939. const children = fragment.children;
  94940. node2.children = children;
  94941. } else {
  94942. node2.alt = value2;
  94943. }
  94944. }
  94945. function onexitresourcedestinationstring() {
  94946. const data4 = this.resume();
  94947. const node2 = this.stack[this.stack.length - 1];
  94948. node2.url = data4;
  94949. }
  94950. function onexitresourcetitlestring() {
  94951. const data4 = this.resume();
  94952. const node2 = this.stack[this.stack.length - 1];
  94953. node2.title = data4;
  94954. }
  94955. function onexitresource() {
  94956. setData("inReference");
  94957. }
  94958. function onenterreference() {
  94959. setData("referenceType", "collapsed");
  94960. }
  94961. function onexitreferencestring(token2) {
  94962. const label = this.resume();
  94963. const node2 = this.stack[this.stack.length - 1];
  94964. node2.label = label;
  94965. node2.identifier = normalizeIdentifier(
  94966. this.sliceSerialize(token2)
  94967. ).toLowerCase();
  94968. setData("referenceType", "full");
  94969. }
  94970. function onexitcharacterreferencemarker(token2) {
  94971. setData("characterReferenceType", token2.type);
  94972. }
  94973. function onexitcharacterreferencevalue(token2) {
  94974. const data4 = this.sliceSerialize(token2);
  94975. const type = getData("characterReferenceType");
  94976. let value2;
  94977. if (type) {
  94978. value2 = decodeNumericCharacterReference(
  94979. data4,
  94980. type === "characterReferenceMarkerNumeric" ? 10 : 16
  94981. );
  94982. setData("characterReferenceType");
  94983. } else {
  94984. const result = decodeNamedCharacterReference(data4);
  94985. value2 = result;
  94986. }
  94987. const tail = this.stack.pop();
  94988. tail.value += value2;
  94989. tail.position.end = point2(token2.end);
  94990. }
  94991. function onexitautolinkprotocol(token2) {
  94992. onexitdata.call(this, token2);
  94993. const node2 = this.stack[this.stack.length - 1];
  94994. node2.url = this.sliceSerialize(token2);
  94995. }
  94996. function onexitautolinkemail(token2) {
  94997. onexitdata.call(this, token2);
  94998. const node2 = this.stack[this.stack.length - 1];
  94999. node2.url = "mailto:" + this.sliceSerialize(token2);
  95000. }
  95001. function blockQuote2() {
  95002. return {
  95003. type: "blockquote",
  95004. children: []
  95005. };
  95006. }
  95007. function codeFlow() {
  95008. return {
  95009. type: "code",
  95010. lang: null,
  95011. meta: null,
  95012. value: ""
  95013. };
  95014. }
  95015. function codeText2() {
  95016. return {
  95017. type: "inlineCode",
  95018. value: ""
  95019. };
  95020. }
  95021. function definition2() {
  95022. return {
  95023. type: "definition",
  95024. identifier: "",
  95025. label: null,
  95026. title: null,
  95027. url: ""
  95028. };
  95029. }
  95030. function emphasis2() {
  95031. return {
  95032. type: "emphasis",
  95033. children: []
  95034. };
  95035. }
  95036. function heading2() {
  95037. return {
  95038. type: "heading",
  95039. depth: void 0,
  95040. children: []
  95041. };
  95042. }
  95043. function hardBreak2() {
  95044. return {
  95045. type: "break"
  95046. };
  95047. }
  95048. function html4() {
  95049. return {
  95050. type: "html",
  95051. value: ""
  95052. };
  95053. }
  95054. function image2() {
  95055. return {
  95056. type: "image",
  95057. title: null,
  95058. url: "",
  95059. alt: null
  95060. };
  95061. }
  95062. function link2() {
  95063. return {
  95064. type: "link",
  95065. title: null,
  95066. url: "",
  95067. children: []
  95068. };
  95069. }
  95070. function list3(token2) {
  95071. return {
  95072. type: "list",
  95073. ordered: token2.type === "listOrdered",
  95074. start: null,
  95075. // @ts-expect-error Patched.
  95076. spread: token2._spread,
  95077. children: []
  95078. };
  95079. }
  95080. function listItem2(token2) {
  95081. return {
  95082. type: "listItem",
  95083. // @ts-expect-error Patched.
  95084. spread: token2._spread,
  95085. checked: null,
  95086. children: []
  95087. };
  95088. }
  95089. function paragraph2() {
  95090. return {
  95091. type: "paragraph",
  95092. children: []
  95093. };
  95094. }
  95095. function strong2() {
  95096. return {
  95097. type: "strong",
  95098. children: []
  95099. };
  95100. }
  95101. function text5() {
  95102. return {
  95103. type: "text",
  95104. value: ""
  95105. };
  95106. }
  95107. function thematicBreak3() {
  95108. return {
  95109. type: "thematicBreak"
  95110. };
  95111. }
  95112. }
  95113. function point2(d) {
  95114. return {
  95115. line: d.line,
  95116. column: d.column,
  95117. offset: d.offset
  95118. };
  95119. }
  95120. function configure(combined, extensions) {
  95121. let index2 = -1;
  95122. while (++index2 < extensions.length) {
  95123. const value2 = extensions[index2];
  95124. if (Array.isArray(value2)) {
  95125. configure(combined, value2);
  95126. } else {
  95127. extension(combined, value2);
  95128. }
  95129. }
  95130. }
  95131. function extension(combined, extension2) {
  95132. let key2;
  95133. for (key2 in extension2) {
  95134. if (own4.call(extension2, key2)) {
  95135. if (key2 === "canContainEols") {
  95136. const right = extension2[key2];
  95137. if (right) {
  95138. combined[key2].push(...right);
  95139. }
  95140. } else if (key2 === "transforms") {
  95141. const right = extension2[key2];
  95142. if (right) {
  95143. combined[key2].push(...right);
  95144. }
  95145. } else if (key2 === "enter" || key2 === "exit") {
  95146. const right = extension2[key2];
  95147. if (right) {
  95148. Object.assign(combined[key2], right);
  95149. }
  95150. }
  95151. }
  95152. }
  95153. }
  95154. function defaultOnError(left, right) {
  95155. if (left) {
  95156. throw new Error(
  95157. "Cannot close `" + left.type + "` (" + stringifyPosition({
  95158. start: left.start,
  95159. end: left.end
  95160. }) + "): a different token (`" + right.type + "`, " + stringifyPosition({
  95161. start: right.start,
  95162. end: right.end
  95163. }) + ") is open"
  95164. );
  95165. } else {
  95166. throw new Error(
  95167. "Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
  95168. start: right.start,
  95169. end: right.end
  95170. }) + ") is still open"
  95171. );
  95172. }
  95173. }
  95174. // node_modules/remark-parse/lib/index.js
  95175. function remarkParse(options) {
  95176. const parser = (doc) => {
  95177. const settings = (
  95178. /** @type {Options} */
  95179. this.data("settings")
  95180. );
  95181. return fromMarkdown(
  95182. doc,
  95183. Object.assign({}, settings, options, {
  95184. // Note: these options are not in the readme.
  95185. // The goal is for them to be set by plugins on `data` instead of being
  95186. // passed by users.
  95187. extensions: this.data("micromarkExtensions") || [],
  95188. mdastExtensions: this.data("fromMarkdownExtensions") || []
  95189. })
  95190. );
  95191. };
  95192. Object.assign(this, { Parser: parser });
  95193. }
  95194. // node_modules/remark-parse/index.js
  95195. var remark_parse_default = remarkParse;
  95196. // node_modules/mdast-util-to-hast/lib/handlers/blockquote.js
  95197. function blockquote(state, node2) {
  95198. const result = {
  95199. type: "element",
  95200. tagName: "blockquote",
  95201. properties: {},
  95202. children: state.wrap(state.all(node2), true)
  95203. };
  95204. state.patch(node2, result);
  95205. return state.applyData(node2, result);
  95206. }
  95207. // node_modules/mdast-util-to-hast/lib/handlers/break.js
  95208. function hardBreak(state, node2) {
  95209. const result = { type: "element", tagName: "br", properties: {}, children: [] };
  95210. state.patch(node2, result);
  95211. return [state.applyData(node2, result), { type: "text", value: "\n" }];
  95212. }
  95213. // node_modules/mdast-util-to-hast/lib/handlers/code.js
  95214. function code(state, node2) {
  95215. const value2 = node2.value ? node2.value + "\n" : "";
  95216. const lang = node2.lang ? node2.lang.match(/^[^ \t]+(?=[ \t]|$)/) : null;
  95217. const properties = {};
  95218. if (lang) {
  95219. properties.className = ["language-" + lang];
  95220. }
  95221. let result = {
  95222. type: "element",
  95223. tagName: "code",
  95224. properties,
  95225. children: [{ type: "text", value: value2 }]
  95226. };
  95227. if (node2.meta) {
  95228. result.data = { meta: node2.meta };
  95229. }
  95230. state.patch(node2, result);
  95231. result = state.applyData(node2, result);
  95232. result = { type: "element", tagName: "pre", properties: {}, children: [result] };
  95233. state.patch(node2, result);
  95234. return result;
  95235. }
  95236. // node_modules/mdast-util-to-hast/lib/handlers/delete.js
  95237. function strikethrough(state, node2) {
  95238. const result = {
  95239. type: "element",
  95240. tagName: "del",
  95241. properties: {},
  95242. children: state.all(node2)
  95243. };
  95244. state.patch(node2, result);
  95245. return state.applyData(node2, result);
  95246. }
  95247. // node_modules/mdast-util-to-hast/lib/handlers/emphasis.js
  95248. function emphasis(state, node2) {
  95249. const result = {
  95250. type: "element",
  95251. tagName: "em",
  95252. properties: {},
  95253. children: state.all(node2)
  95254. };
  95255. state.patch(node2, result);
  95256. return state.applyData(node2, result);
  95257. }
  95258. // node_modules/micromark-util-sanitize-uri/index.js
  95259. function normalizeUri(value2) {
  95260. const result = [];
  95261. let index2 = -1;
  95262. let start3 = 0;
  95263. let skip = 0;
  95264. while (++index2 < value2.length) {
  95265. const code2 = value2.charCodeAt(index2);
  95266. let replace = "";
  95267. if (code2 === 37 && asciiAlphanumeric(value2.charCodeAt(index2 + 1)) && asciiAlphanumeric(value2.charCodeAt(index2 + 2))) {
  95268. skip = 2;
  95269. } else if (code2 < 128) {
  95270. if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code2))) {
  95271. replace = String.fromCharCode(code2);
  95272. }
  95273. } else if (code2 > 55295 && code2 < 57344) {
  95274. const next = value2.charCodeAt(index2 + 1);
  95275. if (code2 < 56320 && next > 56319 && next < 57344) {
  95276. replace = String.fromCharCode(code2, next);
  95277. skip = 1;
  95278. } else {
  95279. replace = "\uFFFD";
  95280. }
  95281. } else {
  95282. replace = String.fromCharCode(code2);
  95283. }
  95284. if (replace) {
  95285. result.push(value2.slice(start3, index2), encodeURIComponent(replace));
  95286. start3 = index2 + skip + 1;
  95287. replace = "";
  95288. }
  95289. if (skip) {
  95290. index2 += skip;
  95291. skip = 0;
  95292. }
  95293. }
  95294. return result.join("") + value2.slice(start3);
  95295. }
  95296. // node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js
  95297. function footnoteReference(state, node2) {
  95298. const id = String(node2.identifier).toUpperCase();
  95299. const safeId = normalizeUri(id.toLowerCase());
  95300. const index2 = state.footnoteOrder.indexOf(id);
  95301. let counter;
  95302. if (index2 === -1) {
  95303. state.footnoteOrder.push(id);
  95304. state.footnoteCounts[id] = 1;
  95305. counter = state.footnoteOrder.length;
  95306. } else {
  95307. state.footnoteCounts[id]++;
  95308. counter = index2 + 1;
  95309. }
  95310. const reuseCounter = state.footnoteCounts[id];
  95311. const link2 = {
  95312. type: "element",
  95313. tagName: "a",
  95314. properties: {
  95315. href: "#" + state.clobberPrefix + "fn-" + safeId,
  95316. id: state.clobberPrefix + "fnref-" + safeId + (reuseCounter > 1 ? "-" + reuseCounter : ""),
  95317. dataFootnoteRef: true,
  95318. ariaDescribedBy: ["footnote-label"]
  95319. },
  95320. children: [{ type: "text", value: String(counter) }]
  95321. };
  95322. state.patch(node2, link2);
  95323. const sup = {
  95324. type: "element",
  95325. tagName: "sup",
  95326. properties: {},
  95327. children: [link2]
  95328. };
  95329. state.patch(node2, sup);
  95330. return state.applyData(node2, sup);
  95331. }
  95332. // node_modules/mdast-util-to-hast/lib/handlers/footnote.js
  95333. function footnote(state, node2) {
  95334. const footnoteById = state.footnoteById;
  95335. let no = 1;
  95336. while (no in footnoteById)
  95337. no++;
  95338. const identifier = String(no);
  95339. footnoteById[identifier] = {
  95340. type: "footnoteDefinition",
  95341. identifier,
  95342. children: [{ type: "paragraph", children: node2.children }],
  95343. position: node2.position
  95344. };
  95345. return footnoteReference(state, {
  95346. type: "footnoteReference",
  95347. identifier,
  95348. position: node2.position
  95349. });
  95350. }
  95351. // node_modules/mdast-util-to-hast/lib/handlers/heading.js
  95352. function heading(state, node2) {
  95353. const result = {
  95354. type: "element",
  95355. tagName: "h" + node2.depth,
  95356. properties: {},
  95357. children: state.all(node2)
  95358. };
  95359. state.patch(node2, result);
  95360. return state.applyData(node2, result);
  95361. }
  95362. // node_modules/mdast-util-to-hast/lib/handlers/html.js
  95363. function html(state, node2) {
  95364. if (state.dangerous) {
  95365. const result = { type: "raw", value: node2.value };
  95366. state.patch(node2, result);
  95367. return state.applyData(node2, result);
  95368. }
  95369. return null;
  95370. }
  95371. // node_modules/mdast-util-to-hast/lib/revert.js
  95372. function revert(state, node2) {
  95373. const subtype = node2.referenceType;
  95374. let suffix = "]";
  95375. if (subtype === "collapsed") {
  95376. suffix += "[]";
  95377. } else if (subtype === "full") {
  95378. suffix += "[" + (node2.label || node2.identifier) + "]";
  95379. }
  95380. if (node2.type === "imageReference") {
  95381. return { type: "text", value: "![" + node2.alt + suffix };
  95382. }
  95383. const contents = state.all(node2);
  95384. const head = contents[0];
  95385. if (head && head.type === "text") {
  95386. head.value = "[" + head.value;
  95387. } else {
  95388. contents.unshift({ type: "text", value: "[" });
  95389. }
  95390. const tail = contents[contents.length - 1];
  95391. if (tail && tail.type === "text") {
  95392. tail.value += suffix;
  95393. } else {
  95394. contents.push({ type: "text", value: suffix });
  95395. }
  95396. return contents;
  95397. }
  95398. // node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
  95399. function imageReference(state, node2) {
  95400. const def = state.definition(node2.identifier);
  95401. if (!def) {
  95402. return revert(state, node2);
  95403. }
  95404. const properties = { src: normalizeUri(def.url || ""), alt: node2.alt };
  95405. if (def.title !== null && def.title !== void 0) {
  95406. properties.title = def.title;
  95407. }
  95408. const result = { type: "element", tagName: "img", properties, children: [] };
  95409. state.patch(node2, result);
  95410. return state.applyData(node2, result);
  95411. }
  95412. // node_modules/mdast-util-to-hast/lib/handlers/image.js
  95413. function image(state, node2) {
  95414. const properties = { src: normalizeUri(node2.url) };
  95415. if (node2.alt !== null && node2.alt !== void 0) {
  95416. properties.alt = node2.alt;
  95417. }
  95418. if (node2.title !== null && node2.title !== void 0) {
  95419. properties.title = node2.title;
  95420. }
  95421. const result = { type: "element", tagName: "img", properties, children: [] };
  95422. state.patch(node2, result);
  95423. return state.applyData(node2, result);
  95424. }
  95425. // node_modules/mdast-util-to-hast/lib/handlers/inline-code.js
  95426. function inlineCode(state, node2) {
  95427. const text5 = { type: "text", value: node2.value.replace(/\r?\n|\r/g, " ") };
  95428. state.patch(node2, text5);
  95429. const result = {
  95430. type: "element",
  95431. tagName: "code",
  95432. properties: {},
  95433. children: [text5]
  95434. };
  95435. state.patch(node2, result);
  95436. return state.applyData(node2, result);
  95437. }
  95438. // node_modules/mdast-util-to-hast/lib/handlers/link-reference.js
  95439. function linkReference(state, node2) {
  95440. const def = state.definition(node2.identifier);
  95441. if (!def) {
  95442. return revert(state, node2);
  95443. }
  95444. const properties = { href: normalizeUri(def.url || "") };
  95445. if (def.title !== null && def.title !== void 0) {
  95446. properties.title = def.title;
  95447. }
  95448. const result = {
  95449. type: "element",
  95450. tagName: "a",
  95451. properties,
  95452. children: state.all(node2)
  95453. };
  95454. state.patch(node2, result);
  95455. return state.applyData(node2, result);
  95456. }
  95457. // node_modules/mdast-util-to-hast/lib/handlers/link.js
  95458. function link(state, node2) {
  95459. const properties = { href: normalizeUri(node2.url) };
  95460. if (node2.title !== null && node2.title !== void 0) {
  95461. properties.title = node2.title;
  95462. }
  95463. const result = {
  95464. type: "element",
  95465. tagName: "a",
  95466. properties,
  95467. children: state.all(node2)
  95468. };
  95469. state.patch(node2, result);
  95470. return state.applyData(node2, result);
  95471. }
  95472. // node_modules/mdast-util-to-hast/lib/handlers/list-item.js
  95473. function listItem(state, node2, parent) {
  95474. const results = state.all(node2);
  95475. const loose = parent ? listLoose(parent) : listItemLoose(node2);
  95476. const properties = {};
  95477. const children = [];
  95478. if (typeof node2.checked === "boolean") {
  95479. const head = results[0];
  95480. let paragraph2;
  95481. if (head && head.type === "element" && head.tagName === "p") {
  95482. paragraph2 = head;
  95483. } else {
  95484. paragraph2 = { type: "element", tagName: "p", properties: {}, children: [] };
  95485. results.unshift(paragraph2);
  95486. }
  95487. if (paragraph2.children.length > 0) {
  95488. paragraph2.children.unshift({ type: "text", value: " " });
  95489. }
  95490. paragraph2.children.unshift({
  95491. type: "element",
  95492. tagName: "input",
  95493. properties: { type: "checkbox", checked: node2.checked, disabled: true },
  95494. children: []
  95495. });
  95496. properties.className = ["task-list-item"];
  95497. }
  95498. let index2 = -1;
  95499. while (++index2 < results.length) {
  95500. const child = results[index2];
  95501. if (loose || index2 !== 0 || child.type !== "element" || child.tagName !== "p") {
  95502. children.push({ type: "text", value: "\n" });
  95503. }
  95504. if (child.type === "element" && child.tagName === "p" && !loose) {
  95505. children.push(...child.children);
  95506. } else {
  95507. children.push(child);
  95508. }
  95509. }
  95510. const tail = results[results.length - 1];
  95511. if (tail && (loose || tail.type !== "element" || tail.tagName !== "p")) {
  95512. children.push({ type: "text", value: "\n" });
  95513. }
  95514. const result = { type: "element", tagName: "li", properties, children };
  95515. state.patch(node2, result);
  95516. return state.applyData(node2, result);
  95517. }
  95518. function listLoose(node2) {
  95519. let loose = false;
  95520. if (node2.type === "list") {
  95521. loose = node2.spread || false;
  95522. const children = node2.children;
  95523. let index2 = -1;
  95524. while (!loose && ++index2 < children.length) {
  95525. loose = listItemLoose(children[index2]);
  95526. }
  95527. }
  95528. return loose;
  95529. }
  95530. function listItemLoose(node2) {
  95531. const spread = node2.spread;
  95532. return spread === void 0 || spread === null ? node2.children.length > 1 : spread;
  95533. }
  95534. // node_modules/mdast-util-to-hast/lib/handlers/list.js
  95535. function list2(state, node2) {
  95536. const properties = {};
  95537. const results = state.all(node2);
  95538. let index2 = -1;
  95539. if (typeof node2.start === "number" && node2.start !== 1) {
  95540. properties.start = node2.start;
  95541. }
  95542. while (++index2 < results.length) {
  95543. const child = results[index2];
  95544. if (child.type === "element" && child.tagName === "li" && child.properties && Array.isArray(child.properties.className) && child.properties.className.includes("task-list-item")) {
  95545. properties.className = ["contains-task-list"];
  95546. break;
  95547. }
  95548. }
  95549. const result = {
  95550. type: "element",
  95551. tagName: node2.ordered ? "ol" : "ul",
  95552. properties,
  95553. children: state.wrap(results, true)
  95554. };
  95555. state.patch(node2, result);
  95556. return state.applyData(node2, result);
  95557. }
  95558. // node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
  95559. function paragraph(state, node2) {
  95560. const result = {
  95561. type: "element",
  95562. tagName: "p",
  95563. properties: {},
  95564. children: state.all(node2)
  95565. };
  95566. state.patch(node2, result);
  95567. return state.applyData(node2, result);
  95568. }
  95569. // node_modules/mdast-util-to-hast/lib/handlers/root.js
  95570. function root(state, node2) {
  95571. const result = { type: "root", children: state.wrap(state.all(node2)) };
  95572. state.patch(node2, result);
  95573. return state.applyData(node2, result);
  95574. }
  95575. // node_modules/mdast-util-to-hast/lib/handlers/strong.js
  95576. function strong(state, node2) {
  95577. const result = {
  95578. type: "element",
  95579. tagName: "strong",
  95580. properties: {},
  95581. children: state.all(node2)
  95582. };
  95583. state.patch(node2, result);
  95584. return state.applyData(node2, result);
  95585. }
  95586. // node_modules/unist-util-position/lib/index.js
  95587. var pointStart = point3("start");
  95588. var pointEnd = point3("end");
  95589. function position2(node2) {
  95590. return { start: pointStart(node2), end: pointEnd(node2) };
  95591. }
  95592. function point3(type) {
  95593. return point4;
  95594. function point4(node2) {
  95595. const point5 = node2 && node2.position && node2.position[type] || {};
  95596. return {
  95597. // @ts-expect-error: in practice, null is allowed.
  95598. line: point5.line || null,
  95599. // @ts-expect-error: in practice, null is allowed.
  95600. column: point5.column || null,
  95601. // @ts-expect-error: in practice, null is allowed.
  95602. offset: point5.offset > -1 ? point5.offset : null
  95603. };
  95604. }
  95605. }
  95606. // node_modules/mdast-util-to-hast/lib/handlers/table.js
  95607. function table(state, node2) {
  95608. const rows = state.all(node2);
  95609. const firstRow = rows.shift();
  95610. const tableContent = [];
  95611. if (firstRow) {
  95612. const head = {
  95613. type: "element",
  95614. tagName: "thead",
  95615. properties: {},
  95616. children: state.wrap([firstRow], true)
  95617. };
  95618. state.patch(node2.children[0], head);
  95619. tableContent.push(head);
  95620. }
  95621. if (rows.length > 0) {
  95622. const body = {
  95623. type: "element",
  95624. tagName: "tbody",
  95625. properties: {},
  95626. children: state.wrap(rows, true)
  95627. };
  95628. const start3 = pointStart(node2.children[1]);
  95629. const end = pointEnd(node2.children[node2.children.length - 1]);
  95630. if (start3.line && end.line)
  95631. body.position = { start: start3, end };
  95632. tableContent.push(body);
  95633. }
  95634. const result = {
  95635. type: "element",
  95636. tagName: "table",
  95637. properties: {},
  95638. children: state.wrap(tableContent, true)
  95639. };
  95640. state.patch(node2, result);
  95641. return state.applyData(node2, result);
  95642. }
  95643. // node_modules/mdast-util-to-hast/lib/handlers/table-row.js
  95644. function tableRow(state, node2, parent) {
  95645. const siblings = parent ? parent.children : void 0;
  95646. const rowIndex = siblings ? siblings.indexOf(node2) : 1;
  95647. const tagName = rowIndex === 0 ? "th" : "td";
  95648. const align = parent && parent.type === "table" ? parent.align : void 0;
  95649. const length = align ? align.length : node2.children.length;
  95650. let cellIndex = -1;
  95651. const cells = [];
  95652. while (++cellIndex < length) {
  95653. const cell = node2.children[cellIndex];
  95654. const properties = {};
  95655. const alignValue = align ? align[cellIndex] : void 0;
  95656. if (alignValue) {
  95657. properties.align = alignValue;
  95658. }
  95659. let result2 = { type: "element", tagName, properties, children: [] };
  95660. if (cell) {
  95661. result2.children = state.all(cell);
  95662. state.patch(cell, result2);
  95663. result2 = state.applyData(node2, result2);
  95664. }
  95665. cells.push(result2);
  95666. }
  95667. const result = {
  95668. type: "element",
  95669. tagName: "tr",
  95670. properties: {},
  95671. children: state.wrap(cells, true)
  95672. };
  95673. state.patch(node2, result);
  95674. return state.applyData(node2, result);
  95675. }
  95676. // node_modules/mdast-util-to-hast/lib/handlers/table-cell.js
  95677. function tableCell(state, node2) {
  95678. const result = {
  95679. type: "element",
  95680. tagName: "td",
  95681. // Assume body cell.
  95682. properties: {},
  95683. children: state.all(node2)
  95684. };
  95685. state.patch(node2, result);
  95686. return state.applyData(node2, result);
  95687. }
  95688. // node_modules/trim-lines/index.js
  95689. var tab = 9;
  95690. var space = 32;
  95691. function trimLines(value2) {
  95692. const source2 = String(value2);
  95693. const search2 = /\r?\n|\r/g;
  95694. let match = search2.exec(source2);
  95695. let last = 0;
  95696. const lines = [];
  95697. while (match) {
  95698. lines.push(
  95699. trimLine(source2.slice(last, match.index), last > 0, true),
  95700. match[0]
  95701. );
  95702. last = match.index + match[0].length;
  95703. match = search2.exec(source2);
  95704. }
  95705. lines.push(trimLine(source2.slice(last), last > 0, false));
  95706. return lines.join("");
  95707. }
  95708. function trimLine(value2, start3, end) {
  95709. let startIndex = 0;
  95710. let endIndex = value2.length;
  95711. if (start3) {
  95712. let code2 = value2.codePointAt(startIndex);
  95713. while (code2 === tab || code2 === space) {
  95714. startIndex++;
  95715. code2 = value2.codePointAt(startIndex);
  95716. }
  95717. }
  95718. if (end) {
  95719. let code2 = value2.codePointAt(endIndex - 1);
  95720. while (code2 === tab || code2 === space) {
  95721. endIndex--;
  95722. code2 = value2.codePointAt(endIndex - 1);
  95723. }
  95724. }
  95725. return endIndex > startIndex ? value2.slice(startIndex, endIndex) : "";
  95726. }
  95727. // node_modules/mdast-util-to-hast/lib/handlers/text.js
  95728. function text3(state, node2) {
  95729. const result = { type: "text", value: trimLines(String(node2.value)) };
  95730. state.patch(node2, result);
  95731. return state.applyData(node2, result);
  95732. }
  95733. // node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js
  95734. function thematicBreak2(state, node2) {
  95735. const result = {
  95736. type: "element",
  95737. tagName: "hr",
  95738. properties: {},
  95739. children: []
  95740. };
  95741. state.patch(node2, result);
  95742. return state.applyData(node2, result);
  95743. }
  95744. // node_modules/mdast-util-to-hast/lib/handlers/index.js
  95745. var handlers = {
  95746. blockquote,
  95747. break: hardBreak,
  95748. code,
  95749. delete: strikethrough,
  95750. emphasis,
  95751. footnoteReference,
  95752. footnote,
  95753. heading,
  95754. html,
  95755. imageReference,
  95756. image,
  95757. inlineCode,
  95758. linkReference,
  95759. link,
  95760. listItem,
  95761. list: list2,
  95762. paragraph,
  95763. root,
  95764. strong,
  95765. table,
  95766. tableCell,
  95767. tableRow,
  95768. text: text3,
  95769. thematicBreak: thematicBreak2,
  95770. toml: ignore,
  95771. yaml: ignore,
  95772. definition: ignore,
  95773. footnoteDefinition: ignore
  95774. };
  95775. function ignore() {
  95776. return null;
  95777. }
  95778. // node_modules/unist-util-is/lib/index.js
  95779. var convert = (
  95780. /**
  95781. * @type {(
  95782. * (<Kind extends Node>(test: PredicateTest<Kind>) => AssertPredicate<Kind>) &
  95783. * ((test?: Test) => AssertAnything)
  95784. * )}
  95785. */
  95786. /**
  95787. * @param {Test} [test]
  95788. * @returns {AssertAnything}
  95789. */
  95790. function(test) {
  95791. if (test === void 0 || test === null) {
  95792. return ok;
  95793. }
  95794. if (typeof test === "string") {
  95795. return typeFactory(test);
  95796. }
  95797. if (typeof test === "object") {
  95798. return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
  95799. }
  95800. if (typeof test === "function") {
  95801. return castFactory(test);
  95802. }
  95803. throw new Error("Expected function, string, or object as test");
  95804. }
  95805. );
  95806. function anyFactory(tests) {
  95807. const checks2 = [];
  95808. let index2 = -1;
  95809. while (++index2 < tests.length) {
  95810. checks2[index2] = convert(tests[index2]);
  95811. }
  95812. return castFactory(any);
  95813. function any(...parameters) {
  95814. let index3 = -1;
  95815. while (++index3 < checks2.length) {
  95816. if (checks2[index3].call(this, ...parameters))
  95817. return true;
  95818. }
  95819. return false;
  95820. }
  95821. }
  95822. function propsFactory(check) {
  95823. return castFactory(all4);
  95824. function all4(node2) {
  95825. let key2;
  95826. for (key2 in check) {
  95827. if (node2[key2] !== check[key2])
  95828. return false;
  95829. }
  95830. return true;
  95831. }
  95832. }
  95833. function typeFactory(check) {
  95834. return castFactory(type);
  95835. function type(node2) {
  95836. return node2 && node2.type === check;
  95837. }
  95838. }
  95839. function castFactory(check) {
  95840. return assertion;
  95841. function assertion(node2, ...parameters) {
  95842. return Boolean(
  95843. node2 && typeof node2 === "object" && "type" in node2 && // @ts-expect-error: fine.
  95844. Boolean(check.call(this, node2, ...parameters))
  95845. );
  95846. }
  95847. }
  95848. function ok() {
  95849. return true;
  95850. }
  95851. // node_modules/unist-util-visit-parents/lib/color.js
  95852. function color2(d) {
  95853. return "\x1B[33m" + d + "\x1B[39m";
  95854. }
  95855. // node_modules/unist-util-visit-parents/lib/index.js
  95856. var CONTINUE2 = true;
  95857. var EXIT2 = false;
  95858. var SKIP2 = "skip";
  95859. var visitParents = (
  95860. /**
  95861. * @type {(
  95862. * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: BuildVisitor<Tree, Check>, reverse?: boolean | null | undefined) => void) &
  95863. * (<Tree extends Node>(tree: Tree, visitor: BuildVisitor<Tree>, reverse?: boolean | null | undefined) => void)
  95864. * )}
  95865. */
  95866. /**
  95867. * @param {Node} tree
  95868. * @param {Test} test
  95869. * @param {Visitor<Node>} visitor
  95870. * @param {boolean | null | undefined} [reverse]
  95871. * @returns {void}
  95872. */
  95873. function(tree, test, visitor, reverse) {
  95874. if (typeof test === "function" && typeof visitor !== "function") {
  95875. reverse = visitor;
  95876. visitor = test;
  95877. test = null;
  95878. }
  95879. const is2 = convert(test);
  95880. const step = reverse ? -1 : 1;
  95881. factory(tree, void 0, [])();
  95882. function factory(node2, index2, parents) {
  95883. const value2 = node2 && typeof node2 === "object" ? node2 : {};
  95884. if (typeof value2.type === "string") {
  95885. const name2 = (
  95886. // `hast`
  95887. typeof value2.tagName === "string" ? value2.tagName : (
  95888. // `xast`
  95889. typeof value2.name === "string" ? value2.name : void 0
  95890. )
  95891. );
  95892. Object.defineProperty(visit3, "name", {
  95893. value: "node (" + color2(node2.type + (name2 ? "<" + name2 + ">" : "")) + ")"
  95894. });
  95895. }
  95896. return visit3;
  95897. function visit3() {
  95898. let result = [];
  95899. let subresult;
  95900. let offset3;
  95901. let grandparents;
  95902. if (!test || is2(node2, index2, parents[parents.length - 1] || null)) {
  95903. result = toResult2(visitor(node2, parents));
  95904. if (result[0] === EXIT2) {
  95905. return result;
  95906. }
  95907. }
  95908. if (node2.children && result[0] !== SKIP2) {
  95909. offset3 = (reverse ? node2.children.length : -1) + step;
  95910. grandparents = parents.concat(node2);
  95911. while (offset3 > -1 && offset3 < node2.children.length) {
  95912. subresult = factory(node2.children[offset3], offset3, grandparents)();
  95913. if (subresult[0] === EXIT2) {
  95914. return subresult;
  95915. }
  95916. offset3 = typeof subresult[1] === "number" ? subresult[1] : offset3 + step;
  95917. }
  95918. }
  95919. return result;
  95920. }
  95921. }
  95922. }
  95923. );
  95924. function toResult2(value2) {
  95925. if (Array.isArray(value2)) {
  95926. return value2;
  95927. }
  95928. if (typeof value2 === "number") {
  95929. return [CONTINUE2, value2];
  95930. }
  95931. return [value2];
  95932. }
  95933. // node_modules/unist-util-visit/lib/index.js
  95934. var visit2 = (
  95935. /**
  95936. * @type {(
  95937. * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: BuildVisitor<Tree, Check>, reverse?: boolean | null | undefined) => void) &
  95938. * (<Tree extends Node>(tree: Tree, visitor: BuildVisitor<Tree>, reverse?: boolean | null | undefined) => void)
  95939. * )}
  95940. */
  95941. /**
  95942. * @param {Node} tree
  95943. * @param {Test} test
  95944. * @param {Visitor} visitor
  95945. * @param {boolean | null | undefined} [reverse]
  95946. * @returns {void}
  95947. */
  95948. function(tree, test, visitor, reverse) {
  95949. if (typeof test === "function" && typeof visitor !== "function") {
  95950. reverse = visitor;
  95951. visitor = test;
  95952. test = null;
  95953. }
  95954. visitParents(tree, test, overload, reverse);
  95955. function overload(node2, parents) {
  95956. const parent = parents[parents.length - 1];
  95957. return visitor(
  95958. node2,
  95959. parent ? parent.children.indexOf(node2) : null,
  95960. parent
  95961. );
  95962. }
  95963. }
  95964. );
  95965. // node_modules/unist-util-generated/lib/index.js
  95966. function generated(node2) {
  95967. return !node2 || !node2.position || !node2.position.start || !node2.position.start.line || !node2.position.start.column || !node2.position.end || !node2.position.end.line || !node2.position.end.column;
  95968. }
  95969. // node_modules/mdast-util-to-hast/node_modules/mdast-util-definitions/lib/index.js
  95970. var own5 = {}.hasOwnProperty;
  95971. function definitions(tree) {
  95972. const cache = /* @__PURE__ */ Object.create(null);
  95973. if (!tree || !tree.type) {
  95974. throw new Error("mdast-util-definitions expected node");
  95975. }
  95976. visit2(tree, "definition", (definition3) => {
  95977. const id = clean(definition3.identifier);
  95978. if (id && !own5.call(cache, id)) {
  95979. cache[id] = definition3;
  95980. }
  95981. });
  95982. return definition2;
  95983. function definition2(identifier) {
  95984. const id = clean(identifier);
  95985. return id && own5.call(cache, id) ? cache[id] : null;
  95986. }
  95987. }
  95988. function clean(value2) {
  95989. return String(value2 || "").toUpperCase();
  95990. }
  95991. // node_modules/mdast-util-to-hast/lib/state.js
  95992. var own6 = {}.hasOwnProperty;
  95993. function createState(tree, options) {
  95994. const settings = options || {};
  95995. const dangerous = settings.allowDangerousHtml || false;
  95996. const footnoteById = {};
  95997. state.dangerous = dangerous;
  95998. state.clobberPrefix = settings.clobberPrefix === void 0 || settings.clobberPrefix === null ? "user-content-" : settings.clobberPrefix;
  95999. state.footnoteLabel = settings.footnoteLabel || "Footnotes";
  96000. state.footnoteLabelTagName = settings.footnoteLabelTagName || "h2";
  96001. state.footnoteLabelProperties = settings.footnoteLabelProperties || {
  96002. className: ["sr-only"]
  96003. };
  96004. state.footnoteBackLabel = settings.footnoteBackLabel || "Back to content";
  96005. state.unknownHandler = settings.unknownHandler;
  96006. state.passThrough = settings.passThrough;
  96007. state.handlers = { ...handlers, ...settings.handlers };
  96008. state.definition = definitions(tree);
  96009. state.footnoteById = footnoteById;
  96010. state.footnoteOrder = [];
  96011. state.footnoteCounts = {};
  96012. state.patch = patch;
  96013. state.applyData = applyData;
  96014. state.one = oneBound;
  96015. state.all = allBound;
  96016. state.wrap = wrap2;
  96017. state.augment = augment;
  96018. visit2(tree, "footnoteDefinition", (definition2) => {
  96019. const id = String(definition2.identifier).toUpperCase();
  96020. if (!own6.call(footnoteById, id)) {
  96021. footnoteById[id] = definition2;
  96022. }
  96023. });
  96024. return state;
  96025. function augment(left, right) {
  96026. if (left && "data" in left && left.data) {
  96027. const data3 = left.data;
  96028. if (data3.hName) {
  96029. if (right.type !== "element") {
  96030. right = {
  96031. type: "element",
  96032. tagName: "",
  96033. properties: {},
  96034. children: []
  96035. };
  96036. }
  96037. right.tagName = data3.hName;
  96038. }
  96039. if (right.type === "element" && data3.hProperties) {
  96040. right.properties = { ...right.properties, ...data3.hProperties };
  96041. }
  96042. if ("children" in right && right.children && data3.hChildren) {
  96043. right.children = data3.hChildren;
  96044. }
  96045. }
  96046. if (left) {
  96047. const ctx = "type" in left ? left : { position: left };
  96048. if (!generated(ctx)) {
  96049. right.position = { start: pointStart(ctx), end: pointEnd(ctx) };
  96050. }
  96051. }
  96052. return right;
  96053. }
  96054. function state(node2, tagName, props, children) {
  96055. if (Array.isArray(props)) {
  96056. children = props;
  96057. props = {};
  96058. }
  96059. return augment(node2, {
  96060. type: "element",
  96061. tagName,
  96062. properties: props || {},
  96063. children: children || []
  96064. });
  96065. }
  96066. function oneBound(node2, parent) {
  96067. return one2(state, node2, parent);
  96068. }
  96069. function allBound(parent) {
  96070. return all2(state, parent);
  96071. }
  96072. }
  96073. function patch(from, to) {
  96074. if (from.position)
  96075. to.position = position2(from);
  96076. }
  96077. function applyData(from, to) {
  96078. let result = to;
  96079. if (from && from.data) {
  96080. const hName = from.data.hName;
  96081. const hChildren = from.data.hChildren;
  96082. const hProperties = from.data.hProperties;
  96083. if (typeof hName === "string") {
  96084. if (result.type === "element") {
  96085. result.tagName = hName;
  96086. } else {
  96087. result = {
  96088. type: "element",
  96089. tagName: hName,
  96090. properties: {},
  96091. children: []
  96092. };
  96093. }
  96094. }
  96095. if (result.type === "element" && hProperties) {
  96096. result.properties = { ...result.properties, ...hProperties };
  96097. }
  96098. if ("children" in result && result.children && hChildren !== null && hChildren !== void 0) {
  96099. result.children = hChildren;
  96100. }
  96101. }
  96102. return result;
  96103. }
  96104. function one2(state, node2, parent) {
  96105. const type = node2 && node2.type;
  96106. if (!type) {
  96107. throw new Error("Expected node, got `" + node2 + "`");
  96108. }
  96109. if (own6.call(state.handlers, type)) {
  96110. return state.handlers[type](state, node2, parent);
  96111. }
  96112. if (state.passThrough && state.passThrough.includes(type)) {
  96113. return "children" in node2 ? { ...node2, children: all2(state, node2) } : node2;
  96114. }
  96115. if (state.unknownHandler) {
  96116. return state.unknownHandler(state, node2, parent);
  96117. }
  96118. return defaultUnknownHandler(state, node2);
  96119. }
  96120. function all2(state, parent) {
  96121. const values = [];
  96122. if ("children" in parent) {
  96123. const nodes = parent.children;
  96124. let index2 = -1;
  96125. while (++index2 < nodes.length) {
  96126. const result = one2(state, nodes[index2], parent);
  96127. if (result) {
  96128. if (index2 && nodes[index2 - 1].type === "break") {
  96129. if (!Array.isArray(result) && result.type === "text") {
  96130. result.value = result.value.replace(/^\s+/, "");
  96131. }
  96132. if (!Array.isArray(result) && result.type === "element") {
  96133. const head = result.children[0];
  96134. if (head && head.type === "text") {
  96135. head.value = head.value.replace(/^\s+/, "");
  96136. }
  96137. }
  96138. }
  96139. if (Array.isArray(result)) {
  96140. values.push(...result);
  96141. } else {
  96142. values.push(result);
  96143. }
  96144. }
  96145. }
  96146. }
  96147. return values;
  96148. }
  96149. function defaultUnknownHandler(state, node2) {
  96150. const data3 = node2.data || {};
  96151. const result = "value" in node2 && !(own6.call(data3, "hProperties") || own6.call(data3, "hChildren")) ? { type: "text", value: node2.value } : {
  96152. type: "element",
  96153. tagName: "div",
  96154. properties: {},
  96155. children: all2(state, node2)
  96156. };
  96157. state.patch(node2, result);
  96158. return state.applyData(node2, result);
  96159. }
  96160. function wrap2(nodes, loose) {
  96161. const result = [];
  96162. let index2 = -1;
  96163. if (loose) {
  96164. result.push({ type: "text", value: "\n" });
  96165. }
  96166. while (++index2 < nodes.length) {
  96167. if (index2)
  96168. result.push({ type: "text", value: "\n" });
  96169. result.push(nodes[index2]);
  96170. }
  96171. if (loose && nodes.length > 0) {
  96172. result.push({ type: "text", value: "\n" });
  96173. }
  96174. return result;
  96175. }
  96176. // node_modules/mdast-util-to-hast/lib/footer.js
  96177. function footer(state) {
  96178. const listItems = [];
  96179. let index2 = -1;
  96180. while (++index2 < state.footnoteOrder.length) {
  96181. const def = state.footnoteById[state.footnoteOrder[index2]];
  96182. if (!def) {
  96183. continue;
  96184. }
  96185. const content3 = state.all(def);
  96186. const id = String(def.identifier).toUpperCase();
  96187. const safeId = normalizeUri(id.toLowerCase());
  96188. let referenceIndex = 0;
  96189. const backReferences = [];
  96190. while (++referenceIndex <= state.footnoteCounts[id]) {
  96191. const backReference = {
  96192. type: "element",
  96193. tagName: "a",
  96194. properties: {
  96195. href: "#" + state.clobberPrefix + "fnref-" + safeId + (referenceIndex > 1 ? "-" + referenceIndex : ""),
  96196. dataFootnoteBackref: true,
  96197. className: ["data-footnote-backref"],
  96198. ariaLabel: state.footnoteBackLabel
  96199. },
  96200. children: [{ type: "text", value: "\u21A9" }]
  96201. };
  96202. if (referenceIndex > 1) {
  96203. backReference.children.push({
  96204. type: "element",
  96205. tagName: "sup",
  96206. children: [{ type: "text", value: String(referenceIndex) }]
  96207. });
  96208. }
  96209. if (backReferences.length > 0) {
  96210. backReferences.push({ type: "text", value: " " });
  96211. }
  96212. backReferences.push(backReference);
  96213. }
  96214. const tail = content3[content3.length - 1];
  96215. if (tail && tail.type === "element" && tail.tagName === "p") {
  96216. const tailTail = tail.children[tail.children.length - 1];
  96217. if (tailTail && tailTail.type === "text") {
  96218. tailTail.value += " ";
  96219. } else {
  96220. tail.children.push({ type: "text", value: " " });
  96221. }
  96222. tail.children.push(...backReferences);
  96223. } else {
  96224. content3.push(...backReferences);
  96225. }
  96226. const listItem2 = {
  96227. type: "element",
  96228. tagName: "li",
  96229. properties: { id: state.clobberPrefix + "fn-" + safeId },
  96230. children: state.wrap(content3, true)
  96231. };
  96232. state.patch(def, listItem2);
  96233. listItems.push(listItem2);
  96234. }
  96235. if (listItems.length === 0) {
  96236. return;
  96237. }
  96238. return {
  96239. type: "element",
  96240. tagName: "section",
  96241. properties: { dataFootnotes: true, className: ["footnotes"] },
  96242. children: [
  96243. {
  96244. type: "element",
  96245. tagName: state.footnoteLabelTagName,
  96246. properties: {
  96247. // To do: use structured clone.
  96248. ...JSON.parse(JSON.stringify(state.footnoteLabelProperties)),
  96249. id: "footnote-label"
  96250. },
  96251. children: [{ type: "text", value: state.footnoteLabel }]
  96252. },
  96253. { type: "text", value: "\n" },
  96254. {
  96255. type: "element",
  96256. tagName: "ol",
  96257. properties: {},
  96258. children: state.wrap(listItems, true)
  96259. },
  96260. { type: "text", value: "\n" }
  96261. ]
  96262. };
  96263. }
  96264. // node_modules/mdast-util-to-hast/lib/index.js
  96265. function toHast(tree, options) {
  96266. const state = createState(tree, options);
  96267. const node2 = state.one(tree, null);
  96268. const foot = footer(state);
  96269. if (foot) {
  96270. node2.children.push({ type: "text", value: "\n" }, foot);
  96271. }
  96272. return Array.isArray(node2) ? { type: "root", children: node2 } : node2;
  96273. }
  96274. // node_modules/remark-rehype/lib/index.js
  96275. var remarkRehype = (
  96276. /** @type {(import('unified').Plugin<[Processor, Options?]|[null|undefined, Options?]|[Options]|[], MdastRoot>)} */
  96277. function(destination, options) {
  96278. return destination && "run" in destination ? bridge(destination, options) : mutate(destination || options);
  96279. }
  96280. );
  96281. var lib_default = remarkRehype;
  96282. function bridge(destination, options) {
  96283. return (node2, file, next) => {
  96284. destination.run(toHast(node2, options), file, (error) => {
  96285. next(error);
  96286. });
  96287. };
  96288. }
  96289. function mutate(options) {
  96290. return (node2) => toHast(node2, options);
  96291. }
  96292. // node_modules/estree-walker/src/walker.js
  96293. var WalkerBase = class {
  96294. constructor() {
  96295. this.should_skip = false;
  96296. this.should_remove = false;
  96297. this.replacement = null;
  96298. this.context = {
  96299. skip: () => this.should_skip = true,
  96300. remove: () => this.should_remove = true,
  96301. replace: (node2) => this.replacement = node2
  96302. };
  96303. }
  96304. /**
  96305. * @template {Node} Parent
  96306. * @param {Parent | null | undefined} parent
  96307. * @param {keyof Parent | null | undefined} prop
  96308. * @param {number | null | undefined} index
  96309. * @param {Node} node
  96310. */
  96311. replace(parent, prop, index2, node2) {
  96312. if (parent && prop) {
  96313. if (index2 != null) {
  96314. parent[prop][index2] = node2;
  96315. } else {
  96316. parent[prop] = node2;
  96317. }
  96318. }
  96319. }
  96320. /**
  96321. * @template {Node} Parent
  96322. * @param {Parent | null | undefined} parent
  96323. * @param {keyof Parent | null | undefined} prop
  96324. * @param {number | null | undefined} index
  96325. */
  96326. remove(parent, prop, index2) {
  96327. if (parent && prop) {
  96328. if (index2 !== null && index2 !== void 0) {
  96329. parent[prop].splice(index2, 1);
  96330. } else {
  96331. delete parent[prop];
  96332. }
  96333. }
  96334. }
  96335. };
  96336. // node_modules/estree-walker/src/sync.js
  96337. var SyncWalker = class extends WalkerBase {
  96338. /**
  96339. *
  96340. * @param {SyncHandler} [enter]
  96341. * @param {SyncHandler} [leave]
  96342. */
  96343. constructor(enter, leave) {
  96344. super();
  96345. this.should_skip = false;
  96346. this.should_remove = false;
  96347. this.replacement = null;
  96348. this.context = {
  96349. skip: () => this.should_skip = true,
  96350. remove: () => this.should_remove = true,
  96351. replace: (node2) => this.replacement = node2
  96352. };
  96353. this.enter = enter;
  96354. this.leave = leave;
  96355. }
  96356. /**
  96357. * @template {Node} Parent
  96358. * @param {Node} node
  96359. * @param {Parent | null} parent
  96360. * @param {keyof Parent} [prop]
  96361. * @param {number | null} [index]
  96362. * @returns {Node | null}
  96363. */
  96364. visit(node2, parent, prop, index2) {
  96365. if (node2) {
  96366. if (this.enter) {
  96367. const _should_skip = this.should_skip;
  96368. const _should_remove = this.should_remove;
  96369. const _replacement = this.replacement;
  96370. this.should_skip = false;
  96371. this.should_remove = false;
  96372. this.replacement = null;
  96373. this.enter.call(this.context, node2, parent, prop, index2);
  96374. if (this.replacement) {
  96375. node2 = this.replacement;
  96376. this.replace(parent, prop, index2, node2);
  96377. }
  96378. if (this.should_remove) {
  96379. this.remove(parent, prop, index2);
  96380. }
  96381. const skipped = this.should_skip;
  96382. const removed = this.should_remove;
  96383. this.should_skip = _should_skip;
  96384. this.should_remove = _should_remove;
  96385. this.replacement = _replacement;
  96386. if (skipped)
  96387. return node2;
  96388. if (removed)
  96389. return null;
  96390. }
  96391. let key2;
  96392. for (key2 in node2) {
  96393. const value2 = node2[key2];
  96394. if (value2 && typeof value2 === "object") {
  96395. if (Array.isArray(value2)) {
  96396. const nodes = (
  96397. /** @type {Array<unknown>} */
  96398. value2
  96399. );
  96400. for (let i = 0; i < nodes.length; i += 1) {
  96401. const item = nodes[i];
  96402. if (isNode(item)) {
  96403. if (!this.visit(item, node2, key2, i)) {
  96404. i--;
  96405. }
  96406. }
  96407. }
  96408. } else if (isNode(value2)) {
  96409. this.visit(value2, node2, key2, null);
  96410. }
  96411. }
  96412. }
  96413. if (this.leave) {
  96414. const _replacement = this.replacement;
  96415. const _should_remove = this.should_remove;
  96416. this.replacement = null;
  96417. this.should_remove = false;
  96418. this.leave.call(this.context, node2, parent, prop, index2);
  96419. if (this.replacement) {
  96420. node2 = this.replacement;
  96421. this.replace(parent, prop, index2, node2);
  96422. }
  96423. if (this.should_remove) {
  96424. this.remove(parent, prop, index2);
  96425. }
  96426. const removed = this.should_remove;
  96427. this.replacement = _replacement;
  96428. this.should_remove = _should_remove;
  96429. if (removed)
  96430. return null;
  96431. }
  96432. }
  96433. return node2;
  96434. }
  96435. };
  96436. function isNode(value2) {
  96437. return value2 !== null && typeof value2 === "object" && "type" in value2 && typeof value2.type === "string";
  96438. }
  96439. // node_modules/estree-walker/src/index.js
  96440. function walk(ast, { enter, leave }) {
  96441. const instance = new SyncWalker(enter, leave);
  96442. return instance.visit(ast, null);
  96443. }
  96444. // node_modules/estree-util-build-jsx/lib/index.js
  96445. var regex = /@(jsx|jsxFrag|jsxImportSource|jsxRuntime)\s+(\S+)/g;
  96446. function buildJsx(tree, options) {
  96447. const config = options || {};
  96448. let automatic = config.runtime === "automatic";
  96449. const annotations = {};
  96450. const imports = {};
  96451. walk(tree, {
  96452. // @ts-expect-error: hush, `estree-walker` is broken.
  96453. enter(node2) {
  96454. if (node2.type === "Program") {
  96455. const comments = node2.comments || [];
  96456. let index2 = -1;
  96457. while (++index2 < comments.length) {
  96458. regex.lastIndex = 0;
  96459. let match = regex.exec(comments[index2].value);
  96460. while (match) {
  96461. annotations[match[1]] = match[2];
  96462. match = regex.exec(comments[index2].value);
  96463. }
  96464. }
  96465. if (annotations.jsxRuntime) {
  96466. if (annotations.jsxRuntime === "automatic") {
  96467. automatic = true;
  96468. if (annotations.jsx) {
  96469. throw new Error("Unexpected `@jsx` pragma w/ automatic runtime");
  96470. }
  96471. if (annotations.jsxFrag) {
  96472. throw new Error(
  96473. "Unexpected `@jsxFrag` pragma w/ automatic runtime"
  96474. );
  96475. }
  96476. } else if (annotations.jsxRuntime === "classic") {
  96477. automatic = false;
  96478. if (annotations.jsxImportSource) {
  96479. throw new Error(
  96480. "Unexpected `@jsxImportSource` w/ classic runtime"
  96481. );
  96482. }
  96483. } else {
  96484. throw new Error(
  96485. "Unexpected `jsxRuntime` `" + annotations.jsxRuntime + "`, expected `automatic` or `classic`"
  96486. );
  96487. }
  96488. }
  96489. }
  96490. },
  96491. // @ts-expect-error: hush, `estree-walker` is broken.
  96492. // eslint-disable-next-line complexity
  96493. leave(node2) {
  96494. if (node2.type === "Program") {
  96495. const specifiers = [];
  96496. if (imports.fragment) {
  96497. specifiers.push({
  96498. type: "ImportSpecifier",
  96499. imported: { type: "Identifier", name: "Fragment" },
  96500. local: { type: "Identifier", name: "_Fragment" }
  96501. });
  96502. }
  96503. if (imports.jsx) {
  96504. specifiers.push({
  96505. type: "ImportSpecifier",
  96506. imported: { type: "Identifier", name: "jsx" },
  96507. local: { type: "Identifier", name: "_jsx" }
  96508. });
  96509. }
  96510. if (imports.jsxs) {
  96511. specifiers.push({
  96512. type: "ImportSpecifier",
  96513. imported: { type: "Identifier", name: "jsxs" },
  96514. local: { type: "Identifier", name: "_jsxs" }
  96515. });
  96516. }
  96517. if (imports.jsxDEV) {
  96518. specifiers.push({
  96519. type: "ImportSpecifier",
  96520. imported: { type: "Identifier", name: "jsxDEV" },
  96521. local: { type: "Identifier", name: "_jsxDEV" }
  96522. });
  96523. }
  96524. if (specifiers.length > 0) {
  96525. node2.body.unshift({
  96526. type: "ImportDeclaration",
  96527. specifiers,
  96528. source: {
  96529. type: "Literal",
  96530. value: (annotations.jsxImportSource || config.importSource || "react") + (config.development ? "/jsx-dev-runtime" : "/jsx-runtime")
  96531. }
  96532. });
  96533. }
  96534. }
  96535. if (node2.type !== "JSXElement" && node2.type !== "JSXFragment") {
  96536. return;
  96537. }
  96538. const children = [];
  96539. let index2 = -1;
  96540. while (++index2 < node2.children.length) {
  96541. const child = node2.children[index2];
  96542. if (child.type === "JSXExpressionContainer") {
  96543. if (child.expression.type !== "JSXEmptyExpression") {
  96544. children.push(child.expression);
  96545. }
  96546. } else if (child.type === "JSXText") {
  96547. const value2 = child.value.replace(/\t/g, " ").replace(/ *(\r?\n|\r) */g, "\n").replace(/\n+/g, "\n").replace(/\n+$/, "").replace(/^\n+/, "").replace(/\n/g, " ");
  96548. if (value2) {
  96549. children.push(create(child, { type: "Literal", value: value2 }));
  96550. }
  96551. } else {
  96552. children.push(child);
  96553. }
  96554. }
  96555. let name2;
  96556. let fields = [];
  96557. const objects = [];
  96558. let parameters = [];
  96559. let key2;
  96560. if (node2.type === "JSXElement") {
  96561. name2 = toIdentifier(node2.openingElement.name);
  96562. if (name2.type === "Identifier" && /^[a-z]/.test(name2.name)) {
  96563. name2 = create(name2, { type: "Literal", value: name2.name });
  96564. }
  96565. let spread;
  96566. const attributes = node2.openingElement.attributes;
  96567. let index3 = -1;
  96568. while (++index3 < attributes.length) {
  96569. const attribute = attributes[index3];
  96570. if (attribute.type === "JSXSpreadAttribute") {
  96571. if (fields.length > 0) {
  96572. objects.push({ type: "ObjectExpression", properties: fields });
  96573. fields = [];
  96574. }
  96575. objects.push(attribute.argument);
  96576. spread = true;
  96577. } else {
  96578. const prop = toProperty(attribute);
  96579. if (automatic && prop.key.type === "Identifier" && prop.key.name === "key") {
  96580. if (spread) {
  96581. throw new Error(
  96582. "Expected `key` to come before any spread expressions"
  96583. );
  96584. }
  96585. key2 = prop.value;
  96586. } else {
  96587. fields.push(prop);
  96588. }
  96589. }
  96590. }
  96591. } else if (automatic) {
  96592. imports.fragment = true;
  96593. name2 = { type: "Identifier", name: "_Fragment" };
  96594. } else {
  96595. name2 = toMemberExpression(
  96596. annotations.jsxFrag || config.pragmaFrag || "React.Fragment"
  96597. );
  96598. }
  96599. if (automatic) {
  96600. if (children.length > 0) {
  96601. fields.push({
  96602. type: "Property",
  96603. key: { type: "Identifier", name: "children" },
  96604. value: children.length > 1 ? { type: "ArrayExpression", elements: children } : children[0],
  96605. kind: "init",
  96606. method: false,
  96607. shorthand: false,
  96608. computed: false
  96609. });
  96610. }
  96611. } else {
  96612. parameters = children;
  96613. }
  96614. if (fields.length > 0) {
  96615. objects.push({ type: "ObjectExpression", properties: fields });
  96616. }
  96617. let props;
  96618. let callee;
  96619. if (objects.length > 1) {
  96620. if (objects[0].type !== "ObjectExpression") {
  96621. objects.unshift({ type: "ObjectExpression", properties: [] });
  96622. }
  96623. props = {
  96624. type: "CallExpression",
  96625. callee: toMemberExpression("Object.assign"),
  96626. arguments: objects,
  96627. optional: false
  96628. };
  96629. } else if (objects.length > 0) {
  96630. props = objects[0];
  96631. }
  96632. if (automatic) {
  96633. parameters.push(props || { type: "ObjectExpression", properties: [] });
  96634. if (key2) {
  96635. parameters.push(key2);
  96636. } else if (config.development) {
  96637. parameters.push({ type: "Identifier", name: "undefined" });
  96638. }
  96639. const isStaticChildren = children.length > 1;
  96640. if (config.development) {
  96641. imports.jsxDEV = true;
  96642. callee = {
  96643. type: "Identifier",
  96644. name: "_jsxDEV"
  96645. };
  96646. parameters.push({ type: "Literal", value: isStaticChildren });
  96647. const source2 = {
  96648. type: "ObjectExpression",
  96649. properties: [
  96650. {
  96651. type: "Property",
  96652. method: false,
  96653. shorthand: false,
  96654. computed: false,
  96655. kind: "init",
  96656. key: { type: "Identifier", name: "fileName" },
  96657. value: {
  96658. type: "Literal",
  96659. value: config.filePath || "<source.js>"
  96660. }
  96661. }
  96662. ]
  96663. };
  96664. if (node2.loc) {
  96665. source2.properties.push(
  96666. {
  96667. type: "Property",
  96668. method: false,
  96669. shorthand: false,
  96670. computed: false,
  96671. kind: "init",
  96672. key: { type: "Identifier", name: "lineNumber" },
  96673. value: { type: "Literal", value: node2.loc.start.line }
  96674. },
  96675. {
  96676. type: "Property",
  96677. method: false,
  96678. shorthand: false,
  96679. computed: false,
  96680. kind: "init",
  96681. key: { type: "Identifier", name: "columnNumber" },
  96682. value: { type: "Literal", value: node2.loc.start.column + 1 }
  96683. }
  96684. );
  96685. }
  96686. parameters.push(source2, { type: "ThisExpression" });
  96687. } else if (isStaticChildren) {
  96688. imports.jsxs = true;
  96689. callee = { type: "Identifier", name: "_jsxs" };
  96690. } else {
  96691. imports.jsx = true;
  96692. callee = { type: "Identifier", name: "_jsx" };
  96693. }
  96694. } else {
  96695. if (props || parameters.length > 0) {
  96696. parameters.unshift(props || { type: "Literal", value: null });
  96697. }
  96698. callee = toMemberExpression(
  96699. annotations.jsx || config.pragma || "React.createElement"
  96700. );
  96701. }
  96702. parameters.unshift(name2);
  96703. this.replace(
  96704. create(node2, {
  96705. type: "CallExpression",
  96706. callee,
  96707. arguments: parameters,
  96708. optional: false
  96709. })
  96710. );
  96711. }
  96712. });
  96713. return tree;
  96714. }
  96715. function toProperty(node2) {
  96716. let value2;
  96717. if (node2.value) {
  96718. if (node2.value.type === "JSXExpressionContainer") {
  96719. value2 = node2.value.expression;
  96720. } else {
  96721. value2 = node2.value;
  96722. delete value2.raw;
  96723. }
  96724. } else {
  96725. value2 = { type: "Literal", value: true };
  96726. }
  96727. return create(node2, {
  96728. type: "Property",
  96729. key: toIdentifier(node2.name),
  96730. value: value2,
  96731. kind: "init",
  96732. method: false,
  96733. shorthand: false,
  96734. computed: false
  96735. });
  96736. }
  96737. function toIdentifier(node2) {
  96738. let replace;
  96739. if (node2.type === "JSXMemberExpression") {
  96740. const id = toIdentifier(node2.property);
  96741. replace = {
  96742. type: "MemberExpression",
  96743. object: toIdentifier(node2.object),
  96744. property: id,
  96745. computed: id.type === "Literal",
  96746. optional: false
  96747. };
  96748. } else if (node2.type === "JSXNamespacedName") {
  96749. replace = {
  96750. type: "Literal",
  96751. value: node2.namespace.name + ":" + node2.name.name
  96752. };
  96753. } else {
  96754. replace = name(node2.name) ? { type: "Identifier", name: node2.name } : { type: "Literal", value: node2.name };
  96755. }
  96756. return create(node2, replace);
  96757. }
  96758. function toMemberExpression(id) {
  96759. const identifiers = id.split(".");
  96760. let index2 = -1;
  96761. let result;
  96762. while (++index2 < identifiers.length) {
  96763. const prop = name(identifiers[index2]) ? { type: "Identifier", name: identifiers[index2] } : { type: "Literal", value: identifiers[index2] };
  96764. result = result ? {
  96765. type: "MemberExpression",
  96766. object: result,
  96767. property: prop,
  96768. computed: Boolean(index2 && prop.type === "Literal"),
  96769. optional: false
  96770. } : prop;
  96771. }
  96772. return result;
  96773. }
  96774. function create(from, node2) {
  96775. const fields = ["start", "end", "loc", "range", "comments"];
  96776. let index2 = -1;
  96777. while (++index2 < fields.length) {
  96778. const field = fields[index2];
  96779. if (field in from) {
  96780. node2[field] = from[field];
  96781. }
  96782. }
  96783. return node2;
  96784. }
  96785. // node_modules/@mdx-js/mdx/lib/util/estree-util-create.js
  96786. function create2(from, to) {
  96787. const fields = ["start", "end", "loc", "range", "comments"];
  96788. let index2 = -1;
  96789. while (++index2 < fields.length) {
  96790. const field = fields[index2];
  96791. if (field in from) {
  96792. to[field] = from[field];
  96793. }
  96794. }
  96795. }
  96796. // node_modules/@mdx-js/mdx/lib/util/estree-util-specifiers-to-declarations.js
  96797. function specifiersToDeclarations(specifiers, init) {
  96798. let index2 = -1;
  96799. const declarations = [];
  96800. const otherSpecifiers = [];
  96801. let importNamespaceSpecifier;
  96802. while (++index2 < specifiers.length) {
  96803. const specifier = specifiers[index2];
  96804. if (specifier.type === "ImportNamespaceSpecifier") {
  96805. importNamespaceSpecifier = specifier;
  96806. } else {
  96807. otherSpecifiers.push(specifier);
  96808. }
  96809. }
  96810. if (importNamespaceSpecifier) {
  96811. const declarator = {
  96812. type: "VariableDeclarator",
  96813. id: importNamespaceSpecifier.local,
  96814. init
  96815. };
  96816. create2(importNamespaceSpecifier, declarator);
  96817. declarations.push(declarator);
  96818. }
  96819. declarations.push({
  96820. type: "VariableDeclarator",
  96821. id: {
  96822. type: "ObjectPattern",
  96823. properties: otherSpecifiers.map((specifier) => {
  96824. let key2 = specifier.type === "ImportSpecifier" ? specifier.imported : specifier.type === "ExportSpecifier" ? specifier.exported : { type: "Identifier", name: "default" };
  96825. let value2 = specifier.local;
  96826. if (specifier.type === "ExportSpecifier") {
  96827. value2 = key2;
  96828. key2 = specifier.local;
  96829. }
  96830. const property = {
  96831. type: "Property",
  96832. kind: "init",
  96833. shorthand: key2.name === value2.name,
  96834. method: false,
  96835. computed: false,
  96836. key: key2,
  96837. value: value2
  96838. };
  96839. create2(specifier, property);
  96840. return property;
  96841. })
  96842. },
  96843. init: importNamespaceSpecifier ? { type: "Identifier", name: importNamespaceSpecifier.local.name } : init
  96844. });
  96845. return declarations;
  96846. }
  96847. // node_modules/@mdx-js/mdx/lib/util/estree-util-to-id-or-member-expression.js
  96848. var toIdOrMemberExpression = toIdOrMemberExpressionFactory(
  96849. "Identifier",
  96850. "MemberExpression",
  96851. name
  96852. );
  96853. var toJsxIdOrMemberExpression = (
  96854. // @ts-expect-error: fine
  96855. /** @type {(ids: Array<string | number>) => JSXIdentifier | JSXMemberExpression)} */
  96856. toIdOrMemberExpressionFactory(
  96857. "JSXIdentifier",
  96858. "JSXMemberExpression",
  96859. isJsxIdentifierName
  96860. )
  96861. );
  96862. function toIdOrMemberExpressionFactory(idType, memberType, isIdentifier3) {
  96863. return toIdOrMemberExpression2;
  96864. function toIdOrMemberExpression2(ids) {
  96865. let index2 = -1;
  96866. let object;
  96867. while (++index2 < ids.length) {
  96868. const name2 = ids[index2];
  96869. const valid2 = typeof name2 === "string" && isIdentifier3(name2);
  96870. if (idType === "JSXIdentifier" && !valid2) {
  96871. throw new Error("Cannot turn `" + name2 + "` into a JSX identifier");
  96872. }
  96873. const id = valid2 ? { type: idType, name: name2 } : { type: "Literal", value: name2 };
  96874. object = object ? {
  96875. type: memberType,
  96876. object,
  96877. property: id,
  96878. computed: id.type === "Literal",
  96879. optional: false
  96880. } : id;
  96881. }
  96882. if (!object)
  96883. throw new Error("Expected non-empty `ids` to be passed");
  96884. if (object.type === "Literal")
  96885. throw new Error("Expected identifier as left-most value");
  96886. return object;
  96887. }
  96888. }
  96889. function isJsxIdentifierName(name2) {
  96890. let index2 = -1;
  96891. while (++index2 < name2.length) {
  96892. if (!(index2 ? jsxCont : start2)(name2.charCodeAt(index2)))
  96893. return false;
  96894. }
  96895. return index2 > 0;
  96896. }
  96897. function jsxCont(code2) {
  96898. return code2 === 45 || cont2(code2);
  96899. }
  96900. // node_modules/@mdx-js/mdx/lib/plugin/recma-jsx-build.js
  96901. function recmaJsxBuild(options) {
  96902. const { development: development2, outputFormat } = options || {};
  96903. return (tree, file) => {
  96904. buildJsx(tree, { development: development2, filePath: file.history[0] });
  96905. if (outputFormat === "function-body" && tree.body[0] && tree.body[0].type === "ImportDeclaration" && typeof tree.body[0].source.value === "string" && /\/jsx-(dev-)?runtime$/.test(tree.body[0].source.value)) {
  96906. tree.body[0] = {
  96907. type: "VariableDeclaration",
  96908. kind: "const",
  96909. declarations: specifiersToDeclarations(
  96910. tree.body[0].specifiers,
  96911. toIdOrMemberExpression(["arguments", 0])
  96912. )
  96913. };
  96914. }
  96915. };
  96916. }
  96917. // node_modules/is-reference/src/index.js
  96918. function is_reference(node2, parent) {
  96919. if (node2.type === "MemberExpression") {
  96920. return !node2.computed && is_reference(node2.object, node2);
  96921. }
  96922. if (node2.type === "Identifier") {
  96923. if (!parent)
  96924. return true;
  96925. switch (parent.type) {
  96926. case "MemberExpression":
  96927. return parent.computed || node2 === parent.object;
  96928. case "MethodDefinition":
  96929. return parent.computed;
  96930. case "PropertyDefinition":
  96931. return parent.computed || node2 === parent.value;
  96932. case "Property":
  96933. return parent.computed || node2 === parent.value;
  96934. case "ExportSpecifier":
  96935. case "ImportSpecifier":
  96936. return node2 === parent.local;
  96937. case "LabeledStatement":
  96938. case "BreakStatement":
  96939. case "ContinueStatement":
  96940. return false;
  96941. default:
  96942. return true;
  96943. }
  96944. }
  96945. return false;
  96946. }
  96947. // node_modules/periscopic/src/index.js
  96948. function analyze(expression) {
  96949. const map = /* @__PURE__ */ new WeakMap();
  96950. const globals = /* @__PURE__ */ new Map();
  96951. const scope = new Scope5(null, false);
  96952. const references = [];
  96953. let current_scope = scope;
  96954. walk(expression, {
  96955. enter(node2, parent) {
  96956. switch (node2.type) {
  96957. case "Identifier":
  96958. if (parent && is_reference(node2, parent)) {
  96959. references.push([current_scope, node2]);
  96960. }
  96961. break;
  96962. case "ImportDeclaration":
  96963. node2.specifiers.forEach((specifier) => {
  96964. current_scope.declarations.set(specifier.local.name, specifier);
  96965. });
  96966. break;
  96967. case "FunctionExpression":
  96968. case "FunctionDeclaration":
  96969. case "ArrowFunctionExpression":
  96970. if (node2.type === "FunctionDeclaration") {
  96971. if (node2.id) {
  96972. current_scope.declarations.set(node2.id.name, node2);
  96973. }
  96974. map.set(node2, current_scope = new Scope5(current_scope, false));
  96975. } else {
  96976. map.set(node2, current_scope = new Scope5(current_scope, false));
  96977. if (node2.type === "FunctionExpression" && node2.id) {
  96978. current_scope.declarations.set(node2.id.name, node2);
  96979. }
  96980. }
  96981. node2.params.forEach((param) => {
  96982. extract_names(param).forEach((name2) => {
  96983. current_scope.declarations.set(name2, node2);
  96984. });
  96985. });
  96986. break;
  96987. case "ForStatement":
  96988. case "ForInStatement":
  96989. case "ForOfStatement":
  96990. map.set(node2, current_scope = new Scope5(current_scope, true));
  96991. break;
  96992. case "BlockStatement":
  96993. map.set(node2, current_scope = new Scope5(current_scope, true));
  96994. break;
  96995. case "ClassDeclaration":
  96996. case "VariableDeclaration":
  96997. current_scope.add_declaration(node2);
  96998. break;
  96999. case "CatchClause":
  97000. map.set(node2, current_scope = new Scope5(current_scope, true));
  97001. if (node2.param) {
  97002. extract_names(node2.param).forEach((name2) => {
  97003. if (node2.param) {
  97004. current_scope.declarations.set(name2, node2.param);
  97005. }
  97006. });
  97007. }
  97008. break;
  97009. }
  97010. },
  97011. leave(node2) {
  97012. if (map.has(node2) && current_scope !== null && current_scope.parent) {
  97013. current_scope = current_scope.parent;
  97014. }
  97015. }
  97016. });
  97017. for (let i = references.length - 1; i >= 0; --i) {
  97018. const [scope2, reference] = references[i];
  97019. if (!scope2.references.has(reference.name)) {
  97020. add_reference(scope2, reference.name);
  97021. }
  97022. if (!scope2.find_owner(reference.name)) {
  97023. globals.set(reference.name, reference);
  97024. }
  97025. }
  97026. return { map, scope, globals };
  97027. }
  97028. function add_reference(scope, name2) {
  97029. scope.references.add(name2);
  97030. if (scope.parent)
  97031. add_reference(scope.parent, name2);
  97032. }
  97033. var Scope5 = class {
  97034. /**
  97035. * @param {Scope | null} parent
  97036. * @param {boolean} block
  97037. */
  97038. constructor(parent, block) {
  97039. this.parent = parent;
  97040. this.block = block;
  97041. this.declarations = /* @__PURE__ */ new Map();
  97042. this.initialised_declarations = /* @__PURE__ */ new Set();
  97043. this.references = /* @__PURE__ */ new Set();
  97044. }
  97045. /**
  97046. * @param {import('estree').VariableDeclaration | import('estree').ClassDeclaration} node
  97047. */
  97048. add_declaration(node2) {
  97049. if (node2.type === "VariableDeclaration") {
  97050. if (node2.kind === "var" && this.block && this.parent) {
  97051. this.parent.add_declaration(node2);
  97052. } else {
  97053. const handle_declarator = (declarator) => {
  97054. extract_names(declarator.id).forEach((name2) => {
  97055. this.declarations.set(name2, node2);
  97056. if (declarator.init)
  97057. this.initialised_declarations.add(name2);
  97058. });
  97059. ;
  97060. };
  97061. node2.declarations.forEach(handle_declarator);
  97062. }
  97063. } else if (node2.id) {
  97064. this.declarations.set(node2.id.name, node2);
  97065. }
  97066. }
  97067. /**
  97068. * @param {string} name
  97069. * @returns {Scope | null}
  97070. */
  97071. find_owner(name2) {
  97072. if (this.declarations.has(name2))
  97073. return this;
  97074. return this.parent && this.parent.find_owner(name2);
  97075. }
  97076. /**
  97077. * @param {string} name
  97078. * @returns {boolean}
  97079. */
  97080. has(name2) {
  97081. return this.declarations.has(name2) || !!this.parent && this.parent.has(name2);
  97082. }
  97083. };
  97084. function extract_names(param) {
  97085. return extract_identifiers(param).map((node2) => node2.name);
  97086. }
  97087. function extract_identifiers(param, nodes = []) {
  97088. switch (param.type) {
  97089. case "Identifier":
  97090. nodes.push(param);
  97091. break;
  97092. case "MemberExpression":
  97093. let object = param;
  97094. while (object.type === "MemberExpression") {
  97095. object = /** @type {any} */
  97096. object.object;
  97097. }
  97098. nodes.push(
  97099. /** @type {any} */
  97100. object
  97101. );
  97102. break;
  97103. case "ObjectPattern":
  97104. const handle_prop = (prop) => {
  97105. if (prop.type === "RestElement") {
  97106. extract_identifiers(prop.argument, nodes);
  97107. } else {
  97108. extract_identifiers(prop.value, nodes);
  97109. }
  97110. };
  97111. param.properties.forEach(handle_prop);
  97112. break;
  97113. case "ArrayPattern":
  97114. const handle_element = (element2) => {
  97115. if (element2)
  97116. extract_identifiers(element2, nodes);
  97117. };
  97118. param.elements.forEach((element2) => {
  97119. if (element2) {
  97120. handle_element(element2);
  97121. }
  97122. });
  97123. break;
  97124. case "RestElement":
  97125. extract_identifiers(param.argument, nodes);
  97126. break;
  97127. case "AssignmentPattern":
  97128. extract_identifiers(param.left, nodes);
  97129. break;
  97130. }
  97131. return nodes;
  97132. }
  97133. // node_modules/@mdx-js/mdx/lib/util/estree-util-declaration-to-expression.js
  97134. function declarationToExpression(declaration) {
  97135. if (declaration.type === "FunctionDeclaration") {
  97136. return { ...declaration, type: "FunctionExpression" };
  97137. }
  97138. if (declaration.type === "ClassDeclaration") {
  97139. return { ...declaration, type: "ClassExpression" };
  97140. }
  97141. throw new Error("Cannot turn `" + declaration.type + "` into an expression");
  97142. }
  97143. // node_modules/@mdx-js/mdx/lib/util/estree-util-is-declaration.js
  97144. function isDeclaration(node2) {
  97145. return Boolean(
  97146. node2.type === "FunctionDeclaration" || node2.type === "ClassDeclaration" || node2.type === "VariableDeclaration"
  97147. );
  97148. }
  97149. // node_modules/@mdx-js/mdx/lib/plugin/recma-document.js
  97150. function recmaDocument(options) {
  97151. const options_ = options || {};
  97152. const baseUrl = options_.baseUrl || void 0;
  97153. const useDynamicImport = options_.useDynamicImport || void 0;
  97154. const outputFormat = options_.outputFormat || "program";
  97155. const pragma = options_.pragma === void 0 ? "React.createElement" : options_.pragma;
  97156. const pragmaFrag = options_.pragmaFrag === void 0 ? "React.Fragment" : options_.pragmaFrag;
  97157. const pragmaImportSource = options_.pragmaImportSource || "react";
  97158. const jsxImportSource = options_.jsxImportSource || "react";
  97159. const jsxRuntime = options_.jsxRuntime || "automatic";
  97160. return (tree, file) => {
  97161. const exportedIdentifiers = [];
  97162. const replacement = [];
  97163. const pragmas = [];
  97164. let exportAllCount = 0;
  97165. let layout;
  97166. let content3;
  97167. let child;
  97168. if (!tree.comments)
  97169. tree.comments = [];
  97170. if (jsxRuntime) {
  97171. pragmas.push("@jsxRuntime " + jsxRuntime);
  97172. }
  97173. if (jsxRuntime === "automatic" && jsxImportSource) {
  97174. pragmas.push("@jsxImportSource " + jsxImportSource);
  97175. }
  97176. if (jsxRuntime === "classic" && pragma) {
  97177. pragmas.push("@jsx " + pragma);
  97178. }
  97179. if (jsxRuntime === "classic" && pragmaFrag) {
  97180. pragmas.push("@jsxFrag " + pragmaFrag);
  97181. }
  97182. if (pragmas.length > 0) {
  97183. tree.comments.unshift({ type: "Block", value: pragmas.join(" ") });
  97184. }
  97185. if (jsxRuntime === "classic" && pragmaImportSource) {
  97186. if (!pragma) {
  97187. throw new Error(
  97188. "Missing `pragma` in classic runtime with `pragmaImportSource`"
  97189. );
  97190. }
  97191. handleEsm({
  97192. type: "ImportDeclaration",
  97193. specifiers: [
  97194. {
  97195. type: "ImportDefaultSpecifier",
  97196. local: { type: "Identifier", name: pragma.split(".")[0] }
  97197. }
  97198. ],
  97199. source: { type: "Literal", value: pragmaImportSource }
  97200. });
  97201. }
  97202. for (child of tree.body) {
  97203. if (child.type === "ExportDefaultDeclaration") {
  97204. if (layout) {
  97205. file.fail(
  97206. "Cannot specify multiple layouts (previous: " + stringifyPosition(positionFromEstree(layout)) + ")",
  97207. positionFromEstree(child),
  97208. "recma-document:duplicate-layout"
  97209. );
  97210. }
  97211. layout = child;
  97212. replacement.push({
  97213. type: "VariableDeclaration",
  97214. kind: "const",
  97215. declarations: [
  97216. {
  97217. type: "VariableDeclarator",
  97218. id: { type: "Identifier", name: "MDXLayout" },
  97219. init: isDeclaration(child.declaration) ? declarationToExpression(child.declaration) : child.declaration
  97220. }
  97221. ]
  97222. });
  97223. } else if (child.type === "ExportNamedDeclaration" && child.source) {
  97224. const source2 = (
  97225. /** @type {SimpleLiteral} */
  97226. child.source
  97227. );
  97228. child.specifiers = child.specifiers.filter((specifier) => {
  97229. if (specifier.exported.name === "default") {
  97230. if (layout) {
  97231. file.fail(
  97232. "Cannot specify multiple layouts (previous: " + stringifyPosition(positionFromEstree(layout)) + ")",
  97233. positionFromEstree(child),
  97234. "recma-document:duplicate-layout"
  97235. );
  97236. }
  97237. layout = specifier;
  97238. const specifiers = [];
  97239. if (specifier.local.name === "default") {
  97240. specifiers.push({
  97241. type: "ImportDefaultSpecifier",
  97242. local: { type: "Identifier", name: "MDXLayout" }
  97243. });
  97244. } else {
  97245. const importSpecifier = {
  97246. type: "ImportSpecifier",
  97247. imported: specifier.local,
  97248. local: { type: "Identifier", name: "MDXLayout" }
  97249. };
  97250. create2(specifier.local, importSpecifier);
  97251. specifiers.push(importSpecifier);
  97252. }
  97253. const from = { type: "Literal", value: source2.value };
  97254. create2(source2, from);
  97255. const declaration = {
  97256. type: "ImportDeclaration",
  97257. specifiers,
  97258. source: from
  97259. };
  97260. create2(specifier, declaration);
  97261. handleEsm(declaration);
  97262. return false;
  97263. }
  97264. return true;
  97265. });
  97266. if (child.specifiers.length > 0) {
  97267. handleExport(child);
  97268. }
  97269. } else if (child.type === "ExportNamedDeclaration" || child.type === "ExportAllDeclaration") {
  97270. handleExport(child);
  97271. } else if (child.type === "ImportDeclaration") {
  97272. handleEsm(child);
  97273. } else if (child.type === "ExpressionStatement" && // @ts-expect-error types are wrong: `JSXFragment` is an `Expression`.
  97274. (child.expression.type === "JSXFragment" || child.expression.type === "JSXElement")) {
  97275. content3 = true;
  97276. replacement.push(...createMdxContent(child.expression, Boolean(layout)));
  97277. } else {
  97278. replacement.push(child);
  97279. }
  97280. }
  97281. if (!content3) {
  97282. replacement.push(...createMdxContent(void 0, Boolean(layout)));
  97283. }
  97284. exportedIdentifiers.push(["MDXContent", "default"]);
  97285. if (outputFormat === "function-body") {
  97286. replacement.push({
  97287. type: "ReturnStatement",
  97288. argument: {
  97289. type: "ObjectExpression",
  97290. properties: [
  97291. ...Array.from({ length: exportAllCount }).map(
  97292. /**
  97293. * @param {undefined} _
  97294. * @param {number} index
  97295. * @returns {SpreadElement}
  97296. */
  97297. (_, index2) => ({
  97298. type: "SpreadElement",
  97299. argument: { type: "Identifier", name: "_exportAll" + (index2 + 1) }
  97300. })
  97301. ),
  97302. ...exportedIdentifiers.map((d) => {
  97303. const prop = {
  97304. type: "Property",
  97305. kind: "init",
  97306. method: false,
  97307. computed: false,
  97308. shorthand: typeof d === "string",
  97309. key: {
  97310. type: "Identifier",
  97311. name: typeof d === "string" ? d : d[1]
  97312. },
  97313. value: {
  97314. type: "Identifier",
  97315. name: typeof d === "string" ? d : d[0]
  97316. }
  97317. };
  97318. return prop;
  97319. })
  97320. ]
  97321. }
  97322. });
  97323. } else {
  97324. replacement.push({
  97325. type: "ExportDefaultDeclaration",
  97326. declaration: { type: "Identifier", name: "MDXContent" }
  97327. });
  97328. }
  97329. tree.body = replacement;
  97330. if (baseUrl) {
  97331. walk(tree, {
  97332. enter(node2) {
  97333. if (node2.type === "MemberExpression" && "object" in node2 && node2.object.type === "MetaProperty" && node2.property.type === "Identifier" && node2.object.meta.name === "import" && node2.object.property.name === "meta" && node2.property.name === "url") {
  97334. const replacement2 = { type: "Literal", value: baseUrl };
  97335. this.replace(replacement2);
  97336. }
  97337. }
  97338. });
  97339. }
  97340. function handleExport(node2) {
  97341. if (node2.type === "ExportNamedDeclaration") {
  97342. if (node2.declaration) {
  97343. exportedIdentifiers.push(
  97344. ...analyze(node2.declaration).scope.declarations.keys()
  97345. );
  97346. }
  97347. for (child of node2.specifiers) {
  97348. exportedIdentifiers.push(child.exported.name);
  97349. }
  97350. }
  97351. handleEsm(node2);
  97352. }
  97353. function handleEsm(node2) {
  97354. if (baseUrl && node2.source) {
  97355. let value2 = String(node2.source.value);
  97356. try {
  97357. value2 = String(new URL(value2));
  97358. } catch {
  97359. if (/^\.{0,2}\//.test(value2)) {
  97360. value2 = String(new URL(value2, baseUrl));
  97361. }
  97362. }
  97363. const literal4 = { type: "Literal", value: value2 };
  97364. create2(node2.source, literal4);
  97365. node2.source = literal4;
  97366. }
  97367. let replace;
  97368. let init;
  97369. if (outputFormat === "function-body") {
  97370. if (
  97371. // Always have a source:
  97372. node2.type === "ImportDeclaration" || node2.type === "ExportAllDeclaration" || // Source optional:
  97373. node2.type === "ExportNamedDeclaration" && node2.source
  97374. ) {
  97375. if (!useDynamicImport) {
  97376. file.fail(
  97377. "Cannot use `import` or `export \u2026 from` in `evaluate` (outputting a function body) by default: please set `useDynamicImport: true` (and probably specify a `baseUrl`)",
  97378. positionFromEstree(node2),
  97379. "recma-document:invalid-esm-statement"
  97380. );
  97381. }
  97382. if (!node2.source) {
  97383. throw new Error("Expected `node.source` to be defined");
  97384. }
  97385. const argument = { type: "ImportExpression", source: node2.source };
  97386. create2(node2, argument);
  97387. init = { type: "AwaitExpression", argument };
  97388. if ((node2.type === "ImportDeclaration" || node2.type === "ExportNamedDeclaration") && node2.specifiers.length === 0) {
  97389. replace = { type: "ExpressionStatement", expression: init };
  97390. } else {
  97391. replace = {
  97392. type: "VariableDeclaration",
  97393. kind: "const",
  97394. declarations: node2.type === "ExportAllDeclaration" ? [
  97395. {
  97396. type: "VariableDeclarator",
  97397. id: {
  97398. type: "Identifier",
  97399. name: "_exportAll" + ++exportAllCount
  97400. },
  97401. init
  97402. }
  97403. ] : specifiersToDeclarations(node2.specifiers, init)
  97404. };
  97405. }
  97406. } else if (node2.declaration) {
  97407. replace = node2.declaration;
  97408. } else {
  97409. const declarators = node2.specifiers.filter(
  97410. (specifier) => specifier.local.name !== specifier.exported.name
  97411. ).map((specifier) => ({
  97412. type: "VariableDeclarator",
  97413. id: specifier.exported,
  97414. init: specifier.local
  97415. }));
  97416. if (declarators.length > 0) {
  97417. replace = {
  97418. type: "VariableDeclaration",
  97419. kind: "const",
  97420. declarations: declarators
  97421. };
  97422. }
  97423. }
  97424. } else {
  97425. replace = node2;
  97426. }
  97427. if (replace) {
  97428. replacement.push(replace);
  97429. }
  97430. }
  97431. };
  97432. function createMdxContent(content3, hasInternalLayout) {
  97433. const element2 = {
  97434. type: "JSXElement",
  97435. openingElement: {
  97436. type: "JSXOpeningElement",
  97437. name: { type: "JSXIdentifier", name: "MDXLayout" },
  97438. attributes: [
  97439. {
  97440. type: "JSXSpreadAttribute",
  97441. argument: { type: "Identifier", name: "props" }
  97442. }
  97443. ],
  97444. selfClosing: false
  97445. },
  97446. closingElement: {
  97447. type: "JSXClosingElement",
  97448. name: { type: "JSXIdentifier", name: "MDXLayout" }
  97449. },
  97450. children: [
  97451. {
  97452. type: "JSXElement",
  97453. openingElement: {
  97454. type: "JSXOpeningElement",
  97455. name: { type: "JSXIdentifier", name: "_createMdxContent" },
  97456. attributes: [
  97457. {
  97458. type: "JSXSpreadAttribute",
  97459. argument: { type: "Identifier", name: "props" }
  97460. }
  97461. ],
  97462. selfClosing: true
  97463. },
  97464. closingElement: null,
  97465. children: []
  97466. }
  97467. ]
  97468. };
  97469. let result = (
  97470. /** @type {Expression} */
  97471. element2
  97472. );
  97473. if (!hasInternalLayout) {
  97474. result = {
  97475. type: "ConditionalExpression",
  97476. test: { type: "Identifier", name: "MDXLayout" },
  97477. consequent: result,
  97478. alternate: {
  97479. type: "CallExpression",
  97480. callee: { type: "Identifier", name: "_createMdxContent" },
  97481. arguments: [{ type: "Identifier", name: "props" }],
  97482. optional: false
  97483. }
  97484. };
  97485. }
  97486. let argument = content3 || { type: "Literal", value: null };
  97487. if (argument && // @ts-expect-error: fine.
  97488. argument.type === "JSXFragment" && // @ts-expect-error: fine.
  97489. argument.children.length === 1 && // @ts-expect-error: fine.
  97490. argument.children[0].type === "JSXElement") {
  97491. argument = argument.children[0];
  97492. }
  97493. return [
  97494. {
  97495. type: "FunctionDeclaration",
  97496. id: { type: "Identifier", name: "_createMdxContent" },
  97497. params: [{ type: "Identifier", name: "props" }],
  97498. body: {
  97499. type: "BlockStatement",
  97500. body: [{ type: "ReturnStatement", argument }]
  97501. }
  97502. },
  97503. {
  97504. type: "FunctionDeclaration",
  97505. id: { type: "Identifier", name: "MDXContent" },
  97506. params: [
  97507. {
  97508. type: "AssignmentPattern",
  97509. left: { type: "Identifier", name: "props" },
  97510. right: { type: "ObjectExpression", properties: [] }
  97511. }
  97512. ],
  97513. body: {
  97514. type: "BlockStatement",
  97515. body: [{ type: "ReturnStatement", argument: result }]
  97516. }
  97517. }
  97518. ];
  97519. }
  97520. }
  97521. // node_modules/@mdx-js/mdx/lib/util/estree-util-to-binary-addition.js
  97522. function toBinaryAddition(expressions) {
  97523. let index2 = -1;
  97524. let left;
  97525. while (++index2 < expressions.length) {
  97526. const right = expressions[index2];
  97527. left = left ? { type: "BinaryExpression", left, operator: "+", right } : right;
  97528. }
  97529. if (!left)
  97530. throw new Error("Expected non-empty `expressions` to be passed");
  97531. return left;
  97532. }
  97533. // node_modules/@mdx-js/mdx/lib/plugin/recma-jsx-rewrite.js
  97534. var own7 = {}.hasOwnProperty;
  97535. function recmaJsxRewrite(options) {
  97536. const { development: development2, providerImportSource, outputFormat } = options || {};
  97537. return (tree, file) => {
  97538. const scopeInfo = analyze(tree);
  97539. const fnStack = [];
  97540. let importProvider = false;
  97541. let createErrorHelper = false;
  97542. let currentScope;
  97543. walk(tree, {
  97544. enter(node2) {
  97545. const newScope = (
  97546. /** @type {Scope | undefined} */
  97547. scopeInfo.map.get(node2)
  97548. );
  97549. if (node2.type === "FunctionDeclaration" || node2.type === "FunctionExpression" || node2.type === "ArrowFunctionExpression") {
  97550. fnStack.push({
  97551. objects: [],
  97552. components: [],
  97553. tags: [],
  97554. references: {},
  97555. idToInvalidComponentName: /* @__PURE__ */ new Map(),
  97556. node: node2
  97557. });
  97558. if (isNamedFunction(node2, "MDXContent") && newScope && !inScope(newScope, "MDXLayout")) {
  97559. fnStack[0].components.push("MDXLayout");
  97560. }
  97561. }
  97562. const fnScope = fnStack[0];
  97563. if (!fnScope || !isNamedFunction(fnScope.node, "_createMdxContent") && !providerImportSource) {
  97564. return;
  97565. }
  97566. if (newScope) {
  97567. newScope.node = node2;
  97568. currentScope = newScope;
  97569. }
  97570. if (currentScope && node2.type === "JSXElement") {
  97571. let name2 = node2.openingElement.name;
  97572. if (name2.type === "JSXMemberExpression") {
  97573. const ids = [];
  97574. while (name2.type === "JSXMemberExpression") {
  97575. ids.unshift(name2.property.name);
  97576. name2 = name2.object;
  97577. }
  97578. ids.unshift(name2.name);
  97579. const fullId = ids.join(".");
  97580. const id = name2.name;
  97581. const isInScope = inScope(currentScope, id);
  97582. if (!own7.call(fnScope.references, fullId)) {
  97583. const parentScope = (
  97584. /** @type {Scope | undefined} */
  97585. currentScope.parent
  97586. );
  97587. if (!isInScope || // If the parent scope is `_createMdxContent`, then this
  97588. // references a component we can add a check statement for.
  97589. parentScope && parentScope.node.type === "FunctionDeclaration" && isNamedFunction(parentScope.node, "_createMdxContent")) {
  97590. fnScope.references[fullId] = { node: node2, component: true };
  97591. }
  97592. }
  97593. if (!fnScope.objects.includes(id) && !isInScope) {
  97594. fnScope.objects.push(id);
  97595. }
  97596. } else if (name2.type === "JSXNamespacedName") {
  97597. } else if (name(name2.name) && !/^[a-z]/.test(name2.name)) {
  97598. const id = name2.name;
  97599. if (!inScope(currentScope, id)) {
  97600. if (id !== "MDXLayout" && !own7.call(fnScope.references, id)) {
  97601. fnScope.references[id] = { node: node2, component: true };
  97602. }
  97603. if (!fnScope.components.includes(id)) {
  97604. fnScope.components.push(id);
  97605. }
  97606. }
  97607. } else if (node2.data && node2.data._mdxExplicitJsx) {
  97608. } else {
  97609. const id = name2.name;
  97610. if (!fnScope.tags.includes(id)) {
  97611. fnScope.tags.push(id);
  97612. }
  97613. let jsxIdExpression = ["_components", id];
  97614. if (name(id) === false) {
  97615. let invalidComponentName = fnScope.idToInvalidComponentName.get(id);
  97616. if (invalidComponentName === void 0) {
  97617. invalidComponentName = `_component${fnScope.idToInvalidComponentName.size}`;
  97618. fnScope.idToInvalidComponentName.set(id, invalidComponentName);
  97619. }
  97620. jsxIdExpression = [invalidComponentName];
  97621. }
  97622. node2.openingElement.name = toJsxIdOrMemberExpression(jsxIdExpression);
  97623. if (node2.closingElement) {
  97624. node2.closingElement.name = toJsxIdOrMemberExpression(jsxIdExpression);
  97625. }
  97626. }
  97627. }
  97628. },
  97629. leave(node2) {
  97630. const defaults = [];
  97631. const actual = [];
  97632. const parameters = [];
  97633. const declarations = [];
  97634. if (currentScope && currentScope.node === node2) {
  97635. currentScope = currentScope.parent;
  97636. }
  97637. if (node2.type === "FunctionDeclaration" || node2.type === "FunctionExpression" || node2.type === "ArrowFunctionExpression") {
  97638. const fn = node2;
  97639. const scope = fnStack[fnStack.length - 1];
  97640. let name2;
  97641. for (name2 of scope.tags) {
  97642. defaults.push({
  97643. type: "Property",
  97644. kind: "init",
  97645. key: name(name2) ? { type: "Identifier", name: name2 } : { type: "Literal", value: name2 },
  97646. value: { type: "Literal", value: name2 },
  97647. method: false,
  97648. shorthand: false,
  97649. computed: false
  97650. });
  97651. }
  97652. actual.push(...scope.components);
  97653. for (name2 of scope.objects) {
  97654. if (!actual.includes(name2)) {
  97655. actual.push(name2);
  97656. }
  97657. }
  97658. const statements = [];
  97659. if (defaults.length > 0 || actual.length > 0 || scope.idToInvalidComponentName.size > 0) {
  97660. if (providerImportSource) {
  97661. importProvider = true;
  97662. parameters.push({
  97663. type: "CallExpression",
  97664. callee: { type: "Identifier", name: "_provideComponents" },
  97665. arguments: [],
  97666. optional: false
  97667. });
  97668. }
  97669. if (isNamedFunction(scope.node, "MDXContent") || isNamedFunction(scope.node, "_createMdxContent")) {
  97670. parameters.push(toIdOrMemberExpression(["props", "components"]));
  97671. }
  97672. if (defaults.length > 0 || parameters.length > 1) {
  97673. parameters.unshift({
  97674. type: "ObjectExpression",
  97675. properties: defaults
  97676. });
  97677. }
  97678. let componentsInit = parameters.length > 1 ? {
  97679. type: "CallExpression",
  97680. callee: toIdOrMemberExpression(["Object", "assign"]),
  97681. arguments: parameters,
  97682. optional: false
  97683. } : parameters[0].type === "MemberExpression" ? (
  97684. // If we’re only getting components from `props.components`,
  97685. // make sure it’s defined.
  97686. {
  97687. type: "LogicalExpression",
  97688. operator: "||",
  97689. left: parameters[0],
  97690. right: { type: "ObjectExpression", properties: [] }
  97691. }
  97692. ) : parameters[0];
  97693. let componentsPattern;
  97694. if (actual.length > 0) {
  97695. componentsPattern = {
  97696. type: "ObjectPattern",
  97697. properties: actual.map((name3) => ({
  97698. type: "Property",
  97699. kind: "init",
  97700. key: {
  97701. type: "Identifier",
  97702. name: name3 === "MDXLayout" ? "wrapper" : name3
  97703. },
  97704. value: { type: "Identifier", name: name3 },
  97705. method: false,
  97706. shorthand: name3 !== "MDXLayout",
  97707. computed: false
  97708. }))
  97709. };
  97710. }
  97711. if (scope.tags.length > 0) {
  97712. declarations.push({
  97713. type: "VariableDeclarator",
  97714. id: { type: "Identifier", name: "_components" },
  97715. init: componentsInit
  97716. });
  97717. componentsInit = { type: "Identifier", name: "_components" };
  97718. }
  97719. if (isNamedFunction(scope.node, "_createMdxContent")) {
  97720. for (const [
  97721. id,
  97722. componentName
  97723. ] of scope.idToInvalidComponentName) {
  97724. declarations.push({
  97725. type: "VariableDeclarator",
  97726. id: { type: "Identifier", name: componentName },
  97727. init: {
  97728. type: "MemberExpression",
  97729. object: { type: "Identifier", name: "_components" },
  97730. property: { type: "Literal", value: id },
  97731. computed: true,
  97732. optional: false
  97733. }
  97734. });
  97735. }
  97736. }
  97737. if (componentsPattern) {
  97738. declarations.push({
  97739. type: "VariableDeclarator",
  97740. id: componentsPattern,
  97741. init: componentsInit
  97742. });
  97743. }
  97744. if (declarations.length > 0) {
  97745. statements.push({
  97746. type: "VariableDeclaration",
  97747. kind: "const",
  97748. declarations
  97749. });
  97750. }
  97751. }
  97752. let key2;
  97753. for (key2 in scope.references) {
  97754. if (own7.call(scope.references, key2)) {
  97755. const parts = key2.split(".");
  97756. let index3 = 0;
  97757. while (++index3 < parts.length) {
  97758. const partial = parts.slice(0, index3).join(".");
  97759. if (!own7.call(scope.references, partial)) {
  97760. scope.references[partial] = {
  97761. node: scope.references[key2].node,
  97762. component: false
  97763. };
  97764. }
  97765. }
  97766. }
  97767. }
  97768. const references = Object.keys(scope.references).sort();
  97769. let index2 = -1;
  97770. while (++index2 < references.length) {
  97771. const id = references[index2];
  97772. const info = scope.references[id];
  97773. const place = stringifyPosition(positionFromEstree(info.node));
  97774. const parameters2 = [
  97775. { type: "Literal", value: id },
  97776. { type: "Literal", value: info.component }
  97777. ];
  97778. createErrorHelper = true;
  97779. if (development2 && place !== "1:1-1:1") {
  97780. parameters2.push({ type: "Literal", value: place });
  97781. }
  97782. statements.push({
  97783. type: "IfStatement",
  97784. test: {
  97785. type: "UnaryExpression",
  97786. operator: "!",
  97787. prefix: true,
  97788. argument: toIdOrMemberExpression(id.split("."))
  97789. },
  97790. consequent: {
  97791. type: "ExpressionStatement",
  97792. expression: {
  97793. type: "CallExpression",
  97794. callee: { type: "Identifier", name: "_missingMdxReference" },
  97795. arguments: parameters2,
  97796. optional: false
  97797. }
  97798. },
  97799. alternate: null
  97800. });
  97801. }
  97802. if (statements.length > 0) {
  97803. if (fn.body.type !== "BlockStatement") {
  97804. fn.body = {
  97805. type: "BlockStatement",
  97806. body: [{ type: "ReturnStatement", argument: fn.body }]
  97807. };
  97808. }
  97809. fn.body.body.unshift(...statements);
  97810. }
  97811. fnStack.pop();
  97812. }
  97813. }
  97814. });
  97815. if (importProvider && providerImportSource) {
  97816. tree.body.unshift(
  97817. createImportProvider(providerImportSource, outputFormat)
  97818. );
  97819. }
  97820. if (createErrorHelper) {
  97821. const message = [
  97822. { type: "Literal", value: "Expected " },
  97823. {
  97824. type: "ConditionalExpression",
  97825. test: { type: "Identifier", name: "component" },
  97826. consequent: { type: "Literal", value: "component" },
  97827. alternate: { type: "Literal", value: "object" }
  97828. },
  97829. { type: "Literal", value: " `" },
  97830. { type: "Identifier", name: "id" },
  97831. {
  97832. type: "Literal",
  97833. value: "` to be defined: you likely forgot to import, pass, or provide it."
  97834. }
  97835. ];
  97836. const parameters = [
  97837. { type: "Identifier", name: "id" },
  97838. { type: "Identifier", name: "component" }
  97839. ];
  97840. if (development2) {
  97841. message.push({
  97842. type: "ConditionalExpression",
  97843. test: { type: "Identifier", name: "place" },
  97844. consequent: toBinaryAddition([
  97845. { type: "Literal", value: "\nIt\u2019s referenced in your code at `" },
  97846. { type: "Identifier", name: "place" },
  97847. {
  97848. type: "Literal",
  97849. value: (file.path ? "` in `" + file.path : "") + "`"
  97850. }
  97851. ]),
  97852. alternate: { type: "Literal", value: "" }
  97853. });
  97854. parameters.push({ type: "Identifier", name: "place" });
  97855. }
  97856. tree.body.push({
  97857. type: "FunctionDeclaration",
  97858. id: { type: "Identifier", name: "_missingMdxReference" },
  97859. generator: false,
  97860. async: false,
  97861. params: parameters,
  97862. body: {
  97863. type: "BlockStatement",
  97864. body: [
  97865. {
  97866. type: "ThrowStatement",
  97867. argument: {
  97868. type: "NewExpression",
  97869. callee: { type: "Identifier", name: "Error" },
  97870. arguments: [toBinaryAddition(message)]
  97871. }
  97872. }
  97873. ]
  97874. }
  97875. });
  97876. }
  97877. };
  97878. }
  97879. function createImportProvider(providerImportSource, outputFormat) {
  97880. const specifiers = [
  97881. {
  97882. type: "ImportSpecifier",
  97883. imported: { type: "Identifier", name: "useMDXComponents" },
  97884. local: { type: "Identifier", name: "_provideComponents" }
  97885. }
  97886. ];
  97887. return outputFormat === "function-body" ? {
  97888. type: "VariableDeclaration",
  97889. kind: "const",
  97890. declarations: specifiersToDeclarations(
  97891. specifiers,
  97892. toIdOrMemberExpression(["arguments", 0])
  97893. )
  97894. } : {
  97895. type: "ImportDeclaration",
  97896. specifiers,
  97897. source: { type: "Literal", value: providerImportSource }
  97898. };
  97899. }
  97900. function isNamedFunction(node2, name2) {
  97901. return Boolean(node2 && "id" in node2 && node2.id && node2.id.name === name2);
  97902. }
  97903. function inScope(scope, id) {
  97904. let currentScope = scope;
  97905. while (currentScope) {
  97906. if (currentScope.declarations.has(id)) {
  97907. return true;
  97908. }
  97909. currentScope = currentScope.parent;
  97910. }
  97911. return false;
  97912. }
  97913. // node_modules/astring/dist/astring.mjs
  97914. var { stringify } = JSON;
  97915. if (!String.prototype.repeat) {
  97916. throw new Error(
  97917. "String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation"
  97918. );
  97919. }
  97920. if (!String.prototype.endsWith) {
  97921. throw new Error(
  97922. "String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation"
  97923. );
  97924. }
  97925. var OPERATOR_PRECEDENCE = {
  97926. "||": 3,
  97927. "&&": 4,
  97928. "|": 5,
  97929. "??": 5,
  97930. "^": 6,
  97931. "&": 7,
  97932. "==": 8,
  97933. "!=": 8,
  97934. "===": 8,
  97935. "!==": 8,
  97936. "<": 9,
  97937. ">": 9,
  97938. "<=": 9,
  97939. ">=": 9,
  97940. in: 9,
  97941. instanceof: 9,
  97942. "<<": 10,
  97943. ">>": 10,
  97944. ">>>": 10,
  97945. "+": 11,
  97946. "-": 11,
  97947. "*": 12,
  97948. "%": 12,
  97949. "/": 12,
  97950. "**": 13
  97951. };
  97952. var NEEDS_PARENTHESES = 17;
  97953. var EXPRESSIONS_PRECEDENCE = {
  97954. // Definitions
  97955. ArrayExpression: 20,
  97956. TaggedTemplateExpression: 20,
  97957. ThisExpression: 20,
  97958. Identifier: 20,
  97959. PrivateIdentifier: 20,
  97960. Literal: 18,
  97961. TemplateLiteral: 20,
  97962. Super: 20,
  97963. SequenceExpression: 20,
  97964. // Operations
  97965. MemberExpression: 19,
  97966. ChainExpression: 19,
  97967. CallExpression: 19,
  97968. NewExpression: 19,
  97969. // Other definitions
  97970. ArrowFunctionExpression: NEEDS_PARENTHESES,
  97971. ClassExpression: NEEDS_PARENTHESES,
  97972. FunctionExpression: NEEDS_PARENTHESES,
  97973. ObjectExpression: NEEDS_PARENTHESES,
  97974. // Other operations
  97975. UpdateExpression: 16,
  97976. UnaryExpression: 15,
  97977. AwaitExpression: 15,
  97978. BinaryExpression: 14,
  97979. LogicalExpression: 13,
  97980. ConditionalExpression: 4,
  97981. AssignmentExpression: 3,
  97982. YieldExpression: 2,
  97983. RestElement: 1
  97984. };
  97985. function formatSequence(state, nodes) {
  97986. const { generator } = state;
  97987. state.write("(");
  97988. if (nodes != null && nodes.length > 0) {
  97989. generator[nodes[0].type](nodes[0], state);
  97990. const { length } = nodes;
  97991. for (let i = 1; i < length; i++) {
  97992. const param = nodes[i];
  97993. state.write(", ");
  97994. generator[param.type](param, state);
  97995. }
  97996. }
  97997. state.write(")");
  97998. }
  97999. function expressionNeedsParenthesis(state, node2, parentNode, isRightHand) {
  98000. const nodePrecedence = state.expressionsPrecedence[node2.type];
  98001. if (nodePrecedence === NEEDS_PARENTHESES) {
  98002. return true;
  98003. }
  98004. const parentNodePrecedence = state.expressionsPrecedence[parentNode.type];
  98005. if (nodePrecedence !== parentNodePrecedence) {
  98006. return !isRightHand && nodePrecedence === 15 && parentNodePrecedence === 14 && parentNode.operator === "**" || nodePrecedence < parentNodePrecedence;
  98007. }
  98008. if (nodePrecedence !== 13 && nodePrecedence !== 14) {
  98009. return false;
  98010. }
  98011. if (node2.operator === "**" && parentNode.operator === "**") {
  98012. return !isRightHand;
  98013. }
  98014. if (isRightHand) {
  98015. return OPERATOR_PRECEDENCE[node2.operator] <= OPERATOR_PRECEDENCE[parentNode.operator];
  98016. }
  98017. return OPERATOR_PRECEDENCE[node2.operator] < OPERATOR_PRECEDENCE[parentNode.operator];
  98018. }
  98019. function formatExpression(state, node2, parentNode, isRightHand) {
  98020. const { generator } = state;
  98021. if (expressionNeedsParenthesis(state, node2, parentNode, isRightHand)) {
  98022. state.write("(");
  98023. generator[node2.type](node2, state);
  98024. state.write(")");
  98025. } else {
  98026. generator[node2.type](node2, state);
  98027. }
  98028. }
  98029. function reindent(state, text5, indent, lineEnd) {
  98030. const lines = text5.split("\n");
  98031. const end = lines.length - 1;
  98032. state.write(lines[0].trim());
  98033. if (end > 0) {
  98034. state.write(lineEnd);
  98035. for (let i = 1; i < end; i++) {
  98036. state.write(indent + lines[i].trim() + lineEnd);
  98037. }
  98038. state.write(indent + lines[end].trim());
  98039. }
  98040. }
  98041. function formatComments(state, comments, indent, lineEnd) {
  98042. const { length } = comments;
  98043. for (let i = 0; i < length; i++) {
  98044. const comment2 = comments[i];
  98045. state.write(indent);
  98046. if (comment2.type[0] === "L") {
  98047. state.write("// " + comment2.value.trim() + "\n", comment2);
  98048. } else {
  98049. state.write("/*");
  98050. reindent(state, comment2.value, indent, lineEnd);
  98051. state.write("*/" + lineEnd);
  98052. }
  98053. }
  98054. }
  98055. function hasCallExpression(node2) {
  98056. let currentNode = node2;
  98057. while (currentNode != null) {
  98058. const { type } = currentNode;
  98059. if (type[0] === "C" && type[1] === "a") {
  98060. return true;
  98061. } else if (type[0] === "M" && type[1] === "e" && type[2] === "m") {
  98062. currentNode = currentNode.object;
  98063. } else {
  98064. return false;
  98065. }
  98066. }
  98067. }
  98068. function formatVariableDeclaration(state, node2) {
  98069. const { generator } = state;
  98070. const { declarations } = node2;
  98071. state.write(node2.kind + " ");
  98072. const { length } = declarations;
  98073. if (length > 0) {
  98074. generator.VariableDeclarator(declarations[0], state);
  98075. for (let i = 1; i < length; i++) {
  98076. state.write(", ");
  98077. generator.VariableDeclarator(declarations[i], state);
  98078. }
  98079. }
  98080. }
  98081. var ForInStatement;
  98082. var FunctionDeclaration;
  98083. var RestElement;
  98084. var BinaryExpression;
  98085. var ArrayExpression;
  98086. var BlockStatement;
  98087. var GENERATOR = {
  98088. /*
  98089. Default generator.
  98090. */
  98091. Program(node2, state) {
  98092. const indent = state.indent.repeat(state.indentLevel);
  98093. const { lineEnd, writeComments } = state;
  98094. if (writeComments && node2.comments != null) {
  98095. formatComments(state, node2.comments, indent, lineEnd);
  98096. }
  98097. const statements = node2.body;
  98098. const { length } = statements;
  98099. for (let i = 0; i < length; i++) {
  98100. const statement = statements[i];
  98101. if (writeComments && statement.comments != null) {
  98102. formatComments(state, statement.comments, indent, lineEnd);
  98103. }
  98104. state.write(indent);
  98105. this[statement.type](statement, state);
  98106. state.write(lineEnd);
  98107. }
  98108. if (writeComments && node2.trailingComments != null) {
  98109. formatComments(state, node2.trailingComments, indent, lineEnd);
  98110. }
  98111. },
  98112. BlockStatement: BlockStatement = function(node2, state) {
  98113. const indent = state.indent.repeat(state.indentLevel++);
  98114. const { lineEnd, writeComments } = state;
  98115. const statementIndent = indent + state.indent;
  98116. state.write("{");
  98117. const statements = node2.body;
  98118. if (statements != null && statements.length > 0) {
  98119. state.write(lineEnd);
  98120. if (writeComments && node2.comments != null) {
  98121. formatComments(state, node2.comments, statementIndent, lineEnd);
  98122. }
  98123. const { length } = statements;
  98124. for (let i = 0; i < length; i++) {
  98125. const statement = statements[i];
  98126. if (writeComments && statement.comments != null) {
  98127. formatComments(state, statement.comments, statementIndent, lineEnd);
  98128. }
  98129. state.write(statementIndent);
  98130. this[statement.type](statement, state);
  98131. state.write(lineEnd);
  98132. }
  98133. state.write(indent);
  98134. } else {
  98135. if (writeComments && node2.comments != null) {
  98136. state.write(lineEnd);
  98137. formatComments(state, node2.comments, statementIndent, lineEnd);
  98138. state.write(indent);
  98139. }
  98140. }
  98141. if (writeComments && node2.trailingComments != null) {
  98142. formatComments(state, node2.trailingComments, statementIndent, lineEnd);
  98143. }
  98144. state.write("}");
  98145. state.indentLevel--;
  98146. },
  98147. ClassBody: BlockStatement,
  98148. StaticBlock(node2, state) {
  98149. state.write("static ");
  98150. this.BlockStatement(node2, state);
  98151. },
  98152. EmptyStatement(node2, state) {
  98153. state.write(";");
  98154. },
  98155. ExpressionStatement(node2, state) {
  98156. const precedence = state.expressionsPrecedence[node2.expression.type];
  98157. if (precedence === NEEDS_PARENTHESES || precedence === 3 && node2.expression.left.type[0] === "O") {
  98158. state.write("(");
  98159. this[node2.expression.type](node2.expression, state);
  98160. state.write(")");
  98161. } else {
  98162. this[node2.expression.type](node2.expression, state);
  98163. }
  98164. state.write(";");
  98165. },
  98166. IfStatement(node2, state) {
  98167. state.write("if (");
  98168. this[node2.test.type](node2.test, state);
  98169. state.write(") ");
  98170. this[node2.consequent.type](node2.consequent, state);
  98171. if (node2.alternate != null) {
  98172. state.write(" else ");
  98173. this[node2.alternate.type](node2.alternate, state);
  98174. }
  98175. },
  98176. LabeledStatement(node2, state) {
  98177. this[node2.label.type](node2.label, state);
  98178. state.write(": ");
  98179. this[node2.body.type](node2.body, state);
  98180. },
  98181. BreakStatement(node2, state) {
  98182. state.write("break");
  98183. if (node2.label != null) {
  98184. state.write(" ");
  98185. this[node2.label.type](node2.label, state);
  98186. }
  98187. state.write(";");
  98188. },
  98189. ContinueStatement(node2, state) {
  98190. state.write("continue");
  98191. if (node2.label != null) {
  98192. state.write(" ");
  98193. this[node2.label.type](node2.label, state);
  98194. }
  98195. state.write(";");
  98196. },
  98197. WithStatement(node2, state) {
  98198. state.write("with (");
  98199. this[node2.object.type](node2.object, state);
  98200. state.write(") ");
  98201. this[node2.body.type](node2.body, state);
  98202. },
  98203. SwitchStatement(node2, state) {
  98204. const indent = state.indent.repeat(state.indentLevel++);
  98205. const { lineEnd, writeComments } = state;
  98206. state.indentLevel++;
  98207. const caseIndent = indent + state.indent;
  98208. const statementIndent = caseIndent + state.indent;
  98209. state.write("switch (");
  98210. this[node2.discriminant.type](node2.discriminant, state);
  98211. state.write(") {" + lineEnd);
  98212. const { cases: occurences } = node2;
  98213. const { length: occurencesCount } = occurences;
  98214. for (let i = 0; i < occurencesCount; i++) {
  98215. const occurence = occurences[i];
  98216. if (writeComments && occurence.comments != null) {
  98217. formatComments(state, occurence.comments, caseIndent, lineEnd);
  98218. }
  98219. if (occurence.test) {
  98220. state.write(caseIndent + "case ");
  98221. this[occurence.test.type](occurence.test, state);
  98222. state.write(":" + lineEnd);
  98223. } else {
  98224. state.write(caseIndent + "default:" + lineEnd);
  98225. }
  98226. const { consequent } = occurence;
  98227. const { length: consequentCount } = consequent;
  98228. for (let i2 = 0; i2 < consequentCount; i2++) {
  98229. const statement = consequent[i2];
  98230. if (writeComments && statement.comments != null) {
  98231. formatComments(state, statement.comments, statementIndent, lineEnd);
  98232. }
  98233. state.write(statementIndent);
  98234. this[statement.type](statement, state);
  98235. state.write(lineEnd);
  98236. }
  98237. }
  98238. state.indentLevel -= 2;
  98239. state.write(indent + "}");
  98240. },
  98241. ReturnStatement(node2, state) {
  98242. state.write("return");
  98243. if (node2.argument) {
  98244. state.write(" ");
  98245. this[node2.argument.type](node2.argument, state);
  98246. }
  98247. state.write(";");
  98248. },
  98249. ThrowStatement(node2, state) {
  98250. state.write("throw ");
  98251. this[node2.argument.type](node2.argument, state);
  98252. state.write(";");
  98253. },
  98254. TryStatement(node2, state) {
  98255. state.write("try ");
  98256. this[node2.block.type](node2.block, state);
  98257. if (node2.handler) {
  98258. const { handler } = node2;
  98259. if (handler.param == null) {
  98260. state.write(" catch ");
  98261. } else {
  98262. state.write(" catch (");
  98263. this[handler.param.type](handler.param, state);
  98264. state.write(") ");
  98265. }
  98266. this[handler.body.type](handler.body, state);
  98267. }
  98268. if (node2.finalizer) {
  98269. state.write(" finally ");
  98270. this[node2.finalizer.type](node2.finalizer, state);
  98271. }
  98272. },
  98273. WhileStatement(node2, state) {
  98274. state.write("while (");
  98275. this[node2.test.type](node2.test, state);
  98276. state.write(") ");
  98277. this[node2.body.type](node2.body, state);
  98278. },
  98279. DoWhileStatement(node2, state) {
  98280. state.write("do ");
  98281. this[node2.body.type](node2.body, state);
  98282. state.write(" while (");
  98283. this[node2.test.type](node2.test, state);
  98284. state.write(");");
  98285. },
  98286. ForStatement(node2, state) {
  98287. state.write("for (");
  98288. if (node2.init != null) {
  98289. const { init } = node2;
  98290. if (init.type[0] === "V") {
  98291. formatVariableDeclaration(state, init);
  98292. } else {
  98293. this[init.type](init, state);
  98294. }
  98295. }
  98296. state.write("; ");
  98297. if (node2.test) {
  98298. this[node2.test.type](node2.test, state);
  98299. }
  98300. state.write("; ");
  98301. if (node2.update) {
  98302. this[node2.update.type](node2.update, state);
  98303. }
  98304. state.write(") ");
  98305. this[node2.body.type](node2.body, state);
  98306. },
  98307. ForInStatement: ForInStatement = function(node2, state) {
  98308. state.write(`for ${node2.await ? "await " : ""}(`);
  98309. const { left } = node2;
  98310. if (left.type[0] === "V") {
  98311. formatVariableDeclaration(state, left);
  98312. } else {
  98313. this[left.type](left, state);
  98314. }
  98315. state.write(node2.type[3] === "I" ? " in " : " of ");
  98316. this[node2.right.type](node2.right, state);
  98317. state.write(") ");
  98318. this[node2.body.type](node2.body, state);
  98319. },
  98320. ForOfStatement: ForInStatement,
  98321. DebuggerStatement(node2, state) {
  98322. state.write("debugger;", node2);
  98323. },
  98324. FunctionDeclaration: FunctionDeclaration = function(node2, state) {
  98325. state.write(
  98326. (node2.async ? "async " : "") + (node2.generator ? "function* " : "function ") + (node2.id ? node2.id.name : ""),
  98327. node2
  98328. );
  98329. formatSequence(state, node2.params);
  98330. state.write(" ");
  98331. this[node2.body.type](node2.body, state);
  98332. },
  98333. FunctionExpression: FunctionDeclaration,
  98334. VariableDeclaration(node2, state) {
  98335. formatVariableDeclaration(state, node2);
  98336. state.write(";");
  98337. },
  98338. VariableDeclarator(node2, state) {
  98339. this[node2.id.type](node2.id, state);
  98340. if (node2.init != null) {
  98341. state.write(" = ");
  98342. this[node2.init.type](node2.init, state);
  98343. }
  98344. },
  98345. ClassDeclaration(node2, state) {
  98346. state.write("class " + (node2.id ? `${node2.id.name} ` : ""), node2);
  98347. if (node2.superClass) {
  98348. state.write("extends ");
  98349. const { superClass } = node2;
  98350. const { type } = superClass;
  98351. const precedence = state.expressionsPrecedence[type];
  98352. if ((type[0] !== "C" || type[1] !== "l" || type[5] !== "E") && (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.ClassExpression)) {
  98353. state.write("(");
  98354. this[node2.superClass.type](superClass, state);
  98355. state.write(")");
  98356. } else {
  98357. this[superClass.type](superClass, state);
  98358. }
  98359. state.write(" ");
  98360. }
  98361. this.ClassBody(node2.body, state);
  98362. },
  98363. ImportDeclaration(node2, state) {
  98364. state.write("import ");
  98365. const { specifiers } = node2;
  98366. const { length } = specifiers;
  98367. let i = 0;
  98368. if (length > 0) {
  98369. for (; i < length; ) {
  98370. if (i > 0) {
  98371. state.write(", ");
  98372. }
  98373. const specifier = specifiers[i];
  98374. const type = specifier.type[6];
  98375. if (type === "D") {
  98376. state.write(specifier.local.name, specifier);
  98377. i++;
  98378. } else if (type === "N") {
  98379. state.write("* as " + specifier.local.name, specifier);
  98380. i++;
  98381. } else {
  98382. break;
  98383. }
  98384. }
  98385. if (i < length) {
  98386. state.write("{");
  98387. for (; ; ) {
  98388. const specifier = specifiers[i];
  98389. const { name: name2 } = specifier.imported;
  98390. state.write(name2, specifier);
  98391. if (name2 !== specifier.local.name) {
  98392. state.write(" as " + specifier.local.name);
  98393. }
  98394. if (++i < length) {
  98395. state.write(", ");
  98396. } else {
  98397. break;
  98398. }
  98399. }
  98400. state.write("}");
  98401. }
  98402. state.write(" from ");
  98403. }
  98404. this.Literal(node2.source, state);
  98405. state.write(";");
  98406. },
  98407. ImportExpression(node2, state) {
  98408. state.write("import(");
  98409. this[node2.source.type](node2.source, state);
  98410. state.write(")");
  98411. },
  98412. ExportDefaultDeclaration(node2, state) {
  98413. state.write("export default ");
  98414. this[node2.declaration.type](node2.declaration, state);
  98415. if (state.expressionsPrecedence[node2.declaration.type] != null && node2.declaration.type[0] !== "F") {
  98416. state.write(";");
  98417. }
  98418. },
  98419. ExportNamedDeclaration(node2, state) {
  98420. state.write("export ");
  98421. if (node2.declaration) {
  98422. this[node2.declaration.type](node2.declaration, state);
  98423. } else {
  98424. state.write("{");
  98425. const { specifiers } = node2, { length } = specifiers;
  98426. if (length > 0) {
  98427. for (let i = 0; ; ) {
  98428. const specifier = specifiers[i];
  98429. const { name: name2 } = specifier.local;
  98430. state.write(name2, specifier);
  98431. if (name2 !== specifier.exported.name) {
  98432. state.write(" as " + specifier.exported.name);
  98433. }
  98434. if (++i < length) {
  98435. state.write(", ");
  98436. } else {
  98437. break;
  98438. }
  98439. }
  98440. }
  98441. state.write("}");
  98442. if (node2.source) {
  98443. state.write(" from ");
  98444. this.Literal(node2.source, state);
  98445. }
  98446. state.write(";");
  98447. }
  98448. },
  98449. ExportAllDeclaration(node2, state) {
  98450. if (node2.exported != null) {
  98451. state.write("export * as " + node2.exported.name + " from ");
  98452. } else {
  98453. state.write("export * from ");
  98454. }
  98455. this.Literal(node2.source, state);
  98456. state.write(";");
  98457. },
  98458. MethodDefinition(node2, state) {
  98459. if (node2.static) {
  98460. state.write("static ");
  98461. }
  98462. const kind = node2.kind[0];
  98463. if (kind === "g" || kind === "s") {
  98464. state.write(node2.kind + " ");
  98465. }
  98466. if (node2.value.async) {
  98467. state.write("async ");
  98468. }
  98469. if (node2.value.generator) {
  98470. state.write("*");
  98471. }
  98472. if (node2.computed) {
  98473. state.write("[");
  98474. this[node2.key.type](node2.key, state);
  98475. state.write("]");
  98476. } else {
  98477. this[node2.key.type](node2.key, state);
  98478. }
  98479. formatSequence(state, node2.value.params);
  98480. state.write(" ");
  98481. this[node2.value.body.type](node2.value.body, state);
  98482. },
  98483. ClassExpression(node2, state) {
  98484. this.ClassDeclaration(node2, state);
  98485. },
  98486. ArrowFunctionExpression(node2, state) {
  98487. state.write(node2.async ? "async " : "", node2);
  98488. const { params } = node2;
  98489. if (params != null) {
  98490. if (params.length === 1 && params[0].type[0] === "I") {
  98491. state.write(params[0].name, params[0]);
  98492. } else {
  98493. formatSequence(state, node2.params);
  98494. }
  98495. }
  98496. state.write(" => ");
  98497. if (node2.body.type[0] === "O") {
  98498. state.write("(");
  98499. this.ObjectExpression(node2.body, state);
  98500. state.write(")");
  98501. } else {
  98502. this[node2.body.type](node2.body, state);
  98503. }
  98504. },
  98505. ThisExpression(node2, state) {
  98506. state.write("this", node2);
  98507. },
  98508. Super(node2, state) {
  98509. state.write("super", node2);
  98510. },
  98511. RestElement: RestElement = function(node2, state) {
  98512. state.write("...");
  98513. this[node2.argument.type](node2.argument, state);
  98514. },
  98515. SpreadElement: RestElement,
  98516. YieldExpression(node2, state) {
  98517. state.write(node2.delegate ? "yield*" : "yield");
  98518. if (node2.argument) {
  98519. state.write(" ");
  98520. this[node2.argument.type](node2.argument, state);
  98521. }
  98522. },
  98523. AwaitExpression(node2, state) {
  98524. state.write("await ", node2);
  98525. formatExpression(state, node2.argument, node2);
  98526. },
  98527. TemplateLiteral(node2, state) {
  98528. const { quasis, expressions } = node2;
  98529. state.write("`");
  98530. const { length } = expressions;
  98531. for (let i = 0; i < length; i++) {
  98532. const expression = expressions[i];
  98533. const quasi2 = quasis[i];
  98534. state.write(quasi2.value.raw, quasi2);
  98535. state.write("${");
  98536. this[expression.type](expression, state);
  98537. state.write("}");
  98538. }
  98539. const quasi = quasis[quasis.length - 1];
  98540. state.write(quasi.value.raw, quasi);
  98541. state.write("`");
  98542. },
  98543. TemplateElement(node2, state) {
  98544. state.write(node2.value.raw, node2);
  98545. },
  98546. TaggedTemplateExpression(node2, state) {
  98547. formatExpression(state, node2.tag, node2);
  98548. this[node2.quasi.type](node2.quasi, state);
  98549. },
  98550. ArrayExpression: ArrayExpression = function(node2, state) {
  98551. state.write("[");
  98552. if (node2.elements.length > 0) {
  98553. const { elements } = node2, { length } = elements;
  98554. for (let i = 0; ; ) {
  98555. const element2 = elements[i];
  98556. if (element2 != null) {
  98557. this[element2.type](element2, state);
  98558. }
  98559. if (++i < length) {
  98560. state.write(", ");
  98561. } else {
  98562. if (element2 == null) {
  98563. state.write(", ");
  98564. }
  98565. break;
  98566. }
  98567. }
  98568. }
  98569. state.write("]");
  98570. },
  98571. ArrayPattern: ArrayExpression,
  98572. ObjectExpression(node2, state) {
  98573. const indent = state.indent.repeat(state.indentLevel++);
  98574. const { lineEnd, writeComments } = state;
  98575. const propertyIndent = indent + state.indent;
  98576. state.write("{");
  98577. if (node2.properties.length > 0) {
  98578. state.write(lineEnd);
  98579. if (writeComments && node2.comments != null) {
  98580. formatComments(state, node2.comments, propertyIndent, lineEnd);
  98581. }
  98582. const comma = "," + lineEnd;
  98583. const { properties } = node2, { length } = properties;
  98584. for (let i = 0; ; ) {
  98585. const property = properties[i];
  98586. if (writeComments && property.comments != null) {
  98587. formatComments(state, property.comments, propertyIndent, lineEnd);
  98588. }
  98589. state.write(propertyIndent);
  98590. this[property.type](property, state);
  98591. if (++i < length) {
  98592. state.write(comma);
  98593. } else {
  98594. break;
  98595. }
  98596. }
  98597. state.write(lineEnd);
  98598. if (writeComments && node2.trailingComments != null) {
  98599. formatComments(state, node2.trailingComments, propertyIndent, lineEnd);
  98600. }
  98601. state.write(indent + "}");
  98602. } else if (writeComments) {
  98603. if (node2.comments != null) {
  98604. state.write(lineEnd);
  98605. formatComments(state, node2.comments, propertyIndent, lineEnd);
  98606. if (node2.trailingComments != null) {
  98607. formatComments(state, node2.trailingComments, propertyIndent, lineEnd);
  98608. }
  98609. state.write(indent + "}");
  98610. } else if (node2.trailingComments != null) {
  98611. state.write(lineEnd);
  98612. formatComments(state, node2.trailingComments, propertyIndent, lineEnd);
  98613. state.write(indent + "}");
  98614. } else {
  98615. state.write("}");
  98616. }
  98617. } else {
  98618. state.write("}");
  98619. }
  98620. state.indentLevel--;
  98621. },
  98622. Property(node2, state) {
  98623. if (node2.method || node2.kind[0] !== "i") {
  98624. this.MethodDefinition(node2, state);
  98625. } else {
  98626. if (!node2.shorthand) {
  98627. if (node2.computed) {
  98628. state.write("[");
  98629. this[node2.key.type](node2.key, state);
  98630. state.write("]");
  98631. } else {
  98632. this[node2.key.type](node2.key, state);
  98633. }
  98634. state.write(": ");
  98635. }
  98636. this[node2.value.type](node2.value, state);
  98637. }
  98638. },
  98639. PropertyDefinition(node2, state) {
  98640. if (node2.static) {
  98641. state.write("static ");
  98642. }
  98643. if (node2.computed) {
  98644. state.write("[");
  98645. }
  98646. this[node2.key.type](node2.key, state);
  98647. if (node2.computed) {
  98648. state.write("]");
  98649. }
  98650. if (node2.value == null) {
  98651. if (node2.key.type[0] !== "F") {
  98652. state.write(";");
  98653. }
  98654. return;
  98655. }
  98656. state.write(" = ");
  98657. this[node2.value.type](node2.value, state);
  98658. state.write(";");
  98659. },
  98660. ObjectPattern(node2, state) {
  98661. state.write("{");
  98662. if (node2.properties.length > 0) {
  98663. const { properties } = node2, { length } = properties;
  98664. for (let i = 0; ; ) {
  98665. this[properties[i].type](properties[i], state);
  98666. if (++i < length) {
  98667. state.write(", ");
  98668. } else {
  98669. break;
  98670. }
  98671. }
  98672. }
  98673. state.write("}");
  98674. },
  98675. SequenceExpression(node2, state) {
  98676. formatSequence(state, node2.expressions);
  98677. },
  98678. UnaryExpression(node2, state) {
  98679. if (node2.prefix) {
  98680. const {
  98681. operator,
  98682. argument,
  98683. argument: { type }
  98684. } = node2;
  98685. state.write(operator);
  98686. const needsParentheses = expressionNeedsParenthesis(state, argument, node2);
  98687. if (!needsParentheses && (operator.length > 1 || type[0] === "U" && (type[1] === "n" || type[1] === "p") && argument.prefix && argument.operator[0] === operator && (operator === "+" || operator === "-"))) {
  98688. state.write(" ");
  98689. }
  98690. if (needsParentheses) {
  98691. state.write(operator.length > 1 ? " (" : "(");
  98692. this[type](argument, state);
  98693. state.write(")");
  98694. } else {
  98695. this[type](argument, state);
  98696. }
  98697. } else {
  98698. this[node2.argument.type](node2.argument, state);
  98699. state.write(node2.operator);
  98700. }
  98701. },
  98702. UpdateExpression(node2, state) {
  98703. if (node2.prefix) {
  98704. state.write(node2.operator);
  98705. this[node2.argument.type](node2.argument, state);
  98706. } else {
  98707. this[node2.argument.type](node2.argument, state);
  98708. state.write(node2.operator);
  98709. }
  98710. },
  98711. AssignmentExpression(node2, state) {
  98712. this[node2.left.type](node2.left, state);
  98713. state.write(" " + node2.operator + " ");
  98714. this[node2.right.type](node2.right, state);
  98715. },
  98716. AssignmentPattern(node2, state) {
  98717. this[node2.left.type](node2.left, state);
  98718. state.write(" = ");
  98719. this[node2.right.type](node2.right, state);
  98720. },
  98721. BinaryExpression: BinaryExpression = function(node2, state) {
  98722. const isIn = node2.operator === "in";
  98723. if (isIn) {
  98724. state.write("(");
  98725. }
  98726. formatExpression(state, node2.left, node2, false);
  98727. state.write(" " + node2.operator + " ");
  98728. formatExpression(state, node2.right, node2, true);
  98729. if (isIn) {
  98730. state.write(")");
  98731. }
  98732. },
  98733. LogicalExpression: BinaryExpression,
  98734. ConditionalExpression(node2, state) {
  98735. const { test } = node2;
  98736. const precedence = state.expressionsPrecedence[test.type];
  98737. if (precedence === NEEDS_PARENTHESES || precedence <= state.expressionsPrecedence.ConditionalExpression) {
  98738. state.write("(");
  98739. this[test.type](test, state);
  98740. state.write(")");
  98741. } else {
  98742. this[test.type](test, state);
  98743. }
  98744. state.write(" ? ");
  98745. this[node2.consequent.type](node2.consequent, state);
  98746. state.write(" : ");
  98747. this[node2.alternate.type](node2.alternate, state);
  98748. },
  98749. NewExpression(node2, state) {
  98750. state.write("new ");
  98751. const precedence = state.expressionsPrecedence[node2.callee.type];
  98752. if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression || hasCallExpression(node2.callee)) {
  98753. state.write("(");
  98754. this[node2.callee.type](node2.callee, state);
  98755. state.write(")");
  98756. } else {
  98757. this[node2.callee.type](node2.callee, state);
  98758. }
  98759. formatSequence(state, node2["arguments"]);
  98760. },
  98761. CallExpression(node2, state) {
  98762. const precedence = state.expressionsPrecedence[node2.callee.type];
  98763. if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression) {
  98764. state.write("(");
  98765. this[node2.callee.type](node2.callee, state);
  98766. state.write(")");
  98767. } else {
  98768. this[node2.callee.type](node2.callee, state);
  98769. }
  98770. if (node2.optional) {
  98771. state.write("?.");
  98772. }
  98773. formatSequence(state, node2["arguments"]);
  98774. },
  98775. ChainExpression(node2, state) {
  98776. this[node2.expression.type](node2.expression, state);
  98777. },
  98778. MemberExpression(node2, state) {
  98779. const precedence = state.expressionsPrecedence[node2.object.type];
  98780. if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.MemberExpression) {
  98781. state.write("(");
  98782. this[node2.object.type](node2.object, state);
  98783. state.write(")");
  98784. } else {
  98785. this[node2.object.type](node2.object, state);
  98786. }
  98787. if (node2.computed) {
  98788. if (node2.optional) {
  98789. state.write("?.");
  98790. }
  98791. state.write("[");
  98792. this[node2.property.type](node2.property, state);
  98793. state.write("]");
  98794. } else {
  98795. if (node2.optional) {
  98796. state.write("?.");
  98797. } else {
  98798. state.write(".");
  98799. }
  98800. this[node2.property.type](node2.property, state);
  98801. }
  98802. },
  98803. MetaProperty(node2, state) {
  98804. state.write(node2.meta.name + "." + node2.property.name, node2);
  98805. },
  98806. Identifier(node2, state) {
  98807. state.write(node2.name, node2);
  98808. },
  98809. PrivateIdentifier(node2, state) {
  98810. state.write(`#${node2.name}`, node2);
  98811. },
  98812. Literal(node2, state) {
  98813. if (node2.raw != null) {
  98814. state.write(node2.raw, node2);
  98815. } else if (node2.regex != null) {
  98816. this.RegExpLiteral(node2, state);
  98817. } else if (node2.bigint != null) {
  98818. state.write(node2.bigint + "n", node2);
  98819. } else {
  98820. state.write(stringify(node2.value), node2);
  98821. }
  98822. },
  98823. RegExpLiteral(node2, state) {
  98824. const { regex: regex2 } = node2;
  98825. state.write(`/${regex2.pattern}/${regex2.flags}`, node2);
  98826. }
  98827. };
  98828. var EMPTY_OBJECT = {};
  98829. var State = class {
  98830. constructor(options) {
  98831. const setup = options == null ? EMPTY_OBJECT : options;
  98832. this.output = "";
  98833. if (setup.output != null) {
  98834. this.output = setup.output;
  98835. this.write = this.writeToStream;
  98836. } else {
  98837. this.output = "";
  98838. }
  98839. this.generator = setup.generator != null ? setup.generator : GENERATOR;
  98840. this.expressionsPrecedence = setup.expressionsPrecedence != null ? setup.expressionsPrecedence : EXPRESSIONS_PRECEDENCE;
  98841. this.indent = setup.indent != null ? setup.indent : " ";
  98842. this.lineEnd = setup.lineEnd != null ? setup.lineEnd : "\n";
  98843. this.indentLevel = setup.startingIndentLevel != null ? setup.startingIndentLevel : 0;
  98844. this.writeComments = setup.comments ? setup.comments : false;
  98845. if (setup.sourceMap != null) {
  98846. this.write = setup.output == null ? this.writeAndMap : this.writeToStreamAndMap;
  98847. this.sourceMap = setup.sourceMap;
  98848. this.line = 1;
  98849. this.column = 0;
  98850. this.lineEndSize = this.lineEnd.split("\n").length - 1;
  98851. this.mapping = {
  98852. original: null,
  98853. // Uses the entire state to avoid generating ephemeral objects
  98854. generated: this,
  98855. name: void 0,
  98856. source: setup.sourceMap.file || setup.sourceMap._file
  98857. };
  98858. }
  98859. }
  98860. write(code2) {
  98861. this.output += code2;
  98862. }
  98863. writeToStream(code2) {
  98864. this.output.write(code2);
  98865. }
  98866. writeAndMap(code2, node2) {
  98867. this.output += code2;
  98868. this.map(code2, node2);
  98869. }
  98870. writeToStreamAndMap(code2, node2) {
  98871. this.output.write(code2);
  98872. this.map(code2, node2);
  98873. }
  98874. map(code2, node2) {
  98875. if (node2 != null) {
  98876. const { type } = node2;
  98877. if (type[0] === "L" && type[2] === "n") {
  98878. this.column = 0;
  98879. this.line++;
  98880. return;
  98881. }
  98882. if (node2.loc != null) {
  98883. const { mapping } = this;
  98884. mapping.original = node2.loc.start;
  98885. mapping.name = node2.name;
  98886. this.sourceMap.addMapping(mapping);
  98887. }
  98888. if (type[0] === "T" && type[8] === "E" || type[0] === "L" && type[1] === "i" && typeof node2.value === "string") {
  98889. const { length: length2 } = code2;
  98890. let { column: column2, line: line2 } = this;
  98891. for (let i = 0; i < length2; i++) {
  98892. if (code2[i] === "\n") {
  98893. column2 = 0;
  98894. line2++;
  98895. } else {
  98896. column2++;
  98897. }
  98898. }
  98899. this.column = column2;
  98900. this.line = line2;
  98901. return;
  98902. }
  98903. }
  98904. const { length } = code2;
  98905. const { lineEnd } = this;
  98906. if (length > 0) {
  98907. if (this.lineEndSize > 0 && (lineEnd.length === 1 ? code2[length - 1] === lineEnd : code2.endsWith(lineEnd))) {
  98908. this.line += this.lineEndSize;
  98909. this.column = 0;
  98910. } else {
  98911. this.column += length;
  98912. }
  98913. }
  98914. }
  98915. toString() {
  98916. return this.output;
  98917. }
  98918. };
  98919. function generate(node2, options) {
  98920. const state = new State(options);
  98921. state.generator[node2.type](node2, state);
  98922. return state.output;
  98923. }
  98924. // node_modules/estree-util-to-js/lib/index.js
  98925. var GENERATOR2 = GENERATOR;
  98926. var generate2 = generate;
  98927. var toJs = (
  98928. /**
  98929. * @type {(
  98930. * ((value: Program, options: OptionsWithSourceMapGenerator) => ResultWithSourceMapGenerator) &
  98931. * ((value: Program, options: OptionsWithMaybeMapGenerator) => ResultMaybeSourceMapGenerator) &
  98932. * ((value: Program, options?: OptionsWithoutSourceMapGenerator | null | undefined) => ResultWithoutSourceMapGenerator)
  98933. * )}
  98934. */
  98935. /**
  98936. * @param {Program} tree
  98937. * @param {Options | null | undefined} [options]
  98938. * @returns {Result}
  98939. */
  98940. function(tree, options) {
  98941. const { SourceMapGenerator, filePath, handlers: handlers3 } = options || {};
  98942. const sourceMap = SourceMapGenerator ? new SourceMapGenerator({ file: filePath || "<unknown>.js" }) : void 0;
  98943. const value2 = generate2(tree, {
  98944. comments: true,
  98945. generator: { ...GENERATOR2, ...handlers3 },
  98946. sourceMap
  98947. });
  98948. const map = sourceMap ? sourceMap.toJSON() : void 0;
  98949. return { value: value2, map };
  98950. }
  98951. );
  98952. // node_modules/estree-util-to-js/lib/jsx.js
  98953. var jsx = {
  98954. JSXAttribute,
  98955. JSXClosingElement,
  98956. JSXClosingFragment,
  98957. JSXElement,
  98958. JSXEmptyExpression,
  98959. JSXExpressionContainer,
  98960. JSXFragment,
  98961. JSXIdentifier,
  98962. JSXMemberExpression,
  98963. JSXNamespacedName,
  98964. JSXOpeningElement,
  98965. JSXOpeningFragment,
  98966. JSXSpreadAttribute,
  98967. JSXText
  98968. };
  98969. function JSXAttribute(node2, state) {
  98970. this[node2.name.type](node2.name, state);
  98971. if (node2.value !== void 0 && node2.value !== null) {
  98972. state.write("=");
  98973. if (node2.value.type === "Literal") {
  98974. state.write(
  98975. '"' + encodeJsx(String(node2.value.value)).replace(/"/g, "&quot;") + '"',
  98976. node2
  98977. );
  98978. } else {
  98979. this[node2.value.type](node2.value, state);
  98980. }
  98981. }
  98982. }
  98983. function JSXClosingElement(node2, state) {
  98984. state.write("</");
  98985. this[node2.name.type](node2.name, state);
  98986. state.write(">");
  98987. }
  98988. function JSXClosingFragment(node2, state) {
  98989. state.write("</>", node2);
  98990. }
  98991. function JSXElement(node2, state) {
  98992. let index2 = -1;
  98993. this[node2.openingElement.type](node2.openingElement, state);
  98994. if (node2.children) {
  98995. while (++index2 < node2.children.length) {
  98996. const child = node2.children[index2];
  98997. if (child.type === "JSXSpreadChild") {
  98998. throw new Error("JSX spread children are not supported");
  98999. }
  99000. this[child.type](child, state);
  99001. }
  99002. }
  99003. if (node2.closingElement) {
  99004. this[node2.closingElement.type](node2.closingElement, state);
  99005. }
  99006. }
  99007. function JSXEmptyExpression() {
  99008. }
  99009. function JSXExpressionContainer(node2, state) {
  99010. state.write("{");
  99011. this[node2.expression.type](node2.expression, state);
  99012. state.write("}");
  99013. }
  99014. function JSXFragment(node2, state) {
  99015. let index2 = -1;
  99016. this[node2.openingFragment.type](node2.openingFragment, state);
  99017. if (node2.children) {
  99018. while (++index2 < node2.children.length) {
  99019. const child = node2.children[index2];
  99020. if (child.type === "JSXSpreadChild") {
  99021. throw new Error("JSX spread children are not supported");
  99022. }
  99023. this[child.type](child, state);
  99024. }
  99025. }
  99026. this[node2.closingFragment.type](node2.closingFragment, state);
  99027. }
  99028. function JSXIdentifier(node2, state) {
  99029. state.write(node2.name, node2);
  99030. }
  99031. function JSXMemberExpression(node2, state) {
  99032. this[node2.object.type](node2.object, state);
  99033. state.write(".");
  99034. this[node2.property.type](node2.property, state);
  99035. }
  99036. function JSXNamespacedName(node2, state) {
  99037. this[node2.namespace.type](node2.namespace, state);
  99038. state.write(":");
  99039. this[node2.name.type](node2.name, state);
  99040. }
  99041. function JSXOpeningElement(node2, state) {
  99042. let index2 = -1;
  99043. state.write("<");
  99044. this[node2.name.type](node2.name, state);
  99045. if (node2.attributes) {
  99046. while (++index2 < node2.attributes.length) {
  99047. state.write(" ");
  99048. this[node2.attributes[index2].type](node2.attributes[index2], state);
  99049. }
  99050. }
  99051. state.write(node2.selfClosing ? " />" : ">");
  99052. }
  99053. function JSXOpeningFragment(node2, state) {
  99054. state.write("<>", node2);
  99055. }
  99056. function JSXSpreadAttribute(node2, state) {
  99057. state.write("{");
  99058. this.SpreadElement(node2, state);
  99059. state.write("}");
  99060. }
  99061. function JSXText(node2, state) {
  99062. state.write(
  99063. encodeJsx(node2.value).replace(
  99064. /[<>{}]/g,
  99065. ($0) => $0 === "<" ? "&lt;" : $0 === ">" ? "&gt;" : $0 === "{" ? "&#123;" : "&#125;"
  99066. ),
  99067. node2
  99068. );
  99069. }
  99070. function encodeJsx(value2) {
  99071. return value2.replace(/&(?=[#a-z])/gi, "&amp;");
  99072. }
  99073. // node_modules/@mdx-js/mdx/lib/plugin/recma-stringify.js
  99074. function recmaStringify(options) {
  99075. const { SourceMapGenerator } = options || {};
  99076. Object.assign(this, { Compiler: compiler2 });
  99077. function compiler2(tree, file) {
  99078. const result = SourceMapGenerator ? toJs(tree, {
  99079. filePath: file.path || "unknown.mdx",
  99080. SourceMapGenerator,
  99081. handlers: jsx
  99082. }) : toJs(tree, { handlers: jsx });
  99083. file.map = result.map;
  99084. return result.value;
  99085. }
  99086. }
  99087. // node_modules/hast-util-to-estree/lib/handlers/comment.js
  99088. function comment(node2, state) {
  99089. const result = { type: "Block", value: node2.value };
  99090. state.inherit(node2, result);
  99091. state.comments.push(result);
  99092. const expression = {
  99093. type: "JSXEmptyExpression",
  99094. // @ts-expect-error: `comments` is custom.
  99095. comments: [Object.assign({}, result, { leading: false, trailing: true })]
  99096. };
  99097. state.patch(node2, expression);
  99098. const container = { type: "JSXExpressionContainer", expression };
  99099. state.patch(node2, container);
  99100. return container;
  99101. }
  99102. // node_modules/comma-separated-tokens/index.js
  99103. function stringify2(values, options) {
  99104. const settings = options || {};
  99105. const input = values[values.length - 1] === "" ? [...values, ""] : values;
  99106. return input.join(
  99107. (settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")
  99108. ).trim();
  99109. }
  99110. // node_modules/property-information/lib/util/schema.js
  99111. var Schema = class {
  99112. /**
  99113. * @constructor
  99114. * @param {Properties} property
  99115. * @param {Normal} normal
  99116. * @param {string} [space]
  99117. */
  99118. constructor(property, normal, space2) {
  99119. this.property = property;
  99120. this.normal = normal;
  99121. if (space2) {
  99122. this.space = space2;
  99123. }
  99124. }
  99125. };
  99126. Schema.prototype.property = {};
  99127. Schema.prototype.normal = {};
  99128. Schema.prototype.space = null;
  99129. // node_modules/property-information/lib/util/merge.js
  99130. function merge(definitions2, space2) {
  99131. const property = {};
  99132. const normal = {};
  99133. let index2 = -1;
  99134. while (++index2 < definitions2.length) {
  99135. Object.assign(property, definitions2[index2].property);
  99136. Object.assign(normal, definitions2[index2].normal);
  99137. }
  99138. return new Schema(property, normal, space2);
  99139. }
  99140. // node_modules/property-information/lib/normalize.js
  99141. function normalize(value2) {
  99142. return value2.toLowerCase();
  99143. }
  99144. // node_modules/property-information/lib/util/info.js
  99145. var Info = class {
  99146. /**
  99147. * @constructor
  99148. * @param {string} property
  99149. * @param {string} attribute
  99150. */
  99151. constructor(property, attribute) {
  99152. this.property = property;
  99153. this.attribute = attribute;
  99154. }
  99155. };
  99156. Info.prototype.space = null;
  99157. Info.prototype.boolean = false;
  99158. Info.prototype.booleanish = false;
  99159. Info.prototype.overloadedBoolean = false;
  99160. Info.prototype.number = false;
  99161. Info.prototype.commaSeparated = false;
  99162. Info.prototype.spaceSeparated = false;
  99163. Info.prototype.commaOrSpaceSeparated = false;
  99164. Info.prototype.mustUseProperty = false;
  99165. Info.prototype.defined = false;
  99166. // node_modules/property-information/lib/util/types.js
  99167. var types_exports = {};
  99168. __export(types_exports, {
  99169. boolean: () => boolean,
  99170. booleanish: () => booleanish,
  99171. commaOrSpaceSeparated: () => commaOrSpaceSeparated,
  99172. commaSeparated: () => commaSeparated,
  99173. number: () => number,
  99174. overloadedBoolean: () => overloadedBoolean,
  99175. spaceSeparated: () => spaceSeparated
  99176. });
  99177. var powers = 0;
  99178. var boolean = increment();
  99179. var booleanish = increment();
  99180. var overloadedBoolean = increment();
  99181. var number = increment();
  99182. var spaceSeparated = increment();
  99183. var commaSeparated = increment();
  99184. var commaOrSpaceSeparated = increment();
  99185. function increment() {
  99186. return 2 ** ++powers;
  99187. }
  99188. // node_modules/property-information/lib/util/defined-info.js
  99189. var checks = Object.keys(types_exports);
  99190. var DefinedInfo = class extends Info {
  99191. /**
  99192. * @constructor
  99193. * @param {string} property
  99194. * @param {string} attribute
  99195. * @param {number|null} [mask]
  99196. * @param {string} [space]
  99197. */
  99198. constructor(property, attribute, mask, space2) {
  99199. let index2 = -1;
  99200. super(property, attribute);
  99201. mark(this, "space", space2);
  99202. if (typeof mask === "number") {
  99203. while (++index2 < checks.length) {
  99204. const check = checks[index2];
  99205. mark(this, checks[index2], (mask & types_exports[check]) === types_exports[check]);
  99206. }
  99207. }
  99208. }
  99209. };
  99210. DefinedInfo.prototype.defined = true;
  99211. function mark(values, key2, value2) {
  99212. if (value2) {
  99213. values[key2] = value2;
  99214. }
  99215. }
  99216. // node_modules/property-information/lib/util/create.js
  99217. var own8 = {}.hasOwnProperty;
  99218. function create3(definition2) {
  99219. const property = {};
  99220. const normal = {};
  99221. let prop;
  99222. for (prop in definition2.properties) {
  99223. if (own8.call(definition2.properties, prop)) {
  99224. const value2 = definition2.properties[prop];
  99225. const info = new DefinedInfo(
  99226. prop,
  99227. definition2.transform(definition2.attributes || {}, prop),
  99228. value2,
  99229. definition2.space
  99230. );
  99231. if (definition2.mustUseProperty && definition2.mustUseProperty.includes(prop)) {
  99232. info.mustUseProperty = true;
  99233. }
  99234. property[prop] = info;
  99235. normal[normalize(prop)] = prop;
  99236. normal[normalize(info.attribute)] = prop;
  99237. }
  99238. }
  99239. return new Schema(property, normal, definition2.space);
  99240. }
  99241. // node_modules/property-information/lib/xlink.js
  99242. var xlink = create3({
  99243. space: "xlink",
  99244. transform(_, prop) {
  99245. return "xlink:" + prop.slice(5).toLowerCase();
  99246. },
  99247. properties: {
  99248. xLinkActuate: null,
  99249. xLinkArcRole: null,
  99250. xLinkHref: null,
  99251. xLinkRole: null,
  99252. xLinkShow: null,
  99253. xLinkTitle: null,
  99254. xLinkType: null
  99255. }
  99256. });
  99257. // node_modules/property-information/lib/xml.js
  99258. var xml = create3({
  99259. space: "xml",
  99260. transform(_, prop) {
  99261. return "xml:" + prop.slice(3).toLowerCase();
  99262. },
  99263. properties: { xmlLang: null, xmlBase: null, xmlSpace: null }
  99264. });
  99265. // node_modules/property-information/lib/util/case-sensitive-transform.js
  99266. function caseSensitiveTransform(attributes, attribute) {
  99267. return attribute in attributes ? attributes[attribute] : attribute;
  99268. }
  99269. // node_modules/property-information/lib/util/case-insensitive-transform.js
  99270. function caseInsensitiveTransform(attributes, property) {
  99271. return caseSensitiveTransform(attributes, property.toLowerCase());
  99272. }
  99273. // node_modules/property-information/lib/xmlns.js
  99274. var xmlns = create3({
  99275. space: "xmlns",
  99276. attributes: { xmlnsxlink: "xmlns:xlink" },
  99277. transform: caseInsensitiveTransform,
  99278. properties: { xmlns: null, xmlnsXLink: null }
  99279. });
  99280. // node_modules/property-information/lib/aria.js
  99281. var aria = create3({
  99282. transform(_, prop) {
  99283. return prop === "role" ? prop : "aria-" + prop.slice(4).toLowerCase();
  99284. },
  99285. properties: {
  99286. ariaActiveDescendant: null,
  99287. ariaAtomic: booleanish,
  99288. ariaAutoComplete: null,
  99289. ariaBusy: booleanish,
  99290. ariaChecked: booleanish,
  99291. ariaColCount: number,
  99292. ariaColIndex: number,
  99293. ariaColSpan: number,
  99294. ariaControls: spaceSeparated,
  99295. ariaCurrent: null,
  99296. ariaDescribedBy: spaceSeparated,
  99297. ariaDetails: null,
  99298. ariaDisabled: booleanish,
  99299. ariaDropEffect: spaceSeparated,
  99300. ariaErrorMessage: null,
  99301. ariaExpanded: booleanish,
  99302. ariaFlowTo: spaceSeparated,
  99303. ariaGrabbed: booleanish,
  99304. ariaHasPopup: null,
  99305. ariaHidden: booleanish,
  99306. ariaInvalid: null,
  99307. ariaKeyShortcuts: null,
  99308. ariaLabel: null,
  99309. ariaLabelledBy: spaceSeparated,
  99310. ariaLevel: number,
  99311. ariaLive: null,
  99312. ariaModal: booleanish,
  99313. ariaMultiLine: booleanish,
  99314. ariaMultiSelectable: booleanish,
  99315. ariaOrientation: null,
  99316. ariaOwns: spaceSeparated,
  99317. ariaPlaceholder: null,
  99318. ariaPosInSet: number,
  99319. ariaPressed: booleanish,
  99320. ariaReadOnly: booleanish,
  99321. ariaRelevant: null,
  99322. ariaRequired: booleanish,
  99323. ariaRoleDescription: spaceSeparated,
  99324. ariaRowCount: number,
  99325. ariaRowIndex: number,
  99326. ariaRowSpan: number,
  99327. ariaSelected: booleanish,
  99328. ariaSetSize: number,
  99329. ariaSort: null,
  99330. ariaValueMax: number,
  99331. ariaValueMin: number,
  99332. ariaValueNow: number,
  99333. ariaValueText: null,
  99334. role: null
  99335. }
  99336. });
  99337. // node_modules/property-information/lib/html.js
  99338. var html2 = create3({
  99339. space: "html",
  99340. attributes: {
  99341. acceptcharset: "accept-charset",
  99342. classname: "class",
  99343. htmlfor: "for",
  99344. httpequiv: "http-equiv"
  99345. },
  99346. transform: caseInsensitiveTransform,
  99347. mustUseProperty: ["checked", "multiple", "muted", "selected"],
  99348. properties: {
  99349. // Standard Properties.
  99350. abbr: null,
  99351. accept: commaSeparated,
  99352. acceptCharset: spaceSeparated,
  99353. accessKey: spaceSeparated,
  99354. action: null,
  99355. allow: null,
  99356. allowFullScreen: boolean,
  99357. allowPaymentRequest: boolean,
  99358. allowUserMedia: boolean,
  99359. alt: null,
  99360. as: null,
  99361. async: boolean,
  99362. autoCapitalize: null,
  99363. autoComplete: spaceSeparated,
  99364. autoFocus: boolean,
  99365. autoPlay: boolean,
  99366. capture: boolean,
  99367. charSet: null,
  99368. checked: boolean,
  99369. cite: null,
  99370. className: spaceSeparated,
  99371. cols: number,
  99372. colSpan: null,
  99373. content: null,
  99374. contentEditable: booleanish,
  99375. controls: boolean,
  99376. controlsList: spaceSeparated,
  99377. coords: number | commaSeparated,
  99378. crossOrigin: null,
  99379. data: null,
  99380. dateTime: null,
  99381. decoding: null,
  99382. default: boolean,
  99383. defer: boolean,
  99384. dir: null,
  99385. dirName: null,
  99386. disabled: boolean,
  99387. download: overloadedBoolean,
  99388. draggable: booleanish,
  99389. encType: null,
  99390. enterKeyHint: null,
  99391. form: null,
  99392. formAction: null,
  99393. formEncType: null,
  99394. formMethod: null,
  99395. formNoValidate: boolean,
  99396. formTarget: null,
  99397. headers: spaceSeparated,
  99398. height: number,
  99399. hidden: boolean,
  99400. high: number,
  99401. href: null,
  99402. hrefLang: null,
  99403. htmlFor: spaceSeparated,
  99404. httpEquiv: spaceSeparated,
  99405. id: null,
  99406. imageSizes: null,
  99407. imageSrcSet: null,
  99408. inputMode: null,
  99409. integrity: null,
  99410. is: null,
  99411. isMap: boolean,
  99412. itemId: null,
  99413. itemProp: spaceSeparated,
  99414. itemRef: spaceSeparated,
  99415. itemScope: boolean,
  99416. itemType: spaceSeparated,
  99417. kind: null,
  99418. label: null,
  99419. lang: null,
  99420. language: null,
  99421. list: null,
  99422. loading: null,
  99423. loop: boolean,
  99424. low: number,
  99425. manifest: null,
  99426. max: null,
  99427. maxLength: number,
  99428. media: null,
  99429. method: null,
  99430. min: null,
  99431. minLength: number,
  99432. multiple: boolean,
  99433. muted: boolean,
  99434. name: null,
  99435. nonce: null,
  99436. noModule: boolean,
  99437. noValidate: boolean,
  99438. onAbort: null,
  99439. onAfterPrint: null,
  99440. onAuxClick: null,
  99441. onBeforeMatch: null,
  99442. onBeforePrint: null,
  99443. onBeforeUnload: null,
  99444. onBlur: null,
  99445. onCancel: null,
  99446. onCanPlay: null,
  99447. onCanPlayThrough: null,
  99448. onChange: null,
  99449. onClick: null,
  99450. onClose: null,
  99451. onContextLost: null,
  99452. onContextMenu: null,
  99453. onContextRestored: null,
  99454. onCopy: null,
  99455. onCueChange: null,
  99456. onCut: null,
  99457. onDblClick: null,
  99458. onDrag: null,
  99459. onDragEnd: null,
  99460. onDragEnter: null,
  99461. onDragExit: null,
  99462. onDragLeave: null,
  99463. onDragOver: null,
  99464. onDragStart: null,
  99465. onDrop: null,
  99466. onDurationChange: null,
  99467. onEmptied: null,
  99468. onEnded: null,
  99469. onError: null,
  99470. onFocus: null,
  99471. onFormData: null,
  99472. onHashChange: null,
  99473. onInput: null,
  99474. onInvalid: null,
  99475. onKeyDown: null,
  99476. onKeyPress: null,
  99477. onKeyUp: null,
  99478. onLanguageChange: null,
  99479. onLoad: null,
  99480. onLoadedData: null,
  99481. onLoadedMetadata: null,
  99482. onLoadEnd: null,
  99483. onLoadStart: null,
  99484. onMessage: null,
  99485. onMessageError: null,
  99486. onMouseDown: null,
  99487. onMouseEnter: null,
  99488. onMouseLeave: null,
  99489. onMouseMove: null,
  99490. onMouseOut: null,
  99491. onMouseOver: null,
  99492. onMouseUp: null,
  99493. onOffline: null,
  99494. onOnline: null,
  99495. onPageHide: null,
  99496. onPageShow: null,
  99497. onPaste: null,
  99498. onPause: null,
  99499. onPlay: null,
  99500. onPlaying: null,
  99501. onPopState: null,
  99502. onProgress: null,
  99503. onRateChange: null,
  99504. onRejectionHandled: null,
  99505. onReset: null,
  99506. onResize: null,
  99507. onScroll: null,
  99508. onScrollEnd: null,
  99509. onSecurityPolicyViolation: null,
  99510. onSeeked: null,
  99511. onSeeking: null,
  99512. onSelect: null,
  99513. onSlotChange: null,
  99514. onStalled: null,
  99515. onStorage: null,
  99516. onSubmit: null,
  99517. onSuspend: null,
  99518. onTimeUpdate: null,
  99519. onToggle: null,
  99520. onUnhandledRejection: null,
  99521. onUnload: null,
  99522. onVolumeChange: null,
  99523. onWaiting: null,
  99524. onWheel: null,
  99525. open: boolean,
  99526. optimum: number,
  99527. pattern: null,
  99528. ping: spaceSeparated,
  99529. placeholder: null,
  99530. playsInline: boolean,
  99531. poster: null,
  99532. preload: null,
  99533. readOnly: boolean,
  99534. referrerPolicy: null,
  99535. rel: spaceSeparated,
  99536. required: boolean,
  99537. reversed: boolean,
  99538. rows: number,
  99539. rowSpan: number,
  99540. sandbox: spaceSeparated,
  99541. scope: null,
  99542. scoped: boolean,
  99543. seamless: boolean,
  99544. selected: boolean,
  99545. shape: null,
  99546. size: number,
  99547. sizes: null,
  99548. slot: null,
  99549. span: number,
  99550. spellCheck: booleanish,
  99551. src: null,
  99552. srcDoc: null,
  99553. srcLang: null,
  99554. srcSet: null,
  99555. start: number,
  99556. step: null,
  99557. style: null,
  99558. tabIndex: number,
  99559. target: null,
  99560. title: null,
  99561. translate: null,
  99562. type: null,
  99563. typeMustMatch: boolean,
  99564. useMap: null,
  99565. value: booleanish,
  99566. width: number,
  99567. wrap: null,
  99568. // Legacy.
  99569. // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
  99570. align: null,
  99571. // Several. Use CSS `text-align` instead,
  99572. aLink: null,
  99573. // `<body>`. Use CSS `a:active {color}` instead
  99574. archive: spaceSeparated,
  99575. // `<object>`. List of URIs to archives
  99576. axis: null,
  99577. // `<td>` and `<th>`. Use `scope` on `<th>`
  99578. background: null,
  99579. // `<body>`. Use CSS `background-image` instead
  99580. bgColor: null,
  99581. // `<body>` and table elements. Use CSS `background-color` instead
  99582. border: number,
  99583. // `<table>`. Use CSS `border-width` instead,
  99584. borderColor: null,
  99585. // `<table>`. Use CSS `border-color` instead,
  99586. bottomMargin: number,
  99587. // `<body>`
  99588. cellPadding: null,
  99589. // `<table>`
  99590. cellSpacing: null,
  99591. // `<table>`
  99592. char: null,
  99593. // Several table elements. When `align=char`, sets the character to align on
  99594. charOff: null,
  99595. // Several table elements. When `char`, offsets the alignment
  99596. classId: null,
  99597. // `<object>`
  99598. clear: null,
  99599. // `<br>`. Use CSS `clear` instead
  99600. code: null,
  99601. // `<object>`
  99602. codeBase: null,
  99603. // `<object>`
  99604. codeType: null,
  99605. // `<object>`
  99606. color: null,
  99607. // `<font>` and `<hr>`. Use CSS instead
  99608. compact: boolean,
  99609. // Lists. Use CSS to reduce space between items instead
  99610. declare: boolean,
  99611. // `<object>`
  99612. event: null,
  99613. // `<script>`
  99614. face: null,
  99615. // `<font>`. Use CSS instead
  99616. frame: null,
  99617. // `<table>`
  99618. frameBorder: null,
  99619. // `<iframe>`. Use CSS `border` instead
  99620. hSpace: number,
  99621. // `<img>` and `<object>`
  99622. leftMargin: number,
  99623. // `<body>`
  99624. link: null,
  99625. // `<body>`. Use CSS `a:link {color: *}` instead
  99626. longDesc: null,
  99627. // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
  99628. lowSrc: null,
  99629. // `<img>`. Use a `<picture>`
  99630. marginHeight: number,
  99631. // `<body>`
  99632. marginWidth: number,
  99633. // `<body>`
  99634. noResize: boolean,
  99635. // `<frame>`
  99636. noHref: boolean,
  99637. // `<area>`. Use no href instead of an explicit `nohref`
  99638. noShade: boolean,
  99639. // `<hr>`. Use background-color and height instead of borders
  99640. noWrap: boolean,
  99641. // `<td>` and `<th>`
  99642. object: null,
  99643. // `<applet>`
  99644. profile: null,
  99645. // `<head>`
  99646. prompt: null,
  99647. // `<isindex>`
  99648. rev: null,
  99649. // `<link>`
  99650. rightMargin: number,
  99651. // `<body>`
  99652. rules: null,
  99653. // `<table>`
  99654. scheme: null,
  99655. // `<meta>`
  99656. scrolling: booleanish,
  99657. // `<frame>`. Use overflow in the child context
  99658. standby: null,
  99659. // `<object>`
  99660. summary: null,
  99661. // `<table>`
  99662. text: null,
  99663. // `<body>`. Use CSS `color` instead
  99664. topMargin: number,
  99665. // `<body>`
  99666. valueType: null,
  99667. // `<param>`
  99668. version: null,
  99669. // `<html>`. Use a doctype.
  99670. vAlign: null,
  99671. // Several. Use CSS `vertical-align` instead
  99672. vLink: null,
  99673. // `<body>`. Use CSS `a:visited {color}` instead
  99674. vSpace: number,
  99675. // `<img>` and `<object>`
  99676. // Non-standard Properties.
  99677. allowTransparency: null,
  99678. autoCorrect: null,
  99679. autoSave: null,
  99680. disablePictureInPicture: boolean,
  99681. disableRemotePlayback: boolean,
  99682. prefix: null,
  99683. property: null,
  99684. results: number,
  99685. security: null,
  99686. unselectable: null
  99687. }
  99688. });
  99689. // node_modules/property-information/lib/svg.js
  99690. var svg = create3({
  99691. space: "svg",
  99692. attributes: {
  99693. accentHeight: "accent-height",
  99694. alignmentBaseline: "alignment-baseline",
  99695. arabicForm: "arabic-form",
  99696. baselineShift: "baseline-shift",
  99697. capHeight: "cap-height",
  99698. className: "class",
  99699. clipPath: "clip-path",
  99700. clipRule: "clip-rule",
  99701. colorInterpolation: "color-interpolation",
  99702. colorInterpolationFilters: "color-interpolation-filters",
  99703. colorProfile: "color-profile",
  99704. colorRendering: "color-rendering",
  99705. crossOrigin: "crossorigin",
  99706. dataType: "datatype",
  99707. dominantBaseline: "dominant-baseline",
  99708. enableBackground: "enable-background",
  99709. fillOpacity: "fill-opacity",
  99710. fillRule: "fill-rule",
  99711. floodColor: "flood-color",
  99712. floodOpacity: "flood-opacity",
  99713. fontFamily: "font-family",
  99714. fontSize: "font-size",
  99715. fontSizeAdjust: "font-size-adjust",
  99716. fontStretch: "font-stretch",
  99717. fontStyle: "font-style",
  99718. fontVariant: "font-variant",
  99719. fontWeight: "font-weight",
  99720. glyphName: "glyph-name",
  99721. glyphOrientationHorizontal: "glyph-orientation-horizontal",
  99722. glyphOrientationVertical: "glyph-orientation-vertical",
  99723. hrefLang: "hreflang",
  99724. horizAdvX: "horiz-adv-x",
  99725. horizOriginX: "horiz-origin-x",
  99726. horizOriginY: "horiz-origin-y",
  99727. imageRendering: "image-rendering",
  99728. letterSpacing: "letter-spacing",
  99729. lightingColor: "lighting-color",
  99730. markerEnd: "marker-end",
  99731. markerMid: "marker-mid",
  99732. markerStart: "marker-start",
  99733. navDown: "nav-down",
  99734. navDownLeft: "nav-down-left",
  99735. navDownRight: "nav-down-right",
  99736. navLeft: "nav-left",
  99737. navNext: "nav-next",
  99738. navPrev: "nav-prev",
  99739. navRight: "nav-right",
  99740. navUp: "nav-up",
  99741. navUpLeft: "nav-up-left",
  99742. navUpRight: "nav-up-right",
  99743. onAbort: "onabort",
  99744. onActivate: "onactivate",
  99745. onAfterPrint: "onafterprint",
  99746. onBeforePrint: "onbeforeprint",
  99747. onBegin: "onbegin",
  99748. onCancel: "oncancel",
  99749. onCanPlay: "oncanplay",
  99750. onCanPlayThrough: "oncanplaythrough",
  99751. onChange: "onchange",
  99752. onClick: "onclick",
  99753. onClose: "onclose",
  99754. onCopy: "oncopy",
  99755. onCueChange: "oncuechange",
  99756. onCut: "oncut",
  99757. onDblClick: "ondblclick",
  99758. onDrag: "ondrag",
  99759. onDragEnd: "ondragend",
  99760. onDragEnter: "ondragenter",
  99761. onDragExit: "ondragexit",
  99762. onDragLeave: "ondragleave",
  99763. onDragOver: "ondragover",
  99764. onDragStart: "ondragstart",
  99765. onDrop: "ondrop",
  99766. onDurationChange: "ondurationchange",
  99767. onEmptied: "onemptied",
  99768. onEnd: "onend",
  99769. onEnded: "onended",
  99770. onError: "onerror",
  99771. onFocus: "onfocus",
  99772. onFocusIn: "onfocusin",
  99773. onFocusOut: "onfocusout",
  99774. onHashChange: "onhashchange",
  99775. onInput: "oninput",
  99776. onInvalid: "oninvalid",
  99777. onKeyDown: "onkeydown",
  99778. onKeyPress: "onkeypress",
  99779. onKeyUp: "onkeyup",
  99780. onLoad: "onload",
  99781. onLoadedData: "onloadeddata",
  99782. onLoadedMetadata: "onloadedmetadata",
  99783. onLoadStart: "onloadstart",
  99784. onMessage: "onmessage",
  99785. onMouseDown: "onmousedown",
  99786. onMouseEnter: "onmouseenter",
  99787. onMouseLeave: "onmouseleave",
  99788. onMouseMove: "onmousemove",
  99789. onMouseOut: "onmouseout",
  99790. onMouseOver: "onmouseover",
  99791. onMouseUp: "onmouseup",
  99792. onMouseWheel: "onmousewheel",
  99793. onOffline: "onoffline",
  99794. onOnline: "ononline",
  99795. onPageHide: "onpagehide",
  99796. onPageShow: "onpageshow",
  99797. onPaste: "onpaste",
  99798. onPause: "onpause",
  99799. onPlay: "onplay",
  99800. onPlaying: "onplaying",
  99801. onPopState: "onpopstate",
  99802. onProgress: "onprogress",
  99803. onRateChange: "onratechange",
  99804. onRepeat: "onrepeat",
  99805. onReset: "onreset",
  99806. onResize: "onresize",
  99807. onScroll: "onscroll",
  99808. onSeeked: "onseeked",
  99809. onSeeking: "onseeking",
  99810. onSelect: "onselect",
  99811. onShow: "onshow",
  99812. onStalled: "onstalled",
  99813. onStorage: "onstorage",
  99814. onSubmit: "onsubmit",
  99815. onSuspend: "onsuspend",
  99816. onTimeUpdate: "ontimeupdate",
  99817. onToggle: "ontoggle",
  99818. onUnload: "onunload",
  99819. onVolumeChange: "onvolumechange",
  99820. onWaiting: "onwaiting",
  99821. onZoom: "onzoom",
  99822. overlinePosition: "overline-position",
  99823. overlineThickness: "overline-thickness",
  99824. paintOrder: "paint-order",
  99825. panose1: "panose-1",
  99826. pointerEvents: "pointer-events",
  99827. referrerPolicy: "referrerpolicy",
  99828. renderingIntent: "rendering-intent",
  99829. shapeRendering: "shape-rendering",
  99830. stopColor: "stop-color",
  99831. stopOpacity: "stop-opacity",
  99832. strikethroughPosition: "strikethrough-position",
  99833. strikethroughThickness: "strikethrough-thickness",
  99834. strokeDashArray: "stroke-dasharray",
  99835. strokeDashOffset: "stroke-dashoffset",
  99836. strokeLineCap: "stroke-linecap",
  99837. strokeLineJoin: "stroke-linejoin",
  99838. strokeMiterLimit: "stroke-miterlimit",
  99839. strokeOpacity: "stroke-opacity",
  99840. strokeWidth: "stroke-width",
  99841. tabIndex: "tabindex",
  99842. textAnchor: "text-anchor",
  99843. textDecoration: "text-decoration",
  99844. textRendering: "text-rendering",
  99845. typeOf: "typeof",
  99846. underlinePosition: "underline-position",
  99847. underlineThickness: "underline-thickness",
  99848. unicodeBidi: "unicode-bidi",
  99849. unicodeRange: "unicode-range",
  99850. unitsPerEm: "units-per-em",
  99851. vAlphabetic: "v-alphabetic",
  99852. vHanging: "v-hanging",
  99853. vIdeographic: "v-ideographic",
  99854. vMathematical: "v-mathematical",
  99855. vectorEffect: "vector-effect",
  99856. vertAdvY: "vert-adv-y",
  99857. vertOriginX: "vert-origin-x",
  99858. vertOriginY: "vert-origin-y",
  99859. wordSpacing: "word-spacing",
  99860. writingMode: "writing-mode",
  99861. xHeight: "x-height",
  99862. // These were camelcased in Tiny. Now lowercased in SVG 2
  99863. playbackOrder: "playbackorder",
  99864. timelineBegin: "timelinebegin"
  99865. },
  99866. transform: caseSensitiveTransform,
  99867. properties: {
  99868. about: commaOrSpaceSeparated,
  99869. accentHeight: number,
  99870. accumulate: null,
  99871. additive: null,
  99872. alignmentBaseline: null,
  99873. alphabetic: number,
  99874. amplitude: number,
  99875. arabicForm: null,
  99876. ascent: number,
  99877. attributeName: null,
  99878. attributeType: null,
  99879. azimuth: number,
  99880. bandwidth: null,
  99881. baselineShift: null,
  99882. baseFrequency: null,
  99883. baseProfile: null,
  99884. bbox: null,
  99885. begin: null,
  99886. bias: number,
  99887. by: null,
  99888. calcMode: null,
  99889. capHeight: number,
  99890. className: spaceSeparated,
  99891. clip: null,
  99892. clipPath: null,
  99893. clipPathUnits: null,
  99894. clipRule: null,
  99895. color: null,
  99896. colorInterpolation: null,
  99897. colorInterpolationFilters: null,
  99898. colorProfile: null,
  99899. colorRendering: null,
  99900. content: null,
  99901. contentScriptType: null,
  99902. contentStyleType: null,
  99903. crossOrigin: null,
  99904. cursor: null,
  99905. cx: null,
  99906. cy: null,
  99907. d: null,
  99908. dataType: null,
  99909. defaultAction: null,
  99910. descent: number,
  99911. diffuseConstant: number,
  99912. direction: null,
  99913. display: null,
  99914. dur: null,
  99915. divisor: number,
  99916. dominantBaseline: null,
  99917. download: boolean,
  99918. dx: null,
  99919. dy: null,
  99920. edgeMode: null,
  99921. editable: null,
  99922. elevation: number,
  99923. enableBackground: null,
  99924. end: null,
  99925. event: null,
  99926. exponent: number,
  99927. externalResourcesRequired: null,
  99928. fill: null,
  99929. fillOpacity: number,
  99930. fillRule: null,
  99931. filter: null,
  99932. filterRes: null,
  99933. filterUnits: null,
  99934. floodColor: null,
  99935. floodOpacity: null,
  99936. focusable: null,
  99937. focusHighlight: null,
  99938. fontFamily: null,
  99939. fontSize: null,
  99940. fontSizeAdjust: null,
  99941. fontStretch: null,
  99942. fontStyle: null,
  99943. fontVariant: null,
  99944. fontWeight: null,
  99945. format: null,
  99946. fr: null,
  99947. from: null,
  99948. fx: null,
  99949. fy: null,
  99950. g1: commaSeparated,
  99951. g2: commaSeparated,
  99952. glyphName: commaSeparated,
  99953. glyphOrientationHorizontal: null,
  99954. glyphOrientationVertical: null,
  99955. glyphRef: null,
  99956. gradientTransform: null,
  99957. gradientUnits: null,
  99958. handler: null,
  99959. hanging: number,
  99960. hatchContentUnits: null,
  99961. hatchUnits: null,
  99962. height: null,
  99963. href: null,
  99964. hrefLang: null,
  99965. horizAdvX: number,
  99966. horizOriginX: number,
  99967. horizOriginY: number,
  99968. id: null,
  99969. ideographic: number,
  99970. imageRendering: null,
  99971. initialVisibility: null,
  99972. in: null,
  99973. in2: null,
  99974. intercept: number,
  99975. k: number,
  99976. k1: number,
  99977. k2: number,
  99978. k3: number,
  99979. k4: number,
  99980. kernelMatrix: commaOrSpaceSeparated,
  99981. kernelUnitLength: null,
  99982. keyPoints: null,
  99983. // SEMI_COLON_SEPARATED
  99984. keySplines: null,
  99985. // SEMI_COLON_SEPARATED
  99986. keyTimes: null,
  99987. // SEMI_COLON_SEPARATED
  99988. kerning: null,
  99989. lang: null,
  99990. lengthAdjust: null,
  99991. letterSpacing: null,
  99992. lightingColor: null,
  99993. limitingConeAngle: number,
  99994. local: null,
  99995. markerEnd: null,
  99996. markerMid: null,
  99997. markerStart: null,
  99998. markerHeight: null,
  99999. markerUnits: null,
  100000. markerWidth: null,
  100001. mask: null,
  100002. maskContentUnits: null,
  100003. maskUnits: null,
  100004. mathematical: null,
  100005. max: null,
  100006. media: null,
  100007. mediaCharacterEncoding: null,
  100008. mediaContentEncodings: null,
  100009. mediaSize: number,
  100010. mediaTime: null,
  100011. method: null,
  100012. min: null,
  100013. mode: null,
  100014. name: null,
  100015. navDown: null,
  100016. navDownLeft: null,
  100017. navDownRight: null,
  100018. navLeft: null,
  100019. navNext: null,
  100020. navPrev: null,
  100021. navRight: null,
  100022. navUp: null,
  100023. navUpLeft: null,
  100024. navUpRight: null,
  100025. numOctaves: null,
  100026. observer: null,
  100027. offset: null,
  100028. onAbort: null,
  100029. onActivate: null,
  100030. onAfterPrint: null,
  100031. onBeforePrint: null,
  100032. onBegin: null,
  100033. onCancel: null,
  100034. onCanPlay: null,
  100035. onCanPlayThrough: null,
  100036. onChange: null,
  100037. onClick: null,
  100038. onClose: null,
  100039. onCopy: null,
  100040. onCueChange: null,
  100041. onCut: null,
  100042. onDblClick: null,
  100043. onDrag: null,
  100044. onDragEnd: null,
  100045. onDragEnter: null,
  100046. onDragExit: null,
  100047. onDragLeave: null,
  100048. onDragOver: null,
  100049. onDragStart: null,
  100050. onDrop: null,
  100051. onDurationChange: null,
  100052. onEmptied: null,
  100053. onEnd: null,
  100054. onEnded: null,
  100055. onError: null,
  100056. onFocus: null,
  100057. onFocusIn: null,
  100058. onFocusOut: null,
  100059. onHashChange: null,
  100060. onInput: null,
  100061. onInvalid: null,
  100062. onKeyDown: null,
  100063. onKeyPress: null,
  100064. onKeyUp: null,
  100065. onLoad: null,
  100066. onLoadedData: null,
  100067. onLoadedMetadata: null,
  100068. onLoadStart: null,
  100069. onMessage: null,
  100070. onMouseDown: null,
  100071. onMouseEnter: null,
  100072. onMouseLeave: null,
  100073. onMouseMove: null,
  100074. onMouseOut: null,
  100075. onMouseOver: null,
  100076. onMouseUp: null,
  100077. onMouseWheel: null,
  100078. onOffline: null,
  100079. onOnline: null,
  100080. onPageHide: null,
  100081. onPageShow: null,
  100082. onPaste: null,
  100083. onPause: null,
  100084. onPlay: null,
  100085. onPlaying: null,
  100086. onPopState: null,
  100087. onProgress: null,
  100088. onRateChange: null,
  100089. onRepeat: null,
  100090. onReset: null,
  100091. onResize: null,
  100092. onScroll: null,
  100093. onSeeked: null,
  100094. onSeeking: null,
  100095. onSelect: null,
  100096. onShow: null,
  100097. onStalled: null,
  100098. onStorage: null,
  100099. onSubmit: null,
  100100. onSuspend: null,
  100101. onTimeUpdate: null,
  100102. onToggle: null,
  100103. onUnload: null,
  100104. onVolumeChange: null,
  100105. onWaiting: null,
  100106. onZoom: null,
  100107. opacity: null,
  100108. operator: null,
  100109. order: null,
  100110. orient: null,
  100111. orientation: null,
  100112. origin: null,
  100113. overflow: null,
  100114. overlay: null,
  100115. overlinePosition: number,
  100116. overlineThickness: number,
  100117. paintOrder: null,
  100118. panose1: null,
  100119. path: null,
  100120. pathLength: number,
  100121. patternContentUnits: null,
  100122. patternTransform: null,
  100123. patternUnits: null,
  100124. phase: null,
  100125. ping: spaceSeparated,
  100126. pitch: null,
  100127. playbackOrder: null,
  100128. pointerEvents: null,
  100129. points: null,
  100130. pointsAtX: number,
  100131. pointsAtY: number,
  100132. pointsAtZ: number,
  100133. preserveAlpha: null,
  100134. preserveAspectRatio: null,
  100135. primitiveUnits: null,
  100136. propagate: null,
  100137. property: commaOrSpaceSeparated,
  100138. r: null,
  100139. radius: null,
  100140. referrerPolicy: null,
  100141. refX: null,
  100142. refY: null,
  100143. rel: commaOrSpaceSeparated,
  100144. rev: commaOrSpaceSeparated,
  100145. renderingIntent: null,
  100146. repeatCount: null,
  100147. repeatDur: null,
  100148. requiredExtensions: commaOrSpaceSeparated,
  100149. requiredFeatures: commaOrSpaceSeparated,
  100150. requiredFonts: commaOrSpaceSeparated,
  100151. requiredFormats: commaOrSpaceSeparated,
  100152. resource: null,
  100153. restart: null,
  100154. result: null,
  100155. rotate: null,
  100156. rx: null,
  100157. ry: null,
  100158. scale: null,
  100159. seed: null,
  100160. shapeRendering: null,
  100161. side: null,
  100162. slope: null,
  100163. snapshotTime: null,
  100164. specularConstant: number,
  100165. specularExponent: number,
  100166. spreadMethod: null,
  100167. spacing: null,
  100168. startOffset: null,
  100169. stdDeviation: null,
  100170. stemh: null,
  100171. stemv: null,
  100172. stitchTiles: null,
  100173. stopColor: null,
  100174. stopOpacity: null,
  100175. strikethroughPosition: number,
  100176. strikethroughThickness: number,
  100177. string: null,
  100178. stroke: null,
  100179. strokeDashArray: commaOrSpaceSeparated,
  100180. strokeDashOffset: null,
  100181. strokeLineCap: null,
  100182. strokeLineJoin: null,
  100183. strokeMiterLimit: number,
  100184. strokeOpacity: number,
  100185. strokeWidth: null,
  100186. style: null,
  100187. surfaceScale: number,
  100188. syncBehavior: null,
  100189. syncBehaviorDefault: null,
  100190. syncMaster: null,
  100191. syncTolerance: null,
  100192. syncToleranceDefault: null,
  100193. systemLanguage: commaOrSpaceSeparated,
  100194. tabIndex: number,
  100195. tableValues: null,
  100196. target: null,
  100197. targetX: number,
  100198. targetY: number,
  100199. textAnchor: null,
  100200. textDecoration: null,
  100201. textRendering: null,
  100202. textLength: null,
  100203. timelineBegin: null,
  100204. title: null,
  100205. transformBehavior: null,
  100206. type: null,
  100207. typeOf: commaOrSpaceSeparated,
  100208. to: null,
  100209. transform: null,
  100210. u1: null,
  100211. u2: null,
  100212. underlinePosition: number,
  100213. underlineThickness: number,
  100214. unicode: null,
  100215. unicodeBidi: null,
  100216. unicodeRange: null,
  100217. unitsPerEm: number,
  100218. values: null,
  100219. vAlphabetic: number,
  100220. vMathematical: number,
  100221. vectorEffect: null,
  100222. vHanging: number,
  100223. vIdeographic: number,
  100224. version: null,
  100225. vertAdvY: number,
  100226. vertOriginX: number,
  100227. vertOriginY: number,
  100228. viewBox: null,
  100229. viewTarget: null,
  100230. visibility: null,
  100231. width: null,
  100232. widths: null,
  100233. wordSpacing: null,
  100234. writingMode: null,
  100235. x: null,
  100236. x1: null,
  100237. x2: null,
  100238. xChannelSelector: null,
  100239. xHeight: number,
  100240. y: null,
  100241. y1: null,
  100242. y2: null,
  100243. yChannelSelector: null,
  100244. z: null,
  100245. zoomAndPan: null
  100246. }
  100247. });
  100248. // node_modules/property-information/lib/find.js
  100249. var valid = /^data[-\w.:]+$/i;
  100250. var dash = /-[a-z]/g;
  100251. var cap = /[A-Z]/g;
  100252. function find(schema, value2) {
  100253. const normal = normalize(value2);
  100254. let prop = value2;
  100255. let Type = Info;
  100256. if (normal in schema.normal) {
  100257. return schema.property[schema.normal[normal]];
  100258. }
  100259. if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value2)) {
  100260. if (value2.charAt(4) === "-") {
  100261. const rest = value2.slice(5).replace(dash, camelcase);
  100262. prop = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
  100263. } else {
  100264. const rest = value2.slice(4);
  100265. if (!dash.test(rest)) {
  100266. let dashes = rest.replace(cap, kebab);
  100267. if (dashes.charAt(0) !== "-") {
  100268. dashes = "-" + dashes;
  100269. }
  100270. value2 = "data" + dashes;
  100271. }
  100272. }
  100273. Type = DefinedInfo;
  100274. }
  100275. return new Type(prop, value2);
  100276. }
  100277. function kebab($0) {
  100278. return "-" + $0.toLowerCase();
  100279. }
  100280. function camelcase($0) {
  100281. return $0.charAt(1).toUpperCase();
  100282. }
  100283. // node_modules/property-information/lib/hast-to-react.js
  100284. var hastToReact = {
  100285. classId: "classID",
  100286. dataType: "datatype",
  100287. itemId: "itemID",
  100288. strokeDashArray: "strokeDasharray",
  100289. strokeDashOffset: "strokeDashoffset",
  100290. strokeLineCap: "strokeLinecap",
  100291. strokeLineJoin: "strokeLinejoin",
  100292. strokeMiterLimit: "strokeMiterlimit",
  100293. typeOf: "typeof",
  100294. xLinkActuate: "xlinkActuate",
  100295. xLinkArcRole: "xlinkArcrole",
  100296. xLinkHref: "xlinkHref",
  100297. xLinkRole: "xlinkRole",
  100298. xLinkShow: "xlinkShow",
  100299. xLinkTitle: "xlinkTitle",
  100300. xLinkType: "xlinkType",
  100301. xmlnsXLink: "xmlnsXlink"
  100302. };
  100303. // node_modules/property-information/index.js
  100304. var html3 = merge([xml, xlink, xmlns, aria, html2], "html");
  100305. var svg2 = merge([xml, xlink, xmlns, aria, svg], "svg");
  100306. // node_modules/space-separated-tokens/index.js
  100307. function stringify3(values) {
  100308. return values.join(" ").trim();
  100309. }
  100310. // node_modules/style-to-object/index.mjs
  100311. var import_index = __toESM(require_style_to_object(), 1);
  100312. var style_to_object_default = import_index.default;
  100313. // node_modules/hast-util-to-estree/lib/handlers/element.js
  100314. var own9 = {}.hasOwnProperty;
  100315. var cap2 = /[A-Z]/g;
  100316. var dashSomething = /-([a-z])/g;
  100317. function element(node2, state) {
  100318. const parentSchema = state.schema;
  100319. let schema = parentSchema;
  100320. const props = node2.properties || {};
  100321. if (parentSchema.space === "html" && node2.tagName.toLowerCase() === "svg") {
  100322. schema = svg2;
  100323. state.schema = schema;
  100324. }
  100325. const children = state.all(node2);
  100326. const attributes = [];
  100327. let prop;
  100328. for (prop in props) {
  100329. if (own9.call(props, prop)) {
  100330. let value2 = props[prop];
  100331. const info = find(schema, prop);
  100332. let attributeValue;
  100333. if (value2 === void 0 || value2 === null || typeof value2 === "number" && Number.isNaN(value2) || value2 === false || !value2 && info.boolean) {
  100334. continue;
  100335. }
  100336. prop = state.elementAttributeNameCase === "react" && info.space ? hastToReact[info.property] || info.property : info.attribute;
  100337. if (Array.isArray(value2)) {
  100338. value2 = info.commaSeparated ? stringify2(value2) : stringify3(value2);
  100339. }
  100340. if (prop === "style") {
  100341. let styleObject = typeof value2 === "object" ? value2 : parseStyle(String(value2), node2.tagName);
  100342. if (state.stylePropertyNameCase === "css") {
  100343. styleObject = transformStyleToCssCasing(styleObject);
  100344. }
  100345. const cssProperties = [];
  100346. let cssProp;
  100347. for (cssProp in styleObject) {
  100348. if (own9.call(styleObject, cssProp)) {
  100349. cssProperties.push({
  100350. type: "Property",
  100351. method: false,
  100352. shorthand: false,
  100353. computed: false,
  100354. key: name(cssProp) ? { type: "Identifier", name: cssProp } : { type: "Literal", value: cssProp },
  100355. value: { type: "Literal", value: String(styleObject[cssProp]) },
  100356. kind: "init"
  100357. });
  100358. }
  100359. }
  100360. attributeValue = {
  100361. type: "JSXExpressionContainer",
  100362. expression: { type: "ObjectExpression", properties: cssProperties }
  100363. };
  100364. } else if (value2 === true) {
  100365. attributeValue = null;
  100366. } else {
  100367. attributeValue = { type: "Literal", value: String(value2) };
  100368. }
  100369. if (jsxIdentifierName(prop)) {
  100370. attributes.push({
  100371. type: "JSXAttribute",
  100372. name: { type: "JSXIdentifier", name: prop },
  100373. value: attributeValue
  100374. });
  100375. } else {
  100376. attributes.push({
  100377. type: "JSXSpreadAttribute",
  100378. argument: {
  100379. type: "ObjectExpression",
  100380. properties: [
  100381. {
  100382. type: "Property",
  100383. method: false,
  100384. shorthand: false,
  100385. computed: false,
  100386. key: { type: "Literal", value: String(prop) },
  100387. // @ts-expect-error No need to worry about `style` (which has a
  100388. // `JSXExpressionContainer` value) because that’s a valid identifier.
  100389. value: attributeValue || { type: "Literal", value: true },
  100390. kind: "init"
  100391. }
  100392. ]
  100393. }
  100394. });
  100395. }
  100396. }
  100397. }
  100398. state.schema = parentSchema;
  100399. const result = {
  100400. type: "JSXElement",
  100401. openingElement: {
  100402. type: "JSXOpeningElement",
  100403. attributes,
  100404. name: state.createJsxElementName(node2.tagName),
  100405. selfClosing: children.length === 0
  100406. },
  100407. closingElement: children.length > 0 ? {
  100408. type: "JSXClosingElement",
  100409. name: state.createJsxElementName(node2.tagName)
  100410. } : null,
  100411. children
  100412. };
  100413. state.inherit(node2, result);
  100414. return result;
  100415. }
  100416. function parseStyle(value2, tagName) {
  100417. const result = {};
  100418. try {
  100419. style_to_object_default(value2, iterator);
  100420. } catch (error) {
  100421. const exception = (
  100422. /** @type {Error} */
  100423. error
  100424. );
  100425. exception.message = tagName + "[style]" + exception.message.slice("undefined".length);
  100426. throw error;
  100427. }
  100428. return result;
  100429. function iterator(name2, value3) {
  100430. let key2 = name2;
  100431. if (key2.slice(0, 2) !== "--") {
  100432. if (key2.slice(0, 4) === "-ms-")
  100433. key2 = "ms-" + key2.slice(4);
  100434. key2 = key2.replace(dashSomething, toCamel);
  100435. }
  100436. result[key2] = value3;
  100437. }
  100438. }
  100439. function transformStyleToCssCasing(domCasing) {
  100440. const cssCasing = {};
  100441. let from;
  100442. for (from in domCasing) {
  100443. if (own9.call(domCasing, from)) {
  100444. let to = from.replace(cap2, toDash);
  100445. if (to.slice(0, 3) === "ms-")
  100446. to = "-" + to;
  100447. cssCasing[to] = domCasing[from];
  100448. }
  100449. }
  100450. return cssCasing;
  100451. }
  100452. function toCamel(_, $1) {
  100453. return $1.toUpperCase();
  100454. }
  100455. function toDash($0) {
  100456. return "-" + $0.toLowerCase();
  100457. }
  100458. function jsxIdentifierName(name2) {
  100459. let index2 = -1;
  100460. while (++index2 < name2.length) {
  100461. if (!(index2 ? cont3 : start2)(name2.charCodeAt(index2)))
  100462. return false;
  100463. }
  100464. return index2 > 0;
  100465. function cont3(code2) {
  100466. return cont2(code2) || code2 === 45;
  100467. }
  100468. }
  100469. // node_modules/estree-util-attach-comments/lib/index.js
  100470. var own10 = {}.hasOwnProperty;
  100471. function attachComments(tree, comments) {
  100472. const list3 = (comments || []).concat().sort(compare);
  100473. if (list3.length > 0)
  100474. walk2(tree, { comments: list3, index: 0 });
  100475. return tree;
  100476. }
  100477. function walk2(node2, state) {
  100478. if (state.index === state.comments.length) {
  100479. return;
  100480. }
  100481. const children = [];
  100482. const comments = [];
  100483. let key2;
  100484. for (key2 in node2) {
  100485. if (own10.call(node2, key2)) {
  100486. const value2 = node2[key2];
  100487. if (value2 && typeof value2 === "object" && key2 !== "comments") {
  100488. if (Array.isArray(value2)) {
  100489. let index3 = -1;
  100490. while (++index3 < value2.length) {
  100491. if (value2[index3] && typeof value2[index3].type === "string") {
  100492. children.push(value2[index3]);
  100493. }
  100494. }
  100495. } else if (typeof value2.type === "string") {
  100496. children.push(value2);
  100497. }
  100498. }
  100499. }
  100500. }
  100501. children.sort(compare);
  100502. comments.push(...slice(state, node2, false, { leading: true, trailing: false }));
  100503. let index2 = -1;
  100504. while (++index2 < children.length) {
  100505. walk2(children[index2], state);
  100506. }
  100507. comments.push(
  100508. ...slice(state, node2, true, {
  100509. leading: false,
  100510. trailing: children.length > 0
  100511. })
  100512. );
  100513. if (comments.length > 0) {
  100514. node2.comments = comments;
  100515. }
  100516. }
  100517. function slice(state, node2, compareEnd, fields) {
  100518. const result = [];
  100519. while (state.comments[state.index] && compare(state.comments[state.index], node2, compareEnd) < 1) {
  100520. result.push(Object.assign({}, state.comments[state.index++], fields));
  100521. }
  100522. return result;
  100523. }
  100524. function compare(left, right, compareEnd) {
  100525. const field = compareEnd ? "end" : "start";
  100526. if (left.range && right.range) {
  100527. return left.range[0] - right.range[compareEnd ? 1 : 0];
  100528. }
  100529. if (left.loc && left.loc.start && right.loc && right.loc[field]) {
  100530. return left.loc.start.line - right.loc[field].line || left.loc.start.column - right.loc[field].column;
  100531. }
  100532. if ("start" in left && field in right) {
  100533. return left.start - right[field];
  100534. }
  100535. return Number.NaN;
  100536. }
  100537. // node_modules/hast-util-to-estree/lib/handlers/mdx-expression.js
  100538. function mdxExpression2(node2, state) {
  100539. const estree = node2.data && node2.data.estree;
  100540. const comments = estree && estree.comments || [];
  100541. let expression;
  100542. if (estree) {
  100543. state.comments.push(...comments);
  100544. attachComments(estree, estree.comments);
  100545. expression = estree.body[0] && estree.body[0].type === "ExpressionStatement" && estree.body[0].expression || void 0;
  100546. }
  100547. if (!expression) {
  100548. expression = { type: "JSXEmptyExpression" };
  100549. state.patch(node2, expression);
  100550. }
  100551. const result = { type: "JSXExpressionContainer", expression };
  100552. state.inherit(node2, result);
  100553. return result;
  100554. }
  100555. // node_modules/hast-util-to-estree/lib/handlers/mdx-jsx-element.js
  100556. function mdxJsxElement(node2, state) {
  100557. const parentSchema = state.schema;
  100558. let schema = parentSchema;
  100559. const attrs = node2.attributes || [];
  100560. let index2 = -1;
  100561. if (node2.name && parentSchema.space === "html" && node2.name.toLowerCase() === "svg") {
  100562. schema = svg2;
  100563. state.schema = schema;
  100564. }
  100565. const children = state.all(node2);
  100566. const attributes = [];
  100567. while (++index2 < attrs.length) {
  100568. const attr = attrs[index2];
  100569. const value2 = attr.value;
  100570. let attributeValue;
  100571. if (attr.type === "mdxJsxAttribute") {
  100572. if (value2 === void 0 || value2 === null) {
  100573. attributeValue = null;
  100574. } else if (typeof value2 === "object") {
  100575. const estree = value2.data && value2.data.estree;
  100576. const comments = estree && estree.comments || [];
  100577. let expression;
  100578. if (estree) {
  100579. state.comments.push(...comments);
  100580. attachComments(estree, estree.comments);
  100581. expression = estree.body[0] && estree.body[0].type === "ExpressionStatement" && estree.body[0].expression || void 0;
  100582. }
  100583. attributeValue = {
  100584. type: "JSXExpressionContainer",
  100585. expression: expression || { type: "JSXEmptyExpression" }
  100586. };
  100587. state.inherit(value2, attributeValue);
  100588. } else {
  100589. attributeValue = { type: "Literal", value: String(value2) };
  100590. }
  100591. const attribute = {
  100592. type: "JSXAttribute",
  100593. name: state.createJsxAttributeName(attr.name),
  100594. value: attributeValue
  100595. };
  100596. state.inherit(attr, attribute);
  100597. attributes.push(attribute);
  100598. } else {
  100599. const estree = attr.data && attr.data.estree;
  100600. const comments = estree && estree.comments || [];
  100601. let argumentValue;
  100602. if (estree) {
  100603. state.comments.push(...comments);
  100604. attachComments(estree, estree.comments);
  100605. argumentValue = estree.body[0] && estree.body[0].type === "ExpressionStatement" && estree.body[0].expression && estree.body[0].expression.type === "ObjectExpression" && estree.body[0].expression.properties && estree.body[0].expression.properties[0] && estree.body[0].expression.properties[0].type === "SpreadElement" && estree.body[0].expression.properties[0].argument || void 0;
  100606. }
  100607. const attribute = {
  100608. type: "JSXSpreadAttribute",
  100609. argument: argumentValue || { type: "ObjectExpression", properties: [] }
  100610. };
  100611. state.inherit(attr, attribute);
  100612. attributes.push(attribute);
  100613. }
  100614. }
  100615. state.schema = parentSchema;
  100616. const result = node2.name ? {
  100617. type: "JSXElement",
  100618. openingElement: {
  100619. type: "JSXOpeningElement",
  100620. attributes,
  100621. name: state.createJsxElementName(node2.name),
  100622. selfClosing: children.length === 0
  100623. },
  100624. closingElement: children.length > 0 ? {
  100625. type: "JSXClosingElement",
  100626. name: state.createJsxElementName(node2.name)
  100627. } : null,
  100628. children
  100629. } : {
  100630. type: "JSXFragment",
  100631. openingFragment: { type: "JSXOpeningFragment" },
  100632. closingFragment: { type: "JSXClosingFragment" },
  100633. children
  100634. };
  100635. state.inherit(node2, result);
  100636. return result;
  100637. }
  100638. // node_modules/hast-util-to-estree/lib/handlers/mdxjs-esm.js
  100639. function mdxjsEsm2(node2, state) {
  100640. const estree = node2.data && node2.data.estree;
  100641. const comments = estree && estree.comments || [];
  100642. if (estree) {
  100643. state.comments.push(...comments);
  100644. attachComments(estree, comments);
  100645. state.esm.push(...estree.body);
  100646. }
  100647. }
  100648. // node_modules/hast-util-to-estree/lib/handlers/text.js
  100649. function text4(node2, state) {
  100650. const value2 = String(node2.value || "");
  100651. if (value2) {
  100652. const result = { type: "Literal", value: value2 };
  100653. state.inherit(node2, result);
  100654. const container = { type: "JSXExpressionContainer", expression: result };
  100655. state.patch(node2, container);
  100656. return container;
  100657. }
  100658. }
  100659. // node_modules/hast-util-whitespace/index.js
  100660. function whitespace(thing) {
  100661. const value2 = (
  100662. // @ts-expect-error looks like a node.
  100663. thing && typeof thing === "object" && thing.type === "text" ? (
  100664. // @ts-expect-error looks like a text.
  100665. thing.value || ""
  100666. ) : thing
  100667. );
  100668. return typeof value2 === "string" && value2.replace(/[ \t\n\f\r]/g, "") === "";
  100669. }
  100670. // node_modules/hast-util-to-estree/lib/handlers/root.js
  100671. function root2(node2, state) {
  100672. const children = state.all(node2);
  100673. const cleanChildren = [];
  100674. let index2 = -1;
  100675. let queue;
  100676. while (++index2 < children.length) {
  100677. const child = children[index2];
  100678. if (child.type === "JSXExpressionContainer" && child.expression.type === "Literal" && whitespace(child.expression.value)) {
  100679. if (queue)
  100680. queue.push(child);
  100681. } else {
  100682. if (queue)
  100683. cleanChildren.push(...queue);
  100684. cleanChildren.push(child);
  100685. queue = [];
  100686. }
  100687. }
  100688. const result = {
  100689. type: "JSXFragment",
  100690. openingFragment: { type: "JSXOpeningFragment" },
  100691. closingFragment: { type: "JSXClosingFragment" },
  100692. children: cleanChildren
  100693. };
  100694. state.inherit(node2, result);
  100695. return result;
  100696. }
  100697. // node_modules/hast-util-to-estree/lib/handlers/index.js
  100698. var handlers2 = {
  100699. comment,
  100700. doctype: ignore2,
  100701. element,
  100702. mdxFlowExpression: mdxExpression2,
  100703. mdxTextExpression: mdxExpression2,
  100704. mdxJsxFlowElement: mdxJsxElement,
  100705. mdxJsxTextElement: mdxJsxElement,
  100706. mdxjsEsm: mdxjsEsm2,
  100707. text: text4,
  100708. root: root2
  100709. };
  100710. function ignore2() {
  100711. }
  100712. // node_modules/zwitch/index.js
  100713. var own11 = {}.hasOwnProperty;
  100714. function zwitch(key2, options) {
  100715. const settings = options || {};
  100716. function one3(value2, ...parameters) {
  100717. let fn = one3.invalid;
  100718. const handlers3 = one3.handlers;
  100719. if (value2 && own11.call(value2, key2)) {
  100720. const id = String(value2[key2]);
  100721. fn = own11.call(handlers3, id) ? handlers3[id] : one3.unknown;
  100722. }
  100723. if (fn) {
  100724. return fn.call(this, value2, ...parameters);
  100725. }
  100726. }
  100727. one3.handlers = settings.handlers || {};
  100728. one3.invalid = settings.invalid;
  100729. one3.unknown = settings.unknown;
  100730. return one3;
  100731. }
  100732. // node_modules/hast-util-to-estree/lib/state.js
  100733. var own12 = {}.hasOwnProperty;
  100734. var tableElements = /* @__PURE__ */ new Set(["table", "thead", "tbody", "tfoot", "tr"]);
  100735. function createState2(options) {
  100736. const one3 = zwitch("type", {
  100737. invalid,
  100738. unknown,
  100739. handlers: { ...handlers2, ...options.handlers }
  100740. });
  100741. return {
  100742. // Current space.
  100743. schema: options.space === "svg" ? svg2 : html3,
  100744. elementAttributeNameCase: options.elementAttributeNameCase || "react",
  100745. stylePropertyNameCase: options.stylePropertyNameCase || "dom",
  100746. // Results.
  100747. comments: [],
  100748. esm: [],
  100749. // Useful functions.
  100750. handle,
  100751. all: all3,
  100752. patch: patch2,
  100753. inherit,
  100754. createJsxAttributeName,
  100755. createJsxElementName
  100756. };
  100757. function handle(node2) {
  100758. return one3(node2, this);
  100759. }
  100760. }
  100761. function invalid(value2) {
  100762. throw new Error("Cannot handle value `" + value2 + "`, expected node");
  100763. }
  100764. function unknown(node2) {
  100765. throw new Error("Cannot handle unknown node `" + node2.type + "`");
  100766. }
  100767. function all3(parent) {
  100768. const children = parent.children || [];
  100769. let index2 = -1;
  100770. const results = [];
  100771. const ignoreLineBreak = this.schema.space === "html" && parent.type === "element" && tableElements.has(parent.tagName.toLowerCase());
  100772. while (++index2 < children.length) {
  100773. const child = children[index2];
  100774. if (ignoreLineBreak && child.type === "text" && child.value === "\n") {
  100775. continue;
  100776. }
  100777. const result = this.handle(child);
  100778. if (Array.isArray(result)) {
  100779. results.push(...result);
  100780. } else if (result) {
  100781. results.push(result);
  100782. }
  100783. }
  100784. return results;
  100785. }
  100786. function inherit(from, to) {
  100787. const left = from.data;
  100788. let right;
  100789. let key2;
  100790. patch2(from, to);
  100791. if (left) {
  100792. for (key2 in left) {
  100793. if (own12.call(left, key2) && key2 !== "estree") {
  100794. if (!right)
  100795. right = {};
  100796. right[key2] = left[key2];
  100797. }
  100798. }
  100799. if (right) {
  100800. to.data = right;
  100801. }
  100802. }
  100803. }
  100804. function patch2(from, to) {
  100805. const p = position2(from);
  100806. if (p.start.line && p.start.offset !== void 0 && p.end.offset !== void 0) {
  100807. to.start = p.start.offset;
  100808. to.end = p.end.offset;
  100809. to.loc = {
  100810. start: { line: p.start.line, column: p.start.column - 1 },
  100811. end: { line: p.end.line, column: p.end.column - 1 }
  100812. };
  100813. to.range = [p.start.offset, p.end.offset];
  100814. }
  100815. }
  100816. function createJsxAttributeName(name2) {
  100817. const node2 = createJsxNameFromString(name2);
  100818. if (node2.type === "JSXMemberExpression") {
  100819. throw new Error("Member expressions in attribute names are not supported");
  100820. }
  100821. return node2;
  100822. }
  100823. function createJsxElementName(name2) {
  100824. return createJsxNameFromString(name2);
  100825. }
  100826. function createJsxNameFromString(name2) {
  100827. if (name2.includes(".")) {
  100828. const names = name2.split(".");
  100829. let part = names.shift();
  100830. let node2 = { type: "JSXIdentifier", name: part };
  100831. while (part = names.shift()) {
  100832. node2 = {
  100833. type: "JSXMemberExpression",
  100834. object: node2,
  100835. property: { type: "JSXIdentifier", name: part }
  100836. };
  100837. }
  100838. return node2;
  100839. }
  100840. if (name2.includes(":")) {
  100841. const parts = name2.split(":");
  100842. return {
  100843. type: "JSXNamespacedName",
  100844. namespace: { type: "JSXIdentifier", name: parts[0] },
  100845. name: { type: "JSXIdentifier", name: parts[1] }
  100846. };
  100847. }
  100848. return { type: "JSXIdentifier", name: name2 };
  100849. }
  100850. // node_modules/hast-util-to-estree/lib/index.js
  100851. function toEstree(tree, options) {
  100852. const state = createState2(options || {});
  100853. let result = state.handle(tree);
  100854. const body = state.esm;
  100855. if (result) {
  100856. if (result.type !== "JSXFragment" && result.type !== "JSXElement") {
  100857. result = {
  100858. type: "JSXFragment",
  100859. openingFragment: { type: "JSXOpeningFragment" },
  100860. closingFragment: { type: "JSXClosingFragment" },
  100861. children: [result]
  100862. };
  100863. state.patch(tree, result);
  100864. }
  100865. const statement = { type: "ExpressionStatement", expression: result };
  100866. state.patch(tree, statement);
  100867. body.push(statement);
  100868. }
  100869. const program = {
  100870. type: "Program",
  100871. body,
  100872. sourceType: "module",
  100873. comments: state.comments
  100874. };
  100875. state.patch(tree, program);
  100876. return program;
  100877. }
  100878. // node_modules/@mdx-js/mdx/lib/plugin/rehype-recma.js
  100879. function rehypeRecma(options) {
  100880. return (tree) => toEstree(tree, options);
  100881. }
  100882. // node_modules/@mdx-js/mdx/lib/plugin/rehype-remove-raw.js
  100883. function rehypeRemoveRaw() {
  100884. return (tree) => {
  100885. visit2(tree, "raw", (_, index2, parent) => {
  100886. if (parent && typeof index2 === "number") {
  100887. parent.children.splice(index2, 1);
  100888. return index2;
  100889. }
  100890. });
  100891. };
  100892. }
  100893. // node_modules/@mdx-js/mdx/lib/plugin/remark-mark-and-unravel.js
  100894. function remarkMarkAndUnravel() {
  100895. return (tree) => {
  100896. visit2(tree, (node2, index2, parent) => {
  100897. let offset3 = -1;
  100898. let all4 = true;
  100899. let oneOrMore = false;
  100900. if (parent && typeof index2 === "number" && node2.type === "paragraph") {
  100901. const children = node2.children;
  100902. while (++offset3 < children.length) {
  100903. const child = children[offset3];
  100904. if (child.type === "mdxJsxTextElement" || child.type === "mdxTextExpression") {
  100905. oneOrMore = true;
  100906. } else if (child.type === "text" && /^[\t\r\n ]+$/.test(String(child.value))) {
  100907. } else {
  100908. all4 = false;
  100909. break;
  100910. }
  100911. }
  100912. if (all4 && oneOrMore) {
  100913. offset3 = -1;
  100914. const newChildren = [];
  100915. while (++offset3 < children.length) {
  100916. const child = children[offset3];
  100917. if (child.type === "mdxJsxTextElement") {
  100918. child.type = "mdxJsxFlowElement";
  100919. }
  100920. if (child.type === "mdxTextExpression") {
  100921. child.type = "mdxFlowExpression";
  100922. }
  100923. if (child.type === "text" && /^[\t\r\n ]+$/.test(String(child.value))) {
  100924. } else {
  100925. newChildren.push(child);
  100926. }
  100927. }
  100928. parent.children.splice(index2, 1, ...newChildren);
  100929. return index2;
  100930. }
  100931. }
  100932. if (node2.type === "mdxJsxFlowElement" || node2.type === "mdxJsxTextElement") {
  100933. const data3 = node2.data || (node2.data = {});
  100934. data3._mdxExplicitJsx = true;
  100935. }
  100936. });
  100937. };
  100938. }
  100939. // node_modules/@mdx-js/mdx/lib/node-types.js
  100940. var nodeTypes = [
  100941. "mdxFlowExpression",
  100942. "mdxJsxFlowElement",
  100943. "mdxJsxTextElement",
  100944. "mdxTextExpression",
  100945. "mdxjsEsm"
  100946. ];
  100947. // node_modules/@mdx-js/mdx/lib/condition.js
  100948. import process2 from "process";
  100949. var development = process2.env.NODE_ENV === "development";
  100950. // node_modules/@mdx-js/mdx/lib/core.js
  100951. var removedOptions = [
  100952. "filepath",
  100953. "compilers",
  100954. "hastPlugins",
  100955. "mdPlugins",
  100956. "skipExport",
  100957. "wrapExport"
  100958. ];
  100959. function createProcessor(options) {
  100960. const {
  100961. development: development2,
  100962. jsx: jsx2,
  100963. format,
  100964. outputFormat,
  100965. providerImportSource,
  100966. recmaPlugins,
  100967. rehypePlugins,
  100968. remarkPlugins,
  100969. remarkRehypeOptions,
  100970. elementAttributeNameCase,
  100971. stylePropertyNameCase,
  100972. SourceMapGenerator,
  100973. ...rest
  100974. } = options || {};
  100975. const dev = development2 === null || development2 === void 0 ? development : development2;
  100976. let index2 = -1;
  100977. while (++index2 < removedOptions.length) {
  100978. const key2 = removedOptions[index2];
  100979. if (options && key2 in options) {
  100980. throw new Error(
  100981. "`options." + key2 + "` is no longer supported. Please see <https://mdxjs.com/migrating/v2/> for more information"
  100982. );
  100983. }
  100984. }
  100985. if (format === "detect") {
  100986. throw new Error(
  100987. "Incorrect `format: 'detect'`: `createProcessor` can support either `md` or `mdx`; it does not support detecting the format"
  100988. );
  100989. }
  100990. const pipeline = unified().use(remark_parse_default);
  100991. if (format !== "md") {
  100992. pipeline.use(remarkMdx);
  100993. }
  100994. const extraNodeTypes = remarkRehypeOptions ? (
  100995. /* c8 ignore next */
  100996. remarkRehypeOptions.passThrough || []
  100997. ) : [];
  100998. pipeline.use(remarkMarkAndUnravel).use(remarkPlugins || []).use(lib_default, {
  100999. ...remarkRehypeOptions,
  101000. allowDangerousHtml: true,
  101001. passThrough: [...extraNodeTypes, ...nodeTypes]
  101002. }).use(rehypePlugins || []);
  101003. if (format === "md") {
  101004. pipeline.use(rehypeRemoveRaw);
  101005. }
  101006. pipeline.use(rehypeRecma, { elementAttributeNameCase, stylePropertyNameCase }).use(recmaDocument, { ...rest, outputFormat }).use(recmaJsxRewrite, {
  101007. development: dev,
  101008. providerImportSource,
  101009. outputFormat
  101010. });
  101011. if (!jsx2) {
  101012. pipeline.use(recmaJsxBuild, { development: dev, outputFormat });
  101013. }
  101014. pipeline.use(recmaStringify, { SourceMapGenerator }).use(recmaPlugins || []);
  101015. return pipeline;
  101016. }
  101017. // node_modules/@mdx-js/mdx/lib/util/extnames.js
  101018. var import_markdown_extensions = __toESM(require_markdown_extensions2(), 1);
  101019. var md = import_markdown_extensions.default.map((d) => "." + d);
  101020. // node_modules/@mdx-js/mdx/lib/util/resolve-file-and-options.js
  101021. function resolveFileAndOptions(vfileCompatible, options) {
  101022. const file = looksLikeAVFile2(vfileCompatible) ? vfileCompatible : new VFile(vfileCompatible);
  101023. const { format, ...rest } = options || {};
  101024. return {
  101025. file,
  101026. options: {
  101027. format: format === "md" || format === "mdx" ? format : file.extname && (rest.mdExtensions || md).includes(file.extname) ? "md" : "mdx",
  101028. ...rest
  101029. }
  101030. };
  101031. }
  101032. function looksLikeAVFile2(value2) {
  101033. return Boolean(
  101034. value2 && typeof value2 === "object" && "message" in value2 && "messages" in value2
  101035. );
  101036. }
  101037. // node_modules/@mdx-js/mdx/lib/compile.js
  101038. function compile(vfileCompatible, compileOptions) {
  101039. const { file, options } = resolveFileAndOptions(vfileCompatible, compileOptions);
  101040. return createProcessor(options).process(file);
  101041. }
  101042. function compileSync(vfileCompatible, compileOptions) {
  101043. const { file, options } = resolveFileAndOptions(vfileCompatible, compileOptions);
  101044. return createProcessor(options).processSync(file);
  101045. }
  101046. // src/index.ts
  101047. var import_generator2 = __toESM(require_lib4());
  101048. var t2 = __toESM(require_lib3());
  101049. var import_cloneDeep = __toESM(require_cloneDeep2());
  101050. var import_estree_to_babel = __toESM(require_estree_to_babel());
  101051. // src/sb-mdx-plugin.ts
  101052. var t = __toESM(require_lib3());
  101053. var import_generator = __toESM(require_lib4());
  101054. var import_camelCase = __toESM(require_camelCase());
  101055. var import_js_string_escape = __toESM(require_js_string_escape());
  101056. var RESERVED = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|await|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;
  101057. function getAttr(elt, what) {
  101058. const attr = elt.attributes.find((n) => n.name.name === what);
  101059. return attr?.value;
  101060. }
  101061. var isReserved = (name2) => RESERVED.exec(name2);
  101062. var startsWithNumber = (name2) => /^\d/.exec(name2);
  101063. var sanitizeName = (name2) => {
  101064. let key2 = (0, import_camelCase.default)(name2);
  101065. if (startsWithNumber(key2)) {
  101066. key2 = `_${key2}`;
  101067. } else if (isReserved(key2)) {
  101068. key2 = `${key2}Story`;
  101069. }
  101070. return key2;
  101071. };
  101072. var getStoryKey = (name2, counter) => name2 ? sanitizeName(name2) : `story${counter}`;
  101073. function genAttribute(key2, element2) {
  101074. const value2 = getAttr(element2, key2);
  101075. if (t.isJSXExpressionContainer(value2)) {
  101076. const { code: code2 } = (0, import_generator.default)(value2.expression, {});
  101077. return code2;
  101078. }
  101079. return void 0;
  101080. }
  101081. function genImportStory(ast, storyDef, storyName, context) {
  101082. const { code: story } = (0, import_generator.default)(storyDef.expression, {});
  101083. const storyKey = `_${story.split(".").pop()}_`;
  101084. const statements = [`export const ${storyKey} = ${story};`];
  101085. if (storyName) {
  101086. context.storyNameToKey[storyName] = storyKey;
  101087. statements.push(`${storyKey}.storyName = '${storyName}';`);
  101088. } else {
  101089. context.storyNameToKey[storyKey] = storyKey;
  101090. ast.openingElement.attributes.push(
  101091. t.jsxAttribute(t.jsxIdentifier("name"), t.stringLiteral(storyKey))
  101092. );
  101093. }
  101094. return {
  101095. [storyKey]: statements.join("\n")
  101096. };
  101097. }
  101098. function getBodyPart(bodyNode, context) {
  101099. const body = t.isJSXExpressionContainer(bodyNode) ? bodyNode.expression : bodyNode;
  101100. let sourceBody = body;
  101101. if (t.isCallExpression(body) && t.isMemberExpression(body.callee) && t.isIdentifier(body.callee.object) && t.isIdentifier(body.callee.property) && body.callee.property.name === "bind" && (body.arguments.length === 0 || body.arguments.length === 1 && t.isObjectExpression(body.arguments[0]) && body.arguments[0].properties.length === 0)) {
  101102. const bound = body.callee.object.name;
  101103. const namedExport = context.namedExports[bound];
  101104. if (namedExport) {
  101105. sourceBody = namedExport;
  101106. }
  101107. }
  101108. const { code: storyCode } = (0, import_generator.default)(body, {});
  101109. const { code: sourceCode } = (0, import_generator.default)(sourceBody, {});
  101110. return { storyCode, sourceCode, body };
  101111. }
  101112. var idOrNull = (attr) => t.isStringLiteral(attr) ? attr.value : null;
  101113. var expressionOrNull = (attr) => t.isJSXExpressionContainer(attr) ? attr.expression : null;
  101114. function genStoryExport(ast, context) {
  101115. if (getAttr(ast.openingElement, "of")) {
  101116. throw new Error(`The 'of' prop is not supported in .stories.mdx files, only .mdx files.
  101117. See https://storybook.js.org/docs/7.0/react/writing-docs/mdx on how to write MDX files and stories separately.`);
  101118. }
  101119. const storyName = idOrNull(getAttr(ast.openingElement, "name"));
  101120. const storyId = idOrNull(getAttr(ast.openingElement, "id"));
  101121. const storyRef = getAttr(ast.openingElement, "story");
  101122. if (!storyId && !storyName && !storyRef) {
  101123. throw new Error("Expected a Story name, id, or story attribute");
  101124. }
  101125. if (storyId) {
  101126. return null;
  101127. }
  101128. if (storyRef) {
  101129. return genImportStory(ast, storyRef, storyName, context);
  101130. }
  101131. const statements = [];
  101132. const storyKey = getStoryKey(storyName, context.counter);
  101133. const bodyNodes = ast.children.filter((n) => !t.isJSXText(n));
  101134. let storyCode = null;
  101135. let sourceCode = null;
  101136. let storyVal = null;
  101137. if (!bodyNodes.length) {
  101138. if (ast.children.length > 0) {
  101139. const { code: code2 } = (0, import_generator.default)(ast.children[0], {});
  101140. storyCode = `'${code2}'`;
  101141. sourceCode = storyCode;
  101142. storyVal = `() => (
  101143. ${storyCode}
  101144. )`;
  101145. } else {
  101146. sourceCode = "{}";
  101147. storyVal = "{}";
  101148. }
  101149. } else {
  101150. const bodyParts = bodyNodes.map((bodyNode) => getBodyPart(bodyNode, context));
  101151. storyCode = bodyParts.map(({ storyCode: code2 }) => code2).join("\n");
  101152. sourceCode = bodyParts.map(({ sourceCode: code2 }) => code2).join("\n");
  101153. const storyReactCode = bodyParts.length > 1 ? `<>
  101154. ${storyCode}
  101155. </>` : storyCode;
  101156. const BIND_REGEX = /\.bind\(.*\)/;
  101157. if (bodyParts.length === 1) {
  101158. if (BIND_REGEX.test(bodyParts[0].storyCode)) {
  101159. storyVal = bodyParts[0].storyCode;
  101160. } else if (t.isIdentifier(bodyParts[0].body)) {
  101161. storyVal = `assertIsFn(${storyCode})`;
  101162. } else if (t.isArrowFunctionExpression(bodyParts[0].body)) {
  101163. storyVal = `(${storyCode})`;
  101164. } else {
  101165. storyVal = `() => (
  101166. ${storyReactCode}
  101167. )`;
  101168. }
  101169. } else {
  101170. storyVal = `() => (
  101171. ${storyReactCode}
  101172. )`;
  101173. }
  101174. }
  101175. statements.push(`export const ${storyKey} = ${storyVal};`);
  101176. statements.push(`${storyKey}.storyName = '${storyName}';`);
  101177. const argTypes = genAttribute("argTypes", ast.openingElement);
  101178. if (argTypes)
  101179. statements.push(`${storyKey}.argTypes = ${argTypes};`);
  101180. const args = genAttribute("args", ast.openingElement);
  101181. if (args)
  101182. statements.push(`${storyKey}.args = ${args};`);
  101183. const parameters = expressionOrNull(getAttr(ast.openingElement, "parameters"));
  101184. const source2 = (0, import_js_string_escape.default)(sourceCode);
  101185. const sourceParam = `storySource: { source: '${source2}' }`;
  101186. if (parameters) {
  101187. const { code: params } = (0, import_generator.default)(parameters, {});
  101188. statements.push(`${storyKey}.parameters = { ${sourceParam}, ...${params} };`);
  101189. } else {
  101190. statements.push(`${storyKey}.parameters = { ${sourceParam} };`);
  101191. }
  101192. const decorators = expressionOrNull(getAttr(ast.openingElement, "decorators"));
  101193. if (decorators) {
  101194. const { code: decos } = (0, import_generator.default)(decorators, {});
  101195. statements.push(`${storyKey}.decorators = ${decos};`);
  101196. }
  101197. const loaders = expressionOrNull(getAttr(ast.openingElement, "loaders"));
  101198. if (loaders) {
  101199. const { code: loaderCode } = (0, import_generator.default)(loaders, {});
  101200. statements.push(`${storyKey}.loaders = ${loaderCode};`);
  101201. }
  101202. const play = expressionOrNull(getAttr(ast.openingElement, "play"));
  101203. if (play) {
  101204. const { code: playCode } = (0, import_generator.default)(play, {});
  101205. statements.push(`${storyKey}.play = ${playCode};`);
  101206. }
  101207. const render = expressionOrNull(getAttr(ast.openingElement, "render"));
  101208. if (render) {
  101209. const { code: renderCode } = (0, import_generator.default)(render, {});
  101210. statements.push(`${storyKey}.render = ${renderCode};`);
  101211. }
  101212. context.storyNameToKey[storyName] = storyKey;
  101213. return {
  101214. [storyKey]: statements.join("\n")
  101215. };
  101216. }
  101217. function genCanvasExports(ast, context) {
  101218. const canvasExports = {};
  101219. for (let i = 0; i < ast.children.length; i += 1) {
  101220. const child = ast.children[i];
  101221. if (t.isJSXElement(child) && t.isJSXIdentifier(child.openingElement.name) && child.openingElement.name.name === "Story") {
  101222. const storyExport = genStoryExport(child, context);
  101223. const { code: code2 } = (0, import_generator.default)(child, {});
  101224. child.value = code2;
  101225. if (storyExport) {
  101226. Object.assign(canvasExports, storyExport);
  101227. context.counter += 1;
  101228. }
  101229. }
  101230. }
  101231. return canvasExports;
  101232. }
  101233. function genMeta(ast, options) {
  101234. if (getAttr(ast.openingElement, "of")) {
  101235. throw new Error(`The 'of' prop is not supported in .stories.mdx files, only .mdx files.
  101236. See https://storybook.js.org/docs/7.0/react/writing-docs/mdx on how to write MDX files and stories separately.`);
  101237. }
  101238. const titleAttr = getAttr(ast.openingElement, "title");
  101239. const idAttr = getAttr(ast.openingElement, "id");
  101240. let title = null;
  101241. if (titleAttr) {
  101242. if (t.isStringLiteral(titleAttr)) {
  101243. title = "'".concat((0, import_js_string_escape.default)(titleAttr.value), "'");
  101244. } else if (t.isJSXExpressionContainer(titleAttr)) {
  101245. try {
  101246. const { code: code2 } = (0, import_generator.default)(titleAttr.expression, {});
  101247. title = code2.replace(/^\{(.+)\}$/, "$1");
  101248. } catch (e) {
  101249. console.warn("Invalid title:", options.filepath);
  101250. title = void 0;
  101251. }
  101252. } else {
  101253. console.warn(`Unknown title attr: ${titleAttr.type}`);
  101254. }
  101255. }
  101256. const id = t.isStringLiteral(idAttr) ? `'${idAttr.value}'` : null;
  101257. const parameters = genAttribute("parameters", ast.openingElement);
  101258. const decorators = genAttribute("decorators", ast.openingElement);
  101259. const loaders = genAttribute("loaders", ast.openingElement);
  101260. const component = genAttribute("component", ast.openingElement);
  101261. const subcomponents = genAttribute("subcomponents", ast.openingElement);
  101262. const args = genAttribute("args", ast.openingElement);
  101263. const argTypes = genAttribute("argTypes", ast.openingElement);
  101264. const render = genAttribute("render", ast.openingElement);
  101265. return {
  101266. title,
  101267. id,
  101268. parameters,
  101269. decorators,
  101270. loaders,
  101271. component,
  101272. subcomponents,
  101273. args,
  101274. argTypes,
  101275. render,
  101276. tags: "['stories-mdx']"
  101277. };
  101278. }
  101279. var wrapperJs = `
  101280. componentMeta.parameters = componentMeta.parameters || {};
  101281. componentMeta.parameters.docs = {
  101282. ...(componentMeta.parameters.docs || {}),
  101283. page: MDXContent,
  101284. };
  101285. `.trim();
  101286. function stringifyMeta(meta) {
  101287. let result = "{ ";
  101288. Object.entries(meta).forEach(([key2, val]) => {
  101289. if (val) {
  101290. result += `${key2}: ${val}, `;
  101291. }
  101292. });
  101293. result += " }";
  101294. return result;
  101295. }
  101296. // src/jsx.ts
  101297. var import_core3 = __toESM(require_lib32());
  101298. var import_preset_react = __toESM(require_lib37());
  101299. function getBabelOptions(jsxOptions) {
  101300. return {
  101301. filename: "file.js",
  101302. sourceType: "module",
  101303. configFile: false,
  101304. babelrc: false,
  101305. presets: [
  101306. [
  101307. import_preset_react.default,
  101308. {
  101309. runtime: "automatic",
  101310. ...jsxOptions
  101311. }
  101312. ]
  101313. ]
  101314. };
  101315. }
  101316. var transformJSXAsync = async (input, jsxOptions) => {
  101317. const babelOptions = getBabelOptions(jsxOptions);
  101318. const { code: code2 } = await (0, import_core3.transformAsync)(input, babelOptions);
  101319. return code2;
  101320. };
  101321. var transformJSXSync = (input, jsxOptions) => {
  101322. const babelOptions = getBabelOptions(jsxOptions);
  101323. const { code: code2 } = (0, import_core3.transformSync)(input, babelOptions);
  101324. return code2;
  101325. };
  101326. // src/index.ts
  101327. var SEPARATOR = "/* ========= */";
  101328. var hasStoryChild = (node2) => {
  101329. return node2.children?.length > 0 && node2.children.find((c2) => c2.name === "Story");
  101330. };
  101331. var generateMdxSource = (canvas) => {
  101332. const babel = (0, import_estree_to_babel.default)((0, import_cloneDeep.default)(toEstree(canvas)));
  101333. const { code: code2 } = (0, import_generator2.default)(babel, {});
  101334. return code2.replace(/<\/?Canvas[^>]*>;?/g, "");
  101335. };
  101336. function extractExports(root4, options) {
  101337. const context = {
  101338. counter: 0,
  101339. storyNameToKey: {},
  101340. namedExports: {}
  101341. };
  101342. const storyExports = [];
  101343. const includeStories = [];
  101344. let metaExport = null;
  101345. let contents;
  101346. root4.program.body.forEach((child) => {
  101347. if (t2.isExpressionStatement(child) && t2.isJSXFragment(child.expression)) {
  101348. if (contents)
  101349. throw new Error("duplicate contents");
  101350. contents = child;
  101351. } else if (t2.isExportNamedDeclaration(child) && t2.isVariableDeclaration(child.declaration) && child.declaration.declarations.length === 1) {
  101352. const declaration = child.declaration.declarations[0];
  101353. if (t2.isVariableDeclarator(declaration) && t2.isIdentifier(declaration.id)) {
  101354. const { name: name2 } = declaration.id;
  101355. context.namedExports[name2] = declaration.init;
  101356. }
  101357. }
  101358. });
  101359. if (contents) {
  101360. const jsx2 = contents.expression;
  101361. jsx2.children.forEach((child) => {
  101362. if (t2.isJSXElement(child)) {
  101363. if (t2.isJSXIdentifier(child.openingElement.name)) {
  101364. const name2 = child.openingElement.name.name;
  101365. let stories;
  101366. if (["Canvas", "Preview"].includes(name2)) {
  101367. stories = genCanvasExports(child, context);
  101368. } else if (name2 === "Story") {
  101369. stories = genStoryExport(child, context);
  101370. } else if (name2 === "Meta") {
  101371. const meta = genMeta(child, options);
  101372. if (meta) {
  101373. if (metaExport) {
  101374. throw new Error("Meta can only be declared once");
  101375. }
  101376. metaExport = meta;
  101377. }
  101378. }
  101379. if (stories) {
  101380. Object.entries(stories).forEach(([key2, story]) => {
  101381. includeStories.push(key2);
  101382. storyExports.push(story);
  101383. });
  101384. }
  101385. }
  101386. } else if (t2.isJSXExpressionContainer(child)) {
  101387. } else {
  101388. throw new Error(`Unexpected JSX child: ${child.type}`);
  101389. }
  101390. });
  101391. }
  101392. if (metaExport) {
  101393. if (!storyExports.length) {
  101394. storyExports.push('export const __page = () => { throw new Error("Docs-only story"); };');
  101395. storyExports.push("__page.parameters = { docsOnly: true };");
  101396. includeStories.push("__page");
  101397. }
  101398. } else {
  101399. metaExport = {};
  101400. }
  101401. metaExport.includeStories = JSON.stringify(includeStories);
  101402. const fullJsx = [
  101403. ...storyExports,
  101404. `const componentMeta = ${stringifyMeta(metaExport)};`,
  101405. wrapperJs,
  101406. "export default componentMeta;"
  101407. ].join("\n\n");
  101408. return fullJsx;
  101409. }
  101410. var genBabel = (store, root4) => {
  101411. const estree = store.toEstree(root4);
  101412. const clone = (0, import_cloneDeep.default)(estree);
  101413. const babel = (0, import_estree_to_babel.default)(clone);
  101414. return babel;
  101415. };
  101416. var plugin = (store) => (root4) => {
  101417. const babel = genBabel(store, root4);
  101418. store.exports = extractExports(babel, {});
  101419. root4.children.forEach((node2) => {
  101420. if (node2.type === "mdxJsxFlowElement" && node2.name === "Canvas") {
  101421. if (!hasStoryChild(node2)) {
  101422. node2.attributes = [
  101423. ...node2.attributes || [],
  101424. { type: "mdxJsxAttribute", name: "mdxSource", value: generateMdxSource(node2) }
  101425. ];
  101426. }
  101427. }
  101428. });
  101429. return root4;
  101430. };
  101431. var postprocess2 = (code2, extractedExports) => {
  101432. const lines = code2.toString().trim().split("\n");
  101433. const first = lines.shift();
  101434. return [
  101435. ...lines.filter((line2) => !line2.match(/^export default/)),
  101436. SEPARATOR,
  101437. extractedExports
  101438. ].join("\n");
  101439. };
  101440. var compile2 = async (input, { skipCsf = false, mdxCompileOptions = {}, jsxOptions = {} } = {}) => {
  101441. const { options, context } = getCompilerOptionsAndContext(mdxCompileOptions, skipCsf);
  101442. if (skipCsf) {
  101443. const mdxResult2 = await compile(input, options);
  101444. return mdxResult2.toString();
  101445. }
  101446. const mdxResult = await compile(input, options);
  101447. return transformJSXAsync(postprocess2(mdxResult.toString(), context.exports), jsxOptions);
  101448. };
  101449. var compileSync2 = (input, { skipCsf = false, mdxCompileOptions = {}, jsxOptions = {} } = {}) => {
  101450. const { options, context } = getCompilerOptionsAndContext(mdxCompileOptions, skipCsf);
  101451. if (skipCsf) {
  101452. const mdxResult2 = compileSync(input, options);
  101453. return mdxResult2.toString();
  101454. }
  101455. const mdxResult = compileSync(input, options);
  101456. return transformJSXSync(postprocess2(mdxResult.toString(), context.exports), jsxOptions);
  101457. };
  101458. function getCompilerOptionsAndContext(mdxCompileOptions, skipCsf = false) {
  101459. if (skipCsf) {
  101460. return {
  101461. options: {
  101462. providerImportSource: "@mdx-js/react",
  101463. rehypePlugins: [],
  101464. ...mdxCompileOptions
  101465. },
  101466. context: {}
  101467. };
  101468. }
  101469. const context = { exports: "", toEstree };
  101470. return {
  101471. options: {
  101472. providerImportSource: "@mdx-js/react",
  101473. ...mdxCompileOptions,
  101474. rehypePlugins: [...mdxCompileOptions?.rehypePlugins || [], [plugin, context]],
  101475. // preserve the JSX, we'll deal with it using babel
  101476. jsx: true
  101477. },
  101478. context
  101479. };
  101480. }
  101481. export {
  101482. SEPARATOR,
  101483. compile2 as compile,
  101484. compileSync2 as compileSync,
  101485. genBabel,
  101486. plugin,
  101487. postprocess2 as postprocess,
  101488. wrapperJs
  101489. };
  101490. /*! Bundled license information:
  101491. is-buffer/index.js:
  101492. (*!
  101493. * Determine if an object is a Buffer
  101494. *
  101495. * @author Feross Aboukhadijeh <https://feross.org>
  101496. * @license MIT
  101497. *)
  101498. */