systemjs-babel-node.js 1.7 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086
  1. !function(e){function t(e){Object.defineProperty(this,e,{enumerable:!0,get:function(){return this[v][e]}})}function r(e){if("undefined"!=typeof System&&System.isModule?System.isModule(e):"[object Module]"===Object.prototype.toString.call(e))return e;var t={default:e,__useDefault:e};if(e&&e.__esModule)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return new o(t)}function o(e){Object.defineProperty(this,v,{value:e}),Object.keys(e).forEach(t,this)}function n(e){return"@node/"===e.substr(0,6)?c(e,r(m(e.substr(6))),{}):p[e]}function u(e){var t=n(e);if(!t)throw new Error('Module "'+e+'" expected, but not contained in build.');if(t.module)return t.module;var r=t.linkRecord;return i(t,r),a(t,r,[]),t.module}function i(e,t){if(!t.depLoads){t.declare&&d(e,t),t.depLoads=[];for(var r=0;r<t.deps.length;r++){var o=n(t.deps[r]);t.depLoads.push(o),o.linkRecord&&i(o,o.linkRecord);var u=t.setters&&t.setters[r];u&&(u(o.module||o.linkRecord.moduleObj),o.importerSetters.push(u))}return e}}function d(t,r){var o=r.moduleObj,n=t.importerSetters,u=!1,i=r.declare.call(e,function(e,t){if(!u){if("object"==typeof e)for(var r in e)"__useDefault"!==r&&(o[r]=e[r]);else o[e]=t;u=!0;for(var i=0;i<n.length;i++)n[i](o);return u=!1,t}},{id:t.key});"function"!=typeof i?(r.setters=i.setters,r.execute=i.execute):(r.setters=[],r.execute=i)}function l(e,t,r){return p[e]={key:e,module:void 0,importerSetters:[],linkRecord:{deps:t,depLoads:void 0,declare:r,setters:void 0,execute:void 0,moduleObj:{}}}}function f(e,t,r,o){var n={};return p[e]={key:e,module:void 0,importerSetters:[],linkRecord:{deps:t,depLoads:void 0,declare:void 0,execute:o,executingRequire:r,moduleObj:{default:n,__useDefault:n},setters:void 0}}}function s(e,t,r){return function(o){for(var n=0;n<e.length;n++)if(e[n]===o){var u,i=t[n],d=i.linkRecord;return u=d?-1===r.indexOf(i)?a(i,d,r):d.moduleObj:i.module,"__useDefault"in u?u.__useDefault:u}}}function a(t,r,n){if(n.push(t),t.module)return t.module;var u;if(r.setters){for(var i=0;i<r.deps.length;i++){var d=r.depLoads[i],l=d.linkRecord;l&&-1===n.indexOf(d)&&(u=a(d,l,l.setters?n:[]))}r.execute.call(y)}else{var f={id:t.key},c=r.moduleObj;Object.defineProperty(f,"exports",{configurable:!0,set:function(e){c.default=c.__useDefault=e},get:function(){return c.__useDefault}});var p=s(r.deps,r.depLoads,n);if(!r.executingRequire)for(var i=0;i<r.deps.length;i++)p(r.deps[i]);var v=r.execute.call(e,p,c.__useDefault,f);void 0!==v&&(c.default=c.__useDefault=v);var m=c.__useDefault;if(m&&m.__esModule)for(var b in m)Object.hasOwnProperty.call(m,b)&&(c[b]=m[b])}var f=t.module=new o(r.moduleObj);if(!r.setters)for(var i=0;i<t.importerSetters.length;i++)t.importerSetters[i](f);return f}function c(e,t){return p[e]={key:e,module:t,importerSetters:[],linkRecord:void 0}}var p={},v="undefined"!=typeof Symbol?Symbol():"@@baseObject";o.prototype=Object.create(null),"undefined"!=typeof Symbol&&Symbol.toStringTag&&(o.prototype[Symbol.toStringTag]="Module");var m="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&"undefined"!=typeof require.resolve&&"undefined"!=typeof process&&process.platform&&require,y={};return Object.freeze&&Object.freeze(y),function(e,t,n,i){return function(d){d(function(d){var s={_nodeRequire:m,register:l,registerDynamic:f,registry:{get:function(e){return p[e].module},set:c},newModule:function(e){return new o(e)}};c("@empty",new o({}));for(var a=0;a<t.length;a++)c(t[a],r(arguments[a],{}));i(s);var v=u(e[0]);if(e.length>1)for(var a=1;a<e.length;a++)u(e[a]);return n?v.__useDefault:(v instanceof o&&Object.defineProperty(v,"__esModule",{value:!0}),v)})}}}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this)
  2. (["a"], [], false, function($__System) {
  3. var require = this.require, exports = this.exports, module = this.module;
  4. $__System.registerDynamic("b", ["d", "e", "f", "10", "11", "c"], true, function ($__require, exports, module) {
  5. "use strict";
  6. var process = $__require("c");
  7. var global = this || self,
  8. GLOBAL = global;
  9. exports.__esModule = true;
  10. exports.default = function (whitelist) {
  11. var outputType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "global";
  12. var namespace = t.identifier("babelHelpers");
  13. var builder = function builder(body) {
  14. return buildHelpers(body, namespace, whitelist);
  15. };
  16. var tree = void 0;
  17. var build = {
  18. global: buildGlobal,
  19. umd: buildUmd,
  20. var: buildVar
  21. }[outputType];
  22. if (build) {
  23. tree = build(namespace, builder);
  24. } else {
  25. throw new Error(messages.get("unsupportedOutputType", outputType));
  26. }
  27. return (0, _babelGenerator2.default)(tree).code;
  28. };
  29. var _babelHelpers = $__require("d");
  30. var helpers = _interopRequireWildcard(_babelHelpers);
  31. var _babelGenerator = $__require("e");
  32. var _babelGenerator2 = _interopRequireDefault(_babelGenerator);
  33. var _babelMessages = $__require("f");
  34. var messages = _interopRequireWildcard(_babelMessages);
  35. var _babelTemplate = $__require("10");
  36. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  37. var _babelTypes = $__require("11");
  38. var t = _interopRequireWildcard(_babelTypes);
  39. function _interopRequireDefault(obj) {
  40. return obj && obj.__esModule ? obj : { default: obj };
  41. }
  42. function _interopRequireWildcard(obj) {
  43. if (obj && obj.__esModule) {
  44. return obj;
  45. } else {
  46. var newObj = {};if (obj != null) {
  47. for (var key in obj) {
  48. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  49. }
  50. }newObj.default = obj;return newObj;
  51. }
  52. }
  53. var buildUmdWrapper = (0, _babelTemplate2.default)("\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n");
  54. function buildGlobal(namespace, builder) {
  55. var body = [];
  56. var container = t.functionExpression(null, [t.identifier("global")], t.blockStatement(body));
  57. var tree = t.program([t.expressionStatement(t.callExpression(container, [helpers.get("selfGlobal")]))]);
  58. body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.assignmentExpression("=", t.memberExpression(t.identifier("global"), namespace), t.objectExpression([])))]));
  59. builder(body);
  60. return tree;
  61. }
  62. function buildUmd(namespace, builder) {
  63. var body = [];
  64. body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.identifier("global"))]));
  65. builder(body);
  66. return t.program([buildUmdWrapper({
  67. FACTORY_PARAMETERS: t.identifier("global"),
  68. BROWSER_ARGUMENTS: t.assignmentExpression("=", t.memberExpression(t.identifier("root"), namespace), t.objectExpression([])),
  69. COMMON_ARGUMENTS: t.identifier("exports"),
  70. AMD_ARGUMENTS: t.arrayExpression([t.stringLiteral("exports")]),
  71. FACTORY_BODY: body,
  72. UMD_ROOT: t.identifier("this")
  73. })]);
  74. }
  75. function buildVar(namespace, builder) {
  76. var body = [];
  77. body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.objectExpression([]))]));
  78. builder(body);
  79. body.push(t.expressionStatement(namespace));
  80. return t.program(body);
  81. }
  82. function buildHelpers(body, namespace, whitelist) {
  83. helpers.list.forEach(function (name) {
  84. if (whitelist && whitelist.indexOf(name) < 0) return;
  85. var key = t.identifier(name);
  86. body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(namespace, key), helpers.get(name))));
  87. });
  88. }
  89. module.exports = exports["default"];
  90. });
  91. $__System.registerDynamic("12", [], true, function() {
  92. return {
  93. "name": "babel-core",
  94. "version": "6.25.0",
  95. "description": "Babel compiler core.",
  96. "author": "Sebastian McKenzie <sebmck@gmail.com>",
  97. "homepage": "https://babeljs.io/",
  98. "license": "MIT",
  99. "repository": "https://github.com/babel/babel/tree/master/packages/babel-core",
  100. "keywords": [
  101. "6to5",
  102. "babel",
  103. "classes",
  104. "const",
  105. "es6",
  106. "harmony",
  107. "let",
  108. "modules",
  109. "transpile",
  110. "transpiler",
  111. "var",
  112. "babel-core",
  113. "compiler"
  114. ],
  115. "scripts": {
  116. "bench": "make bench",
  117. "test": "make test"
  118. },
  119. "dependencies": {
  120. "babel-code-frame": "^6.22.0",
  121. "babel-generator": "^6.25.0",
  122. "babel-helpers": "^6.24.1",
  123. "babel-messages": "^6.23.0",
  124. "babel-template": "^6.25.0",
  125. "babel-runtime": "^6.22.0",
  126. "babel-register": "^6.24.1",
  127. "babel-traverse": "^6.25.0",
  128. "babel-types": "^6.25.0",
  129. "babylon": "^6.17.2",
  130. "convert-source-map": "^1.1.0",
  131. "debug": "^2.1.1",
  132. "json5": "^0.5.0",
  133. "lodash": "^4.2.0",
  134. "minimatch": "^3.0.2",
  135. "path-is-absolute": "^1.0.0",
  136. "private": "^0.1.6",
  137. "slash": "^1.0.0",
  138. "source-map": "^0.5.0"
  139. },
  140. "devDependencies": {
  141. "babel-helper-fixtures": "^6.22.0",
  142. "babel-helper-transform-fixture-test-runner": "^6.24.1",
  143. "babel-polyfill": "^6.23.0"
  144. }
  145. };
  146. });
  147. $__System.registerDynamic("13", ["11", "c"], true, function ($__require, exports, module) {
  148. "use strict";
  149. var process = $__require("c");
  150. var global = this || self,
  151. GLOBAL = global;
  152. exports.__esModule = true;
  153. exports.default = function (ast, comments, tokens) {
  154. if (ast) {
  155. if (ast.type === "Program") {
  156. return t.file(ast, comments || [], tokens || []);
  157. } else if (ast.type === "File") {
  158. return ast;
  159. }
  160. }
  161. throw new Error("Not a valid ast?");
  162. };
  163. var _babelTypes = $__require("11");
  164. var t = _interopRequireWildcard(_babelTypes);
  165. function _interopRequireWildcard(obj) {
  166. if (obj && obj.__esModule) {
  167. return obj;
  168. } else {
  169. var newObj = {};if (obj != null) {
  170. for (var key in obj) {
  171. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  172. }
  173. }newObj.default = obj;return newObj;
  174. }
  175. }
  176. module.exports = exports["default"];
  177. });
  178. $__System.registerDynamic("14", ["10"], true, function ($__require, exports, module) {
  179. "use strict";
  180. var global = this || self,
  181. GLOBAL = global;
  182. exports.__esModule = true;
  183. var _babelTemplate = $__require("10");
  184. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  185. function _interopRequireDefault(obj) {
  186. return obj && obj.__esModule ? obj : { default: obj };
  187. }
  188. var helpers = {};
  189. exports.default = helpers;
  190. helpers.typeof = (0, _babelTemplate2.default)("\n (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj;\n };\n");
  191. helpers.jsx = (0, _babelTemplate2.default)("\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we're going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n");
  192. helpers.asyncIterator = (0, _babelTemplate2.default)("\n (function (iterable) {\n if (typeof Symbol === \"function\") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError(\"Object is not async iterable\");\n })\n");
  193. helpers.asyncGenerator = (0, _babelTemplate2.default)("\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume(\"next\", arg); },\n function (arg) { resume(\"throw\", arg); });\n } else {\n settle(result.done ? \"return\" : \"normal\", result.value);\n }\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({ value: value, done: true });\n break;\n case \"throw\":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide \"return\" method if generator return is not supported\n if (typeof gen.return !== \"function\") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke(\"next\", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke(\"throw\", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke(\"return\", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n");
  194. helpers.asyncGeneratorDelegate = (0, _babelTemplate2.default)("\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === \"function\" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump(\"next\", value);\n };\n\n if (typeof inner.throw === \"function\") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump(\"throw\", value);\n };\n }\n\n if (typeof inner.return === \"function\") {\n iter.return = function (value) {\n return pump(\"return\", value);\n };\n }\n\n return iter;\n })\n");
  195. helpers.asyncToGenerator = (0, _babelTemplate2.default)("\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step(\"next\", value);\n }, function (err) {\n step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n })\n");
  196. helpers.classCallCheck = (0, _babelTemplate2.default)("\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n });\n");
  197. helpers.createClass = (0, _babelTemplate2.default)("\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n");
  198. helpers.defineEnumerableProperties = (0, _babelTemplate2.default)("\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n");
  199. helpers.defaults = (0, _babelTemplate2.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n");
  200. helpers.defineProperty = (0, _babelTemplate2.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n");
  201. helpers.extends = (0, _babelTemplate2.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n");
  202. helpers.get = (0, _babelTemplate2.default)("\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n");
  203. helpers.inherits = (0, _babelTemplate2.default)("\n (function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n");
  204. helpers.instanceof = (0, _babelTemplate2.default)("\n (function (left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n");
  205. helpers.interopRequireDefault = (0, _babelTemplate2.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n");
  206. helpers.interopRequireWildcard = (0, _babelTemplate2.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n");
  207. helpers.newArrowCheck = (0, _babelTemplate2.default)("\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n });\n");
  208. helpers.objectDestructuringEmpty = (0, _babelTemplate2.default)("\n (function (obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n });\n");
  209. helpers.objectWithoutProperties = (0, _babelTemplate2.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n");
  210. helpers.possibleConstructorReturn = (0, _babelTemplate2.default)("\n (function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n });\n");
  211. helpers.selfGlobal = (0, _babelTemplate2.default)("\n typeof global === \"undefined\" ? self : global\n");
  212. helpers.set = (0, _babelTemplate2.default)("\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n");
  213. helpers.slicedToArray = (0, _babelTemplate2.default)("\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n })();\n");
  214. helpers.slicedToArrayLoose = (0, _babelTemplate2.default)("\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n });\n");
  215. helpers.taggedTemplateLiteral = (0, _babelTemplate2.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n");
  216. helpers.taggedTemplateLiteralLoose = (0, _babelTemplate2.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n");
  217. helpers.temporalRef = (0, _babelTemplate2.default)("\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n })\n");
  218. helpers.temporalUndefined = (0, _babelTemplate2.default)("\n ({})\n");
  219. helpers.toArray = (0, _babelTemplate2.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n");
  220. helpers.toConsumableArray = (0, _babelTemplate2.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n");
  221. module.exports = exports["default"];
  222. });
  223. $__System.registerDynamic("d", ["15", "14"], true, function ($__require, exports, module) {
  224. "use strict";
  225. var global = this || self,
  226. GLOBAL = global;
  227. exports.__esModule = true;
  228. exports.list = undefined;
  229. var _keys = $__require("15");
  230. var _keys2 = _interopRequireDefault(_keys);
  231. exports.get = get;
  232. var _helpers = $__require("14");
  233. var _helpers2 = _interopRequireDefault(_helpers);
  234. function _interopRequireDefault(obj) {
  235. return obj && obj.__esModule ? obj : { default: obj };
  236. }
  237. function get(name) {
  238. var fn = _helpers2.default[name];
  239. if (!fn) throw new ReferenceError("Unknown helper " + name);
  240. return fn().expression;
  241. }
  242. var list = exports.list = (0, _keys2.default)(_helpers2.default).map(function (name) {
  243. return name.replace(/^_/, "");
  244. }).filter(function (name) {
  245. return name !== "__esModule";
  246. });
  247. exports.default = get;
  248. });
  249. $__System.registerDynamic("16", ["17", "11", "c"], true, function ($__require, exports, module) {
  250. "use strict";
  251. var process = $__require("c");
  252. var global = this || self,
  253. GLOBAL = global;
  254. exports.__esModule = true;
  255. exports.ImportDeclaration = exports.ModuleDeclaration = undefined;
  256. var _getIterator2 = $__require("17");
  257. var _getIterator3 = _interopRequireDefault(_getIterator2);
  258. exports.ExportDeclaration = ExportDeclaration;
  259. exports.Scope = Scope;
  260. var _babelTypes = $__require("11");
  261. var t = _interopRequireWildcard(_babelTypes);
  262. function _interopRequireWildcard(obj) {
  263. if (obj && obj.__esModule) {
  264. return obj;
  265. } else {
  266. var newObj = {};if (obj != null) {
  267. for (var key in obj) {
  268. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  269. }
  270. }newObj.default = obj;return newObj;
  271. }
  272. }
  273. function _interopRequireDefault(obj) {
  274. return obj && obj.__esModule ? obj : { default: obj };
  275. }
  276. var ModuleDeclaration = exports.ModuleDeclaration = {
  277. enter: function enter(path, file) {
  278. var node = path.node;
  279. if (node.source) {
  280. node.source.value = file.resolveModuleSource(node.source.value);
  281. }
  282. }
  283. };
  284. var ImportDeclaration = exports.ImportDeclaration = {
  285. exit: function exit(path, file) {
  286. var node = path.node;
  287. var specifiers = [];
  288. var imported = [];
  289. file.metadata.modules.imports.push({
  290. source: node.source.value,
  291. imported: imported,
  292. specifiers: specifiers
  293. });
  294. for (var _iterator = path.get("specifiers"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  295. var _ref;
  296. if (_isArray) {
  297. if (_i >= _iterator.length) break;
  298. _ref = _iterator[_i++];
  299. } else {
  300. _i = _iterator.next();
  301. if (_i.done) break;
  302. _ref = _i.value;
  303. }
  304. var specifier = _ref;
  305. var local = specifier.node.local.name;
  306. if (specifier.isImportDefaultSpecifier()) {
  307. imported.push("default");
  308. specifiers.push({
  309. kind: "named",
  310. imported: "default",
  311. local: local
  312. });
  313. }
  314. if (specifier.isImportSpecifier()) {
  315. var importedName = specifier.node.imported.name;
  316. imported.push(importedName);
  317. specifiers.push({
  318. kind: "named",
  319. imported: importedName,
  320. local: local
  321. });
  322. }
  323. if (specifier.isImportNamespaceSpecifier()) {
  324. imported.push("*");
  325. specifiers.push({
  326. kind: "namespace",
  327. local: local
  328. });
  329. }
  330. }
  331. }
  332. };
  333. function ExportDeclaration(path, file) {
  334. var node = path.node;
  335. var source = node.source ? node.source.value : null;
  336. var exports = file.metadata.modules.exports;
  337. var declar = path.get("declaration");
  338. if (declar.isStatement()) {
  339. var bindings = declar.getBindingIdentifiers();
  340. for (var name in bindings) {
  341. exports.exported.push(name);
  342. exports.specifiers.push({
  343. kind: "local",
  344. local: name,
  345. exported: path.isExportDefaultDeclaration() ? "default" : name
  346. });
  347. }
  348. }
  349. if (path.isExportNamedDeclaration() && node.specifiers) {
  350. for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  351. var _ref2;
  352. if (_isArray2) {
  353. if (_i2 >= _iterator2.length) break;
  354. _ref2 = _iterator2[_i2++];
  355. } else {
  356. _i2 = _iterator2.next();
  357. if (_i2.done) break;
  358. _ref2 = _i2.value;
  359. }
  360. var specifier = _ref2;
  361. var exported = specifier.exported.name;
  362. exports.exported.push(exported);
  363. if (t.isExportDefaultSpecifier(specifier)) {
  364. exports.specifiers.push({
  365. kind: "external",
  366. local: exported,
  367. exported: exported,
  368. source: source
  369. });
  370. }
  371. if (t.isExportNamespaceSpecifier(specifier)) {
  372. exports.specifiers.push({
  373. kind: "external-namespace",
  374. exported: exported,
  375. source: source
  376. });
  377. }
  378. var local = specifier.local;
  379. if (!local) continue;
  380. if (source) {
  381. exports.specifiers.push({
  382. kind: "external",
  383. local: local.name,
  384. exported: exported,
  385. source: source
  386. });
  387. }
  388. if (!source) {
  389. exports.specifiers.push({
  390. kind: "local",
  391. local: local.name,
  392. exported: exported
  393. });
  394. }
  395. }
  396. }
  397. if (path.isExportAllDeclaration()) {
  398. exports.specifiers.push({
  399. kind: "external-all",
  400. source: source
  401. });
  402. }
  403. }
  404. function Scope(path) {
  405. path.skip();
  406. }
  407. });
  408. $__System.registerDynamic('18', ['@node/fs', '@node/path', '19'], true, function ($__require, exports, module) {
  409. 'use strict';
  410. var Buffer = $__require('19');
  411. var global = this || self,
  412. GLOBAL = global;
  413. var fs = $__require('@node/fs');
  414. var path = $__require('@node/path');
  415. Object.defineProperty(exports, 'commentRegex', {
  416. get: function getCommentRegex() {
  417. return (/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg
  418. );
  419. }
  420. });
  421. Object.defineProperty(exports, 'mapFileCommentRegex', {
  422. get: function getMapFileCommentRegex() {
  423. //Example (Extra space between slashes added to solve Safari bug. Exclude space in production):
  424. // / /# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */
  425. return (/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg
  426. );
  427. }
  428. });
  429. function decodeBase64(base64) {
  430. return new Buffer(base64, 'base64').toString();
  431. }
  432. function stripComment(sm) {
  433. return sm.split(',').pop();
  434. }
  435. function readFromFileMap(sm, dir) {
  436. // NOTE: this will only work on the server since it attempts to read the map file
  437. var r = exports.mapFileCommentRegex.exec(sm);
  438. // for some odd reason //# .. captures in 1 and /* .. */ in 2
  439. var filename = r[1] || r[2];
  440. var filepath = path.resolve(dir, filename);
  441. try {
  442. return fs.readFileSync(filepath, 'utf8');
  443. } catch (e) {
  444. throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e);
  445. }
  446. }
  447. function Converter(sm, opts) {
  448. opts = opts || {};
  449. if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir);
  450. if (opts.hasComment) sm = stripComment(sm);
  451. if (opts.isEncoded) sm = decodeBase64(sm);
  452. if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm);
  453. this.sourcemap = sm;
  454. }
  455. Converter.prototype.toJSON = function (space) {
  456. return JSON.stringify(this.sourcemap, null, space);
  457. };
  458. Converter.prototype.toBase64 = function () {
  459. var json = this.toJSON();
  460. return new Buffer(json).toString('base64');
  461. };
  462. Converter.prototype.toComment = function (options) {
  463. var base64 = this.toBase64();
  464. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  465. return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
  466. };
  467. // returns copy instead of original
  468. Converter.prototype.toObject = function () {
  469. return JSON.parse(this.toJSON());
  470. };
  471. Converter.prototype.addProperty = function (key, value) {
  472. if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead');
  473. return this.setProperty(key, value);
  474. };
  475. Converter.prototype.setProperty = function (key, value) {
  476. this.sourcemap[key] = value;
  477. return this;
  478. };
  479. Converter.prototype.getProperty = function (key) {
  480. return this.sourcemap[key];
  481. };
  482. exports.fromObject = function (obj) {
  483. return new Converter(obj);
  484. };
  485. exports.fromJSON = function (json) {
  486. return new Converter(json, { isJSON: true });
  487. };
  488. exports.fromBase64 = function (base64) {
  489. return new Converter(base64, { isEncoded: true });
  490. };
  491. exports.fromComment = function (comment) {
  492. comment = comment.replace(/^\/\*/g, '//').replace(/\*\/$/g, '');
  493. return new Converter(comment, { isEncoded: true, hasComment: true });
  494. };
  495. exports.fromMapFileComment = function (comment, dir) {
  496. return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true });
  497. };
  498. // Finds last sourcemap comment in file or returns null if none was found
  499. exports.fromSource = function (content) {
  500. var m = content.match(exports.commentRegex);
  501. return m ? exports.fromComment(m.pop()) : null;
  502. };
  503. // Finds last sourcemap comment in file or returns null if none was found
  504. exports.fromMapFileSource = function (content, dir) {
  505. var m = content.match(exports.mapFileCommentRegex);
  506. return m ? exports.fromMapFileComment(m.pop(), dir) : null;
  507. };
  508. exports.removeComments = function (src) {
  509. return src.replace(exports.commentRegex, '');
  510. };
  511. exports.removeMapFileComments = function (src) {
  512. return src.replace(exports.mapFileCommentRegex, '');
  513. };
  514. exports.generateMapFileComment = function (file, options) {
  515. var data = 'sourceMappingURL=' + file;
  516. return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
  517. };
  518. });
  519. $__System.registerDynamic("1a", ["1d", "1e", "1f", "1b", "1c", "c"], true, function ($__require, exports, module) {
  520. "use strict";
  521. var process = $__require("c");
  522. var global = this || self,
  523. GLOBAL = global;
  524. exports.__esModule = true;
  525. var _classCallCheck2 = $__require("1d");
  526. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  527. var _possibleConstructorReturn2 = $__require("1e");
  528. var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
  529. var _inherits2 = $__require("1f");
  530. var _inherits3 = _interopRequireDefault(_inherits2);
  531. var _store = $__require("1b");
  532. var _store2 = _interopRequireDefault(_store);
  533. var _file5 = $__require("1c");
  534. var _file6 = _interopRequireDefault(_file5);
  535. function _interopRequireDefault(obj) {
  536. return obj && obj.__esModule ? obj : { default: obj };
  537. }
  538. var PluginPass = function (_Store) {
  539. (0, _inherits3.default)(PluginPass, _Store);
  540. function PluginPass(file, plugin) {
  541. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  542. (0, _classCallCheck3.default)(this, PluginPass);
  543. var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
  544. _this.plugin = plugin;
  545. _this.key = plugin.key;
  546. _this.file = file;
  547. _this.opts = options;
  548. return _this;
  549. }
  550. PluginPass.prototype.addHelper = function addHelper() {
  551. var _file;
  552. return (_file = this.file).addHelper.apply(_file, arguments);
  553. };
  554. PluginPass.prototype.addImport = function addImport() {
  555. var _file2;
  556. return (_file2 = this.file).addImport.apply(_file2, arguments);
  557. };
  558. PluginPass.prototype.getModuleName = function getModuleName() {
  559. var _file3;
  560. return (_file3 = this.file).getModuleName.apply(_file3, arguments);
  561. };
  562. PluginPass.prototype.buildCodeFrameError = function buildCodeFrameError() {
  563. var _file4;
  564. return (_file4 = this.file).buildCodeFrameError.apply(_file4, arguments);
  565. };
  566. return PluginPass;
  567. }(_store2.default);
  568. exports.default = PluginPass;
  569. module.exports = exports["default"];
  570. });
  571. $__System.registerDynamic('20', [], true, function ($__require, exports, module) {
  572. 'use strict';
  573. var global = this || self,
  574. GLOBAL = global;
  575. module.exports = Number.isNaN || function (x) {
  576. return x !== x;
  577. };
  578. });
  579. $__System.registerDynamic('21', ['20'], true, function ($__require, exports, module) {
  580. 'use strict';
  581. var global = this || self,
  582. GLOBAL = global;
  583. var numberIsNan = $__require('20');
  584. module.exports = Number.isFinite || function (val) {
  585. return !(typeof val !== 'number' || numberIsNan(val) || val === Infinity || val === -Infinity);
  586. };
  587. });
  588. $__System.registerDynamic('22', ['21'], true, function ($__require, exports, module) {
  589. 'use strict';
  590. var global = this || self,
  591. GLOBAL = global;
  592. var isFinite = $__require('21');
  593. module.exports = function (str, n) {
  594. if (typeof str !== 'string') {
  595. throw new TypeError('Expected `input` to be a string');
  596. }
  597. if (n < 0 || !isFinite(n)) {
  598. throw new TypeError('Expected `count` to be a positive finite number');
  599. }
  600. var ret = '';
  601. do {
  602. if (n & 1) {
  603. ret += str;
  604. }
  605. str += str;
  606. } while (n >>= 1);
  607. return ret;
  608. };
  609. });
  610. $__System.registerDynamic('23', ['22'], true, function ($__require, exports, module) {
  611. /* eslint-disable guard-for-in */
  612. 'use strict';
  613. var global = this || self,
  614. GLOBAL = global;
  615. var repeating = $__require('22');
  616. // detect either spaces or tabs but not both to properly handle tabs
  617. // for indentation and spaces for alignment
  618. var INDENT_RE = /^(?:( )+|\t+)/;
  619. function getMostUsed(indents) {
  620. var result = 0;
  621. var maxUsed = 0;
  622. var maxWeight = 0;
  623. for (var n in indents) {
  624. var indent = indents[n];
  625. var u = indent[0];
  626. var w = indent[1];
  627. if (u > maxUsed || u === maxUsed && w > maxWeight) {
  628. maxUsed = u;
  629. maxWeight = w;
  630. result = Number(n);
  631. }
  632. }
  633. return result;
  634. }
  635. module.exports = function (str) {
  636. if (typeof str !== 'string') {
  637. throw new TypeError('Expected a string');
  638. }
  639. // used to see if tabs or spaces are the most used
  640. var tabs = 0;
  641. var spaces = 0;
  642. // remember the size of previous line's indentation
  643. var prev = 0;
  644. // remember how many indents/unindents as occurred for a given size
  645. // and how much lines follow a given indentation
  646. //
  647. // indents = {
  648. // 3: [1, 0],
  649. // 4: [1, 5],
  650. // 5: [1, 0],
  651. // 12: [1, 0],
  652. // }
  653. var indents = {};
  654. // pointer to the array of last used indent
  655. var current;
  656. // whether the last action was an indent (opposed to an unindent)
  657. var isIndent;
  658. str.split(/\n/g).forEach(function (line) {
  659. if (!line) {
  660. // ignore empty lines
  661. return;
  662. }
  663. var indent;
  664. var matches = line.match(INDENT_RE);
  665. if (!matches) {
  666. indent = 0;
  667. } else {
  668. indent = matches[0].length;
  669. if (matches[1]) {
  670. spaces++;
  671. } else {
  672. tabs++;
  673. }
  674. }
  675. var diff = indent - prev;
  676. prev = indent;
  677. if (diff) {
  678. // an indent or unindent has been detected
  679. isIndent = diff > 0;
  680. current = indents[isIndent ? diff : -diff];
  681. if (current) {
  682. current[0]++;
  683. } else {
  684. current = indents[diff] = [1, 0];
  685. }
  686. } else if (current) {
  687. // if the last action was an indent, increment the weight
  688. current[1] += Number(isIndent);
  689. }
  690. });
  691. var amount = getMostUsed(indents);
  692. var type;
  693. var actual;
  694. if (!amount) {
  695. type = null;
  696. actual = '';
  697. } else if (spaces >= tabs) {
  698. type = 'space';
  699. actual = repeating(' ', amount);
  700. } else {
  701. type = 'tab';
  702. actual = repeating('\t', amount);
  703. }
  704. return {
  705. amount: amount,
  706. type: type,
  707. indent: actual
  708. };
  709. };
  710. });
  711. $__System.registerDynamic("24", [], true, function ($__require, exports, module) {
  712. var global = this || self,
  713. GLOBAL = global;
  714. /* -*- Mode: js; js-indent-level: 2; -*- */
  715. /*
  716. * Copyright 2011 Mozilla Foundation and contributors
  717. * Licensed under the New BSD license. See LICENSE or:
  718. * http://opensource.org/licenses/BSD-3-Clause
  719. */
  720. exports.GREATEST_LOWER_BOUND = 1;
  721. exports.LEAST_UPPER_BOUND = 2;
  722. /**
  723. * Recursive implementation of binary search.
  724. *
  725. * @param aLow Indices here and lower do not contain the needle.
  726. * @param aHigh Indices here and higher do not contain the needle.
  727. * @param aNeedle The element being searched for.
  728. * @param aHaystack The non-empty array being searched.
  729. * @param aCompare Function which takes two elements and returns -1, 0, or 1.
  730. * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
  731. * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
  732. * closest element that is smaller than or greater than the one we are
  733. * searching for, respectively, if the exact element cannot be found.
  734. */
  735. function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
  736. // This function terminates when one of the following is true:
  737. //
  738. // 1. We find the exact element we are looking for.
  739. //
  740. // 2. We did not find the exact element, but we can return the index of
  741. // the next-closest element.
  742. //
  743. // 3. We did not find the exact element, and there is no next-closest
  744. // element than the one we are searching for, so we return -1.
  745. var mid = Math.floor((aHigh - aLow) / 2) + aLow;
  746. var cmp = aCompare(aNeedle, aHaystack[mid], true);
  747. if (cmp === 0) {
  748. // Found the element we are looking for.
  749. return mid;
  750. } else if (cmp > 0) {
  751. // Our needle is greater than aHaystack[mid].
  752. if (aHigh - mid > 1) {
  753. // The element is in the upper half.
  754. return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
  755. }
  756. // The exact needle element was not found in this haystack. Determine if
  757. // we are in termination case (3) or (2) and return the appropriate thing.
  758. if (aBias == exports.LEAST_UPPER_BOUND) {
  759. return aHigh < aHaystack.length ? aHigh : -1;
  760. } else {
  761. return mid;
  762. }
  763. } else {
  764. // Our needle is less than aHaystack[mid].
  765. if (mid - aLow > 1) {
  766. // The element is in the lower half.
  767. return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
  768. }
  769. // we are in termination case (3) or (2) and return the appropriate thing.
  770. if (aBias == exports.LEAST_UPPER_BOUND) {
  771. return mid;
  772. } else {
  773. return aLow < 0 ? -1 : aLow;
  774. }
  775. }
  776. }
  777. /**
  778. * This is an implementation of binary search which will always try and return
  779. * the index of the closest element if there is no exact hit. This is because
  780. * mappings between original and generated line/col pairs are single points,
  781. * and there is an implicit region between each of them, so a miss just means
  782. * that you aren't on the very start of a region.
  783. *
  784. * @param aNeedle The element you are looking for.
  785. * @param aHaystack The array that is being searched.
  786. * @param aCompare A function which takes the needle and an element in the
  787. * array and returns -1, 0, or 1 depending on whether the needle is less
  788. * than, equal to, or greater than the element, respectively.
  789. * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
  790. * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
  791. * closest element that is smaller than or greater than the one we are
  792. * searching for, respectively, if the exact element cannot be found.
  793. * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
  794. */
  795. exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
  796. if (aHaystack.length === 0) {
  797. return -1;
  798. }
  799. var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
  800. if (index < 0) {
  801. return -1;
  802. }
  803. // We have found either the exact element, or the next-closest element than
  804. // the one we are searching for. However, there may be more than one such
  805. // element. Make sure we always return the smallest of these.
  806. while (index - 1 >= 0) {
  807. if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
  808. break;
  809. }
  810. --index;
  811. }
  812. return index;
  813. };
  814. });
  815. $__System.registerDynamic("25", [], true, function ($__require, exports, module) {
  816. var global = this || self,
  817. GLOBAL = global;
  818. /* -*- Mode: js; js-indent-level: 2; -*- */
  819. /*
  820. * Copyright 2011 Mozilla Foundation and contributors
  821. * Licensed under the New BSD license. See LICENSE or:
  822. * http://opensource.org/licenses/BSD-3-Clause
  823. */
  824. // It turns out that some (most?) JavaScript engines don't self-host
  825. // `Array.prototype.sort`. This makes sense because C++ will likely remain
  826. // faster than JS when doing raw CPU-intensive sorting. However, when using a
  827. // custom comparator function, calling back and forth between the VM's C++ and
  828. // JIT'd JS is rather slow *and* loses JIT type information, resulting in
  829. // worse generated code for the comparator function than would be optimal. In
  830. // fact, when sorting with a comparator, these costs outweigh the benefits of
  831. // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
  832. // a ~3500ms mean speed-up in `bench/bench.html`.
  833. /**
  834. * Swap the elements indexed by `x` and `y` in the array `ary`.
  835. *
  836. * @param {Array} ary
  837. * The array.
  838. * @param {Number} x
  839. * The index of the first item.
  840. * @param {Number} y
  841. * The index of the second item.
  842. */
  843. function swap(ary, x, y) {
  844. var temp = ary[x];
  845. ary[x] = ary[y];
  846. ary[y] = temp;
  847. }
  848. /**
  849. * Returns a random integer within the range `low .. high` inclusive.
  850. *
  851. * @param {Number} low
  852. * The lower bound on the range.
  853. * @param {Number} high
  854. * The upper bound on the range.
  855. */
  856. function randomIntInRange(low, high) {
  857. return Math.round(low + Math.random() * (high - low));
  858. }
  859. /**
  860. * The Quick Sort algorithm.
  861. *
  862. * @param {Array} ary
  863. * An array to sort.
  864. * @param {function} comparator
  865. * Function to use to compare two items.
  866. * @param {Number} p
  867. * Start index of the array
  868. * @param {Number} r
  869. * End index of the array
  870. */
  871. function doQuickSort(ary, comparator, p, r) {
  872. // If our lower bound is less than our upper bound, we (1) partition the
  873. // array into two pieces and (2) recurse on each half. If it is not, this is
  874. // the empty array and our base case.
  875. if (p < r) {
  876. // (1) Partitioning.
  877. //
  878. // The partitioning chooses a pivot between `p` and `r` and moves all
  879. // elements that are less than or equal to the pivot to the before it, and
  880. // all the elements that are greater than it after it. The effect is that
  881. // once partition is done, the pivot is in the exact place it will be when
  882. // the array is put in sorted order, and it will not need to be moved
  883. // again. This runs in O(n) time.
  884. // Always choose a random pivot so that an input array which is reverse
  885. // sorted does not cause O(n^2) running time.
  886. var pivotIndex = randomIntInRange(p, r);
  887. var i = p - 1;
  888. swap(ary, pivotIndex, r);
  889. var pivot = ary[r];
  890. // Immediately after `j` is incremented in this loop, the following hold
  891. // true:
  892. //
  893. // * Every element in `ary[p .. i]` is less than or equal to the pivot.
  894. //
  895. // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
  896. for (var j = p; j < r; j++) {
  897. if (comparator(ary[j], pivot) <= 0) {
  898. i += 1;
  899. swap(ary, i, j);
  900. }
  901. }
  902. swap(ary, i + 1, j);
  903. var q = i + 1;
  904. // (2) Recurse on each half.
  905. doQuickSort(ary, comparator, p, q - 1);
  906. doQuickSort(ary, comparator, q + 1, r);
  907. }
  908. }
  909. /**
  910. * Sort the given array in-place with the given comparator function.
  911. *
  912. * @param {Array} ary
  913. * An array to sort.
  914. * @param {function} comparator
  915. * Function to use to compare two items.
  916. */
  917. exports.quickSort = function (ary, comparator) {
  918. doQuickSort(ary, comparator, 0, ary.length - 1);
  919. };
  920. });
  921. $__System.registerDynamic('26', ['27', '24', '28', '29', '25'], true, function ($__require, exports, module) {
  922. var global = this || self,
  923. GLOBAL = global;
  924. /* -*- Mode: js; js-indent-level: 2; -*- */
  925. /*
  926. * Copyright 2011 Mozilla Foundation and contributors
  927. * Licensed under the New BSD license. See LICENSE or:
  928. * http://opensource.org/licenses/BSD-3-Clause
  929. */
  930. var util = $__require('27');
  931. var binarySearch = $__require('24');
  932. var ArraySet = $__require('28').ArraySet;
  933. var base64VLQ = $__require('29');
  934. var quickSort = $__require('25').quickSort;
  935. function SourceMapConsumer(aSourceMap) {
  936. var sourceMap = aSourceMap;
  937. if (typeof aSourceMap === 'string') {
  938. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  939. }
  940. return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap);
  941. }
  942. SourceMapConsumer.fromSourceMap = function (aSourceMap) {
  943. return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
  944. };
  945. /**
  946. * The version of the source mapping spec that we are consuming.
  947. */
  948. SourceMapConsumer.prototype._version = 3;
  949. // `__generatedMappings` and `__originalMappings` are arrays that hold the
  950. // parsed mapping coordinates from the source map's "mappings" attribute. They
  951. // are lazily instantiated, accessed via the `_generatedMappings` and
  952. // `_originalMappings` getters respectively, and we only parse the mappings
  953. // and create these arrays once queried for a source location. We jump through
  954. // these hoops because there can be many thousands of mappings, and parsing
  955. // them is expensive, so we only want to do it if we must.
  956. //
  957. // Each object in the arrays is of the form:
  958. //
  959. // {
  960. // generatedLine: The line number in the generated code,
  961. // generatedColumn: The column number in the generated code,
  962. // source: The path to the original source file that generated this
  963. // chunk of code,
  964. // originalLine: The line number in the original source that
  965. // corresponds to this chunk of generated code,
  966. // originalColumn: The column number in the original source that
  967. // corresponds to this chunk of generated code,
  968. // name: The name of the original symbol which generated this chunk of
  969. // code.
  970. // }
  971. //
  972. // All properties except for `generatedLine` and `generatedColumn` can be
  973. // `null`.
  974. //
  975. // `_generatedMappings` is ordered by the generated positions.
  976. //
  977. // `_originalMappings` is ordered by the original positions.
  978. SourceMapConsumer.prototype.__generatedMappings = null;
  979. Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
  980. get: function () {
  981. if (!this.__generatedMappings) {
  982. this._parseMappings(this._mappings, this.sourceRoot);
  983. }
  984. return this.__generatedMappings;
  985. }
  986. });
  987. SourceMapConsumer.prototype.__originalMappings = null;
  988. Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
  989. get: function () {
  990. if (!this.__originalMappings) {
  991. this._parseMappings(this._mappings, this.sourceRoot);
  992. }
  993. return this.__originalMappings;
  994. }
  995. });
  996. SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
  997. var c = aStr.charAt(index);
  998. return c === ";" || c === ",";
  999. };
  1000. /**
  1001. * Parse the mappings in a string in to a data structure which we can easily
  1002. * query (the ordered arrays in the `this.__generatedMappings` and
  1003. * `this.__originalMappings` properties).
  1004. */
  1005. SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  1006. throw new Error("Subclasses must implement _parseMappings");
  1007. };
  1008. SourceMapConsumer.GENERATED_ORDER = 1;
  1009. SourceMapConsumer.ORIGINAL_ORDER = 2;
  1010. SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
  1011. SourceMapConsumer.LEAST_UPPER_BOUND = 2;
  1012. /**
  1013. * Iterate over each mapping between an original source/line/column and a
  1014. * generated line/column in this source map.
  1015. *
  1016. * @param Function aCallback
  1017. * The function that is called with each mapping.
  1018. * @param Object aContext
  1019. * Optional. If specified, this object will be the value of `this` every
  1020. * time that `aCallback` is called.
  1021. * @param aOrder
  1022. * Either `SourceMapConsumer.GENERATED_ORDER` or
  1023. * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
  1024. * iterate over the mappings sorted by the generated file's line/column
  1025. * order or the original's source/line/column order, respectively. Defaults to
  1026. * `SourceMapConsumer.GENERATED_ORDER`.
  1027. */
  1028. SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
  1029. var context = aContext || null;
  1030. var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
  1031. var mappings;
  1032. switch (order) {
  1033. case SourceMapConsumer.GENERATED_ORDER:
  1034. mappings = this._generatedMappings;
  1035. break;
  1036. case SourceMapConsumer.ORIGINAL_ORDER:
  1037. mappings = this._originalMappings;
  1038. break;
  1039. default:
  1040. throw new Error("Unknown order of iteration.");
  1041. }
  1042. var sourceRoot = this.sourceRoot;
  1043. mappings.map(function (mapping) {
  1044. var source = mapping.source === null ? null : this._sources.at(mapping.source);
  1045. if (source != null && sourceRoot != null) {
  1046. source = util.join(sourceRoot, source);
  1047. }
  1048. return {
  1049. source: source,
  1050. generatedLine: mapping.generatedLine,
  1051. generatedColumn: mapping.generatedColumn,
  1052. originalLine: mapping.originalLine,
  1053. originalColumn: mapping.originalColumn,
  1054. name: mapping.name === null ? null : this._names.at(mapping.name)
  1055. };
  1056. }, this).forEach(aCallback, context);
  1057. };
  1058. /**
  1059. * Returns all generated line and column information for the original source,
  1060. * line, and column provided. If no column is provided, returns all mappings
  1061. * corresponding to a either the line we are searching for or the next
  1062. * closest line that has any mappings. Otherwise, returns all mappings
  1063. * corresponding to the given line and either the column we are searching for
  1064. * or the next closest column that has any offsets.
  1065. *
  1066. * The only argument is an object with the following properties:
  1067. *
  1068. * - source: The filename of the original source.
  1069. * - line: The line number in the original source.
  1070. * - column: Optional. the column number in the original source.
  1071. *
  1072. * and an array of objects is returned, each with the following properties:
  1073. *
  1074. * - line: The line number in the generated source, or null.
  1075. * - column: The column number in the generated source, or null.
  1076. */
  1077. SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
  1078. var line = util.getArg(aArgs, 'line');
  1079. // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
  1080. // returns the index of the closest mapping less than the needle. By
  1081. // setting needle.originalColumn to 0, we thus find the last mapping for
  1082. // the given line, provided such a mapping exists.
  1083. var needle = {
  1084. source: util.getArg(aArgs, 'source'),
  1085. originalLine: line,
  1086. originalColumn: util.getArg(aArgs, 'column', 0)
  1087. };
  1088. if (this.sourceRoot != null) {
  1089. needle.source = util.relative(this.sourceRoot, needle.source);
  1090. }
  1091. if (!this._sources.has(needle.source)) {
  1092. return [];
  1093. }
  1094. needle.source = this._sources.indexOf(needle.source);
  1095. var mappings = [];
  1096. var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
  1097. if (index >= 0) {
  1098. var mapping = this._originalMappings[index];
  1099. if (aArgs.column === undefined) {
  1100. var originalLine = mapping.originalLine;
  1101. // Iterate until either we run out of mappings, or we run into
  1102. // a mapping for a different line than the one we found. Since
  1103. // mappings are sorted, this is guaranteed to find all mappings for
  1104. // the line we found.
  1105. while (mapping && mapping.originalLine === originalLine) {
  1106. mappings.push({
  1107. line: util.getArg(mapping, 'generatedLine', null),
  1108. column: util.getArg(mapping, 'generatedColumn', null),
  1109. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  1110. });
  1111. mapping = this._originalMappings[++index];
  1112. }
  1113. } else {
  1114. var originalColumn = mapping.originalColumn;
  1115. // Iterate until either we run out of mappings, or we run into
  1116. // a mapping for a different line than the one we were searching for.
  1117. // Since mappings are sorted, this is guaranteed to find all mappings for
  1118. // the line we are searching for.
  1119. while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
  1120. mappings.push({
  1121. line: util.getArg(mapping, 'generatedLine', null),
  1122. column: util.getArg(mapping, 'generatedColumn', null),
  1123. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  1124. });
  1125. mapping = this._originalMappings[++index];
  1126. }
  1127. }
  1128. }
  1129. return mappings;
  1130. };
  1131. exports.SourceMapConsumer = SourceMapConsumer;
  1132. /**
  1133. * A BasicSourceMapConsumer instance represents a parsed source map which we can
  1134. * query for information about the original file positions by giving it a file
  1135. * position in the generated source.
  1136. *
  1137. * The only parameter is the raw source map (either as a JSON string, or
  1138. * already parsed to an object). According to the spec, source maps have the
  1139. * following attributes:
  1140. *
  1141. * - version: Which version of the source map spec this map is following.
  1142. * - sources: An array of URLs to the original source files.
  1143. * - names: An array of identifiers which can be referrenced by individual mappings.
  1144. * - sourceRoot: Optional. The URL root from which all sources are relative.
  1145. * - sourcesContent: Optional. An array of contents of the original source files.
  1146. * - mappings: A string of base64 VLQs which contain the actual mappings.
  1147. * - file: Optional. The generated file this source map is associated with.
  1148. *
  1149. * Here is an example source map, taken from the source map spec[0]:
  1150. *
  1151. * {
  1152. * version : 3,
  1153. * file: "out.js",
  1154. * sourceRoot : "",
  1155. * sources: ["foo.js", "bar.js"],
  1156. * names: ["src", "maps", "are", "fun"],
  1157. * mappings: "AA,AB;;ABCDE;"
  1158. * }
  1159. *
  1160. * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
  1161. */
  1162. function BasicSourceMapConsumer(aSourceMap) {
  1163. var sourceMap = aSourceMap;
  1164. if (typeof aSourceMap === 'string') {
  1165. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  1166. }
  1167. var version = util.getArg(sourceMap, 'version');
  1168. var sources = util.getArg(sourceMap, 'sources');
  1169. // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
  1170. // requires the array) to play nice here.
  1171. var names = util.getArg(sourceMap, 'names', []);
  1172. var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
  1173. var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
  1174. var mappings = util.getArg(sourceMap, 'mappings');
  1175. var file = util.getArg(sourceMap, 'file', null);
  1176. // Once again, Sass deviates from the spec and supplies the version as a
  1177. // string rather than a number, so we use loose equality checking here.
  1178. if (version != this._version) {
  1179. throw new Error('Unsupported version: ' + version);
  1180. }
  1181. sources = sources.map(String)
  1182. // Some source maps produce relative source paths like "./foo.js" instead of
  1183. // "foo.js". Normalize these first so that future comparisons will succeed.
  1184. // See bugzil.la/1090768.
  1185. .map(util.normalize)
  1186. // Always ensure that absolute sources are internally stored relative to
  1187. // the source root, if the source root is absolute. Not doing this would
  1188. // be particularly problematic when the source root is a prefix of the
  1189. // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
  1190. .map(function (source) {
  1191. return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
  1192. });
  1193. // Pass `true` below to allow duplicate names and sources. While source maps
  1194. // are intended to be compressed and deduplicated, the TypeScript compiler
  1195. // sometimes generates source maps with duplicates in them. See Github issue
  1196. // #72 and bugzil.la/889492.
  1197. this._names = ArraySet.fromArray(names.map(String), true);
  1198. this._sources = ArraySet.fromArray(sources, true);
  1199. this.sourceRoot = sourceRoot;
  1200. this.sourcesContent = sourcesContent;
  1201. this._mappings = mappings;
  1202. this.file = file;
  1203. }
  1204. BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  1205. BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
  1206. /**
  1207. * Create a BasicSourceMapConsumer from a SourceMapGenerator.
  1208. *
  1209. * @param SourceMapGenerator aSourceMap
  1210. * The source map that will be consumed.
  1211. * @returns BasicSourceMapConsumer
  1212. */
  1213. BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {
  1214. var smc = Object.create(BasicSourceMapConsumer.prototype);
  1215. var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
  1216. var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
  1217. smc.sourceRoot = aSourceMap._sourceRoot;
  1218. smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
  1219. smc.file = aSourceMap._file;
  1220. // Because we are modifying the entries (by converting string sources and
  1221. // names to indices into the sources and names ArraySets), we have to make
  1222. // a copy of the entry or else bad things happen. Shared mutable state
  1223. // strikes again! See github issue #191.
  1224. var generatedMappings = aSourceMap._mappings.toArray().slice();
  1225. var destGeneratedMappings = smc.__generatedMappings = [];
  1226. var destOriginalMappings = smc.__originalMappings = [];
  1227. for (var i = 0, length = generatedMappings.length; i < length; i++) {
  1228. var srcMapping = generatedMappings[i];
  1229. var destMapping = new Mapping();
  1230. destMapping.generatedLine = srcMapping.generatedLine;
  1231. destMapping.generatedColumn = srcMapping.generatedColumn;
  1232. if (srcMapping.source) {
  1233. destMapping.source = sources.indexOf(srcMapping.source);
  1234. destMapping.originalLine = srcMapping.originalLine;
  1235. destMapping.originalColumn = srcMapping.originalColumn;
  1236. if (srcMapping.name) {
  1237. destMapping.name = names.indexOf(srcMapping.name);
  1238. }
  1239. destOriginalMappings.push(destMapping);
  1240. }
  1241. destGeneratedMappings.push(destMapping);
  1242. }
  1243. quickSort(smc.__originalMappings, util.compareByOriginalPositions);
  1244. return smc;
  1245. };
  1246. /**
  1247. * The version of the source mapping spec that we are consuming.
  1248. */
  1249. BasicSourceMapConsumer.prototype._version = 3;
  1250. /**
  1251. * The list of original sources.
  1252. */
  1253. Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
  1254. get: function () {
  1255. return this._sources.toArray().map(function (s) {
  1256. return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
  1257. }, this);
  1258. }
  1259. });
  1260. /**
  1261. * Provide the JIT with a nice shape / hidden class.
  1262. */
  1263. function Mapping() {
  1264. this.generatedLine = 0;
  1265. this.generatedColumn = 0;
  1266. this.source = null;
  1267. this.originalLine = null;
  1268. this.originalColumn = null;
  1269. this.name = null;
  1270. }
  1271. /**
  1272. * Parse the mappings in a string in to a data structure which we can easily
  1273. * query (the ordered arrays in the `this.__generatedMappings` and
  1274. * `this.__originalMappings` properties).
  1275. */
  1276. BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  1277. var generatedLine = 1;
  1278. var previousGeneratedColumn = 0;
  1279. var previousOriginalLine = 0;
  1280. var previousOriginalColumn = 0;
  1281. var previousSource = 0;
  1282. var previousName = 0;
  1283. var length = aStr.length;
  1284. var index = 0;
  1285. var cachedSegments = {};
  1286. var temp = {};
  1287. var originalMappings = [];
  1288. var generatedMappings = [];
  1289. var mapping, str, segment, end, value;
  1290. while (index < length) {
  1291. if (aStr.charAt(index) === ';') {
  1292. generatedLine++;
  1293. index++;
  1294. previousGeneratedColumn = 0;
  1295. } else if (aStr.charAt(index) === ',') {
  1296. index++;
  1297. } else {
  1298. mapping = new Mapping();
  1299. mapping.generatedLine = generatedLine;
  1300. // Because each offset is encoded relative to the previous one,
  1301. // many segments often have the same encoding. We can exploit this
  1302. // fact by caching the parsed variable length fields of each segment,
  1303. // allowing us to avoid a second parse if we encounter the same
  1304. // segment again.
  1305. for (end = index; end < length; end++) {
  1306. if (this._charIsMappingSeparator(aStr, end)) {
  1307. break;
  1308. }
  1309. }
  1310. str = aStr.slice(index, end);
  1311. segment = cachedSegments[str];
  1312. if (segment) {
  1313. index += str.length;
  1314. } else {
  1315. segment = [];
  1316. while (index < end) {
  1317. base64VLQ.decode(aStr, index, temp);
  1318. value = temp.value;
  1319. index = temp.rest;
  1320. segment.push(value);
  1321. }
  1322. if (segment.length === 2) {
  1323. throw new Error('Found a source, but no line and column');
  1324. }
  1325. if (segment.length === 3) {
  1326. throw new Error('Found a source and line, but no column');
  1327. }
  1328. cachedSegments[str] = segment;
  1329. }
  1330. // Generated column.
  1331. mapping.generatedColumn = previousGeneratedColumn + segment[0];
  1332. previousGeneratedColumn = mapping.generatedColumn;
  1333. if (segment.length > 1) {
  1334. // Original source.
  1335. mapping.source = previousSource + segment[1];
  1336. previousSource += segment[1];
  1337. // Original line.
  1338. mapping.originalLine = previousOriginalLine + segment[2];
  1339. previousOriginalLine = mapping.originalLine;
  1340. // Lines are stored 0-based
  1341. mapping.originalLine += 1;
  1342. // Original column.
  1343. mapping.originalColumn = previousOriginalColumn + segment[3];
  1344. previousOriginalColumn = mapping.originalColumn;
  1345. if (segment.length > 4) {
  1346. // Original name.
  1347. mapping.name = previousName + segment[4];
  1348. previousName += segment[4];
  1349. }
  1350. }
  1351. generatedMappings.push(mapping);
  1352. if (typeof mapping.originalLine === 'number') {
  1353. originalMappings.push(mapping);
  1354. }
  1355. }
  1356. }
  1357. quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
  1358. this.__generatedMappings = generatedMappings;
  1359. quickSort(originalMappings, util.compareByOriginalPositions);
  1360. this.__originalMappings = originalMappings;
  1361. };
  1362. /**
  1363. * Find the mapping that best matches the hypothetical "needle" mapping that
  1364. * we are searching for in the given "haystack" of mappings.
  1365. */
  1366. BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
  1367. // To return the position we are searching for, we must first find the
  1368. // mapping for the given position and then return the opposite position it
  1369. // points to. Because the mappings are sorted, we can use binary search to
  1370. // find the best mapping.
  1371. if (aNeedle[aLineName] <= 0) {
  1372. throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);
  1373. }
  1374. if (aNeedle[aColumnName] < 0) {
  1375. throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);
  1376. }
  1377. return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
  1378. };
  1379. /**
  1380. * Compute the last column for each generated mapping. The last column is
  1381. * inclusive.
  1382. */
  1383. BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
  1384. for (var index = 0; index < this._generatedMappings.length; ++index) {
  1385. var mapping = this._generatedMappings[index];
  1386. // Mappings do not contain a field for the last generated columnt. We
  1387. // can come up with an optimistic estimate, however, by assuming that
  1388. // mappings are contiguous (i.e. given two consecutive mappings, the
  1389. // first mapping ends where the second one starts).
  1390. if (index + 1 < this._generatedMappings.length) {
  1391. var nextMapping = this._generatedMappings[index + 1];
  1392. if (mapping.generatedLine === nextMapping.generatedLine) {
  1393. mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
  1394. continue;
  1395. }
  1396. }
  1397. // The last mapping for each line spans the entire line.
  1398. mapping.lastGeneratedColumn = Infinity;
  1399. }
  1400. };
  1401. /**
  1402. * Returns the original source, line, and column information for the generated
  1403. * source's line and column positions provided. The only argument is an object
  1404. * with the following properties:
  1405. *
  1406. * - line: The line number in the generated source.
  1407. * - column: The column number in the generated source.
  1408. * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
  1409. * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
  1410. * closest element that is smaller than or greater than the one we are
  1411. * searching for, respectively, if the exact element cannot be found.
  1412. * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
  1413. *
  1414. * and an object is returned with the following properties:
  1415. *
  1416. * - source: The original source file, or null.
  1417. * - line: The line number in the original source, or null.
  1418. * - column: The column number in the original source, or null.
  1419. * - name: The original identifier, or null.
  1420. */
  1421. BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
  1422. var needle = {
  1423. generatedLine: util.getArg(aArgs, 'line'),
  1424. generatedColumn: util.getArg(aArgs, 'column')
  1425. };
  1426. var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND));
  1427. if (index >= 0) {
  1428. var mapping = this._generatedMappings[index];
  1429. if (mapping.generatedLine === needle.generatedLine) {
  1430. var source = util.getArg(mapping, 'source', null);
  1431. if (source !== null) {
  1432. source = this._sources.at(source);
  1433. if (this.sourceRoot != null) {
  1434. source = util.join(this.sourceRoot, source);
  1435. }
  1436. }
  1437. var name = util.getArg(mapping, 'name', null);
  1438. if (name !== null) {
  1439. name = this._names.at(name);
  1440. }
  1441. return {
  1442. source: source,
  1443. line: util.getArg(mapping, 'originalLine', null),
  1444. column: util.getArg(mapping, 'originalColumn', null),
  1445. name: name
  1446. };
  1447. }
  1448. }
  1449. return {
  1450. source: null,
  1451. line: null,
  1452. column: null,
  1453. name: null
  1454. };
  1455. };
  1456. /**
  1457. * Return true if we have the source content for every source in the source
  1458. * map, false otherwise.
  1459. */
  1460. BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
  1461. if (!this.sourcesContent) {
  1462. return false;
  1463. }
  1464. return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) {
  1465. return sc == null;
  1466. });
  1467. };
  1468. /**
  1469. * Returns the original source content. The only argument is the url of the
  1470. * original source file. Returns null if no original source content is
  1471. * available.
  1472. */
  1473. BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  1474. if (!this.sourcesContent) {
  1475. return null;
  1476. }
  1477. if (this.sourceRoot != null) {
  1478. aSource = util.relative(this.sourceRoot, aSource);
  1479. }
  1480. if (this._sources.has(aSource)) {
  1481. return this.sourcesContent[this._sources.indexOf(aSource)];
  1482. }
  1483. var url;
  1484. if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
  1485. // XXX: file:// URIs and absolute paths lead to unexpected behavior for
  1486. // many users. We can help them out when they expect file:// URIs to
  1487. // behave like it would if they were running a local HTTP server. See
  1488. // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
  1489. var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
  1490. if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
  1491. return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
  1492. }
  1493. if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) {
  1494. return this.sourcesContent[this._sources.indexOf("/" + aSource)];
  1495. }
  1496. }
  1497. // This function is used recursively from
  1498. // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
  1499. // don't want to throw if we can't find the source - we just want to
  1500. // return null, so we provide a flag to exit gracefully.
  1501. if (nullOnMissing) {
  1502. return null;
  1503. } else {
  1504. throw new Error('"' + aSource + '" is not in the SourceMap.');
  1505. }
  1506. };
  1507. /**
  1508. * Returns the generated line and column information for the original source,
  1509. * line, and column positions provided. The only argument is an object with
  1510. * the following properties:
  1511. *
  1512. * - source: The filename of the original source.
  1513. * - line: The line number in the original source.
  1514. * - column: The column number in the original source.
  1515. * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
  1516. * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
  1517. * closest element that is smaller than or greater than the one we are
  1518. * searching for, respectively, if the exact element cannot be found.
  1519. * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
  1520. *
  1521. * and an object is returned with the following properties:
  1522. *
  1523. * - line: The line number in the generated source, or null.
  1524. * - column: The column number in the generated source, or null.
  1525. */
  1526. BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
  1527. var source = util.getArg(aArgs, 'source');
  1528. if (this.sourceRoot != null) {
  1529. source = util.relative(this.sourceRoot, source);
  1530. }
  1531. if (!this._sources.has(source)) {
  1532. return {
  1533. line: null,
  1534. column: null,
  1535. lastColumn: null
  1536. };
  1537. }
  1538. source = this._sources.indexOf(source);
  1539. var needle = {
  1540. source: source,
  1541. originalLine: util.getArg(aArgs, 'line'),
  1542. originalColumn: util.getArg(aArgs, 'column')
  1543. };
  1544. var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND));
  1545. if (index >= 0) {
  1546. var mapping = this._originalMappings[index];
  1547. if (mapping.source === needle.source) {
  1548. return {
  1549. line: util.getArg(mapping, 'generatedLine', null),
  1550. column: util.getArg(mapping, 'generatedColumn', null),
  1551. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  1552. };
  1553. }
  1554. }
  1555. return {
  1556. line: null,
  1557. column: null,
  1558. lastColumn: null
  1559. };
  1560. };
  1561. exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
  1562. /**
  1563. * An IndexedSourceMapConsumer instance represents a parsed source map which
  1564. * we can query for information. It differs from BasicSourceMapConsumer in
  1565. * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
  1566. * input.
  1567. *
  1568. * The only parameter is a raw source map (either as a JSON string, or already
  1569. * parsed to an object). According to the spec for indexed source maps, they
  1570. * have the following attributes:
  1571. *
  1572. * - version: Which version of the source map spec this map is following.
  1573. * - file: Optional. The generated file this source map is associated with.
  1574. * - sections: A list of section definitions.
  1575. *
  1576. * Each value under the "sections" field has two fields:
  1577. * - offset: The offset into the original specified at which this section
  1578. * begins to apply, defined as an object with a "line" and "column"
  1579. * field.
  1580. * - map: A source map definition. This source map could also be indexed,
  1581. * but doesn't have to be.
  1582. *
  1583. * Instead of the "map" field, it's also possible to have a "url" field
  1584. * specifying a URL to retrieve a source map from, but that's currently
  1585. * unsupported.
  1586. *
  1587. * Here's an example source map, taken from the source map spec[0], but
  1588. * modified to omit a section which uses the "url" field.
  1589. *
  1590. * {
  1591. * version : 3,
  1592. * file: "app.js",
  1593. * sections: [{
  1594. * offset: {line:100, column:10},
  1595. * map: {
  1596. * version : 3,
  1597. * file: "section.js",
  1598. * sources: ["foo.js", "bar.js"],
  1599. * names: ["src", "maps", "are", "fun"],
  1600. * mappings: "AAAA,E;;ABCDE;"
  1601. * }
  1602. * }],
  1603. * }
  1604. *
  1605. * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
  1606. */
  1607. function IndexedSourceMapConsumer(aSourceMap) {
  1608. var sourceMap = aSourceMap;
  1609. if (typeof aSourceMap === 'string') {
  1610. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  1611. }
  1612. var version = util.getArg(sourceMap, 'version');
  1613. var sections = util.getArg(sourceMap, 'sections');
  1614. if (version != this._version) {
  1615. throw new Error('Unsupported version: ' + version);
  1616. }
  1617. this._sources = new ArraySet();
  1618. this._names = new ArraySet();
  1619. var lastOffset = {
  1620. line: -1,
  1621. column: 0
  1622. };
  1623. this._sections = sections.map(function (s) {
  1624. if (s.url) {
  1625. // The url field will require support for asynchronicity.
  1626. // See https://github.com/mozilla/source-map/issues/16
  1627. throw new Error('Support for url field in sections not implemented.');
  1628. }
  1629. var offset = util.getArg(s, 'offset');
  1630. var offsetLine = util.getArg(offset, 'line');
  1631. var offsetColumn = util.getArg(offset, 'column');
  1632. if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
  1633. throw new Error('Section offsets must be ordered and non-overlapping.');
  1634. }
  1635. lastOffset = offset;
  1636. return {
  1637. generatedOffset: {
  1638. // The offset fields are 0-based, but we use 1-based indices when
  1639. // encoding/decoding from VLQ.
  1640. generatedLine: offsetLine + 1,
  1641. generatedColumn: offsetColumn + 1
  1642. },
  1643. consumer: new SourceMapConsumer(util.getArg(s, 'map'))
  1644. };
  1645. });
  1646. }
  1647. IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  1648. IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
  1649. /**
  1650. * The version of the source mapping spec that we are consuming.
  1651. */
  1652. IndexedSourceMapConsumer.prototype._version = 3;
  1653. /**
  1654. * The list of original sources.
  1655. */
  1656. Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
  1657. get: function () {
  1658. var sources = [];
  1659. for (var i = 0; i < this._sections.length; i++) {
  1660. for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
  1661. sources.push(this._sections[i].consumer.sources[j]);
  1662. }
  1663. }
  1664. return sources;
  1665. }
  1666. });
  1667. /**
  1668. * Returns the original source, line, and column information for the generated
  1669. * source's line and column positions provided. The only argument is an object
  1670. * with the following properties:
  1671. *
  1672. * - line: The line number in the generated source.
  1673. * - column: The column number in the generated source.
  1674. *
  1675. * and an object is returned with the following properties:
  1676. *
  1677. * - source: The original source file, or null.
  1678. * - line: The line number in the original source, or null.
  1679. * - column: The column number in the original source, or null.
  1680. * - name: The original identifier, or null.
  1681. */
  1682. IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
  1683. var needle = {
  1684. generatedLine: util.getArg(aArgs, 'line'),
  1685. generatedColumn: util.getArg(aArgs, 'column')
  1686. };
  1687. // Find the section containing the generated position we're trying to map
  1688. // to an original position.
  1689. var sectionIndex = binarySearch.search(needle, this._sections, function (needle, section) {
  1690. var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
  1691. if (cmp) {
  1692. return cmp;
  1693. }
  1694. return needle.generatedColumn - section.generatedOffset.generatedColumn;
  1695. });
  1696. var section = this._sections[sectionIndex];
  1697. if (!section) {
  1698. return {
  1699. source: null,
  1700. line: null,
  1701. column: null,
  1702. name: null
  1703. };
  1704. }
  1705. return section.consumer.originalPositionFor({
  1706. line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
  1707. column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  1708. bias: aArgs.bias
  1709. });
  1710. };
  1711. /**
  1712. * Return true if we have the source content for every source in the source
  1713. * map, false otherwise.
  1714. */
  1715. IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
  1716. return this._sections.every(function (s) {
  1717. return s.consumer.hasContentsOfAllSources();
  1718. });
  1719. };
  1720. /**
  1721. * Returns the original source content. The only argument is the url of the
  1722. * original source file. Returns null if no original source content is
  1723. * available.
  1724. */
  1725. IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  1726. for (var i = 0; i < this._sections.length; i++) {
  1727. var section = this._sections[i];
  1728. var content = section.consumer.sourceContentFor(aSource, true);
  1729. if (content) {
  1730. return content;
  1731. }
  1732. }
  1733. if (nullOnMissing) {
  1734. return null;
  1735. } else {
  1736. throw new Error('"' + aSource + '" is not in the SourceMap.');
  1737. }
  1738. };
  1739. /**
  1740. * Returns the generated line and column information for the original source,
  1741. * line, and column positions provided. The only argument is an object with
  1742. * the following properties:
  1743. *
  1744. * - source: The filename of the original source.
  1745. * - line: The line number in the original source.
  1746. * - column: The column number in the original source.
  1747. *
  1748. * and an object is returned with the following properties:
  1749. *
  1750. * - line: The line number in the generated source, or null.
  1751. * - column: The column number in the generated source, or null.
  1752. */
  1753. IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
  1754. for (var i = 0; i < this._sections.length; i++) {
  1755. var section = this._sections[i];
  1756. // Only consider this section if the requested source is in the list of
  1757. // sources of the consumer.
  1758. if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
  1759. continue;
  1760. }
  1761. var generatedPosition = section.consumer.generatedPositionFor(aArgs);
  1762. if (generatedPosition) {
  1763. var ret = {
  1764. line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
  1765. column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
  1766. };
  1767. return ret;
  1768. }
  1769. }
  1770. return {
  1771. line: null,
  1772. column: null
  1773. };
  1774. };
  1775. /**
  1776. * Parse the mappings in a string in to a data structure which we can easily
  1777. * query (the ordered arrays in the `this.__generatedMappings` and
  1778. * `this.__originalMappings` properties).
  1779. */
  1780. IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  1781. this.__generatedMappings = [];
  1782. this.__originalMappings = [];
  1783. for (var i = 0; i < this._sections.length; i++) {
  1784. var section = this._sections[i];
  1785. var sectionMappings = section.consumer._generatedMappings;
  1786. for (var j = 0; j < sectionMappings.length; j++) {
  1787. var mapping = sectionMappings[j];
  1788. var source = section.consumer._sources.at(mapping.source);
  1789. if (section.consumer.sourceRoot !== null) {
  1790. source = util.join(section.consumer.sourceRoot, source);
  1791. }
  1792. this._sources.add(source);
  1793. source = this._sources.indexOf(source);
  1794. var name = section.consumer._names.at(mapping.name);
  1795. this._names.add(name);
  1796. name = this._names.indexOf(name);
  1797. // The mappings coming from the consumer for the section have
  1798. // generated positions relative to the start of the section, so we
  1799. // need to offset them to be relative to the start of the concatenated
  1800. // generated file.
  1801. var adjustedMapping = {
  1802. source: source,
  1803. generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
  1804. generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  1805. originalLine: mapping.originalLine,
  1806. originalColumn: mapping.originalColumn,
  1807. name: name
  1808. };
  1809. this.__generatedMappings.push(adjustedMapping);
  1810. if (typeof adjustedMapping.originalLine === 'number') {
  1811. this.__originalMappings.push(adjustedMapping);
  1812. }
  1813. }
  1814. }
  1815. quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
  1816. quickSort(this.__originalMappings, util.compareByOriginalPositions);
  1817. };
  1818. exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
  1819. });
  1820. $__System.registerDynamic('2a', [], true, function ($__require, exports, module) {
  1821. var global = this || self,
  1822. GLOBAL = global;
  1823. /* -*- Mode: js; js-indent-level: 2; -*- */
  1824. /*
  1825. * Copyright 2011 Mozilla Foundation and contributors
  1826. * Licensed under the New BSD license. See LICENSE or:
  1827. * http://opensource.org/licenses/BSD-3-Clause
  1828. */
  1829. var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  1830. /**
  1831. * Encode an integer in the range of 0 to 63 to a single base 64 digit.
  1832. */
  1833. exports.encode = function (number) {
  1834. if (0 <= number && number < intToCharMap.length) {
  1835. return intToCharMap[number];
  1836. }
  1837. throw new TypeError("Must be between 0 and 63: " + number);
  1838. };
  1839. /**
  1840. * Decode a single base 64 character code digit to an integer. Returns -1 on
  1841. * failure.
  1842. */
  1843. exports.decode = function (charCode) {
  1844. var bigA = 65; // 'A'
  1845. var bigZ = 90; // 'Z'
  1846. var littleA = 97; // 'a'
  1847. var littleZ = 122; // 'z'
  1848. var zero = 48; // '0'
  1849. var nine = 57; // '9'
  1850. var plus = 43; // '+'
  1851. var slash = 47; // '/'
  1852. var littleOffset = 26;
  1853. var numberOffset = 52;
  1854. // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
  1855. if (bigA <= charCode && charCode <= bigZ) {
  1856. return charCode - bigA;
  1857. }
  1858. // 26 - 51: abcdefghijklmnopqrstuvwxyz
  1859. if (littleA <= charCode && charCode <= littleZ) {
  1860. return charCode - littleA + littleOffset;
  1861. }
  1862. // 52 - 61: 0123456789
  1863. if (zero <= charCode && charCode <= nine) {
  1864. return charCode - zero + numberOffset;
  1865. }
  1866. // 62: +
  1867. if (charCode == plus) {
  1868. return 62;
  1869. }
  1870. // 63: /
  1871. if (charCode == slash) {
  1872. return 63;
  1873. }
  1874. // Invalid base64 digit.
  1875. return -1;
  1876. };
  1877. });
  1878. $__System.registerDynamic("29", ["2a"], true, function ($__require, exports, module) {
  1879. var global = this || self,
  1880. GLOBAL = global;
  1881. /* -*- Mode: js; js-indent-level: 2; -*- */
  1882. /*
  1883. * Copyright 2011 Mozilla Foundation and contributors
  1884. * Licensed under the New BSD license. See LICENSE or:
  1885. * http://opensource.org/licenses/BSD-3-Clause
  1886. *
  1887. * Based on the Base 64 VLQ implementation in Closure Compiler:
  1888. * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
  1889. *
  1890. * Copyright 2011 The Closure Compiler Authors. All rights reserved.
  1891. * Redistribution and use in source and binary forms, with or without
  1892. * modification, are permitted provided that the following conditions are
  1893. * met:
  1894. *
  1895. * * Redistributions of source code must retain the above copyright
  1896. * notice, this list of conditions and the following disclaimer.
  1897. * * Redistributions in binary form must reproduce the above
  1898. * copyright notice, this list of conditions and the following
  1899. * disclaimer in the documentation and/or other materials provided
  1900. * with the distribution.
  1901. * * Neither the name of Google Inc. nor the names of its
  1902. * contributors may be used to endorse or promote products derived
  1903. * from this software without specific prior written permission.
  1904. *
  1905. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  1906. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  1907. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  1908. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  1909. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  1910. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  1911. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  1912. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  1913. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1914. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  1915. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1916. */
  1917. var base64 = $__require("2a");
  1918. // A single base 64 digit can contain 6 bits of data. For the base 64 variable
  1919. // length quantities we use in the source map spec, the first bit is the sign,
  1920. // the next four bits are the actual value, and the 6th bit is the
  1921. // continuation bit. The continuation bit tells us whether there are more
  1922. // digits in this value following this digit.
  1923. //
  1924. // Continuation
  1925. // | Sign
  1926. // | |
  1927. // V V
  1928. // 101011
  1929. var VLQ_BASE_SHIFT = 5;
  1930. // binary: 100000
  1931. var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
  1932. // binary: 011111
  1933. var VLQ_BASE_MASK = VLQ_BASE - 1;
  1934. // binary: 100000
  1935. var VLQ_CONTINUATION_BIT = VLQ_BASE;
  1936. /**
  1937. * Converts from a two-complement value to a value where the sign bit is
  1938. * placed in the least significant bit. For example, as decimals:
  1939. * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
  1940. * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
  1941. */
  1942. function toVLQSigned(aValue) {
  1943. return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
  1944. }
  1945. /**
  1946. * Converts to a two-complement value from a value where the sign bit is
  1947. * placed in the least significant bit. For example, as decimals:
  1948. * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
  1949. * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
  1950. */
  1951. function fromVLQSigned(aValue) {
  1952. var isNegative = (aValue & 1) === 1;
  1953. var shifted = aValue >> 1;
  1954. return isNegative ? -shifted : shifted;
  1955. }
  1956. /**
  1957. * Returns the base 64 VLQ encoded value.
  1958. */
  1959. exports.encode = function base64VLQ_encode(aValue) {
  1960. var encoded = "";
  1961. var digit;
  1962. var vlq = toVLQSigned(aValue);
  1963. do {
  1964. digit = vlq & VLQ_BASE_MASK;
  1965. vlq >>>= VLQ_BASE_SHIFT;
  1966. if (vlq > 0) {
  1967. // There are still more digits in this value, so we must make sure the
  1968. // continuation bit is marked.
  1969. digit |= VLQ_CONTINUATION_BIT;
  1970. }
  1971. encoded += base64.encode(digit);
  1972. } while (vlq > 0);
  1973. return encoded;
  1974. };
  1975. /**
  1976. * Decodes the next base 64 VLQ value from the given string and returns the
  1977. * value and the rest of the string via the out parameter.
  1978. */
  1979. exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  1980. var strLen = aStr.length;
  1981. var result = 0;
  1982. var shift = 0;
  1983. var continuation, digit;
  1984. do {
  1985. if (aIndex >= strLen) {
  1986. throw new Error("Expected more digits in base 64 VLQ value.");
  1987. }
  1988. digit = base64.decode(aStr.charCodeAt(aIndex++));
  1989. if (digit === -1) {
  1990. throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
  1991. }
  1992. continuation = !!(digit & VLQ_CONTINUATION_BIT);
  1993. digit &= VLQ_BASE_MASK;
  1994. result = result + (digit << shift);
  1995. shift += VLQ_BASE_SHIFT;
  1996. } while (continuation);
  1997. aOutParam.value = fromVLQSigned(result);
  1998. aOutParam.rest = aIndex;
  1999. };
  2000. });
  2001. $__System.registerDynamic('28', ['27'], true, function ($__require, exports, module) {
  2002. var global = this || self,
  2003. GLOBAL = global;
  2004. /* -*- Mode: js; js-indent-level: 2; -*- */
  2005. /*
  2006. * Copyright 2011 Mozilla Foundation and contributors
  2007. * Licensed under the New BSD license. See LICENSE or:
  2008. * http://opensource.org/licenses/BSD-3-Clause
  2009. */
  2010. var util = $__require('27');
  2011. var has = Object.prototype.hasOwnProperty;
  2012. /**
  2013. * A data structure which is a combination of an array and a set. Adding a new
  2014. * member is O(1), testing for membership is O(1), and finding the index of an
  2015. * element is O(1). Removing elements from the set is not supported. Only
  2016. * strings are supported for membership.
  2017. */
  2018. function ArraySet() {
  2019. this._array = [];
  2020. this._set = Object.create(null);
  2021. }
  2022. /**
  2023. * Static method for creating ArraySet instances from an existing array.
  2024. */
  2025. ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  2026. var set = new ArraySet();
  2027. for (var i = 0, len = aArray.length; i < len; i++) {
  2028. set.add(aArray[i], aAllowDuplicates);
  2029. }
  2030. return set;
  2031. };
  2032. /**
  2033. * Return how many unique items are in this ArraySet. If duplicates have been
  2034. * added, than those do not count towards the size.
  2035. *
  2036. * @returns Number
  2037. */
  2038. ArraySet.prototype.size = function ArraySet_size() {
  2039. return Object.getOwnPropertyNames(this._set).length;
  2040. };
  2041. /**
  2042. * Add the given string to this set.
  2043. *
  2044. * @param String aStr
  2045. */
  2046. ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  2047. var sStr = util.toSetString(aStr);
  2048. var isDuplicate = has.call(this._set, sStr);
  2049. var idx = this._array.length;
  2050. if (!isDuplicate || aAllowDuplicates) {
  2051. this._array.push(aStr);
  2052. }
  2053. if (!isDuplicate) {
  2054. this._set[sStr] = idx;
  2055. }
  2056. };
  2057. /**
  2058. * Is the given string a member of this set?
  2059. *
  2060. * @param String aStr
  2061. */
  2062. ArraySet.prototype.has = function ArraySet_has(aStr) {
  2063. var sStr = util.toSetString(aStr);
  2064. return has.call(this._set, sStr);
  2065. };
  2066. /**
  2067. * What is the index of the given string in the array?
  2068. *
  2069. * @param String aStr
  2070. */
  2071. ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
  2072. var sStr = util.toSetString(aStr);
  2073. if (has.call(this._set, sStr)) {
  2074. return this._set[sStr];
  2075. }
  2076. throw new Error('"' + aStr + '" is not in the set.');
  2077. };
  2078. /**
  2079. * What is the element at the given index?
  2080. *
  2081. * @param Number aIdx
  2082. */
  2083. ArraySet.prototype.at = function ArraySet_at(aIdx) {
  2084. if (aIdx >= 0 && aIdx < this._array.length) {
  2085. return this._array[aIdx];
  2086. }
  2087. throw new Error('No element indexed by ' + aIdx);
  2088. };
  2089. /**
  2090. * Returns the array representation of this set (which has the proper indices
  2091. * indicated by indexOf). Note that this is a copy of the internal array used
  2092. * for storing the members so that no one can mess with internal state.
  2093. */
  2094. ArraySet.prototype.toArray = function ArraySet_toArray() {
  2095. return this._array.slice();
  2096. };
  2097. exports.ArraySet = ArraySet;
  2098. });
  2099. $__System.registerDynamic('2b', ['27'], true, function ($__require, exports, module) {
  2100. var global = this || self,
  2101. GLOBAL = global;
  2102. /* -*- Mode: js; js-indent-level: 2; -*- */
  2103. /*
  2104. * Copyright 2014 Mozilla Foundation and contributors
  2105. * Licensed under the New BSD license. See LICENSE or:
  2106. * http://opensource.org/licenses/BSD-3-Clause
  2107. */
  2108. var util = $__require('27');
  2109. /**
  2110. * Determine whether mappingB is after mappingA with respect to generated
  2111. * position.
  2112. */
  2113. function generatedPositionAfter(mappingA, mappingB) {
  2114. // Optimized for most common case
  2115. var lineA = mappingA.generatedLine;
  2116. var lineB = mappingB.generatedLine;
  2117. var columnA = mappingA.generatedColumn;
  2118. var columnB = mappingB.generatedColumn;
  2119. return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  2120. }
  2121. /**
  2122. * A data structure to provide a sorted view of accumulated mappings in a
  2123. * performance conscious manner. It trades a neglibable overhead in general
  2124. * case for a large speedup in case of mappings being added in order.
  2125. */
  2126. function MappingList() {
  2127. this._array = [];
  2128. this._sorted = true;
  2129. // Serves as infimum
  2130. this._last = { generatedLine: -1, generatedColumn: 0 };
  2131. }
  2132. /**
  2133. * Iterate through internal items. This method takes the same arguments that
  2134. * `Array.prototype.forEach` takes.
  2135. *
  2136. * NOTE: The order of the mappings is NOT guaranteed.
  2137. */
  2138. MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
  2139. this._array.forEach(aCallback, aThisArg);
  2140. };
  2141. /**
  2142. * Add the given source mapping.
  2143. *
  2144. * @param Object aMapping
  2145. */
  2146. MappingList.prototype.add = function MappingList_add(aMapping) {
  2147. if (generatedPositionAfter(this._last, aMapping)) {
  2148. this._last = aMapping;
  2149. this._array.push(aMapping);
  2150. } else {
  2151. this._sorted = false;
  2152. this._array.push(aMapping);
  2153. }
  2154. };
  2155. /**
  2156. * Returns the flat, sorted array of mappings. The mappings are sorted by
  2157. * generated position.
  2158. *
  2159. * WARNING: This method returns internal data without copying, for
  2160. * performance. The return value must NOT be mutated, and should be treated as
  2161. * an immutable borrow. If you want to take ownership, you must make your own
  2162. * copy.
  2163. */
  2164. MappingList.prototype.toArray = function MappingList_toArray() {
  2165. if (!this._sorted) {
  2166. this._array.sort(util.compareByGeneratedPositionsInflated);
  2167. this._sorted = true;
  2168. }
  2169. return this._array;
  2170. };
  2171. exports.MappingList = MappingList;
  2172. });
  2173. $__System.registerDynamic('2c', ['29', '27', '28', '2b'], true, function ($__require, exports, module) {
  2174. var global = this || self,
  2175. GLOBAL = global;
  2176. /* -*- Mode: js; js-indent-level: 2; -*- */
  2177. /*
  2178. * Copyright 2011 Mozilla Foundation and contributors
  2179. * Licensed under the New BSD license. See LICENSE or:
  2180. * http://opensource.org/licenses/BSD-3-Clause
  2181. */
  2182. var base64VLQ = $__require('29');
  2183. var util = $__require('27');
  2184. var ArraySet = $__require('28').ArraySet;
  2185. var MappingList = $__require('2b').MappingList;
  2186. /**
  2187. * An instance of the SourceMapGenerator represents a source map which is
  2188. * being built incrementally. You may pass an object with the following
  2189. * properties:
  2190. *
  2191. * - file: The filename of the generated source.
  2192. * - sourceRoot: A root for all relative URLs in this source map.
  2193. */
  2194. function SourceMapGenerator(aArgs) {
  2195. if (!aArgs) {
  2196. aArgs = {};
  2197. }
  2198. this._file = util.getArg(aArgs, 'file', null);
  2199. this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
  2200. this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
  2201. this._sources = new ArraySet();
  2202. this._names = new ArraySet();
  2203. this._mappings = new MappingList();
  2204. this._sourcesContents = null;
  2205. }
  2206. SourceMapGenerator.prototype._version = 3;
  2207. /**
  2208. * Creates a new SourceMapGenerator based on a SourceMapConsumer
  2209. *
  2210. * @param aSourceMapConsumer The SourceMap.
  2211. */
  2212. SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
  2213. var sourceRoot = aSourceMapConsumer.sourceRoot;
  2214. var generator = new SourceMapGenerator({
  2215. file: aSourceMapConsumer.file,
  2216. sourceRoot: sourceRoot
  2217. });
  2218. aSourceMapConsumer.eachMapping(function (mapping) {
  2219. var newMapping = {
  2220. generated: {
  2221. line: mapping.generatedLine,
  2222. column: mapping.generatedColumn
  2223. }
  2224. };
  2225. if (mapping.source != null) {
  2226. newMapping.source = mapping.source;
  2227. if (sourceRoot != null) {
  2228. newMapping.source = util.relative(sourceRoot, newMapping.source);
  2229. }
  2230. newMapping.original = {
  2231. line: mapping.originalLine,
  2232. column: mapping.originalColumn
  2233. };
  2234. if (mapping.name != null) {
  2235. newMapping.name = mapping.name;
  2236. }
  2237. }
  2238. generator.addMapping(newMapping);
  2239. });
  2240. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  2241. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  2242. if (content != null) {
  2243. generator.setSourceContent(sourceFile, content);
  2244. }
  2245. });
  2246. return generator;
  2247. };
  2248. /**
  2249. * Add a single mapping from original source line and column to the generated
  2250. * source's line and column for this source map being created. The mapping
  2251. * object should have the following properties:
  2252. *
  2253. * - generated: An object with the generated line and column positions.
  2254. * - original: An object with the original line and column positions.
  2255. * - source: The original source file (relative to the sourceRoot).
  2256. * - name: An optional original token name for this mapping.
  2257. */
  2258. SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
  2259. var generated = util.getArg(aArgs, 'generated');
  2260. var original = util.getArg(aArgs, 'original', null);
  2261. var source = util.getArg(aArgs, 'source', null);
  2262. var name = util.getArg(aArgs, 'name', null);
  2263. if (!this._skipValidation) {
  2264. this._validateMapping(generated, original, source, name);
  2265. }
  2266. if (source != null) {
  2267. source = String(source);
  2268. if (!this._sources.has(source)) {
  2269. this._sources.add(source);
  2270. }
  2271. }
  2272. if (name != null) {
  2273. name = String(name);
  2274. if (!this._names.has(name)) {
  2275. this._names.add(name);
  2276. }
  2277. }
  2278. this._mappings.add({
  2279. generatedLine: generated.line,
  2280. generatedColumn: generated.column,
  2281. originalLine: original != null && original.line,
  2282. originalColumn: original != null && original.column,
  2283. source: source,
  2284. name: name
  2285. });
  2286. };
  2287. /**
  2288. * Set the source content for a source file.
  2289. */
  2290. SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
  2291. var source = aSourceFile;
  2292. if (this._sourceRoot != null) {
  2293. source = util.relative(this._sourceRoot, source);
  2294. }
  2295. if (aSourceContent != null) {
  2296. // Add the source content to the _sourcesContents map.
  2297. // Create a new _sourcesContents map if the property is null.
  2298. if (!this._sourcesContents) {
  2299. this._sourcesContents = Object.create(null);
  2300. }
  2301. this._sourcesContents[util.toSetString(source)] = aSourceContent;
  2302. } else if (this._sourcesContents) {
  2303. // Remove the source file from the _sourcesContents map.
  2304. // If the _sourcesContents map is empty, set the property to null.
  2305. delete this._sourcesContents[util.toSetString(source)];
  2306. if (Object.keys(this._sourcesContents).length === 0) {
  2307. this._sourcesContents = null;
  2308. }
  2309. }
  2310. };
  2311. /**
  2312. * Applies the mappings of a sub-source-map for a specific source file to the
  2313. * source map being generated. Each mapping to the supplied source file is
  2314. * rewritten using the supplied source map. Note: The resolution for the
  2315. * resulting mappings is the minimium of this map and the supplied map.
  2316. *
  2317. * @param aSourceMapConsumer The source map to be applied.
  2318. * @param aSourceFile Optional. The filename of the source file.
  2319. * If omitted, SourceMapConsumer's file property will be used.
  2320. * @param aSourceMapPath Optional. The dirname of the path to the source map
  2321. * to be applied. If relative, it is relative to the SourceMapConsumer.
  2322. * This parameter is needed when the two source maps aren't in the same
  2323. * directory, and the source map to be applied contains relative source
  2324. * paths. If so, those relative source paths need to be rewritten
  2325. * relative to the SourceMapGenerator.
  2326. */
  2327. SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
  2328. var sourceFile = aSourceFile;
  2329. // If aSourceFile is omitted, we will use the file property of the SourceMap
  2330. if (aSourceFile == null) {
  2331. if (aSourceMapConsumer.file == null) {
  2332. throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.');
  2333. }
  2334. sourceFile = aSourceMapConsumer.file;
  2335. }
  2336. var sourceRoot = this._sourceRoot;
  2337. // Make "sourceFile" relative if an absolute Url is passed.
  2338. if (sourceRoot != null) {
  2339. sourceFile = util.relative(sourceRoot, sourceFile);
  2340. }
  2341. // Applying the SourceMap can add and remove items from the sources and
  2342. // the names array.
  2343. var newSources = new ArraySet();
  2344. var newNames = new ArraySet();
  2345. // Find mappings for the "sourceFile"
  2346. this._mappings.unsortedForEach(function (mapping) {
  2347. if (mapping.source === sourceFile && mapping.originalLine != null) {
  2348. // Check if it can be mapped by the source map, then update the mapping.
  2349. var original = aSourceMapConsumer.originalPositionFor({
  2350. line: mapping.originalLine,
  2351. column: mapping.originalColumn
  2352. });
  2353. if (original.source != null) {
  2354. // Copy mapping
  2355. mapping.source = original.source;
  2356. if (aSourceMapPath != null) {
  2357. mapping.source = util.join(aSourceMapPath, mapping.source);
  2358. }
  2359. if (sourceRoot != null) {
  2360. mapping.source = util.relative(sourceRoot, mapping.source);
  2361. }
  2362. mapping.originalLine = original.line;
  2363. mapping.originalColumn = original.column;
  2364. if (original.name != null) {
  2365. mapping.name = original.name;
  2366. }
  2367. }
  2368. }
  2369. var source = mapping.source;
  2370. if (source != null && !newSources.has(source)) {
  2371. newSources.add(source);
  2372. }
  2373. var name = mapping.name;
  2374. if (name != null && !newNames.has(name)) {
  2375. newNames.add(name);
  2376. }
  2377. }, this);
  2378. this._sources = newSources;
  2379. this._names = newNames;
  2380. // Copy sourcesContents of applied map.
  2381. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  2382. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  2383. if (content != null) {
  2384. if (aSourceMapPath != null) {
  2385. sourceFile = util.join(aSourceMapPath, sourceFile);
  2386. }
  2387. if (sourceRoot != null) {
  2388. sourceFile = util.relative(sourceRoot, sourceFile);
  2389. }
  2390. this.setSourceContent(sourceFile, content);
  2391. }
  2392. }, this);
  2393. };
  2394. /**
  2395. * A mapping can have one of the three levels of data:
  2396. *
  2397. * 1. Just the generated position.
  2398. * 2. The Generated position, original position, and original source.
  2399. * 3. Generated and original position, original source, as well as a name
  2400. * token.
  2401. *
  2402. * To maintain consistency, we validate that any new mapping being added falls
  2403. * in to one of these categories.
  2404. */
  2405. SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
  2406. if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
  2407. // Case 1.
  2408. return;
  2409. } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
  2410. // Cases 2 and 3.
  2411. return;
  2412. } else {
  2413. throw new Error('Invalid mapping: ' + JSON.stringify({
  2414. generated: aGenerated,
  2415. source: aSource,
  2416. original: aOriginal,
  2417. name: aName
  2418. }));
  2419. }
  2420. };
  2421. /**
  2422. * Serialize the accumulated mappings in to the stream of base 64 VLQs
  2423. * specified by the source map format.
  2424. */
  2425. SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
  2426. var previousGeneratedColumn = 0;
  2427. var previousGeneratedLine = 1;
  2428. var previousOriginalColumn = 0;
  2429. var previousOriginalLine = 0;
  2430. var previousName = 0;
  2431. var previousSource = 0;
  2432. var result = '';
  2433. var next;
  2434. var mapping;
  2435. var nameIdx;
  2436. var sourceIdx;
  2437. var mappings = this._mappings.toArray();
  2438. for (var i = 0, len = mappings.length; i < len; i++) {
  2439. mapping = mappings[i];
  2440. next = '';
  2441. if (mapping.generatedLine !== previousGeneratedLine) {
  2442. previousGeneratedColumn = 0;
  2443. while (mapping.generatedLine !== previousGeneratedLine) {
  2444. next += ';';
  2445. previousGeneratedLine++;
  2446. }
  2447. } else {
  2448. if (i > 0) {
  2449. if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
  2450. continue;
  2451. }
  2452. next += ',';
  2453. }
  2454. }
  2455. next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
  2456. previousGeneratedColumn = mapping.generatedColumn;
  2457. if (mapping.source != null) {
  2458. sourceIdx = this._sources.indexOf(mapping.source);
  2459. next += base64VLQ.encode(sourceIdx - previousSource);
  2460. previousSource = sourceIdx;
  2461. // lines are stored 0-based in SourceMap spec version 3
  2462. next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
  2463. previousOriginalLine = mapping.originalLine - 1;
  2464. next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
  2465. previousOriginalColumn = mapping.originalColumn;
  2466. if (mapping.name != null) {
  2467. nameIdx = this._names.indexOf(mapping.name);
  2468. next += base64VLQ.encode(nameIdx - previousName);
  2469. previousName = nameIdx;
  2470. }
  2471. }
  2472. result += next;
  2473. }
  2474. return result;
  2475. };
  2476. SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
  2477. return aSources.map(function (source) {
  2478. if (!this._sourcesContents) {
  2479. return null;
  2480. }
  2481. if (aSourceRoot != null) {
  2482. source = util.relative(aSourceRoot, source);
  2483. }
  2484. var key = util.toSetString(source);
  2485. return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
  2486. }, this);
  2487. };
  2488. /**
  2489. * Externalize the source map.
  2490. */
  2491. SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
  2492. var map = {
  2493. version: this._version,
  2494. sources: this._sources.toArray(),
  2495. names: this._names.toArray(),
  2496. mappings: this._serializeMappings()
  2497. };
  2498. if (this._file != null) {
  2499. map.file = this._file;
  2500. }
  2501. if (this._sourceRoot != null) {
  2502. map.sourceRoot = this._sourceRoot;
  2503. }
  2504. if (this._sourcesContents) {
  2505. map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
  2506. }
  2507. return map;
  2508. };
  2509. /**
  2510. * Render the source map being generated to a string.
  2511. */
  2512. SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
  2513. return JSON.stringify(this.toJSON());
  2514. };
  2515. exports.SourceMapGenerator = SourceMapGenerator;
  2516. });
  2517. $__System.registerDynamic('27', [], true, function ($__require, exports, module) {
  2518. var global = this || self,
  2519. GLOBAL = global;
  2520. /* -*- Mode: js; js-indent-level: 2; -*- */
  2521. /*
  2522. * Copyright 2011 Mozilla Foundation and contributors
  2523. * Licensed under the New BSD license. See LICENSE or:
  2524. * http://opensource.org/licenses/BSD-3-Clause
  2525. */
  2526. /**
  2527. * This is a helper function for getting values from parameter/options
  2528. * objects.
  2529. *
  2530. * @param args The object we are extracting values from
  2531. * @param name The name of the property we are getting.
  2532. * @param defaultValue An optional value to return if the property is missing
  2533. * from the object. If this is not specified and the property is missing, an
  2534. * error will be thrown.
  2535. */
  2536. function getArg(aArgs, aName, aDefaultValue) {
  2537. if (aName in aArgs) {
  2538. return aArgs[aName];
  2539. } else if (arguments.length === 3) {
  2540. return aDefaultValue;
  2541. } else {
  2542. throw new Error('"' + aName + '" is a required argument.');
  2543. }
  2544. }
  2545. exports.getArg = getArg;
  2546. var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
  2547. var dataUrlRegexp = /^data:.+\,.+$/;
  2548. function urlParse(aUrl) {
  2549. var match = aUrl.match(urlRegexp);
  2550. if (!match) {
  2551. return null;
  2552. }
  2553. return {
  2554. scheme: match[1],
  2555. auth: match[2],
  2556. host: match[3],
  2557. port: match[4],
  2558. path: match[5]
  2559. };
  2560. }
  2561. exports.urlParse = urlParse;
  2562. function urlGenerate(aParsedUrl) {
  2563. var url = '';
  2564. if (aParsedUrl.scheme) {
  2565. url += aParsedUrl.scheme + ':';
  2566. }
  2567. url += '//';
  2568. if (aParsedUrl.auth) {
  2569. url += aParsedUrl.auth + '@';
  2570. }
  2571. if (aParsedUrl.host) {
  2572. url += aParsedUrl.host;
  2573. }
  2574. if (aParsedUrl.port) {
  2575. url += ":" + aParsedUrl.port;
  2576. }
  2577. if (aParsedUrl.path) {
  2578. url += aParsedUrl.path;
  2579. }
  2580. return url;
  2581. }
  2582. exports.urlGenerate = urlGenerate;
  2583. /**
  2584. * Normalizes a path, or the path portion of a URL:
  2585. *
  2586. * - Replaces consecutive slashes with one slash.
  2587. * - Removes unnecessary '.' parts.
  2588. * - Removes unnecessary '<dir>/..' parts.
  2589. *
  2590. * Based on code in the Node.js 'path' core module.
  2591. *
  2592. * @param aPath The path or url to normalize.
  2593. */
  2594. function normalize(aPath) {
  2595. var path = aPath;
  2596. var url = urlParse(aPath);
  2597. if (url) {
  2598. if (!url.path) {
  2599. return aPath;
  2600. }
  2601. path = url.path;
  2602. }
  2603. var isAbsolute = exports.isAbsolute(path);
  2604. var parts = path.split(/\/+/);
  2605. for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
  2606. part = parts[i];
  2607. if (part === '.') {
  2608. parts.splice(i, 1);
  2609. } else if (part === '..') {
  2610. up++;
  2611. } else if (up > 0) {
  2612. if (part === '') {
  2613. // The first part is blank if the path is absolute. Trying to go
  2614. // above the root is a no-op. Therefore we can remove all '..' parts
  2615. // directly after the root.
  2616. parts.splice(i + 1, up);
  2617. up = 0;
  2618. } else {
  2619. parts.splice(i, 2);
  2620. up--;
  2621. }
  2622. }
  2623. }
  2624. path = parts.join('/');
  2625. if (path === '') {
  2626. path = isAbsolute ? '/' : '.';
  2627. }
  2628. if (url) {
  2629. url.path = path;
  2630. return urlGenerate(url);
  2631. }
  2632. return path;
  2633. }
  2634. exports.normalize = normalize;
  2635. /**
  2636. * Joins two paths/URLs.
  2637. *
  2638. * @param aRoot The root path or URL.
  2639. * @param aPath The path or URL to be joined with the root.
  2640. *
  2641. * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
  2642. * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
  2643. * first.
  2644. * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
  2645. * is updated with the result and aRoot is returned. Otherwise the result
  2646. * is returned.
  2647. * - If aPath is absolute, the result is aPath.
  2648. * - Otherwise the two paths are joined with a slash.
  2649. * - Joining for example 'http://' and 'www.example.com' is also supported.
  2650. */
  2651. function join(aRoot, aPath) {
  2652. if (aRoot === "") {
  2653. aRoot = ".";
  2654. }
  2655. if (aPath === "") {
  2656. aPath = ".";
  2657. }
  2658. var aPathUrl = urlParse(aPath);
  2659. var aRootUrl = urlParse(aRoot);
  2660. if (aRootUrl) {
  2661. aRoot = aRootUrl.path || '/';
  2662. }
  2663. // `join(foo, '//www.example.org')`
  2664. if (aPathUrl && !aPathUrl.scheme) {
  2665. if (aRootUrl) {
  2666. aPathUrl.scheme = aRootUrl.scheme;
  2667. }
  2668. return urlGenerate(aPathUrl);
  2669. }
  2670. if (aPathUrl || aPath.match(dataUrlRegexp)) {
  2671. return aPath;
  2672. }
  2673. // `join('http://', 'www.example.com')`
  2674. if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
  2675. aRootUrl.host = aPath;
  2676. return urlGenerate(aRootUrl);
  2677. }
  2678. var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
  2679. if (aRootUrl) {
  2680. aRootUrl.path = joined;
  2681. return urlGenerate(aRootUrl);
  2682. }
  2683. return joined;
  2684. }
  2685. exports.join = join;
  2686. exports.isAbsolute = function (aPath) {
  2687. return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
  2688. };
  2689. /**
  2690. * Make a path relative to a URL or another path.
  2691. *
  2692. * @param aRoot The root path or URL.
  2693. * @param aPath The path or URL to be made relative to aRoot.
  2694. */
  2695. function relative(aRoot, aPath) {
  2696. if (aRoot === "") {
  2697. aRoot = ".";
  2698. }
  2699. aRoot = aRoot.replace(/\/$/, '');
  2700. // It is possible for the path to be above the root. In this case, simply
  2701. // checking whether the root is a prefix of the path won't work. Instead, we
  2702. // need to remove components from the root one by one, until either we find
  2703. // a prefix that fits, or we run out of components to remove.
  2704. var level = 0;
  2705. while (aPath.indexOf(aRoot + '/') !== 0) {
  2706. var index = aRoot.lastIndexOf("/");
  2707. if (index < 0) {
  2708. return aPath;
  2709. }
  2710. // If the only part of the root that is left is the scheme (i.e. http://,
  2711. // file:///, etc.), one or more slashes (/), or simply nothing at all, we
  2712. // have exhausted all components, so the path is not relative to the root.
  2713. aRoot = aRoot.slice(0, index);
  2714. if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
  2715. return aPath;
  2716. }
  2717. ++level;
  2718. }
  2719. // Make sure we add a "../" for each component we removed from the root.
  2720. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  2721. }
  2722. exports.relative = relative;
  2723. var supportsNullProto = function () {
  2724. var obj = Object.create(null);
  2725. return !('__proto__' in obj);
  2726. }();
  2727. function identity(s) {
  2728. return s;
  2729. }
  2730. /**
  2731. * Because behavior goes wacky when you set `__proto__` on objects, we
  2732. * have to prefix all the strings in our set with an arbitrary character.
  2733. *
  2734. * See https://github.com/mozilla/source-map/pull/31 and
  2735. * https://github.com/mozilla/source-map/issues/30
  2736. *
  2737. * @param String aStr
  2738. */
  2739. function toSetString(aStr) {
  2740. if (isProtoString(aStr)) {
  2741. return '$' + aStr;
  2742. }
  2743. return aStr;
  2744. }
  2745. exports.toSetString = supportsNullProto ? identity : toSetString;
  2746. function fromSetString(aStr) {
  2747. if (isProtoString(aStr)) {
  2748. return aStr.slice(1);
  2749. }
  2750. return aStr;
  2751. }
  2752. exports.fromSetString = supportsNullProto ? identity : fromSetString;
  2753. function isProtoString(s) {
  2754. if (!s) {
  2755. return false;
  2756. }
  2757. var length = s.length;
  2758. if (length < 9 /* "__proto__".length */) {
  2759. return false;
  2760. }
  2761. if (s.charCodeAt(length - 1) !== 95 /* '_' */ || s.charCodeAt(length - 2) !== 95 /* '_' */ || s.charCodeAt(length - 3) !== 111 /* 'o' */ || s.charCodeAt(length - 4) !== 116 /* 't' */ || s.charCodeAt(length - 5) !== 111 /* 'o' */ || s.charCodeAt(length - 6) !== 114 /* 'r' */ || s.charCodeAt(length - 7) !== 112 /* 'p' */ || s.charCodeAt(length - 8) !== 95 /* '_' */ || s.charCodeAt(length - 9) !== 95 /* '_' */) {
  2762. return false;
  2763. }
  2764. for (var i = length - 10; i >= 0; i--) {
  2765. if (s.charCodeAt(i) !== 36 /* '$' */) {
  2766. return false;
  2767. }
  2768. }
  2769. return true;
  2770. }
  2771. /**
  2772. * Comparator between two mappings where the original positions are compared.
  2773. *
  2774. * Optionally pass in `true` as `onlyCompareGenerated` to consider two
  2775. * mappings with the same original source/line/column, but different generated
  2776. * line and column the same. Useful when searching for a mapping with a
  2777. * stubbed out mapping.
  2778. */
  2779. function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  2780. var cmp = mappingA.source - mappingB.source;
  2781. if (cmp !== 0) {
  2782. return cmp;
  2783. }
  2784. cmp = mappingA.originalLine - mappingB.originalLine;
  2785. if (cmp !== 0) {
  2786. return cmp;
  2787. }
  2788. cmp = mappingA.originalColumn - mappingB.originalColumn;
  2789. if (cmp !== 0 || onlyCompareOriginal) {
  2790. return cmp;
  2791. }
  2792. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  2793. if (cmp !== 0) {
  2794. return cmp;
  2795. }
  2796. cmp = mappingA.generatedLine - mappingB.generatedLine;
  2797. if (cmp !== 0) {
  2798. return cmp;
  2799. }
  2800. return mappingA.name - mappingB.name;
  2801. }
  2802. exports.compareByOriginalPositions = compareByOriginalPositions;
  2803. /**
  2804. * Comparator between two mappings with deflated source and name indices where
  2805. * the generated positions are compared.
  2806. *
  2807. * Optionally pass in `true` as `onlyCompareGenerated` to consider two
  2808. * mappings with the same generated line and column, but different
  2809. * source/name/original line and column the same. Useful when searching for a
  2810. * mapping with a stubbed out mapping.
  2811. */
  2812. function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  2813. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  2814. if (cmp !== 0) {
  2815. return cmp;
  2816. }
  2817. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  2818. if (cmp !== 0 || onlyCompareGenerated) {
  2819. return cmp;
  2820. }
  2821. cmp = mappingA.source - mappingB.source;
  2822. if (cmp !== 0) {
  2823. return cmp;
  2824. }
  2825. cmp = mappingA.originalLine - mappingB.originalLine;
  2826. if (cmp !== 0) {
  2827. return cmp;
  2828. }
  2829. cmp = mappingA.originalColumn - mappingB.originalColumn;
  2830. if (cmp !== 0) {
  2831. return cmp;
  2832. }
  2833. return mappingA.name - mappingB.name;
  2834. }
  2835. exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  2836. function strcmp(aStr1, aStr2) {
  2837. if (aStr1 === aStr2) {
  2838. return 0;
  2839. }
  2840. if (aStr1 > aStr2) {
  2841. return 1;
  2842. }
  2843. return -1;
  2844. }
  2845. /**
  2846. * Comparator between two mappings with inflated source and name strings where
  2847. * the generated positions are compared.
  2848. */
  2849. function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  2850. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  2851. if (cmp !== 0) {
  2852. return cmp;
  2853. }
  2854. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  2855. if (cmp !== 0) {
  2856. return cmp;
  2857. }
  2858. cmp = strcmp(mappingA.source, mappingB.source);
  2859. if (cmp !== 0) {
  2860. return cmp;
  2861. }
  2862. cmp = mappingA.originalLine - mappingB.originalLine;
  2863. if (cmp !== 0) {
  2864. return cmp;
  2865. }
  2866. cmp = mappingA.originalColumn - mappingB.originalColumn;
  2867. if (cmp !== 0) {
  2868. return cmp;
  2869. }
  2870. return strcmp(mappingA.name, mappingB.name);
  2871. }
  2872. exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  2873. });
  2874. $__System.registerDynamic('2d', ['2c', '27'], true, function ($__require, exports, module) {
  2875. var global = this || self,
  2876. GLOBAL = global;
  2877. /* -*- Mode: js; js-indent-level: 2; -*- */
  2878. /*
  2879. * Copyright 2011 Mozilla Foundation and contributors
  2880. * Licensed under the New BSD license. See LICENSE or:
  2881. * http://opensource.org/licenses/BSD-3-Clause
  2882. */
  2883. var SourceMapGenerator = $__require('2c').SourceMapGenerator;
  2884. var util = $__require('27');
  2885. // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
  2886. // operating systems these days (capturing the result).
  2887. var REGEX_NEWLINE = /(\r?\n)/;
  2888. // Newline character code for charCodeAt() comparisons
  2889. var NEWLINE_CODE = 10;
  2890. // Private symbol for identifying `SourceNode`s when multiple versions of
  2891. // the source-map library are loaded. This MUST NOT CHANGE across
  2892. // versions!
  2893. var isSourceNode = "$$$isSourceNode$$$";
  2894. /**
  2895. * SourceNodes provide a way to abstract over interpolating/concatenating
  2896. * snippets of generated JavaScript source code while maintaining the line and
  2897. * column information associated with the original source code.
  2898. *
  2899. * @param aLine The original line number.
  2900. * @param aColumn The original column number.
  2901. * @param aSource The original source's filename.
  2902. * @param aChunks Optional. An array of strings which are snippets of
  2903. * generated JS, or other SourceNodes.
  2904. * @param aName The original identifier.
  2905. */
  2906. function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
  2907. this.children = [];
  2908. this.sourceContents = {};
  2909. this.line = aLine == null ? null : aLine;
  2910. this.column = aColumn == null ? null : aColumn;
  2911. this.source = aSource == null ? null : aSource;
  2912. this.name = aName == null ? null : aName;
  2913. this[isSourceNode] = true;
  2914. if (aChunks != null) this.add(aChunks);
  2915. }
  2916. /**
  2917. * Creates a SourceNode from generated code and a SourceMapConsumer.
  2918. *
  2919. * @param aGeneratedCode The generated code
  2920. * @param aSourceMapConsumer The SourceMap for the generated code
  2921. * @param aRelativePath Optional. The path that relative sources in the
  2922. * SourceMapConsumer should be relative to.
  2923. */
  2924. SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
  2925. // The SourceNode we want to fill with the generated code
  2926. // and the SourceMap
  2927. var node = new SourceNode();
  2928. // All even indices of this array are one line of the generated code,
  2929. // while all odd indices are the newlines between two adjacent lines
  2930. // (since `REGEX_NEWLINE` captures its match).
  2931. // Processed fragments are removed from this array, by calling `shiftNextLine`.
  2932. var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
  2933. var shiftNextLine = function () {
  2934. var lineContents = remainingLines.shift();
  2935. // The last line of a file might not have a newline.
  2936. var newLine = remainingLines.shift() || "";
  2937. return lineContents + newLine;
  2938. };
  2939. // We need to remember the position of "remainingLines"
  2940. var lastGeneratedLine = 1,
  2941. lastGeneratedColumn = 0;
  2942. // The generate SourceNodes we need a code range.
  2943. // To extract it current and last mapping is used.
  2944. // Here we store the last mapping.
  2945. var lastMapping = null;
  2946. aSourceMapConsumer.eachMapping(function (mapping) {
  2947. if (lastMapping !== null) {
  2948. // We add the code from "lastMapping" to "mapping":
  2949. // First check if there is a new line in between.
  2950. if (lastGeneratedLine < mapping.generatedLine) {
  2951. // Associate first line with "lastMapping"
  2952. addMappingWithCode(lastMapping, shiftNextLine());
  2953. lastGeneratedLine++;
  2954. lastGeneratedColumn = 0;
  2955. // The remaining code is added without mapping
  2956. } else {
  2957. // There is no new line in between.
  2958. // Associate the code between "lastGeneratedColumn" and
  2959. // "mapping.generatedColumn" with "lastMapping"
  2960. var nextLine = remainingLines[0];
  2961. var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
  2962. remainingLines[0] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
  2963. lastGeneratedColumn = mapping.generatedColumn;
  2964. addMappingWithCode(lastMapping, code);
  2965. // No more remaining code, continue
  2966. lastMapping = mapping;
  2967. return;
  2968. }
  2969. }
  2970. // We add the generated code until the first mapping
  2971. // to the SourceNode without any mapping.
  2972. // Each line is added as separate string.
  2973. while (lastGeneratedLine < mapping.generatedLine) {
  2974. node.add(shiftNextLine());
  2975. lastGeneratedLine++;
  2976. }
  2977. if (lastGeneratedColumn < mapping.generatedColumn) {
  2978. var nextLine = remainingLines[0];
  2979. node.add(nextLine.substr(0, mapping.generatedColumn));
  2980. remainingLines[0] = nextLine.substr(mapping.generatedColumn);
  2981. lastGeneratedColumn = mapping.generatedColumn;
  2982. }
  2983. lastMapping = mapping;
  2984. }, this);
  2985. // We have processed all mappings.
  2986. if (remainingLines.length > 0) {
  2987. if (lastMapping) {
  2988. // Associate the remaining code in the current line with "lastMapping"
  2989. addMappingWithCode(lastMapping, shiftNextLine());
  2990. }
  2991. // and add the remaining lines without any mapping
  2992. node.add(remainingLines.join(""));
  2993. }
  2994. // Copy sourcesContent into SourceNode
  2995. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  2996. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  2997. if (content != null) {
  2998. if (aRelativePath != null) {
  2999. sourceFile = util.join(aRelativePath, sourceFile);
  3000. }
  3001. node.setSourceContent(sourceFile, content);
  3002. }
  3003. });
  3004. return node;
  3005. function addMappingWithCode(mapping, code) {
  3006. if (mapping === null || mapping.source === undefined) {
  3007. node.add(code);
  3008. } else {
  3009. var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
  3010. node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
  3011. }
  3012. }
  3013. };
  3014. /**
  3015. * Add a chunk of generated JS to this source node.
  3016. *
  3017. * @param aChunk A string snippet of generated JS code, another instance of
  3018. * SourceNode, or an array where each member is one of those things.
  3019. */
  3020. SourceNode.prototype.add = function SourceNode_add(aChunk) {
  3021. if (Array.isArray(aChunk)) {
  3022. aChunk.forEach(function (chunk) {
  3023. this.add(chunk);
  3024. }, this);
  3025. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  3026. if (aChunk) {
  3027. this.children.push(aChunk);
  3028. }
  3029. } else {
  3030. throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
  3031. }
  3032. return this;
  3033. };
  3034. /**
  3035. * Add a chunk of generated JS to the beginning of this source node.
  3036. *
  3037. * @param aChunk A string snippet of generated JS code, another instance of
  3038. * SourceNode, or an array where each member is one of those things.
  3039. */
  3040. SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
  3041. if (Array.isArray(aChunk)) {
  3042. for (var i = aChunk.length - 1; i >= 0; i--) {
  3043. this.prepend(aChunk[i]);
  3044. }
  3045. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  3046. this.children.unshift(aChunk);
  3047. } else {
  3048. throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
  3049. }
  3050. return this;
  3051. };
  3052. /**
  3053. * Walk over the tree of JS snippets in this node and its children. The
  3054. * walking function is called once for each snippet of JS and is passed that
  3055. * snippet and the its original associated source's line/column location.
  3056. *
  3057. * @param aFn The traversal function.
  3058. */
  3059. SourceNode.prototype.walk = function SourceNode_walk(aFn) {
  3060. var chunk;
  3061. for (var i = 0, len = this.children.length; i < len; i++) {
  3062. chunk = this.children[i];
  3063. if (chunk[isSourceNode]) {
  3064. chunk.walk(aFn);
  3065. } else {
  3066. if (chunk !== '') {
  3067. aFn(chunk, { source: this.source,
  3068. line: this.line,
  3069. column: this.column,
  3070. name: this.name });
  3071. }
  3072. }
  3073. }
  3074. };
  3075. /**
  3076. * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
  3077. * each of `this.children`.
  3078. *
  3079. * @param aSep The separator.
  3080. */
  3081. SourceNode.prototype.join = function SourceNode_join(aSep) {
  3082. var newChildren;
  3083. var i;
  3084. var len = this.children.length;
  3085. if (len > 0) {
  3086. newChildren = [];
  3087. for (i = 0; i < len - 1; i++) {
  3088. newChildren.push(this.children[i]);
  3089. newChildren.push(aSep);
  3090. }
  3091. newChildren.push(this.children[i]);
  3092. this.children = newChildren;
  3093. }
  3094. return this;
  3095. };
  3096. /**
  3097. * Call String.prototype.replace on the very right-most source snippet. Useful
  3098. * for trimming whitespace from the end of a source node, etc.
  3099. *
  3100. * @param aPattern The pattern to replace.
  3101. * @param aReplacement The thing to replace the pattern with.
  3102. */
  3103. SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
  3104. var lastChild = this.children[this.children.length - 1];
  3105. if (lastChild[isSourceNode]) {
  3106. lastChild.replaceRight(aPattern, aReplacement);
  3107. } else if (typeof lastChild === 'string') {
  3108. this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
  3109. } else {
  3110. this.children.push(''.replace(aPattern, aReplacement));
  3111. }
  3112. return this;
  3113. };
  3114. /**
  3115. * Set the source content for a source file. This will be added to the SourceMapGenerator
  3116. * in the sourcesContent field.
  3117. *
  3118. * @param aSourceFile The filename of the source file
  3119. * @param aSourceContent The content of the source file
  3120. */
  3121. SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
  3122. this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
  3123. };
  3124. /**
  3125. * Walk over the tree of SourceNodes. The walking function is called for each
  3126. * source file content and is passed the filename and source content.
  3127. *
  3128. * @param aFn The traversal function.
  3129. */
  3130. SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
  3131. for (var i = 0, len = this.children.length; i < len; i++) {
  3132. if (this.children[i][isSourceNode]) {
  3133. this.children[i].walkSourceContents(aFn);
  3134. }
  3135. }
  3136. var sources = Object.keys(this.sourceContents);
  3137. for (var i = 0, len = sources.length; i < len; i++) {
  3138. aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
  3139. }
  3140. };
  3141. /**
  3142. * Return the string representation of this source node. Walks over the tree
  3143. * and concatenates all the various snippets together to one string.
  3144. */
  3145. SourceNode.prototype.toString = function SourceNode_toString() {
  3146. var str = "";
  3147. this.walk(function (chunk) {
  3148. str += chunk;
  3149. });
  3150. return str;
  3151. };
  3152. /**
  3153. * Returns the string representation of this source node along with a source
  3154. * map.
  3155. */
  3156. SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
  3157. var generated = {
  3158. code: "",
  3159. line: 1,
  3160. column: 0
  3161. };
  3162. var map = new SourceMapGenerator(aArgs);
  3163. var sourceMappingActive = false;
  3164. var lastOriginalSource = null;
  3165. var lastOriginalLine = null;
  3166. var lastOriginalColumn = null;
  3167. var lastOriginalName = null;
  3168. this.walk(function (chunk, original) {
  3169. generated.code += chunk;
  3170. if (original.source !== null && original.line !== null && original.column !== null) {
  3171. if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
  3172. map.addMapping({
  3173. source: original.source,
  3174. original: {
  3175. line: original.line,
  3176. column: original.column
  3177. },
  3178. generated: {
  3179. line: generated.line,
  3180. column: generated.column
  3181. },
  3182. name: original.name
  3183. });
  3184. }
  3185. lastOriginalSource = original.source;
  3186. lastOriginalLine = original.line;
  3187. lastOriginalColumn = original.column;
  3188. lastOriginalName = original.name;
  3189. sourceMappingActive = true;
  3190. } else if (sourceMappingActive) {
  3191. map.addMapping({
  3192. generated: {
  3193. line: generated.line,
  3194. column: generated.column
  3195. }
  3196. });
  3197. lastOriginalSource = null;
  3198. sourceMappingActive = false;
  3199. }
  3200. for (var idx = 0, length = chunk.length; idx < length; idx++) {
  3201. if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
  3202. generated.line++;
  3203. generated.column = 0;
  3204. // Mappings end at eol
  3205. if (idx + 1 === length) {
  3206. lastOriginalSource = null;
  3207. sourceMappingActive = false;
  3208. } else if (sourceMappingActive) {
  3209. map.addMapping({
  3210. source: original.source,
  3211. original: {
  3212. line: original.line,
  3213. column: original.column
  3214. },
  3215. generated: {
  3216. line: generated.line,
  3217. column: generated.column
  3218. },
  3219. name: original.name
  3220. });
  3221. }
  3222. } else {
  3223. generated.column++;
  3224. }
  3225. }
  3226. });
  3227. this.walkSourceContents(function (sourceFile, sourceContent) {
  3228. map.setSourceContent(sourceFile, sourceContent);
  3229. });
  3230. return { code: generated.code, map: map };
  3231. };
  3232. exports.SourceNode = SourceNode;
  3233. });
  3234. $__System.registerDynamic('2e', ['2c', '26', '2d'], true, function ($__require, exports, module) {
  3235. var global = this || self,
  3236. GLOBAL = global;
  3237. /*
  3238. * Copyright 2009-2011 Mozilla Foundation and contributors
  3239. * Licensed under the New BSD license. See LICENSE.txt or:
  3240. * http://opensource.org/licenses/BSD-3-Clause
  3241. */
  3242. exports.SourceMapGenerator = $__require('2c').SourceMapGenerator;
  3243. exports.SourceMapConsumer = $__require('26').SourceMapConsumer;
  3244. exports.SourceNode = $__require('2d').SourceNode;
  3245. });
  3246. $__System.registerDynamic("2f", ["15", "30", "1d", "2e"], true, function ($__require, exports, module) {
  3247. "use strict";
  3248. var global = this || self,
  3249. GLOBAL = global;
  3250. exports.__esModule = true;
  3251. var _keys = $__require("15");
  3252. var _keys2 = _interopRequireDefault(_keys);
  3253. var _typeof2 = $__require("30");
  3254. var _typeof3 = _interopRequireDefault(_typeof2);
  3255. var _classCallCheck2 = $__require("1d");
  3256. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  3257. var _sourceMap = $__require("2e");
  3258. var _sourceMap2 = _interopRequireDefault(_sourceMap);
  3259. function _interopRequireDefault(obj) {
  3260. return obj && obj.__esModule ? obj : { default: obj };
  3261. }
  3262. var SourceMap = function () {
  3263. function SourceMap(opts, code) {
  3264. (0, _classCallCheck3.default)(this, SourceMap);
  3265. this._cachedMap = null;
  3266. this._code = code;
  3267. this._opts = opts;
  3268. this._rawMappings = [];
  3269. }
  3270. SourceMap.prototype.get = function get() {
  3271. if (!this._cachedMap) {
  3272. var map = this._cachedMap = new _sourceMap2.default.SourceMapGenerator({
  3273. file: this._opts.sourceMapTarget,
  3274. sourceRoot: this._opts.sourceRoot
  3275. });
  3276. var code = this._code;
  3277. if (typeof code === "string") {
  3278. map.setSourceContent(this._opts.sourceFileName, code);
  3279. } else if ((typeof code === "undefined" ? "undefined" : (0, _typeof3.default)(code)) === "object") {
  3280. (0, _keys2.default)(code).forEach(function (sourceFileName) {
  3281. map.setSourceContent(sourceFileName, code[sourceFileName]);
  3282. });
  3283. }
  3284. this._rawMappings.forEach(map.addMapping, map);
  3285. }
  3286. return this._cachedMap.toJSON();
  3287. };
  3288. SourceMap.prototype.getRawMappings = function getRawMappings() {
  3289. return this._rawMappings.slice();
  3290. };
  3291. SourceMap.prototype.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename) {
  3292. if (this._lastGenLine !== generatedLine && line === null) return;
  3293. if (this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
  3294. return;
  3295. }
  3296. this._cachedMap = null;
  3297. this._lastGenLine = generatedLine;
  3298. this._lastSourceLine = line;
  3299. this._lastSourceColumn = column;
  3300. this._rawMappings.push({
  3301. name: identifierName || undefined,
  3302. generated: {
  3303. line: generatedLine,
  3304. column: generatedColumn
  3305. },
  3306. source: line == null ? undefined : filename || this._opts.sourceFileName,
  3307. original: line == null ? undefined : {
  3308. line: line,
  3309. column: column
  3310. }
  3311. });
  3312. };
  3313. return SourceMap;
  3314. }();
  3315. exports.default = SourceMap;
  3316. module.exports = exports["default"];
  3317. });
  3318. $__System.registerDynamic('31', ['32', '33', 'c'], true, function ($__require, exports, module) {
  3319. 'use strict';
  3320. var process = $__require('c');
  3321. var global = this || self,
  3322. GLOBAL = global;
  3323. var weak = $__require('32');
  3324. // 23.4 WeakSet Objects
  3325. $__require('33')('WeakSet', function (get) {
  3326. return function WeakSet() {
  3327. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  3328. };
  3329. }, {
  3330. // 23.4.3.1 WeakSet.prototype.add(value)
  3331. add: function add(value) {
  3332. return weak.def(this, value, true);
  3333. }
  3334. }, weak, false, true);
  3335. });
  3336. $__System.registerDynamic('34', ['35', '36', '31', '37', 'c'], true, function ($__require, exports, module) {
  3337. var process = $__require('c');
  3338. var global = this || self,
  3339. GLOBAL = global;
  3340. $__require('35');
  3341. $__require('36');
  3342. $__require('31');
  3343. module.exports = $__require('37').WeakSet;
  3344. });
  3345. $__System.registerDynamic("38", ["34"], true, function ($__require, exports, module) {
  3346. var global = this || self,
  3347. GLOBAL = global;
  3348. module.exports = { "default": $__require("34"), __esModule: true };
  3349. });
  3350. $__System.registerDynamic('39', ['3a', '3b', '3c'], true, function ($__require, exports, module) {
  3351. var global = this || self,
  3352. GLOBAL = global;
  3353. var baseFindIndex = $__require('3a'),
  3354. baseIteratee = $__require('3b'),
  3355. toInteger = $__require('3c');
  3356. /* Built-in method references for those with the same name as other `lodash` methods. */
  3357. var nativeMax = Math.max;
  3358. /**
  3359. * This method is like `_.find` except that it returns the index of the first
  3360. * element `predicate` returns truthy for instead of the element itself.
  3361. *
  3362. * @static
  3363. * @memberOf _
  3364. * @since 1.1.0
  3365. * @category Array
  3366. * @param {Array} array The array to inspect.
  3367. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  3368. * @param {number} [fromIndex=0] The index to search from.
  3369. * @returns {number} Returns the index of the found element, else `-1`.
  3370. * @example
  3371. *
  3372. * var users = [
  3373. * { 'user': 'barney', 'active': false },
  3374. * { 'user': 'fred', 'active': false },
  3375. * { 'user': 'pebbles', 'active': true }
  3376. * ];
  3377. *
  3378. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  3379. * // => 0
  3380. *
  3381. * // The `_.matches` iteratee shorthand.
  3382. * _.findIndex(users, { 'user': 'fred', 'active': false });
  3383. * // => 1
  3384. *
  3385. * // The `_.matchesProperty` iteratee shorthand.
  3386. * _.findIndex(users, ['active', false]);
  3387. * // => 0
  3388. *
  3389. * // The `_.property` iteratee shorthand.
  3390. * _.findIndex(users, 'active');
  3391. * // => 2
  3392. */
  3393. function findIndex(array, predicate, fromIndex) {
  3394. var length = array == null ? 0 : array.length;
  3395. if (!length) {
  3396. return -1;
  3397. }
  3398. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  3399. if (index < 0) {
  3400. index = nativeMax(length + index, 0);
  3401. }
  3402. return baseFindIndex(array, baseIteratee(predicate, 3), index);
  3403. }
  3404. module.exports = findIndex;
  3405. });
  3406. $__System.registerDynamic('3d', ['3e', '39'], true, function ($__require, exports, module) {
  3407. var global = this || self,
  3408. GLOBAL = global;
  3409. var createFind = $__require('3e'),
  3410. findIndex = $__require('39');
  3411. /**
  3412. * Iterates over elements of `collection`, returning the first element
  3413. * `predicate` returns truthy for. The predicate is invoked with three
  3414. * arguments: (value, index|key, collection).
  3415. *
  3416. * @static
  3417. * @memberOf _
  3418. * @since 0.1.0
  3419. * @category Collection
  3420. * @param {Array|Object} collection The collection to inspect.
  3421. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  3422. * @param {number} [fromIndex=0] The index to search from.
  3423. * @returns {*} Returns the matched element, else `undefined`.
  3424. * @example
  3425. *
  3426. * var users = [
  3427. * { 'user': 'barney', 'age': 36, 'active': true },
  3428. * { 'user': 'fred', 'age': 40, 'active': false },
  3429. * { 'user': 'pebbles', 'age': 1, 'active': true }
  3430. * ];
  3431. *
  3432. * _.find(users, function(o) { return o.age < 40; });
  3433. * // => object for 'barney'
  3434. *
  3435. * // The `_.matches` iteratee shorthand.
  3436. * _.find(users, { 'age': 1, 'active': true });
  3437. * // => object for 'pebbles'
  3438. *
  3439. * // The `_.matchesProperty` iteratee shorthand.
  3440. * _.find(users, ['active', false]);
  3441. * // => object for 'fred'
  3442. *
  3443. * // The `_.property` iteratee shorthand.
  3444. * _.find(users, 'active');
  3445. * // => object for 'barney'
  3446. */
  3447. var find = createFind(findIndex);
  3448. module.exports = find;
  3449. });
  3450. $__System.registerDynamic('3e', ['3b', '3f', '40'], true, function ($__require, exports, module) {
  3451. var global = this || self,
  3452. GLOBAL = global;
  3453. var baseIteratee = $__require('3b'),
  3454. isArrayLike = $__require('3f'),
  3455. keys = $__require('40');
  3456. /**
  3457. * Creates a `_.find` or `_.findLast` function.
  3458. *
  3459. * @private
  3460. * @param {Function} findIndexFunc The function to find the collection index.
  3461. * @returns {Function} Returns the new find function.
  3462. */
  3463. function createFind(findIndexFunc) {
  3464. return function (collection, predicate, fromIndex) {
  3465. var iterable = Object(collection);
  3466. if (!isArrayLike(collection)) {
  3467. var iteratee = baseIteratee(predicate, 3);
  3468. collection = keys(collection);
  3469. predicate = function (key) {
  3470. return iteratee(iterable[key], key, iterable);
  3471. };
  3472. }
  3473. var index = findIndexFunc(collection, predicate, fromIndex);
  3474. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  3475. };
  3476. }
  3477. module.exports = createFind;
  3478. });
  3479. $__System.registerDynamic('41', ['3a', '3b', '3c'], true, function ($__require, exports, module) {
  3480. var global = this || self,
  3481. GLOBAL = global;
  3482. var baseFindIndex = $__require('3a'),
  3483. baseIteratee = $__require('3b'),
  3484. toInteger = $__require('3c');
  3485. /* Built-in method references for those with the same name as other `lodash` methods. */
  3486. var nativeMax = Math.max,
  3487. nativeMin = Math.min;
  3488. /**
  3489. * This method is like `_.findIndex` except that it iterates over elements
  3490. * of `collection` from right to left.
  3491. *
  3492. * @static
  3493. * @memberOf _
  3494. * @since 2.0.0
  3495. * @category Array
  3496. * @param {Array} array The array to inspect.
  3497. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  3498. * @param {number} [fromIndex=array.length-1] The index to search from.
  3499. * @returns {number} Returns the index of the found element, else `-1`.
  3500. * @example
  3501. *
  3502. * var users = [
  3503. * { 'user': 'barney', 'active': true },
  3504. * { 'user': 'fred', 'active': false },
  3505. * { 'user': 'pebbles', 'active': false }
  3506. * ];
  3507. *
  3508. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  3509. * // => 2
  3510. *
  3511. * // The `_.matches` iteratee shorthand.
  3512. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  3513. * // => 0
  3514. *
  3515. * // The `_.matchesProperty` iteratee shorthand.
  3516. * _.findLastIndex(users, ['active', false]);
  3517. * // => 2
  3518. *
  3519. * // The `_.property` iteratee shorthand.
  3520. * _.findLastIndex(users, 'active');
  3521. * // => 0
  3522. */
  3523. function findLastIndex(array, predicate, fromIndex) {
  3524. var length = array == null ? 0 : array.length;
  3525. if (!length) {
  3526. return -1;
  3527. }
  3528. var index = length - 1;
  3529. if (fromIndex !== undefined) {
  3530. index = toInteger(fromIndex);
  3531. index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  3532. }
  3533. return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
  3534. }
  3535. module.exports = findLastIndex;
  3536. });
  3537. $__System.registerDynamic('42', ['3e', '41'], true, function ($__require, exports, module) {
  3538. var global = this || self,
  3539. GLOBAL = global;
  3540. var createFind = $__require('3e'),
  3541. findLastIndex = $__require('41');
  3542. /**
  3543. * This method is like `_.find` except that it iterates over elements of
  3544. * `collection` from right to left.
  3545. *
  3546. * @static
  3547. * @memberOf _
  3548. * @since 2.0.0
  3549. * @category Collection
  3550. * @param {Array|Object} collection The collection to inspect.
  3551. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  3552. * @param {number} [fromIndex=collection.length-1] The index to search from.
  3553. * @returns {*} Returns the matched element, else `undefined`.
  3554. * @example
  3555. *
  3556. * _.findLast([1, 2, 3, 4], function(n) {
  3557. * return n % 2 == 1;
  3558. * });
  3559. * // => 3
  3560. */
  3561. var findLast = createFind(findLastIndex);
  3562. module.exports = findLast;
  3563. });
  3564. $__System.registerDynamic('43', ['3c'], true, function ($__require, exports, module) {
  3565. var global = this || self,
  3566. GLOBAL = global;
  3567. var toInteger = $__require('3c');
  3568. /**
  3569. * Checks if `value` is an integer.
  3570. *
  3571. * **Note:** This method is based on
  3572. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  3573. *
  3574. * @static
  3575. * @memberOf _
  3576. * @since 4.0.0
  3577. * @category Lang
  3578. * @param {*} value The value to check.
  3579. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  3580. * @example
  3581. *
  3582. * _.isInteger(3);
  3583. * // => true
  3584. *
  3585. * _.isInteger(Number.MIN_VALUE);
  3586. * // => false
  3587. *
  3588. * _.isInteger(Infinity);
  3589. * // => false
  3590. *
  3591. * _.isInteger('3');
  3592. * // => false
  3593. */
  3594. function isInteger(value) {
  3595. return typeof value == 'number' && value == toInteger(value);
  3596. }
  3597. module.exports = isInteger;
  3598. });
  3599. $__System.registerDynamic('44', [], true, function ($__require, exports, module) {
  3600. 'use strict';
  3601. var global = this || self,
  3602. GLOBAL = global;
  3603. module.exports = function (str) {
  3604. var tail = str.length;
  3605. while (/[\s\uFEFF\u00A0]/.test(str[tail - 1])) {
  3606. tail--;
  3607. }
  3608. return str.slice(0, tail);
  3609. };
  3610. });
  3611. $__System.registerDynamic('19', ['@node/buffer'], true, function ($__require, exports, module) {
  3612. var global = this || self,
  3613. GLOBAL = global;
  3614. module.exports = $__require('@node/buffer').Buffer;
  3615. });
  3616. $__System.registerDynamic("45", ["1d", "44", "19"], true, function ($__require, exports, module) {
  3617. "use strict";
  3618. var Buffer = $__require("19");
  3619. var global = this || self,
  3620. GLOBAL = global;
  3621. exports.__esModule = true;
  3622. var _classCallCheck2 = $__require("1d");
  3623. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  3624. var _trimRight = $__require("44");
  3625. var _trimRight2 = _interopRequireDefault(_trimRight);
  3626. function _interopRequireDefault(obj) {
  3627. return obj && obj.__esModule ? obj : { default: obj };
  3628. }
  3629. var SPACES_RE = /^[ \t]+$/;
  3630. var Buffer = function () {
  3631. function Buffer(map) {
  3632. (0, _classCallCheck3.default)(this, Buffer);
  3633. this._map = null;
  3634. this._buf = [];
  3635. this._last = "";
  3636. this._queue = [];
  3637. this._position = {
  3638. line: 1,
  3639. column: 0
  3640. };
  3641. this._sourcePosition = {
  3642. identifierName: null,
  3643. line: null,
  3644. column: null,
  3645. filename: null
  3646. };
  3647. this._map = map;
  3648. }
  3649. Buffer.prototype.get = function get() {
  3650. this._flush();
  3651. var map = this._map;
  3652. var result = {
  3653. code: (0, _trimRight2.default)(this._buf.join("")),
  3654. map: null,
  3655. rawMappings: map && map.getRawMappings()
  3656. };
  3657. if (map) {
  3658. Object.defineProperty(result, "map", {
  3659. configurable: true,
  3660. enumerable: true,
  3661. get: function get() {
  3662. return this.map = map.get();
  3663. },
  3664. set: function set(value) {
  3665. Object.defineProperty(this, "map", { value: value, writable: true });
  3666. }
  3667. });
  3668. }
  3669. return result;
  3670. };
  3671. Buffer.prototype.append = function append(str) {
  3672. this._flush();
  3673. var _sourcePosition = this._sourcePosition,
  3674. line = _sourcePosition.line,
  3675. column = _sourcePosition.column,
  3676. filename = _sourcePosition.filename,
  3677. identifierName = _sourcePosition.identifierName;
  3678. this._append(str, line, column, identifierName, filename);
  3679. };
  3680. Buffer.prototype.queue = function queue(str) {
  3681. if (str === "\n") while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
  3682. this._queue.shift();
  3683. }var _sourcePosition2 = this._sourcePosition,
  3684. line = _sourcePosition2.line,
  3685. column = _sourcePosition2.column,
  3686. filename = _sourcePosition2.filename,
  3687. identifierName = _sourcePosition2.identifierName;
  3688. this._queue.unshift([str, line, column, identifierName, filename]);
  3689. };
  3690. Buffer.prototype._flush = function _flush() {
  3691. var item = void 0;
  3692. while (item = this._queue.pop()) {
  3693. this._append.apply(this, item);
  3694. }
  3695. };
  3696. Buffer.prototype._append = function _append(str, line, column, identifierName, filename) {
  3697. if (this._map && str[0] !== "\n") {
  3698. this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename);
  3699. }
  3700. this._buf.push(str);
  3701. this._last = str[str.length - 1];
  3702. for (var i = 0; i < str.length; i++) {
  3703. if (str[i] === "\n") {
  3704. this._position.line++;
  3705. this._position.column = 0;
  3706. } else {
  3707. this._position.column++;
  3708. }
  3709. }
  3710. };
  3711. Buffer.prototype.removeTrailingNewline = function removeTrailingNewline() {
  3712. if (this._queue.length > 0 && this._queue[0][0] === "\n") this._queue.shift();
  3713. };
  3714. Buffer.prototype.removeLastSemicolon = function removeLastSemicolon() {
  3715. if (this._queue.length > 0 && this._queue[0][0] === ";") this._queue.shift();
  3716. };
  3717. Buffer.prototype.endsWith = function endsWith(suffix) {
  3718. if (suffix.length === 1) {
  3719. var last = void 0;
  3720. if (this._queue.length > 0) {
  3721. var str = this._queue[0][0];
  3722. last = str[str.length - 1];
  3723. } else {
  3724. last = this._last;
  3725. }
  3726. return last === suffix;
  3727. }
  3728. var end = this._last + this._queue.reduce(function (acc, item) {
  3729. return item[0] + acc;
  3730. }, "");
  3731. if (suffix.length <= end.length) {
  3732. return end.slice(-suffix.length) === suffix;
  3733. }
  3734. return false;
  3735. };
  3736. Buffer.prototype.hasContent = function hasContent() {
  3737. return this._queue.length > 0 || !!this._last;
  3738. };
  3739. Buffer.prototype.source = function source(prop, loc) {
  3740. if (prop && !loc) return;
  3741. var pos = loc ? loc[prop] : null;
  3742. this._sourcePosition.identifierName = loc && loc.identifierName || null;
  3743. this._sourcePosition.line = pos ? pos.line : null;
  3744. this._sourcePosition.column = pos ? pos.column : null;
  3745. this._sourcePosition.filename = loc && loc.filename || null;
  3746. };
  3747. Buffer.prototype.withSource = function withSource(prop, loc, cb) {
  3748. if (!this._map) return cb();
  3749. var originalLine = this._sourcePosition.line;
  3750. var originalColumn = this._sourcePosition.column;
  3751. var originalFilename = this._sourcePosition.filename;
  3752. var originalIdentifierName = this._sourcePosition.identifierName;
  3753. this.source(prop, loc);
  3754. cb();
  3755. this._sourcePosition.line = originalLine;
  3756. this._sourcePosition.column = originalColumn;
  3757. this._sourcePosition.filename = originalFilename;
  3758. this._sourcePosition.identifierName = originalIdentifierName;
  3759. };
  3760. Buffer.prototype.getCurrentColumn = function getCurrentColumn() {
  3761. var extra = this._queue.reduce(function (acc, item) {
  3762. return item[0] + acc;
  3763. }, "");
  3764. var lastIndex = extra.lastIndexOf("\n");
  3765. return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
  3766. };
  3767. Buffer.prototype.getCurrentLine = function getCurrentLine() {
  3768. var extra = this._queue.reduce(function (acc, item) {
  3769. return item[0] + acc;
  3770. }, "");
  3771. var count = 0;
  3772. for (var i = 0; i < extra.length; i++) {
  3773. if (extra[i] === "\n") count++;
  3774. }
  3775. return this._position.line + count;
  3776. };
  3777. return Buffer;
  3778. }();
  3779. exports.default = Buffer;
  3780. module.exports = exports["default"];
  3781. });
  3782. $__System.registerDynamic("46", ["1d"], true, function ($__require, exports, module) {
  3783. "use strict";
  3784. var global = this || self,
  3785. GLOBAL = global;
  3786. exports.__esModule = true;
  3787. var _classCallCheck2 = $__require("1d");
  3788. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  3789. function _interopRequireDefault(obj) {
  3790. return obj && obj.__esModule ? obj : { default: obj };
  3791. }
  3792. var Whitespace = function () {
  3793. function Whitespace(tokens) {
  3794. (0, _classCallCheck3.default)(this, Whitespace);
  3795. this.tokens = tokens;
  3796. this.used = {};
  3797. }
  3798. Whitespace.prototype.getNewlinesBefore = function getNewlinesBefore(node) {
  3799. var startToken = void 0;
  3800. var endToken = void 0;
  3801. var tokens = this.tokens;
  3802. var index = this._findToken(function (token) {
  3803. return token.start - node.start;
  3804. }, 0, tokens.length);
  3805. if (index >= 0) {
  3806. while (index && node.start === tokens[index - 1].start) {
  3807. --index;
  3808. }startToken = tokens[index - 1];
  3809. endToken = tokens[index];
  3810. }
  3811. return this._getNewlinesBetween(startToken, endToken);
  3812. };
  3813. Whitespace.prototype.getNewlinesAfter = function getNewlinesAfter(node) {
  3814. var startToken = void 0;
  3815. var endToken = void 0;
  3816. var tokens = this.tokens;
  3817. var index = this._findToken(function (token) {
  3818. return token.end - node.end;
  3819. }, 0, tokens.length);
  3820. if (index >= 0) {
  3821. while (index && node.end === tokens[index - 1].end) {
  3822. --index;
  3823. }startToken = tokens[index];
  3824. endToken = tokens[index + 1];
  3825. if (endToken.type.label === ",") endToken = tokens[index + 2];
  3826. }
  3827. if (endToken && endToken.type.label === "eof") {
  3828. return 1;
  3829. } else {
  3830. return this._getNewlinesBetween(startToken, endToken);
  3831. }
  3832. };
  3833. Whitespace.prototype._getNewlinesBetween = function _getNewlinesBetween(startToken, endToken) {
  3834. if (!endToken || !endToken.loc) return 0;
  3835. var start = startToken ? startToken.loc.end.line : 1;
  3836. var end = endToken.loc.start.line;
  3837. var lines = 0;
  3838. for (var line = start; line < end; line++) {
  3839. if (typeof this.used[line] === "undefined") {
  3840. this.used[line] = true;
  3841. lines++;
  3842. }
  3843. }
  3844. return lines;
  3845. };
  3846. Whitespace.prototype._findToken = function _findToken(test, start, end) {
  3847. if (start >= end) return -1;
  3848. var middle = start + end >>> 1;
  3849. var match = test(this.tokens[middle]);
  3850. if (match < 0) {
  3851. return this._findToken(test, middle + 1, end);
  3852. } else if (match > 0) {
  3853. return this._findToken(test, start, middle);
  3854. } else if (match === 0) {
  3855. return middle;
  3856. }
  3857. return -1;
  3858. };
  3859. return Whitespace;
  3860. }();
  3861. exports.default = Whitespace;
  3862. module.exports = exports["default"];
  3863. });
  3864. $__System.registerDynamic("47", [], true, function ($__require, exports, module) {
  3865. "use strict";
  3866. var global = this || self,
  3867. GLOBAL = global;
  3868. exports.__esModule = true;
  3869. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  3870. exports.TemplateElement = TemplateElement;
  3871. exports.TemplateLiteral = TemplateLiteral;
  3872. function TaggedTemplateExpression(node) {
  3873. this.print(node.tag, node);
  3874. this.print(node.quasi, node);
  3875. }
  3876. function TemplateElement(node, parent) {
  3877. var isFirst = parent.quasis[0] === node;
  3878. var isLast = parent.quasis[parent.quasis.length - 1] === node;
  3879. var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
  3880. this.token(value);
  3881. }
  3882. function TemplateLiteral(node) {
  3883. var quasis = node.quasis;
  3884. for (var i = 0; i < quasis.length; i++) {
  3885. this.print(quasis[i], node);
  3886. if (i + 1 < quasis.length) {
  3887. this.print(node.expressions[i], node);
  3888. }
  3889. }
  3890. }
  3891. });
  3892. $__System.registerDynamic('48', ['49', '3b', '4a', '4b'], true, function ($__require, exports, module) {
  3893. var global = this || self,
  3894. GLOBAL = global;
  3895. var arrayMap = $__require('49'),
  3896. baseIteratee = $__require('3b'),
  3897. baseMap = $__require('4a'),
  3898. isArray = $__require('4b');
  3899. /**
  3900. * Creates an array of values by running each element in `collection` thru
  3901. * `iteratee`. The iteratee is invoked with three arguments:
  3902. * (value, index|key, collection).
  3903. *
  3904. * Many lodash methods are guarded to work as iteratees for methods like
  3905. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  3906. *
  3907. * The guarded methods are:
  3908. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  3909. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  3910. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  3911. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  3912. *
  3913. * @static
  3914. * @memberOf _
  3915. * @since 0.1.0
  3916. * @category Collection
  3917. * @param {Array|Object} collection The collection to iterate over.
  3918. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  3919. * @returns {Array} Returns the new mapped array.
  3920. * @example
  3921. *
  3922. * function square(n) {
  3923. * return n * n;
  3924. * }
  3925. *
  3926. * _.map([4, 8], square);
  3927. * // => [16, 64]
  3928. *
  3929. * _.map({ 'a': 4, 'b': 8 }, square);
  3930. * // => [16, 64] (iteration order is not guaranteed)
  3931. *
  3932. * var users = [
  3933. * { 'user': 'barney' },
  3934. * { 'user': 'fred' }
  3935. * ];
  3936. *
  3937. * // The `_.property` iteratee shorthand.
  3938. * _.map(users, 'user');
  3939. * // => ['barney', 'fred']
  3940. */
  3941. function map(collection, iteratee) {
  3942. var func = isArray(collection) ? arrayMap : baseMap;
  3943. return func(collection, baseIteratee(iteratee, 3));
  3944. }
  3945. module.exports = map;
  3946. });
  3947. $__System.registerDynamic("4c", ["48", "11"], true, function ($__require, exports, module) {
  3948. "use strict";
  3949. var global = this || self,
  3950. GLOBAL = global;
  3951. var _map = $__require("48");
  3952. var _map2 = _interopRequireDefault(_map);
  3953. var _babelTypes = $__require("11");
  3954. var t = _interopRequireWildcard(_babelTypes);
  3955. function _interopRequireWildcard(obj) {
  3956. if (obj && obj.__esModule) {
  3957. return obj;
  3958. } else {
  3959. var newObj = {};if (obj != null) {
  3960. for (var key in obj) {
  3961. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  3962. }
  3963. }newObj.default = obj;return newObj;
  3964. }
  3965. }
  3966. function _interopRequireDefault(obj) {
  3967. return obj && obj.__esModule ? obj : { default: obj };
  3968. }
  3969. function crawl(node) {
  3970. var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3971. if (t.isMemberExpression(node)) {
  3972. crawl(node.object, state);
  3973. if (node.computed) crawl(node.property, state);
  3974. } else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
  3975. crawl(node.left, state);
  3976. crawl(node.right, state);
  3977. } else if (t.isCallExpression(node)) {
  3978. state.hasCall = true;
  3979. crawl(node.callee, state);
  3980. } else if (t.isFunction(node)) {
  3981. state.hasFunction = true;
  3982. } else if (t.isIdentifier(node)) {
  3983. state.hasHelper = state.hasHelper || isHelper(node.callee);
  3984. }
  3985. return state;
  3986. }
  3987. function isHelper(node) {
  3988. if (t.isMemberExpression(node)) {
  3989. return isHelper(node.object) || isHelper(node.property);
  3990. } else if (t.isIdentifier(node)) {
  3991. return node.name === "require" || node.name[0] === "_";
  3992. } else if (t.isCallExpression(node)) {
  3993. return isHelper(node.callee);
  3994. } else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
  3995. return t.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
  3996. } else {
  3997. return false;
  3998. }
  3999. }
  4000. function isType(node) {
  4001. return t.isLiteral(node) || t.isObjectExpression(node) || t.isArrayExpression(node) || t.isIdentifier(node) || t.isMemberExpression(node);
  4002. }
  4003. exports.nodes = {
  4004. AssignmentExpression: function AssignmentExpression(node) {
  4005. var state = crawl(node.right);
  4006. if (state.hasCall && state.hasHelper || state.hasFunction) {
  4007. return {
  4008. before: state.hasFunction,
  4009. after: true
  4010. };
  4011. }
  4012. },
  4013. SwitchCase: function SwitchCase(node, parent) {
  4014. return {
  4015. before: node.consequent.length || parent.cases[0] === node
  4016. };
  4017. },
  4018. LogicalExpression: function LogicalExpression(node) {
  4019. if (t.isFunction(node.left) || t.isFunction(node.right)) {
  4020. return {
  4021. after: true
  4022. };
  4023. }
  4024. },
  4025. Literal: function Literal(node) {
  4026. if (node.value === "use strict") {
  4027. return {
  4028. after: true
  4029. };
  4030. }
  4031. },
  4032. CallExpression: function CallExpression(node) {
  4033. if (t.isFunction(node.callee) || isHelper(node)) {
  4034. return {
  4035. before: true,
  4036. after: true
  4037. };
  4038. }
  4039. },
  4040. VariableDeclaration: function VariableDeclaration(node) {
  4041. for (var i = 0; i < node.declarations.length; i++) {
  4042. var declar = node.declarations[i];
  4043. var enabled = isHelper(declar.id) && !isType(declar.init);
  4044. if (!enabled) {
  4045. var state = crawl(declar.init);
  4046. enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
  4047. }
  4048. if (enabled) {
  4049. return {
  4050. before: true,
  4051. after: true
  4052. };
  4053. }
  4054. }
  4055. },
  4056. IfStatement: function IfStatement(node) {
  4057. if (t.isBlockStatement(node.consequent)) {
  4058. return {
  4059. before: true,
  4060. after: true
  4061. };
  4062. }
  4063. }
  4064. };
  4065. exports.nodes.ObjectProperty = exports.nodes.ObjectTypeProperty = exports.nodes.ObjectMethod = exports.nodes.SpreadProperty = function (node, parent) {
  4066. if (parent.properties[0] === node) {
  4067. return {
  4068. before: true
  4069. };
  4070. }
  4071. };
  4072. exports.list = {
  4073. VariableDeclaration: function VariableDeclaration(node) {
  4074. return (0, _map2.default)(node.declarations, "init");
  4075. },
  4076. ArrayExpression: function ArrayExpression(node) {
  4077. return node.elements;
  4078. },
  4079. ObjectExpression: function ObjectExpression(node) {
  4080. return node.properties;
  4081. }
  4082. };
  4083. [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) {
  4084. var type = _ref[0],
  4085. amounts = _ref[1];
  4086. if (typeof amounts === "boolean") {
  4087. amounts = { after: amounts, before: amounts };
  4088. }
  4089. [type].concat(t.FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
  4090. exports.nodes[type] = function () {
  4091. return amounts;
  4092. };
  4093. });
  4094. });
  4095. });
  4096. $__System.registerDynamic("4d", ["11"], true, function ($__require, exports, module) {
  4097. "use strict";
  4098. var global = this || self,
  4099. GLOBAL = global;
  4100. exports.__esModule = true;
  4101. exports.AwaitExpression = exports.FunctionTypeAnnotation = undefined;
  4102. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  4103. exports.UpdateExpression = UpdateExpression;
  4104. exports.ObjectExpression = ObjectExpression;
  4105. exports.DoExpression = DoExpression;
  4106. exports.Binary = Binary;
  4107. exports.BinaryExpression = BinaryExpression;
  4108. exports.SequenceExpression = SequenceExpression;
  4109. exports.YieldExpression = YieldExpression;
  4110. exports.ClassExpression = ClassExpression;
  4111. exports.UnaryLike = UnaryLike;
  4112. exports.FunctionExpression = FunctionExpression;
  4113. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  4114. exports.ConditionalExpression = ConditionalExpression;
  4115. exports.AssignmentExpression = AssignmentExpression;
  4116. var _babelTypes = $__require("11");
  4117. var t = _interopRequireWildcard(_babelTypes);
  4118. function _interopRequireWildcard(obj) {
  4119. if (obj && obj.__esModule) {
  4120. return obj;
  4121. } else {
  4122. var newObj = {};if (obj != null) {
  4123. for (var key in obj) {
  4124. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  4125. }
  4126. }newObj.default = obj;return newObj;
  4127. }
  4128. }
  4129. var PRECEDENCE = {
  4130. "||": 0,
  4131. "&&": 1,
  4132. "|": 2,
  4133. "^": 3,
  4134. "&": 4,
  4135. "==": 5,
  4136. "===": 5,
  4137. "!=": 5,
  4138. "!==": 5,
  4139. "<": 6,
  4140. ">": 6,
  4141. "<=": 6,
  4142. ">=": 6,
  4143. in: 6,
  4144. instanceof: 6,
  4145. ">>": 7,
  4146. "<<": 7,
  4147. ">>>": 7,
  4148. "+": 8,
  4149. "-": 8,
  4150. "*": 9,
  4151. "/": 9,
  4152. "%": 9,
  4153. "**": 10
  4154. };
  4155. function NullableTypeAnnotation(node, parent) {
  4156. return t.isArrayTypeAnnotation(parent);
  4157. }
  4158. exports.FunctionTypeAnnotation = NullableTypeAnnotation;
  4159. function UpdateExpression(node, parent) {
  4160. return t.isMemberExpression(parent) && parent.object === node;
  4161. }
  4162. function ObjectExpression(node, parent, printStack) {
  4163. return isFirstInStatement(printStack, { considerArrow: true });
  4164. }
  4165. function DoExpression(node, parent, printStack) {
  4166. return isFirstInStatement(printStack);
  4167. }
  4168. function Binary(node, parent) {
  4169. if ((t.isCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node || t.isUnaryLike(parent) || t.isMemberExpression(parent) && parent.object === node || t.isAwaitExpression(parent)) {
  4170. return true;
  4171. }
  4172. if (t.isBinary(parent)) {
  4173. var parentOp = parent.operator;
  4174. var parentPos = PRECEDENCE[parentOp];
  4175. var nodeOp = node.operator;
  4176. var nodePos = PRECEDENCE[nodeOp];
  4177. if (parentPos === nodePos && parent.right === node && !t.isLogicalExpression(parent) || parentPos > nodePos) {
  4178. return true;
  4179. }
  4180. }
  4181. return false;
  4182. }
  4183. function BinaryExpression(node, parent) {
  4184. return node.operator === "in" && (t.isVariableDeclarator(parent) || t.isFor(parent));
  4185. }
  4186. function SequenceExpression(node, parent) {
  4187. if (t.isForStatement(parent) || t.isThrowStatement(parent) || t.isReturnStatement(parent) || t.isIfStatement(parent) && parent.test === node || t.isWhileStatement(parent) && parent.test === node || t.isForInStatement(parent) && parent.right === node || t.isSwitchStatement(parent) && parent.discriminant === node || t.isExpressionStatement(parent) && parent.expression === node) {
  4188. return false;
  4189. }
  4190. return true;
  4191. }
  4192. function YieldExpression(node, parent) {
  4193. return t.isBinary(parent) || t.isUnaryLike(parent) || t.isCallExpression(parent) || t.isMemberExpression(parent) || t.isNewExpression(parent) || t.isConditionalExpression(parent) && node === parent.test;
  4194. }
  4195. exports.AwaitExpression = YieldExpression;
  4196. function ClassExpression(node, parent, printStack) {
  4197. return isFirstInStatement(printStack, { considerDefaultExports: true });
  4198. }
  4199. function UnaryLike(node, parent) {
  4200. return t.isMemberExpression(parent, { object: node }) || t.isCallExpression(parent, { callee: node }) || t.isNewExpression(parent, { callee: node });
  4201. }
  4202. function FunctionExpression(node, parent, printStack) {
  4203. return isFirstInStatement(printStack, { considerDefaultExports: true });
  4204. }
  4205. function ArrowFunctionExpression(node, parent) {
  4206. if (t.isExportDeclaration(parent) || t.isBinaryExpression(parent) || t.isLogicalExpression(parent) || t.isUnaryExpression(parent) || t.isTaggedTemplateExpression(parent)) {
  4207. return true;
  4208. }
  4209. return UnaryLike(node, parent);
  4210. }
  4211. function ConditionalExpression(node, parent) {
  4212. if (t.isUnaryLike(parent) || t.isBinary(parent) || t.isConditionalExpression(parent, { test: node }) || t.isAwaitExpression(parent)) {
  4213. return true;
  4214. }
  4215. return UnaryLike(node, parent);
  4216. }
  4217. function AssignmentExpression(node) {
  4218. if (t.isObjectPattern(node.left)) {
  4219. return true;
  4220. } else {
  4221. return ConditionalExpression.apply(undefined, arguments);
  4222. }
  4223. }
  4224. function isFirstInStatement(printStack) {
  4225. var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  4226. _ref$considerArrow = _ref.considerArrow,
  4227. considerArrow = _ref$considerArrow === undefined ? false : _ref$considerArrow,
  4228. _ref$considerDefaultE = _ref.considerDefaultExports,
  4229. considerDefaultExports = _ref$considerDefaultE === undefined ? false : _ref$considerDefaultE;
  4230. var i = printStack.length - 1;
  4231. var node = printStack[i];
  4232. i--;
  4233. var parent = printStack[i];
  4234. while (i > 0) {
  4235. if (t.isExpressionStatement(parent, { expression: node }) || t.isTaggedTemplateExpression(parent) || considerDefaultExports && t.isExportDefaultDeclaration(parent, { declaration: node }) || considerArrow && t.isArrowFunctionExpression(parent, { body: node })) {
  4236. return true;
  4237. }
  4238. if (t.isCallExpression(parent, { callee: node }) || t.isSequenceExpression(parent) && parent.expressions[0] === node || t.isMemberExpression(parent, { object: node }) || t.isConditional(parent, { test: node }) || t.isBinary(parent, { left: node }) || t.isAssignmentExpression(parent, { left: node })) {
  4239. node = parent;
  4240. i--;
  4241. parent = printStack[i];
  4242. } else {
  4243. return false;
  4244. }
  4245. }
  4246. return false;
  4247. }
  4248. });
  4249. $__System.registerDynamic("4e", ["17", "15", "4c", "4d", "11"], true, function ($__require, exports, module) {
  4250. "use strict";
  4251. var global = this || self,
  4252. GLOBAL = global;
  4253. exports.__esModule = true;
  4254. var _getIterator2 = $__require("17");
  4255. var _getIterator3 = _interopRequireDefault(_getIterator2);
  4256. var _keys = $__require("15");
  4257. var _keys2 = _interopRequireDefault(_keys);
  4258. exports.needsWhitespace = needsWhitespace;
  4259. exports.needsWhitespaceBefore = needsWhitespaceBefore;
  4260. exports.needsWhitespaceAfter = needsWhitespaceAfter;
  4261. exports.needsParens = needsParens;
  4262. var _whitespace = $__require("4c");
  4263. var _whitespace2 = _interopRequireDefault(_whitespace);
  4264. var _parentheses = $__require("4d");
  4265. var parens = _interopRequireWildcard(_parentheses);
  4266. var _babelTypes = $__require("11");
  4267. var t = _interopRequireWildcard(_babelTypes);
  4268. function _interopRequireWildcard(obj) {
  4269. if (obj && obj.__esModule) {
  4270. return obj;
  4271. } else {
  4272. var newObj = {};if (obj != null) {
  4273. for (var key in obj) {
  4274. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  4275. }
  4276. }newObj.default = obj;return newObj;
  4277. }
  4278. }
  4279. function _interopRequireDefault(obj) {
  4280. return obj && obj.__esModule ? obj : { default: obj };
  4281. }
  4282. function expandAliases(obj) {
  4283. var newObj = {};
  4284. function add(type, func) {
  4285. var fn = newObj[type];
  4286. newObj[type] = fn ? function (node, parent, stack) {
  4287. var result = fn(node, parent, stack);
  4288. return result == null ? func(node, parent, stack) : result;
  4289. } : func;
  4290. }
  4291. for (var _iterator = (0, _keys2.default)(obj), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  4292. var _ref;
  4293. if (_isArray) {
  4294. if (_i >= _iterator.length) break;
  4295. _ref = _iterator[_i++];
  4296. } else {
  4297. _i = _iterator.next();
  4298. if (_i.done) break;
  4299. _ref = _i.value;
  4300. }
  4301. var type = _ref;
  4302. var aliases = t.FLIPPED_ALIAS_KEYS[type];
  4303. if (aliases) {
  4304. for (var _iterator2 = aliases, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  4305. var _ref2;
  4306. if (_isArray2) {
  4307. if (_i2 >= _iterator2.length) break;
  4308. _ref2 = _iterator2[_i2++];
  4309. } else {
  4310. _i2 = _iterator2.next();
  4311. if (_i2.done) break;
  4312. _ref2 = _i2.value;
  4313. }
  4314. var alias = _ref2;
  4315. add(alias, obj[type]);
  4316. }
  4317. } else {
  4318. add(type, obj[type]);
  4319. }
  4320. }
  4321. return newObj;
  4322. }
  4323. var expandedParens = expandAliases(parens);
  4324. var expandedWhitespaceNodes = expandAliases(_whitespace2.default.nodes);
  4325. var expandedWhitespaceList = expandAliases(_whitespace2.default.list);
  4326. function find(obj, node, parent, printStack) {
  4327. var fn = obj[node.type];
  4328. return fn ? fn(node, parent, printStack) : null;
  4329. }
  4330. function isOrHasCallExpression(node) {
  4331. if (t.isCallExpression(node)) {
  4332. return true;
  4333. }
  4334. if (t.isMemberExpression(node)) {
  4335. return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property);
  4336. } else {
  4337. return false;
  4338. }
  4339. }
  4340. function needsWhitespace(node, parent, type) {
  4341. if (!node) return 0;
  4342. if (t.isExpressionStatement(node)) {
  4343. node = node.expression;
  4344. }
  4345. var linesInfo = find(expandedWhitespaceNodes, node, parent);
  4346. if (!linesInfo) {
  4347. var items = find(expandedWhitespaceList, node, parent);
  4348. if (items) {
  4349. for (var i = 0; i < items.length; i++) {
  4350. linesInfo = needsWhitespace(items[i], node, type);
  4351. if (linesInfo) break;
  4352. }
  4353. }
  4354. }
  4355. return linesInfo && linesInfo[type] || 0;
  4356. }
  4357. function needsWhitespaceBefore(node, parent) {
  4358. return needsWhitespace(node, parent, "before");
  4359. }
  4360. function needsWhitespaceAfter(node, parent) {
  4361. return needsWhitespace(node, parent, "after");
  4362. }
  4363. function needsParens(node, parent, printStack) {
  4364. if (!parent) return false;
  4365. if (t.isNewExpression(parent) && parent.callee === node) {
  4366. if (isOrHasCallExpression(node)) return true;
  4367. }
  4368. return find(expandedParens, node, parent, printStack);
  4369. }
  4370. });
  4371. $__System.registerDynamic("4f", ["11", "4e"], true, function ($__require, exports, module) {
  4372. "use strict";
  4373. var global = this || self,
  4374. GLOBAL = global;
  4375. exports.__esModule = true;
  4376. exports.LogicalExpression = exports.BinaryExpression = exports.AwaitExpression = exports.YieldExpression = undefined;
  4377. exports.UnaryExpression = UnaryExpression;
  4378. exports.DoExpression = DoExpression;
  4379. exports.ParenthesizedExpression = ParenthesizedExpression;
  4380. exports.UpdateExpression = UpdateExpression;
  4381. exports.ConditionalExpression = ConditionalExpression;
  4382. exports.NewExpression = NewExpression;
  4383. exports.SequenceExpression = SequenceExpression;
  4384. exports.ThisExpression = ThisExpression;
  4385. exports.Super = Super;
  4386. exports.Decorator = Decorator;
  4387. exports.CallExpression = CallExpression;
  4388. exports.Import = Import;
  4389. exports.EmptyStatement = EmptyStatement;
  4390. exports.ExpressionStatement = ExpressionStatement;
  4391. exports.AssignmentPattern = AssignmentPattern;
  4392. exports.AssignmentExpression = AssignmentExpression;
  4393. exports.BindExpression = BindExpression;
  4394. exports.MemberExpression = MemberExpression;
  4395. exports.MetaProperty = MetaProperty;
  4396. var _babelTypes = $__require("11");
  4397. var t = _interopRequireWildcard(_babelTypes);
  4398. var _node = $__require("4e");
  4399. var n = _interopRequireWildcard(_node);
  4400. function _interopRequireWildcard(obj) {
  4401. if (obj && obj.__esModule) {
  4402. return obj;
  4403. } else {
  4404. var newObj = {};if (obj != null) {
  4405. for (var key in obj) {
  4406. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  4407. }
  4408. }newObj.default = obj;return newObj;
  4409. }
  4410. }
  4411. function UnaryExpression(node) {
  4412. if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof") {
  4413. this.word(node.operator);
  4414. this.space();
  4415. } else {
  4416. this.token(node.operator);
  4417. }
  4418. this.print(node.argument, node);
  4419. }
  4420. function DoExpression(node) {
  4421. this.word("do");
  4422. this.space();
  4423. this.print(node.body, node);
  4424. }
  4425. function ParenthesizedExpression(node) {
  4426. this.token("(");
  4427. this.print(node.expression, node);
  4428. this.token(")");
  4429. }
  4430. function UpdateExpression(node) {
  4431. if (node.prefix) {
  4432. this.token(node.operator);
  4433. this.print(node.argument, node);
  4434. } else {
  4435. this.print(node.argument, node);
  4436. this.token(node.operator);
  4437. }
  4438. }
  4439. function ConditionalExpression(node) {
  4440. this.print(node.test, node);
  4441. this.space();
  4442. this.token("?");
  4443. this.space();
  4444. this.print(node.consequent, node);
  4445. this.space();
  4446. this.token(":");
  4447. this.space();
  4448. this.print(node.alternate, node);
  4449. }
  4450. function NewExpression(node, parent) {
  4451. this.word("new");
  4452. this.space();
  4453. this.print(node.callee, node);
  4454. if (node.arguments.length === 0 && this.format.minified && !t.isCallExpression(parent, { callee: node }) && !t.isMemberExpression(parent) && !t.isNewExpression(parent)) return;
  4455. this.token("(");
  4456. this.printList(node.arguments, node);
  4457. this.token(")");
  4458. }
  4459. function SequenceExpression(node) {
  4460. this.printList(node.expressions, node);
  4461. }
  4462. function ThisExpression() {
  4463. this.word("this");
  4464. }
  4465. function Super() {
  4466. this.word("super");
  4467. }
  4468. function Decorator(node) {
  4469. this.token("@");
  4470. this.print(node.expression, node);
  4471. this.newline();
  4472. }
  4473. function commaSeparatorNewline() {
  4474. this.token(",");
  4475. this.newline();
  4476. if (!this.endsWith("\n")) this.space();
  4477. }
  4478. function CallExpression(node) {
  4479. this.print(node.callee, node);
  4480. this.token("(");
  4481. var isPrettyCall = node._prettyCall;
  4482. var separator = void 0;
  4483. if (isPrettyCall) {
  4484. separator = commaSeparatorNewline;
  4485. this.newline();
  4486. this.indent();
  4487. }
  4488. this.printList(node.arguments, node, { separator: separator });
  4489. if (isPrettyCall) {
  4490. this.newline();
  4491. this.dedent();
  4492. }
  4493. this.token(")");
  4494. }
  4495. function Import() {
  4496. this.word("import");
  4497. }
  4498. function buildYieldAwait(keyword) {
  4499. return function (node) {
  4500. this.word(keyword);
  4501. if (node.delegate) {
  4502. this.token("*");
  4503. }
  4504. if (node.argument) {
  4505. this.space();
  4506. var terminatorState = this.startTerminatorless();
  4507. this.print(node.argument, node);
  4508. this.endTerminatorless(terminatorState);
  4509. }
  4510. };
  4511. }
  4512. var YieldExpression = exports.YieldExpression = buildYieldAwait("yield");
  4513. var AwaitExpression = exports.AwaitExpression = buildYieldAwait("await");
  4514. function EmptyStatement() {
  4515. this.semicolon(true);
  4516. }
  4517. function ExpressionStatement(node) {
  4518. this.print(node.expression, node);
  4519. this.semicolon();
  4520. }
  4521. function AssignmentPattern(node) {
  4522. this.print(node.left, node);
  4523. if (node.left.optional) this.token("?");
  4524. this.print(node.left.typeAnnotation, node);
  4525. this.space();
  4526. this.token("=");
  4527. this.space();
  4528. this.print(node.right, node);
  4529. }
  4530. function AssignmentExpression(node, parent) {
  4531. var parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
  4532. if (parens) {
  4533. this.token("(");
  4534. }
  4535. this.print(node.left, node);
  4536. this.space();
  4537. if (node.operator === "in" || node.operator === "instanceof") {
  4538. this.word(node.operator);
  4539. } else {
  4540. this.token(node.operator);
  4541. }
  4542. this.space();
  4543. this.print(node.right, node);
  4544. if (parens) {
  4545. this.token(")");
  4546. }
  4547. }
  4548. function BindExpression(node) {
  4549. this.print(node.object, node);
  4550. this.token("::");
  4551. this.print(node.callee, node);
  4552. }
  4553. exports.BinaryExpression = AssignmentExpression;
  4554. exports.LogicalExpression = AssignmentExpression;
  4555. function MemberExpression(node) {
  4556. this.print(node.object, node);
  4557. if (!node.computed && t.isMemberExpression(node.property)) {
  4558. throw new TypeError("Got a MemberExpression for MemberExpression property");
  4559. }
  4560. var computed = node.computed;
  4561. if (t.isLiteral(node.property) && typeof node.property.value === "number") {
  4562. computed = true;
  4563. }
  4564. if (computed) {
  4565. this.token("[");
  4566. this.print(node.property, node);
  4567. this.token("]");
  4568. } else {
  4569. this.token(".");
  4570. this.print(node.property, node);
  4571. }
  4572. }
  4573. function MetaProperty(node) {
  4574. this.print(node.meta, node);
  4575. this.token(".");
  4576. this.print(node.property, node);
  4577. }
  4578. });
  4579. $__System.registerDynamic("50", ["17", "11"], true, function ($__require, exports, module) {
  4580. "use strict";
  4581. var global = this || self,
  4582. GLOBAL = global;
  4583. exports.__esModule = true;
  4584. exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForAwaitStatement = exports.ForOfStatement = exports.ForInStatement = undefined;
  4585. var _getIterator2 = $__require("17");
  4586. var _getIterator3 = _interopRequireDefault(_getIterator2);
  4587. exports.WithStatement = WithStatement;
  4588. exports.IfStatement = IfStatement;
  4589. exports.ForStatement = ForStatement;
  4590. exports.WhileStatement = WhileStatement;
  4591. exports.DoWhileStatement = DoWhileStatement;
  4592. exports.LabeledStatement = LabeledStatement;
  4593. exports.TryStatement = TryStatement;
  4594. exports.CatchClause = CatchClause;
  4595. exports.SwitchStatement = SwitchStatement;
  4596. exports.SwitchCase = SwitchCase;
  4597. exports.DebuggerStatement = DebuggerStatement;
  4598. exports.VariableDeclaration = VariableDeclaration;
  4599. exports.VariableDeclarator = VariableDeclarator;
  4600. var _babelTypes = $__require("11");
  4601. var t = _interopRequireWildcard(_babelTypes);
  4602. function _interopRequireWildcard(obj) {
  4603. if (obj && obj.__esModule) {
  4604. return obj;
  4605. } else {
  4606. var newObj = {};if (obj != null) {
  4607. for (var key in obj) {
  4608. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  4609. }
  4610. }newObj.default = obj;return newObj;
  4611. }
  4612. }
  4613. function _interopRequireDefault(obj) {
  4614. return obj && obj.__esModule ? obj : { default: obj };
  4615. }
  4616. function WithStatement(node) {
  4617. this.word("with");
  4618. this.space();
  4619. this.token("(");
  4620. this.print(node.object, node);
  4621. this.token(")");
  4622. this.printBlock(node);
  4623. }
  4624. function IfStatement(node) {
  4625. this.word("if");
  4626. this.space();
  4627. this.token("(");
  4628. this.print(node.test, node);
  4629. this.token(")");
  4630. this.space();
  4631. var needsBlock = node.alternate && t.isIfStatement(getLastStatement(node.consequent));
  4632. if (needsBlock) {
  4633. this.token("{");
  4634. this.newline();
  4635. this.indent();
  4636. }
  4637. this.printAndIndentOnComments(node.consequent, node);
  4638. if (needsBlock) {
  4639. this.dedent();
  4640. this.newline();
  4641. this.token("}");
  4642. }
  4643. if (node.alternate) {
  4644. if (this.endsWith("}")) this.space();
  4645. this.word("else");
  4646. this.space();
  4647. this.printAndIndentOnComments(node.alternate, node);
  4648. }
  4649. }
  4650. function getLastStatement(statement) {
  4651. if (!t.isStatement(statement.body)) return statement;
  4652. return getLastStatement(statement.body);
  4653. }
  4654. function ForStatement(node) {
  4655. this.word("for");
  4656. this.space();
  4657. this.token("(");
  4658. this.inForStatementInitCounter++;
  4659. this.print(node.init, node);
  4660. this.inForStatementInitCounter--;
  4661. this.token(";");
  4662. if (node.test) {
  4663. this.space();
  4664. this.print(node.test, node);
  4665. }
  4666. this.token(";");
  4667. if (node.update) {
  4668. this.space();
  4669. this.print(node.update, node);
  4670. }
  4671. this.token(")");
  4672. this.printBlock(node);
  4673. }
  4674. function WhileStatement(node) {
  4675. this.word("while");
  4676. this.space();
  4677. this.token("(");
  4678. this.print(node.test, node);
  4679. this.token(")");
  4680. this.printBlock(node);
  4681. }
  4682. var buildForXStatement = function buildForXStatement(op) {
  4683. return function (node) {
  4684. this.word("for");
  4685. this.space();
  4686. if (op === "await") {
  4687. this.word("await");
  4688. this.space();
  4689. }
  4690. this.token("(");
  4691. this.print(node.left, node);
  4692. this.space();
  4693. this.word(op === "await" ? "of" : op);
  4694. this.space();
  4695. this.print(node.right, node);
  4696. this.token(")");
  4697. this.printBlock(node);
  4698. };
  4699. };
  4700. var ForInStatement = exports.ForInStatement = buildForXStatement("in");
  4701. var ForOfStatement = exports.ForOfStatement = buildForXStatement("of");
  4702. var ForAwaitStatement = exports.ForAwaitStatement = buildForXStatement("await");
  4703. function DoWhileStatement(node) {
  4704. this.word("do");
  4705. this.space();
  4706. this.print(node.body, node);
  4707. this.space();
  4708. this.word("while");
  4709. this.space();
  4710. this.token("(");
  4711. this.print(node.test, node);
  4712. this.token(")");
  4713. this.semicolon();
  4714. }
  4715. function buildLabelStatement(prefix) {
  4716. var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "label";
  4717. return function (node) {
  4718. this.word(prefix);
  4719. var label = node[key];
  4720. if (label) {
  4721. this.space();
  4722. var terminatorState = this.startTerminatorless();
  4723. this.print(label, node);
  4724. this.endTerminatorless(terminatorState);
  4725. }
  4726. this.semicolon();
  4727. };
  4728. }
  4729. var ContinueStatement = exports.ContinueStatement = buildLabelStatement("continue");
  4730. var ReturnStatement = exports.ReturnStatement = buildLabelStatement("return", "argument");
  4731. var BreakStatement = exports.BreakStatement = buildLabelStatement("break");
  4732. var ThrowStatement = exports.ThrowStatement = buildLabelStatement("throw", "argument");
  4733. function LabeledStatement(node) {
  4734. this.print(node.label, node);
  4735. this.token(":");
  4736. this.space();
  4737. this.print(node.body, node);
  4738. }
  4739. function TryStatement(node) {
  4740. this.word("try");
  4741. this.space();
  4742. this.print(node.block, node);
  4743. this.space();
  4744. if (node.handlers) {
  4745. this.print(node.handlers[0], node);
  4746. } else {
  4747. this.print(node.handler, node);
  4748. }
  4749. if (node.finalizer) {
  4750. this.space();
  4751. this.word("finally");
  4752. this.space();
  4753. this.print(node.finalizer, node);
  4754. }
  4755. }
  4756. function CatchClause(node) {
  4757. this.word("catch");
  4758. this.space();
  4759. this.token("(");
  4760. this.print(node.param, node);
  4761. this.token(")");
  4762. this.space();
  4763. this.print(node.body, node);
  4764. }
  4765. function SwitchStatement(node) {
  4766. this.word("switch");
  4767. this.space();
  4768. this.token("(");
  4769. this.print(node.discriminant, node);
  4770. this.token(")");
  4771. this.space();
  4772. this.token("{");
  4773. this.printSequence(node.cases, node, {
  4774. indent: true,
  4775. addNewlines: function addNewlines(leading, cas) {
  4776. if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
  4777. }
  4778. });
  4779. this.token("}");
  4780. }
  4781. function SwitchCase(node) {
  4782. if (node.test) {
  4783. this.word("case");
  4784. this.space();
  4785. this.print(node.test, node);
  4786. this.token(":");
  4787. } else {
  4788. this.word("default");
  4789. this.token(":");
  4790. }
  4791. if (node.consequent.length) {
  4792. this.newline();
  4793. this.printSequence(node.consequent, node, { indent: true });
  4794. }
  4795. }
  4796. function DebuggerStatement() {
  4797. this.word("debugger");
  4798. this.semicolon();
  4799. }
  4800. function variableDeclarationIdent() {
  4801. this.token(",");
  4802. this.newline();
  4803. if (this.endsWith("\n")) for (var i = 0; i < 4; i++) {
  4804. this.space(true);
  4805. }
  4806. }
  4807. function constDeclarationIdent() {
  4808. this.token(",");
  4809. this.newline();
  4810. if (this.endsWith("\n")) for (var i = 0; i < 6; i++) {
  4811. this.space(true);
  4812. }
  4813. }
  4814. function VariableDeclaration(node, parent) {
  4815. this.word(node.kind);
  4816. this.space();
  4817. var hasInits = false;
  4818. if (!t.isFor(parent)) {
  4819. for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  4820. var _ref;
  4821. if (_isArray) {
  4822. if (_i >= _iterator.length) break;
  4823. _ref = _iterator[_i++];
  4824. } else {
  4825. _i = _iterator.next();
  4826. if (_i.done) break;
  4827. _ref = _i.value;
  4828. }
  4829. var declar = _ref;
  4830. if (declar.init) {
  4831. hasInits = true;
  4832. }
  4833. }
  4834. }
  4835. var separator = void 0;
  4836. if (hasInits) {
  4837. separator = node.kind === "const" ? constDeclarationIdent : variableDeclarationIdent;
  4838. }
  4839. this.printList(node.declarations, node, { separator: separator });
  4840. if (t.isFor(parent)) {
  4841. if (parent.left === node || parent.init === node) return;
  4842. }
  4843. this.semicolon();
  4844. }
  4845. function VariableDeclarator(node) {
  4846. this.print(node.id, node);
  4847. this.print(node.id.typeAnnotation, node);
  4848. if (node.init) {
  4849. this.space();
  4850. this.token("=");
  4851. this.space();
  4852. this.print(node.init, node);
  4853. }
  4854. }
  4855. });
  4856. $__System.registerDynamic("51", [], true, function ($__require, exports, module) {
  4857. "use strict";
  4858. var global = this || self,
  4859. GLOBAL = global;
  4860. exports.__esModule = true;
  4861. exports.ClassDeclaration = ClassDeclaration;
  4862. exports.ClassBody = ClassBody;
  4863. exports.ClassProperty = ClassProperty;
  4864. exports.ClassMethod = ClassMethod;
  4865. function ClassDeclaration(node) {
  4866. this.printJoin(node.decorators, node);
  4867. this.word("class");
  4868. if (node.id) {
  4869. this.space();
  4870. this.print(node.id, node);
  4871. }
  4872. this.print(node.typeParameters, node);
  4873. if (node.superClass) {
  4874. this.space();
  4875. this.word("extends");
  4876. this.space();
  4877. this.print(node.superClass, node);
  4878. this.print(node.superTypeParameters, node);
  4879. }
  4880. if (node.implements) {
  4881. this.space();
  4882. this.word("implements");
  4883. this.space();
  4884. this.printList(node.implements, node);
  4885. }
  4886. this.space();
  4887. this.print(node.body, node);
  4888. }
  4889. exports.ClassExpression = ClassDeclaration;
  4890. function ClassBody(node) {
  4891. this.token("{");
  4892. this.printInnerComments(node);
  4893. if (node.body.length === 0) {
  4894. this.token("}");
  4895. } else {
  4896. this.newline();
  4897. this.indent();
  4898. this.printSequence(node.body, node);
  4899. this.dedent();
  4900. if (!this.endsWith("\n")) this.newline();
  4901. this.rightBrace();
  4902. }
  4903. }
  4904. function ClassProperty(node) {
  4905. this.printJoin(node.decorators, node);
  4906. if (node.static) {
  4907. this.word("static");
  4908. this.space();
  4909. }
  4910. if (node.computed) {
  4911. this.token("[");
  4912. this.print(node.key, node);
  4913. this.token("]");
  4914. } else {
  4915. this._variance(node);
  4916. this.print(node.key, node);
  4917. }
  4918. this.print(node.typeAnnotation, node);
  4919. if (node.value) {
  4920. this.space();
  4921. this.token("=");
  4922. this.space();
  4923. this.print(node.value, node);
  4924. }
  4925. this.semicolon();
  4926. }
  4927. function ClassMethod(node) {
  4928. this.printJoin(node.decorators, node);
  4929. if (node.static) {
  4930. this.word("static");
  4931. this.space();
  4932. }
  4933. if (node.kind === "constructorCall") {
  4934. this.word("call");
  4935. this.space();
  4936. }
  4937. this._method(node);
  4938. }
  4939. });
  4940. $__System.registerDynamic("52", ["11"], true, function ($__require, exports, module) {
  4941. "use strict";
  4942. var global = this || self,
  4943. GLOBAL = global;
  4944. exports.__esModule = true;
  4945. exports.FunctionDeclaration = undefined;
  4946. exports._params = _params;
  4947. exports._method = _method;
  4948. exports.FunctionExpression = FunctionExpression;
  4949. exports.ArrowFunctionExpression = ArrowFunctionExpression;
  4950. var _babelTypes = $__require("11");
  4951. var t = _interopRequireWildcard(_babelTypes);
  4952. function _interopRequireWildcard(obj) {
  4953. if (obj && obj.__esModule) {
  4954. return obj;
  4955. } else {
  4956. var newObj = {};if (obj != null) {
  4957. for (var key in obj) {
  4958. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  4959. }
  4960. }newObj.default = obj;return newObj;
  4961. }
  4962. }
  4963. function _params(node) {
  4964. var _this = this;
  4965. this.print(node.typeParameters, node);
  4966. this.token("(");
  4967. this.printList(node.params, node, {
  4968. iterator: function iterator(node) {
  4969. if (node.optional) _this.token("?");
  4970. _this.print(node.typeAnnotation, node);
  4971. }
  4972. });
  4973. this.token(")");
  4974. if (node.returnType) {
  4975. this.print(node.returnType, node);
  4976. }
  4977. }
  4978. function _method(node) {
  4979. var kind = node.kind;
  4980. var key = node.key;
  4981. if (kind === "method" || kind === "init") {
  4982. if (node.generator) {
  4983. this.token("*");
  4984. }
  4985. }
  4986. if (kind === "get" || kind === "set") {
  4987. this.word(kind);
  4988. this.space();
  4989. }
  4990. if (node.async) {
  4991. this.word("async");
  4992. this.space();
  4993. }
  4994. if (node.computed) {
  4995. this.token("[");
  4996. this.print(key, node);
  4997. this.token("]");
  4998. } else {
  4999. this.print(key, node);
  5000. }
  5001. this._params(node);
  5002. this.space();
  5003. this.print(node.body, node);
  5004. }
  5005. function FunctionExpression(node) {
  5006. if (node.async) {
  5007. this.word("async");
  5008. this.space();
  5009. }
  5010. this.word("function");
  5011. if (node.generator) this.token("*");
  5012. if (node.id) {
  5013. this.space();
  5014. this.print(node.id, node);
  5015. } else {
  5016. this.space();
  5017. }
  5018. this._params(node);
  5019. this.space();
  5020. this.print(node.body, node);
  5021. }
  5022. exports.FunctionDeclaration = FunctionExpression;
  5023. function ArrowFunctionExpression(node) {
  5024. if (node.async) {
  5025. this.word("async");
  5026. this.space();
  5027. }
  5028. var firstParam = node.params[0];
  5029. if (node.params.length === 1 && t.isIdentifier(firstParam) && !hasTypes(node, firstParam)) {
  5030. this.print(firstParam, node);
  5031. } else {
  5032. this._params(node);
  5033. }
  5034. this.space();
  5035. this.token("=>");
  5036. this.space();
  5037. this.print(node.body, node);
  5038. }
  5039. function hasTypes(node, param) {
  5040. return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments;
  5041. }
  5042. });
  5043. $__System.registerDynamic("53", ["11"], true, function ($__require, exports, module) {
  5044. "use strict";
  5045. var global = this || self,
  5046. GLOBAL = global;
  5047. exports.__esModule = true;
  5048. exports.ImportSpecifier = ImportSpecifier;
  5049. exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
  5050. exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
  5051. exports.ExportSpecifier = ExportSpecifier;
  5052. exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
  5053. exports.ExportAllDeclaration = ExportAllDeclaration;
  5054. exports.ExportNamedDeclaration = ExportNamedDeclaration;
  5055. exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
  5056. exports.ImportDeclaration = ImportDeclaration;
  5057. exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
  5058. var _babelTypes = $__require("11");
  5059. var t = _interopRequireWildcard(_babelTypes);
  5060. function _interopRequireWildcard(obj) {
  5061. if (obj && obj.__esModule) {
  5062. return obj;
  5063. } else {
  5064. var newObj = {};if (obj != null) {
  5065. for (var key in obj) {
  5066. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  5067. }
  5068. }newObj.default = obj;return newObj;
  5069. }
  5070. }
  5071. function ImportSpecifier(node) {
  5072. if (node.importKind === "type" || node.importKind === "typeof") {
  5073. this.word(node.importKind);
  5074. this.space();
  5075. }
  5076. this.print(node.imported, node);
  5077. if (node.local && node.local.name !== node.imported.name) {
  5078. this.space();
  5079. this.word("as");
  5080. this.space();
  5081. this.print(node.local, node);
  5082. }
  5083. }
  5084. function ImportDefaultSpecifier(node) {
  5085. this.print(node.local, node);
  5086. }
  5087. function ExportDefaultSpecifier(node) {
  5088. this.print(node.exported, node);
  5089. }
  5090. function ExportSpecifier(node) {
  5091. this.print(node.local, node);
  5092. if (node.exported && node.local.name !== node.exported.name) {
  5093. this.space();
  5094. this.word("as");
  5095. this.space();
  5096. this.print(node.exported, node);
  5097. }
  5098. }
  5099. function ExportNamespaceSpecifier(node) {
  5100. this.token("*");
  5101. this.space();
  5102. this.word("as");
  5103. this.space();
  5104. this.print(node.exported, node);
  5105. }
  5106. function ExportAllDeclaration(node) {
  5107. this.word("export");
  5108. this.space();
  5109. this.token("*");
  5110. this.space();
  5111. this.word("from");
  5112. this.space();
  5113. this.print(node.source, node);
  5114. this.semicolon();
  5115. }
  5116. function ExportNamedDeclaration() {
  5117. this.word("export");
  5118. this.space();
  5119. ExportDeclaration.apply(this, arguments);
  5120. }
  5121. function ExportDefaultDeclaration() {
  5122. this.word("export");
  5123. this.space();
  5124. this.word("default");
  5125. this.space();
  5126. ExportDeclaration.apply(this, arguments);
  5127. }
  5128. function ExportDeclaration(node) {
  5129. if (node.declaration) {
  5130. var declar = node.declaration;
  5131. this.print(declar, node);
  5132. if (!t.isStatement(declar)) this.semicolon();
  5133. } else {
  5134. if (node.exportKind === "type") {
  5135. this.word("type");
  5136. this.space();
  5137. }
  5138. var specifiers = node.specifiers.slice(0);
  5139. var hasSpecial = false;
  5140. while (true) {
  5141. var first = specifiers[0];
  5142. if (t.isExportDefaultSpecifier(first) || t.isExportNamespaceSpecifier(first)) {
  5143. hasSpecial = true;
  5144. this.print(specifiers.shift(), node);
  5145. if (specifiers.length) {
  5146. this.token(",");
  5147. this.space();
  5148. }
  5149. } else {
  5150. break;
  5151. }
  5152. }
  5153. if (specifiers.length || !specifiers.length && !hasSpecial) {
  5154. this.token("{");
  5155. if (specifiers.length) {
  5156. this.space();
  5157. this.printList(specifiers, node);
  5158. this.space();
  5159. }
  5160. this.token("}");
  5161. }
  5162. if (node.source) {
  5163. this.space();
  5164. this.word("from");
  5165. this.space();
  5166. this.print(node.source, node);
  5167. }
  5168. this.semicolon();
  5169. }
  5170. }
  5171. function ImportDeclaration(node) {
  5172. this.word("import");
  5173. this.space();
  5174. if (node.importKind === "type" || node.importKind === "typeof") {
  5175. this.word(node.importKind);
  5176. this.space();
  5177. }
  5178. var specifiers = node.specifiers.slice(0);
  5179. if (specifiers && specifiers.length) {
  5180. while (true) {
  5181. var first = specifiers[0];
  5182. if (t.isImportDefaultSpecifier(first) || t.isImportNamespaceSpecifier(first)) {
  5183. this.print(specifiers.shift(), node);
  5184. if (specifiers.length) {
  5185. this.token(",");
  5186. this.space();
  5187. }
  5188. } else {
  5189. break;
  5190. }
  5191. }
  5192. if (specifiers.length) {
  5193. this.token("{");
  5194. this.space();
  5195. this.printList(specifiers, node);
  5196. this.space();
  5197. this.token("}");
  5198. }
  5199. this.space();
  5200. this.word("from");
  5201. this.space();
  5202. }
  5203. this.print(node.source, node);
  5204. this.semicolon();
  5205. }
  5206. function ImportNamespaceSpecifier(node) {
  5207. this.token("*");
  5208. this.space();
  5209. this.word("as");
  5210. this.space();
  5211. this.print(node.local, node);
  5212. }
  5213. });
  5214. $__System.registerDynamic("54", ["55"], true, function ($__require, exports, module) {
  5215. "use strict";
  5216. var global = this || self,
  5217. GLOBAL = global;
  5218. exports.__esModule = true;
  5219. exports.AnyTypeAnnotation = AnyTypeAnnotation;
  5220. exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
  5221. exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
  5222. exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
  5223. exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
  5224. exports.DeclareClass = DeclareClass;
  5225. exports.DeclareFunction = DeclareFunction;
  5226. exports.DeclareInterface = DeclareInterface;
  5227. exports.DeclareModule = DeclareModule;
  5228. exports.DeclareModuleExports = DeclareModuleExports;
  5229. exports.DeclareTypeAlias = DeclareTypeAlias;
  5230. exports.DeclareVariable = DeclareVariable;
  5231. exports.ExistentialTypeParam = ExistentialTypeParam;
  5232. exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
  5233. exports.FunctionTypeParam = FunctionTypeParam;
  5234. exports.InterfaceExtends = InterfaceExtends;
  5235. exports._interfaceish = _interfaceish;
  5236. exports._variance = _variance;
  5237. exports.InterfaceDeclaration = InterfaceDeclaration;
  5238. exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
  5239. exports.MixedTypeAnnotation = MixedTypeAnnotation;
  5240. exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
  5241. exports.NullableTypeAnnotation = NullableTypeAnnotation;
  5242. var _types = $__require("55");
  5243. Object.defineProperty(exports, "NumericLiteralTypeAnnotation", {
  5244. enumerable: true,
  5245. get: function get() {
  5246. return _types.NumericLiteral;
  5247. }
  5248. });
  5249. Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
  5250. enumerable: true,
  5251. get: function get() {
  5252. return _types.StringLiteral;
  5253. }
  5254. });
  5255. exports.NumberTypeAnnotation = NumberTypeAnnotation;
  5256. exports.StringTypeAnnotation = StringTypeAnnotation;
  5257. exports.ThisTypeAnnotation = ThisTypeAnnotation;
  5258. exports.TupleTypeAnnotation = TupleTypeAnnotation;
  5259. exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
  5260. exports.TypeAlias = TypeAlias;
  5261. exports.TypeAnnotation = TypeAnnotation;
  5262. exports.TypeParameter = TypeParameter;
  5263. exports.TypeParameterInstantiation = TypeParameterInstantiation;
  5264. exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
  5265. exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
  5266. exports.ObjectTypeIndexer = ObjectTypeIndexer;
  5267. exports.ObjectTypeProperty = ObjectTypeProperty;
  5268. exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
  5269. exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
  5270. exports.UnionTypeAnnotation = UnionTypeAnnotation;
  5271. exports.TypeCastExpression = TypeCastExpression;
  5272. exports.VoidTypeAnnotation = VoidTypeAnnotation;
  5273. function AnyTypeAnnotation() {
  5274. this.word("any");
  5275. }
  5276. function ArrayTypeAnnotation(node) {
  5277. this.print(node.elementType, node);
  5278. this.token("[");
  5279. this.token("]");
  5280. }
  5281. function BooleanTypeAnnotation() {
  5282. this.word("boolean");
  5283. }
  5284. function BooleanLiteralTypeAnnotation(node) {
  5285. this.word(node.value ? "true" : "false");
  5286. }
  5287. function NullLiteralTypeAnnotation() {
  5288. this.word("null");
  5289. }
  5290. function DeclareClass(node) {
  5291. this.word("declare");
  5292. this.space();
  5293. this.word("class");
  5294. this.space();
  5295. this._interfaceish(node);
  5296. }
  5297. function DeclareFunction(node) {
  5298. this.word("declare");
  5299. this.space();
  5300. this.word("function");
  5301. this.space();
  5302. this.print(node.id, node);
  5303. this.print(node.id.typeAnnotation.typeAnnotation, node);
  5304. this.semicolon();
  5305. }
  5306. function DeclareInterface(node) {
  5307. this.word("declare");
  5308. this.space();
  5309. this.InterfaceDeclaration(node);
  5310. }
  5311. function DeclareModule(node) {
  5312. this.word("declare");
  5313. this.space();
  5314. this.word("module");
  5315. this.space();
  5316. this.print(node.id, node);
  5317. this.space();
  5318. this.print(node.body, node);
  5319. }
  5320. function DeclareModuleExports(node) {
  5321. this.word("declare");
  5322. this.space();
  5323. this.word("module");
  5324. this.token(".");
  5325. this.word("exports");
  5326. this.print(node.typeAnnotation, node);
  5327. }
  5328. function DeclareTypeAlias(node) {
  5329. this.word("declare");
  5330. this.space();
  5331. this.TypeAlias(node);
  5332. }
  5333. function DeclareVariable(node) {
  5334. this.word("declare");
  5335. this.space();
  5336. this.word("var");
  5337. this.space();
  5338. this.print(node.id, node);
  5339. this.print(node.id.typeAnnotation, node);
  5340. this.semicolon();
  5341. }
  5342. function ExistentialTypeParam() {
  5343. this.token("*");
  5344. }
  5345. function FunctionTypeAnnotation(node, parent) {
  5346. this.print(node.typeParameters, node);
  5347. this.token("(");
  5348. this.printList(node.params, node);
  5349. if (node.rest) {
  5350. if (node.params.length) {
  5351. this.token(",");
  5352. this.space();
  5353. }
  5354. this.token("...");
  5355. this.print(node.rest, node);
  5356. }
  5357. this.token(")");
  5358. if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction") {
  5359. this.token(":");
  5360. } else {
  5361. this.space();
  5362. this.token("=>");
  5363. }
  5364. this.space();
  5365. this.print(node.returnType, node);
  5366. }
  5367. function FunctionTypeParam(node) {
  5368. this.print(node.name, node);
  5369. if (node.optional) this.token("?");
  5370. this.token(":");
  5371. this.space();
  5372. this.print(node.typeAnnotation, node);
  5373. }
  5374. function InterfaceExtends(node) {
  5375. this.print(node.id, node);
  5376. this.print(node.typeParameters, node);
  5377. }
  5378. exports.ClassImplements = InterfaceExtends;
  5379. exports.GenericTypeAnnotation = InterfaceExtends;
  5380. function _interfaceish(node) {
  5381. this.print(node.id, node);
  5382. this.print(node.typeParameters, node);
  5383. if (node.extends.length) {
  5384. this.space();
  5385. this.word("extends");
  5386. this.space();
  5387. this.printList(node.extends, node);
  5388. }
  5389. if (node.mixins && node.mixins.length) {
  5390. this.space();
  5391. this.word("mixins");
  5392. this.space();
  5393. this.printList(node.mixins, node);
  5394. }
  5395. this.space();
  5396. this.print(node.body, node);
  5397. }
  5398. function _variance(node) {
  5399. if (node.variance === "plus") {
  5400. this.token("+");
  5401. } else if (node.variance === "minus") {
  5402. this.token("-");
  5403. }
  5404. }
  5405. function InterfaceDeclaration(node) {
  5406. this.word("interface");
  5407. this.space();
  5408. this._interfaceish(node);
  5409. }
  5410. function andSeparator() {
  5411. this.space();
  5412. this.token("&");
  5413. this.space();
  5414. }
  5415. function IntersectionTypeAnnotation(node) {
  5416. this.printJoin(node.types, node, { separator: andSeparator });
  5417. }
  5418. function MixedTypeAnnotation() {
  5419. this.word("mixed");
  5420. }
  5421. function EmptyTypeAnnotation() {
  5422. this.word("empty");
  5423. }
  5424. function NullableTypeAnnotation(node) {
  5425. this.token("?");
  5426. this.print(node.typeAnnotation, node);
  5427. }
  5428. function NumberTypeAnnotation() {
  5429. this.word("number");
  5430. }
  5431. function StringTypeAnnotation() {
  5432. this.word("string");
  5433. }
  5434. function ThisTypeAnnotation() {
  5435. this.word("this");
  5436. }
  5437. function TupleTypeAnnotation(node) {
  5438. this.token("[");
  5439. this.printList(node.types, node);
  5440. this.token("]");
  5441. }
  5442. function TypeofTypeAnnotation(node) {
  5443. this.word("typeof");
  5444. this.space();
  5445. this.print(node.argument, node);
  5446. }
  5447. function TypeAlias(node) {
  5448. this.word("type");
  5449. this.space();
  5450. this.print(node.id, node);
  5451. this.print(node.typeParameters, node);
  5452. this.space();
  5453. this.token("=");
  5454. this.space();
  5455. this.print(node.right, node);
  5456. this.semicolon();
  5457. }
  5458. function TypeAnnotation(node) {
  5459. this.token(":");
  5460. this.space();
  5461. if (node.optional) this.token("?");
  5462. this.print(node.typeAnnotation, node);
  5463. }
  5464. function TypeParameter(node) {
  5465. this._variance(node);
  5466. this.word(node.name);
  5467. if (node.bound) {
  5468. this.print(node.bound, node);
  5469. }
  5470. if (node.default) {
  5471. this.space();
  5472. this.token("=");
  5473. this.space();
  5474. this.print(node.default, node);
  5475. }
  5476. }
  5477. function TypeParameterInstantiation(node) {
  5478. this.token("<");
  5479. this.printList(node.params, node, {});
  5480. this.token(">");
  5481. }
  5482. exports.TypeParameterDeclaration = TypeParameterInstantiation;
  5483. function ObjectTypeAnnotation(node) {
  5484. var _this = this;
  5485. if (node.exact) {
  5486. this.token("{|");
  5487. } else {
  5488. this.token("{");
  5489. }
  5490. var props = node.properties.concat(node.callProperties, node.indexers);
  5491. if (props.length) {
  5492. this.space();
  5493. this.printJoin(props, node, {
  5494. addNewlines: function addNewlines(leading) {
  5495. if (leading && !props[0]) return 1;
  5496. },
  5497. indent: true,
  5498. statement: true,
  5499. iterator: function iterator() {
  5500. if (props.length !== 1) {
  5501. if (_this.format.flowCommaSeparator) {
  5502. _this.token(",");
  5503. } else {
  5504. _this.semicolon();
  5505. }
  5506. _this.space();
  5507. }
  5508. }
  5509. });
  5510. this.space();
  5511. }
  5512. if (node.exact) {
  5513. this.token("|}");
  5514. } else {
  5515. this.token("}");
  5516. }
  5517. }
  5518. function ObjectTypeCallProperty(node) {
  5519. if (node.static) {
  5520. this.word("static");
  5521. this.space();
  5522. }
  5523. this.print(node.value, node);
  5524. }
  5525. function ObjectTypeIndexer(node) {
  5526. if (node.static) {
  5527. this.word("static");
  5528. this.space();
  5529. }
  5530. this._variance(node);
  5531. this.token("[");
  5532. this.print(node.id, node);
  5533. this.token(":");
  5534. this.space();
  5535. this.print(node.key, node);
  5536. this.token("]");
  5537. this.token(":");
  5538. this.space();
  5539. this.print(node.value, node);
  5540. }
  5541. function ObjectTypeProperty(node) {
  5542. if (node.static) {
  5543. this.word("static");
  5544. this.space();
  5545. }
  5546. this._variance(node);
  5547. this.print(node.key, node);
  5548. if (node.optional) this.token("?");
  5549. this.token(":");
  5550. this.space();
  5551. this.print(node.value, node);
  5552. }
  5553. function ObjectTypeSpreadProperty(node) {
  5554. this.token("...");
  5555. this.print(node.argument, node);
  5556. }
  5557. function QualifiedTypeIdentifier(node) {
  5558. this.print(node.qualification, node);
  5559. this.token(".");
  5560. this.print(node.id, node);
  5561. }
  5562. function orSeparator() {
  5563. this.space();
  5564. this.token("|");
  5565. this.space();
  5566. }
  5567. function UnionTypeAnnotation(node) {
  5568. this.printJoin(node.types, node, { separator: orSeparator });
  5569. }
  5570. function TypeCastExpression(node) {
  5571. this.token("(");
  5572. this.print(node.expression, node);
  5573. this.print(node.typeAnnotation, node);
  5574. this.token(")");
  5575. }
  5576. function VoidTypeAnnotation() {
  5577. this.word("void");
  5578. }
  5579. });
  5580. $__System.registerDynamic('56', [], true, function ($__require, exports, module) {
  5581. var global = this || self,
  5582. GLOBAL = global;
  5583. /*! https://mths.be/jsesc v1.3.0 by @mathias */
  5584. ;(function (root) {
  5585. // Detect free variables `exports`
  5586. var freeExports = typeof exports == 'object' && exports;
  5587. // Detect free variable `module`
  5588. var freeModule = typeof module == 'object' && module && module.exports == freeExports && module;
  5589. // Detect free variable `global`, from Node.js or Browserified code,
  5590. // and use it as `root`
  5591. var freeGlobal = typeof global == 'object' && global;
  5592. if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
  5593. root = freeGlobal;
  5594. }
  5595. /*--------------------------------------------------------------------------*/
  5596. var object = {};
  5597. var hasOwnProperty = object.hasOwnProperty;
  5598. var forOwn = function (object, callback) {
  5599. var key;
  5600. for (key in object) {
  5601. if (hasOwnProperty.call(object, key)) {
  5602. callback(key, object[key]);
  5603. }
  5604. }
  5605. };
  5606. var extend = function (destination, source) {
  5607. if (!source) {
  5608. return destination;
  5609. }
  5610. forOwn(source, function (key, value) {
  5611. destination[key] = value;
  5612. });
  5613. return destination;
  5614. };
  5615. var forEach = function (array, callback) {
  5616. var length = array.length;
  5617. var index = -1;
  5618. while (++index < length) {
  5619. callback(array[index]);
  5620. }
  5621. };
  5622. var toString = object.toString;
  5623. var isArray = function (value) {
  5624. return toString.call(value) == '[object Array]';
  5625. };
  5626. var isObject = function (value) {
  5627. // This is a very simple check, but it’s good enough for what we need.
  5628. return toString.call(value) == '[object Object]';
  5629. };
  5630. var isString = function (value) {
  5631. return typeof value == 'string' || toString.call(value) == '[object String]';
  5632. };
  5633. var isNumber = function (value) {
  5634. return typeof value == 'number' || toString.call(value) == '[object Number]';
  5635. };
  5636. var isFunction = function (value) {
  5637. // In a perfect world, the `typeof` check would be sufficient. However,
  5638. // in Chrome 1–12, `typeof /x/ == 'object'`, and in IE 6–8
  5639. // `typeof alert == 'object'` and similar for other host objects.
  5640. return typeof value == 'function' || toString.call(value) == '[object Function]';
  5641. };
  5642. var isMap = function (value) {
  5643. return toString.call(value) == '[object Map]';
  5644. };
  5645. var isSet = function (value) {
  5646. return toString.call(value) == '[object Set]';
  5647. };
  5648. /*--------------------------------------------------------------------------*/
  5649. // https://mathiasbynens.be/notes/javascript-escapes#single
  5650. var singleEscapes = {
  5651. '"': '\\"',
  5652. '\'': '\\\'',
  5653. '\\': '\\\\',
  5654. '\b': '\\b',
  5655. '\f': '\\f',
  5656. '\n': '\\n',
  5657. '\r': '\\r',
  5658. '\t': '\\t'
  5659. // `\v` is omitted intentionally, because in IE < 9, '\v' == 'v'.
  5660. // '\v': '\\x0B'
  5661. };
  5662. var regexSingleEscape = /["'\\\b\f\n\r\t]/;
  5663. var regexDigit = /[0-9]/;
  5664. var regexWhitelist = /[ !#-&\(-\[\]-~]/;
  5665. var jsesc = function (argument, options) {
  5666. // Handle options
  5667. var defaults = {
  5668. 'escapeEverything': false,
  5669. 'escapeEtago': false,
  5670. 'quotes': 'single',
  5671. 'wrap': false,
  5672. 'es6': false,
  5673. 'json': false,
  5674. 'compact': true,
  5675. 'lowercaseHex': false,
  5676. 'numbers': 'decimal',
  5677. 'indent': '\t',
  5678. '__indent__': '',
  5679. '__inline1__': false,
  5680. '__inline2__': false
  5681. };
  5682. var json = options && options.json;
  5683. if (json) {
  5684. defaults.quotes = 'double';
  5685. defaults.wrap = true;
  5686. }
  5687. options = extend(defaults, options);
  5688. if (options.quotes != 'single' && options.quotes != 'double') {
  5689. options.quotes = 'single';
  5690. }
  5691. var quote = options.quotes == 'double' ? '"' : '\'';
  5692. var compact = options.compact;
  5693. var indent = options.indent;
  5694. var lowercaseHex = options.lowercaseHex;
  5695. var oldIndent = '';
  5696. var inline1 = options.__inline1__;
  5697. var inline2 = options.__inline2__;
  5698. var newLine = compact ? '' : '\n';
  5699. var result;
  5700. var isEmpty = true;
  5701. var useBinNumbers = options.numbers == 'binary';
  5702. var useOctNumbers = options.numbers == 'octal';
  5703. var useDecNumbers = options.numbers == 'decimal';
  5704. var useHexNumbers = options.numbers == 'hexadecimal';
  5705. if (json && argument && isFunction(argument.toJSON)) {
  5706. argument = argument.toJSON();
  5707. }
  5708. if (!isString(argument)) {
  5709. if (isMap(argument)) {
  5710. if (argument.size == 0) {
  5711. return 'new Map()';
  5712. }
  5713. if (!compact) {
  5714. options.__inline1__ = true;
  5715. }
  5716. return 'new Map(' + jsesc(Array.from(argument), options) + ')';
  5717. }
  5718. if (isSet(argument)) {
  5719. if (argument.size == 0) {
  5720. return 'new Set()';
  5721. }
  5722. return 'new Set(' + jsesc(Array.from(argument), options) + ')';
  5723. }
  5724. if (isArray(argument)) {
  5725. result = [];
  5726. options.wrap = true;
  5727. if (inline1) {
  5728. options.__inline1__ = false;
  5729. options.__inline2__ = true;
  5730. } else {
  5731. oldIndent = options.__indent__;
  5732. indent += oldIndent;
  5733. options.__indent__ = indent;
  5734. }
  5735. forEach(argument, function (value) {
  5736. isEmpty = false;
  5737. if (inline2) {
  5738. options.__inline2__ = false;
  5739. }
  5740. result.push((compact || inline2 ? '' : indent) + jsesc(value, options));
  5741. });
  5742. if (isEmpty) {
  5743. return '[]';
  5744. }
  5745. if (inline2) {
  5746. return '[' + result.join(', ') + ']';
  5747. }
  5748. return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';
  5749. } else if (isNumber(argument)) {
  5750. if (json) {
  5751. // Some number values (e.g. `Infinity`) cannot be represented in JSON.
  5752. return JSON.stringify(argument);
  5753. }
  5754. if (useDecNumbers) {
  5755. return String(argument);
  5756. }
  5757. if (useHexNumbers) {
  5758. var tmp = argument.toString(16);
  5759. if (!lowercaseHex) {
  5760. tmp = tmp.toUpperCase();
  5761. }
  5762. return '0x' + tmp;
  5763. }
  5764. if (useBinNumbers) {
  5765. return '0b' + argument.toString(2);
  5766. }
  5767. if (useOctNumbers) {
  5768. return '0o' + argument.toString(8);
  5769. }
  5770. } else if (!isObject(argument)) {
  5771. if (json) {
  5772. // For some values (e.g. `undefined`, `function` objects),
  5773. // `JSON.stringify(value)` returns `undefined` (which isn’t valid
  5774. // JSON) instead of `'null'`.
  5775. return JSON.stringify(argument) || 'null';
  5776. }
  5777. return String(argument);
  5778. } else {
  5779. // it’s an object
  5780. result = [];
  5781. options.wrap = true;
  5782. oldIndent = options.__indent__;
  5783. indent += oldIndent;
  5784. options.__indent__ = indent;
  5785. forOwn(argument, function (key, value) {
  5786. isEmpty = false;
  5787. result.push((compact ? '' : indent) + jsesc(key, options) + ':' + (compact ? '' : ' ') + jsesc(value, options));
  5788. });
  5789. if (isEmpty) {
  5790. return '{}';
  5791. }
  5792. return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';
  5793. }
  5794. }
  5795. var string = argument;
  5796. // Loop over each code unit in the string and escape it
  5797. var index = -1;
  5798. var length = string.length;
  5799. var first;
  5800. var second;
  5801. var codePoint;
  5802. result = '';
  5803. while (++index < length) {
  5804. var character = string.charAt(index);
  5805. if (options.es6) {
  5806. first = string.charCodeAt(index);
  5807. if ( // check if it’s the start of a surrogate pair
  5808. first >= 0xD800 && first <= 0xDBFF && // high surrogate
  5809. length > index + 1 // there is a next code unit
  5810. ) {
  5811. second = string.charCodeAt(index + 1);
  5812. if (second >= 0xDC00 && second <= 0xDFFF) {
  5813. // low surrogate
  5814. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  5815. codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  5816. var hexadecimal = codePoint.toString(16);
  5817. if (!lowercaseHex) {
  5818. hexadecimal = hexadecimal.toUpperCase();
  5819. }
  5820. result += '\\u{' + hexadecimal + '}';
  5821. index++;
  5822. continue;
  5823. }
  5824. }
  5825. }
  5826. if (!options.escapeEverything) {
  5827. if (regexWhitelist.test(character)) {
  5828. // It’s a printable ASCII character that is not `"`, `'` or `\`,
  5829. // so don’t escape it.
  5830. result += character;
  5831. continue;
  5832. }
  5833. if (character == '"') {
  5834. result += quote == character ? '\\"' : character;
  5835. continue;
  5836. }
  5837. if (character == '\'') {
  5838. result += quote == character ? '\\\'' : character;
  5839. continue;
  5840. }
  5841. }
  5842. if (character == '\0' && !json && !regexDigit.test(string.charAt(index + 1))) {
  5843. result += '\\0';
  5844. continue;
  5845. }
  5846. if (regexSingleEscape.test(character)) {
  5847. // no need for a `hasOwnProperty` check here
  5848. result += singleEscapes[character];
  5849. continue;
  5850. }
  5851. var charCode = character.charCodeAt(0);
  5852. var hexadecimal = charCode.toString(16);
  5853. if (!lowercaseHex) {
  5854. hexadecimal = hexadecimal.toUpperCase();
  5855. }
  5856. var longhand = hexadecimal.length > 2 || json;
  5857. var escaped = '\\' + (longhand ? 'u' : 'x') + ('0000' + hexadecimal).slice(longhand ? -4 : -2);
  5858. result += escaped;
  5859. continue;
  5860. }
  5861. if (options.wrap) {
  5862. result = quote + result + quote;
  5863. }
  5864. if (options.escapeEtago) {
  5865. // https://mathiasbynens.be/notes/etago
  5866. return result.replace(/<\/(script|style)/gi, '<\\/$1');
  5867. }
  5868. return result;
  5869. };
  5870. jsesc.version = '1.3.0';
  5871. /*--------------------------------------------------------------------------*/
  5872. // Some AMD build optimizers, like r.js, check for specific condition patterns
  5873. // like the following:
  5874. if (typeof undefined == 'function' && typeof define.amd == 'object' && define.amd) {
  5875. define(function () {
  5876. return jsesc;
  5877. });
  5878. } else if (freeExports && !freeExports.nodeType) {
  5879. if (freeModule) {
  5880. // in Node.js or RingoJS v0.8.0+
  5881. freeModule.exports = jsesc;
  5882. } else {
  5883. // in Narwhal or RingoJS v0.7.0-
  5884. freeExports.jsesc = jsesc;
  5885. }
  5886. } else {
  5887. // in Rhino or a web browser
  5888. root.jsesc = jsesc;
  5889. }
  5890. })(exports);
  5891. });
  5892. $__System.registerDynamic("55", ["11", "56"], true, function ($__require, exports, module) {
  5893. "use strict";
  5894. var global = this || self,
  5895. GLOBAL = global;
  5896. exports.__esModule = true;
  5897. exports.ArrayPattern = exports.ObjectPattern = exports.RestProperty = exports.SpreadProperty = exports.SpreadElement = undefined;
  5898. exports.Identifier = Identifier;
  5899. exports.RestElement = RestElement;
  5900. exports.ObjectExpression = ObjectExpression;
  5901. exports.ObjectMethod = ObjectMethod;
  5902. exports.ObjectProperty = ObjectProperty;
  5903. exports.ArrayExpression = ArrayExpression;
  5904. exports.RegExpLiteral = RegExpLiteral;
  5905. exports.BooleanLiteral = BooleanLiteral;
  5906. exports.NullLiteral = NullLiteral;
  5907. exports.NumericLiteral = NumericLiteral;
  5908. exports.StringLiteral = StringLiteral;
  5909. var _babelTypes = $__require("11");
  5910. var t = _interopRequireWildcard(_babelTypes);
  5911. var _jsesc = $__require("56");
  5912. var _jsesc2 = _interopRequireDefault(_jsesc);
  5913. function _interopRequireDefault(obj) {
  5914. return obj && obj.__esModule ? obj : { default: obj };
  5915. }
  5916. function _interopRequireWildcard(obj) {
  5917. if (obj && obj.__esModule) {
  5918. return obj;
  5919. } else {
  5920. var newObj = {};if (obj != null) {
  5921. for (var key in obj) {
  5922. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  5923. }
  5924. }newObj.default = obj;return newObj;
  5925. }
  5926. }
  5927. function Identifier(node) {
  5928. if (node.variance) {
  5929. if (node.variance === "plus") {
  5930. this.token("+");
  5931. } else if (node.variance === "minus") {
  5932. this.token("-");
  5933. }
  5934. }
  5935. this.word(node.name);
  5936. }
  5937. function RestElement(node) {
  5938. this.token("...");
  5939. this.print(node.argument, node);
  5940. }
  5941. exports.SpreadElement = RestElement;
  5942. exports.SpreadProperty = RestElement;
  5943. exports.RestProperty = RestElement;
  5944. function ObjectExpression(node) {
  5945. var props = node.properties;
  5946. this.token("{");
  5947. this.printInnerComments(node);
  5948. if (props.length) {
  5949. this.space();
  5950. this.printList(props, node, { indent: true, statement: true });
  5951. this.space();
  5952. }
  5953. this.token("}");
  5954. }
  5955. exports.ObjectPattern = ObjectExpression;
  5956. function ObjectMethod(node) {
  5957. this.printJoin(node.decorators, node);
  5958. this._method(node);
  5959. }
  5960. function ObjectProperty(node) {
  5961. this.printJoin(node.decorators, node);
  5962. if (node.computed) {
  5963. this.token("[");
  5964. this.print(node.key, node);
  5965. this.token("]");
  5966. } else {
  5967. if (t.isAssignmentPattern(node.value) && t.isIdentifier(node.key) && node.key.name === node.value.left.name) {
  5968. this.print(node.value, node);
  5969. return;
  5970. }
  5971. this.print(node.key, node);
  5972. if (node.shorthand && t.isIdentifier(node.key) && t.isIdentifier(node.value) && node.key.name === node.value.name) {
  5973. return;
  5974. }
  5975. }
  5976. this.token(":");
  5977. this.space();
  5978. this.print(node.value, node);
  5979. }
  5980. function ArrayExpression(node) {
  5981. var elems = node.elements;
  5982. var len = elems.length;
  5983. this.token("[");
  5984. this.printInnerComments(node);
  5985. for (var i = 0; i < elems.length; i++) {
  5986. var elem = elems[i];
  5987. if (elem) {
  5988. if (i > 0) this.space();
  5989. this.print(elem, node);
  5990. if (i < len - 1) this.token(",");
  5991. } else {
  5992. this.token(",");
  5993. }
  5994. }
  5995. this.token("]");
  5996. }
  5997. exports.ArrayPattern = ArrayExpression;
  5998. function RegExpLiteral(node) {
  5999. this.word("/" + node.pattern + "/" + node.flags);
  6000. }
  6001. function BooleanLiteral(node) {
  6002. this.word(node.value ? "true" : "false");
  6003. }
  6004. function NullLiteral() {
  6005. this.word("null");
  6006. }
  6007. function NumericLiteral(node) {
  6008. var raw = this.getPossibleRaw(node);
  6009. var value = node.value + "";
  6010. if (raw == null) {
  6011. this.number(value);
  6012. } else if (this.format.minified) {
  6013. this.number(raw.length < value.length ? raw : value);
  6014. } else {
  6015. this.number(raw);
  6016. }
  6017. }
  6018. function StringLiteral(node, parent) {
  6019. var raw = this.getPossibleRaw(node);
  6020. if (!this.format.minified && raw != null) {
  6021. this.token(raw);
  6022. return;
  6023. }
  6024. var opts = {
  6025. quotes: t.isJSX(parent) ? "double" : this.format.quotes,
  6026. wrap: true
  6027. };
  6028. if (this.format.jsonCompatibleStrings) {
  6029. opts.json = true;
  6030. }
  6031. var val = (0, _jsesc2.default)(node.value, opts);
  6032. return this.token(val);
  6033. }
  6034. });
  6035. $__System.registerDynamic("57", ["55"], true, function ($__require, exports, module) {
  6036. "use strict";
  6037. var global = this || self,
  6038. GLOBAL = global;
  6039. exports.__esModule = true;
  6040. exports.File = File;
  6041. exports.Program = Program;
  6042. exports.BlockStatement = BlockStatement;
  6043. exports.Noop = Noop;
  6044. exports.Directive = Directive;
  6045. var _types = $__require("55");
  6046. Object.defineProperty(exports, "DirectiveLiteral", {
  6047. enumerable: true,
  6048. get: function get() {
  6049. return _types.StringLiteral;
  6050. }
  6051. });
  6052. function File(node) {
  6053. this.print(node.program, node);
  6054. }
  6055. function Program(node) {
  6056. this.printInnerComments(node, false);
  6057. this.printSequence(node.directives, node);
  6058. if (node.directives && node.directives.length) this.newline();
  6059. this.printSequence(node.body, node);
  6060. }
  6061. function BlockStatement(node) {
  6062. this.token("{");
  6063. this.printInnerComments(node);
  6064. var hasDirectives = node.directives && node.directives.length;
  6065. if (node.body.length || hasDirectives) {
  6066. this.newline();
  6067. this.printSequence(node.directives, node, { indent: true });
  6068. if (hasDirectives) this.newline();
  6069. this.printSequence(node.body, node, { indent: true });
  6070. this.removeTrailingNewline();
  6071. this.source("end", node.loc);
  6072. if (!this.endsWith("\n")) this.newline();
  6073. this.rightBrace();
  6074. } else {
  6075. this.source("end", node.loc);
  6076. this.token("}");
  6077. }
  6078. }
  6079. function Noop() {}
  6080. function Directive(node) {
  6081. this.print(node.value, node);
  6082. this.semicolon();
  6083. }
  6084. });
  6085. $__System.registerDynamic("58", ["17"], true, function ($__require, exports, module) {
  6086. "use strict";
  6087. var global = this || self,
  6088. GLOBAL = global;
  6089. exports.__esModule = true;
  6090. var _getIterator2 = $__require("17");
  6091. var _getIterator3 = _interopRequireDefault(_getIterator2);
  6092. exports.JSXAttribute = JSXAttribute;
  6093. exports.JSXIdentifier = JSXIdentifier;
  6094. exports.JSXNamespacedName = JSXNamespacedName;
  6095. exports.JSXMemberExpression = JSXMemberExpression;
  6096. exports.JSXSpreadAttribute = JSXSpreadAttribute;
  6097. exports.JSXExpressionContainer = JSXExpressionContainer;
  6098. exports.JSXSpreadChild = JSXSpreadChild;
  6099. exports.JSXText = JSXText;
  6100. exports.JSXElement = JSXElement;
  6101. exports.JSXOpeningElement = JSXOpeningElement;
  6102. exports.JSXClosingElement = JSXClosingElement;
  6103. exports.JSXEmptyExpression = JSXEmptyExpression;
  6104. function _interopRequireDefault(obj) {
  6105. return obj && obj.__esModule ? obj : { default: obj };
  6106. }
  6107. function JSXAttribute(node) {
  6108. this.print(node.name, node);
  6109. if (node.value) {
  6110. this.token("=");
  6111. this.print(node.value, node);
  6112. }
  6113. }
  6114. function JSXIdentifier(node) {
  6115. this.word(node.name);
  6116. }
  6117. function JSXNamespacedName(node) {
  6118. this.print(node.namespace, node);
  6119. this.token(":");
  6120. this.print(node.name, node);
  6121. }
  6122. function JSXMemberExpression(node) {
  6123. this.print(node.object, node);
  6124. this.token(".");
  6125. this.print(node.property, node);
  6126. }
  6127. function JSXSpreadAttribute(node) {
  6128. this.token("{");
  6129. this.token("...");
  6130. this.print(node.argument, node);
  6131. this.token("}");
  6132. }
  6133. function JSXExpressionContainer(node) {
  6134. this.token("{");
  6135. this.print(node.expression, node);
  6136. this.token("}");
  6137. }
  6138. function JSXSpreadChild(node) {
  6139. this.token("{");
  6140. this.token("...");
  6141. this.print(node.expression, node);
  6142. this.token("}");
  6143. }
  6144. function JSXText(node) {
  6145. this.token(node.value);
  6146. }
  6147. function JSXElement(node) {
  6148. var open = node.openingElement;
  6149. this.print(open, node);
  6150. if (open.selfClosing) return;
  6151. this.indent();
  6152. for (var _iterator = node.children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  6153. var _ref;
  6154. if (_isArray) {
  6155. if (_i >= _iterator.length) break;
  6156. _ref = _iterator[_i++];
  6157. } else {
  6158. _i = _iterator.next();
  6159. if (_i.done) break;
  6160. _ref = _i.value;
  6161. }
  6162. var child = _ref;
  6163. this.print(child, node);
  6164. }
  6165. this.dedent();
  6166. this.print(node.closingElement, node);
  6167. }
  6168. function spaceSeparator() {
  6169. this.space();
  6170. }
  6171. function JSXOpeningElement(node) {
  6172. this.token("<");
  6173. this.print(node.name, node);
  6174. if (node.attributes.length > 0) {
  6175. this.space();
  6176. this.printJoin(node.attributes, node, { separator: spaceSeparator });
  6177. }
  6178. if (node.selfClosing) {
  6179. this.space();
  6180. this.token("/>");
  6181. } else {
  6182. this.token(">");
  6183. }
  6184. }
  6185. function JSXClosingElement(node) {
  6186. this.token("</");
  6187. this.print(node.name, node);
  6188. this.token(">");
  6189. }
  6190. function JSXEmptyExpression() {}
  6191. });
  6192. $__System.registerDynamic("59", ["5a", "17", "5b", "38", "1d", "3d", "42", "43", "5c", "45", "4e", "46", "11", "47", "4f", "50", "51", "52", "53", "55", "54", "57", "58"], true, function ($__require, exports, module) {
  6193. "use strict";
  6194. var global = this || self,
  6195. GLOBAL = global;
  6196. exports.__esModule = true;
  6197. var _assign = $__require("5a");
  6198. var _assign2 = _interopRequireDefault(_assign);
  6199. var _getIterator2 = $__require("17");
  6200. var _getIterator3 = _interopRequireDefault(_getIterator2);
  6201. var _stringify = $__require("5b");
  6202. var _stringify2 = _interopRequireDefault(_stringify);
  6203. var _weakSet = $__require("38");
  6204. var _weakSet2 = _interopRequireDefault(_weakSet);
  6205. var _classCallCheck2 = $__require("1d");
  6206. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  6207. var _find = $__require("3d");
  6208. var _find2 = _interopRequireDefault(_find);
  6209. var _findLast = $__require("42");
  6210. var _findLast2 = _interopRequireDefault(_findLast);
  6211. var _isInteger = $__require("43");
  6212. var _isInteger2 = _interopRequireDefault(_isInteger);
  6213. var _repeat = $__require("5c");
  6214. var _repeat2 = _interopRequireDefault(_repeat);
  6215. var _buffer = $__require("45");
  6216. var _buffer2 = _interopRequireDefault(_buffer);
  6217. var _node = $__require("4e");
  6218. var n = _interopRequireWildcard(_node);
  6219. var _whitespace = $__require("46");
  6220. var _whitespace2 = _interopRequireDefault(_whitespace);
  6221. var _babelTypes = $__require("11");
  6222. var t = _interopRequireWildcard(_babelTypes);
  6223. function _interopRequireWildcard(obj) {
  6224. if (obj && obj.__esModule) {
  6225. return obj;
  6226. } else {
  6227. var newObj = {};if (obj != null) {
  6228. for (var key in obj) {
  6229. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  6230. }
  6231. }newObj.default = obj;return newObj;
  6232. }
  6233. }
  6234. function _interopRequireDefault(obj) {
  6235. return obj && obj.__esModule ? obj : { default: obj };
  6236. }
  6237. var SCIENTIFIC_NOTATION = /e/i;
  6238. var ZERO_DECIMAL_INTEGER = /\.0+$/;
  6239. var NON_DECIMAL_LITERAL = /^0[box]/;
  6240. var Printer = function () {
  6241. function Printer(format, map, tokens) {
  6242. (0, _classCallCheck3.default)(this, Printer);
  6243. this.inForStatementInitCounter = 0;
  6244. this._printStack = [];
  6245. this._indent = 0;
  6246. this._insideAux = false;
  6247. this._printedCommentStarts = {};
  6248. this._parenPushNewlineState = null;
  6249. this._printAuxAfterOnNextUserNode = false;
  6250. this._printedComments = new _weakSet2.default();
  6251. this._endsWithInteger = false;
  6252. this._endsWithWord = false;
  6253. this.format = format || {};
  6254. this._buf = new _buffer2.default(map);
  6255. this._whitespace = tokens.length > 0 ? new _whitespace2.default(tokens) : null;
  6256. }
  6257. Printer.prototype.generate = function generate(ast) {
  6258. this.print(ast);
  6259. this._maybeAddAuxComment();
  6260. return this._buf.get();
  6261. };
  6262. Printer.prototype.indent = function indent() {
  6263. if (this.format.compact || this.format.concise) return;
  6264. this._indent++;
  6265. };
  6266. Printer.prototype.dedent = function dedent() {
  6267. if (this.format.compact || this.format.concise) return;
  6268. this._indent--;
  6269. };
  6270. Printer.prototype.semicolon = function semicolon() {
  6271. var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  6272. this._maybeAddAuxComment();
  6273. this._append(";", !force);
  6274. };
  6275. Printer.prototype.rightBrace = function rightBrace() {
  6276. if (this.format.minified) {
  6277. this._buf.removeLastSemicolon();
  6278. }
  6279. this.token("}");
  6280. };
  6281. Printer.prototype.space = function space() {
  6282. var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  6283. if (this.format.compact) return;
  6284. if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
  6285. this._space();
  6286. }
  6287. };
  6288. Printer.prototype.word = function word(str) {
  6289. if (this._endsWithWord) this._space();
  6290. this._maybeAddAuxComment();
  6291. this._append(str);
  6292. this._endsWithWord = true;
  6293. };
  6294. Printer.prototype.number = function number(str) {
  6295. this.word(str);
  6296. this._endsWithInteger = (0, _isInteger2.default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
  6297. };
  6298. Printer.prototype.token = function token(str) {
  6299. if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
  6300. this._space();
  6301. }
  6302. this._maybeAddAuxComment();
  6303. this._append(str);
  6304. };
  6305. Printer.prototype.newline = function newline(i) {
  6306. if (this.format.retainLines || this.format.compact) return;
  6307. if (this.format.concise) {
  6308. this.space();
  6309. return;
  6310. }
  6311. if (this.endsWith("\n\n")) return;
  6312. if (typeof i !== "number") i = 1;
  6313. i = Math.min(2, i);
  6314. if (this.endsWith("{\n") || this.endsWith(":\n")) i--;
  6315. if (i <= 0) return;
  6316. for (var j = 0; j < i; j++) {
  6317. this._newline();
  6318. }
  6319. };
  6320. Printer.prototype.endsWith = function endsWith(str) {
  6321. return this._buf.endsWith(str);
  6322. };
  6323. Printer.prototype.removeTrailingNewline = function removeTrailingNewline() {
  6324. this._buf.removeTrailingNewline();
  6325. };
  6326. Printer.prototype.source = function source(prop, loc) {
  6327. this._catchUp(prop, loc);
  6328. this._buf.source(prop, loc);
  6329. };
  6330. Printer.prototype.withSource = function withSource(prop, loc, cb) {
  6331. this._catchUp(prop, loc);
  6332. this._buf.withSource(prop, loc, cb);
  6333. };
  6334. Printer.prototype._space = function _space() {
  6335. this._append(" ", true);
  6336. };
  6337. Printer.prototype._newline = function _newline() {
  6338. this._append("\n", true);
  6339. };
  6340. Printer.prototype._append = function _append(str) {
  6341. var queue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  6342. this._maybeAddParen(str);
  6343. this._maybeIndent(str);
  6344. if (queue) this._buf.queue(str);else this._buf.append(str);
  6345. this._endsWithWord = false;
  6346. this._endsWithInteger = false;
  6347. };
  6348. Printer.prototype._maybeIndent = function _maybeIndent(str) {
  6349. if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
  6350. this._buf.queue(this._getIndent());
  6351. }
  6352. };
  6353. Printer.prototype._maybeAddParen = function _maybeAddParen(str) {
  6354. var parenPushNewlineState = this._parenPushNewlineState;
  6355. if (!parenPushNewlineState) return;
  6356. this._parenPushNewlineState = null;
  6357. var i = void 0;
  6358. for (i = 0; i < str.length && str[i] === " "; i++) {
  6359. continue;
  6360. }if (i === str.length) return;
  6361. var cha = str[i];
  6362. if (cha === "\n" || cha === "/") {
  6363. this.token("(");
  6364. this.indent();
  6365. parenPushNewlineState.printed = true;
  6366. }
  6367. };
  6368. Printer.prototype._catchUp = function _catchUp(prop, loc) {
  6369. if (!this.format.retainLines) return;
  6370. var pos = loc ? loc[prop] : null;
  6371. if (pos && pos.line !== null) {
  6372. var count = pos.line - this._buf.getCurrentLine();
  6373. for (var i = 0; i < count; i++) {
  6374. this._newline();
  6375. }
  6376. }
  6377. };
  6378. Printer.prototype._getIndent = function _getIndent() {
  6379. return (0, _repeat2.default)(this.format.indent.style, this._indent);
  6380. };
  6381. Printer.prototype.startTerminatorless = function startTerminatorless() {
  6382. return this._parenPushNewlineState = {
  6383. printed: false
  6384. };
  6385. };
  6386. Printer.prototype.endTerminatorless = function endTerminatorless(state) {
  6387. if (state.printed) {
  6388. this.dedent();
  6389. this.newline();
  6390. this.token(")");
  6391. }
  6392. };
  6393. Printer.prototype.print = function print(node, parent) {
  6394. var _this = this;
  6395. if (!node) return;
  6396. var oldConcise = this.format.concise;
  6397. if (node._compact) {
  6398. this.format.concise = true;
  6399. }
  6400. var printMethod = this[node.type];
  6401. if (!printMethod) {
  6402. throw new ReferenceError("unknown node of type " + (0, _stringify2.default)(node.type) + " with constructor " + (0, _stringify2.default)(node && node.constructor.name));
  6403. }
  6404. this._printStack.push(node);
  6405. var oldInAux = this._insideAux;
  6406. this._insideAux = !node.loc;
  6407. this._maybeAddAuxComment(this._insideAux && !oldInAux);
  6408. var needsParens = n.needsParens(node, parent, this._printStack);
  6409. if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
  6410. needsParens = true;
  6411. }
  6412. if (needsParens) this.token("(");
  6413. this._printLeadingComments(node, parent);
  6414. var loc = t.isProgram(node) || t.isFile(node) ? null : node.loc;
  6415. this.withSource("start", loc, function () {
  6416. _this[node.type](node, parent);
  6417. });
  6418. this._printTrailingComments(node, parent);
  6419. if (needsParens) this.token(")");
  6420. this._printStack.pop();
  6421. this.format.concise = oldConcise;
  6422. this._insideAux = oldInAux;
  6423. };
  6424. Printer.prototype._maybeAddAuxComment = function _maybeAddAuxComment(enteredPositionlessNode) {
  6425. if (enteredPositionlessNode) this._printAuxBeforeComment();
  6426. if (!this._insideAux) this._printAuxAfterComment();
  6427. };
  6428. Printer.prototype._printAuxBeforeComment = function _printAuxBeforeComment() {
  6429. if (this._printAuxAfterOnNextUserNode) return;
  6430. this._printAuxAfterOnNextUserNode = true;
  6431. var comment = this.format.auxiliaryCommentBefore;
  6432. if (comment) {
  6433. this._printComment({
  6434. type: "CommentBlock",
  6435. value: comment
  6436. });
  6437. }
  6438. };
  6439. Printer.prototype._printAuxAfterComment = function _printAuxAfterComment() {
  6440. if (!this._printAuxAfterOnNextUserNode) return;
  6441. this._printAuxAfterOnNextUserNode = false;
  6442. var comment = this.format.auxiliaryCommentAfter;
  6443. if (comment) {
  6444. this._printComment({
  6445. type: "CommentBlock",
  6446. value: comment
  6447. });
  6448. }
  6449. };
  6450. Printer.prototype.getPossibleRaw = function getPossibleRaw(node) {
  6451. var extra = node.extra;
  6452. if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
  6453. return extra.raw;
  6454. }
  6455. };
  6456. Printer.prototype.printJoin = function printJoin(nodes, parent) {
  6457. var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6458. if (!nodes || !nodes.length) return;
  6459. if (opts.indent) this.indent();
  6460. var newlineOpts = {
  6461. addNewlines: opts.addNewlines
  6462. };
  6463. for (var i = 0; i < nodes.length; i++) {
  6464. var node = nodes[i];
  6465. if (!node) continue;
  6466. if (opts.statement) this._printNewline(true, node, parent, newlineOpts);
  6467. this.print(node, parent);
  6468. if (opts.iterator) {
  6469. opts.iterator(node, i);
  6470. }
  6471. if (opts.separator && i < nodes.length - 1) {
  6472. opts.separator.call(this);
  6473. }
  6474. if (opts.statement) this._printNewline(false, node, parent, newlineOpts);
  6475. }
  6476. if (opts.indent) this.dedent();
  6477. };
  6478. Printer.prototype.printAndIndentOnComments = function printAndIndentOnComments(node, parent) {
  6479. var indent = !!node.leadingComments;
  6480. if (indent) this.indent();
  6481. this.print(node, parent);
  6482. if (indent) this.dedent();
  6483. };
  6484. Printer.prototype.printBlock = function printBlock(parent) {
  6485. var node = parent.body;
  6486. if (!t.isEmptyStatement(node)) {
  6487. this.space();
  6488. }
  6489. this.print(node, parent);
  6490. };
  6491. Printer.prototype._printTrailingComments = function _printTrailingComments(node, parent) {
  6492. this._printComments(this._getComments(false, node, parent));
  6493. };
  6494. Printer.prototype._printLeadingComments = function _printLeadingComments(node, parent) {
  6495. this._printComments(this._getComments(true, node, parent));
  6496. };
  6497. Printer.prototype.printInnerComments = function printInnerComments(node) {
  6498. var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  6499. if (!node.innerComments) return;
  6500. if (indent) this.indent();
  6501. this._printComments(node.innerComments);
  6502. if (indent) this.dedent();
  6503. };
  6504. Printer.prototype.printSequence = function printSequence(nodes, parent) {
  6505. var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6506. opts.statement = true;
  6507. return this.printJoin(nodes, parent, opts);
  6508. };
  6509. Printer.prototype.printList = function printList(items, parent) {
  6510. var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6511. if (opts.separator == null) {
  6512. opts.separator = commaSeparator;
  6513. }
  6514. return this.printJoin(items, parent, opts);
  6515. };
  6516. Printer.prototype._printNewline = function _printNewline(leading, node, parent, opts) {
  6517. var _this2 = this;
  6518. if (this.format.retainLines || this.format.compact) return;
  6519. if (this.format.concise) {
  6520. this.space();
  6521. return;
  6522. }
  6523. var lines = 0;
  6524. if (node.start != null && !node._ignoreUserWhitespace && this._whitespace) {
  6525. if (leading) {
  6526. var _comments = node.leadingComments;
  6527. var _comment = _comments && (0, _find2.default)(_comments, function (comment) {
  6528. return !!comment.loc && _this2.format.shouldPrintComment(comment.value);
  6529. });
  6530. lines = this._whitespace.getNewlinesBefore(_comment || node);
  6531. } else {
  6532. var _comments2 = node.trailingComments;
  6533. var _comment2 = _comments2 && (0, _findLast2.default)(_comments2, function (comment) {
  6534. return !!comment.loc && _this2.format.shouldPrintComment(comment.value);
  6535. });
  6536. lines = this._whitespace.getNewlinesAfter(_comment2 || node);
  6537. }
  6538. } else {
  6539. if (!leading) lines++;
  6540. if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;
  6541. var needs = n.needsWhitespaceAfter;
  6542. if (leading) needs = n.needsWhitespaceBefore;
  6543. if (needs(node, parent)) lines++;
  6544. if (!this._buf.hasContent()) lines = 0;
  6545. }
  6546. this.newline(lines);
  6547. };
  6548. Printer.prototype._getComments = function _getComments(leading, node) {
  6549. return node && (leading ? node.leadingComments : node.trailingComments) || [];
  6550. };
  6551. Printer.prototype._printComment = function _printComment(comment) {
  6552. var _this3 = this;
  6553. if (!this.format.shouldPrintComment(comment.value)) return;
  6554. if (comment.ignore) return;
  6555. if (this._printedComments.has(comment)) return;
  6556. this._printedComments.add(comment);
  6557. if (comment.start != null) {
  6558. if (this._printedCommentStarts[comment.start]) return;
  6559. this._printedCommentStarts[comment.start] = true;
  6560. }
  6561. this.newline(this._whitespace ? this._whitespace.getNewlinesBefore(comment) : 0);
  6562. if (!this.endsWith("[") && !this.endsWith("{")) this.space();
  6563. var val = comment.type === "CommentLine" ? "//" + comment.value + "\n" : "/*" + comment.value + "*/";
  6564. if (comment.type === "CommentBlock" && this.format.indent.adjustMultilineComment) {
  6565. var offset = comment.loc && comment.loc.start.column;
  6566. if (offset) {
  6567. var newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g");
  6568. val = val.replace(newlineRegex, "\n");
  6569. }
  6570. var indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn());
  6571. val = val.replace(/\n(?!$)/g, "\n" + (0, _repeat2.default)(" ", indentSize));
  6572. }
  6573. this.withSource("start", comment.loc, function () {
  6574. _this3._append(val);
  6575. });
  6576. this.newline((this._whitespace ? this._whitespace.getNewlinesAfter(comment) : 0) + (comment.type === "CommentLine" ? -1 : 0));
  6577. };
  6578. Printer.prototype._printComments = function _printComments(comments) {
  6579. if (!comments || !comments.length) return;
  6580. for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  6581. var _ref;
  6582. if (_isArray) {
  6583. if (_i >= _iterator.length) break;
  6584. _ref = _iterator[_i++];
  6585. } else {
  6586. _i = _iterator.next();
  6587. if (_i.done) break;
  6588. _ref = _i.value;
  6589. }
  6590. var _comment3 = _ref;
  6591. this._printComment(_comment3);
  6592. }
  6593. };
  6594. return Printer;
  6595. }();
  6596. exports.default = Printer;
  6597. function commaSeparator() {
  6598. this.token(",");
  6599. this.space();
  6600. }
  6601. var _arr = [$__require("47"), $__require("4f"), $__require("50"), $__require("51"), $__require("52"), $__require("53"), $__require("55"), $__require("54"), $__require("57"), $__require("58")];
  6602. for (var _i2 = 0; _i2 < _arr.length; _i2++) {
  6603. var generator = _arr[_i2];
  6604. (0, _assign2.default)(Printer.prototype, generator);
  6605. }
  6606. module.exports = exports["default"];
  6607. });
  6608. $__System.registerDynamic("e", ["1d", "1e", "1f", "23", "2f", "f", "59"], true, function ($__require, exports, module) {
  6609. "use strict";
  6610. var global = this || self,
  6611. GLOBAL = global;
  6612. exports.__esModule = true;
  6613. exports.CodeGenerator = undefined;
  6614. var _classCallCheck2 = $__require("1d");
  6615. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  6616. var _possibleConstructorReturn2 = $__require("1e");
  6617. var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
  6618. var _inherits2 = $__require("1f");
  6619. var _inherits3 = _interopRequireDefault(_inherits2);
  6620. exports.default = function (ast, opts, code) {
  6621. var gen = new Generator(ast, opts, code);
  6622. return gen.generate();
  6623. };
  6624. var _detectIndent = $__require("23");
  6625. var _detectIndent2 = _interopRequireDefault(_detectIndent);
  6626. var _sourceMap = $__require("2f");
  6627. var _sourceMap2 = _interopRequireDefault(_sourceMap);
  6628. var _babelMessages = $__require("f");
  6629. var messages = _interopRequireWildcard(_babelMessages);
  6630. var _printer = $__require("59");
  6631. var _printer2 = _interopRequireDefault(_printer);
  6632. function _interopRequireWildcard(obj) {
  6633. if (obj && obj.__esModule) {
  6634. return obj;
  6635. } else {
  6636. var newObj = {};if (obj != null) {
  6637. for (var key in obj) {
  6638. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  6639. }
  6640. }newObj.default = obj;return newObj;
  6641. }
  6642. }
  6643. function _interopRequireDefault(obj) {
  6644. return obj && obj.__esModule ? obj : { default: obj };
  6645. }
  6646. var Generator = function (_Printer) {
  6647. (0, _inherits3.default)(Generator, _Printer);
  6648. function Generator(ast) {
  6649. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  6650. var code = arguments[2];
  6651. (0, _classCallCheck3.default)(this, Generator);
  6652. var tokens = ast.tokens || [];
  6653. var format = normalizeOptions(code, opts, tokens);
  6654. var map = opts.sourceMaps ? new _sourceMap2.default(opts, code) : null;
  6655. var _this = (0, _possibleConstructorReturn3.default)(this, _Printer.call(this, format, map, tokens));
  6656. _this.ast = ast;
  6657. return _this;
  6658. }
  6659. Generator.prototype.generate = function generate() {
  6660. return _Printer.prototype.generate.call(this, this.ast);
  6661. };
  6662. return Generator;
  6663. }(_printer2.default);
  6664. function normalizeOptions(code, opts, tokens) {
  6665. var style = " ";
  6666. if (code && typeof code === "string") {
  6667. var indent = (0, _detectIndent2.default)(code).indent;
  6668. if (indent && indent !== " ") style = indent;
  6669. }
  6670. var format = {
  6671. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  6672. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  6673. shouldPrintComment: opts.shouldPrintComment,
  6674. retainLines: opts.retainLines,
  6675. retainFunctionParens: opts.retainFunctionParens,
  6676. comments: opts.comments == null || opts.comments,
  6677. compact: opts.compact,
  6678. minified: opts.minified,
  6679. concise: opts.concise,
  6680. quotes: opts.quotes || findCommonStringDelimiter(code, tokens),
  6681. jsonCompatibleStrings: opts.jsonCompatibleStrings,
  6682. indent: {
  6683. adjustMultilineComment: true,
  6684. style: style,
  6685. base: 0
  6686. },
  6687. flowCommaSeparator: opts.flowCommaSeparator
  6688. };
  6689. if (format.minified) {
  6690. format.compact = true;
  6691. format.shouldPrintComment = format.shouldPrintComment || function () {
  6692. return format.comments;
  6693. };
  6694. } else {
  6695. format.shouldPrintComment = format.shouldPrintComment || function (value) {
  6696. return format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0;
  6697. };
  6698. }
  6699. if (format.compact === "auto") {
  6700. format.compact = code.length > 500000;
  6701. if (format.compact) {
  6702. console.error("[BABEL] " + messages.get("codeGeneratorDeopt", opts.filename, "500KB"));
  6703. }
  6704. }
  6705. if (format.compact) {
  6706. format.indent.adjustMultilineComment = false;
  6707. }
  6708. return format;
  6709. }
  6710. function findCommonStringDelimiter(code, tokens) {
  6711. var DEFAULT_STRING_DELIMITER = "double";
  6712. if (!code) {
  6713. return DEFAULT_STRING_DELIMITER;
  6714. }
  6715. var occurrences = {
  6716. single: 0,
  6717. double: 0
  6718. };
  6719. var checked = 0;
  6720. for (var i = 0; i < tokens.length; i++) {
  6721. var token = tokens[i];
  6722. if (token.type.label !== "string") continue;
  6723. var raw = code.slice(token.start, token.end);
  6724. if (raw[0] === "'") {
  6725. occurrences.single++;
  6726. } else {
  6727. occurrences.double++;
  6728. }
  6729. checked++;
  6730. if (checked >= 3) break;
  6731. }
  6732. if (occurrences.single > occurrences.double) {
  6733. return "single";
  6734. } else {
  6735. return "double";
  6736. }
  6737. }
  6738. var CodeGenerator = exports.CodeGenerator = function () {
  6739. function CodeGenerator(ast, opts, code) {
  6740. (0, _classCallCheck3.default)(this, CodeGenerator);
  6741. this._generator = new Generator(ast, opts, code);
  6742. }
  6743. CodeGenerator.prototype.generate = function generate() {
  6744. return this._generator.generate();
  6745. };
  6746. return CodeGenerator;
  6747. }();
  6748. });
  6749. $__System.registerDynamic('5d', ['5e'], true, function ($__require, exports, module) {
  6750. var global = this || self,
  6751. GLOBAL = global;
  6752. module.exports = $__require('5e');
  6753. });
  6754. $__System.registerDynamic("5f", ["1d", "5d", "c"], true, function ($__require, exports, module) {
  6755. "use strict";
  6756. var process = $__require("c");
  6757. var global = this || self,
  6758. GLOBAL = global;
  6759. exports.__esModule = true;
  6760. var _classCallCheck2 = $__require("1d");
  6761. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  6762. var _node = $__require("5d");
  6763. var _node2 = _interopRequireDefault(_node);
  6764. function _interopRequireDefault(obj) {
  6765. return obj && obj.__esModule ? obj : { default: obj };
  6766. }
  6767. var verboseDebug = (0, _node2.default)("babel:verbose");
  6768. var generalDebug = (0, _node2.default)("babel");
  6769. var seenDeprecatedMessages = [];
  6770. var Logger = function () {
  6771. function Logger(file, filename) {
  6772. (0, _classCallCheck3.default)(this, Logger);
  6773. this.filename = filename;
  6774. this.file = file;
  6775. }
  6776. Logger.prototype._buildMessage = function _buildMessage(msg) {
  6777. var parts = "[BABEL] " + this.filename;
  6778. if (msg) parts += ": " + msg;
  6779. return parts;
  6780. };
  6781. Logger.prototype.warn = function warn(msg) {
  6782. console.warn(this._buildMessage(msg));
  6783. };
  6784. Logger.prototype.error = function error(msg) {
  6785. var Constructor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Error;
  6786. throw new Constructor(this._buildMessage(msg));
  6787. };
  6788. Logger.prototype.deprecate = function deprecate(msg) {
  6789. if (this.file.opts && this.file.opts.suppressDeprecationMessages) return;
  6790. msg = this._buildMessage(msg);
  6791. if (seenDeprecatedMessages.indexOf(msg) >= 0) return;
  6792. seenDeprecatedMessages.push(msg);
  6793. console.error(msg);
  6794. };
  6795. Logger.prototype.verbose = function verbose(msg) {
  6796. if (verboseDebug.enabled) verboseDebug(this._buildMessage(msg));
  6797. };
  6798. Logger.prototype.debug = function debug(msg) {
  6799. if (generalDebug.enabled) generalDebug(this._buildMessage(msg));
  6800. };
  6801. Logger.prototype.deopt = function deopt(node, msg) {
  6802. this.debug(msg);
  6803. };
  6804. return Logger;
  6805. }();
  6806. exports.default = Logger;
  6807. module.exports = exports["default"];
  6808. });
  6809. $__System.registerDynamic('60', ['61', '62', '4b'], true, function ($__require, exports, module) {
  6810. var global = this || self,
  6811. GLOBAL = global;
  6812. var Symbol = $__require('61'),
  6813. isArguments = $__require('62'),
  6814. isArray = $__require('4b');
  6815. /** Built-in value references. */
  6816. var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
  6817. /**
  6818. * Checks if `value` is a flattenable `arguments` object or array.
  6819. *
  6820. * @private
  6821. * @param {*} value The value to check.
  6822. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  6823. */
  6824. function isFlattenable(value) {
  6825. return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  6826. }
  6827. module.exports = isFlattenable;
  6828. });
  6829. $__System.registerDynamic('63', ['64', '60'], true, function ($__require, exports, module) {
  6830. var global = this || self,
  6831. GLOBAL = global;
  6832. var arrayPush = $__require('64'),
  6833. isFlattenable = $__require('60');
  6834. /**
  6835. * The base implementation of `_.flatten` with support for restricting flattening.
  6836. *
  6837. * @private
  6838. * @param {Array} array The array to flatten.
  6839. * @param {number} depth The maximum recursion depth.
  6840. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  6841. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  6842. * @param {Array} [result=[]] The initial result value.
  6843. * @returns {Array} Returns the new flattened array.
  6844. */
  6845. function baseFlatten(array, depth, predicate, isStrict, result) {
  6846. var index = -1,
  6847. length = array.length;
  6848. predicate || (predicate = isFlattenable);
  6849. result || (result = []);
  6850. while (++index < length) {
  6851. var value = array[index];
  6852. if (depth > 0 && predicate(value)) {
  6853. if (depth > 1) {
  6854. // Recursively flatten arrays (susceptible to call stack limits).
  6855. baseFlatten(value, depth - 1, predicate, isStrict, result);
  6856. } else {
  6857. arrayPush(result, value);
  6858. }
  6859. } else if (!isStrict) {
  6860. result[result.length] = value;
  6861. }
  6862. }
  6863. return result;
  6864. }
  6865. module.exports = baseFlatten;
  6866. });
  6867. $__System.registerDynamic('65', ['66', '67'], true, function ($__require, exports, module) {
  6868. var global = this || self,
  6869. GLOBAL = global;
  6870. var Stack = $__require('66'),
  6871. baseIsEqual = $__require('67');
  6872. /** Used to compose bitmasks for value comparisons. */
  6873. var COMPARE_PARTIAL_FLAG = 1,
  6874. COMPARE_UNORDERED_FLAG = 2;
  6875. /**
  6876. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  6877. *
  6878. * @private
  6879. * @param {Object} object The object to inspect.
  6880. * @param {Object} source The object of property values to match.
  6881. * @param {Array} matchData The property names, values, and compare flags to match.
  6882. * @param {Function} [customizer] The function to customize comparisons.
  6883. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  6884. */
  6885. function baseIsMatch(object, source, matchData, customizer) {
  6886. var index = matchData.length,
  6887. length = index,
  6888. noCustomizer = !customizer;
  6889. if (object == null) {
  6890. return !length;
  6891. }
  6892. object = Object(object);
  6893. while (index--) {
  6894. var data = matchData[index];
  6895. if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
  6896. return false;
  6897. }
  6898. }
  6899. while (++index < length) {
  6900. data = matchData[index];
  6901. var key = data[0],
  6902. objValue = object[key],
  6903. srcValue = data[1];
  6904. if (noCustomizer && data[2]) {
  6905. if (objValue === undefined && !(key in object)) {
  6906. return false;
  6907. }
  6908. } else {
  6909. var stack = new Stack();
  6910. if (customizer) {
  6911. var result = customizer(objValue, srcValue, key, object, source, stack);
  6912. }
  6913. if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {
  6914. return false;
  6915. }
  6916. }
  6917. }
  6918. return true;
  6919. }
  6920. module.exports = baseIsMatch;
  6921. });
  6922. $__System.registerDynamic('68', ['69', '40'], true, function ($__require, exports, module) {
  6923. var global = this || self,
  6924. GLOBAL = global;
  6925. var isStrictComparable = $__require('69'),
  6926. keys = $__require('40');
  6927. /**
  6928. * Gets the property names, values, and compare flags of `object`.
  6929. *
  6930. * @private
  6931. * @param {Object} object The object to query.
  6932. * @returns {Array} Returns the match data of `object`.
  6933. */
  6934. function getMatchData(object) {
  6935. var result = keys(object),
  6936. length = result.length;
  6937. while (length--) {
  6938. var key = result[length],
  6939. value = object[key];
  6940. result[length] = [key, value, isStrictComparable(value)];
  6941. }
  6942. return result;
  6943. }
  6944. module.exports = getMatchData;
  6945. });
  6946. $__System.registerDynamic('6a', ['65', '68', '6b'], true, function ($__require, exports, module) {
  6947. var global = this || self,
  6948. GLOBAL = global;
  6949. var baseIsMatch = $__require('65'),
  6950. getMatchData = $__require('68'),
  6951. matchesStrictComparable = $__require('6b');
  6952. /**
  6953. * The base implementation of `_.matches` which doesn't clone `source`.
  6954. *
  6955. * @private
  6956. * @param {Object} source The object of property values to match.
  6957. * @returns {Function} Returns the new spec function.
  6958. */
  6959. function baseMatches(source) {
  6960. var matchData = getMatchData(source);
  6961. if (matchData.length == 1 && matchData[0][2]) {
  6962. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  6963. }
  6964. return function (object) {
  6965. return object === source || baseIsMatch(object, source, matchData);
  6966. };
  6967. }
  6968. module.exports = baseMatches;
  6969. });
  6970. $__System.registerDynamic("6c", [], true, function ($__require, exports, module) {
  6971. var global = this || self,
  6972. GLOBAL = global;
  6973. /**
  6974. * A specialized version of `_.some` for arrays without support for iteratee
  6975. * shorthands.
  6976. *
  6977. * @private
  6978. * @param {Array} [array] The array to iterate over.
  6979. * @param {Function} predicate The function invoked per iteration.
  6980. * @returns {boolean} Returns `true` if any element passes the predicate check,
  6981. * else `false`.
  6982. */
  6983. function arraySome(array, predicate) {
  6984. var index = -1,
  6985. length = array == null ? 0 : array.length;
  6986. while (++index < length) {
  6987. if (predicate(array[index], index, array)) {
  6988. return true;
  6989. }
  6990. }
  6991. return false;
  6992. }
  6993. module.exports = arraySome;
  6994. });
  6995. $__System.registerDynamic('6d', ['6e', '6c', '6f'], true, function ($__require, exports, module) {
  6996. var global = this || self,
  6997. GLOBAL = global;
  6998. var SetCache = $__require('6e'),
  6999. arraySome = $__require('6c'),
  7000. cacheHas = $__require('6f');
  7001. /** Used to compose bitmasks for value comparisons. */
  7002. var COMPARE_PARTIAL_FLAG = 1,
  7003. COMPARE_UNORDERED_FLAG = 2;
  7004. /**
  7005. * A specialized version of `baseIsEqualDeep` for arrays with support for
  7006. * partial deep comparisons.
  7007. *
  7008. * @private
  7009. * @param {Array} array The array to compare.
  7010. * @param {Array} other The other array to compare.
  7011. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  7012. * @param {Function} customizer The function to customize comparisons.
  7013. * @param {Function} equalFunc The function to determine equivalents of values.
  7014. * @param {Object} stack Tracks traversed `array` and `other` objects.
  7015. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  7016. */
  7017. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  7018. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  7019. arrLength = array.length,
  7020. othLength = other.length;
  7021. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  7022. return false;
  7023. }
  7024. // Assume cyclic values are equal.
  7025. var stacked = stack.get(array);
  7026. if (stacked && stack.get(other)) {
  7027. return stacked == other;
  7028. }
  7029. var index = -1,
  7030. result = true,
  7031. seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
  7032. stack.set(array, other);
  7033. stack.set(other, array);
  7034. // Ignore non-index properties.
  7035. while (++index < arrLength) {
  7036. var arrValue = array[index],
  7037. othValue = other[index];
  7038. if (customizer) {
  7039. var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
  7040. }
  7041. if (compared !== undefined) {
  7042. if (compared) {
  7043. continue;
  7044. }
  7045. result = false;
  7046. break;
  7047. }
  7048. // Recursively compare arrays (susceptible to call stack limits).
  7049. if (seen) {
  7050. if (!arraySome(other, function (othValue, othIndex) {
  7051. if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  7052. return seen.push(othIndex);
  7053. }
  7054. })) {
  7055. result = false;
  7056. break;
  7057. }
  7058. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  7059. result = false;
  7060. break;
  7061. }
  7062. }
  7063. stack['delete'](array);
  7064. stack['delete'](other);
  7065. return result;
  7066. }
  7067. module.exports = equalArrays;
  7068. });
  7069. $__System.registerDynamic('70', ['61', '71', '72', '6d', '73', '74'], true, function ($__require, exports, module) {
  7070. var global = this || self,
  7071. GLOBAL = global;
  7072. var Symbol = $__require('61'),
  7073. Uint8Array = $__require('71'),
  7074. eq = $__require('72'),
  7075. equalArrays = $__require('6d'),
  7076. mapToArray = $__require('73'),
  7077. setToArray = $__require('74');
  7078. /** Used to compose bitmasks for value comparisons. */
  7079. var COMPARE_PARTIAL_FLAG = 1,
  7080. COMPARE_UNORDERED_FLAG = 2;
  7081. /** `Object#toString` result references. */
  7082. var boolTag = '[object Boolean]',
  7083. dateTag = '[object Date]',
  7084. errorTag = '[object Error]',
  7085. mapTag = '[object Map]',
  7086. numberTag = '[object Number]',
  7087. regexpTag = '[object RegExp]',
  7088. setTag = '[object Set]',
  7089. stringTag = '[object String]',
  7090. symbolTag = '[object Symbol]';
  7091. var arrayBufferTag = '[object ArrayBuffer]',
  7092. dataViewTag = '[object DataView]';
  7093. /** Used to convert symbols to primitives and strings. */
  7094. var symbolProto = Symbol ? Symbol.prototype : undefined,
  7095. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  7096. /**
  7097. * A specialized version of `baseIsEqualDeep` for comparing objects of
  7098. * the same `toStringTag`.
  7099. *
  7100. * **Note:** This function only supports comparing values with tags of
  7101. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  7102. *
  7103. * @private
  7104. * @param {Object} object The object to compare.
  7105. * @param {Object} other The other object to compare.
  7106. * @param {string} tag The `toStringTag` of the objects to compare.
  7107. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  7108. * @param {Function} customizer The function to customize comparisons.
  7109. * @param {Function} equalFunc The function to determine equivalents of values.
  7110. * @param {Object} stack Tracks traversed `object` and `other` objects.
  7111. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  7112. */
  7113. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  7114. switch (tag) {
  7115. case dataViewTag:
  7116. if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
  7117. return false;
  7118. }
  7119. object = object.buffer;
  7120. other = other.buffer;
  7121. case arrayBufferTag:
  7122. if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  7123. return false;
  7124. }
  7125. return true;
  7126. case boolTag:
  7127. case dateTag:
  7128. case numberTag:
  7129. // Coerce booleans to `1` or `0` and dates to milliseconds.
  7130. // Invalid dates are coerced to `NaN`.
  7131. return eq(+object, +other);
  7132. case errorTag:
  7133. return object.name == other.name && object.message == other.message;
  7134. case regexpTag:
  7135. case stringTag:
  7136. // Coerce regexes to strings and treat strings, primitives and objects,
  7137. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  7138. // for more details.
  7139. return object == other + '';
  7140. case mapTag:
  7141. var convert = mapToArray;
  7142. case setTag:
  7143. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  7144. convert || (convert = setToArray);
  7145. if (object.size != other.size && !isPartial) {
  7146. return false;
  7147. }
  7148. // Assume cyclic values are equal.
  7149. var stacked = stack.get(object);
  7150. if (stacked) {
  7151. return stacked == other;
  7152. }
  7153. bitmask |= COMPARE_UNORDERED_FLAG;
  7154. // Recursively compare objects (susceptible to call stack limits).
  7155. stack.set(object, other);
  7156. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  7157. stack['delete'](object);
  7158. return result;
  7159. case symbolTag:
  7160. if (symbolValueOf) {
  7161. return symbolValueOf.call(object) == symbolValueOf.call(other);
  7162. }
  7163. }
  7164. return false;
  7165. }
  7166. module.exports = equalByTag;
  7167. });
  7168. $__System.registerDynamic('75', ['76'], true, function ($__require, exports, module) {
  7169. var global = this || self,
  7170. GLOBAL = global;
  7171. var getAllKeys = $__require('76');
  7172. /** Used to compose bitmasks for value comparisons. */
  7173. var COMPARE_PARTIAL_FLAG = 1;
  7174. /** Used for built-in method references. */
  7175. var objectProto = Object.prototype;
  7176. /** Used to check objects for own properties. */
  7177. var hasOwnProperty = objectProto.hasOwnProperty;
  7178. /**
  7179. * A specialized version of `baseIsEqualDeep` for objects with support for
  7180. * partial deep comparisons.
  7181. *
  7182. * @private
  7183. * @param {Object} object The object to compare.
  7184. * @param {Object} other The other object to compare.
  7185. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  7186. * @param {Function} customizer The function to customize comparisons.
  7187. * @param {Function} equalFunc The function to determine equivalents of values.
  7188. * @param {Object} stack Tracks traversed `object` and `other` objects.
  7189. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  7190. */
  7191. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  7192. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  7193. objProps = getAllKeys(object),
  7194. objLength = objProps.length,
  7195. othProps = getAllKeys(other),
  7196. othLength = othProps.length;
  7197. if (objLength != othLength && !isPartial) {
  7198. return false;
  7199. }
  7200. var index = objLength;
  7201. while (index--) {
  7202. var key = objProps[index];
  7203. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  7204. return false;
  7205. }
  7206. }
  7207. // Assume cyclic values are equal.
  7208. var stacked = stack.get(object);
  7209. if (stacked && stack.get(other)) {
  7210. return stacked == other;
  7211. }
  7212. var result = true;
  7213. stack.set(object, other);
  7214. stack.set(other, object);
  7215. var skipCtor = isPartial;
  7216. while (++index < objLength) {
  7217. key = objProps[index];
  7218. var objValue = object[key],
  7219. othValue = other[key];
  7220. if (customizer) {
  7221. var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
  7222. }
  7223. // Recursively compare objects (susceptible to call stack limits).
  7224. if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  7225. result = false;
  7226. break;
  7227. }
  7228. skipCtor || (skipCtor = key == 'constructor');
  7229. }
  7230. if (result && !skipCtor) {
  7231. var objCtor = object.constructor,
  7232. othCtor = other.constructor;
  7233. // Non `Object` object instances with different constructors are not equal.
  7234. if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  7235. result = false;
  7236. }
  7237. }
  7238. stack['delete'](object);
  7239. stack['delete'](other);
  7240. return result;
  7241. }
  7242. module.exports = equalObjects;
  7243. });
  7244. $__System.registerDynamic('77', ['66', '6d', '70', '75', '78', '4b', '79', '7a'], true, function ($__require, exports, module) {
  7245. var global = this || self,
  7246. GLOBAL = global;
  7247. var Stack = $__require('66'),
  7248. equalArrays = $__require('6d'),
  7249. equalByTag = $__require('70'),
  7250. equalObjects = $__require('75'),
  7251. getTag = $__require('78'),
  7252. isArray = $__require('4b'),
  7253. isBuffer = $__require('79'),
  7254. isTypedArray = $__require('7a');
  7255. /** Used to compose bitmasks for value comparisons. */
  7256. var COMPARE_PARTIAL_FLAG = 1;
  7257. /** `Object#toString` result references. */
  7258. var argsTag = '[object Arguments]',
  7259. arrayTag = '[object Array]',
  7260. objectTag = '[object Object]';
  7261. /** Used for built-in method references. */
  7262. var objectProto = Object.prototype;
  7263. /** Used to check objects for own properties. */
  7264. var hasOwnProperty = objectProto.hasOwnProperty;
  7265. /**
  7266. * A specialized version of `baseIsEqual` for arrays and objects which performs
  7267. * deep comparisons and tracks traversed objects enabling objects with circular
  7268. * references to be compared.
  7269. *
  7270. * @private
  7271. * @param {Object} object The object to compare.
  7272. * @param {Object} other The other object to compare.
  7273. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  7274. * @param {Function} customizer The function to customize comparisons.
  7275. * @param {Function} equalFunc The function to determine equivalents of values.
  7276. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  7277. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  7278. */
  7279. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  7280. var objIsArr = isArray(object),
  7281. othIsArr = isArray(other),
  7282. objTag = objIsArr ? arrayTag : getTag(object),
  7283. othTag = othIsArr ? arrayTag : getTag(other);
  7284. objTag = objTag == argsTag ? objectTag : objTag;
  7285. othTag = othTag == argsTag ? objectTag : othTag;
  7286. var objIsObj = objTag == objectTag,
  7287. othIsObj = othTag == objectTag,
  7288. isSameTag = objTag == othTag;
  7289. if (isSameTag && isBuffer(object)) {
  7290. if (!isBuffer(other)) {
  7291. return false;
  7292. }
  7293. objIsArr = true;
  7294. objIsObj = false;
  7295. }
  7296. if (isSameTag && !objIsObj) {
  7297. stack || (stack = new Stack());
  7298. return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  7299. }
  7300. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  7301. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  7302. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  7303. if (objIsWrapped || othIsWrapped) {
  7304. var objUnwrapped = objIsWrapped ? object.value() : object,
  7305. othUnwrapped = othIsWrapped ? other.value() : other;
  7306. stack || (stack = new Stack());
  7307. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  7308. }
  7309. }
  7310. if (!isSameTag) {
  7311. return false;
  7312. }
  7313. stack || (stack = new Stack());
  7314. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  7315. }
  7316. module.exports = baseIsEqualDeep;
  7317. });
  7318. $__System.registerDynamic('67', ['77', '7b'], true, function ($__require, exports, module) {
  7319. var global = this || self,
  7320. GLOBAL = global;
  7321. var baseIsEqualDeep = $__require('77'),
  7322. isObjectLike = $__require('7b');
  7323. /**
  7324. * The base implementation of `_.isEqual` which supports partial comparisons
  7325. * and tracks traversed objects.
  7326. *
  7327. * @private
  7328. * @param {*} value The value to compare.
  7329. * @param {*} other The other value to compare.
  7330. * @param {boolean} bitmask The bitmask flags.
  7331. * 1 - Unordered comparison
  7332. * 2 - Partial comparison
  7333. * @param {Function} [customizer] The function to customize comparisons.
  7334. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  7335. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  7336. */
  7337. function baseIsEqual(value, other, bitmask, customizer, stack) {
  7338. if (value === other) {
  7339. return true;
  7340. }
  7341. if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
  7342. return value !== value && other !== other;
  7343. }
  7344. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  7345. }
  7346. module.exports = baseIsEqual;
  7347. });
  7348. $__System.registerDynamic('7c', ['7d'], true, function ($__require, exports, module) {
  7349. var global = this || self,
  7350. GLOBAL = global;
  7351. var baseGet = $__require('7d');
  7352. /**
  7353. * Gets the value at `path` of `object`. If the resolved value is
  7354. * `undefined`, the `defaultValue` is returned in its place.
  7355. *
  7356. * @static
  7357. * @memberOf _
  7358. * @since 3.7.0
  7359. * @category Object
  7360. * @param {Object} object The object to query.
  7361. * @param {Array|string} path The path of the property to get.
  7362. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  7363. * @returns {*} Returns the resolved value.
  7364. * @example
  7365. *
  7366. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  7367. *
  7368. * _.get(object, 'a[0].b.c');
  7369. * // => 3
  7370. *
  7371. * _.get(object, ['a', '0', 'b', 'c']);
  7372. * // => 3
  7373. *
  7374. * _.get(object, 'a.b.c', 'default');
  7375. * // => 'default'
  7376. */
  7377. function get(object, path, defaultValue) {
  7378. var result = object == null ? undefined : baseGet(object, path);
  7379. return result === undefined ? defaultValue : result;
  7380. }
  7381. module.exports = get;
  7382. });
  7383. $__System.registerDynamic("7e", [], true, function ($__require, exports, module) {
  7384. var global = this || self,
  7385. GLOBAL = global;
  7386. /**
  7387. * The base implementation of `_.hasIn` without support for deep paths.
  7388. *
  7389. * @private
  7390. * @param {Object} [object] The object to query.
  7391. * @param {Array|string} key The key to check.
  7392. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  7393. */
  7394. function baseHasIn(object, key) {
  7395. return object != null && key in Object(object);
  7396. }
  7397. module.exports = baseHasIn;
  7398. });
  7399. $__System.registerDynamic('7f', ['7e', '80'], true, function ($__require, exports, module) {
  7400. var global = this || self,
  7401. GLOBAL = global;
  7402. var baseHasIn = $__require('7e'),
  7403. hasPath = $__require('80');
  7404. /**
  7405. * Checks if `path` is a direct or inherited property of `object`.
  7406. *
  7407. * @static
  7408. * @memberOf _
  7409. * @since 4.0.0
  7410. * @category Object
  7411. * @param {Object} object The object to query.
  7412. * @param {Array|string} path The path to check.
  7413. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  7414. * @example
  7415. *
  7416. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  7417. *
  7418. * _.hasIn(object, 'a');
  7419. * // => true
  7420. *
  7421. * _.hasIn(object, 'a.b');
  7422. * // => true
  7423. *
  7424. * _.hasIn(object, ['a', 'b']);
  7425. * // => true
  7426. *
  7427. * _.hasIn(object, 'b');
  7428. * // => false
  7429. */
  7430. function hasIn(object, path) {
  7431. return object != null && hasPath(object, path, baseHasIn);
  7432. }
  7433. module.exports = hasIn;
  7434. });
  7435. $__System.registerDynamic('69', ['81'], true, function ($__require, exports, module) {
  7436. var global = this || self,
  7437. GLOBAL = global;
  7438. var isObject = $__require('81');
  7439. /**
  7440. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  7441. *
  7442. * @private
  7443. * @param {*} value The value to check.
  7444. * @returns {boolean} Returns `true` if `value` if suitable for strict
  7445. * equality comparisons, else `false`.
  7446. */
  7447. function isStrictComparable(value) {
  7448. return value === value && !isObject(value);
  7449. }
  7450. module.exports = isStrictComparable;
  7451. });
  7452. $__System.registerDynamic("6b", [], true, function ($__require, exports, module) {
  7453. var global = this || self,
  7454. GLOBAL = global;
  7455. /**
  7456. * A specialized version of `matchesProperty` for source values suitable
  7457. * for strict equality comparisons, i.e. `===`.
  7458. *
  7459. * @private
  7460. * @param {string} key The key of the property to get.
  7461. * @param {*} srcValue The value to match.
  7462. * @returns {Function} Returns the new spec function.
  7463. */
  7464. function matchesStrictComparable(key, srcValue) {
  7465. return function (object) {
  7466. if (object == null) {
  7467. return false;
  7468. }
  7469. return object[key] === srcValue && (srcValue !== undefined || key in Object(object));
  7470. };
  7471. }
  7472. module.exports = matchesStrictComparable;
  7473. });
  7474. $__System.registerDynamic('82', ['67', '7c', '7f', '83', '69', '6b', '84'], true, function ($__require, exports, module) {
  7475. var global = this || self,
  7476. GLOBAL = global;
  7477. var baseIsEqual = $__require('67'),
  7478. get = $__require('7c'),
  7479. hasIn = $__require('7f'),
  7480. isKey = $__require('83'),
  7481. isStrictComparable = $__require('69'),
  7482. matchesStrictComparable = $__require('6b'),
  7483. toKey = $__require('84');
  7484. /** Used to compose bitmasks for value comparisons. */
  7485. var COMPARE_PARTIAL_FLAG = 1,
  7486. COMPARE_UNORDERED_FLAG = 2;
  7487. /**
  7488. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  7489. *
  7490. * @private
  7491. * @param {string} path The path of the property to get.
  7492. * @param {*} srcValue The value to match.
  7493. * @returns {Function} Returns the new spec function.
  7494. */
  7495. function baseMatchesProperty(path, srcValue) {
  7496. if (isKey(path) && isStrictComparable(srcValue)) {
  7497. return matchesStrictComparable(toKey(path), srcValue);
  7498. }
  7499. return function (object) {
  7500. var objValue = get(object, path);
  7501. return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  7502. };
  7503. }
  7504. module.exports = baseMatchesProperty;
  7505. });
  7506. $__System.registerDynamic("85", [], true, function ($__require, exports, module) {
  7507. var global = this || self,
  7508. GLOBAL = global;
  7509. /**
  7510. * The base implementation of `_.property` without support for deep paths.
  7511. *
  7512. * @private
  7513. * @param {string} key The key of the property to get.
  7514. * @returns {Function} Returns the new accessor function.
  7515. */
  7516. function baseProperty(key) {
  7517. return function (object) {
  7518. return object == null ? undefined : object[key];
  7519. };
  7520. }
  7521. module.exports = baseProperty;
  7522. });
  7523. $__System.registerDynamic('7d', ['86', '84'], true, function ($__require, exports, module) {
  7524. var global = this || self,
  7525. GLOBAL = global;
  7526. var castPath = $__require('86'),
  7527. toKey = $__require('84');
  7528. /**
  7529. * The base implementation of `_.get` without support for default values.
  7530. *
  7531. * @private
  7532. * @param {Object} object The object to query.
  7533. * @param {Array|string} path The path of the property to get.
  7534. * @returns {*} Returns the resolved value.
  7535. */
  7536. function baseGet(object, path) {
  7537. path = castPath(path, object);
  7538. var index = 0,
  7539. length = path.length;
  7540. while (object != null && index < length) {
  7541. object = object[toKey(path[index++])];
  7542. }
  7543. return index && index == length ? object : undefined;
  7544. }
  7545. module.exports = baseGet;
  7546. });
  7547. $__System.registerDynamic('87', ['7d'], true, function ($__require, exports, module) {
  7548. var global = this || self,
  7549. GLOBAL = global;
  7550. var baseGet = $__require('7d');
  7551. /**
  7552. * A specialized version of `baseProperty` which supports deep paths.
  7553. *
  7554. * @private
  7555. * @param {Array|string} path The path of the property to get.
  7556. * @returns {Function} Returns the new accessor function.
  7557. */
  7558. function basePropertyDeep(path) {
  7559. return function (object) {
  7560. return baseGet(object, path);
  7561. };
  7562. }
  7563. module.exports = basePropertyDeep;
  7564. });
  7565. $__System.registerDynamic('88', ['85', '87', '83', '84'], true, function ($__require, exports, module) {
  7566. var global = this || self,
  7567. GLOBAL = global;
  7568. var baseProperty = $__require('85'),
  7569. basePropertyDeep = $__require('87'),
  7570. isKey = $__require('83'),
  7571. toKey = $__require('84');
  7572. /**
  7573. * Creates a function that returns the value at `path` of a given object.
  7574. *
  7575. * @static
  7576. * @memberOf _
  7577. * @since 2.4.0
  7578. * @category Util
  7579. * @param {Array|string} path The path of the property to get.
  7580. * @returns {Function} Returns the new accessor function.
  7581. * @example
  7582. *
  7583. * var objects = [
  7584. * { 'a': { 'b': 2 } },
  7585. * { 'a': { 'b': 1 } }
  7586. * ];
  7587. *
  7588. * _.map(objects, _.property('a.b'));
  7589. * // => [2, 1]
  7590. *
  7591. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  7592. * // => [1, 2]
  7593. */
  7594. function property(path) {
  7595. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  7596. }
  7597. module.exports = property;
  7598. });
  7599. $__System.registerDynamic('3b', ['6a', '82', '89', '4b', '88'], true, function ($__require, exports, module) {
  7600. var global = this || self,
  7601. GLOBAL = global;
  7602. var baseMatches = $__require('6a'),
  7603. baseMatchesProperty = $__require('82'),
  7604. identity = $__require('89'),
  7605. isArray = $__require('4b'),
  7606. property = $__require('88');
  7607. /**
  7608. * The base implementation of `_.iteratee`.
  7609. *
  7610. * @private
  7611. * @param {*} [value=_.identity] The value to convert to an iteratee.
  7612. * @returns {Function} Returns the iteratee.
  7613. */
  7614. function baseIteratee(value) {
  7615. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  7616. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  7617. if (typeof value == 'function') {
  7618. return value;
  7619. }
  7620. if (value == null) {
  7621. return identity;
  7622. }
  7623. if (typeof value == 'object') {
  7624. return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
  7625. }
  7626. return property(value);
  7627. }
  7628. module.exports = baseIteratee;
  7629. });
  7630. $__System.registerDynamic('8a', ['8b', '40'], true, function ($__require, exports, module) {
  7631. var global = this || self,
  7632. GLOBAL = global;
  7633. var baseFor = $__require('8b'),
  7634. keys = $__require('40');
  7635. /**
  7636. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  7637. *
  7638. * @private
  7639. * @param {Object} object The object to iterate over.
  7640. * @param {Function} iteratee The function invoked per iteration.
  7641. * @returns {Object} Returns `object`.
  7642. */
  7643. function baseForOwn(object, iteratee) {
  7644. return object && baseFor(object, iteratee, keys);
  7645. }
  7646. module.exports = baseForOwn;
  7647. });
  7648. $__System.registerDynamic('8c', ['3f'], true, function ($__require, exports, module) {
  7649. var global = this || self,
  7650. GLOBAL = global;
  7651. var isArrayLike = $__require('3f');
  7652. /**
  7653. * Creates a `baseEach` or `baseEachRight` function.
  7654. *
  7655. * @private
  7656. * @param {Function} eachFunc The function to iterate over a collection.
  7657. * @param {boolean} [fromRight] Specify iterating from right to left.
  7658. * @returns {Function} Returns the new base function.
  7659. */
  7660. function createBaseEach(eachFunc, fromRight) {
  7661. return function (collection, iteratee) {
  7662. if (collection == null) {
  7663. return collection;
  7664. }
  7665. if (!isArrayLike(collection)) {
  7666. return eachFunc(collection, iteratee);
  7667. }
  7668. var length = collection.length,
  7669. index = fromRight ? length : -1,
  7670. iterable = Object(collection);
  7671. while (fromRight ? index-- : ++index < length) {
  7672. if (iteratee(iterable[index], index, iterable) === false) {
  7673. break;
  7674. }
  7675. }
  7676. return collection;
  7677. };
  7678. }
  7679. module.exports = createBaseEach;
  7680. });
  7681. $__System.registerDynamic('8d', ['8a', '8c'], true, function ($__require, exports, module) {
  7682. var global = this || self,
  7683. GLOBAL = global;
  7684. var baseForOwn = $__require('8a'),
  7685. createBaseEach = $__require('8c');
  7686. /**
  7687. * The base implementation of `_.forEach` without support for iteratee shorthands.
  7688. *
  7689. * @private
  7690. * @param {Array|Object} collection The collection to iterate over.
  7691. * @param {Function} iteratee The function invoked per iteration.
  7692. * @returns {Array|Object} Returns `collection`.
  7693. */
  7694. var baseEach = createBaseEach(baseForOwn);
  7695. module.exports = baseEach;
  7696. });
  7697. $__System.registerDynamic('4a', ['8d', '3f'], true, function ($__require, exports, module) {
  7698. var global = this || self,
  7699. GLOBAL = global;
  7700. var baseEach = $__require('8d'),
  7701. isArrayLike = $__require('3f');
  7702. /**
  7703. * The base implementation of `_.map` without support for iteratee shorthands.
  7704. *
  7705. * @private
  7706. * @param {Array|Object} collection The collection to iterate over.
  7707. * @param {Function} iteratee The function invoked per iteration.
  7708. * @returns {Array} Returns the new mapped array.
  7709. */
  7710. function baseMap(collection, iteratee) {
  7711. var index = -1,
  7712. result = isArrayLike(collection) ? Array(collection.length) : [];
  7713. baseEach(collection, function (value, key, collection) {
  7714. result[++index] = iteratee(value, key, collection);
  7715. });
  7716. return result;
  7717. }
  7718. module.exports = baseMap;
  7719. });
  7720. $__System.registerDynamic("8e", [], true, function ($__require, exports, module) {
  7721. var global = this || self,
  7722. GLOBAL = global;
  7723. /**
  7724. * The base implementation of `_.sortBy` which uses `comparer` to define the
  7725. * sort order of `array` and replaces criteria objects with their corresponding
  7726. * values.
  7727. *
  7728. * @private
  7729. * @param {Array} array The array to sort.
  7730. * @param {Function} comparer The function to define sort order.
  7731. * @returns {Array} Returns `array`.
  7732. */
  7733. function baseSortBy(array, comparer) {
  7734. var length = array.length;
  7735. array.sort(comparer);
  7736. while (length--) {
  7737. array[length] = array[length].value;
  7738. }
  7739. return array;
  7740. }
  7741. module.exports = baseSortBy;
  7742. });
  7743. $__System.registerDynamic('8f', ['90'], true, function ($__require, exports, module) {
  7744. var global = this || self,
  7745. GLOBAL = global;
  7746. var isSymbol = $__require('90');
  7747. /**
  7748. * Compares values to sort them in ascending order.
  7749. *
  7750. * @private
  7751. * @param {*} value The value to compare.
  7752. * @param {*} other The other value to compare.
  7753. * @returns {number} Returns the sort order indicator for `value`.
  7754. */
  7755. function compareAscending(value, other) {
  7756. if (value !== other) {
  7757. var valIsDefined = value !== undefined,
  7758. valIsNull = value === null,
  7759. valIsReflexive = value === value,
  7760. valIsSymbol = isSymbol(value);
  7761. var othIsDefined = other !== undefined,
  7762. othIsNull = other === null,
  7763. othIsReflexive = other === other,
  7764. othIsSymbol = isSymbol(other);
  7765. if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
  7766. return 1;
  7767. }
  7768. if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
  7769. return -1;
  7770. }
  7771. }
  7772. return 0;
  7773. }
  7774. module.exports = compareAscending;
  7775. });
  7776. $__System.registerDynamic('91', ['8f'], true, function ($__require, exports, module) {
  7777. var global = this || self,
  7778. GLOBAL = global;
  7779. var compareAscending = $__require('8f');
  7780. /**
  7781. * Used by `_.orderBy` to compare multiple properties of a value to another
  7782. * and stable sort them.
  7783. *
  7784. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  7785. * specify an order of "desc" for descending or "asc" for ascending sort order
  7786. * of corresponding values.
  7787. *
  7788. * @private
  7789. * @param {Object} object The object to compare.
  7790. * @param {Object} other The other object to compare.
  7791. * @param {boolean[]|string[]} orders The order to sort by for each property.
  7792. * @returns {number} Returns the sort order indicator for `object`.
  7793. */
  7794. function compareMultiple(object, other, orders) {
  7795. var index = -1,
  7796. objCriteria = object.criteria,
  7797. othCriteria = other.criteria,
  7798. length = objCriteria.length,
  7799. ordersLength = orders.length;
  7800. while (++index < length) {
  7801. var result = compareAscending(objCriteria[index], othCriteria[index]);
  7802. if (result) {
  7803. if (index >= ordersLength) {
  7804. return result;
  7805. }
  7806. var order = orders[index];
  7807. return result * (order == 'desc' ? -1 : 1);
  7808. }
  7809. }
  7810. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  7811. // that causes it, under certain circumstances, to provide the same value for
  7812. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  7813. // for more details.
  7814. //
  7815. // This also ensures a stable sort in V8 and other engines.
  7816. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  7817. return object.index - other.index;
  7818. }
  7819. module.exports = compareMultiple;
  7820. });
  7821. $__System.registerDynamic('92', ['49', '3b', '4a', '8e', '93', '91', '89'], true, function ($__require, exports, module) {
  7822. var global = this || self,
  7823. GLOBAL = global;
  7824. var arrayMap = $__require('49'),
  7825. baseIteratee = $__require('3b'),
  7826. baseMap = $__require('4a'),
  7827. baseSortBy = $__require('8e'),
  7828. baseUnary = $__require('93'),
  7829. compareMultiple = $__require('91'),
  7830. identity = $__require('89');
  7831. /**
  7832. * The base implementation of `_.orderBy` without param guards.
  7833. *
  7834. * @private
  7835. * @param {Array|Object} collection The collection to iterate over.
  7836. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  7837. * @param {string[]} orders The sort orders of `iteratees`.
  7838. * @returns {Array} Returns the new sorted array.
  7839. */
  7840. function baseOrderBy(collection, iteratees, orders) {
  7841. var index = -1;
  7842. iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
  7843. var result = baseMap(collection, function (value, key, collection) {
  7844. var criteria = arrayMap(iteratees, function (iteratee) {
  7845. return iteratee(value);
  7846. });
  7847. return { 'criteria': criteria, 'index': ++index, 'value': value };
  7848. });
  7849. return baseSortBy(result, function (object, other) {
  7850. return compareMultiple(object, other, orders);
  7851. });
  7852. }
  7853. module.exports = baseOrderBy;
  7854. });
  7855. $__System.registerDynamic('94', ['63', '92', '95', '96'], true, function ($__require, exports, module) {
  7856. var global = this || self,
  7857. GLOBAL = global;
  7858. var baseFlatten = $__require('63'),
  7859. baseOrderBy = $__require('92'),
  7860. baseRest = $__require('95'),
  7861. isIterateeCall = $__require('96');
  7862. /**
  7863. * Creates an array of elements, sorted in ascending order by the results of
  7864. * running each element in a collection thru each iteratee. This method
  7865. * performs a stable sort, that is, it preserves the original sort order of
  7866. * equal elements. The iteratees are invoked with one argument: (value).
  7867. *
  7868. * @static
  7869. * @memberOf _
  7870. * @since 0.1.0
  7871. * @category Collection
  7872. * @param {Array|Object} collection The collection to iterate over.
  7873. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  7874. * The iteratees to sort by.
  7875. * @returns {Array} Returns the new sorted array.
  7876. * @example
  7877. *
  7878. * var users = [
  7879. * { 'user': 'fred', 'age': 48 },
  7880. * { 'user': 'barney', 'age': 36 },
  7881. * { 'user': 'fred', 'age': 40 },
  7882. * { 'user': 'barney', 'age': 34 }
  7883. * ];
  7884. *
  7885. * _.sortBy(users, [function(o) { return o.user; }]);
  7886. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  7887. *
  7888. * _.sortBy(users, ['user', 'age']);
  7889. * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
  7890. */
  7891. var sortBy = baseRest(function (collection, iteratees) {
  7892. if (collection == null) {
  7893. return [];
  7894. }
  7895. var length = iteratees.length;
  7896. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  7897. iteratees = [];
  7898. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  7899. iteratees = [iteratees[0]];
  7900. }
  7901. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  7902. });
  7903. module.exports = sortBy;
  7904. });
  7905. $__System.registerDynamic("97", ["98", "94", "c"], true, function ($__require, exports, module) {
  7906. "use strict";
  7907. var process = $__require("c");
  7908. var global = this || self,
  7909. GLOBAL = global;
  7910. exports.__esModule = true;
  7911. var _plugin = $__require("98");
  7912. var _plugin2 = _interopRequireDefault(_plugin);
  7913. var _sortBy = $__require("94");
  7914. var _sortBy2 = _interopRequireDefault(_sortBy);
  7915. function _interopRequireDefault(obj) {
  7916. return obj && obj.__esModule ? obj : { default: obj };
  7917. }
  7918. exports.default = new _plugin2.default({
  7919. name: "internal.blockHoist",
  7920. visitor: {
  7921. Block: {
  7922. exit: function exit(_ref) {
  7923. var node = _ref.node;
  7924. var hasChange = false;
  7925. for (var i = 0; i < node.body.length; i++) {
  7926. var bodyNode = node.body[i];
  7927. if (bodyNode && bodyNode._blockHoist != null) {
  7928. hasChange = true;
  7929. break;
  7930. }
  7931. }
  7932. if (!hasChange) return;
  7933. node.body = (0, _sortBy2.default)(node.body, function (bodyNode) {
  7934. var priority = bodyNode && bodyNode._blockHoist;
  7935. if (priority == null) priority = 1;
  7936. if (priority === true) priority = 2;
  7937. return -1 * priority;
  7938. });
  7939. }
  7940. }
  7941. }
  7942. });
  7943. module.exports = exports["default"];
  7944. });
  7945. $__System.registerDynamic("99", [], true, function ($__require, exports, module) {
  7946. "use strict";
  7947. var global = this || self,
  7948. GLOBAL = global;
  7949. exports.__esModule = true;
  7950. exports.default = function (obj, keys) {
  7951. var target = {};
  7952. for (var i in obj) {
  7953. if (keys.indexOf(i) >= 0) continue;
  7954. if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
  7955. target[i] = obj[i];
  7956. }
  7957. return target;
  7958. };
  7959. });
  7960. $__System.registerDynamic('9a', ['9b'], true, function ($__require, exports, module) {
  7961. var global = this || self,
  7962. GLOBAL = global;
  7963. var toString = $__require('9b');
  7964. /**
  7965. * Used to match `RegExp`
  7966. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  7967. */
  7968. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  7969. reHasRegExpChar = RegExp(reRegExpChar.source);
  7970. /**
  7971. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  7972. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  7973. *
  7974. * @static
  7975. * @memberOf _
  7976. * @since 3.0.0
  7977. * @category String
  7978. * @param {string} [string=''] The string to escape.
  7979. * @returns {string} Returns the escaped string.
  7980. * @example
  7981. *
  7982. * _.escapeRegExp('[lodash](https://lodash.com/)');
  7983. * // => '\[lodash\]\(https://lodash\.com/\)'
  7984. */
  7985. function escapeRegExp(string) {
  7986. string = toString(string);
  7987. return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string;
  7988. }
  7989. module.exports = escapeRegExp;
  7990. });
  7991. $__System.registerDynamic("9c", [], true, function ($__require, exports, module) {
  7992. var global = this || self,
  7993. GLOBAL = global;
  7994. /**
  7995. * The base implementation of `_.clamp` which doesn't coerce arguments.
  7996. *
  7997. * @private
  7998. * @param {number} number The number to clamp.
  7999. * @param {number} [lower] The lower bound.
  8000. * @param {number} upper The upper bound.
  8001. * @returns {number} Returns the clamped number.
  8002. */
  8003. function baseClamp(number, lower, upper) {
  8004. if (number === number) {
  8005. if (upper !== undefined) {
  8006. number = number <= upper ? number : upper;
  8007. }
  8008. if (lower !== undefined) {
  8009. number = number >= lower ? number : lower;
  8010. }
  8011. }
  8012. return number;
  8013. }
  8014. module.exports = baseClamp;
  8015. });
  8016. $__System.registerDynamic('9d', ['9c', '9e', '3c', '9b'], true, function ($__require, exports, module) {
  8017. var global = this || self,
  8018. GLOBAL = global;
  8019. var baseClamp = $__require('9c'),
  8020. baseToString = $__require('9e'),
  8021. toInteger = $__require('3c'),
  8022. toString = $__require('9b');
  8023. /**
  8024. * Checks if `string` starts with the given target string.
  8025. *
  8026. * @static
  8027. * @memberOf _
  8028. * @since 3.0.0
  8029. * @category String
  8030. * @param {string} [string=''] The string to inspect.
  8031. * @param {string} [target] The string to search for.
  8032. * @param {number} [position=0] The position to search from.
  8033. * @returns {boolean} Returns `true` if `string` starts with `target`,
  8034. * else `false`.
  8035. * @example
  8036. *
  8037. * _.startsWith('abc', 'a');
  8038. * // => true
  8039. *
  8040. * _.startsWith('abc', 'b');
  8041. * // => false
  8042. *
  8043. * _.startsWith('abc', 'b', 1);
  8044. * // => true
  8045. */
  8046. function startsWith(string, target, position) {
  8047. string = toString(string);
  8048. position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);
  8049. target = baseToString(target);
  8050. return string.slice(position, position + target.length) == target;
  8051. }
  8052. module.exports = startsWith;
  8053. });
  8054. $__System.registerDynamic('9f', [], true, function ($__require, exports, module) {
  8055. var global = this || self,
  8056. GLOBAL = global;
  8057. module.exports = function (xs, fn) {
  8058. var res = [];
  8059. for (var i = 0; i < xs.length; i++) {
  8060. var x = fn(xs[i], i);
  8061. if (isArray(x)) res.push.apply(res, x);else res.push(x);
  8062. }
  8063. return res;
  8064. };
  8065. var isArray = Array.isArray || function (xs) {
  8066. return Object.prototype.toString.call(xs) === '[object Array]';
  8067. };
  8068. });
  8069. $__System.registerDynamic('a0', [], true, function ($__require, exports, module) {
  8070. 'use strict';
  8071. var global = this || self,
  8072. GLOBAL = global;
  8073. module.exports = balanced;
  8074. function balanced(a, b, str) {
  8075. if (a instanceof RegExp) a = maybeMatch(a, str);
  8076. if (b instanceof RegExp) b = maybeMatch(b, str);
  8077. var r = range(a, b, str);
  8078. return r && {
  8079. start: r[0],
  8080. end: r[1],
  8081. pre: str.slice(0, r[0]),
  8082. body: str.slice(r[0] + a.length, r[1]),
  8083. post: str.slice(r[1] + b.length)
  8084. };
  8085. }
  8086. function maybeMatch(reg, str) {
  8087. var m = str.match(reg);
  8088. return m ? m[0] : null;
  8089. }
  8090. balanced.range = range;
  8091. function range(a, b, str) {
  8092. var begs, beg, left, right, result;
  8093. var ai = str.indexOf(a);
  8094. var bi = str.indexOf(b, ai + 1);
  8095. var i = ai;
  8096. if (ai >= 0 && bi > 0) {
  8097. begs = [];
  8098. left = str.length;
  8099. while (i >= 0 && !result) {
  8100. if (i == ai) {
  8101. begs.push(i);
  8102. ai = str.indexOf(a, i + 1);
  8103. } else if (begs.length == 1) {
  8104. result = [begs.pop(), bi];
  8105. } else {
  8106. beg = begs.pop();
  8107. if (beg < left) {
  8108. left = beg;
  8109. right = bi;
  8110. }
  8111. bi = str.indexOf(b, i + 1);
  8112. }
  8113. i = ai < bi && ai >= 0 ? ai : bi;
  8114. }
  8115. if (begs.length) {
  8116. result = [left, right];
  8117. }
  8118. }
  8119. return result;
  8120. }
  8121. });
  8122. $__System.registerDynamic('a1', ['9f', 'a0'], true, function ($__require, exports, module) {
  8123. var global = this || self,
  8124. GLOBAL = global;
  8125. var concatMap = $__require('9f');
  8126. var balanced = $__require('a0');
  8127. module.exports = expandTop;
  8128. var escSlash = '\0SLASH' + Math.random() + '\0';
  8129. var escOpen = '\0OPEN' + Math.random() + '\0';
  8130. var escClose = '\0CLOSE' + Math.random() + '\0';
  8131. var escComma = '\0COMMA' + Math.random() + '\0';
  8132. var escPeriod = '\0PERIOD' + Math.random() + '\0';
  8133. function numeric(str) {
  8134. return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
  8135. }
  8136. function escapeBraces(str) {
  8137. return str.split('\\\\').join(escSlash).split('\\{').join(escOpen).split('\\}').join(escClose).split('\\,').join(escComma).split('\\.').join(escPeriod);
  8138. }
  8139. function unescapeBraces(str) {
  8140. return str.split(escSlash).join('\\').split(escOpen).join('{').split(escClose).join('}').split(escComma).join(',').split(escPeriod).join('.');
  8141. }
  8142. // Basically just str.split(","), but handling cases
  8143. // where we have nested braced sections, which should be
  8144. // treated as individual members, like {a,{b,c},d}
  8145. function parseCommaParts(str) {
  8146. if (!str) return [''];
  8147. var parts = [];
  8148. var m = balanced('{', '}', str);
  8149. if (!m) return str.split(',');
  8150. var pre = m.pre;
  8151. var body = m.body;
  8152. var post = m.post;
  8153. var p = pre.split(',');
  8154. p[p.length - 1] += '{' + body + '}';
  8155. var postParts = parseCommaParts(post);
  8156. if (post.length) {
  8157. p[p.length - 1] += postParts.shift();
  8158. p.push.apply(p, postParts);
  8159. }
  8160. parts.push.apply(parts, p);
  8161. return parts;
  8162. }
  8163. function expandTop(str) {
  8164. if (!str) return [];
  8165. // I don't know why Bash 4.3 does this, but it does.
  8166. // Anything starting with {} will have the first two bytes preserved
  8167. // but *only* at the top level, so {},a}b will not expand to anything,
  8168. // but a{},b}c will be expanded to [a}c,abc].
  8169. // One could argue that this is a bug in Bash, but since the goal of
  8170. // this module is to match Bash's rules, we escape a leading {}
  8171. if (str.substr(0, 2) === '{}') {
  8172. str = '\\{\\}' + str.substr(2);
  8173. }
  8174. return expand(escapeBraces(str), true).map(unescapeBraces);
  8175. }
  8176. function identity(e) {
  8177. return e;
  8178. }
  8179. function embrace(str) {
  8180. return '{' + str + '}';
  8181. }
  8182. function isPadded(el) {
  8183. return (/^-?0\d/.test(el)
  8184. );
  8185. }
  8186. function lte(i, y) {
  8187. return i <= y;
  8188. }
  8189. function gte(i, y) {
  8190. return i >= y;
  8191. }
  8192. function expand(str, isTop) {
  8193. var expansions = [];
  8194. var m = balanced('{', '}', str);
  8195. if (!m || /\$$/.test(m.pre)) return [str];
  8196. var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
  8197. var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
  8198. var isSequence = isNumericSequence || isAlphaSequence;
  8199. var isOptions = m.body.indexOf(',') >= 0;
  8200. if (!isSequence && !isOptions) {
  8201. // {a},b}
  8202. if (m.post.match(/,.*\}/)) {
  8203. str = m.pre + '{' + m.body + escClose + m.post;
  8204. return expand(str);
  8205. }
  8206. return [str];
  8207. }
  8208. var n;
  8209. if (isSequence) {
  8210. n = m.body.split(/\.\./);
  8211. } else {
  8212. n = parseCommaParts(m.body);
  8213. if (n.length === 1) {
  8214. // x{{a,b}}y ==> x{a}y x{b}y
  8215. n = expand(n[0], false).map(embrace);
  8216. if (n.length === 1) {
  8217. var post = m.post.length ? expand(m.post, false) : [''];
  8218. return post.map(function (p) {
  8219. return m.pre + n[0] + p;
  8220. });
  8221. }
  8222. }
  8223. }
  8224. // at this point, n is the parts, and we know it's not a comma set
  8225. // with a single entry.
  8226. // no need to expand pre, since it is guaranteed to be free of brace-sets
  8227. var pre = m.pre;
  8228. var post = m.post.length ? expand(m.post, false) : [''];
  8229. var N;
  8230. if (isSequence) {
  8231. var x = numeric(n[0]);
  8232. var y = numeric(n[1]);
  8233. var width = Math.max(n[0].length, n[1].length);
  8234. var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
  8235. var test = lte;
  8236. var reverse = y < x;
  8237. if (reverse) {
  8238. incr *= -1;
  8239. test = gte;
  8240. }
  8241. var pad = n.some(isPadded);
  8242. N = [];
  8243. for (var i = x; test(i, y); i += incr) {
  8244. var c;
  8245. if (isAlphaSequence) {
  8246. c = String.fromCharCode(i);
  8247. if (c === '\\') c = '';
  8248. } else {
  8249. c = String(i);
  8250. if (pad) {
  8251. var need = width - c.length;
  8252. if (need > 0) {
  8253. var z = new Array(need + 1).join('0');
  8254. if (i < 0) c = '-' + z + c.slice(1);else c = z + c;
  8255. }
  8256. }
  8257. }
  8258. N.push(c);
  8259. }
  8260. } else {
  8261. N = concatMap(n, function (el) {
  8262. return expand(el, false);
  8263. });
  8264. }
  8265. for (var j = 0; j < N.length; j++) {
  8266. for (var k = 0; k < post.length; k++) {
  8267. var expansion = pre + N[j] + post[k];
  8268. if (!isTop || isSequence || expansion) expansions.push(expansion);
  8269. }
  8270. }
  8271. return expansions;
  8272. }
  8273. });
  8274. $__System.registerDynamic('a2', ['@node/path', 'a1'], true, function ($__require, exports, module) {
  8275. var global = this || self,
  8276. GLOBAL = global;
  8277. module.exports = minimatch;
  8278. minimatch.Minimatch = Minimatch;
  8279. var path = { sep: '/' };
  8280. try {
  8281. path = $__require('@node/path');
  8282. } catch (er) {}
  8283. var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
  8284. var expand = $__require('a1');
  8285. var plTypes = {
  8286. '!': { open: '(?:(?!(?:', close: '))[^/]*?)' },
  8287. '?': { open: '(?:', close: ')?' },
  8288. '+': { open: '(?:', close: ')+' },
  8289. '*': { open: '(?:', close: ')*' },
  8290. '@': { open: '(?:', close: ')' }
  8291. };
  8292. // any single thing other than /
  8293. // don't need to escape / when using new RegExp()
  8294. var qmark = '[^/]';
  8295. // * => any number of characters
  8296. var star = qmark + '*?';
  8297. // ** when dots are allowed. Anything goes, except .. and .
  8298. // not (^ or / followed by one or two dots followed by $ or /),
  8299. // followed by anything, any number of times.
  8300. var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?';
  8301. // not a ^ or / followed by a dot,
  8302. // followed by anything, any number of times.
  8303. var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?';
  8304. // characters that need to be escaped in RegExp.
  8305. var reSpecials = charSet('().*{}+?[]^$\\!');
  8306. // "abc" -> { a:true, b:true, c:true }
  8307. function charSet(s) {
  8308. return s.split('').reduce(function (set, c) {
  8309. set[c] = true;
  8310. return set;
  8311. }, {});
  8312. }
  8313. // normalizes slashes.
  8314. var slashSplit = /\/+/;
  8315. minimatch.filter = filter;
  8316. function filter(pattern, options) {
  8317. options = options || {};
  8318. return function (p, i, list) {
  8319. return minimatch(p, pattern, options);
  8320. };
  8321. }
  8322. function ext(a, b) {
  8323. a = a || {};
  8324. b = b || {};
  8325. var t = {};
  8326. Object.keys(b).forEach(function (k) {
  8327. t[k] = b[k];
  8328. });
  8329. Object.keys(a).forEach(function (k) {
  8330. t[k] = a[k];
  8331. });
  8332. return t;
  8333. }
  8334. minimatch.defaults = function (def) {
  8335. if (!def || !Object.keys(def).length) return minimatch;
  8336. var orig = minimatch;
  8337. var m = function minimatch(p, pattern, options) {
  8338. return orig.minimatch(p, pattern, ext(def, options));
  8339. };
  8340. m.Minimatch = function Minimatch(pattern, options) {
  8341. return new orig.Minimatch(pattern, ext(def, options));
  8342. };
  8343. return m;
  8344. };
  8345. Minimatch.defaults = function (def) {
  8346. if (!def || !Object.keys(def).length) return Minimatch;
  8347. return minimatch.defaults(def).Minimatch;
  8348. };
  8349. function minimatch(p, pattern, options) {
  8350. if (typeof pattern !== 'string') {
  8351. throw new TypeError('glob pattern string required');
  8352. }
  8353. if (!options) options = {};
  8354. // shortcut: comments match nothing.
  8355. if (!options.nocomment && pattern.charAt(0) === '#') {
  8356. return false;
  8357. }
  8358. // "" only matches ""
  8359. if (pattern.trim() === '') return p === '';
  8360. return new Minimatch(pattern, options).match(p);
  8361. }
  8362. function Minimatch(pattern, options) {
  8363. if (!(this instanceof Minimatch)) {
  8364. return new Minimatch(pattern, options);
  8365. }
  8366. if (typeof pattern !== 'string') {
  8367. throw new TypeError('glob pattern string required');
  8368. }
  8369. if (!options) options = {};
  8370. pattern = pattern.trim();
  8371. // windows support: need to use /, not \
  8372. if (path.sep !== '/') {
  8373. pattern = pattern.split(path.sep).join('/');
  8374. }
  8375. this.options = options;
  8376. this.set = [];
  8377. this.pattern = pattern;
  8378. this.regexp = null;
  8379. this.negate = false;
  8380. this.comment = false;
  8381. this.empty = false;
  8382. // make the set of regexps etc.
  8383. this.make();
  8384. }
  8385. Minimatch.prototype.debug = function () {};
  8386. Minimatch.prototype.make = make;
  8387. function make() {
  8388. // don't do it more than once.
  8389. if (this._made) return;
  8390. var pattern = this.pattern;
  8391. var options = this.options;
  8392. // empty patterns and comments match nothing.
  8393. if (!options.nocomment && pattern.charAt(0) === '#') {
  8394. this.comment = true;
  8395. return;
  8396. }
  8397. if (!pattern) {
  8398. this.empty = true;
  8399. return;
  8400. }
  8401. // step 1: figure out negation, etc.
  8402. this.parseNegate();
  8403. // step 2: expand braces
  8404. var set = this.globSet = this.braceExpand();
  8405. if (options.debug) this.debug = console.error;
  8406. this.debug(this.pattern, set);
  8407. // step 3: now we have a set, so turn each one into a series of path-portion
  8408. // matching patterns.
  8409. // These will be regexps, except in the case of "**", which is
  8410. // set to the GLOBSTAR object for globstar behavior,
  8411. // and will not contain any / characters
  8412. set = this.globParts = set.map(function (s) {
  8413. return s.split(slashSplit);
  8414. });
  8415. this.debug(this.pattern, set);
  8416. // glob --> regexps
  8417. set = set.map(function (s, si, set) {
  8418. return s.map(this.parse, this);
  8419. }, this);
  8420. this.debug(this.pattern, set);
  8421. // filter out everything that didn't compile properly.
  8422. set = set.filter(function (s) {
  8423. return s.indexOf(false) === -1;
  8424. });
  8425. this.debug(this.pattern, set);
  8426. this.set = set;
  8427. }
  8428. Minimatch.prototype.parseNegate = parseNegate;
  8429. function parseNegate() {
  8430. var pattern = this.pattern;
  8431. var negate = false;
  8432. var options = this.options;
  8433. var negateOffset = 0;
  8434. if (options.nonegate) return;
  8435. for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === '!'; i++) {
  8436. negate = !negate;
  8437. negateOffset++;
  8438. }
  8439. if (negateOffset) this.pattern = pattern.substr(negateOffset);
  8440. this.negate = negate;
  8441. }
  8442. // Brace expansion:
  8443. // a{b,c}d -> abd acd
  8444. // a{b,}c -> abc ac
  8445. // a{0..3}d -> a0d a1d a2d a3d
  8446. // a{b,c{d,e}f}g -> abg acdfg acefg
  8447. // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
  8448. //
  8449. // Invalid sets are not expanded.
  8450. // a{2..}b -> a{2..}b
  8451. // a{b}c -> a{b}c
  8452. minimatch.braceExpand = function (pattern, options) {
  8453. return braceExpand(pattern, options);
  8454. };
  8455. Minimatch.prototype.braceExpand = braceExpand;
  8456. function braceExpand(pattern, options) {
  8457. if (!options) {
  8458. if (this instanceof Minimatch) {
  8459. options = this.options;
  8460. } else {
  8461. options = {};
  8462. }
  8463. }
  8464. pattern = typeof pattern === 'undefined' ? this.pattern : pattern;
  8465. if (typeof pattern === 'undefined') {
  8466. throw new TypeError('undefined pattern');
  8467. }
  8468. if (options.nobrace || !pattern.match(/\{.*\}/)) {
  8469. // shortcut. no need to expand.
  8470. return [pattern];
  8471. }
  8472. return expand(pattern);
  8473. }
  8474. // parse a component of the expanded set.
  8475. // At this point, no pattern may contain "/" in it
  8476. // so we're going to return a 2d array, where each entry is the full
  8477. // pattern, split on '/', and then turned into a regular expression.
  8478. // A regexp is made at the end which joins each array with an
  8479. // escaped /, and another full one which joins each regexp with |.
  8480. //
  8481. // Following the lead of Bash 4.1, note that "**" only has special meaning
  8482. // when it is the *only* thing in a path portion. Otherwise, any series
  8483. // of * is equivalent to a single *. Globstar behavior is enabled by
  8484. // default, and can be disabled by setting options.noglobstar.
  8485. Minimatch.prototype.parse = parse;
  8486. var SUBPARSE = {};
  8487. function parse(pattern, isSub) {
  8488. if (pattern.length > 1024 * 64) {
  8489. throw new TypeError('pattern is too long');
  8490. }
  8491. var options = this.options;
  8492. // shortcuts
  8493. if (!options.noglobstar && pattern === '**') return GLOBSTAR;
  8494. if (pattern === '') return '';
  8495. var re = '';
  8496. var hasMagic = !!options.nocase;
  8497. var escaping = false;
  8498. // ? => one single character
  8499. var patternListStack = [];
  8500. var negativeLists = [];
  8501. var stateChar;
  8502. var inClass = false;
  8503. var reClassStart = -1;
  8504. var classStart = -1;
  8505. // . and .. never match anything that doesn't start with .,
  8506. // even when options.dot is set.
  8507. var patternStart = pattern.charAt(0) === '.' ? '' // anything
  8508. // not (start or / followed by . or .. followed by / or end)
  8509. : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)';
  8510. var self = this;
  8511. function clearStateChar() {
  8512. if (stateChar) {
  8513. // we had some state-tracking character
  8514. // that wasn't consumed by this pass.
  8515. switch (stateChar) {
  8516. case '*':
  8517. re += star;
  8518. hasMagic = true;
  8519. break;
  8520. case '?':
  8521. re += qmark;
  8522. hasMagic = true;
  8523. break;
  8524. default:
  8525. re += '\\' + stateChar;
  8526. break;
  8527. }
  8528. self.debug('clearStateChar %j %j', stateChar, re);
  8529. stateChar = false;
  8530. }
  8531. }
  8532. for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
  8533. this.debug('%s\t%s %s %j', pattern, i, re, c);
  8534. // skip over any that are escaped.
  8535. if (escaping && reSpecials[c]) {
  8536. re += '\\' + c;
  8537. escaping = false;
  8538. continue;
  8539. }
  8540. switch (c) {
  8541. case '/':
  8542. // completely not allowed, even escaped.
  8543. // Should already be path-split by now.
  8544. return false;
  8545. case '\\':
  8546. clearStateChar();
  8547. escaping = true;
  8548. continue;
  8549. // the various stateChar values
  8550. // for the "extglob" stuff.
  8551. case '?':
  8552. case '*':
  8553. case '+':
  8554. case '@':
  8555. case '!':
  8556. this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c);
  8557. // all of those are literals inside a class, except that
  8558. // the glob [!a] means [^a] in regexp
  8559. if (inClass) {
  8560. this.debug(' in class');
  8561. if (c === '!' && i === classStart + 1) c = '^';
  8562. re += c;
  8563. continue;
  8564. }
  8565. // if we already have a stateChar, then it means
  8566. // that there was something like ** or +? in there.
  8567. // Handle the stateChar, then proceed with this one.
  8568. self.debug('call clearStateChar %j', stateChar);
  8569. clearStateChar();
  8570. stateChar = c;
  8571. // if extglob is disabled, then +(asdf|foo) isn't a thing.
  8572. // just clear the statechar *now*, rather than even diving into
  8573. // the patternList stuff.
  8574. if (options.noext) clearStateChar();
  8575. continue;
  8576. case '(':
  8577. if (inClass) {
  8578. re += '(';
  8579. continue;
  8580. }
  8581. if (!stateChar) {
  8582. re += '\\(';
  8583. continue;
  8584. }
  8585. patternListStack.push({
  8586. type: stateChar,
  8587. start: i - 1,
  8588. reStart: re.length,
  8589. open: plTypes[stateChar].open,
  8590. close: plTypes[stateChar].close
  8591. });
  8592. // negation is (?:(?!js)[^/]*)
  8593. re += stateChar === '!' ? '(?:(?!(?:' : '(?:';
  8594. this.debug('plType %j %j', stateChar, re);
  8595. stateChar = false;
  8596. continue;
  8597. case ')':
  8598. if (inClass || !patternListStack.length) {
  8599. re += '\\)';
  8600. continue;
  8601. }
  8602. clearStateChar();
  8603. hasMagic = true;
  8604. var pl = patternListStack.pop();
  8605. // negation is (?:(?!js)[^/]*)
  8606. // The others are (?:<pattern>)<type>
  8607. re += pl.close;
  8608. if (pl.type === '!') {
  8609. negativeLists.push(pl);
  8610. }
  8611. pl.reEnd = re.length;
  8612. continue;
  8613. case '|':
  8614. if (inClass || !patternListStack.length || escaping) {
  8615. re += '\\|';
  8616. escaping = false;
  8617. continue;
  8618. }
  8619. clearStateChar();
  8620. re += '|';
  8621. continue;
  8622. // these are mostly the same in regexp and glob
  8623. case '[':
  8624. // swallow any state-tracking char before the [
  8625. clearStateChar();
  8626. if (inClass) {
  8627. re += '\\' + c;
  8628. continue;
  8629. }
  8630. inClass = true;
  8631. classStart = i;
  8632. reClassStart = re.length;
  8633. re += c;
  8634. continue;
  8635. case ']':
  8636. // a right bracket shall lose its special
  8637. // meaning and represent itself in
  8638. // a bracket expression if it occurs
  8639. // first in the list. -- POSIX.2 2.8.3.2
  8640. if (i === classStart + 1 || !inClass) {
  8641. re += '\\' + c;
  8642. escaping = false;
  8643. continue;
  8644. }
  8645. // handle the case where we left a class open.
  8646. // "[z-a]" is valid, equivalent to "\[z-a\]"
  8647. if (inClass) {
  8648. // split where the last [ was, make sure we don't have
  8649. // an invalid re. if so, re-walk the contents of the
  8650. // would-be class to re-translate any characters that
  8651. // were passed through as-is
  8652. // TODO: It would probably be faster to determine this
  8653. // without a try/catch and a new RegExp, but it's tricky
  8654. // to do safely. For now, this is safe and works.
  8655. var cs = pattern.substring(classStart + 1, i);
  8656. try {
  8657. RegExp('[' + cs + ']');
  8658. } catch (er) {
  8659. // not a valid class!
  8660. var sp = this.parse(cs, SUBPARSE);
  8661. re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]';
  8662. hasMagic = hasMagic || sp[1];
  8663. inClass = false;
  8664. continue;
  8665. }
  8666. }
  8667. // finish up the class.
  8668. hasMagic = true;
  8669. inClass = false;
  8670. re += c;
  8671. continue;
  8672. default:
  8673. // swallow any state char that wasn't consumed
  8674. clearStateChar();
  8675. if (escaping) {
  8676. // no need
  8677. escaping = false;
  8678. } else if (reSpecials[c] && !(c === '^' && inClass)) {
  8679. re += '\\';
  8680. }
  8681. re += c;
  8682. } // switch
  8683. } // for
  8684. // handle the case where we left a class open.
  8685. // "[abc" is valid, equivalent to "\[abc"
  8686. if (inClass) {
  8687. // split where the last [ was, and escape it
  8688. // this is a huge pita. We now have to re-walk
  8689. // the contents of the would-be class to re-translate
  8690. // any characters that were passed through as-is
  8691. cs = pattern.substr(classStart + 1);
  8692. sp = this.parse(cs, SUBPARSE);
  8693. re = re.substr(0, reClassStart) + '\\[' + sp[0];
  8694. hasMagic = hasMagic || sp[1];
  8695. }
  8696. // handle the case where we had a +( thing at the *end*
  8697. // of the pattern.
  8698. // each pattern list stack adds 3 chars, and we need to go through
  8699. // and escape any | chars that were passed through as-is for the regexp.
  8700. // Go through and escape them, taking care not to double-escape any
  8701. // | chars that were already escaped.
  8702. for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
  8703. var tail = re.slice(pl.reStart + pl.open.length);
  8704. this.debug('setting tail', re, pl);
  8705. // maybe some even number of \, then maybe 1 \, followed by a |
  8706. tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
  8707. if (!$2) {
  8708. // the | isn't already escaped, so escape it.
  8709. $2 = '\\';
  8710. }
  8711. // need to escape all those slashes *again*, without escaping the
  8712. // one that we need for escaping the | character. As it works out,
  8713. // escaping an even number of slashes can be done by simply repeating
  8714. // it exactly after itself. That's why this trick works.
  8715. //
  8716. // I am sorry that you have to see this.
  8717. return $1 + $1 + $2 + '|';
  8718. });
  8719. this.debug('tail=%j\n %s', tail, tail, pl, re);
  8720. var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type;
  8721. hasMagic = true;
  8722. re = re.slice(0, pl.reStart) + t + '\\(' + tail;
  8723. }
  8724. // handle trailing things that only matter at the very end.
  8725. clearStateChar();
  8726. if (escaping) {
  8727. // trailing \\
  8728. re += '\\\\';
  8729. }
  8730. // only need to apply the nodot start if the re starts with
  8731. // something that could conceivably capture a dot
  8732. var addPatternStart = false;
  8733. switch (re.charAt(0)) {
  8734. case '.':
  8735. case '[':
  8736. case '(':
  8737. addPatternStart = true;
  8738. }
  8739. // Hack to work around lack of negative lookbehind in JS
  8740. // A pattern like: *.!(x).!(y|z) needs to ensure that a name
  8741. // like 'a.xyz.yz' doesn't match. So, the first negative
  8742. // lookahead, has to look ALL the way ahead, to the end of
  8743. // the pattern.
  8744. for (var n = negativeLists.length - 1; n > -1; n--) {
  8745. var nl = negativeLists[n];
  8746. var nlBefore = re.slice(0, nl.reStart);
  8747. var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
  8748. var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
  8749. var nlAfter = re.slice(nl.reEnd);
  8750. nlLast += nlAfter;
  8751. // Handle nested stuff like *(*.js|!(*.json)), where open parens
  8752. // mean that we should *not* include the ) in the bit that is considered
  8753. // "after" the negated section.
  8754. var openParensBefore = nlBefore.split('(').length - 1;
  8755. var cleanAfter = nlAfter;
  8756. for (i = 0; i < openParensBefore; i++) {
  8757. cleanAfter = cleanAfter.replace(/\)[+*?]?/, '');
  8758. }
  8759. nlAfter = cleanAfter;
  8760. var dollar = '';
  8761. if (nlAfter === '' && isSub !== SUBPARSE) {
  8762. dollar = '$';
  8763. }
  8764. var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
  8765. re = newRe;
  8766. }
  8767. // if the re is not "" at this point, then we need to make sure
  8768. // it doesn't match against an empty path part.
  8769. // Otherwise a/* will match a/, which it should not.
  8770. if (re !== '' && hasMagic) {
  8771. re = '(?=.)' + re;
  8772. }
  8773. if (addPatternStart) {
  8774. re = patternStart + re;
  8775. }
  8776. // parsing just a piece of a larger pattern.
  8777. if (isSub === SUBPARSE) {
  8778. return [re, hasMagic];
  8779. }
  8780. // skip the regexp for non-magical patterns
  8781. // unescape anything in it, though, so that it'll be
  8782. // an exact match against a file etc.
  8783. if (!hasMagic) {
  8784. return globUnescape(pattern);
  8785. }
  8786. var flags = options.nocase ? 'i' : '';
  8787. try {
  8788. var regExp = new RegExp('^' + re + '$', flags);
  8789. } catch (er) {
  8790. // If it was an invalid regular expression, then it can't match
  8791. // anything. This trick looks for a character after the end of
  8792. // the string, which is of course impossible, except in multi-line
  8793. // mode, but it's not a /m regex.
  8794. return new RegExp('$.');
  8795. }
  8796. regExp._glob = pattern;
  8797. regExp._src = re;
  8798. return regExp;
  8799. }
  8800. minimatch.makeRe = function (pattern, options) {
  8801. return new Minimatch(pattern, options || {}).makeRe();
  8802. };
  8803. Minimatch.prototype.makeRe = makeRe;
  8804. function makeRe() {
  8805. if (this.regexp || this.regexp === false) return this.regexp;
  8806. // at this point, this.set is a 2d array of partial
  8807. // pattern strings, or "**".
  8808. //
  8809. // It's better to use .match(). This function shouldn't
  8810. // be used, really, but it's pretty convenient sometimes,
  8811. // when you just want to work with a regex.
  8812. var set = this.set;
  8813. if (!set.length) {
  8814. this.regexp = false;
  8815. return this.regexp;
  8816. }
  8817. var options = this.options;
  8818. var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
  8819. var flags = options.nocase ? 'i' : '';
  8820. var re = set.map(function (pattern) {
  8821. return pattern.map(function (p) {
  8822. return p === GLOBSTAR ? twoStar : typeof p === 'string' ? regExpEscape(p) : p._src;
  8823. }).join('\\\/');
  8824. }).join('|');
  8825. // must match entire pattern
  8826. // ending in a * or ** will make it less strict.
  8827. re = '^(?:' + re + ')$';
  8828. // can match anything, as long as it's not this.
  8829. if (this.negate) re = '^(?!' + re + ').*$';
  8830. try {
  8831. this.regexp = new RegExp(re, flags);
  8832. } catch (ex) {
  8833. this.regexp = false;
  8834. }
  8835. return this.regexp;
  8836. }
  8837. minimatch.match = function (list, pattern, options) {
  8838. options = options || {};
  8839. var mm = new Minimatch(pattern, options);
  8840. list = list.filter(function (f) {
  8841. return mm.match(f);
  8842. });
  8843. if (mm.options.nonull && !list.length) {
  8844. list.push(pattern);
  8845. }
  8846. return list;
  8847. };
  8848. Minimatch.prototype.match = match;
  8849. function match(f, partial) {
  8850. this.debug('match', f, this.pattern);
  8851. // short-circuit in the case of busted things.
  8852. // comments, etc.
  8853. if (this.comment) return false;
  8854. if (this.empty) return f === '';
  8855. if (f === '/' && partial) return true;
  8856. var options = this.options;
  8857. // windows: need to use /, not \
  8858. if (path.sep !== '/') {
  8859. f = f.split(path.sep).join('/');
  8860. }
  8861. // treat the test path as a set of pathparts.
  8862. f = f.split(slashSplit);
  8863. this.debug(this.pattern, 'split', f);
  8864. // just ONE of the pattern sets in this.set needs to match
  8865. // in order for it to be valid. If negating, then just one
  8866. // match means that we have failed.
  8867. // Either way, return on the first hit.
  8868. var set = this.set;
  8869. this.debug(this.pattern, 'set', set);
  8870. // Find the basename of the path by looking for the last non-empty segment
  8871. var filename;
  8872. var i;
  8873. for (i = f.length - 1; i >= 0; i--) {
  8874. filename = f[i];
  8875. if (filename) break;
  8876. }
  8877. for (i = 0; i < set.length; i++) {
  8878. var pattern = set[i];
  8879. var file = f;
  8880. if (options.matchBase && pattern.length === 1) {
  8881. file = [filename];
  8882. }
  8883. var hit = this.matchOne(file, pattern, partial);
  8884. if (hit) {
  8885. if (options.flipNegate) return true;
  8886. return !this.negate;
  8887. }
  8888. }
  8889. // didn't get any hits. this is success if it's a negative
  8890. // pattern, failure otherwise.
  8891. if (options.flipNegate) return false;
  8892. return this.negate;
  8893. }
  8894. // set partial to true to test if, for example,
  8895. // "/a/b" matches the start of "/*/b/*/d"
  8896. // Partial means, if you run out of file before you run
  8897. // out of pattern, then that's fine, as long as all
  8898. // the parts match.
  8899. Minimatch.prototype.matchOne = function (file, pattern, partial) {
  8900. var options = this.options;
  8901. this.debug('matchOne', { 'this': this, file: file, pattern: pattern });
  8902. this.debug('matchOne', file.length, pattern.length);
  8903. for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
  8904. this.debug('matchOne loop');
  8905. var p = pattern[pi];
  8906. var f = file[fi];
  8907. this.debug(pattern, p, f);
  8908. // should be impossible.
  8909. // some invalid regexp stuff in the set.
  8910. if (p === false) return false;
  8911. if (p === GLOBSTAR) {
  8912. this.debug('GLOBSTAR', [pattern, p, f]);
  8913. // "**"
  8914. // a/**/b/**/c would match the following:
  8915. // a/b/x/y/z/c
  8916. // a/x/y/z/b/c
  8917. // a/b/x/b/x/c
  8918. // a/b/c
  8919. // To do this, take the rest of the pattern after
  8920. // the **, and see if it would match the file remainder.
  8921. // If so, return success.
  8922. // If not, the ** "swallows" a segment, and try again.
  8923. // This is recursively awful.
  8924. //
  8925. // a/**/b/**/c matching a/b/x/y/z/c
  8926. // - a matches a
  8927. // - doublestar
  8928. // - matchOne(b/x/y/z/c, b/**/c)
  8929. // - b matches b
  8930. // - doublestar
  8931. // - matchOne(x/y/z/c, c) -> no
  8932. // - matchOne(y/z/c, c) -> no
  8933. // - matchOne(z/c, c) -> no
  8934. // - matchOne(c, c) yes, hit
  8935. var fr = fi;
  8936. var pr = pi + 1;
  8937. if (pr === pl) {
  8938. this.debug('** at the end');
  8939. // a ** at the end will just swallow the rest.
  8940. // We have found a match.
  8941. // however, it will not swallow /.x, unless
  8942. // options.dot is set.
  8943. // . and .. are *never* matched by **, for explosively
  8944. // exponential reasons.
  8945. for (; fi < fl; fi++) {
  8946. if (file[fi] === '.' || file[fi] === '..' || !options.dot && file[fi].charAt(0) === '.') return false;
  8947. }
  8948. return true;
  8949. }
  8950. // ok, let's see if we can swallow whatever we can.
  8951. while (fr < fl) {
  8952. var swallowee = file[fr];
  8953. this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
  8954. // XXX remove this slice. Just pass the start index.
  8955. if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
  8956. this.debug('globstar found match!', fr, fl, swallowee);
  8957. // found a match.
  8958. return true;
  8959. } else {
  8960. // can't swallow "." or ".." ever.
  8961. // can only swallow ".foo" when explicitly asked.
  8962. if (swallowee === '.' || swallowee === '..' || !options.dot && swallowee.charAt(0) === '.') {
  8963. this.debug('dot detected!', file, fr, pattern, pr);
  8964. break;
  8965. }
  8966. // ** swallows a segment, and continue.
  8967. this.debug('globstar swallow a segment, and continue');
  8968. fr++;
  8969. }
  8970. }
  8971. // no match was found.
  8972. // However, in partial mode, we can't say this is necessarily over.
  8973. // If there's more *pattern* left, then
  8974. if (partial) {
  8975. // ran out of file
  8976. this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
  8977. if (fr === fl) return true;
  8978. }
  8979. return false;
  8980. }
  8981. // something other than **
  8982. // non-magic patterns just have to match exactly
  8983. // patterns with magic have been turned into regexps.
  8984. var hit;
  8985. if (typeof p === 'string') {
  8986. if (options.nocase) {
  8987. hit = f.toLowerCase() === p.toLowerCase();
  8988. } else {
  8989. hit = f === p;
  8990. }
  8991. this.debug('string match', p, f, hit);
  8992. } else {
  8993. hit = f.match(p);
  8994. this.debug('pattern match', p, f, hit);
  8995. }
  8996. if (!hit) return false;
  8997. }
  8998. // Note: ending in / means that we'll get a final ""
  8999. // at the end of the pattern. This can only match a
  9000. // corresponding "" at the end of the file.
  9001. // If the file ends in /, then it can only match a
  9002. // a pattern that ends in /, unless the pattern just
  9003. // doesn't have any more for it. But, a/b/ should *not*
  9004. // match "a/b/*", even though "" matches against the
  9005. // [^/]*? pattern, except in partial mode, where it might
  9006. // simply not be reached yet.
  9007. // However, a/b/ should still satisfy a/*
  9008. // now either we fell off the end of the pattern, or we're done.
  9009. if (fi === fl && pi === pl) {
  9010. // ran out of pattern and filename at the same time.
  9011. // an exact hit!
  9012. return true;
  9013. } else if (fi === fl) {
  9014. // ran out of file, but still had pattern left.
  9015. // this is ok if we're doing the match as part of
  9016. // a glob fs traversal.
  9017. return partial;
  9018. } else if (pi === pl) {
  9019. // ran out of pattern, still have file left.
  9020. // this is only acceptable if we're on the very last
  9021. // empty segment of a file with a trailing slash.
  9022. // a/* should match a/b/
  9023. var emptyFileEnd = fi === fl - 1 && file[fi] === '';
  9024. return emptyFileEnd;
  9025. }
  9026. // should be unreachable.
  9027. throw new Error('wtf?');
  9028. };
  9029. // replace stuff like \* with *
  9030. function globUnescape(s) {
  9031. return s.replace(/\\(.)/g, '$1');
  9032. }
  9033. function regExpEscape(s) {
  9034. return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
  9035. }
  9036. });
  9037. $__System.registerDynamic('a3', [], true, function ($__require, exports, module) {
  9038. 'use strict';
  9039. var global = this || self,
  9040. GLOBAL = global;
  9041. module.exports = function (str) {
  9042. var isExtendedLengthPath = /^\\\\\?\\/.test(str);
  9043. var hasNonAscii = /[^\x00-\x80]+/.test(str);
  9044. if (isExtendedLengthPath || hasNonAscii) {
  9045. return str;
  9046. }
  9047. return str.replace(/\\/g, '/');
  9048. };
  9049. });
  9050. $__System.registerDynamic("a4", ["17", "@node/util", "9a", "9d", "a2", "a5", "a6", "@node/path", "a3", "c"], true, function ($__require, exports, module) {
  9051. "use strict";
  9052. var process = $__require("c");
  9053. var global = this || self,
  9054. GLOBAL = global;
  9055. exports.__esModule = true;
  9056. exports.inspect = exports.inherits = undefined;
  9057. var _getIterator2 = $__require("17");
  9058. var _getIterator3 = _interopRequireDefault(_getIterator2);
  9059. var _util = $__require("@node/util");
  9060. Object.defineProperty(exports, "inherits", {
  9061. enumerable: true,
  9062. get: function get() {
  9063. return _util.inherits;
  9064. }
  9065. });
  9066. Object.defineProperty(exports, "inspect", {
  9067. enumerable: true,
  9068. get: function get() {
  9069. return _util.inspect;
  9070. }
  9071. });
  9072. exports.canCompile = canCompile;
  9073. exports.list = list;
  9074. exports.regexify = regexify;
  9075. exports.arrayify = arrayify;
  9076. exports.booleanify = booleanify;
  9077. exports.shouldIgnore = shouldIgnore;
  9078. var _escapeRegExp = $__require("9a");
  9079. var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp);
  9080. var _startsWith = $__require("9d");
  9081. var _startsWith2 = _interopRequireDefault(_startsWith);
  9082. var _minimatch = $__require("a2");
  9083. var _minimatch2 = _interopRequireDefault(_minimatch);
  9084. var _includes = $__require("a5");
  9085. var _includes2 = _interopRequireDefault(_includes);
  9086. var _isRegExp = $__require("a6");
  9087. var _isRegExp2 = _interopRequireDefault(_isRegExp);
  9088. var _path = $__require("@node/path");
  9089. var _path2 = _interopRequireDefault(_path);
  9090. var _slash = $__require("a3");
  9091. var _slash2 = _interopRequireDefault(_slash);
  9092. function _interopRequireDefault(obj) {
  9093. return obj && obj.__esModule ? obj : { default: obj };
  9094. }
  9095. function canCompile(filename, altExts) {
  9096. var exts = altExts || canCompile.EXTENSIONS;
  9097. var ext = _path2.default.extname(filename);
  9098. return (0, _includes2.default)(exts, ext);
  9099. }
  9100. canCompile.EXTENSIONS = [".js", ".jsx", ".es6", ".es"];
  9101. function list(val) {
  9102. if (!val) {
  9103. return [];
  9104. } else if (Array.isArray(val)) {
  9105. return val;
  9106. } else if (typeof val === "string") {
  9107. return val.split(",");
  9108. } else {
  9109. return [val];
  9110. }
  9111. }
  9112. function regexify(val) {
  9113. if (!val) {
  9114. return new RegExp(/.^/);
  9115. }
  9116. if (Array.isArray(val)) {
  9117. val = new RegExp(val.map(_escapeRegExp2.default).join("|"), "i");
  9118. }
  9119. if (typeof val === "string") {
  9120. val = (0, _slash2.default)(val);
  9121. if ((0, _startsWith2.default)(val, "./") || (0, _startsWith2.default)(val, "*/")) val = val.slice(2);
  9122. if ((0, _startsWith2.default)(val, "**/")) val = val.slice(3);
  9123. var regex = _minimatch2.default.makeRe(val, { nocase: true });
  9124. return new RegExp(regex.source.slice(1, -1), "i");
  9125. }
  9126. if ((0, _isRegExp2.default)(val)) {
  9127. return val;
  9128. }
  9129. throw new TypeError("illegal type for regexify");
  9130. }
  9131. function arrayify(val, mapFn) {
  9132. if (!val) return [];
  9133. if (typeof val === "boolean") return arrayify([val], mapFn);
  9134. if (typeof val === "string") return arrayify(list(val), mapFn);
  9135. if (Array.isArray(val)) {
  9136. if (mapFn) val = val.map(mapFn);
  9137. return val;
  9138. }
  9139. return [val];
  9140. }
  9141. function booleanify(val) {
  9142. if (val === "true" || val == 1) {
  9143. return true;
  9144. }
  9145. if (val === "false" || val == 0 || !val) {
  9146. return false;
  9147. }
  9148. return val;
  9149. }
  9150. function shouldIgnore(filename) {
  9151. var ignore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  9152. var only = arguments[2];
  9153. filename = filename.replace(/\\/g, "/");
  9154. if (only) {
  9155. for (var _iterator = only, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  9156. var _ref;
  9157. if (_isArray) {
  9158. if (_i >= _iterator.length) break;
  9159. _ref = _iterator[_i++];
  9160. } else {
  9161. _i = _iterator.next();
  9162. if (_i.done) break;
  9163. _ref = _i.value;
  9164. }
  9165. var pattern = _ref;
  9166. if (_shouldIgnore(pattern, filename)) return false;
  9167. }
  9168. return true;
  9169. } else if (ignore.length) {
  9170. for (var _iterator2 = ignore, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  9171. var _ref2;
  9172. if (_isArray2) {
  9173. if (_i2 >= _iterator2.length) break;
  9174. _ref2 = _iterator2[_i2++];
  9175. } else {
  9176. _i2 = _iterator2.next();
  9177. if (_i2.done) break;
  9178. _ref2 = _i2.value;
  9179. }
  9180. var _pattern = _ref2;
  9181. if (_shouldIgnore(_pattern, filename)) return true;
  9182. }
  9183. }
  9184. return false;
  9185. }
  9186. function _shouldIgnore(pattern, filename) {
  9187. if (typeof pattern === "function") {
  9188. return pattern(filename);
  9189. } else {
  9190. return pattern.test(filename);
  9191. }
  9192. }
  9193. });
  9194. $__System.registerDynamic("a7", ["a3", "a4", "c"], true, function ($__require, exports, module) {
  9195. "use strict";
  9196. var process = $__require("c");
  9197. var global = this || self,
  9198. GLOBAL = global;
  9199. exports.__esModule = true;
  9200. exports.filename = undefined;
  9201. exports.boolean = boolean;
  9202. exports.booleanString = booleanString;
  9203. exports.list = list;
  9204. var _slash = $__require("a3");
  9205. var _slash2 = _interopRequireDefault(_slash);
  9206. var _util = $__require("a4");
  9207. var util = _interopRequireWildcard(_util);
  9208. function _interopRequireWildcard(obj) {
  9209. if (obj && obj.__esModule) {
  9210. return obj;
  9211. } else {
  9212. var newObj = {};if (obj != null) {
  9213. for (var key in obj) {
  9214. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  9215. }
  9216. }newObj.default = obj;return newObj;
  9217. }
  9218. }
  9219. function _interopRequireDefault(obj) {
  9220. return obj && obj.__esModule ? obj : { default: obj };
  9221. }
  9222. var filename = exports.filename = _slash2.default;
  9223. function boolean(val) {
  9224. return !!val;
  9225. }
  9226. function booleanString(val) {
  9227. return util.booleanify(val);
  9228. }
  9229. function list(val) {
  9230. return util.list(val);
  9231. }
  9232. });
  9233. $__System.registerDynamic("a8", ["a7", "a9", "c"], true, function ($__require, exports, module) {
  9234. "use strict";
  9235. var process = $__require("c");
  9236. var global = this || self,
  9237. GLOBAL = global;
  9238. exports.__esModule = true;
  9239. exports.config = undefined;
  9240. exports.normaliseOptions = normaliseOptions;
  9241. var _parsers = $__require("a7");
  9242. var parsers = _interopRequireWildcard(_parsers);
  9243. var _config = $__require("a9");
  9244. var _config2 = _interopRequireDefault(_config);
  9245. function _interopRequireDefault(obj) {
  9246. return obj && obj.__esModule ? obj : { default: obj };
  9247. }
  9248. function _interopRequireWildcard(obj) {
  9249. if (obj && obj.__esModule) {
  9250. return obj;
  9251. } else {
  9252. var newObj = {};if (obj != null) {
  9253. for (var key in obj) {
  9254. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  9255. }
  9256. }newObj.default = obj;return newObj;
  9257. }
  9258. }
  9259. exports.config = _config2.default;
  9260. function normaliseOptions() {
  9261. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9262. for (var key in options) {
  9263. var val = options[key];
  9264. if (val == null) continue;
  9265. var opt = _config2.default[key];
  9266. if (opt && opt.alias) opt = _config2.default[opt.alias];
  9267. if (!opt) continue;
  9268. var parser = parsers[opt.type];
  9269. if (parser) val = parser(val);
  9270. options[key] = val;
  9271. }
  9272. return options;
  9273. }
  9274. });
  9275. $__System.registerDynamic("aa", ["c"], true, function ($__require, exports, module) {
  9276. "use strict";
  9277. var process = $__require("c");
  9278. var global = this || self,
  9279. GLOBAL = global;
  9280. exports.__esModule = true;
  9281. exports.default = getPossiblePluginNames;
  9282. function getPossiblePluginNames(pluginName) {
  9283. return ["babel-plugin-" + pluginName, pluginName];
  9284. }
  9285. module.exports = exports["default"];
  9286. });
  9287. $__System.registerDynamic("ab", ["ac", "aa", "c"], true, function ($__require, exports, module) {
  9288. "use strict";
  9289. var process = $__require("c");
  9290. var global = this || self,
  9291. GLOBAL = global;
  9292. exports.__esModule = true;
  9293. exports.default = resolvePlugin;
  9294. var _resolveFromPossibleNames = $__require("ac");
  9295. var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames);
  9296. var _getPossiblePluginNames = $__require("aa");
  9297. var _getPossiblePluginNames2 = _interopRequireDefault(_getPossiblePluginNames);
  9298. function _interopRequireDefault(obj) {
  9299. return obj && obj.__esModule ? obj : { default: obj };
  9300. }
  9301. function resolvePlugin(pluginName) {
  9302. var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
  9303. return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePluginNames2.default)(pluginName), dirname);
  9304. }
  9305. module.exports = exports["default"];
  9306. });
  9307. $__System.registerDynamic("ac", ["ad", "c"], true, function ($__require, exports, module) {
  9308. "use strict";
  9309. var process = $__require("c");
  9310. var global = this || self,
  9311. GLOBAL = global;
  9312. exports.__esModule = true;
  9313. exports.default = resolveFromPossibleNames;
  9314. var _resolve = $__require("ad");
  9315. var _resolve2 = _interopRequireDefault(_resolve);
  9316. function _interopRequireDefault(obj) {
  9317. return obj && obj.__esModule ? obj : { default: obj };
  9318. }
  9319. function resolveFromPossibleNames(possibleNames, dirname) {
  9320. return possibleNames.reduce(function (accum, curr) {
  9321. return accum || (0, _resolve2.default)(curr, dirname);
  9322. }, null);
  9323. }
  9324. module.exports = exports["default"];
  9325. });
  9326. $__System.registerDynamic("ae", ["c"], true, function ($__require, exports, module) {
  9327. "use strict";
  9328. var process = $__require("c");
  9329. var global = this || self,
  9330. GLOBAL = global;
  9331. exports.__esModule = true;
  9332. exports.default = getPossiblePresetNames;
  9333. function getPossiblePresetNames(presetName) {
  9334. var possibleNames = ["babel-preset-" + presetName, presetName];
  9335. var matches = presetName.match(/^(@[^/]+)\/(.+)$/);
  9336. if (matches) {
  9337. var orgName = matches[1],
  9338. presetPath = matches[2];
  9339. possibleNames.push(orgName + "/babel-preset-" + presetPath);
  9340. }
  9341. return possibleNames;
  9342. }
  9343. module.exports = exports["default"];
  9344. });
  9345. $__System.registerDynamic("af", ["ac", "ae", "c"], true, function ($__require, exports, module) {
  9346. "use strict";
  9347. var process = $__require("c");
  9348. var global = this || self,
  9349. GLOBAL = global;
  9350. exports.__esModule = true;
  9351. exports.default = resolvePreset;
  9352. var _resolveFromPossibleNames = $__require("ac");
  9353. var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames);
  9354. var _getPossiblePresetNames = $__require("ae");
  9355. var _getPossiblePresetNames2 = _interopRequireDefault(_getPossiblePresetNames);
  9356. function _interopRequireDefault(obj) {
  9357. return obj && obj.__esModule ? obj : { default: obj };
  9358. }
  9359. function resolvePreset(presetName) {
  9360. var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
  9361. return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePresetNames2.default)(presetName), dirname);
  9362. }
  9363. module.exports = exports["default"];
  9364. });
  9365. $__System.registerDynamic('b0', ['b1'], true, function ($__require, exports, module) {
  9366. var global = this || self,
  9367. GLOBAL = global;
  9368. var baseClone = $__require('b1');
  9369. /** Used to compose bitmasks for cloning. */
  9370. var CLONE_DEEP_FLAG = 1,
  9371. CLONE_SYMBOLS_FLAG = 4;
  9372. /**
  9373. * This method is like `_.cloneWith` except that it recursively clones `value`.
  9374. *
  9375. * @static
  9376. * @memberOf _
  9377. * @since 4.0.0
  9378. * @category Lang
  9379. * @param {*} value The value to recursively clone.
  9380. * @param {Function} [customizer] The function to customize cloning.
  9381. * @returns {*} Returns the deep cloned value.
  9382. * @see _.cloneWith
  9383. * @example
  9384. *
  9385. * function customizer(value) {
  9386. * if (_.isElement(value)) {
  9387. * return value.cloneNode(true);
  9388. * }
  9389. * }
  9390. *
  9391. * var el = _.cloneDeepWith(document.body, customizer);
  9392. *
  9393. * console.log(el === document.body);
  9394. * // => false
  9395. * console.log(el.nodeName);
  9396. * // => 'BODY'
  9397. * console.log(el.childNodes.length);
  9398. * // => 20
  9399. */
  9400. function cloneDeepWith(value, customizer) {
  9401. customizer = typeof customizer == 'function' ? customizer : undefined;
  9402. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  9403. }
  9404. module.exports = cloneDeepWith;
  9405. });
  9406. $__System.registerDynamic("b2", [], true, function ($__require, exports, module) {
  9407. var global = this || self,
  9408. GLOBAL = global;
  9409. /**
  9410. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  9411. *
  9412. * @private
  9413. * @param {boolean} [fromRight] Specify iterating from right to left.
  9414. * @returns {Function} Returns the new base function.
  9415. */
  9416. function createBaseFor(fromRight) {
  9417. return function (object, iteratee, keysFunc) {
  9418. var index = -1,
  9419. iterable = Object(object),
  9420. props = keysFunc(object),
  9421. length = props.length;
  9422. while (length--) {
  9423. var key = props[fromRight ? length : ++index];
  9424. if (iteratee(iterable[key], key, iterable) === false) {
  9425. break;
  9426. }
  9427. }
  9428. return object;
  9429. };
  9430. }
  9431. module.exports = createBaseFor;
  9432. });
  9433. $__System.registerDynamic('8b', ['b2'], true, function ($__require, exports, module) {
  9434. var global = this || self,
  9435. GLOBAL = global;
  9436. var createBaseFor = $__require('b2');
  9437. /**
  9438. * The base implementation of `baseForOwn` which iterates over `object`
  9439. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  9440. * Iteratee functions may exit iteration early by explicitly returning `false`.
  9441. *
  9442. * @private
  9443. * @param {Object} object The object to iterate over.
  9444. * @param {Function} iteratee The function invoked per iteration.
  9445. * @param {Function} keysFunc The function to get the keys of `object`.
  9446. * @returns {Object} Returns `object`.
  9447. */
  9448. var baseFor = createBaseFor();
  9449. module.exports = baseFor;
  9450. });
  9451. $__System.registerDynamic('b3', ['b4', '72'], true, function ($__require, exports, module) {
  9452. var global = this || self,
  9453. GLOBAL = global;
  9454. var baseAssignValue = $__require('b4'),
  9455. eq = $__require('72');
  9456. /**
  9457. * This function is like `assignValue` except that it doesn't assign
  9458. * `undefined` values.
  9459. *
  9460. * @private
  9461. * @param {Object} object The object to modify.
  9462. * @param {string} key The key of the property to assign.
  9463. * @param {*} value The value to assign.
  9464. */
  9465. function assignMergeValue(object, key, value) {
  9466. if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) {
  9467. baseAssignValue(object, key, value);
  9468. }
  9469. }
  9470. module.exports = assignMergeValue;
  9471. });
  9472. $__System.registerDynamic('b5', ['3f', '7b'], true, function ($__require, exports, module) {
  9473. var global = this || self,
  9474. GLOBAL = global;
  9475. var isArrayLike = $__require('3f'),
  9476. isObjectLike = $__require('7b');
  9477. /**
  9478. * This method is like `_.isArrayLike` except that it also checks if `value`
  9479. * is an object.
  9480. *
  9481. * @static
  9482. * @memberOf _
  9483. * @since 4.0.0
  9484. * @category Lang
  9485. * @param {*} value The value to check.
  9486. * @returns {boolean} Returns `true` if `value` is an array-like object,
  9487. * else `false`.
  9488. * @example
  9489. *
  9490. * _.isArrayLikeObject([1, 2, 3]);
  9491. * // => true
  9492. *
  9493. * _.isArrayLikeObject(document.body.children);
  9494. * // => true
  9495. *
  9496. * _.isArrayLikeObject('abc');
  9497. * // => false
  9498. *
  9499. * _.isArrayLikeObject(_.noop);
  9500. * // => false
  9501. */
  9502. function isArrayLikeObject(value) {
  9503. return isObjectLike(value) && isArrayLike(value);
  9504. }
  9505. module.exports = isArrayLikeObject;
  9506. });
  9507. $__System.registerDynamic('b6', ['b7', 'b8'], true, function ($__require, exports, module) {
  9508. var global = this || self,
  9509. GLOBAL = global;
  9510. var copyObject = $__require('b7'),
  9511. keysIn = $__require('b8');
  9512. /**
  9513. * Converts `value` to a plain object flattening inherited enumerable string
  9514. * keyed properties of `value` to own properties of the plain object.
  9515. *
  9516. * @static
  9517. * @memberOf _
  9518. * @since 3.0.0
  9519. * @category Lang
  9520. * @param {*} value The value to convert.
  9521. * @returns {Object} Returns the converted plain object.
  9522. * @example
  9523. *
  9524. * function Foo() {
  9525. * this.b = 2;
  9526. * }
  9527. *
  9528. * Foo.prototype.c = 3;
  9529. *
  9530. * _.assign({ 'a': 1 }, new Foo);
  9531. * // => { 'a': 1, 'b': 2 }
  9532. *
  9533. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  9534. * // => { 'a': 1, 'b': 2, 'c': 3 }
  9535. */
  9536. function toPlainObject(value) {
  9537. return copyObject(value, keysIn(value));
  9538. }
  9539. module.exports = toPlainObject;
  9540. });
  9541. $__System.registerDynamic('b9', ['b3', 'ba', 'bb', 'bc', 'bd', '62', '4b', 'b5', '79', 'be', '81', 'bf', '7a', 'b6'], true, function ($__require, exports, module) {
  9542. var global = this || self,
  9543. GLOBAL = global;
  9544. var assignMergeValue = $__require('b3'),
  9545. cloneBuffer = $__require('ba'),
  9546. cloneTypedArray = $__require('bb'),
  9547. copyArray = $__require('bc'),
  9548. initCloneObject = $__require('bd'),
  9549. isArguments = $__require('62'),
  9550. isArray = $__require('4b'),
  9551. isArrayLikeObject = $__require('b5'),
  9552. isBuffer = $__require('79'),
  9553. isFunction = $__require('be'),
  9554. isObject = $__require('81'),
  9555. isPlainObject = $__require('bf'),
  9556. isTypedArray = $__require('7a'),
  9557. toPlainObject = $__require('b6');
  9558. /**
  9559. * A specialized version of `baseMerge` for arrays and objects which performs
  9560. * deep merges and tracks traversed objects enabling objects with circular
  9561. * references to be merged.
  9562. *
  9563. * @private
  9564. * @param {Object} object The destination object.
  9565. * @param {Object} source The source object.
  9566. * @param {string} key The key of the value to merge.
  9567. * @param {number} srcIndex The index of `source`.
  9568. * @param {Function} mergeFunc The function to merge values.
  9569. * @param {Function} [customizer] The function to customize assigned values.
  9570. * @param {Object} [stack] Tracks traversed source values and their merged
  9571. * counterparts.
  9572. */
  9573. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  9574. var objValue = object[key],
  9575. srcValue = source[key],
  9576. stacked = stack.get(srcValue);
  9577. if (stacked) {
  9578. assignMergeValue(object, key, stacked);
  9579. return;
  9580. }
  9581. var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined;
  9582. var isCommon = newValue === undefined;
  9583. if (isCommon) {
  9584. var isArr = isArray(srcValue),
  9585. isBuff = !isArr && isBuffer(srcValue),
  9586. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  9587. newValue = srcValue;
  9588. if (isArr || isBuff || isTyped) {
  9589. if (isArray(objValue)) {
  9590. newValue = objValue;
  9591. } else if (isArrayLikeObject(objValue)) {
  9592. newValue = copyArray(objValue);
  9593. } else if (isBuff) {
  9594. isCommon = false;
  9595. newValue = cloneBuffer(srcValue, true);
  9596. } else if (isTyped) {
  9597. isCommon = false;
  9598. newValue = cloneTypedArray(srcValue, true);
  9599. } else {
  9600. newValue = [];
  9601. }
  9602. } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  9603. newValue = objValue;
  9604. if (isArguments(objValue)) {
  9605. newValue = toPlainObject(objValue);
  9606. } else if (!isObject(objValue) || srcIndex && isFunction(objValue)) {
  9607. newValue = initCloneObject(srcValue);
  9608. }
  9609. } else {
  9610. isCommon = false;
  9611. }
  9612. }
  9613. if (isCommon) {
  9614. // Recursively merge objects and arrays (susceptible to call stack limits).
  9615. stack.set(srcValue, newValue);
  9616. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  9617. stack['delete'](srcValue);
  9618. }
  9619. assignMergeValue(object, key, newValue);
  9620. }
  9621. module.exports = baseMergeDeep;
  9622. });
  9623. $__System.registerDynamic('c0', ['66', 'b3', '8b', 'b9', '81', 'b8'], true, function ($__require, exports, module) {
  9624. var global = this || self,
  9625. GLOBAL = global;
  9626. var Stack = $__require('66'),
  9627. assignMergeValue = $__require('b3'),
  9628. baseFor = $__require('8b'),
  9629. baseMergeDeep = $__require('b9'),
  9630. isObject = $__require('81'),
  9631. keysIn = $__require('b8');
  9632. /**
  9633. * The base implementation of `_.merge` without support for multiple sources.
  9634. *
  9635. * @private
  9636. * @param {Object} object The destination object.
  9637. * @param {Object} source The source object.
  9638. * @param {number} srcIndex The index of `source`.
  9639. * @param {Function} [customizer] The function to customize merged values.
  9640. * @param {Object} [stack] Tracks traversed source values and their merged
  9641. * counterparts.
  9642. */
  9643. function baseMerge(object, source, srcIndex, customizer, stack) {
  9644. if (object === source) {
  9645. return;
  9646. }
  9647. baseFor(source, function (srcValue, key) {
  9648. if (isObject(srcValue)) {
  9649. stack || (stack = new Stack());
  9650. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  9651. } else {
  9652. var newValue = customizer ? customizer(object[key], srcValue, key + '', object, source, stack) : undefined;
  9653. if (newValue === undefined) {
  9654. newValue = srcValue;
  9655. }
  9656. assignMergeValue(object, key, newValue);
  9657. }
  9658. }, keysIn);
  9659. }
  9660. module.exports = baseMerge;
  9661. });
  9662. $__System.registerDynamic('c1', ['c0', 'c2'], true, function ($__require, exports, module) {
  9663. var global = this || self,
  9664. GLOBAL = global;
  9665. var baseMerge = $__require('c0'),
  9666. createAssigner = $__require('c2');
  9667. /**
  9668. * This method is like `_.merge` except that it accepts `customizer` which
  9669. * is invoked to produce the merged values of the destination and source
  9670. * properties. If `customizer` returns `undefined`, merging is handled by the
  9671. * method instead. The `customizer` is invoked with six arguments:
  9672. * (objValue, srcValue, key, object, source, stack).
  9673. *
  9674. * **Note:** This method mutates `object`.
  9675. *
  9676. * @static
  9677. * @memberOf _
  9678. * @since 4.0.0
  9679. * @category Object
  9680. * @param {Object} object The destination object.
  9681. * @param {...Object} sources The source objects.
  9682. * @param {Function} customizer The function to customize assigned values.
  9683. * @returns {Object} Returns `object`.
  9684. * @example
  9685. *
  9686. * function customizer(objValue, srcValue) {
  9687. * if (_.isArray(objValue)) {
  9688. * return objValue.concat(srcValue);
  9689. * }
  9690. * }
  9691. *
  9692. * var object = { 'a': [1], 'b': [2] };
  9693. * var other = { 'a': [3], 'b': [4] };
  9694. *
  9695. * _.mergeWith(object, other, customizer);
  9696. * // => { 'a': [1, 3], 'b': [2, 4] }
  9697. */
  9698. var mergeWith = createAssigner(function (object, source, srcIndex, customizer) {
  9699. baseMerge(object, source, srcIndex, customizer);
  9700. });
  9701. module.exports = mergeWith;
  9702. });
  9703. $__System.registerDynamic("c3", ["17", "c1", "c"], true, function ($__require, exports, module) {
  9704. "use strict";
  9705. var process = $__require("c");
  9706. var global = this || self,
  9707. GLOBAL = global;
  9708. exports.__esModule = true;
  9709. var _getIterator2 = $__require("17");
  9710. var _getIterator3 = _interopRequireDefault(_getIterator2);
  9711. exports.default = function (dest, src) {
  9712. if (!dest || !src) return;
  9713. return (0, _mergeWith2.default)(dest, src, function (a, b) {
  9714. if (b && Array.isArray(a)) {
  9715. var newArray = b.slice(0);
  9716. for (var _iterator = a, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  9717. var _ref;
  9718. if (_isArray) {
  9719. if (_i >= _iterator.length) break;
  9720. _ref = _iterator[_i++];
  9721. } else {
  9722. _i = _iterator.next();
  9723. if (_i.done) break;
  9724. _ref = _i.value;
  9725. }
  9726. var item = _ref;
  9727. if (newArray.indexOf(item) < 0) {
  9728. newArray.push(item);
  9729. }
  9730. }
  9731. return newArray;
  9732. }
  9733. });
  9734. };
  9735. var _mergeWith = $__require("c1");
  9736. var _mergeWith2 = _interopRequireDefault(_mergeWith);
  9737. function _interopRequireDefault(obj) {
  9738. return obj && obj.__esModule ? obj : { default: obj };
  9739. }
  9740. module.exports = exports["default"];
  9741. });
  9742. $__System.registerDynamic("a9", ["c"], true, function ($__require, exports, module) {
  9743. "use strict";
  9744. var process = $__require("c");
  9745. var global = this || self,
  9746. GLOBAL = global;
  9747. module.exports = {
  9748. filename: {
  9749. type: "filename",
  9750. description: "filename to use when reading from stdin - this will be used in source-maps, errors etc",
  9751. default: "unknown",
  9752. shorthand: "f"
  9753. },
  9754. filenameRelative: {
  9755. hidden: true,
  9756. type: "string"
  9757. },
  9758. inputSourceMap: {
  9759. hidden: true
  9760. },
  9761. env: {
  9762. hidden: true,
  9763. default: {}
  9764. },
  9765. mode: {
  9766. description: "",
  9767. hidden: true
  9768. },
  9769. retainLines: {
  9770. type: "boolean",
  9771. default: false,
  9772. description: "retain line numbers - will result in really ugly code"
  9773. },
  9774. highlightCode: {
  9775. description: "enable/disable ANSI syntax highlighting of code frames (on by default)",
  9776. type: "boolean",
  9777. default: true
  9778. },
  9779. suppressDeprecationMessages: {
  9780. type: "boolean",
  9781. default: false,
  9782. hidden: true
  9783. },
  9784. presets: {
  9785. type: "list",
  9786. description: "",
  9787. default: []
  9788. },
  9789. plugins: {
  9790. type: "list",
  9791. default: [],
  9792. description: ""
  9793. },
  9794. ignore: {
  9795. type: "list",
  9796. description: "list of glob paths to **not** compile",
  9797. default: []
  9798. },
  9799. only: {
  9800. type: "list",
  9801. description: "list of glob paths to **only** compile"
  9802. },
  9803. code: {
  9804. hidden: true,
  9805. default: true,
  9806. type: "boolean"
  9807. },
  9808. metadata: {
  9809. hidden: true,
  9810. default: true,
  9811. type: "boolean"
  9812. },
  9813. ast: {
  9814. hidden: true,
  9815. default: true,
  9816. type: "boolean"
  9817. },
  9818. extends: {
  9819. type: "string",
  9820. hidden: true
  9821. },
  9822. comments: {
  9823. type: "boolean",
  9824. default: true,
  9825. description: "write comments to generated output (true by default)"
  9826. },
  9827. shouldPrintComment: {
  9828. hidden: true,
  9829. description: "optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"
  9830. },
  9831. wrapPluginVisitorMethod: {
  9832. hidden: true,
  9833. description: "optional callback to wrap all visitor methods"
  9834. },
  9835. compact: {
  9836. type: "booleanString",
  9837. default: "auto",
  9838. description: "do not include superfluous whitespace characters and line terminators [true|false|auto]"
  9839. },
  9840. minified: {
  9841. type: "boolean",
  9842. default: false,
  9843. description: "save as much bytes when printing [true|false]"
  9844. },
  9845. sourceMap: {
  9846. alias: "sourceMaps",
  9847. hidden: true
  9848. },
  9849. sourceMaps: {
  9850. type: "booleanString",
  9851. description: "[true|false|inline]",
  9852. default: false,
  9853. shorthand: "s"
  9854. },
  9855. sourceMapTarget: {
  9856. type: "string",
  9857. description: "set `file` on returned source map"
  9858. },
  9859. sourceFileName: {
  9860. type: "string",
  9861. description: "set `sources[0]` on returned source map"
  9862. },
  9863. sourceRoot: {
  9864. type: "filename",
  9865. description: "the root from which all sources are relative"
  9866. },
  9867. babelrc: {
  9868. description: "Whether or not to look up .babelrc and .babelignore files",
  9869. type: "boolean",
  9870. default: true
  9871. },
  9872. sourceType: {
  9873. description: "",
  9874. default: "module"
  9875. },
  9876. auxiliaryCommentBefore: {
  9877. type: "string",
  9878. description: "print a comment before any injected non-user code"
  9879. },
  9880. auxiliaryCommentAfter: {
  9881. type: "string",
  9882. description: "print a comment after any injected non-user code"
  9883. },
  9884. resolveModuleSource: {
  9885. hidden: true
  9886. },
  9887. getModuleId: {
  9888. hidden: true
  9889. },
  9890. moduleRoot: {
  9891. type: "filename",
  9892. description: "optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"
  9893. },
  9894. moduleIds: {
  9895. type: "boolean",
  9896. default: false,
  9897. shorthand: "M",
  9898. description: "insert an explicit id for modules"
  9899. },
  9900. moduleId: {
  9901. description: "specify a custom name for module ids",
  9902. type: "string"
  9903. },
  9904. passPerPreset: {
  9905. description: "Whether to spawn a traversal pass per a preset. By default all presets are merged.",
  9906. type: "boolean",
  9907. default: false,
  9908. hidden: true
  9909. },
  9910. parserOpts: {
  9911. description: "Options to pass into the parser, or to change parsers (parserOpts.parser)",
  9912. default: false
  9913. },
  9914. generatorOpts: {
  9915. description: "Options to pass into the generator, or to change generators (generatorOpts.generator)",
  9916. default: false
  9917. }
  9918. };
  9919. });
  9920. $__System.registerDynamic("c4", ["c"], true, function ($__require, exports, module) {
  9921. "use strict";
  9922. var process = $__require("c");
  9923. var global = this || self,
  9924. GLOBAL = global;
  9925. module.exports = {
  9926. "auxiliaryComment": {
  9927. "message": "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"
  9928. },
  9929. "blacklist": {
  9930. "message": "Put the specific transforms you want in the `plugins` option"
  9931. },
  9932. "breakConfig": {
  9933. "message": "This is not a necessary option in Babel 6"
  9934. },
  9935. "experimental": {
  9936. "message": "Put the specific transforms you want in the `plugins` option"
  9937. },
  9938. "externalHelpers": {
  9939. "message": "Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"
  9940. },
  9941. "extra": {
  9942. "message": ""
  9943. },
  9944. "jsxPragma": {
  9945. "message": "use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"
  9946. },
  9947. "loose": {
  9948. "message": "Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."
  9949. },
  9950. "metadataUsedHelpers": {
  9951. "message": "Not required anymore as this is enabled by default"
  9952. },
  9953. "modules": {
  9954. "message": "Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"
  9955. },
  9956. "nonStandard": {
  9957. "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/"
  9958. },
  9959. "optional": {
  9960. "message": "Put the specific transforms you want in the `plugins` option"
  9961. },
  9962. "sourceMapName": {
  9963. "message": "Use the `sourceMapTarget` option"
  9964. },
  9965. "stage": {
  9966. "message": "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"
  9967. },
  9968. "whitelist": {
  9969. "message": "Put the specific transforms you want in the `plugins` option"
  9970. }
  9971. };
  9972. });
  9973. $__System.registerDynamic('c5', ['c6', 'c7', 'c'], true, function ($__require, exports, module) {
  9974. var process = $__require('c');
  9975. var global = this || self,
  9976. GLOBAL = global;
  9977. // 19.1.3.1 Object.assign(target, source)
  9978. var $export = $__require('c6');
  9979. $export($export.S + $export.F, 'Object', { assign: $__require('c7') });
  9980. });
  9981. $__System.registerDynamic('c8', ['c5', '37', 'c'], true, function ($__require, exports, module) {
  9982. var process = $__require('c');
  9983. var global = this || self,
  9984. GLOBAL = global;
  9985. $__require('c5');
  9986. module.exports = $__require('37').Object.assign;
  9987. });
  9988. $__System.registerDynamic("5a", ["c8"], true, function ($__require, exports, module) {
  9989. var global = this || self,
  9990. GLOBAL = global;
  9991. module.exports = { "default": $__require("c8"), __esModule: true };
  9992. });
  9993. $__System.registerDynamic("ad", ["30", "@node/module", "@node/path", "c"], true, function ($__require, exports, module) {
  9994. "use strict";
  9995. var process = $__require("c");
  9996. var global = this || self,
  9997. GLOBAL = global;
  9998. exports.__esModule = true;
  9999. var _typeof2 = $__require("30");
  10000. var _typeof3 = _interopRequireDefault(_typeof2);
  10001. exports.default = function (loc) {
  10002. var relative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
  10003. if ((typeof _module2.default === "undefined" ? "undefined" : (0, _typeof3.default)(_module2.default)) === "object") return null;
  10004. var relativeMod = relativeModules[relative];
  10005. if (!relativeMod) {
  10006. relativeMod = new _module2.default();
  10007. var filename = _path2.default.join(relative, ".babelrc");
  10008. relativeMod.id = filename;
  10009. relativeMod.filename = filename;
  10010. relativeMod.paths = _module2.default._nodeModulePaths(relative);
  10011. relativeModules[relative] = relativeMod;
  10012. }
  10013. try {
  10014. return _module2.default._resolveFilename(loc, relativeMod);
  10015. } catch (err) {
  10016. return null;
  10017. }
  10018. };
  10019. var _module = $__require("@node/module");
  10020. var _module2 = _interopRequireDefault(_module);
  10021. var _path = $__require("@node/path");
  10022. var _path2 = _interopRequireDefault(_path);
  10023. function _interopRequireDefault(obj) {
  10024. return obj && obj.__esModule ? obj : { default: obj };
  10025. }
  10026. var relativeModules = {};
  10027. module.exports = exports["default"];
  10028. });
  10029. $__System.registerDynamic("c9", [], true, function ($__require, exports, module) {
  10030. var global = this || self,
  10031. GLOBAL = global;
  10032. // json5.js
  10033. // Modern JSON. See README.md for details.
  10034. //
  10035. // This file is based directly off of Douglas Crockford's json_parse.js:
  10036. // https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js
  10037. var JSON5 = typeof exports === 'object' ? exports : {};
  10038. JSON5.parse = function () {
  10039. "use strict";
  10040. // This is a function that can parse a JSON5 text, producing a JavaScript
  10041. // data structure. It is a simple, recursive descent parser. It does not use
  10042. // eval or regular expressions, so it can be used as a model for implementing
  10043. // a JSON5 parser in other languages.
  10044. // We are defining the function inside of another function to avoid creating
  10045. // global variables.
  10046. var at,
  10047. // The index of the current character
  10048. lineNumber,
  10049. // The current line number
  10050. columnNumber,
  10051. // The current column number
  10052. ch,
  10053. // The current character
  10054. escapee = {
  10055. "'": "'",
  10056. '"': '"',
  10057. '\\': '\\',
  10058. '/': '/',
  10059. '\n': '', // Replace escaped newlines in strings w/ empty string
  10060. b: '\b',
  10061. f: '\f',
  10062. n: '\n',
  10063. r: '\r',
  10064. t: '\t'
  10065. },
  10066. ws = [' ', '\t', '\r', '\n', '\v', '\f', '\xA0', '\uFEFF'],
  10067. text,
  10068. renderChar = function (chr) {
  10069. return chr === '' ? 'EOF' : "'" + chr + "'";
  10070. },
  10071. error = function (m) {
  10072. // Call error when something is wrong.
  10073. var error = new SyntaxError();
  10074. // beginning of message suffix to agree with that provided by Gecko - see https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
  10075. error.message = m + " at line " + lineNumber + " column " + columnNumber + " of the JSON5 data. Still to read: " + JSON.stringify(text.substring(at - 1, at + 19));
  10076. error.at = at;
  10077. // These two property names have been chosen to agree with the ones in Gecko, the only popular
  10078. // environment which seems to supply this info on JSON.parse
  10079. error.lineNumber = lineNumber;
  10080. error.columnNumber = columnNumber;
  10081. throw error;
  10082. },
  10083. next = function (c) {
  10084. // If a c parameter is provided, verify that it matches the current character.
  10085. if (c && c !== ch) {
  10086. error("Expected " + renderChar(c) + " instead of " + renderChar(ch));
  10087. }
  10088. // Get the next character. When there are no more characters,
  10089. // return the empty string.
  10090. ch = text.charAt(at);
  10091. at++;
  10092. columnNumber++;
  10093. if (ch === '\n' || ch === '\r' && peek() !== '\n') {
  10094. lineNumber++;
  10095. columnNumber = 0;
  10096. }
  10097. return ch;
  10098. },
  10099. peek = function () {
  10100. // Get the next character without consuming it or
  10101. // assigning it to the ch varaible.
  10102. return text.charAt(at);
  10103. },
  10104. identifier = function () {
  10105. // Parse an identifier. Normally, reserved words are disallowed here, but we
  10106. // only use this for unquoted object keys, where reserved words are allowed,
  10107. // so we don't check for those here. References:
  10108. // - http://es5.github.com/#x7.6
  10109. // - https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Core_Language_Features#Variables
  10110. // - http://docstore.mik.ua/orelly/webprog/jscript/ch02_07.htm
  10111. // TODO Identifiers can have Unicode "letters" in them; add support for those.
  10112. var key = ch;
  10113. // Identifiers must start with a letter, _ or $.
  10114. if (ch !== '_' && ch !== '$' && (ch < 'a' || ch > 'z') && (ch < 'A' || ch > 'Z')) {
  10115. error("Bad identifier as unquoted key");
  10116. }
  10117. // Subsequent characters can contain digits.
  10118. while (next() && (ch === '_' || ch === '$' || ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z' || ch >= '0' && ch <= '9')) {
  10119. key += ch;
  10120. }
  10121. return key;
  10122. },
  10123. number = function () {
  10124. // Parse a number value.
  10125. var number,
  10126. sign = '',
  10127. string = '',
  10128. base = 10;
  10129. if (ch === '-' || ch === '+') {
  10130. sign = ch;
  10131. next(ch);
  10132. }
  10133. // support for Infinity (could tweak to allow other words):
  10134. if (ch === 'I') {
  10135. number = word();
  10136. if (typeof number !== 'number' || isNaN(number)) {
  10137. error('Unexpected word for number');
  10138. }
  10139. return sign === '-' ? -number : number;
  10140. }
  10141. // support for NaN
  10142. if (ch === 'N') {
  10143. number = word();
  10144. if (!isNaN(number)) {
  10145. error('expected word to be NaN');
  10146. }
  10147. // ignore sign as -NaN also is NaN
  10148. return number;
  10149. }
  10150. if (ch === '0') {
  10151. string += ch;
  10152. next();
  10153. if (ch === 'x' || ch === 'X') {
  10154. string += ch;
  10155. next();
  10156. base = 16;
  10157. } else if (ch >= '0' && ch <= '9') {
  10158. error('Octal literal');
  10159. }
  10160. }
  10161. switch (base) {
  10162. case 10:
  10163. while (ch >= '0' && ch <= '9') {
  10164. string += ch;
  10165. next();
  10166. }
  10167. if (ch === '.') {
  10168. string += '.';
  10169. while (next() && ch >= '0' && ch <= '9') {
  10170. string += ch;
  10171. }
  10172. }
  10173. if (ch === 'e' || ch === 'E') {
  10174. string += ch;
  10175. next();
  10176. if (ch === '-' || ch === '+') {
  10177. string += ch;
  10178. next();
  10179. }
  10180. while (ch >= '0' && ch <= '9') {
  10181. string += ch;
  10182. next();
  10183. }
  10184. }
  10185. break;
  10186. case 16:
  10187. while (ch >= '0' && ch <= '9' || ch >= 'A' && ch <= 'F' || ch >= 'a' && ch <= 'f') {
  10188. string += ch;
  10189. next();
  10190. }
  10191. break;
  10192. }
  10193. if (sign === '-') {
  10194. number = -string;
  10195. } else {
  10196. number = +string;
  10197. }
  10198. if (!isFinite(number)) {
  10199. error("Bad number");
  10200. } else {
  10201. return number;
  10202. }
  10203. },
  10204. string = function () {
  10205. // Parse a string value.
  10206. var hex,
  10207. i,
  10208. string = '',
  10209. delim,
  10210. // double quote or single quote
  10211. uffff;
  10212. // When parsing for string values, we must look for ' or " and \ characters.
  10213. if (ch === '"' || ch === "'") {
  10214. delim = ch;
  10215. while (next()) {
  10216. if (ch === delim) {
  10217. next();
  10218. return string;
  10219. } else if (ch === '\\') {
  10220. next();
  10221. if (ch === 'u') {
  10222. uffff = 0;
  10223. for (i = 0; i < 4; i += 1) {
  10224. hex = parseInt(next(), 16);
  10225. if (!isFinite(hex)) {
  10226. break;
  10227. }
  10228. uffff = uffff * 16 + hex;
  10229. }
  10230. string += String.fromCharCode(uffff);
  10231. } else if (ch === '\r') {
  10232. if (peek() === '\n') {
  10233. next();
  10234. }
  10235. } else if (typeof escapee[ch] === 'string') {
  10236. string += escapee[ch];
  10237. } else {
  10238. break;
  10239. }
  10240. } else if (ch === '\n') {
  10241. // unescaped newlines are invalid; see:
  10242. // https://github.com/aseemk/json5/issues/24
  10243. // TODO this feels special-cased; are there other
  10244. // invalid unescaped chars?
  10245. break;
  10246. } else {
  10247. string += ch;
  10248. }
  10249. }
  10250. }
  10251. error("Bad string");
  10252. },
  10253. inlineComment = function () {
  10254. // Skip an inline comment, assuming this is one. The current character should
  10255. // be the second / character in the // pair that begins this inline comment.
  10256. // To finish the inline comment, we look for a newline or the end of the text.
  10257. if (ch !== '/') {
  10258. error("Not an inline comment");
  10259. }
  10260. do {
  10261. next();
  10262. if (ch === '\n' || ch === '\r') {
  10263. next();
  10264. return;
  10265. }
  10266. } while (ch);
  10267. },
  10268. blockComment = function () {
  10269. // Skip a block comment, assuming this is one. The current character should be
  10270. // the * character in the /* pair that begins this block comment.
  10271. // To finish the block comment, we look for an ending */ pair of characters,
  10272. // but we also watch for the end of text before the comment is terminated.
  10273. if (ch !== '*') {
  10274. error("Not a block comment");
  10275. }
  10276. do {
  10277. next();
  10278. while (ch === '*') {
  10279. next('*');
  10280. if (ch === '/') {
  10281. next('/');
  10282. return;
  10283. }
  10284. }
  10285. } while (ch);
  10286. error("Unterminated block comment");
  10287. },
  10288. comment = function () {
  10289. // Skip a comment, whether inline or block-level, assuming this is one.
  10290. // Comments always begin with a / character.
  10291. if (ch !== '/') {
  10292. error("Not a comment");
  10293. }
  10294. next('/');
  10295. if (ch === '/') {
  10296. inlineComment();
  10297. } else if (ch === '*') {
  10298. blockComment();
  10299. } else {
  10300. error("Unrecognized comment");
  10301. }
  10302. },
  10303. white = function () {
  10304. // Skip whitespace and comments.
  10305. // Note that we're detecting comments by only a single / character.
  10306. // This works since regular expressions are not valid JSON(5), but this will
  10307. // break if there are other valid values that begin with a / character!
  10308. while (ch) {
  10309. if (ch === '/') {
  10310. comment();
  10311. } else if (ws.indexOf(ch) >= 0) {
  10312. next();
  10313. } else {
  10314. return;
  10315. }
  10316. }
  10317. },
  10318. word = function () {
  10319. // true, false, or null.
  10320. switch (ch) {
  10321. case 't':
  10322. next('t');
  10323. next('r');
  10324. next('u');
  10325. next('e');
  10326. return true;
  10327. case 'f':
  10328. next('f');
  10329. next('a');
  10330. next('l');
  10331. next('s');
  10332. next('e');
  10333. return false;
  10334. case 'n':
  10335. next('n');
  10336. next('u');
  10337. next('l');
  10338. next('l');
  10339. return null;
  10340. case 'I':
  10341. next('I');
  10342. next('n');
  10343. next('f');
  10344. next('i');
  10345. next('n');
  10346. next('i');
  10347. next('t');
  10348. next('y');
  10349. return Infinity;
  10350. case 'N':
  10351. next('N');
  10352. next('a');
  10353. next('N');
  10354. return NaN;
  10355. }
  10356. error("Unexpected " + renderChar(ch));
  10357. },
  10358. value,
  10359. // Place holder for the value function.
  10360. array = function () {
  10361. // Parse an array value.
  10362. var array = [];
  10363. if (ch === '[') {
  10364. next('[');
  10365. white();
  10366. while (ch) {
  10367. if (ch === ']') {
  10368. next(']');
  10369. return array; // Potentially empty array
  10370. }
  10371. // ES5 allows omitting elements in arrays, e.g. [,] and
  10372. // [,null]. We don't allow this in JSON5.
  10373. if (ch === ',') {
  10374. error("Missing array element");
  10375. } else {
  10376. array.push(value());
  10377. }
  10378. white();
  10379. // If there's no comma after this value, this needs to
  10380. // be the end of the array.
  10381. if (ch !== ',') {
  10382. next(']');
  10383. return array;
  10384. }
  10385. next(',');
  10386. white();
  10387. }
  10388. }
  10389. error("Bad array");
  10390. },
  10391. object = function () {
  10392. // Parse an object value.
  10393. var key,
  10394. object = {};
  10395. if (ch === '{') {
  10396. next('{');
  10397. white();
  10398. while (ch) {
  10399. if (ch === '}') {
  10400. next('}');
  10401. return object; // Potentially empty object
  10402. }
  10403. // Keys can be unquoted. If they are, they need to be
  10404. // valid JS identifiers.
  10405. if (ch === '"' || ch === "'") {
  10406. key = string();
  10407. } else {
  10408. key = identifier();
  10409. }
  10410. white();
  10411. next(':');
  10412. object[key] = value();
  10413. white();
  10414. // If there's no comma after this pair, this needs to be
  10415. // the end of the object.
  10416. if (ch !== ',') {
  10417. next('}');
  10418. return object;
  10419. }
  10420. next(',');
  10421. white();
  10422. }
  10423. }
  10424. error("Bad object");
  10425. };
  10426. value = function () {
  10427. // Parse a JSON value. It could be an object, an array, a string, a number,
  10428. // or a word.
  10429. white();
  10430. switch (ch) {
  10431. case '{':
  10432. return object();
  10433. case '[':
  10434. return array();
  10435. case '"':
  10436. case "'":
  10437. return string();
  10438. case '-':
  10439. case '+':
  10440. case '.':
  10441. return number();
  10442. default:
  10443. return ch >= '0' && ch <= '9' ? number() : word();
  10444. }
  10445. };
  10446. // Return the json_parse function. It will have access to all of the above
  10447. // functions and variables.
  10448. return function (source, reviver) {
  10449. var result;
  10450. text = String(source);
  10451. at = 0;
  10452. lineNumber = 1;
  10453. columnNumber = 1;
  10454. ch = ' ';
  10455. result = value();
  10456. white();
  10457. if (ch) {
  10458. error("Syntax error");
  10459. }
  10460. // If there is a reviver function, we recursively walk the new structure,
  10461. // passing each name/value pair to the reviver function for possible
  10462. // transformation, starting with a temporary root object that holds the result
  10463. // in an empty key. If there is not a reviver function, we simply return the
  10464. // result.
  10465. return typeof reviver === 'function' ? function walk(holder, key) {
  10466. var k,
  10467. v,
  10468. value = holder[key];
  10469. if (value && typeof value === 'object') {
  10470. for (k in value) {
  10471. if (Object.prototype.hasOwnProperty.call(value, k)) {
  10472. v = walk(value, k);
  10473. if (v !== undefined) {
  10474. value[k] = v;
  10475. } else {
  10476. delete value[k];
  10477. }
  10478. }
  10479. }
  10480. }
  10481. return reviver.call(holder, key, value);
  10482. }({ '': result }, '') : result;
  10483. };
  10484. }();
  10485. // JSON5 stringify will not quote keys where appropriate
  10486. JSON5.stringify = function (obj, replacer, space) {
  10487. if (replacer && typeof replacer !== "function" && !isArray(replacer)) {
  10488. throw new Error('Replacer must be a function or an array');
  10489. }
  10490. var getReplacedValueOrUndefined = function (holder, key, isTopLevel) {
  10491. var value = holder[key];
  10492. // Replace the value with its toJSON value first, if possible
  10493. if (value && value.toJSON && typeof value.toJSON === "function") {
  10494. value = value.toJSON();
  10495. }
  10496. // If the user-supplied replacer if a function, call it. If it's an array, check objects' string keys for
  10497. // presence in the array (removing the key/value pair from the resulting JSON if the key is missing).
  10498. if (typeof replacer === "function") {
  10499. return replacer.call(holder, key, value);
  10500. } else if (replacer) {
  10501. if (isTopLevel || isArray(holder) || replacer.indexOf(key) >= 0) {
  10502. return value;
  10503. } else {
  10504. return undefined;
  10505. }
  10506. } else {
  10507. return value;
  10508. }
  10509. };
  10510. function isWordChar(c) {
  10511. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '_' || c === '$';
  10512. }
  10513. function isWordStart(c) {
  10514. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '_' || c === '$';
  10515. }
  10516. function isWord(key) {
  10517. if (typeof key !== 'string') {
  10518. return false;
  10519. }
  10520. if (!isWordStart(key[0])) {
  10521. return false;
  10522. }
  10523. var i = 1,
  10524. length = key.length;
  10525. while (i < length) {
  10526. if (!isWordChar(key[i])) {
  10527. return false;
  10528. }
  10529. i++;
  10530. }
  10531. return true;
  10532. }
  10533. // export for use in tests
  10534. JSON5.isWord = isWord;
  10535. // polyfills
  10536. function isArray(obj) {
  10537. if (Array.isArray) {
  10538. return Array.isArray(obj);
  10539. } else {
  10540. return Object.prototype.toString.call(obj) === '[object Array]';
  10541. }
  10542. }
  10543. function isDate(obj) {
  10544. return Object.prototype.toString.call(obj) === '[object Date]';
  10545. }
  10546. var objStack = [];
  10547. function checkForCircular(obj) {
  10548. for (var i = 0; i < objStack.length; i++) {
  10549. if (objStack[i] === obj) {
  10550. throw new TypeError("Converting circular structure to JSON");
  10551. }
  10552. }
  10553. }
  10554. function makeIndent(str, num, noNewLine) {
  10555. if (!str) {
  10556. return "";
  10557. }
  10558. // indentation no more than 10 chars
  10559. if (str.length > 10) {
  10560. str = str.substring(0, 10);
  10561. }
  10562. var indent = noNewLine ? "" : "\n";
  10563. for (var i = 0; i < num; i++) {
  10564. indent += str;
  10565. }
  10566. return indent;
  10567. }
  10568. var indentStr;
  10569. if (space) {
  10570. if (typeof space === "string") {
  10571. indentStr = space;
  10572. } else if (typeof space === "number" && space >= 0) {
  10573. indentStr = makeIndent(" ", space, true);
  10574. } else {
  10575. // ignore space parameter
  10576. }
  10577. }
  10578. // Copied from Crokford's implementation of JSON
  10579. // See https://github.com/douglascrockford/JSON-js/blob/e39db4b7e6249f04a195e7dd0840e610cc9e941e/json2.js#L195
  10580. // Begin
  10581. var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
  10582. escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
  10583. meta = { // table of character substitutions
  10584. '\b': '\\b',
  10585. '\t': '\\t',
  10586. '\n': '\\n',
  10587. '\f': '\\f',
  10588. '\r': '\\r',
  10589. '"': '\\"',
  10590. '\\': '\\\\'
  10591. };
  10592. function escapeString(string) {
  10593. // If the string contains no control characters, no quote characters, and no
  10594. // backslash characters, then we can safely slap some quotes around it.
  10595. // Otherwise we must also replace the offending characters with safe escape
  10596. // sequences.
  10597. escapable.lastIndex = 0;
  10598. return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
  10599. var c = meta[a];
  10600. return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
  10601. }) + '"' : '"' + string + '"';
  10602. }
  10603. // End
  10604. function internalStringify(holder, key, isTopLevel) {
  10605. var buffer, res;
  10606. // Replace the value, if necessary
  10607. var obj_part = getReplacedValueOrUndefined(holder, key, isTopLevel);
  10608. if (obj_part && !isDate(obj_part)) {
  10609. // unbox objects
  10610. // don't unbox dates, since will turn it into number
  10611. obj_part = obj_part.valueOf();
  10612. }
  10613. switch (typeof obj_part) {
  10614. case "boolean":
  10615. return obj_part.toString();
  10616. case "number":
  10617. if (isNaN(obj_part) || !isFinite(obj_part)) {
  10618. return "null";
  10619. }
  10620. return obj_part.toString();
  10621. case "string":
  10622. return escapeString(obj_part.toString());
  10623. case "object":
  10624. if (obj_part === null) {
  10625. return "null";
  10626. } else if (isArray(obj_part)) {
  10627. checkForCircular(obj_part);
  10628. buffer = "[";
  10629. objStack.push(obj_part);
  10630. for (var i = 0; i < obj_part.length; i++) {
  10631. res = internalStringify(obj_part, i, false);
  10632. buffer += makeIndent(indentStr, objStack.length);
  10633. if (res === null || typeof res === "undefined") {
  10634. buffer += "null";
  10635. } else {
  10636. buffer += res;
  10637. }
  10638. if (i < obj_part.length - 1) {
  10639. buffer += ",";
  10640. } else if (indentStr) {
  10641. buffer += "\n";
  10642. }
  10643. }
  10644. objStack.pop();
  10645. if (obj_part.length) {
  10646. buffer += makeIndent(indentStr, objStack.length, true);
  10647. }
  10648. buffer += "]";
  10649. } else {
  10650. checkForCircular(obj_part);
  10651. buffer = "{";
  10652. var nonEmpty = false;
  10653. objStack.push(obj_part);
  10654. for (var prop in obj_part) {
  10655. if (obj_part.hasOwnProperty(prop)) {
  10656. var value = internalStringify(obj_part, prop, false);
  10657. isTopLevel = false;
  10658. if (typeof value !== "undefined" && value !== null) {
  10659. buffer += makeIndent(indentStr, objStack.length);
  10660. nonEmpty = true;
  10661. key = isWord(prop) ? prop : escapeString(prop);
  10662. buffer += key + ":" + (indentStr ? ' ' : '') + value + ",";
  10663. }
  10664. }
  10665. }
  10666. objStack.pop();
  10667. if (nonEmpty) {
  10668. buffer = buffer.substring(0, buffer.length - 1) + makeIndent(indentStr, objStack.length) + "}";
  10669. } else {
  10670. buffer = '{}';
  10671. }
  10672. }
  10673. return buffer;
  10674. default:
  10675. // functions and undefined should be ignored
  10676. return undefined;
  10677. }
  10678. }
  10679. // special case...when undefined is used inside of
  10680. // a compound object/array, return null.
  10681. // but when top-level, return undefined
  10682. var topLevelHolder = { "": obj };
  10683. if (obj === undefined) {
  10684. return getReplacedValueOrUndefined(topLevelHolder, '', true);
  10685. }
  10686. return internalStringify(topLevelHolder, '', true);
  10687. };
  10688. });
  10689. $__System.registerDynamic('ca', ['c'], true, function ($__require, exports, module) {
  10690. 'use strict';
  10691. var process = $__require('c');
  10692. var global = this || self,
  10693. GLOBAL = global;
  10694. function posix(path) {
  10695. return path.charAt(0) === '/';
  10696. }
  10697. function win32(path) {
  10698. // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
  10699. var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
  10700. var result = splitDeviceRe.exec(path);
  10701. var device = result[1] || '';
  10702. var isUnc = Boolean(device && device.charAt(1) !== ':');
  10703. // UNC paths are always absolute
  10704. return Boolean(result[2] || isUnc);
  10705. }
  10706. module.exports = process.platform === 'win32' ? win32 : posix;
  10707. module.exports.posix = posix;
  10708. module.exports.win32 = win32;
  10709. });
  10710. $__System.registerDynamic("cb", ["5a", "1d", "ad", "c9", "ca", "@node/path", "@node/fs", "c"], true, function ($__require, exports, module) {
  10711. "use strict";
  10712. var process = $__require("c");
  10713. var global = this || self,
  10714. GLOBAL = global;
  10715. exports.__esModule = true;
  10716. var _assign = $__require("5a");
  10717. var _assign2 = _interopRequireDefault(_assign);
  10718. var _classCallCheck2 = $__require("1d");
  10719. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  10720. exports.default = buildConfigChain;
  10721. var _resolve = $__require("ad");
  10722. var _resolve2 = _interopRequireDefault(_resolve);
  10723. var _json = $__require("c9");
  10724. var _json2 = _interopRequireDefault(_json);
  10725. var _pathIsAbsolute = $__require("ca");
  10726. var _pathIsAbsolute2 = _interopRequireDefault(_pathIsAbsolute);
  10727. var _path = $__require("@node/path");
  10728. var _path2 = _interopRequireDefault(_path);
  10729. var _fs = $__require("@node/fs");
  10730. var _fs2 = _interopRequireDefault(_fs);
  10731. function _interopRequireDefault(obj) {
  10732. return obj && obj.__esModule ? obj : { default: obj };
  10733. }
  10734. var existsCache = {};
  10735. var jsonCache = {};
  10736. var BABELIGNORE_FILENAME = ".babelignore";
  10737. var BABELRC_FILENAME = ".babelrc";
  10738. var PACKAGE_FILENAME = "package.json";
  10739. function exists(filename) {
  10740. var cached = existsCache[filename];
  10741. if (cached == null) {
  10742. return existsCache[filename] = _fs2.default.existsSync(filename);
  10743. } else {
  10744. return cached;
  10745. }
  10746. }
  10747. function buildConfigChain() {
  10748. var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  10749. var log = arguments[1];
  10750. var filename = opts.filename;
  10751. var builder = new ConfigChainBuilder(log);
  10752. if (opts.babelrc !== false) {
  10753. builder.findConfigs(filename);
  10754. }
  10755. builder.mergeConfig({
  10756. options: opts,
  10757. alias: "base",
  10758. dirname: filename && _path2.default.dirname(filename)
  10759. });
  10760. return builder.configs;
  10761. }
  10762. var ConfigChainBuilder = function () {
  10763. function ConfigChainBuilder(log) {
  10764. (0, _classCallCheck3.default)(this, ConfigChainBuilder);
  10765. this.resolvedConfigs = [];
  10766. this.configs = [];
  10767. this.log = log;
  10768. }
  10769. ConfigChainBuilder.prototype.findConfigs = function findConfigs(loc) {
  10770. if (!loc) return;
  10771. if (!(0, _pathIsAbsolute2.default)(loc)) {
  10772. loc = _path2.default.join(process.cwd(), loc);
  10773. }
  10774. var foundConfig = false;
  10775. var foundIgnore = false;
  10776. while (loc !== (loc = _path2.default.dirname(loc))) {
  10777. if (!foundConfig) {
  10778. var configLoc = _path2.default.join(loc, BABELRC_FILENAME);
  10779. if (exists(configLoc)) {
  10780. this.addConfig(configLoc);
  10781. foundConfig = true;
  10782. }
  10783. var pkgLoc = _path2.default.join(loc, PACKAGE_FILENAME);
  10784. if (!foundConfig && exists(pkgLoc)) {
  10785. foundConfig = this.addConfig(pkgLoc, "babel", JSON);
  10786. }
  10787. }
  10788. if (!foundIgnore) {
  10789. var ignoreLoc = _path2.default.join(loc, BABELIGNORE_FILENAME);
  10790. if (exists(ignoreLoc)) {
  10791. this.addIgnoreConfig(ignoreLoc);
  10792. foundIgnore = true;
  10793. }
  10794. }
  10795. if (foundIgnore && foundConfig) return;
  10796. }
  10797. };
  10798. ConfigChainBuilder.prototype.addIgnoreConfig = function addIgnoreConfig(loc) {
  10799. var file = _fs2.default.readFileSync(loc, "utf8");
  10800. var lines = file.split("\n");
  10801. lines = lines.map(function (line) {
  10802. return line.replace(/#(.*?)$/, "").trim();
  10803. }).filter(function (line) {
  10804. return !!line;
  10805. });
  10806. if (lines.length) {
  10807. this.mergeConfig({
  10808. options: { ignore: lines },
  10809. alias: loc,
  10810. dirname: _path2.default.dirname(loc)
  10811. });
  10812. }
  10813. };
  10814. ConfigChainBuilder.prototype.addConfig = function addConfig(loc, key) {
  10815. var json = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _json2.default;
  10816. if (this.resolvedConfigs.indexOf(loc) >= 0) {
  10817. return false;
  10818. }
  10819. this.resolvedConfigs.push(loc);
  10820. var content = _fs2.default.readFileSync(loc, "utf8");
  10821. var options = void 0;
  10822. try {
  10823. options = jsonCache[content] = jsonCache[content] || json.parse(content);
  10824. if (key) options = options[key];
  10825. } catch (err) {
  10826. err.message = loc + ": Error while parsing JSON - " + err.message;
  10827. throw err;
  10828. }
  10829. this.mergeConfig({
  10830. options: options,
  10831. alias: loc,
  10832. dirname: _path2.default.dirname(loc)
  10833. });
  10834. return !!options;
  10835. };
  10836. ConfigChainBuilder.prototype.mergeConfig = function mergeConfig(_ref) {
  10837. var options = _ref.options,
  10838. alias = _ref.alias,
  10839. loc = _ref.loc,
  10840. dirname = _ref.dirname;
  10841. if (!options) {
  10842. return false;
  10843. }
  10844. options = (0, _assign2.default)({}, options);
  10845. dirname = dirname || process.cwd();
  10846. loc = loc || alias;
  10847. if (options.extends) {
  10848. var extendsLoc = (0, _resolve2.default)(options.extends, dirname);
  10849. if (extendsLoc) {
  10850. this.addConfig(extendsLoc);
  10851. } else {
  10852. if (this.log) this.log.error("Couldn't resolve extends clause of " + options.extends + " in " + alias);
  10853. }
  10854. delete options.extends;
  10855. }
  10856. this.configs.push({
  10857. options: options,
  10858. alias: alias,
  10859. loc: loc,
  10860. dirname: dirname
  10861. });
  10862. var envOpts = void 0;
  10863. var envKey = process.env.BABEL_ENV || "production" || "development";
  10864. if (options.env) {
  10865. envOpts = options.env[envKey];
  10866. delete options.env;
  10867. }
  10868. this.mergeConfig({
  10869. options: envOpts,
  10870. alias: alias + ".env." + envKey,
  10871. dirname: dirname
  10872. });
  10873. };
  10874. return ConfigChainBuilder;
  10875. }();
  10876. module.exports = exports["default"];
  10877. });
  10878. $__System.registerDynamic("cc", ["99", "5b", "5a", "17", "30", "1d", "cd", "98", "f", "a8", "ab", "af", "b0", "ce", "c3", "a9", "c4", "cb", "@node/path", "c"], true, function ($__require, exports, module) {
  10879. "use strict";
  10880. var process = $__require("c");
  10881. var global = this || self,
  10882. GLOBAL = global;
  10883. exports.__esModule = true;
  10884. var _objectWithoutProperties2 = $__require("99");
  10885. var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
  10886. var _stringify = $__require("5b");
  10887. var _stringify2 = _interopRequireDefault(_stringify);
  10888. var _assign = $__require("5a");
  10889. var _assign2 = _interopRequireDefault(_assign);
  10890. var _getIterator2 = $__require("17");
  10891. var _getIterator3 = _interopRequireDefault(_getIterator2);
  10892. var _typeof2 = $__require("30");
  10893. var _typeof3 = _interopRequireDefault(_typeof2);
  10894. var _classCallCheck2 = $__require("1d");
  10895. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  10896. var _node = $__require("cd");
  10897. var context = _interopRequireWildcard(_node);
  10898. var _plugin2 = $__require("98");
  10899. var _plugin3 = _interopRequireDefault(_plugin2);
  10900. var _babelMessages = $__require("f");
  10901. var messages = _interopRequireWildcard(_babelMessages);
  10902. var _index = $__require("a8");
  10903. var _resolvePlugin = $__require("ab");
  10904. var _resolvePlugin2 = _interopRequireDefault(_resolvePlugin);
  10905. var _resolvePreset = $__require("af");
  10906. var _resolvePreset2 = _interopRequireDefault(_resolvePreset);
  10907. var _cloneDeepWith = $__require("b0");
  10908. var _cloneDeepWith2 = _interopRequireDefault(_cloneDeepWith);
  10909. var _clone = $__require("ce");
  10910. var _clone2 = _interopRequireDefault(_clone);
  10911. var _merge = $__require("c3");
  10912. var _merge2 = _interopRequireDefault(_merge);
  10913. var _config2 = $__require("a9");
  10914. var _config3 = _interopRequireDefault(_config2);
  10915. var _removed = $__require("c4");
  10916. var _removed2 = _interopRequireDefault(_removed);
  10917. var _buildConfigChain = $__require("cb");
  10918. var _buildConfigChain2 = _interopRequireDefault(_buildConfigChain);
  10919. var _path = $__require("@node/path");
  10920. var _path2 = _interopRequireDefault(_path);
  10921. function _interopRequireWildcard(obj) {
  10922. if (obj && obj.__esModule) {
  10923. return obj;
  10924. } else {
  10925. var newObj = {};if (obj != null) {
  10926. for (var key in obj) {
  10927. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  10928. }
  10929. }newObj.default = obj;return newObj;
  10930. }
  10931. }
  10932. function _interopRequireDefault(obj) {
  10933. return obj && obj.__esModule ? obj : { default: obj };
  10934. }
  10935. var OptionManager = function () {
  10936. function OptionManager(log) {
  10937. (0, _classCallCheck3.default)(this, OptionManager);
  10938. this.resolvedConfigs = [];
  10939. this.options = OptionManager.createBareOptions();
  10940. this.log = log;
  10941. }
  10942. OptionManager.memoisePluginContainer = function memoisePluginContainer(fn, loc, i, alias) {
  10943. for (var _iterator = OptionManager.memoisedPlugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  10944. var _ref;
  10945. if (_isArray) {
  10946. if (_i >= _iterator.length) break;
  10947. _ref = _iterator[_i++];
  10948. } else {
  10949. _i = _iterator.next();
  10950. if (_i.done) break;
  10951. _ref = _i.value;
  10952. }
  10953. var cache = _ref;
  10954. if (cache.container === fn) return cache.plugin;
  10955. }
  10956. var obj = void 0;
  10957. if (typeof fn === "function") {
  10958. obj = fn(context);
  10959. } else {
  10960. obj = fn;
  10961. }
  10962. if ((typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) === "object") {
  10963. var _plugin = new _plugin3.default(obj, alias);
  10964. OptionManager.memoisedPlugins.push({
  10965. container: fn,
  10966. plugin: _plugin
  10967. });
  10968. return _plugin;
  10969. } else {
  10970. throw new TypeError(messages.get("pluginNotObject", loc, i, typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) + loc + i);
  10971. }
  10972. };
  10973. OptionManager.createBareOptions = function createBareOptions() {
  10974. var opts = {};
  10975. for (var _key in _config3.default) {
  10976. var opt = _config3.default[_key];
  10977. opts[_key] = (0, _clone2.default)(opt.default);
  10978. }
  10979. return opts;
  10980. };
  10981. OptionManager.normalisePlugin = function normalisePlugin(plugin, loc, i, alias) {
  10982. plugin = plugin.__esModule ? plugin.default : plugin;
  10983. if (!(plugin instanceof _plugin3.default)) {
  10984. if (typeof plugin === "function" || (typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin)) === "object") {
  10985. plugin = OptionManager.memoisePluginContainer(plugin, loc, i, alias);
  10986. } else {
  10987. throw new TypeError(messages.get("pluginNotFunction", loc, i, typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin)));
  10988. }
  10989. }
  10990. plugin.init(loc, i);
  10991. return plugin;
  10992. };
  10993. OptionManager.normalisePlugins = function normalisePlugins(loc, dirname, plugins) {
  10994. return plugins.map(function (val, i) {
  10995. var plugin = void 0,
  10996. options = void 0;
  10997. if (!val) {
  10998. throw new TypeError("Falsy value found in plugins");
  10999. }
  11000. if (Array.isArray(val)) {
  11001. plugin = val[0];
  11002. options = val[1];
  11003. } else {
  11004. plugin = val;
  11005. }
  11006. var alias = typeof plugin === "string" ? plugin : loc + "$" + i;
  11007. if (typeof plugin === "string") {
  11008. var pluginLoc = (0, _resolvePlugin2.default)(plugin, dirname);
  11009. if (pluginLoc) {
  11010. plugin = $__require(pluginLoc);
  11011. } else {
  11012. throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname));
  11013. }
  11014. }
  11015. plugin = OptionManager.normalisePlugin(plugin, loc, i, alias);
  11016. return [plugin, options];
  11017. });
  11018. };
  11019. OptionManager.prototype.mergeOptions = function mergeOptions(_ref2) {
  11020. var _this = this;
  11021. var rawOpts = _ref2.options,
  11022. extendingOpts = _ref2.extending,
  11023. alias = _ref2.alias,
  11024. loc = _ref2.loc,
  11025. dirname = _ref2.dirname;
  11026. alias = alias || "foreign";
  11027. if (!rawOpts) return;
  11028. if ((typeof rawOpts === "undefined" ? "undefined" : (0, _typeof3.default)(rawOpts)) !== "object" || Array.isArray(rawOpts)) {
  11029. this.log.error("Invalid options type for " + alias, TypeError);
  11030. }
  11031. var opts = (0, _cloneDeepWith2.default)(rawOpts, function (val) {
  11032. if (val instanceof _plugin3.default) {
  11033. return val;
  11034. }
  11035. });
  11036. dirname = dirname || process.cwd();
  11037. loc = loc || alias;
  11038. for (var _key2 in opts) {
  11039. var option = _config3.default[_key2];
  11040. if (!option && this.log) {
  11041. if (_removed2.default[_key2]) {
  11042. this.log.error("Using removed Babel 5 option: " + alias + "." + _key2 + " - " + _removed2.default[_key2].message, ReferenceError);
  11043. } else {
  11044. var unknownOptErr = "Unknown option: " + alias + "." + _key2 + ". Check out http://babeljs.io/docs/usage/options/ for more information about options.";
  11045. var presetConfigErr = "A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.";
  11046. this.log.error(unknownOptErr + "\n\n" + presetConfigErr, ReferenceError);
  11047. }
  11048. }
  11049. }
  11050. (0, _index.normaliseOptions)(opts);
  11051. if (opts.plugins) {
  11052. opts.plugins = OptionManager.normalisePlugins(loc, dirname, opts.plugins);
  11053. }
  11054. if (opts.presets) {
  11055. if (opts.passPerPreset) {
  11056. opts.presets = this.resolvePresets(opts.presets, dirname, function (preset, presetLoc) {
  11057. _this.mergeOptions({
  11058. options: preset,
  11059. extending: preset,
  11060. alias: presetLoc,
  11061. loc: presetLoc,
  11062. dirname: dirname
  11063. });
  11064. });
  11065. } else {
  11066. this.mergePresets(opts.presets, dirname);
  11067. delete opts.presets;
  11068. }
  11069. }
  11070. if (rawOpts === extendingOpts) {
  11071. (0, _assign2.default)(extendingOpts, opts);
  11072. } else {
  11073. (0, _merge2.default)(extendingOpts || this.options, opts);
  11074. }
  11075. };
  11076. OptionManager.prototype.mergePresets = function mergePresets(presets, dirname) {
  11077. var _this2 = this;
  11078. this.resolvePresets(presets, dirname, function (presetOpts, presetLoc) {
  11079. _this2.mergeOptions({
  11080. options: presetOpts,
  11081. alias: presetLoc,
  11082. loc: presetLoc,
  11083. dirname: _path2.default.dirname(presetLoc || "")
  11084. });
  11085. });
  11086. };
  11087. OptionManager.prototype.resolvePresets = function resolvePresets(presets, dirname, onResolve) {
  11088. return presets.map(function (val) {
  11089. var options = void 0;
  11090. if (Array.isArray(val)) {
  11091. if (val.length > 2) {
  11092. throw new Error("Unexpected extra options " + (0, _stringify2.default)(val.slice(2)) + " passed to preset.");
  11093. }
  11094. var _val = val;
  11095. val = _val[0];
  11096. options = _val[1];
  11097. }
  11098. var presetLoc = void 0;
  11099. try {
  11100. if (typeof val === "string") {
  11101. presetLoc = (0, _resolvePreset2.default)(val, dirname);
  11102. if (!presetLoc) {
  11103. throw new Error("Couldn't find preset " + (0, _stringify2.default)(val) + " relative to directory " + (0, _stringify2.default)(dirname));
  11104. }
  11105. val = $__require(presetLoc);
  11106. }
  11107. if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.__esModule) {
  11108. if (val.default) {
  11109. val = val.default;
  11110. } else {
  11111. var _val2 = val,
  11112. __esModule = _val2.__esModule,
  11113. rest = (0, _objectWithoutProperties3.default)(_val2, ["__esModule"]);
  11114. val = rest;
  11115. }
  11116. }
  11117. if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.buildPreset) val = val.buildPreset;
  11118. if (typeof val !== "function" && options !== undefined) {
  11119. throw new Error("Options " + (0, _stringify2.default)(options) + " passed to " + (presetLoc || "a preset") + " which does not accept options.");
  11120. }
  11121. if (typeof val === "function") val = val(context, options, { dirname: dirname });
  11122. if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) !== "object") {
  11123. throw new Error("Unsupported preset format: " + val + ".");
  11124. }
  11125. onResolve && onResolve(val, presetLoc);
  11126. } catch (e) {
  11127. if (presetLoc) {
  11128. e.message += " (While processing preset: " + (0, _stringify2.default)(presetLoc) + ")";
  11129. }
  11130. throw e;
  11131. }
  11132. return val;
  11133. });
  11134. };
  11135. OptionManager.prototype.normaliseOptions = function normaliseOptions() {
  11136. var opts = this.options;
  11137. for (var _key3 in _config3.default) {
  11138. var option = _config3.default[_key3];
  11139. var val = opts[_key3];
  11140. if (!val && option.optional) continue;
  11141. if (option.alias) {
  11142. opts[option.alias] = opts[option.alias] || val;
  11143. } else {
  11144. opts[_key3] = val;
  11145. }
  11146. }
  11147. };
  11148. OptionManager.prototype.init = function init() {
  11149. var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11150. for (var _iterator2 = (0, _buildConfigChain2.default)(opts, this.log), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  11151. var _ref3;
  11152. if (_isArray2) {
  11153. if (_i2 >= _iterator2.length) break;
  11154. _ref3 = _iterator2[_i2++];
  11155. } else {
  11156. _i2 = _iterator2.next();
  11157. if (_i2.done) break;
  11158. _ref3 = _i2.value;
  11159. }
  11160. var _config = _ref3;
  11161. this.mergeOptions(_config);
  11162. }
  11163. this.normaliseOptions(opts);
  11164. return this.options;
  11165. };
  11166. return OptionManager;
  11167. }();
  11168. exports.default = OptionManager;
  11169. OptionManager.memoisedPlugins = [];
  11170. module.exports = exports["default"];
  11171. });
  11172. $__System.registerDynamic("1b", ["cf", "1d", "1e", "1f", "c"], true, function ($__require, exports, module) {
  11173. "use strict";
  11174. var process = $__require("c");
  11175. var global = this || self,
  11176. GLOBAL = global;
  11177. exports.__esModule = true;
  11178. var _map = $__require("cf");
  11179. var _map2 = _interopRequireDefault(_map);
  11180. var _classCallCheck2 = $__require("1d");
  11181. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  11182. var _possibleConstructorReturn2 = $__require("1e");
  11183. var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
  11184. var _inherits2 = $__require("1f");
  11185. var _inherits3 = _interopRequireDefault(_inherits2);
  11186. function _interopRequireDefault(obj) {
  11187. return obj && obj.__esModule ? obj : { default: obj };
  11188. }
  11189. var Store = function (_Map) {
  11190. (0, _inherits3.default)(Store, _Map);
  11191. function Store() {
  11192. (0, _classCallCheck3.default)(this, Store);
  11193. var _this = (0, _possibleConstructorReturn3.default)(this, _Map.call(this));
  11194. _this.dynamicData = {};
  11195. return _this;
  11196. }
  11197. Store.prototype.setDynamic = function setDynamic(key, fn) {
  11198. this.dynamicData[key] = fn;
  11199. };
  11200. Store.prototype.get = function get(key) {
  11201. if (this.has(key)) {
  11202. return _Map.prototype.get.call(this, key);
  11203. } else {
  11204. if (Object.prototype.hasOwnProperty.call(this.dynamicData, key)) {
  11205. var val = this.dynamicData[key]();
  11206. this.set(key, val);
  11207. return val;
  11208. }
  11209. }
  11210. };
  11211. return Store;
  11212. }(_map2.default);
  11213. exports.default = Store;
  11214. module.exports = exports["default"];
  11215. });
  11216. $__System.registerDynamic("98", ["17", "1d", "1e", "1f", "cc", "f", "1b", "d0", "d1", "ce", "c"], true, function ($__require, exports, module) {
  11217. "use strict";
  11218. var process = $__require("c");
  11219. var global = this || self,
  11220. GLOBAL = global;
  11221. exports.__esModule = true;
  11222. var _getIterator2 = $__require("17");
  11223. var _getIterator3 = _interopRequireDefault(_getIterator2);
  11224. var _classCallCheck2 = $__require("1d");
  11225. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  11226. var _possibleConstructorReturn2 = $__require("1e");
  11227. var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
  11228. var _inherits2 = $__require("1f");
  11229. var _inherits3 = _interopRequireDefault(_inherits2);
  11230. var _optionManager = $__require("cc");
  11231. var _optionManager2 = _interopRequireDefault(_optionManager);
  11232. var _babelMessages = $__require("f");
  11233. var messages = _interopRequireWildcard(_babelMessages);
  11234. var _store = $__require("1b");
  11235. var _store2 = _interopRequireDefault(_store);
  11236. var _babelTraverse = $__require("d0");
  11237. var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
  11238. var _assign = $__require("d1");
  11239. var _assign2 = _interopRequireDefault(_assign);
  11240. var _clone = $__require("ce");
  11241. var _clone2 = _interopRequireDefault(_clone);
  11242. function _interopRequireWildcard(obj) {
  11243. if (obj && obj.__esModule) {
  11244. return obj;
  11245. } else {
  11246. var newObj = {};if (obj != null) {
  11247. for (var key in obj) {
  11248. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  11249. }
  11250. }newObj.default = obj;return newObj;
  11251. }
  11252. }
  11253. function _interopRequireDefault(obj) {
  11254. return obj && obj.__esModule ? obj : { default: obj };
  11255. }
  11256. var GLOBAL_VISITOR_PROPS = ["enter", "exit"];
  11257. var Plugin = function (_Store) {
  11258. (0, _inherits3.default)(Plugin, _Store);
  11259. function Plugin(plugin, key) {
  11260. (0, _classCallCheck3.default)(this, Plugin);
  11261. var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
  11262. _this.initialized = false;
  11263. _this.raw = (0, _assign2.default)({}, plugin);
  11264. _this.key = _this.take("name") || key;
  11265. _this.manipulateOptions = _this.take("manipulateOptions");
  11266. _this.post = _this.take("post");
  11267. _this.pre = _this.take("pre");
  11268. _this.visitor = _this.normaliseVisitor((0, _clone2.default)(_this.take("visitor")) || {});
  11269. return _this;
  11270. }
  11271. Plugin.prototype.take = function take(key) {
  11272. var val = this.raw[key];
  11273. delete this.raw[key];
  11274. return val;
  11275. };
  11276. Plugin.prototype.chain = function chain(target, key) {
  11277. if (!target[key]) return this[key];
  11278. if (!this[key]) return target[key];
  11279. var fns = [target[key], this[key]];
  11280. return function () {
  11281. var val = void 0;
  11282. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  11283. args[_key] = arguments[_key];
  11284. }
  11285. for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  11286. var _ref;
  11287. if (_isArray) {
  11288. if (_i >= _iterator.length) break;
  11289. _ref = _iterator[_i++];
  11290. } else {
  11291. _i = _iterator.next();
  11292. if (_i.done) break;
  11293. _ref = _i.value;
  11294. }
  11295. var fn = _ref;
  11296. if (fn) {
  11297. var ret = fn.apply(this, args);
  11298. if (ret != null) val = ret;
  11299. }
  11300. }
  11301. return val;
  11302. };
  11303. };
  11304. Plugin.prototype.maybeInherit = function maybeInherit(loc) {
  11305. var inherits = this.take("inherits");
  11306. if (!inherits) return;
  11307. inherits = _optionManager2.default.normalisePlugin(inherits, loc, "inherits");
  11308. this.manipulateOptions = this.chain(inherits, "manipulateOptions");
  11309. this.post = this.chain(inherits, "post");
  11310. this.pre = this.chain(inherits, "pre");
  11311. this.visitor = _babelTraverse2.default.visitors.merge([inherits.visitor, this.visitor]);
  11312. };
  11313. Plugin.prototype.init = function init(loc, i) {
  11314. if (this.initialized) return;
  11315. this.initialized = true;
  11316. this.maybeInherit(loc);
  11317. for (var key in this.raw) {
  11318. throw new Error(messages.get("pluginInvalidProperty", loc, i, key));
  11319. }
  11320. };
  11321. Plugin.prototype.normaliseVisitor = function normaliseVisitor(visitor) {
  11322. for (var _iterator2 = GLOBAL_VISITOR_PROPS, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  11323. var _ref2;
  11324. if (_isArray2) {
  11325. if (_i2 >= _iterator2.length) break;
  11326. _ref2 = _iterator2[_i2++];
  11327. } else {
  11328. _i2 = _iterator2.next();
  11329. if (_i2.done) break;
  11330. _ref2 = _i2.value;
  11331. }
  11332. var key = _ref2;
  11333. if (visitor[key]) {
  11334. throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. " + "Please target individual nodes.");
  11335. }
  11336. }
  11337. _babelTraverse2.default.explode(visitor);
  11338. return visitor;
  11339. };
  11340. return Plugin;
  11341. }(_store2.default);
  11342. exports.default = Plugin;
  11343. module.exports = exports["default"];
  11344. });
  11345. $__System.registerDynamic("d2", ["d3", "98", "11", "c"], true, function ($__require, exports, module) {
  11346. "use strict";
  11347. var process = $__require("c");
  11348. var global = this || self,
  11349. GLOBAL = global;
  11350. exports.__esModule = true;
  11351. var _symbol = $__require("d3");
  11352. var _symbol2 = _interopRequireDefault(_symbol);
  11353. var _plugin = $__require("98");
  11354. var _plugin2 = _interopRequireDefault(_plugin);
  11355. var _babelTypes = $__require("11");
  11356. var t = _interopRequireWildcard(_babelTypes);
  11357. function _interopRequireWildcard(obj) {
  11358. if (obj && obj.__esModule) {
  11359. return obj;
  11360. } else {
  11361. var newObj = {};if (obj != null) {
  11362. for (var key in obj) {
  11363. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  11364. }
  11365. }newObj.default = obj;return newObj;
  11366. }
  11367. }
  11368. function _interopRequireDefault(obj) {
  11369. return obj && obj.__esModule ? obj : { default: obj };
  11370. }
  11371. var SUPER_THIS_BOUND = (0, _symbol2.default)("super this bound");
  11372. var superVisitor = {
  11373. CallExpression: function CallExpression(path) {
  11374. if (!path.get("callee").isSuper()) return;
  11375. var node = path.node;
  11376. if (node[SUPER_THIS_BOUND]) return;
  11377. node[SUPER_THIS_BOUND] = true;
  11378. path.replaceWith(t.assignmentExpression("=", this.id, node));
  11379. }
  11380. };
  11381. exports.default = new _plugin2.default({
  11382. name: "internal.shadowFunctions",
  11383. visitor: {
  11384. ThisExpression: function ThisExpression(path) {
  11385. remap(path, "this");
  11386. },
  11387. ReferencedIdentifier: function ReferencedIdentifier(path) {
  11388. if (path.node.name === "arguments") {
  11389. remap(path, "arguments");
  11390. }
  11391. }
  11392. }
  11393. });
  11394. function shouldShadow(path, shadowPath) {
  11395. if (path.is("_forceShadow")) {
  11396. return true;
  11397. } else {
  11398. return shadowPath;
  11399. }
  11400. }
  11401. function remap(path, key) {
  11402. var shadowPath = path.inShadow(key);
  11403. if (!shouldShadow(path, shadowPath)) return;
  11404. var shadowFunction = path.node._shadowedFunctionLiteral;
  11405. var currentFunction = void 0;
  11406. var passedShadowFunction = false;
  11407. var fnPath = path.find(function (innerPath) {
  11408. if (innerPath.parentPath && innerPath.parentPath.isClassProperty() && innerPath.key === "value") {
  11409. return true;
  11410. }
  11411. if (path === innerPath) return false;
  11412. if (innerPath.isProgram() || innerPath.isFunction()) {
  11413. currentFunction = currentFunction || innerPath;
  11414. }
  11415. if (innerPath.isProgram()) {
  11416. passedShadowFunction = true;
  11417. return true;
  11418. } else if (innerPath.isFunction() && !innerPath.isArrowFunctionExpression()) {
  11419. if (shadowFunction) {
  11420. if (innerPath === shadowFunction || innerPath.node === shadowFunction.node) return true;
  11421. } else {
  11422. if (!innerPath.is("shadow")) return true;
  11423. }
  11424. passedShadowFunction = true;
  11425. return false;
  11426. }
  11427. return false;
  11428. });
  11429. if (shadowFunction && fnPath.isProgram() && !shadowFunction.isProgram()) {
  11430. fnPath = path.findParent(function (p) {
  11431. return p.isProgram() || p.isFunction();
  11432. });
  11433. }
  11434. if (fnPath === currentFunction) return;
  11435. if (!passedShadowFunction) return;
  11436. var cached = fnPath.getData(key);
  11437. if (cached) return path.replaceWith(cached);
  11438. var id = path.scope.generateUidIdentifier(key);
  11439. fnPath.setData(key, id);
  11440. var classPath = fnPath.findParent(function (p) {
  11441. return p.isClass();
  11442. });
  11443. var hasSuperClass = !!(classPath && classPath.node && classPath.node.superClass);
  11444. if (key === "this" && fnPath.isMethod({ kind: "constructor" }) && hasSuperClass) {
  11445. fnPath.scope.push({ id: id });
  11446. fnPath.traverse(superVisitor, { id: id });
  11447. } else {
  11448. var init = key === "this" ? t.thisExpression() : t.identifier(key);
  11449. if (shadowFunction) init._shadowedFunctionLiteral = shadowFunction;
  11450. fnPath.scope.push({ id: id, init: init });
  11451. }
  11452. return path.replaceWith(id);
  11453. }
  11454. module.exports = exports["default"];
  11455. });
  11456. $__System.registerDynamic("1c", ["17", "d4", "5a", "1d", "1e", "1f", "d", "16", "18", "cc", "1a", "d0", "2e", "e", "d5", "d6", "5f", "1b", "d7", "a4", "@node/path", "11", "ad", "97", "d2", "c"], true, function ($__require, exports, module) {
  11457. "use strict";
  11458. var process = $__require("c");
  11459. var global = this || self,
  11460. GLOBAL = global;
  11461. exports.__esModule = true;
  11462. exports.File = undefined;
  11463. var _getIterator2 = $__require("17");
  11464. var _getIterator3 = _interopRequireDefault(_getIterator2);
  11465. var _create = $__require("d4");
  11466. var _create2 = _interopRequireDefault(_create);
  11467. var _assign = $__require("5a");
  11468. var _assign2 = _interopRequireDefault(_assign);
  11469. var _classCallCheck2 = $__require("1d");
  11470. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  11471. var _possibleConstructorReturn2 = $__require("1e");
  11472. var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
  11473. var _inherits2 = $__require("1f");
  11474. var _inherits3 = _interopRequireDefault(_inherits2);
  11475. var _babelHelpers = $__require("d");
  11476. var _babelHelpers2 = _interopRequireDefault(_babelHelpers);
  11477. var _metadata = $__require("16");
  11478. var metadataVisitor = _interopRequireWildcard(_metadata);
  11479. var _convertSourceMap = $__require("18");
  11480. var _convertSourceMap2 = _interopRequireDefault(_convertSourceMap);
  11481. var _optionManager = $__require("cc");
  11482. var _optionManager2 = _interopRequireDefault(_optionManager);
  11483. var _pluginPass = $__require("1a");
  11484. var _pluginPass2 = _interopRequireDefault(_pluginPass);
  11485. var _babelTraverse = $__require("d0");
  11486. var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
  11487. var _sourceMap = $__require("2e");
  11488. var _sourceMap2 = _interopRequireDefault(_sourceMap);
  11489. var _babelGenerator = $__require("e");
  11490. var _babelGenerator2 = _interopRequireDefault(_babelGenerator);
  11491. var _babelCodeFrame = $__require("d5");
  11492. var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame);
  11493. var _defaults = $__require("d6");
  11494. var _defaults2 = _interopRequireDefault(_defaults);
  11495. var _logger = $__require("5f");
  11496. var _logger2 = _interopRequireDefault(_logger);
  11497. var _store = $__require("1b");
  11498. var _store2 = _interopRequireDefault(_store);
  11499. var _babylon = $__require("d7");
  11500. var _util = $__require("a4");
  11501. var util = _interopRequireWildcard(_util);
  11502. var _path = $__require("@node/path");
  11503. var _path2 = _interopRequireDefault(_path);
  11504. var _babelTypes = $__require("11");
  11505. var t = _interopRequireWildcard(_babelTypes);
  11506. var _resolve = $__require("ad");
  11507. var _resolve2 = _interopRequireDefault(_resolve);
  11508. var _blockHoist = $__require("97");
  11509. var _blockHoist2 = _interopRequireDefault(_blockHoist);
  11510. var _shadowFunctions = $__require("d2");
  11511. var _shadowFunctions2 = _interopRequireDefault(_shadowFunctions);
  11512. function _interopRequireWildcard(obj) {
  11513. if (obj && obj.__esModule) {
  11514. return obj;
  11515. } else {
  11516. var newObj = {};if (obj != null) {
  11517. for (var key in obj) {
  11518. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  11519. }
  11520. }newObj.default = obj;return newObj;
  11521. }
  11522. }
  11523. function _interopRequireDefault(obj) {
  11524. return obj && obj.__esModule ? obj : { default: obj };
  11525. }
  11526. var shebangRegex = /^#!.*/;
  11527. var INTERNAL_PLUGINS = [[_blockHoist2.default], [_shadowFunctions2.default]];
  11528. var errorVisitor = {
  11529. enter: function enter(path, state) {
  11530. var loc = path.node.loc;
  11531. if (loc) {
  11532. state.loc = loc;
  11533. path.stop();
  11534. }
  11535. }
  11536. };
  11537. var File = function (_Store) {
  11538. (0, _inherits3.default)(File, _Store);
  11539. function File() {
  11540. var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11541. var pipeline = arguments[1];
  11542. (0, _classCallCheck3.default)(this, File);
  11543. var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
  11544. _this.pipeline = pipeline;
  11545. _this.log = new _logger2.default(_this, opts.filename || "unknown");
  11546. _this.opts = _this.initOptions(opts);
  11547. _this.parserOpts = {
  11548. sourceType: _this.opts.sourceType,
  11549. sourceFileName: _this.opts.filename,
  11550. plugins: []
  11551. };
  11552. _this.pluginVisitors = [];
  11553. _this.pluginPasses = [];
  11554. _this.buildPluginsForOptions(_this.opts);
  11555. if (_this.opts.passPerPreset) {
  11556. _this.perPresetOpts = [];
  11557. _this.opts.presets.forEach(function (presetOpts) {
  11558. var perPresetOpts = (0, _assign2.default)((0, _create2.default)(_this.opts), presetOpts);
  11559. _this.perPresetOpts.push(perPresetOpts);
  11560. _this.buildPluginsForOptions(perPresetOpts);
  11561. });
  11562. }
  11563. _this.metadata = {
  11564. usedHelpers: [],
  11565. marked: [],
  11566. modules: {
  11567. imports: [],
  11568. exports: {
  11569. exported: [],
  11570. specifiers: []
  11571. }
  11572. }
  11573. };
  11574. _this.dynamicImportTypes = {};
  11575. _this.dynamicImportIds = {};
  11576. _this.dynamicImports = [];
  11577. _this.declarations = {};
  11578. _this.usedHelpers = {};
  11579. _this.path = null;
  11580. _this.ast = {};
  11581. _this.code = "";
  11582. _this.shebang = "";
  11583. _this.hub = new _babelTraverse.Hub(_this);
  11584. return _this;
  11585. }
  11586. File.prototype.getMetadata = function getMetadata() {
  11587. var has = false;
  11588. for (var _iterator = this.ast.program.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  11589. var _ref;
  11590. if (_isArray) {
  11591. if (_i >= _iterator.length) break;
  11592. _ref = _iterator[_i++];
  11593. } else {
  11594. _i = _iterator.next();
  11595. if (_i.done) break;
  11596. _ref = _i.value;
  11597. }
  11598. var node = _ref;
  11599. if (t.isModuleDeclaration(node)) {
  11600. has = true;
  11601. break;
  11602. }
  11603. }
  11604. if (has) {
  11605. this.path.traverse(metadataVisitor, this);
  11606. }
  11607. };
  11608. File.prototype.initOptions = function initOptions(opts) {
  11609. opts = new _optionManager2.default(this.log, this.pipeline).init(opts);
  11610. if (opts.inputSourceMap) {
  11611. opts.sourceMaps = true;
  11612. }
  11613. if (opts.moduleId) {
  11614. opts.moduleIds = true;
  11615. }
  11616. opts.basename = _path2.default.basename(opts.filename, _path2.default.extname(opts.filename));
  11617. opts.ignore = util.arrayify(opts.ignore, util.regexify);
  11618. if (opts.only) opts.only = util.arrayify(opts.only, util.regexify);
  11619. (0, _defaults2.default)(opts, {
  11620. moduleRoot: opts.sourceRoot
  11621. });
  11622. (0, _defaults2.default)(opts, {
  11623. sourceRoot: opts.moduleRoot
  11624. });
  11625. (0, _defaults2.default)(opts, {
  11626. filenameRelative: opts.filename
  11627. });
  11628. var basenameRelative = _path2.default.basename(opts.filenameRelative);
  11629. (0, _defaults2.default)(opts, {
  11630. sourceFileName: basenameRelative,
  11631. sourceMapTarget: basenameRelative
  11632. });
  11633. return opts;
  11634. };
  11635. File.prototype.buildPluginsForOptions = function buildPluginsForOptions(opts) {
  11636. if (!Array.isArray(opts.plugins)) {
  11637. return;
  11638. }
  11639. var plugins = opts.plugins.concat(INTERNAL_PLUGINS);
  11640. var currentPluginVisitors = [];
  11641. var currentPluginPasses = [];
  11642. for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  11643. var _ref2;
  11644. if (_isArray2) {
  11645. if (_i2 >= _iterator2.length) break;
  11646. _ref2 = _iterator2[_i2++];
  11647. } else {
  11648. _i2 = _iterator2.next();
  11649. if (_i2.done) break;
  11650. _ref2 = _i2.value;
  11651. }
  11652. var ref = _ref2;
  11653. var plugin = ref[0],
  11654. pluginOpts = ref[1];
  11655. currentPluginVisitors.push(plugin.visitor);
  11656. currentPluginPasses.push(new _pluginPass2.default(this, plugin, pluginOpts));
  11657. if (plugin.manipulateOptions) {
  11658. plugin.manipulateOptions(opts, this.parserOpts, this);
  11659. }
  11660. }
  11661. this.pluginVisitors.push(currentPluginVisitors);
  11662. this.pluginPasses.push(currentPluginPasses);
  11663. };
  11664. File.prototype.getModuleName = function getModuleName() {
  11665. var opts = this.opts;
  11666. if (!opts.moduleIds) {
  11667. return null;
  11668. }
  11669. if (opts.moduleId != null && !opts.getModuleId) {
  11670. return opts.moduleId;
  11671. }
  11672. var filenameRelative = opts.filenameRelative;
  11673. var moduleName = "";
  11674. if (opts.moduleRoot != null) {
  11675. moduleName = opts.moduleRoot + "/";
  11676. }
  11677. if (!opts.filenameRelative) {
  11678. return moduleName + opts.filename.replace(/^\//, "");
  11679. }
  11680. if (opts.sourceRoot != null) {
  11681. var sourceRootRegEx = new RegExp("^" + opts.sourceRoot + "\/?");
  11682. filenameRelative = filenameRelative.replace(sourceRootRegEx, "");
  11683. }
  11684. filenameRelative = filenameRelative.replace(/\.(\w*?)$/, "");
  11685. moduleName += filenameRelative;
  11686. moduleName = moduleName.replace(/\\/g, "/");
  11687. if (opts.getModuleId) {
  11688. return opts.getModuleId(moduleName) || moduleName;
  11689. } else {
  11690. return moduleName;
  11691. }
  11692. };
  11693. File.prototype.resolveModuleSource = function resolveModuleSource(source) {
  11694. var resolveModuleSource = this.opts.resolveModuleSource;
  11695. if (resolveModuleSource) source = resolveModuleSource(source, this.opts.filename);
  11696. return source;
  11697. };
  11698. File.prototype.addImport = function addImport(source, imported) {
  11699. var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : imported;
  11700. var alias = source + ":" + imported;
  11701. var id = this.dynamicImportIds[alias];
  11702. if (!id) {
  11703. source = this.resolveModuleSource(source);
  11704. id = this.dynamicImportIds[alias] = this.scope.generateUidIdentifier(name);
  11705. var specifiers = [];
  11706. if (imported === "*") {
  11707. specifiers.push(t.importNamespaceSpecifier(id));
  11708. } else if (imported === "default") {
  11709. specifiers.push(t.importDefaultSpecifier(id));
  11710. } else {
  11711. specifiers.push(t.importSpecifier(id, t.identifier(imported)));
  11712. }
  11713. var declar = t.importDeclaration(specifiers, t.stringLiteral(source));
  11714. declar._blockHoist = 3;
  11715. this.path.unshiftContainer("body", declar);
  11716. }
  11717. return id;
  11718. };
  11719. File.prototype.addHelper = function addHelper(name) {
  11720. var declar = this.declarations[name];
  11721. if (declar) return declar;
  11722. if (!this.usedHelpers[name]) {
  11723. this.metadata.usedHelpers.push(name);
  11724. this.usedHelpers[name] = true;
  11725. }
  11726. var generator = this.get("helperGenerator");
  11727. var runtime = this.get("helpersNamespace");
  11728. if (generator) {
  11729. var res = generator(name);
  11730. if (res) return res;
  11731. } else if (runtime) {
  11732. return t.memberExpression(runtime, t.identifier(name));
  11733. }
  11734. var ref = (0, _babelHelpers2.default)(name);
  11735. var uid = this.declarations[name] = this.scope.generateUidIdentifier(name);
  11736. if (t.isFunctionExpression(ref) && !ref.id) {
  11737. ref.body._compact = true;
  11738. ref._generated = true;
  11739. ref.id = uid;
  11740. ref.type = "FunctionDeclaration";
  11741. this.path.unshiftContainer("body", ref);
  11742. } else {
  11743. ref._compact = true;
  11744. this.scope.push({
  11745. id: uid,
  11746. init: ref,
  11747. unique: true
  11748. });
  11749. }
  11750. return uid;
  11751. };
  11752. File.prototype.addTemplateObject = function addTemplateObject(helperName, strings, raw) {
  11753. var stringIds = raw.elements.map(function (string) {
  11754. return string.value;
  11755. });
  11756. var name = helperName + "_" + raw.elements.length + "_" + stringIds.join(",");
  11757. var declar = this.declarations[name];
  11758. if (declar) return declar;
  11759. var uid = this.declarations[name] = this.scope.generateUidIdentifier("templateObject");
  11760. var helperId = this.addHelper(helperName);
  11761. var init = t.callExpression(helperId, [strings, raw]);
  11762. init._compact = true;
  11763. this.scope.push({
  11764. id: uid,
  11765. init: init,
  11766. _blockHoist: 1.9 });
  11767. return uid;
  11768. };
  11769. File.prototype.buildCodeFrameError = function buildCodeFrameError(node, msg) {
  11770. var Error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : SyntaxError;
  11771. var loc = node && (node.loc || node._loc);
  11772. var err = new Error(msg);
  11773. if (loc) {
  11774. err.loc = loc.start;
  11775. } else {
  11776. (0, _babelTraverse2.default)(node, errorVisitor, this.scope, err);
  11777. err.message += " (This is an error on an internal node. Probably an internal error";
  11778. if (err.loc) {
  11779. err.message += ". Location has been estimated.";
  11780. }
  11781. err.message += ")";
  11782. }
  11783. return err;
  11784. };
  11785. File.prototype.mergeSourceMap = function mergeSourceMap(map) {
  11786. var inputMap = this.opts.inputSourceMap;
  11787. if (inputMap) {
  11788. var inputMapConsumer = new _sourceMap2.default.SourceMapConsumer(inputMap);
  11789. var outputMapConsumer = new _sourceMap2.default.SourceMapConsumer(map);
  11790. var mergedGenerator = new _sourceMap2.default.SourceMapGenerator({
  11791. file: inputMapConsumer.file,
  11792. sourceRoot: inputMapConsumer.sourceRoot
  11793. });
  11794. var source = outputMapConsumer.sources[0];
  11795. inputMapConsumer.eachMapping(function (mapping) {
  11796. var generatedPosition = outputMapConsumer.generatedPositionFor({
  11797. line: mapping.generatedLine,
  11798. column: mapping.generatedColumn,
  11799. source: source
  11800. });
  11801. if (generatedPosition.column != null) {
  11802. mergedGenerator.addMapping({
  11803. source: mapping.source,
  11804. original: mapping.source == null ? null : {
  11805. line: mapping.originalLine,
  11806. column: mapping.originalColumn
  11807. },
  11808. generated: generatedPosition
  11809. });
  11810. }
  11811. });
  11812. var mergedMap = mergedGenerator.toJSON();
  11813. inputMap.mappings = mergedMap.mappings;
  11814. return inputMap;
  11815. } else {
  11816. return map;
  11817. }
  11818. };
  11819. File.prototype.parse = function parse(code) {
  11820. var parseCode = _babylon.parse;
  11821. var parserOpts = this.opts.parserOpts;
  11822. if (parserOpts) {
  11823. parserOpts = (0, _assign2.default)({}, this.parserOpts, parserOpts);
  11824. if (parserOpts.parser) {
  11825. if (typeof parserOpts.parser === "string") {
  11826. var dirname = _path2.default.dirname(this.opts.filename) || process.cwd();
  11827. var parser = (0, _resolve2.default)(parserOpts.parser, dirname);
  11828. if (parser) {
  11829. parseCode = $__require(parser).parse;
  11830. } else {
  11831. throw new Error("Couldn't find parser " + parserOpts.parser + " with \"parse\" method " + ("relative to directory " + dirname));
  11832. }
  11833. } else {
  11834. parseCode = parserOpts.parser;
  11835. }
  11836. parserOpts.parser = {
  11837. parse: function parse(source) {
  11838. return (0, _babylon.parse)(source, parserOpts);
  11839. }
  11840. };
  11841. }
  11842. }
  11843. this.log.debug("Parse start");
  11844. var ast = parseCode(code, parserOpts || this.parserOpts);
  11845. this.log.debug("Parse stop");
  11846. return ast;
  11847. };
  11848. File.prototype._addAst = function _addAst(ast) {
  11849. this.path = _babelTraverse.NodePath.get({
  11850. hub: this.hub,
  11851. parentPath: null,
  11852. parent: ast,
  11853. container: ast,
  11854. key: "program"
  11855. }).setContext();
  11856. this.scope = this.path.scope;
  11857. this.ast = ast;
  11858. this.getMetadata();
  11859. };
  11860. File.prototype.addAst = function addAst(ast) {
  11861. this.log.debug("Start set AST");
  11862. this._addAst(ast);
  11863. this.log.debug("End set AST");
  11864. };
  11865. File.prototype.transform = function transform() {
  11866. for (var i = 0; i < this.pluginPasses.length; i++) {
  11867. var pluginPasses = this.pluginPasses[i];
  11868. this.call("pre", pluginPasses);
  11869. this.log.debug("Start transform traverse");
  11870. var visitor = _babelTraverse2.default.visitors.merge(this.pluginVisitors[i], pluginPasses, this.opts.wrapPluginVisitorMethod);
  11871. (0, _babelTraverse2.default)(this.ast, visitor, this.scope);
  11872. this.log.debug("End transform traverse");
  11873. this.call("post", pluginPasses);
  11874. }
  11875. return this.generate();
  11876. };
  11877. File.prototype.wrap = function wrap(code, callback) {
  11878. code = code + "";
  11879. try {
  11880. if (this.shouldIgnore()) {
  11881. return this.makeResult({ code: code, ignored: true });
  11882. } else {
  11883. return callback();
  11884. }
  11885. } catch (err) {
  11886. if (err._babel) {
  11887. throw err;
  11888. } else {
  11889. err._babel = true;
  11890. }
  11891. var message = err.message = this.opts.filename + ": " + err.message;
  11892. var loc = err.loc;
  11893. if (loc) {
  11894. err.codeFrame = (0, _babelCodeFrame2.default)(code, loc.line, loc.column + 1, this.opts);
  11895. message += "\n" + err.codeFrame;
  11896. }
  11897. if (process.browser) {
  11898. err.message = message;
  11899. }
  11900. if (err.stack) {
  11901. var newStack = err.stack.replace(err.message, message);
  11902. err.stack = newStack;
  11903. }
  11904. throw err;
  11905. }
  11906. };
  11907. File.prototype.addCode = function addCode(code) {
  11908. code = (code || "") + "";
  11909. code = this.parseInputSourceMap(code);
  11910. this.code = code;
  11911. };
  11912. File.prototype.parseCode = function parseCode() {
  11913. this.parseShebang();
  11914. var ast = this.parse(this.code);
  11915. this.addAst(ast);
  11916. };
  11917. File.prototype.shouldIgnore = function shouldIgnore() {
  11918. var opts = this.opts;
  11919. return util.shouldIgnore(opts.filename, opts.ignore, opts.only);
  11920. };
  11921. File.prototype.call = function call(key, pluginPasses) {
  11922. for (var _iterator3 = pluginPasses, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  11923. var _ref3;
  11924. if (_isArray3) {
  11925. if (_i3 >= _iterator3.length) break;
  11926. _ref3 = _iterator3[_i3++];
  11927. } else {
  11928. _i3 = _iterator3.next();
  11929. if (_i3.done) break;
  11930. _ref3 = _i3.value;
  11931. }
  11932. var pass = _ref3;
  11933. var plugin = pass.plugin;
  11934. var fn = plugin[key];
  11935. if (fn) fn.call(pass, this);
  11936. }
  11937. };
  11938. File.prototype.parseInputSourceMap = function parseInputSourceMap(code) {
  11939. var opts = this.opts;
  11940. if (opts.inputSourceMap !== false) {
  11941. var inputMap = _convertSourceMap2.default.fromSource(code);
  11942. if (inputMap) {
  11943. opts.inputSourceMap = inputMap.toObject();
  11944. code = _convertSourceMap2.default.removeComments(code);
  11945. }
  11946. }
  11947. return code;
  11948. };
  11949. File.prototype.parseShebang = function parseShebang() {
  11950. var shebangMatch = shebangRegex.exec(this.code);
  11951. if (shebangMatch) {
  11952. this.shebang = shebangMatch[0];
  11953. this.code = this.code.replace(shebangRegex, "");
  11954. }
  11955. };
  11956. File.prototype.makeResult = function makeResult(_ref4) {
  11957. var code = _ref4.code,
  11958. map = _ref4.map,
  11959. ast = _ref4.ast,
  11960. ignored = _ref4.ignored;
  11961. var result = {
  11962. metadata: null,
  11963. options: this.opts,
  11964. ignored: !!ignored,
  11965. code: null,
  11966. ast: null,
  11967. map: map || null
  11968. };
  11969. if (this.opts.code) {
  11970. result.code = code;
  11971. }
  11972. if (this.opts.ast) {
  11973. result.ast = ast;
  11974. }
  11975. if (this.opts.metadata) {
  11976. result.metadata = this.metadata;
  11977. }
  11978. return result;
  11979. };
  11980. File.prototype.generate = function generate() {
  11981. var opts = this.opts;
  11982. var ast = this.ast;
  11983. var result = { ast: ast };
  11984. if (!opts.code) return this.makeResult(result);
  11985. var gen = _babelGenerator2.default;
  11986. if (opts.generatorOpts.generator) {
  11987. gen = opts.generatorOpts.generator;
  11988. if (typeof gen === "string") {
  11989. var dirname = _path2.default.dirname(this.opts.filename) || process.cwd();
  11990. var generator = (0, _resolve2.default)(gen, dirname);
  11991. if (generator) {
  11992. gen = $__require(generator).print;
  11993. } else {
  11994. throw new Error("Couldn't find generator " + gen + " with \"print\" method relative " + ("to directory " + dirname));
  11995. }
  11996. }
  11997. }
  11998. this.log.debug("Generation start");
  11999. var _result = gen(ast, opts.generatorOpts ? (0, _assign2.default)(opts, opts.generatorOpts) : opts, this.code);
  12000. result.code = _result.code;
  12001. result.map = _result.map;
  12002. this.log.debug("Generation end");
  12003. if (this.shebang) {
  12004. result.code = this.shebang + "\n" + result.code;
  12005. }
  12006. if (result.map) {
  12007. result.map = this.mergeSourceMap(result.map);
  12008. }
  12009. if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") {
  12010. result.code += "\n" + _convertSourceMap2.default.fromObject(result.map).toComment();
  12011. }
  12012. if (opts.sourceMaps === "inline") {
  12013. result.map = null;
  12014. }
  12015. return this.makeResult(result);
  12016. };
  12017. return File;
  12018. }(_store2.default);
  12019. exports.default = File;
  12020. exports.File = File;
  12021. });
  12022. $__System.registerDynamic("d8", ["1d", "13", "98", "1c", "c"], true, function ($__require, exports, module) {
  12023. "use strict";
  12024. var process = $__require("c");
  12025. var global = this || self,
  12026. GLOBAL = global;
  12027. exports.__esModule = true;
  12028. var _classCallCheck2 = $__require("1d");
  12029. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  12030. var _normalizeAst = $__require("13");
  12031. var _normalizeAst2 = _interopRequireDefault(_normalizeAst);
  12032. var _plugin = $__require("98");
  12033. var _plugin2 = _interopRequireDefault(_plugin);
  12034. var _file = $__require("1c");
  12035. var _file2 = _interopRequireDefault(_file);
  12036. function _interopRequireDefault(obj) {
  12037. return obj && obj.__esModule ? obj : { default: obj };
  12038. }
  12039. var Pipeline = function () {
  12040. function Pipeline() {
  12041. (0, _classCallCheck3.default)(this, Pipeline);
  12042. }
  12043. Pipeline.prototype.lint = function lint(code) {
  12044. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12045. opts.code = false;
  12046. opts.mode = "lint";
  12047. return this.transform(code, opts);
  12048. };
  12049. Pipeline.prototype.pretransform = function pretransform(code, opts) {
  12050. var file = new _file2.default(opts, this);
  12051. return file.wrap(code, function () {
  12052. file.addCode(code);
  12053. file.parseCode(code);
  12054. return file;
  12055. });
  12056. };
  12057. Pipeline.prototype.transform = function transform(code, opts) {
  12058. var file = new _file2.default(opts, this);
  12059. return file.wrap(code, function () {
  12060. file.addCode(code);
  12061. file.parseCode(code);
  12062. return file.transform();
  12063. });
  12064. };
  12065. Pipeline.prototype.analyse = function analyse(code) {
  12066. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12067. var visitor = arguments[2];
  12068. opts.code = false;
  12069. if (visitor) {
  12070. opts.plugins = opts.plugins || [];
  12071. opts.plugins.push(new _plugin2.default({ visitor: visitor }));
  12072. }
  12073. return this.transform(code, opts).metadata;
  12074. };
  12075. Pipeline.prototype.transformFromAst = function transformFromAst(ast, code, opts) {
  12076. ast = (0, _normalizeAst2.default)(ast);
  12077. var file = new _file2.default(opts, this);
  12078. return file.wrap(code, function () {
  12079. file.addCode(code);
  12080. file.addAst(ast);
  12081. return file.transform();
  12082. });
  12083. };
  12084. return Pipeline;
  12085. }();
  12086. exports.default = Pipeline;
  12087. module.exports = exports["default"];
  12088. });
  12089. $__System.registerDynamic("cd", ["1c", "a9", "b", "10", "ab", "af", "12", "@node/fs", "a4", "f", "11", "d0", "cc", "d8", "c"], true, function ($__require, exports, module) {
  12090. "use strict";
  12091. var process = $__require("c");
  12092. var global = this || self,
  12093. GLOBAL = global;
  12094. exports.__esModule = true;
  12095. exports.transformFromAst = exports.transform = exports.analyse = exports.Pipeline = exports.OptionManager = exports.traverse = exports.types = exports.messages = exports.util = exports.version = exports.resolvePreset = exports.resolvePlugin = exports.template = exports.buildExternalHelpers = exports.options = exports.File = undefined;
  12096. var _file = $__require("1c");
  12097. Object.defineProperty(exports, "File", {
  12098. enumerable: true,
  12099. get: function get() {
  12100. return _interopRequireDefault(_file).default;
  12101. }
  12102. });
  12103. var _config = $__require("a9");
  12104. Object.defineProperty(exports, "options", {
  12105. enumerable: true,
  12106. get: function get() {
  12107. return _interopRequireDefault(_config).default;
  12108. }
  12109. });
  12110. var _buildExternalHelpers = $__require("b");
  12111. Object.defineProperty(exports, "buildExternalHelpers", {
  12112. enumerable: true,
  12113. get: function get() {
  12114. return _interopRequireDefault(_buildExternalHelpers).default;
  12115. }
  12116. });
  12117. var _babelTemplate = $__require("10");
  12118. Object.defineProperty(exports, "template", {
  12119. enumerable: true,
  12120. get: function get() {
  12121. return _interopRequireDefault(_babelTemplate).default;
  12122. }
  12123. });
  12124. var _resolvePlugin = $__require("ab");
  12125. Object.defineProperty(exports, "resolvePlugin", {
  12126. enumerable: true,
  12127. get: function get() {
  12128. return _interopRequireDefault(_resolvePlugin).default;
  12129. }
  12130. });
  12131. var _resolvePreset = $__require("af");
  12132. Object.defineProperty(exports, "resolvePreset", {
  12133. enumerable: true,
  12134. get: function get() {
  12135. return _interopRequireDefault(_resolvePreset).default;
  12136. }
  12137. });
  12138. var _package = $__require("12");
  12139. Object.defineProperty(exports, "version", {
  12140. enumerable: true,
  12141. get: function get() {
  12142. return _package.version;
  12143. }
  12144. });
  12145. exports.Plugin = Plugin;
  12146. exports.transformFile = transformFile;
  12147. exports.transformFileSync = transformFileSync;
  12148. var _fs = $__require("@node/fs");
  12149. var _fs2 = _interopRequireDefault(_fs);
  12150. var _util = $__require("a4");
  12151. var util = _interopRequireWildcard(_util);
  12152. var _babelMessages = $__require("f");
  12153. var messages = _interopRequireWildcard(_babelMessages);
  12154. var _babelTypes = $__require("11");
  12155. var t = _interopRequireWildcard(_babelTypes);
  12156. var _babelTraverse = $__require("d0");
  12157. var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
  12158. var _optionManager = $__require("cc");
  12159. var _optionManager2 = _interopRequireDefault(_optionManager);
  12160. var _pipeline = $__require("d8");
  12161. var _pipeline2 = _interopRequireDefault(_pipeline);
  12162. function _interopRequireWildcard(obj) {
  12163. if (obj && obj.__esModule) {
  12164. return obj;
  12165. } else {
  12166. var newObj = {};if (obj != null) {
  12167. for (var key in obj) {
  12168. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  12169. }
  12170. }newObj.default = obj;return newObj;
  12171. }
  12172. }
  12173. function _interopRequireDefault(obj) {
  12174. return obj && obj.__esModule ? obj : { default: obj };
  12175. }
  12176. exports.util = util;
  12177. exports.messages = messages;
  12178. exports.types = t;
  12179. exports.traverse = _babelTraverse2.default;
  12180. exports.OptionManager = _optionManager2.default;
  12181. function Plugin(alias) {
  12182. throw new Error("The (" + alias + ") Babel 5 plugin is being run with Babel 6.");
  12183. }
  12184. exports.Pipeline = _pipeline2.default;
  12185. var pipeline = new _pipeline2.default();
  12186. var analyse = exports.analyse = pipeline.analyse.bind(pipeline);
  12187. var transform = exports.transform = pipeline.transform.bind(pipeline);
  12188. var transformFromAst = exports.transformFromAst = pipeline.transformFromAst.bind(pipeline);
  12189. function transformFile(filename, opts, callback) {
  12190. if (typeof opts === "function") {
  12191. callback = opts;
  12192. opts = {};
  12193. }
  12194. opts.filename = filename;
  12195. _fs2.default.readFile(filename, function (err, code) {
  12196. var result = void 0;
  12197. if (!err) {
  12198. try {
  12199. result = transform(code, opts);
  12200. } catch (_err) {
  12201. err = _err;
  12202. }
  12203. }
  12204. if (err) {
  12205. callback(err);
  12206. } else {
  12207. callback(null, result);
  12208. }
  12209. });
  12210. }
  12211. function transformFileSync(filename) {
  12212. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12213. opts.filename = filename;
  12214. return transform(_fs2.default.readFileSync(filename, "utf8"), opts);
  12215. }
  12216. });
  12217. $__System.registerDynamic("d9", ["cd", "c"], true, function ($__require, exports, module) {
  12218. var process = $__require("c");
  12219. var global = this || self,
  12220. GLOBAL = global;
  12221. module.exports = $__require("cd");
  12222. });
  12223. $__System.registerDynamic("da", ["d4", "17", "d3", "db", "10"], true, function ($__require, exports, module) {
  12224. "use strict";
  12225. var global = this || self,
  12226. GLOBAL = global;
  12227. exports.__esModule = true;
  12228. var _create = $__require("d4");
  12229. var _create2 = _interopRequireDefault(_create);
  12230. var _getIterator2 = $__require("17");
  12231. var _getIterator3 = _interopRequireDefault(_getIterator2);
  12232. var _symbol = $__require("d3");
  12233. var _symbol2 = _interopRequireDefault(_symbol);
  12234. exports.default = function (_ref) {
  12235. var t = _ref.types;
  12236. var IGNORE_REASSIGNMENT_SYMBOL = (0, _symbol2.default)();
  12237. var reassignmentVisitor = {
  12238. "AssignmentExpression|UpdateExpression": function AssignmentExpressionUpdateExpression(path) {
  12239. if (path.node[IGNORE_REASSIGNMENT_SYMBOL]) return;
  12240. path.node[IGNORE_REASSIGNMENT_SYMBOL] = true;
  12241. var arg = path.get(path.isAssignmentExpression() ? "left" : "argument");
  12242. if (!arg.isIdentifier()) return;
  12243. var name = arg.node.name;
  12244. if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
  12245. var exportedNames = this.exports[name];
  12246. if (!exportedNames) return;
  12247. var node = path.node;
  12248. var isPostUpdateExpression = path.isUpdateExpression() && !node.prefix;
  12249. if (isPostUpdateExpression) {
  12250. if (node.operator === "++") node = t.binaryExpression("+", node.argument, t.numericLiteral(1));else if (node.operator === "--") node = t.binaryExpression("-", node.argument, t.numericLiteral(1));else isPostUpdateExpression = false;
  12251. }
  12252. for (var _iterator = exportedNames, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  12253. var _ref2;
  12254. if (_isArray) {
  12255. if (_i >= _iterator.length) break;
  12256. _ref2 = _iterator[_i++];
  12257. } else {
  12258. _i = _iterator.next();
  12259. if (_i.done) break;
  12260. _ref2 = _i.value;
  12261. }
  12262. var exportedName = _ref2;
  12263. node = this.buildCall(exportedName, node).expression;
  12264. }
  12265. if (isPostUpdateExpression) node = t.sequenceExpression([node, path.node]);
  12266. path.replaceWith(node);
  12267. }
  12268. };
  12269. return {
  12270. visitor: {
  12271. CallExpression: function CallExpression(path, state) {
  12272. if (path.node.callee.type === TYPE_IMPORT) {
  12273. var contextIdent = state.contextIdent;
  12274. path.replaceWith(t.callExpression(t.memberExpression(contextIdent, t.identifier("import")), path.node.arguments));
  12275. }
  12276. },
  12277. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  12278. if (path.node.name == "__moduleName" && !path.scope.hasBinding("__moduleName")) {
  12279. path.replaceWith(t.memberExpression(state.contextIdent, t.identifier("id")));
  12280. }
  12281. },
  12282. Program: {
  12283. enter: function enter(path, state) {
  12284. state.contextIdent = path.scope.generateUidIdentifier("context");
  12285. },
  12286. exit: function exit(path, state) {
  12287. var exportIdent = path.scope.generateUidIdentifier("export");
  12288. var contextIdent = state.contextIdent;
  12289. var exportNames = (0, _create2.default)(null);
  12290. var modules = [];
  12291. var beforeBody = [];
  12292. var setters = [];
  12293. var sources = [];
  12294. var variableIds = [];
  12295. var removedPaths = [];
  12296. function addExportName(key, val) {
  12297. exportNames[key] = exportNames[key] || [];
  12298. exportNames[key].push(val);
  12299. }
  12300. function pushModule(source, key, specifiers) {
  12301. var module = void 0;
  12302. modules.forEach(function (m) {
  12303. if (m.key === source) {
  12304. module = m;
  12305. }
  12306. });
  12307. if (!module) {
  12308. modules.push(module = { key: source, imports: [], exports: [] });
  12309. }
  12310. module[key] = module[key].concat(specifiers);
  12311. }
  12312. function buildExportCall(name, val) {
  12313. return t.expressionStatement(t.callExpression(exportIdent, [t.stringLiteral(name), val]));
  12314. }
  12315. var body = path.get("body");
  12316. var canHoist = true;
  12317. for (var _iterator2 = body, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  12318. var _ref3;
  12319. if (_isArray2) {
  12320. if (_i2 >= _iterator2.length) break;
  12321. _ref3 = _iterator2[_i2++];
  12322. } else {
  12323. _i2 = _iterator2.next();
  12324. if (_i2.done) break;
  12325. _ref3 = _i2.value;
  12326. }
  12327. var _path = _ref3;
  12328. if (_path.isExportDeclaration()) _path = _path.get("declaration");
  12329. if (_path.isVariableDeclaration() && _path.node.kind !== "var") {
  12330. canHoist = false;
  12331. break;
  12332. }
  12333. }
  12334. for (var _iterator3 = body, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  12335. var _ref4;
  12336. if (_isArray3) {
  12337. if (_i3 >= _iterator3.length) break;
  12338. _ref4 = _iterator3[_i3++];
  12339. } else {
  12340. _i3 = _iterator3.next();
  12341. if (_i3.done) break;
  12342. _ref4 = _i3.value;
  12343. }
  12344. var _path2 = _ref4;
  12345. if (canHoist && _path2.isFunctionDeclaration()) {
  12346. beforeBody.push(_path2.node);
  12347. removedPaths.push(_path2);
  12348. } else if (_path2.isImportDeclaration()) {
  12349. var source = _path2.node.source.value;
  12350. pushModule(source, "imports", _path2.node.specifiers);
  12351. for (var name in _path2.getBindingIdentifiers()) {
  12352. _path2.scope.removeBinding(name);
  12353. variableIds.push(t.identifier(name));
  12354. }
  12355. _path2.remove();
  12356. } else if (_path2.isExportAllDeclaration()) {
  12357. pushModule(_path2.node.source.value, "exports", _path2.node);
  12358. _path2.remove();
  12359. } else if (_path2.isExportDefaultDeclaration()) {
  12360. var declar = _path2.get("declaration");
  12361. if (declar.isClassDeclaration() || declar.isFunctionDeclaration()) {
  12362. var id = declar.node.id;
  12363. var nodes = [];
  12364. if (id) {
  12365. nodes.push(declar.node);
  12366. nodes.push(buildExportCall("default", id));
  12367. addExportName(id.name, "default");
  12368. } else {
  12369. nodes.push(buildExportCall("default", t.toExpression(declar.node)));
  12370. }
  12371. if (!canHoist || declar.isClassDeclaration()) {
  12372. _path2.replaceWithMultiple(nodes);
  12373. } else {
  12374. beforeBody = beforeBody.concat(nodes);
  12375. removedPaths.push(_path2);
  12376. }
  12377. } else {
  12378. _path2.replaceWith(buildExportCall("default", declar.node));
  12379. }
  12380. } else if (_path2.isExportNamedDeclaration()) {
  12381. var _declar = _path2.get("declaration");
  12382. if (_declar.node) {
  12383. _path2.replaceWith(_declar);
  12384. var _nodes = [];
  12385. var bindingIdentifiers = void 0;
  12386. if (_path2.isFunction()) {
  12387. var node = _declar.node;
  12388. var _name = node.id.name;
  12389. if (canHoist) {
  12390. addExportName(_name, _name);
  12391. beforeBody.push(node);
  12392. beforeBody.push(buildExportCall(_name, node.id));
  12393. removedPaths.push(_path2);
  12394. } else {
  12395. var _bindingIdentifiers;
  12396. bindingIdentifiers = (_bindingIdentifiers = {}, _bindingIdentifiers[_name] = node.id, _bindingIdentifiers);
  12397. }
  12398. } else {
  12399. bindingIdentifiers = _declar.getBindingIdentifiers();
  12400. }
  12401. for (var _name2 in bindingIdentifiers) {
  12402. addExportName(_name2, _name2);
  12403. _nodes.push(buildExportCall(_name2, t.identifier(_name2)));
  12404. }
  12405. _path2.insertAfter(_nodes);
  12406. } else {
  12407. var specifiers = _path2.node.specifiers;
  12408. if (specifiers && specifiers.length) {
  12409. if (_path2.node.source) {
  12410. pushModule(_path2.node.source.value, "exports", specifiers);
  12411. _path2.remove();
  12412. } else {
  12413. var _nodes2 = [];
  12414. for (var _iterator7 = specifiers, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
  12415. var _ref8;
  12416. if (_isArray7) {
  12417. if (_i7 >= _iterator7.length) break;
  12418. _ref8 = _iterator7[_i7++];
  12419. } else {
  12420. _i7 = _iterator7.next();
  12421. if (_i7.done) break;
  12422. _ref8 = _i7.value;
  12423. }
  12424. var specifier = _ref8;
  12425. _nodes2.push(buildExportCall(specifier.exported.name, specifier.local));
  12426. addExportName(specifier.local.name, specifier.exported.name);
  12427. }
  12428. _path2.replaceWithMultiple(_nodes2);
  12429. }
  12430. }
  12431. }
  12432. }
  12433. }
  12434. modules.forEach(function (specifiers) {
  12435. var setterBody = [];
  12436. var target = path.scope.generateUidIdentifier(specifiers.key);
  12437. for (var _iterator4 = specifiers.imports, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  12438. var _ref5;
  12439. if (_isArray4) {
  12440. if (_i4 >= _iterator4.length) break;
  12441. _ref5 = _iterator4[_i4++];
  12442. } else {
  12443. _i4 = _iterator4.next();
  12444. if (_i4.done) break;
  12445. _ref5 = _i4.value;
  12446. }
  12447. var specifier = _ref5;
  12448. if (t.isImportNamespaceSpecifier(specifier)) {
  12449. setterBody.push(t.expressionStatement(t.assignmentExpression("=", specifier.local, target)));
  12450. } else if (t.isImportDefaultSpecifier(specifier)) {
  12451. specifier = t.importSpecifier(specifier.local, t.identifier("default"));
  12452. }
  12453. if (t.isImportSpecifier(specifier)) {
  12454. setterBody.push(t.expressionStatement(t.assignmentExpression("=", specifier.local, t.memberExpression(target, specifier.imported))));
  12455. }
  12456. }
  12457. if (specifiers.exports.length) {
  12458. var exportObjRef = path.scope.generateUidIdentifier("exportObj");
  12459. setterBody.push(t.variableDeclaration("var", [t.variableDeclarator(exportObjRef, t.objectExpression([]))]));
  12460. for (var _iterator5 = specifiers.exports, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
  12461. var _ref6;
  12462. if (_isArray5) {
  12463. if (_i5 >= _iterator5.length) break;
  12464. _ref6 = _iterator5[_i5++];
  12465. } else {
  12466. _i5 = _iterator5.next();
  12467. if (_i5.done) break;
  12468. _ref6 = _i5.value;
  12469. }
  12470. var node = _ref6;
  12471. if (t.isExportAllDeclaration(node)) {
  12472. setterBody.push(buildExportAll({
  12473. KEY: path.scope.generateUidIdentifier("key"),
  12474. EXPORT_OBJ: exportObjRef,
  12475. TARGET: target
  12476. }));
  12477. } else if (t.isExportSpecifier(node)) {
  12478. setterBody.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(exportObjRef, node.exported), t.memberExpression(target, node.local))));
  12479. } else {}
  12480. }
  12481. setterBody.push(t.expressionStatement(t.callExpression(exportIdent, [exportObjRef])));
  12482. }
  12483. sources.push(t.stringLiteral(specifiers.key));
  12484. setters.push(t.functionExpression(null, [target], t.blockStatement(setterBody)));
  12485. });
  12486. var moduleName = this.getModuleName();
  12487. if (moduleName) moduleName = t.stringLiteral(moduleName);
  12488. if (canHoist) {
  12489. (0, _babelHelperHoistVariables2.default)(path, function (id) {
  12490. return variableIds.push(id);
  12491. });
  12492. }
  12493. if (variableIds.length) {
  12494. beforeBody.unshift(t.variableDeclaration("var", variableIds.map(function (id) {
  12495. return t.variableDeclarator(id);
  12496. })));
  12497. }
  12498. path.traverse(reassignmentVisitor, {
  12499. exports: exportNames,
  12500. buildCall: buildExportCall,
  12501. scope: path.scope
  12502. });
  12503. for (var _iterator6 = removedPaths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
  12504. var _ref7;
  12505. if (_isArray6) {
  12506. if (_i6 >= _iterator6.length) break;
  12507. _ref7 = _iterator6[_i6++];
  12508. } else {
  12509. _i6 = _iterator6.next();
  12510. if (_i6.done) break;
  12511. _ref7 = _i6.value;
  12512. }
  12513. var _path3 = _ref7;
  12514. _path3.remove();
  12515. }
  12516. path.node.body = [buildTemplate({
  12517. SYSTEM_REGISTER: t.memberExpression(t.identifier(state.opts.systemGlobal || "System"), t.identifier("register")),
  12518. BEFORE_BODY: beforeBody,
  12519. MODULE_NAME: moduleName,
  12520. SETTERS: setters,
  12521. SOURCES: sources,
  12522. BODY: path.node.body,
  12523. EXPORT_IDENTIFIER: exportIdent,
  12524. CONTEXT_IDENTIFIER: contextIdent
  12525. })];
  12526. }
  12527. }
  12528. }
  12529. };
  12530. };
  12531. var _babelHelperHoistVariables = $__require("db");
  12532. var _babelHelperHoistVariables2 = _interopRequireDefault(_babelHelperHoistVariables);
  12533. var _babelTemplate = $__require("10");
  12534. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  12535. function _interopRequireDefault(obj) {
  12536. return obj && obj.__esModule ? obj : { default: obj };
  12537. }
  12538. var buildTemplate = (0, _babelTemplate2.default)("\n SYSTEM_REGISTER(MODULE_NAME, [SOURCES], function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n \"use strict\";\n BEFORE_BODY;\n return {\n setters: [SETTERS],\n execute: function () {\n BODY;\n }\n };\n });\n");
  12539. var buildExportAll = (0, _babelTemplate2.default)("\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n");
  12540. var TYPE_IMPORT = "Import";
  12541. module.exports = exports["default"];
  12542. });
  12543. $__System.registerDynamic("dc", [], true, function ($__require, exports, module) {
  12544. "use strict";
  12545. var global = this || self,
  12546. GLOBAL = global;
  12547. exports.__esModule = true;
  12548. exports.default = function (_ref) {
  12549. var t = _ref.types;
  12550. return {
  12551. pre: function pre(file) {
  12552. file.set("helpersNamespace", t.identifier("babelHelpers"));
  12553. }
  12554. };
  12555. };
  12556. module.exports = exports["default"];
  12557. });
  12558. $__System.registerDynamic("dd", [], true, function ($__require, exports, module) {
  12559. "use strict";
  12560. var global = this || self,
  12561. GLOBAL = global;
  12562. module.exports = {
  12563. builtins: {
  12564. Symbol: "symbol",
  12565. Promise: "promise",
  12566. Map: "map",
  12567. WeakMap: "weak-map",
  12568. Set: "set",
  12569. WeakSet: "weak-set",
  12570. Observable: "observable",
  12571. setImmediate: "set-immediate",
  12572. clearImmediate: "clear-immediate",
  12573. asap: "asap"
  12574. },
  12575. methods: {
  12576. Array: {
  12577. concat: "array/concat",
  12578. copyWithin: "array/copy-within",
  12579. entries: "array/entries",
  12580. every: "array/every",
  12581. fill: "array/fill",
  12582. filter: "array/filter",
  12583. findIndex: "array/find-index",
  12584. find: "array/find",
  12585. forEach: "array/for-each",
  12586. from: "array/from",
  12587. includes: "array/includes",
  12588. indexOf: "array/index-of",
  12589. join: "array/join",
  12590. keys: "array/keys",
  12591. lastIndexOf: "array/last-index-of",
  12592. map: "array/map",
  12593. of: "array/of",
  12594. pop: "array/pop",
  12595. push: "array/push",
  12596. reduceRight: "array/reduce-right",
  12597. reduce: "array/reduce",
  12598. reverse: "array/reverse",
  12599. shift: "array/shift",
  12600. slice: "array/slice",
  12601. some: "array/some",
  12602. sort: "array/sort",
  12603. splice: "array/splice",
  12604. unshift: "array/unshift",
  12605. values: "array/values"
  12606. },
  12607. JSON: {
  12608. stringify: "json/stringify"
  12609. },
  12610. Object: {
  12611. assign: "object/assign",
  12612. create: "object/create",
  12613. defineProperties: "object/define-properties",
  12614. defineProperty: "object/define-property",
  12615. entries: "object/entries",
  12616. freeze: "object/freeze",
  12617. getOwnPropertyDescriptor: "object/get-own-property-descriptor",
  12618. getOwnPropertyDescriptors: "object/get-own-property-descriptors",
  12619. getOwnPropertyNames: "object/get-own-property-names",
  12620. getOwnPropertySymbols: "object/get-own-property-symbols",
  12621. getPrototypeOf: "object/get-prototype-of",
  12622. isExtensible: "object/is-extensible",
  12623. isFrozen: "object/is-frozen",
  12624. isSealed: "object/is-sealed",
  12625. is: "object/is",
  12626. keys: "object/keys",
  12627. preventExtensions: "object/prevent-extensions",
  12628. seal: "object/seal",
  12629. setPrototypeOf: "object/set-prototype-of",
  12630. values: "object/values"
  12631. },
  12632. RegExp: {
  12633. escape: "regexp/escape" },
  12634. Math: {
  12635. acosh: "math/acosh",
  12636. asinh: "math/asinh",
  12637. atanh: "math/atanh",
  12638. cbrt: "math/cbrt",
  12639. clz32: "math/clz32",
  12640. cosh: "math/cosh",
  12641. expm1: "math/expm1",
  12642. fround: "math/fround",
  12643. hypot: "math/hypot",
  12644. imul: "math/imul",
  12645. log10: "math/log10",
  12646. log1p: "math/log1p",
  12647. log2: "math/log2",
  12648. sign: "math/sign",
  12649. sinh: "math/sinh",
  12650. tanh: "math/tanh",
  12651. trunc: "math/trunc",
  12652. iaddh: "math/iaddh",
  12653. isubh: "math/isubh",
  12654. imulh: "math/imulh",
  12655. umulh: "math/umulh"
  12656. },
  12657. Symbol: {
  12658. for: "symbol/for",
  12659. hasInstance: "symbol/has-instance",
  12660. isConcatSpreadable: "symbol/is-concat-spreadable",
  12661. iterator: "symbol/iterator",
  12662. keyFor: "symbol/key-for",
  12663. match: "symbol/match",
  12664. replace: "symbol/replace",
  12665. search: "symbol/search",
  12666. species: "symbol/species",
  12667. split: "symbol/split",
  12668. toPrimitive: "symbol/to-primitive",
  12669. toStringTag: "symbol/to-string-tag",
  12670. unscopables: "symbol/unscopables"
  12671. },
  12672. String: {
  12673. at: "string/at",
  12674. codePointAt: "string/code-point-at",
  12675. endsWith: "string/ends-with",
  12676. fromCodePoint: "string/from-code-point",
  12677. includes: "string/includes",
  12678. matchAll: "string/match-all",
  12679. padLeft: "string/pad-left",
  12680. padRight: "string/pad-right",
  12681. padStart: "string/pad-start",
  12682. padEnd: "string/pad-end",
  12683. raw: "string/raw",
  12684. repeat: "string/repeat",
  12685. startsWith: "string/starts-with",
  12686. trim: "string/trim",
  12687. trimLeft: "string/trim-left",
  12688. trimRight: "string/trim-right",
  12689. trimStart: "string/trim-start",
  12690. trimEnd: "string/trim-end"
  12691. },
  12692. Number: {
  12693. EPSILON: "number/epsilon",
  12694. isFinite: "number/is-finite",
  12695. isInteger: "number/is-integer",
  12696. isNaN: "number/is-nan",
  12697. isSafeInteger: "number/is-safe-integer",
  12698. MAX_SAFE_INTEGER: "number/max-safe-integer",
  12699. MIN_SAFE_INTEGER: "number/min-safe-integer",
  12700. parseFloat: "number/parse-float",
  12701. parseInt: "number/parse-int"
  12702. },
  12703. Reflect: {
  12704. apply: "reflect/apply",
  12705. construct: "reflect/construct",
  12706. defineProperty: "reflect/define-property",
  12707. deleteProperty: "reflect/delete-property",
  12708. enumerate: "reflect/enumerate",
  12709. getOwnPropertyDescriptor: "reflect/get-own-property-descriptor",
  12710. getPrototypeOf: "reflect/get-prototype-of",
  12711. get: "reflect/get",
  12712. has: "reflect/has",
  12713. isExtensible: "reflect/is-extensible",
  12714. ownKeys: "reflect/own-keys",
  12715. preventExtensions: "reflect/prevent-extensions",
  12716. setPrototypeOf: "reflect/set-prototype-of",
  12717. set: "reflect/set",
  12718. defineMetadata: "reflect/define-metadata",
  12719. deleteMetadata: "reflect/delete-metadata",
  12720. getMetadata: "reflect/get-metadata",
  12721. getMetadataKeys: "reflect/get-metadata-keys",
  12722. getOwnMetadata: "reflect/get-own-metadata",
  12723. getOwnMetadataKeys: "reflect/get-own-metadata-keys",
  12724. hasMetadata: "reflect/has-metadata",
  12725. hasOwnMetadata: "reflect/has-own-metadata",
  12726. metadata: "reflect/metadata"
  12727. },
  12728. System: {
  12729. global: "system/global"
  12730. },
  12731. Error: {
  12732. isError: "error/is-error" },
  12733. Date: {},
  12734. Function: {}
  12735. }
  12736. };
  12737. });
  12738. $__System.registerDynamic("de", ["dd"], true, function ($__require, exports, module) {
  12739. "use strict";
  12740. var global = this || self,
  12741. GLOBAL = global;
  12742. exports.__esModule = true;
  12743. exports.definitions = undefined;
  12744. exports.default = function (_ref) {
  12745. var t = _ref.types;
  12746. function getRuntimeModuleName(opts) {
  12747. return opts.moduleName || "babel-runtime";
  12748. }
  12749. function has(obj, key) {
  12750. return Object.prototype.hasOwnProperty.call(obj, key);
  12751. }
  12752. var HELPER_BLACKLIST = ["interopRequireWildcard", "interopRequireDefault"];
  12753. return {
  12754. pre: function pre(file) {
  12755. var moduleName = getRuntimeModuleName(this.opts);
  12756. if (this.opts.helpers !== false) {
  12757. file.set("helperGenerator", function (name) {
  12758. if (HELPER_BLACKLIST.indexOf(name) < 0) {
  12759. return file.addImport(moduleName + "/helpers/" + name, "default", name);
  12760. }
  12761. });
  12762. }
  12763. this.setDynamic("regeneratorIdentifier", function () {
  12764. return file.addImport(moduleName + "/regenerator", "default", "regeneratorRuntime");
  12765. });
  12766. },
  12767. visitor: {
  12768. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  12769. var node = path.node,
  12770. parent = path.parent,
  12771. scope = path.scope;
  12772. if (node.name === "regeneratorRuntime" && state.opts.regenerator !== false) {
  12773. path.replaceWith(state.get("regeneratorIdentifier"));
  12774. return;
  12775. }
  12776. if (state.opts.polyfill === false) return;
  12777. if (t.isMemberExpression(parent)) return;
  12778. if (!has(_definitions2.default.builtins, node.name)) return;
  12779. if (scope.getBindingIdentifier(node.name)) return;
  12780. var moduleName = getRuntimeModuleName(state.opts);
  12781. path.replaceWith(state.addImport(moduleName + "/core-js/" + _definitions2.default.builtins[node.name], "default", node.name));
  12782. },
  12783. CallExpression: function CallExpression(path, state) {
  12784. if (state.opts.polyfill === false) return;
  12785. if (path.node.arguments.length) return;
  12786. var callee = path.node.callee;
  12787. if (!t.isMemberExpression(callee)) return;
  12788. if (!callee.computed) return;
  12789. if (!path.get("callee.property").matchesPattern("Symbol.iterator")) return;
  12790. var moduleName = getRuntimeModuleName(state.opts);
  12791. path.replaceWith(t.callExpression(state.addImport(moduleName + "/core-js/get-iterator", "default", "getIterator"), [callee.object]));
  12792. },
  12793. BinaryExpression: function BinaryExpression(path, state) {
  12794. if (state.opts.polyfill === false) return;
  12795. if (path.node.operator !== "in") return;
  12796. if (!path.get("left").matchesPattern("Symbol.iterator")) return;
  12797. var moduleName = getRuntimeModuleName(state.opts);
  12798. path.replaceWith(t.callExpression(state.addImport(moduleName + "/core-js/is-iterable", "default", "isIterable"), [path.node.right]));
  12799. },
  12800. MemberExpression: {
  12801. enter: function enter(path, state) {
  12802. if (state.opts.polyfill === false) return;
  12803. if (!path.isReferenced()) return;
  12804. var node = path.node;
  12805. var obj = node.object;
  12806. var prop = node.property;
  12807. if (!t.isReferenced(obj, node)) return;
  12808. if (node.computed) return;
  12809. if (!has(_definitions2.default.methods, obj.name)) return;
  12810. var methods = _definitions2.default.methods[obj.name];
  12811. if (!has(methods, prop.name)) return;
  12812. if (path.scope.getBindingIdentifier(obj.name)) return;
  12813. if (obj.name === "Object" && prop.name === "defineProperty" && path.parentPath.isCallExpression()) {
  12814. var call = path.parentPath.node;
  12815. if (call.arguments.length === 3 && t.isLiteral(call.arguments[1])) return;
  12816. }
  12817. var moduleName = getRuntimeModuleName(state.opts);
  12818. path.replaceWith(state.addImport(moduleName + "/core-js/" + methods[prop.name], "default", obj.name + "$" + prop.name));
  12819. },
  12820. exit: function exit(path, state) {
  12821. if (state.opts.polyfill === false) return;
  12822. if (!path.isReferenced()) return;
  12823. var node = path.node;
  12824. var obj = node.object;
  12825. if (!has(_definitions2.default.builtins, obj.name)) return;
  12826. if (path.scope.getBindingIdentifier(obj.name)) return;
  12827. var moduleName = getRuntimeModuleName(state.opts);
  12828. path.replaceWith(t.memberExpression(state.addImport(moduleName + "/core-js/" + _definitions2.default.builtins[obj.name], "default", obj.name), node.property, node.computed));
  12829. }
  12830. }
  12831. }
  12832. };
  12833. };
  12834. var _definitions = $__require("dd");
  12835. var _definitions2 = _interopRequireDefault(_definitions);
  12836. function _interopRequireDefault(obj) {
  12837. return obj && obj.__esModule ? obj : { default: obj };
  12838. }
  12839. exports.definitions = _definitions2.default;
  12840. });
  12841. $__System.registerDynamic("df", [], true, function ($__require, exports, module) {
  12842. "use strict";
  12843. var global = this || self,
  12844. GLOBAL = global;
  12845. exports.__esModule = true;
  12846. exports.default = function () {
  12847. return {
  12848. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  12849. parserOpts.plugins.push("classConstructorCall");
  12850. }
  12851. };
  12852. };
  12853. module.exports = exports["default"];
  12854. });
  12855. $__System.registerDynamic("e0", ["17", "d3", "df", "10"], true, function ($__require, exports, module) {
  12856. "use strict";
  12857. var global = this || self,
  12858. GLOBAL = global;
  12859. exports.__esModule = true;
  12860. var _getIterator2 = $__require("17");
  12861. var _getIterator3 = _interopRequireDefault(_getIterator2);
  12862. var _symbol = $__require("d3");
  12863. var _symbol2 = _interopRequireDefault(_symbol);
  12864. exports.default = function (_ref) {
  12865. var t = _ref.types;
  12866. var ALREADY_VISITED = (0, _symbol2.default)();
  12867. function findConstructorCall(path) {
  12868. var methods = path.get("body.body");
  12869. for (var _iterator = methods, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  12870. var _ref2;
  12871. if (_isArray) {
  12872. if (_i >= _iterator.length) break;
  12873. _ref2 = _iterator[_i++];
  12874. } else {
  12875. _i = _iterator.next();
  12876. if (_i.done) break;
  12877. _ref2 = _i.value;
  12878. }
  12879. var method = _ref2;
  12880. if (method.node.kind === "constructorCall") {
  12881. return method;
  12882. }
  12883. }
  12884. return null;
  12885. }
  12886. function handleClassWithCall(constructorCall, classPath) {
  12887. var _classPath = classPath,
  12888. node = _classPath.node;
  12889. var ref = node.id || classPath.scope.generateUidIdentifier("class");
  12890. if (classPath.parentPath.isExportDefaultDeclaration()) {
  12891. classPath = classPath.parentPath;
  12892. classPath.insertAfter(t.exportDefaultDeclaration(ref));
  12893. }
  12894. classPath.replaceWithMultiple(buildWrapper({
  12895. CLASS_REF: classPath.scope.generateUidIdentifier(ref.name),
  12896. CALL_REF: classPath.scope.generateUidIdentifier(ref.name + "Call"),
  12897. CALL: t.functionExpression(null, constructorCall.node.params, constructorCall.node.body),
  12898. CLASS: t.toExpression(node),
  12899. WRAPPER_REF: ref
  12900. }));
  12901. constructorCall.remove();
  12902. }
  12903. return {
  12904. inherits: $__require("df"),
  12905. visitor: {
  12906. Class: function Class(path) {
  12907. if (path.node[ALREADY_VISITED]) return;
  12908. path.node[ALREADY_VISITED] = true;
  12909. var constructorCall = findConstructorCall(path);
  12910. if (constructorCall) {
  12911. handleClassWithCall(constructorCall, path);
  12912. } else {
  12913. return;
  12914. }
  12915. }
  12916. }
  12917. };
  12918. };
  12919. var _babelTemplate = $__require("10");
  12920. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  12921. function _interopRequireDefault(obj) {
  12922. return obj && obj.__esModule ? obj : { default: obj };
  12923. }
  12924. var buildWrapper = (0, _babelTemplate2.default)("\n let CLASS_REF = CLASS;\n var CALL_REF = CALL;\n var WRAPPER_REF = function (...args) {\n if (this instanceof WRAPPER_REF) {\n return Reflect.construct(CLASS_REF, args);\n } else {\n return CALL_REF.apply(this, args);\n }\n };\n WRAPPER_REF.__proto__ = CLASS_REF;\n WRAPPER_REF;\n");
  12925. module.exports = exports["default"];
  12926. });
  12927. $__System.registerDynamic("e1", [], true, function ($__require, exports, module) {
  12928. "use strict";
  12929. var global = this || self,
  12930. GLOBAL = global;
  12931. exports.__esModule = true;
  12932. exports.default = function () {
  12933. return {
  12934. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  12935. parserOpts.plugins.push("exportExtensions");
  12936. }
  12937. };
  12938. };
  12939. module.exports = exports["default"];
  12940. });
  12941. $__System.registerDynamic("e2", ["e1"], true, function ($__require, exports, module) {
  12942. "use strict";
  12943. var global = this || self,
  12944. GLOBAL = global;
  12945. exports.__esModule = true;
  12946. exports.default = function (_ref) {
  12947. var t = _ref.types;
  12948. function build(node, nodes, scope) {
  12949. var first = node.specifiers[0];
  12950. if (!t.isExportNamespaceSpecifier(first) && !t.isExportDefaultSpecifier(first)) return;
  12951. var specifier = node.specifiers.shift();
  12952. var uid = scope.generateUidIdentifier(specifier.exported.name);
  12953. var newSpecifier = void 0;
  12954. if (t.isExportNamespaceSpecifier(specifier)) {
  12955. newSpecifier = t.importNamespaceSpecifier(uid);
  12956. } else {
  12957. newSpecifier = t.importDefaultSpecifier(uid);
  12958. }
  12959. nodes.push(t.importDeclaration([newSpecifier], node.source));
  12960. nodes.push(t.exportNamedDeclaration(null, [t.exportSpecifier(uid, specifier.exported)]));
  12961. build(node, nodes, scope);
  12962. }
  12963. return {
  12964. inherits: $__require("e1"),
  12965. visitor: {
  12966. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  12967. var node = path.node,
  12968. scope = path.scope;
  12969. var nodes = [];
  12970. build(node, nodes, scope);
  12971. if (!nodes.length) return;
  12972. if (node.specifiers.length >= 1) {
  12973. nodes.push(node);
  12974. }
  12975. path.replaceWithMultiple(nodes);
  12976. }
  12977. }
  12978. };
  12979. };
  12980. module.exports = exports["default"];
  12981. });
  12982. $__System.registerDynamic("e3", ["e4", "e0", "e2"], true, function ($__require, exports, module) {
  12983. "use strict";
  12984. var global = this || self,
  12985. GLOBAL = global;
  12986. exports.__esModule = true;
  12987. var _babelPresetStage = $__require("e4");
  12988. var _babelPresetStage2 = _interopRequireDefault(_babelPresetStage);
  12989. var _babelPluginTransformClassConstructorCall = $__require("e0");
  12990. var _babelPluginTransformClassConstructorCall2 = _interopRequireDefault(_babelPluginTransformClassConstructorCall);
  12991. var _babelPluginTransformExportExtensions = $__require("e2");
  12992. var _babelPluginTransformExportExtensions2 = _interopRequireDefault(_babelPluginTransformExportExtensions);
  12993. function _interopRequireDefault(obj) {
  12994. return obj && obj.__esModule ? obj : { default: obj };
  12995. }
  12996. exports.default = {
  12997. presets: [_babelPresetStage2.default],
  12998. plugins: [_babelPluginTransformClassConstructorCall2.default, _babelPluginTransformExportExtensions2.default]
  12999. };
  13000. module.exports = exports["default"];
  13001. });
  13002. $__System.registerDynamic("e5", [], true, function ($__require, exports, module) {
  13003. "use strict";
  13004. var global = this || self,
  13005. GLOBAL = global;
  13006. exports.__esModule = true;
  13007. exports.default = function () {
  13008. return {
  13009. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  13010. parserOpts.plugins.push("classProperties");
  13011. }
  13012. };
  13013. };
  13014. module.exports = exports["default"];
  13015. });
  13016. $__System.registerDynamic("e6", ["17", "e5", "e7", "10"], true, function ($__require, exports, module) {
  13017. "use strict";
  13018. var global = this || self,
  13019. GLOBAL = global;
  13020. exports.__esModule = true;
  13021. var _getIterator2 = $__require("17");
  13022. var _getIterator3 = _interopRequireDefault(_getIterator2);
  13023. exports.default = function (_ref) {
  13024. var t = _ref.types;
  13025. var findBareSupers = {
  13026. Super: function Super(path) {
  13027. if (path.parentPath.isCallExpression({ callee: path.node })) {
  13028. this.push(path.parentPath);
  13029. }
  13030. }
  13031. };
  13032. var referenceVisitor = {
  13033. ReferencedIdentifier: function ReferencedIdentifier(path) {
  13034. if (this.scope.hasOwnBinding(path.node.name)) {
  13035. this.collision = true;
  13036. path.skip();
  13037. }
  13038. }
  13039. };
  13040. var buildObjectDefineProperty = (0, _babelTemplate2.default)("\n Object.defineProperty(REF, KEY, {\n // configurable is false by default\n enumerable: true,\n writable: true,\n value: VALUE\n });\n ");
  13041. var buildClassPropertySpec = function buildClassPropertySpec(ref, _ref2) {
  13042. var key = _ref2.key,
  13043. value = _ref2.value,
  13044. computed = _ref2.computed;
  13045. return buildObjectDefineProperty({
  13046. REF: ref,
  13047. KEY: t.isIdentifier(key) && !computed ? t.stringLiteral(key.name) : key,
  13048. VALUE: value ? value : t.identifier("undefined")
  13049. });
  13050. };
  13051. var buildClassPropertyNonSpec = function buildClassPropertyNonSpec(ref, _ref3) {
  13052. var key = _ref3.key,
  13053. value = _ref3.value,
  13054. computed = _ref3.computed;
  13055. return t.expressionStatement(t.assignmentExpression("=", t.memberExpression(ref, key, computed || t.isLiteral(key)), value));
  13056. };
  13057. return {
  13058. inherits: $__require("e5"),
  13059. visitor: {
  13060. Class: function Class(path, state) {
  13061. var buildClassProperty = state.opts.spec ? buildClassPropertySpec : buildClassPropertyNonSpec;
  13062. var isDerived = !!path.node.superClass;
  13063. var constructor = void 0;
  13064. var props = [];
  13065. var body = path.get("body");
  13066. for (var _iterator = body.get("body"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  13067. var _ref4;
  13068. if (_isArray) {
  13069. if (_i >= _iterator.length) break;
  13070. _ref4 = _iterator[_i++];
  13071. } else {
  13072. _i = _iterator.next();
  13073. if (_i.done) break;
  13074. _ref4 = _i.value;
  13075. }
  13076. var _path = _ref4;
  13077. if (_path.isClassProperty()) {
  13078. props.push(_path);
  13079. } else if (_path.isClassMethod({ kind: "constructor" })) {
  13080. constructor = _path;
  13081. }
  13082. }
  13083. if (!props.length) return;
  13084. var nodes = [];
  13085. var ref = void 0;
  13086. if (path.isClassExpression() || !path.node.id) {
  13087. (0, _babelHelperFunctionName2.default)(path);
  13088. ref = path.scope.generateUidIdentifier("class");
  13089. } else {
  13090. ref = path.node.id;
  13091. }
  13092. var instanceBody = [];
  13093. for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  13094. var _ref5;
  13095. if (_isArray2) {
  13096. if (_i2 >= _iterator2.length) break;
  13097. _ref5 = _iterator2[_i2++];
  13098. } else {
  13099. _i2 = _iterator2.next();
  13100. if (_i2.done) break;
  13101. _ref5 = _i2.value;
  13102. }
  13103. var _prop = _ref5;
  13104. var propNode = _prop.node;
  13105. if (propNode.decorators && propNode.decorators.length > 0) continue;
  13106. if (!state.opts.spec && !propNode.value) continue;
  13107. var isStatic = propNode.static;
  13108. if (isStatic) {
  13109. nodes.push(buildClassProperty(ref, propNode));
  13110. } else {
  13111. if (!propNode.value) continue;
  13112. instanceBody.push(buildClassProperty(t.thisExpression(), propNode));
  13113. }
  13114. }
  13115. if (instanceBody.length) {
  13116. if (!constructor) {
  13117. var newConstructor = t.classMethod("constructor", t.identifier("constructor"), [], t.blockStatement([]));
  13118. if (isDerived) {
  13119. newConstructor.params = [t.restElement(t.identifier("args"))];
  13120. newConstructor.body.body.push(t.returnStatement(t.callExpression(t.super(), [t.spreadElement(t.identifier("args"))])));
  13121. }
  13122. var _body$unshiftContaine = body.unshiftContainer("body", newConstructor);
  13123. constructor = _body$unshiftContaine[0];
  13124. }
  13125. var collisionState = {
  13126. collision: false,
  13127. scope: constructor.scope
  13128. };
  13129. for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  13130. var _ref6;
  13131. if (_isArray3) {
  13132. if (_i3 >= _iterator3.length) break;
  13133. _ref6 = _iterator3[_i3++];
  13134. } else {
  13135. _i3 = _iterator3.next();
  13136. if (_i3.done) break;
  13137. _ref6 = _i3.value;
  13138. }
  13139. var prop = _ref6;
  13140. prop.traverse(referenceVisitor, collisionState);
  13141. if (collisionState.collision) break;
  13142. }
  13143. if (collisionState.collision) {
  13144. var initialisePropsRef = path.scope.generateUidIdentifier("initialiseProps");
  13145. nodes.push(t.variableDeclaration("var", [t.variableDeclarator(initialisePropsRef, t.functionExpression(null, [], t.blockStatement(instanceBody)))]));
  13146. instanceBody = [t.expressionStatement(t.callExpression(t.memberExpression(initialisePropsRef, t.identifier("call")), [t.thisExpression()]))];
  13147. }
  13148. if (isDerived) {
  13149. var bareSupers = [];
  13150. constructor.traverse(findBareSupers, bareSupers);
  13151. for (var _iterator4 = bareSupers, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  13152. var _ref7;
  13153. if (_isArray4) {
  13154. if (_i4 >= _iterator4.length) break;
  13155. _ref7 = _iterator4[_i4++];
  13156. } else {
  13157. _i4 = _iterator4.next();
  13158. if (_i4.done) break;
  13159. _ref7 = _i4.value;
  13160. }
  13161. var bareSuper = _ref7;
  13162. bareSuper.insertAfter(instanceBody);
  13163. }
  13164. } else {
  13165. constructor.get("body").unshiftContainer("body", instanceBody);
  13166. }
  13167. }
  13168. for (var _iterator5 = props, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
  13169. var _ref8;
  13170. if (_isArray5) {
  13171. if (_i5 >= _iterator5.length) break;
  13172. _ref8 = _iterator5[_i5++];
  13173. } else {
  13174. _i5 = _iterator5.next();
  13175. if (_i5.done) break;
  13176. _ref8 = _i5.value;
  13177. }
  13178. var _prop2 = _ref8;
  13179. _prop2.remove();
  13180. }
  13181. if (!nodes.length) return;
  13182. if (path.isClassExpression()) {
  13183. path.scope.push({ id: ref });
  13184. path.replaceWith(t.assignmentExpression("=", ref, path.node));
  13185. } else {
  13186. if (!path.node.id) {
  13187. path.node.id = ref;
  13188. }
  13189. if (path.parentPath.isExportDeclaration()) {
  13190. path = path.parentPath;
  13191. }
  13192. }
  13193. path.insertAfter(nodes);
  13194. },
  13195. ArrowFunctionExpression: function ArrowFunctionExpression(path) {
  13196. var classExp = path.get("body");
  13197. if (!classExp.isClassExpression()) return;
  13198. var body = classExp.get("body");
  13199. var members = body.get("body");
  13200. if (members.some(function (member) {
  13201. return member.isClassProperty();
  13202. })) {
  13203. path.ensureBlock();
  13204. }
  13205. }
  13206. }
  13207. };
  13208. };
  13209. var _babelHelperFunctionName = $__require("e7");
  13210. var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
  13211. var _babelTemplate = $__require("10");
  13212. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  13213. function _interopRequireDefault(obj) {
  13214. return obj && obj.__esModule ? obj : { default: obj };
  13215. }
  13216. module.exports = exports["default"];
  13217. });
  13218. $__System.registerDynamic("e8", [], true, function ($__require, exports, module) {
  13219. "use strict";
  13220. var global = this || self,
  13221. GLOBAL = global;
  13222. exports.__esModule = true;
  13223. exports.default = function () {
  13224. return {
  13225. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  13226. parserOpts.plugins.push("decorators");
  13227. }
  13228. };
  13229. };
  13230. module.exports = exports["default"];
  13231. });
  13232. $__System.registerDynamic("e9", ["17", "11"], true, function ($__require, exports, module) {
  13233. "use strict";
  13234. var global = this || self,
  13235. GLOBAL = global;
  13236. exports.__esModule = true;
  13237. var _getIterator2 = $__require("17");
  13238. var _getIterator3 = _interopRequireDefault(_getIterator2);
  13239. exports.default = bindifyDecorators;
  13240. var _babelTypes = $__require("11");
  13241. var t = _interopRequireWildcard(_babelTypes);
  13242. function _interopRequireWildcard(obj) {
  13243. if (obj && obj.__esModule) {
  13244. return obj;
  13245. } else {
  13246. var newObj = {};if (obj != null) {
  13247. for (var key in obj) {
  13248. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  13249. }
  13250. }newObj.default = obj;return newObj;
  13251. }
  13252. }
  13253. function _interopRequireDefault(obj) {
  13254. return obj && obj.__esModule ? obj : { default: obj };
  13255. }
  13256. function bindifyDecorators(decorators) {
  13257. for (var _iterator = decorators, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  13258. var _ref;
  13259. if (_isArray) {
  13260. if (_i >= _iterator.length) break;
  13261. _ref = _iterator[_i++];
  13262. } else {
  13263. _i = _iterator.next();
  13264. if (_i.done) break;
  13265. _ref = _i.value;
  13266. }
  13267. var decoratorPath = _ref;
  13268. var decorator = decoratorPath.node;
  13269. var expression = decorator.expression;
  13270. if (!t.isMemberExpression(expression)) continue;
  13271. var temp = decoratorPath.scope.maybeGenerateMemoised(expression.object);
  13272. var ref = void 0;
  13273. var nodes = [];
  13274. if (temp) {
  13275. ref = temp;
  13276. nodes.push(t.assignmentExpression("=", temp, expression.object));
  13277. } else {
  13278. ref = expression.object;
  13279. }
  13280. nodes.push(t.callExpression(t.memberExpression(t.memberExpression(ref, expression.property, expression.computed), t.identifier("bind")), [ref]));
  13281. if (nodes.length === 1) {
  13282. decorator.expression = nodes[0];
  13283. } else {
  13284. decorator.expression = t.sequenceExpression(nodes);
  13285. }
  13286. }
  13287. }
  13288. module.exports = exports["default"];
  13289. });
  13290. $__System.registerDynamic("ea", ["17", "e9", "11"], true, function ($__require, exports, module) {
  13291. "use strict";
  13292. var global = this || self,
  13293. GLOBAL = global;
  13294. exports.__esModule = true;
  13295. var _getIterator2 = $__require("17");
  13296. var _getIterator3 = _interopRequireDefault(_getIterator2);
  13297. exports.default = function (classPath) {
  13298. classPath.assertClass();
  13299. var memoisedExpressions = [];
  13300. function maybeMemoise(path) {
  13301. if (!path.node || path.isPure()) return;
  13302. var uid = classPath.scope.generateDeclaredUidIdentifier();
  13303. memoisedExpressions.push(t.assignmentExpression("=", uid, path.node));
  13304. path.replaceWith(uid);
  13305. }
  13306. function memoiseDecorators(paths) {
  13307. if (!Array.isArray(paths) || !paths.length) return;
  13308. paths = paths.reverse();
  13309. (0, _babelHelperBindifyDecorators2.default)(paths);
  13310. for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  13311. var _ref;
  13312. if (_isArray) {
  13313. if (_i >= _iterator.length) break;
  13314. _ref = _iterator[_i++];
  13315. } else {
  13316. _i = _iterator.next();
  13317. if (_i.done) break;
  13318. _ref = _i.value;
  13319. }
  13320. var path = _ref;
  13321. maybeMemoise(path);
  13322. }
  13323. }
  13324. maybeMemoise(classPath.get("superClass"));
  13325. memoiseDecorators(classPath.get("decorators"), true);
  13326. var methods = classPath.get("body.body");
  13327. for (var _iterator2 = methods, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  13328. var _ref2;
  13329. if (_isArray2) {
  13330. if (_i2 >= _iterator2.length) break;
  13331. _ref2 = _iterator2[_i2++];
  13332. } else {
  13333. _i2 = _iterator2.next();
  13334. if (_i2.done) break;
  13335. _ref2 = _i2.value;
  13336. }
  13337. var methodPath = _ref2;
  13338. if (methodPath.is("computed")) {
  13339. maybeMemoise(methodPath.get("key"));
  13340. }
  13341. if (methodPath.has("decorators")) {
  13342. memoiseDecorators(classPath.get("decorators"));
  13343. }
  13344. }
  13345. if (memoisedExpressions) {
  13346. classPath.insertBefore(memoisedExpressions.map(function (expr) {
  13347. return t.expressionStatement(expr);
  13348. }));
  13349. }
  13350. };
  13351. var _babelHelperBindifyDecorators = $__require("e9");
  13352. var _babelHelperBindifyDecorators2 = _interopRequireDefault(_babelHelperBindifyDecorators);
  13353. var _babelTypes = $__require("11");
  13354. var t = _interopRequireWildcard(_babelTypes);
  13355. function _interopRequireWildcard(obj) {
  13356. if (obj && obj.__esModule) {
  13357. return obj;
  13358. } else {
  13359. var newObj = {};if (obj != null) {
  13360. for (var key in obj) {
  13361. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  13362. }
  13363. }newObj.default = obj;return newObj;
  13364. }
  13365. }
  13366. function _interopRequireDefault(obj) {
  13367. return obj && obj.__esModule ? obj : { default: obj };
  13368. }
  13369. module.exports = exports["default"];
  13370. });
  13371. $__System.registerDynamic("eb", ["d4", "17", "e8", "10", "ea"], true, function ($__require, exports, module) {
  13372. "use strict";
  13373. var global = this || self,
  13374. GLOBAL = global;
  13375. exports.__esModule = true;
  13376. var _create = $__require("d4");
  13377. var _create2 = _interopRequireDefault(_create);
  13378. var _getIterator2 = $__require("17");
  13379. var _getIterator3 = _interopRequireDefault(_getIterator2);
  13380. exports.default = function (_ref) {
  13381. var t = _ref.types;
  13382. function cleanDecorators(decorators) {
  13383. return decorators.reverse().map(function (dec) {
  13384. return dec.expression;
  13385. });
  13386. }
  13387. function transformClass(path, ref, state) {
  13388. var nodes = [];
  13389. state;
  13390. var classDecorators = path.node.decorators;
  13391. if (classDecorators) {
  13392. path.node.decorators = null;
  13393. classDecorators = cleanDecorators(classDecorators);
  13394. for (var _iterator = classDecorators, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  13395. var _ref2;
  13396. if (_isArray) {
  13397. if (_i >= _iterator.length) break;
  13398. _ref2 = _iterator[_i++];
  13399. } else {
  13400. _i = _iterator.next();
  13401. if (_i.done) break;
  13402. _ref2 = _i.value;
  13403. }
  13404. var decorator = _ref2;
  13405. nodes.push(buildClassDecorator({
  13406. CLASS_REF: ref,
  13407. DECORATOR: decorator
  13408. }));
  13409. }
  13410. }
  13411. var map = (0, _create2.default)(null);
  13412. for (var _iterator2 = path.get("body.body"), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  13413. var _ref3;
  13414. if (_isArray2) {
  13415. if (_i2 >= _iterator2.length) break;
  13416. _ref3 = _iterator2[_i2++];
  13417. } else {
  13418. _i2 = _iterator2.next();
  13419. if (_i2.done) break;
  13420. _ref3 = _i2.value;
  13421. }
  13422. var method = _ref3;
  13423. var decorators = method.node.decorators;
  13424. if (!decorators) continue;
  13425. var _alias = t.toKeyAlias(method.node);
  13426. map[_alias] = map[_alias] || [];
  13427. map[_alias].push(method.node);
  13428. method.remove();
  13429. }
  13430. for (var alias in map) {
  13431. var items = map[alias];
  13432. items;
  13433. }
  13434. return nodes;
  13435. }
  13436. function hasDecorators(path) {
  13437. if (path.isClass()) {
  13438. if (path.node.decorators) return true;
  13439. for (var _iterator3 = path.node.body.body, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  13440. var _ref4;
  13441. if (_isArray3) {
  13442. if (_i3 >= _iterator3.length) break;
  13443. _ref4 = _iterator3[_i3++];
  13444. } else {
  13445. _i3 = _iterator3.next();
  13446. if (_i3.done) break;
  13447. _ref4 = _i3.value;
  13448. }
  13449. var method = _ref4;
  13450. if (method.decorators) {
  13451. return true;
  13452. }
  13453. }
  13454. } else if (path.isObjectExpression()) {
  13455. for (var _iterator4 = path.node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  13456. var _ref5;
  13457. if (_isArray4) {
  13458. if (_i4 >= _iterator4.length) break;
  13459. _ref5 = _iterator4[_i4++];
  13460. } else {
  13461. _i4 = _iterator4.next();
  13462. if (_i4.done) break;
  13463. _ref5 = _i4.value;
  13464. }
  13465. var prop = _ref5;
  13466. if (prop.decorators) {
  13467. return true;
  13468. }
  13469. }
  13470. }
  13471. return false;
  13472. }
  13473. function doError(path) {
  13474. throw path.buildCodeFrameError("Decorators are not officially supported yet in 6.x pending a proposal update.\nHowever, if you need to use them you can install the legacy decorators transform with:\n\nnpm install babel-plugin-transform-decorators-legacy --save-dev\n\nand add the following line to your .babelrc file:\n\n{\n \"plugins\": [\"transform-decorators-legacy\"]\n}\n\nThe repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.\n ");
  13475. }
  13476. return {
  13477. inherits: $__require("e8"),
  13478. visitor: {
  13479. ClassExpression: function ClassExpression(path) {
  13480. if (!hasDecorators(path)) return;
  13481. doError(path);
  13482. (0, _babelHelperExplodeClass2.default)(path);
  13483. var ref = path.scope.generateDeclaredUidIdentifier("ref");
  13484. var nodes = [];
  13485. nodes.push(t.assignmentExpression("=", ref, path.node));
  13486. nodes = nodes.concat(transformClass(path, ref, this));
  13487. nodes.push(ref);
  13488. path.replaceWith(t.sequenceExpression(nodes));
  13489. },
  13490. ClassDeclaration: function ClassDeclaration(path) {
  13491. if (!hasDecorators(path)) return;
  13492. doError(path);
  13493. (0, _babelHelperExplodeClass2.default)(path);
  13494. var ref = path.node.id;
  13495. var nodes = [];
  13496. nodes = nodes.concat(transformClass(path, ref, this).map(function (expr) {
  13497. return t.expressionStatement(expr);
  13498. }));
  13499. nodes.push(t.expressionStatement(ref));
  13500. path.insertAfter(nodes);
  13501. },
  13502. ObjectExpression: function ObjectExpression(path) {
  13503. if (!hasDecorators(path)) return;
  13504. doError(path);
  13505. }
  13506. }
  13507. };
  13508. };
  13509. var _babelTemplate = $__require("10");
  13510. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  13511. var _babelHelperExplodeClass = $__require("ea");
  13512. var _babelHelperExplodeClass2 = _interopRequireDefault(_babelHelperExplodeClass);
  13513. function _interopRequireDefault(obj) {
  13514. return obj && obj.__esModule ? obj : { default: obj };
  13515. }
  13516. var buildClassDecorator = (0, _babelTemplate2.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n");
  13517. module.exports = exports["default"];
  13518. });
  13519. $__System.registerDynamic("ec", [], true, function ($__require, exports, module) {
  13520. "use strict";
  13521. var global = this || self,
  13522. GLOBAL = global;
  13523. exports.__esModule = true;
  13524. exports.default = function () {
  13525. return {
  13526. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  13527. parserOpts.plugins.push("dynamicImport");
  13528. }
  13529. };
  13530. };
  13531. module.exports = exports["default"];
  13532. });
  13533. $__System.registerDynamic("e4", ["ed", "e6", "eb", "ec"], true, function ($__require, exports, module) {
  13534. "use strict";
  13535. var global = this || self,
  13536. GLOBAL = global;
  13537. exports.__esModule = true;
  13538. var _babelPresetStage = $__require("ed");
  13539. var _babelPresetStage2 = _interopRequireDefault(_babelPresetStage);
  13540. var _babelPluginTransformClassProperties = $__require("e6");
  13541. var _babelPluginTransformClassProperties2 = _interopRequireDefault(_babelPluginTransformClassProperties);
  13542. var _babelPluginTransformDecorators = $__require("eb");
  13543. var _babelPluginTransformDecorators2 = _interopRequireDefault(_babelPluginTransformDecorators);
  13544. var _babelPluginSyntaxDynamicImport = $__require("ec");
  13545. var _babelPluginSyntaxDynamicImport2 = _interopRequireDefault(_babelPluginSyntaxDynamicImport);
  13546. function _interopRequireDefault(obj) {
  13547. return obj && obj.__esModule ? obj : { default: obj };
  13548. }
  13549. exports.default = {
  13550. presets: [_babelPresetStage2.default],
  13551. plugins: [_babelPluginSyntaxDynamicImport2.default, _babelPluginTransformClassProperties2.default, _babelPluginTransformDecorators2.default]
  13552. };
  13553. module.exports = exports["default"];
  13554. });
  13555. $__System.registerDynamic("ee", [], true, function ($__require, exports, module) {
  13556. "use strict";
  13557. var global = this || self,
  13558. GLOBAL = global;
  13559. exports.__esModule = true;
  13560. exports.default = function () {
  13561. return {
  13562. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  13563. parserOpts.plugins.push("trailingFunctionCommas");
  13564. }
  13565. };
  13566. };
  13567. module.exports = exports["default"];
  13568. });
  13569. $__System.registerDynamic("ef", [], true, function ($__require, exports, module) {
  13570. "use strict";
  13571. var global = this || self,
  13572. GLOBAL = global;
  13573. exports.__esModule = true;
  13574. exports.default = function () {
  13575. return {
  13576. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  13577. parserOpts.plugins.push("asyncFunctions");
  13578. }
  13579. };
  13580. };
  13581. module.exports = exports["default"];
  13582. });
  13583. $__System.registerDynamic("f0", ["ef", "f1"], true, function ($__require, exports, module) {
  13584. "use strict";
  13585. var global = this || self,
  13586. GLOBAL = global;
  13587. exports.__esModule = true;
  13588. exports.default = function () {
  13589. return {
  13590. inherits: $__require("ef"),
  13591. visitor: {
  13592. Function: function Function(path, state) {
  13593. if (!path.node.async || path.node.generator) return;
  13594. (0, _babelHelperRemapAsyncToGenerator2.default)(path, state.file, {
  13595. wrapAsync: state.addHelper("asyncToGenerator")
  13596. });
  13597. }
  13598. }
  13599. };
  13600. };
  13601. var _babelHelperRemapAsyncToGenerator = $__require("f1");
  13602. var _babelHelperRemapAsyncToGenerator2 = _interopRequireDefault(_babelHelperRemapAsyncToGenerator);
  13603. function _interopRequireDefault(obj) {
  13604. return obj && obj.__esModule ? obj : { default: obj };
  13605. }
  13606. module.exports = exports["default"];
  13607. });
  13608. $__System.registerDynamic("f2", [], true, function ($__require, exports, module) {
  13609. "use strict";
  13610. var global = this || self,
  13611. GLOBAL = global;
  13612. exports.__esModule = true;
  13613. exports.default = function () {
  13614. return {
  13615. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  13616. parserOpts.plugins.push("exponentiationOperator");
  13617. }
  13618. };
  13619. };
  13620. module.exports = exports["default"];
  13621. });
  13622. $__System.registerDynamic("f3", ["11"], true, function ($__require, exports, module) {
  13623. "use strict";
  13624. var global = this || self,
  13625. GLOBAL = global;
  13626. exports.__esModule = true;
  13627. exports.default = function (node, nodes, file, scope, allowedSingleIdent) {
  13628. var obj = void 0;
  13629. if (t.isIdentifier(node) && allowedSingleIdent) {
  13630. obj = node;
  13631. } else {
  13632. obj = getObjRef(node, nodes, file, scope);
  13633. }
  13634. var ref = void 0,
  13635. uid = void 0;
  13636. if (t.isIdentifier(node)) {
  13637. ref = node;
  13638. uid = obj;
  13639. } else {
  13640. var prop = getPropRef(node, nodes, file, scope);
  13641. var computed = node.computed || t.isLiteral(prop);
  13642. uid = ref = t.memberExpression(obj, prop, computed);
  13643. }
  13644. return {
  13645. uid: uid,
  13646. ref: ref
  13647. };
  13648. };
  13649. var _babelTypes = $__require("11");
  13650. var t = _interopRequireWildcard(_babelTypes);
  13651. function _interopRequireWildcard(obj) {
  13652. if (obj && obj.__esModule) {
  13653. return obj;
  13654. } else {
  13655. var newObj = {};if (obj != null) {
  13656. for (var key in obj) {
  13657. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  13658. }
  13659. }newObj.default = obj;return newObj;
  13660. }
  13661. }
  13662. function getObjRef(node, nodes, file, scope) {
  13663. var ref = void 0;
  13664. if (t.isSuper(node)) {
  13665. return node;
  13666. } else if (t.isIdentifier(node)) {
  13667. if (scope.hasBinding(node.name)) {
  13668. return node;
  13669. } else {
  13670. ref = node;
  13671. }
  13672. } else if (t.isMemberExpression(node)) {
  13673. ref = node.object;
  13674. if (t.isSuper(ref) || t.isIdentifier(ref) && scope.hasBinding(ref.name)) {
  13675. return ref;
  13676. }
  13677. } else {
  13678. throw new Error("We can't explode this node type " + node.type);
  13679. }
  13680. var temp = scope.generateUidIdentifierBasedOnNode(ref);
  13681. nodes.push(t.variableDeclaration("var", [t.variableDeclarator(temp, ref)]));
  13682. return temp;
  13683. }
  13684. function getPropRef(node, nodes, file, scope) {
  13685. var prop = node.property;
  13686. var key = t.toComputedKey(node, prop);
  13687. if (t.isLiteral(key) && t.isPureish(key)) return key;
  13688. var temp = scope.generateUidIdentifierBasedOnNode(prop);
  13689. nodes.push(t.variableDeclaration("var", [t.variableDeclarator(temp, prop)]));
  13690. return temp;
  13691. }
  13692. module.exports = exports["default"];
  13693. });
  13694. $__System.registerDynamic("f4", ["f3", "11"], true, function ($__require, exports, module) {
  13695. "use strict";
  13696. var global = this || self,
  13697. GLOBAL = global;
  13698. exports.__esModule = true;
  13699. exports.default = function (opts) {
  13700. var visitor = {};
  13701. function isAssignment(node) {
  13702. return node && node.operator === opts.operator + "=";
  13703. }
  13704. function buildAssignment(left, right) {
  13705. return t.assignmentExpression("=", left, right);
  13706. }
  13707. visitor.ExpressionStatement = function (path, file) {
  13708. if (path.isCompletionRecord()) return;
  13709. var expr = path.node.expression;
  13710. if (!isAssignment(expr)) return;
  13711. var nodes = [];
  13712. var exploded = (0, _babelHelperExplodeAssignableExpression2.default)(expr.left, nodes, file, path.scope, true);
  13713. nodes.push(t.expressionStatement(buildAssignment(exploded.ref, opts.build(exploded.uid, expr.right))));
  13714. path.replaceWithMultiple(nodes);
  13715. };
  13716. visitor.AssignmentExpression = function (path, file) {
  13717. var node = path.node,
  13718. scope = path.scope;
  13719. if (!isAssignment(node)) return;
  13720. var nodes = [];
  13721. var exploded = (0, _babelHelperExplodeAssignableExpression2.default)(node.left, nodes, file, scope);
  13722. nodes.push(buildAssignment(exploded.ref, opts.build(exploded.uid, node.right)));
  13723. path.replaceWithMultiple(nodes);
  13724. };
  13725. visitor.BinaryExpression = function (path) {
  13726. var node = path.node;
  13727. if (node.operator === opts.operator) {
  13728. path.replaceWith(opts.build(node.left, node.right));
  13729. }
  13730. };
  13731. return visitor;
  13732. };
  13733. var _babelHelperExplodeAssignableExpression = $__require("f3");
  13734. var _babelHelperExplodeAssignableExpression2 = _interopRequireDefault(_babelHelperExplodeAssignableExpression);
  13735. var _babelTypes = $__require("11");
  13736. var t = _interopRequireWildcard(_babelTypes);
  13737. function _interopRequireWildcard(obj) {
  13738. if (obj && obj.__esModule) {
  13739. return obj;
  13740. } else {
  13741. var newObj = {};if (obj != null) {
  13742. for (var key in obj) {
  13743. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  13744. }
  13745. }newObj.default = obj;return newObj;
  13746. }
  13747. }
  13748. function _interopRequireDefault(obj) {
  13749. return obj && obj.__esModule ? obj : { default: obj };
  13750. }
  13751. module.exports = exports["default"];
  13752. });
  13753. $__System.registerDynamic("f5", ["f2", "f4"], true, function ($__require, exports, module) {
  13754. "use strict";
  13755. var global = this || self,
  13756. GLOBAL = global;
  13757. exports.__esModule = true;
  13758. exports.default = function (_ref) {
  13759. var t = _ref.types;
  13760. return {
  13761. inherits: $__require("f2"),
  13762. visitor: (0, _babelHelperBuilderBinaryAssignmentOperatorVisitor2.default)({
  13763. operator: "**",
  13764. build: function build(left, right) {
  13765. return t.callExpression(t.memberExpression(t.identifier("Math"), t.identifier("pow")), [left, right]);
  13766. }
  13767. })
  13768. };
  13769. };
  13770. var _babelHelperBuilderBinaryAssignmentOperatorVisitor = $__require("f4");
  13771. var _babelHelperBuilderBinaryAssignmentOperatorVisitor2 = _interopRequireDefault(_babelHelperBuilderBinaryAssignmentOperatorVisitor);
  13772. function _interopRequireDefault(obj) {
  13773. return obj && obj.__esModule ? obj : { default: obj };
  13774. }
  13775. module.exports = exports["default"];
  13776. });
  13777. $__System.registerDynamic("f6", [], true, function ($__require, exports, module) {
  13778. "use strict";
  13779. var global = this || self,
  13780. GLOBAL = global;
  13781. exports.__esModule = true;
  13782. exports.default = function () {
  13783. return {
  13784. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  13785. parserOpts.plugins.push("objectRestSpread");
  13786. }
  13787. };
  13788. };
  13789. module.exports = exports["default"];
  13790. });
  13791. $__System.registerDynamic("f7", ["17", "f6"], true, function ($__require, exports, module) {
  13792. "use strict";
  13793. var global = this || self,
  13794. GLOBAL = global;
  13795. exports.__esModule = true;
  13796. var _getIterator2 = $__require("17");
  13797. var _getIterator3 = _interopRequireDefault(_getIterator2);
  13798. exports.default = function (_ref) {
  13799. var t = _ref.types;
  13800. function hasRestProperty(path) {
  13801. var foundRestProperty = false;
  13802. path.traverse({
  13803. RestProperty: function RestProperty() {
  13804. foundRestProperty = true;
  13805. path.stop();
  13806. }
  13807. });
  13808. return foundRestProperty;
  13809. }
  13810. function hasSpread(node) {
  13811. for (var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  13812. var _ref2;
  13813. if (_isArray) {
  13814. if (_i >= _iterator.length) break;
  13815. _ref2 = _iterator[_i++];
  13816. } else {
  13817. _i = _iterator.next();
  13818. if (_i.done) break;
  13819. _ref2 = _i.value;
  13820. }
  13821. var prop = _ref2;
  13822. if (t.isSpreadProperty(prop)) {
  13823. return true;
  13824. }
  13825. }
  13826. return false;
  13827. }
  13828. function createObjectSpread(file, props, objRef) {
  13829. var restProperty = props.pop();
  13830. var keys = [];
  13831. for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  13832. var _ref3;
  13833. if (_isArray2) {
  13834. if (_i2 >= _iterator2.length) break;
  13835. _ref3 = _iterator2[_i2++];
  13836. } else {
  13837. _i2 = _iterator2.next();
  13838. if (_i2.done) break;
  13839. _ref3 = _i2.value;
  13840. }
  13841. var prop = _ref3;
  13842. var key = prop.key;
  13843. if (t.isIdentifier(key) && !prop.computed) {
  13844. key = t.stringLiteral(prop.key.name);
  13845. }
  13846. keys.push(key);
  13847. }
  13848. return [restProperty.argument, t.callExpression(file.addHelper("objectWithoutProperties"), [objRef, t.arrayExpression(keys)])];
  13849. }
  13850. function replaceRestProperty(parentPath, paramPath, i, numParams) {
  13851. if (paramPath.isAssignmentPattern()) {
  13852. replaceRestProperty(parentPath, paramPath.get("left"), i, numParams);
  13853. return;
  13854. }
  13855. if (paramPath.isObjectPattern() && hasRestProperty(paramPath)) {
  13856. var uid = parentPath.scope.generateUidIdentifier("ref");
  13857. var declar = t.variableDeclaration("let", [t.variableDeclarator(paramPath.node, uid)]);
  13858. declar._blockHoist = i ? numParams - i : 1;
  13859. parentPath.ensureBlock();
  13860. parentPath.get("body").unshiftContainer("body", declar);
  13861. paramPath.replaceWith(uid);
  13862. }
  13863. }
  13864. return {
  13865. inherits: $__require("f6"),
  13866. visitor: {
  13867. Function: function Function(path) {
  13868. var params = path.get("params");
  13869. for (var i = 0; i < params.length; i++) {
  13870. replaceRestProperty(params[i].parentPath, params[i], i, params.length);
  13871. }
  13872. },
  13873. VariableDeclarator: function VariableDeclarator(path, file) {
  13874. if (!path.get("id").isObjectPattern()) {
  13875. return;
  13876. }
  13877. var insertionPath = path;
  13878. path.get("id").traverse({
  13879. RestProperty: function RestProperty(path) {
  13880. if (this.originalPath.node.id.properties.length > 1 && !t.isIdentifier(this.originalPath.node.init)) {
  13881. var initRef = path.scope.generateUidIdentifierBasedOnNode(this.originalPath.node.init, "ref");
  13882. this.originalPath.insertBefore(t.variableDeclarator(initRef, this.originalPath.node.init));
  13883. this.originalPath.replaceWith(t.variableDeclarator(this.originalPath.node.id, initRef));
  13884. return;
  13885. }
  13886. var ref = this.originalPath.node.init;
  13887. path.findParent(function (path) {
  13888. if (path.isObjectProperty()) {
  13889. ref = t.memberExpression(ref, t.identifier(path.node.key.name));
  13890. } else if (path.isVariableDeclarator()) {
  13891. return true;
  13892. }
  13893. });
  13894. var _createObjectSpread = createObjectSpread(file, path.parentPath.node.properties, ref),
  13895. argument = _createObjectSpread[0],
  13896. callExpression = _createObjectSpread[1];
  13897. insertionPath.insertAfter(t.variableDeclarator(argument, callExpression));
  13898. insertionPath = insertionPath.getSibling(insertionPath.key + 1);
  13899. if (path.parentPath.node.properties.length === 0) {
  13900. path.findParent(function (path) {
  13901. return path.isObjectProperty() || path.isVariableDeclarator();
  13902. }).remove();
  13903. }
  13904. }
  13905. }, {
  13906. originalPath: path
  13907. });
  13908. },
  13909. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  13910. var declaration = path.get("declaration");
  13911. if (!declaration.isVariableDeclaration()) return;
  13912. if (!hasRestProperty(declaration)) return;
  13913. var specifiers = [];
  13914. for (var name in path.getOuterBindingIdentifiers(path)) {
  13915. var id = t.identifier(name);
  13916. specifiers.push(t.exportSpecifier(id, id));
  13917. }
  13918. path.replaceWith(declaration.node);
  13919. path.insertAfter(t.exportNamedDeclaration(null, specifiers));
  13920. },
  13921. CatchClause: function CatchClause(path) {
  13922. var paramPath = path.get("param");
  13923. replaceRestProperty(paramPath.parentPath, paramPath);
  13924. },
  13925. AssignmentExpression: function AssignmentExpression(path, file) {
  13926. var leftPath = path.get("left");
  13927. if (leftPath.isObjectPattern() && hasRestProperty(leftPath)) {
  13928. var nodes = [];
  13929. var ref = void 0;
  13930. if (path.isCompletionRecord() || path.parentPath.isExpressionStatement()) {
  13931. ref = path.scope.generateUidIdentifierBasedOnNode(path.node.right, "ref");
  13932. nodes.push(t.variableDeclaration("var", [t.variableDeclarator(ref, path.node.right)]));
  13933. }
  13934. var _createObjectSpread2 = createObjectSpread(file, path.node.left.properties, ref),
  13935. argument = _createObjectSpread2[0],
  13936. callExpression = _createObjectSpread2[1];
  13937. var nodeWithoutSpread = t.clone(path.node);
  13938. nodeWithoutSpread.right = ref;
  13939. nodes.push(t.expressionStatement(nodeWithoutSpread));
  13940. nodes.push(t.toStatement(t.assignmentExpression("=", argument, callExpression)));
  13941. if (ref) {
  13942. nodes.push(t.expressionStatement(ref));
  13943. }
  13944. path.replaceWithMultiple(nodes);
  13945. }
  13946. },
  13947. ForXStatement: function ForXStatement(path) {
  13948. var node = path.node,
  13949. scope = path.scope;
  13950. var leftPath = path.get("left");
  13951. var left = node.left;
  13952. if (t.isObjectPattern(left) && hasRestProperty(leftPath)) {
  13953. var temp = scope.generateUidIdentifier("ref");
  13954. node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]);
  13955. path.ensureBlock();
  13956. node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)]));
  13957. return;
  13958. }
  13959. if (!t.isVariableDeclaration(left)) return;
  13960. var pattern = left.declarations[0].id;
  13961. if (!t.isObjectPattern(pattern)) return;
  13962. var key = scope.generateUidIdentifier("ref");
  13963. node.left = t.variableDeclaration(left.kind, [t.variableDeclarator(key, null)]);
  13964. path.ensureBlock();
  13965. node.body.body.unshift(t.variableDeclaration(node.left.kind, [t.variableDeclarator(pattern, key)]));
  13966. },
  13967. ObjectExpression: function ObjectExpression(path, file) {
  13968. if (!hasSpread(path.node)) return;
  13969. var useBuiltIns = file.opts.useBuiltIns || false;
  13970. if (typeof useBuiltIns !== "boolean") {
  13971. throw new Error("transform-object-rest-spread currently only accepts a boolean " + "option for useBuiltIns (defaults to false)");
  13972. }
  13973. var args = [];
  13974. var props = [];
  13975. function push() {
  13976. if (!props.length) return;
  13977. args.push(t.objectExpression(props));
  13978. props = [];
  13979. }
  13980. for (var _iterator3 = path.node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  13981. var _ref4;
  13982. if (_isArray3) {
  13983. if (_i3 >= _iterator3.length) break;
  13984. _ref4 = _iterator3[_i3++];
  13985. } else {
  13986. _i3 = _iterator3.next();
  13987. if (_i3.done) break;
  13988. _ref4 = _i3.value;
  13989. }
  13990. var prop = _ref4;
  13991. if (t.isSpreadProperty(prop)) {
  13992. push();
  13993. args.push(prop.argument);
  13994. } else {
  13995. props.push(prop);
  13996. }
  13997. }
  13998. push();
  13999. if (!t.isObjectExpression(args[0])) {
  14000. args.unshift(t.objectExpression([]));
  14001. }
  14002. var helper = useBuiltIns ? t.memberExpression(t.identifier("Object"), t.identifier("assign")) : file.addHelper("extends");
  14003. path.replaceWith(t.callExpression(helper, args));
  14004. }
  14005. }
  14006. };
  14007. };
  14008. function _interopRequireDefault(obj) {
  14009. return obj && obj.__esModule ? obj : { default: obj };
  14010. }
  14011. module.exports = exports["default"];
  14012. });
  14013. $__System.registerDynamic("f8", [], true, function ($__require, exports, module) {
  14014. "use strict";
  14015. var global = this || self,
  14016. GLOBAL = global;
  14017. exports.__esModule = true;
  14018. exports.default = function () {
  14019. return {
  14020. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  14021. parserOpts.plugins.push("asyncGenerators");
  14022. }
  14023. };
  14024. };
  14025. module.exports = exports["default"];
  14026. });
  14027. $__System.registerDynamic("f9", ["11", "10", "d0"], true, function ($__require, exports, module) {
  14028. "use strict";
  14029. var global = this || self,
  14030. GLOBAL = global;
  14031. exports.__esModule = true;
  14032. exports.default = function (path, helpers) {
  14033. var node = path.node,
  14034. scope = path.scope,
  14035. parent = path.parent;
  14036. var stepKey = scope.generateUidIdentifier("step");
  14037. var stepValue = scope.generateUidIdentifier("value");
  14038. var left = node.left;
  14039. var declar = void 0;
  14040. if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {
  14041. declar = t.expressionStatement(t.assignmentExpression("=", left, stepValue));
  14042. } else if (t.isVariableDeclaration(left)) {
  14043. declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, stepValue)]);
  14044. }
  14045. var template = buildForAwait();
  14046. (0, _babelTraverse2.default)(template, forAwaitVisitor, null, {
  14047. ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"),
  14048. ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"),
  14049. ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"),
  14050. ITERATOR_KEY: scope.generateUidIdentifier("iterator"),
  14051. GET_ITERATOR: helpers.getAsyncIterator,
  14052. OBJECT: node.right,
  14053. STEP_VALUE: stepValue,
  14054. STEP_KEY: stepKey,
  14055. AWAIT: helpers.wrapAwait
  14056. });
  14057. template = template.body.body;
  14058. var isLabeledParent = t.isLabeledStatement(parent);
  14059. var tryBody = template[3].block.body;
  14060. var loop = tryBody[0];
  14061. if (isLabeledParent) {
  14062. tryBody[0] = t.labeledStatement(parent.label, loop);
  14063. }
  14064. return {
  14065. replaceParent: isLabeledParent,
  14066. node: template,
  14067. declar: declar,
  14068. loop: loop
  14069. };
  14070. };
  14071. var _babelTypes = $__require("11");
  14072. var t = _interopRequireWildcard(_babelTypes);
  14073. var _babelTemplate = $__require("10");
  14074. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  14075. var _babelTraverse = $__require("d0");
  14076. var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
  14077. function _interopRequireDefault(obj) {
  14078. return obj && obj.__esModule ? obj : { default: obj };
  14079. }
  14080. function _interopRequireWildcard(obj) {
  14081. if (obj && obj.__esModule) {
  14082. return obj;
  14083. } else {
  14084. var newObj = {};if (obj != null) {
  14085. for (var key in obj) {
  14086. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  14087. }
  14088. }newObj.default = obj;return newObj;
  14089. }
  14090. }
  14091. var buildForAwait = (0, _babelTemplate2.default)("\n function* wrapper() {\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY, STEP_VALUE;\n (\n STEP_KEY = yield AWAIT(ITERATOR_KEY.next()),\n ITERATOR_COMPLETION = STEP_KEY.done,\n STEP_VALUE = yield AWAIT(STEP_KEY.value),\n !ITERATOR_COMPLETION\n );\n ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n yield AWAIT(ITERATOR_KEY.return());\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n");
  14092. var forAwaitVisitor = {
  14093. noScope: true,
  14094. Identifier: function Identifier(path, replacements) {
  14095. if (path.node.name in replacements) {
  14096. path.replaceInline(replacements[path.node.name]);
  14097. }
  14098. },
  14099. CallExpression: function CallExpression(path, replacements) {
  14100. var callee = path.node.callee;
  14101. if (t.isIdentifier(callee) && callee.name === "AWAIT" && !replacements.AWAIT) {
  14102. path.replaceWith(path.node.arguments[0]);
  14103. }
  14104. }
  14105. };
  14106. module.exports = exports["default"];
  14107. });
  14108. $__System.registerDynamic("f1", ["e7", "10", "11", "f9"], true, function ($__require, exports, module) {
  14109. "use strict";
  14110. var global = this || self,
  14111. GLOBAL = global;
  14112. exports.__esModule = true;
  14113. exports.default = function (path, file, helpers) {
  14114. if (!helpers) {
  14115. helpers = { wrapAsync: file };
  14116. file = null;
  14117. }
  14118. path.traverse(awaitVisitor, {
  14119. file: file,
  14120. wrapAwait: helpers.wrapAwait
  14121. });
  14122. if (path.isClassMethod() || path.isObjectMethod()) {
  14123. classOrObjectMethod(path, helpers.wrapAsync);
  14124. } else {
  14125. plainFunction(path, helpers.wrapAsync);
  14126. }
  14127. };
  14128. var _babelHelperFunctionName = $__require("e7");
  14129. var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
  14130. var _babelTemplate = $__require("10");
  14131. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  14132. var _babelTypes = $__require("11");
  14133. var t = _interopRequireWildcard(_babelTypes);
  14134. var _forAwait = $__require("f9");
  14135. var _forAwait2 = _interopRequireDefault(_forAwait);
  14136. function _interopRequireWildcard(obj) {
  14137. if (obj && obj.__esModule) {
  14138. return obj;
  14139. } else {
  14140. var newObj = {};if (obj != null) {
  14141. for (var key in obj) {
  14142. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  14143. }
  14144. }newObj.default = obj;return newObj;
  14145. }
  14146. }
  14147. function _interopRequireDefault(obj) {
  14148. return obj && obj.__esModule ? obj : { default: obj };
  14149. }
  14150. var buildWrapper = (0, _babelTemplate2.default)("\n (() => {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })\n");
  14151. var namedBuildWrapper = (0, _babelTemplate2.default)("\n (() => {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })\n");
  14152. var awaitVisitor = {
  14153. Function: function Function(path) {
  14154. if (path.isArrowFunctionExpression() && !path.node.async) {
  14155. path.arrowFunctionToShadowed();
  14156. return;
  14157. }
  14158. path.skip();
  14159. },
  14160. AwaitExpression: function AwaitExpression(_ref, _ref2) {
  14161. var node = _ref.node;
  14162. var wrapAwait = _ref2.wrapAwait;
  14163. node.type = "YieldExpression";
  14164. if (wrapAwait) {
  14165. node.argument = t.callExpression(wrapAwait, [node.argument]);
  14166. }
  14167. },
  14168. ForAwaitStatement: function ForAwaitStatement(path, _ref3) {
  14169. var file = _ref3.file,
  14170. wrapAwait = _ref3.wrapAwait;
  14171. var node = path.node;
  14172. var build = (0, _forAwait2.default)(path, {
  14173. getAsyncIterator: file.addHelper("asyncIterator"),
  14174. wrapAwait: wrapAwait
  14175. });
  14176. var declar = build.declar,
  14177. loop = build.loop;
  14178. var block = loop.body;
  14179. path.ensureBlock();
  14180. if (declar) {
  14181. block.body.push(declar);
  14182. }
  14183. block.body = block.body.concat(node.body.body);
  14184. t.inherits(loop, node);
  14185. t.inherits(loop.body, node.body);
  14186. if (build.replaceParent) {
  14187. path.parentPath.replaceWithMultiple(build.node);
  14188. path.remove();
  14189. } else {
  14190. path.replaceWithMultiple(build.node);
  14191. }
  14192. }
  14193. };
  14194. function classOrObjectMethod(path, callId) {
  14195. var node = path.node;
  14196. var body = node.body;
  14197. node.async = false;
  14198. var container = t.functionExpression(null, [], t.blockStatement(body.body), true);
  14199. container.shadow = true;
  14200. body.body = [t.returnStatement(t.callExpression(t.callExpression(callId, [container]), []))];
  14201. node.generator = false;
  14202. }
  14203. function plainFunction(path, callId) {
  14204. var node = path.node;
  14205. var isDeclaration = path.isFunctionDeclaration();
  14206. var asyncFnId = node.id;
  14207. var wrapper = buildWrapper;
  14208. if (path.isArrowFunctionExpression()) {
  14209. path.arrowFunctionToShadowed();
  14210. } else if (!isDeclaration && asyncFnId) {
  14211. wrapper = namedBuildWrapper;
  14212. }
  14213. node.async = false;
  14214. node.generator = true;
  14215. node.id = null;
  14216. if (isDeclaration) {
  14217. node.type = "FunctionExpression";
  14218. }
  14219. var built = t.callExpression(callId, [node]);
  14220. var container = wrapper({
  14221. NAME: asyncFnId,
  14222. REF: path.scope.generateUidIdentifier("ref"),
  14223. FUNCTION: built,
  14224. PARAMS: node.params.reduce(function (acc, param) {
  14225. acc.done = acc.done || t.isAssignmentPattern(param) || t.isRestElement(param);
  14226. if (!acc.done) {
  14227. acc.params.push(path.scope.generateUidIdentifier("x"));
  14228. }
  14229. return acc;
  14230. }, {
  14231. params: [],
  14232. done: false
  14233. }).params
  14234. }).expression;
  14235. if (isDeclaration) {
  14236. var declar = t.variableDeclaration("let", [t.variableDeclarator(t.identifier(asyncFnId.name), t.callExpression(container, []))]);
  14237. declar._blockHoist = true;
  14238. path.replaceWith(declar);
  14239. } else {
  14240. var retFunction = container.body.body[1].argument;
  14241. if (!asyncFnId) {
  14242. (0, _babelHelperFunctionName2.default)({
  14243. node: retFunction,
  14244. parent: path.parent,
  14245. scope: path.scope
  14246. });
  14247. }
  14248. if (!retFunction || retFunction.id || node.params.length) {
  14249. path.replaceWith(t.callExpression(container, []));
  14250. } else {
  14251. path.replaceWith(built);
  14252. }
  14253. }
  14254. }
  14255. module.exports = exports["default"];
  14256. });
  14257. $__System.registerDynamic("fa", ["f8", "f1"], true, function ($__require, exports, module) {
  14258. "use strict";
  14259. var global = this || self,
  14260. GLOBAL = global;
  14261. exports.__esModule = true;
  14262. exports.default = function (_ref) {
  14263. var t = _ref.types;
  14264. var yieldStarVisitor = {
  14265. Function: function Function(path) {
  14266. path.skip();
  14267. },
  14268. YieldExpression: function YieldExpression(_ref2, state) {
  14269. var node = _ref2.node;
  14270. if (!node.delegate) return;
  14271. var callee = state.addHelper("asyncGeneratorDelegate");
  14272. node.argument = t.callExpression(callee, [t.callExpression(state.addHelper("asyncIterator"), [node.argument]), t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("await"))]);
  14273. }
  14274. };
  14275. return {
  14276. inherits: $__require("f8"),
  14277. visitor: {
  14278. Function: function Function(path, state) {
  14279. if (!path.node.async || !path.node.generator) return;
  14280. path.traverse(yieldStarVisitor, state);
  14281. (0, _babelHelperRemapAsyncToGenerator2.default)(path, state.file, {
  14282. wrapAsync: t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("wrap")),
  14283. wrapAwait: t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("await"))
  14284. });
  14285. }
  14286. }
  14287. };
  14288. };
  14289. var _babelHelperRemapAsyncToGenerator = $__require("f1");
  14290. var _babelHelperRemapAsyncToGenerator2 = _interopRequireDefault(_babelHelperRemapAsyncToGenerator);
  14291. function _interopRequireDefault(obj) {
  14292. return obj && obj.__esModule ? obj : { default: obj };
  14293. }
  14294. module.exports = exports["default"];
  14295. });
  14296. $__System.registerDynamic("ed", ["ee", "f0", "f5", "f7", "fa"], true, function ($__require, exports, module) {
  14297. "use strict";
  14298. var global = this || self,
  14299. GLOBAL = global;
  14300. exports.__esModule = true;
  14301. var _babelPluginSyntaxTrailingFunctionCommas = $__require("ee");
  14302. var _babelPluginSyntaxTrailingFunctionCommas2 = _interopRequireDefault(_babelPluginSyntaxTrailingFunctionCommas);
  14303. var _babelPluginTransformAsyncToGenerator = $__require("f0");
  14304. var _babelPluginTransformAsyncToGenerator2 = _interopRequireDefault(_babelPluginTransformAsyncToGenerator);
  14305. var _babelPluginTransformExponentiationOperator = $__require("f5");
  14306. var _babelPluginTransformExponentiationOperator2 = _interopRequireDefault(_babelPluginTransformExponentiationOperator);
  14307. var _babelPluginTransformObjectRestSpread = $__require("f7");
  14308. var _babelPluginTransformObjectRestSpread2 = _interopRequireDefault(_babelPluginTransformObjectRestSpread);
  14309. var _babelPluginTransformAsyncGeneratorFunctions = $__require("fa");
  14310. var _babelPluginTransformAsyncGeneratorFunctions2 = _interopRequireDefault(_babelPluginTransformAsyncGeneratorFunctions);
  14311. function _interopRequireDefault(obj) {
  14312. return obj && obj.__esModule ? obj : { default: obj };
  14313. }
  14314. exports.default = {
  14315. plugins: [_babelPluginSyntaxTrailingFunctionCommas2.default, _babelPluginTransformAsyncToGenerator2.default, _babelPluginTransformExponentiationOperator2.default, _babelPluginTransformAsyncGeneratorFunctions2.default, _babelPluginTransformObjectRestSpread2.default]
  14316. };
  14317. module.exports = exports["default"];
  14318. });
  14319. $__System.registerDynamic("fb", [], true, function ($__require, exports, module) {
  14320. "use strict";
  14321. var global = this || self,
  14322. GLOBAL = global;
  14323. exports.__esModule = true;
  14324. exports.default = function () {
  14325. return {
  14326. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  14327. parserOpts.plugins.push("flow");
  14328. }
  14329. };
  14330. };
  14331. module.exports = exports["default"];
  14332. });
  14333. $__System.registerDynamic("fc", ["17", "fb"], true, function ($__require, exports, module) {
  14334. "use strict";
  14335. var global = this || self,
  14336. GLOBAL = global;
  14337. exports.__esModule = true;
  14338. var _getIterator2 = $__require("17");
  14339. var _getIterator3 = _interopRequireDefault(_getIterator2);
  14340. exports.default = function (_ref) {
  14341. var t = _ref.types;
  14342. var FLOW_DIRECTIVE = "@flow";
  14343. return {
  14344. inherits: $__require("fb"),
  14345. visitor: {
  14346. Program: function Program(path, _ref2) {
  14347. var comments = _ref2.file.ast.comments;
  14348. for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  14349. var _ref3;
  14350. if (_isArray) {
  14351. if (_i >= _iterator.length) break;
  14352. _ref3 = _iterator[_i++];
  14353. } else {
  14354. _i = _iterator.next();
  14355. if (_i.done) break;
  14356. _ref3 = _i.value;
  14357. }
  14358. var comment = _ref3;
  14359. if (comment.value.indexOf(FLOW_DIRECTIVE) >= 0) {
  14360. comment.value = comment.value.replace(FLOW_DIRECTIVE, "");
  14361. if (!comment.value.replace(/\*/g, "").trim()) comment.ignore = true;
  14362. }
  14363. }
  14364. },
  14365. Flow: function Flow(path) {
  14366. path.remove();
  14367. },
  14368. ClassProperty: function ClassProperty(path) {
  14369. path.node.variance = null;
  14370. path.node.typeAnnotation = null;
  14371. if (!path.node.value) path.remove();
  14372. },
  14373. Class: function Class(path) {
  14374. path.node.implements = null;
  14375. path.get("body.body").forEach(function (child) {
  14376. if (child.isClassProperty()) {
  14377. child.node.typeAnnotation = null;
  14378. if (!child.node.value) child.remove();
  14379. }
  14380. });
  14381. },
  14382. AssignmentPattern: function AssignmentPattern(_ref4) {
  14383. var node = _ref4.node;
  14384. node.left.optional = false;
  14385. },
  14386. Function: function Function(_ref5) {
  14387. var node = _ref5.node;
  14388. for (var i = 0; i < node.params.length; i++) {
  14389. var param = node.params[i];
  14390. param.optional = false;
  14391. }
  14392. },
  14393. TypeCastExpression: function TypeCastExpression(path) {
  14394. var node = path.node;
  14395. do {
  14396. node = node.expression;
  14397. } while (t.isTypeCastExpression(node));
  14398. path.replaceWith(node);
  14399. }
  14400. }
  14401. };
  14402. };
  14403. function _interopRequireDefault(obj) {
  14404. return obj && obj.__esModule ? obj : { default: obj };
  14405. }
  14406. module.exports = exports["default"];
  14407. });
  14408. $__System.registerDynamic("fd", ["fc"], true, function ($__require, exports, module) {
  14409. "use strict";
  14410. var global = this || self,
  14411. GLOBAL = global;
  14412. exports.__esModule = true;
  14413. var _babelPluginTransformFlowStripTypes = $__require("fc");
  14414. var _babelPluginTransformFlowStripTypes2 = _interopRequireDefault(_babelPluginTransformFlowStripTypes);
  14415. function _interopRequireDefault(obj) {
  14416. return obj && obj.__esModule ? obj : { default: obj };
  14417. }
  14418. exports.default = {
  14419. plugins: [_babelPluginTransformFlowStripTypes2.default]
  14420. };
  14421. module.exports = exports["default"];
  14422. });
  14423. $__System.registerDynamic("fe", ["ff", "11"], true, function ($__require, exports, module) {
  14424. "use strict";
  14425. var global = this || self,
  14426. GLOBAL = global;
  14427. exports.__esModule = true;
  14428. exports.default = function (opts) {
  14429. var visitor = {};
  14430. visitor.JSXNamespacedName = function (path) {
  14431. throw path.buildCodeFrameError("Namespace tags are not supported. ReactJSX is not XML.");
  14432. };
  14433. visitor.JSXElement = {
  14434. exit: function exit(path, file) {
  14435. var callExpr = buildElementCall(path.get("openingElement"), file);
  14436. callExpr.arguments = callExpr.arguments.concat(path.node.children);
  14437. if (callExpr.arguments.length >= 3) {
  14438. callExpr._prettyCall = true;
  14439. }
  14440. path.replaceWith(t.inherits(callExpr, path.node));
  14441. }
  14442. };
  14443. return visitor;
  14444. function convertJSXIdentifier(node, parent) {
  14445. if (t.isJSXIdentifier(node)) {
  14446. if (node.name === "this" && t.isReferenced(node, parent)) {
  14447. return t.thisExpression();
  14448. } else if (_esutils2.default.keyword.isIdentifierNameES6(node.name)) {
  14449. node.type = "Identifier";
  14450. } else {
  14451. return t.stringLiteral(node.name);
  14452. }
  14453. } else if (t.isJSXMemberExpression(node)) {
  14454. return t.memberExpression(convertJSXIdentifier(node.object, node), convertJSXIdentifier(node.property, node));
  14455. }
  14456. return node;
  14457. }
  14458. function convertAttributeValue(node) {
  14459. if (t.isJSXExpressionContainer(node)) {
  14460. return node.expression;
  14461. } else {
  14462. return node;
  14463. }
  14464. }
  14465. function convertAttribute(node) {
  14466. var value = convertAttributeValue(node.value || t.booleanLiteral(true));
  14467. if (t.isStringLiteral(value) && !t.isJSXExpressionContainer(node.value)) {
  14468. value.value = value.value.replace(/\n\s+/g, " ");
  14469. }
  14470. if (t.isValidIdentifier(node.name.name)) {
  14471. node.name.type = "Identifier";
  14472. } else {
  14473. node.name = t.stringLiteral(node.name.name);
  14474. }
  14475. return t.inherits(t.objectProperty(node.name, value), node);
  14476. }
  14477. function buildElementCall(path, file) {
  14478. path.parent.children = t.react.buildChildren(path.parent);
  14479. var tagExpr = convertJSXIdentifier(path.node.name, path.node);
  14480. var args = [];
  14481. var tagName = void 0;
  14482. if (t.isIdentifier(tagExpr)) {
  14483. tagName = tagExpr.name;
  14484. } else if (t.isLiteral(tagExpr)) {
  14485. tagName = tagExpr.value;
  14486. }
  14487. var state = {
  14488. tagExpr: tagExpr,
  14489. tagName: tagName,
  14490. args: args
  14491. };
  14492. if (opts.pre) {
  14493. opts.pre(state, file);
  14494. }
  14495. var attribs = path.node.attributes;
  14496. if (attribs.length) {
  14497. attribs = buildOpeningElementAttributes(attribs, file);
  14498. } else {
  14499. attribs = t.nullLiteral();
  14500. }
  14501. args.push(attribs);
  14502. if (opts.post) {
  14503. opts.post(state, file);
  14504. }
  14505. return state.call || t.callExpression(state.callee, args);
  14506. }
  14507. function buildOpeningElementAttributes(attribs, file) {
  14508. var _props = [];
  14509. var objs = [];
  14510. var useBuiltIns = file.opts.useBuiltIns || false;
  14511. if (typeof useBuiltIns !== "boolean") {
  14512. throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useBuiltIns (defaults to false)");
  14513. }
  14514. function pushProps() {
  14515. if (!_props.length) return;
  14516. objs.push(t.objectExpression(_props));
  14517. _props = [];
  14518. }
  14519. while (attribs.length) {
  14520. var prop = attribs.shift();
  14521. if (t.isJSXSpreadAttribute(prop)) {
  14522. pushProps();
  14523. objs.push(prop.argument);
  14524. } else {
  14525. _props.push(convertAttribute(prop));
  14526. }
  14527. }
  14528. pushProps();
  14529. if (objs.length === 1) {
  14530. attribs = objs[0];
  14531. } else {
  14532. if (!t.isObjectExpression(objs[0])) {
  14533. objs.unshift(t.objectExpression([]));
  14534. }
  14535. var helper = useBuiltIns ? t.memberExpression(t.identifier("Object"), t.identifier("assign")) : file.addHelper("extends");
  14536. attribs = t.callExpression(helper, objs);
  14537. }
  14538. return attribs;
  14539. }
  14540. };
  14541. var _esutils = $__require("ff");
  14542. var _esutils2 = _interopRequireDefault(_esutils);
  14543. var _babelTypes = $__require("11");
  14544. var t = _interopRequireWildcard(_babelTypes);
  14545. function _interopRequireWildcard(obj) {
  14546. if (obj && obj.__esModule) {
  14547. return obj;
  14548. } else {
  14549. var newObj = {};if (obj != null) {
  14550. for (var key in obj) {
  14551. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  14552. }
  14553. }newObj.default = obj;return newObj;
  14554. }
  14555. }
  14556. function _interopRequireDefault(obj) {
  14557. return obj && obj.__esModule ? obj : { default: obj };
  14558. }
  14559. module.exports = exports["default"];
  14560. });
  14561. $__System.registerDynamic("100", ["17", "101", "fe"], true, function ($__require, exports, module) {
  14562. "use strict";
  14563. var global = this || self,
  14564. GLOBAL = global;
  14565. exports.__esModule = true;
  14566. var _getIterator2 = $__require("17");
  14567. var _getIterator3 = _interopRequireDefault(_getIterator2);
  14568. exports.default = function (_ref) {
  14569. var t = _ref.types;
  14570. var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/;
  14571. var visitor = (0, _babelHelperBuilderReactJsx2.default)({
  14572. pre: function pre(state) {
  14573. var tagName = state.tagName;
  14574. var args = state.args;
  14575. if (t.react.isCompatTag(tagName)) {
  14576. args.push(t.stringLiteral(tagName));
  14577. } else {
  14578. args.push(state.tagExpr);
  14579. }
  14580. },
  14581. post: function post(state, pass) {
  14582. state.callee = pass.get("jsxIdentifier")();
  14583. }
  14584. });
  14585. visitor.Program = function (path, state) {
  14586. var file = state.file;
  14587. var id = state.opts.pragma || "React.createElement";
  14588. for (var _iterator = file.ast.comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  14589. var _ref2;
  14590. if (_isArray) {
  14591. if (_i >= _iterator.length) break;
  14592. _ref2 = _iterator[_i++];
  14593. } else {
  14594. _i = _iterator.next();
  14595. if (_i.done) break;
  14596. _ref2 = _i.value;
  14597. }
  14598. var comment = _ref2;
  14599. var matches = JSX_ANNOTATION_REGEX.exec(comment.value);
  14600. if (matches) {
  14601. id = matches[1];
  14602. if (id === "React.DOM") {
  14603. throw file.buildCodeFrameError(comment, "The @jsx React.DOM pragma has been deprecated as of React 0.12");
  14604. } else {
  14605. break;
  14606. }
  14607. }
  14608. }
  14609. state.set("jsxIdentifier", function () {
  14610. return id.split(".").map(function (name) {
  14611. return t.identifier(name);
  14612. }).reduce(function (object, property) {
  14613. return t.memberExpression(object, property);
  14614. });
  14615. });
  14616. };
  14617. return {
  14618. inherits: _babelPluginSyntaxJsx2.default,
  14619. visitor: visitor
  14620. };
  14621. };
  14622. var _babelPluginSyntaxJsx = $__require("101");
  14623. var _babelPluginSyntaxJsx2 = _interopRequireDefault(_babelPluginSyntaxJsx);
  14624. var _babelHelperBuilderReactJsx = $__require("fe");
  14625. var _babelHelperBuilderReactJsx2 = _interopRequireDefault(_babelHelperBuilderReactJsx);
  14626. function _interopRequireDefault(obj) {
  14627. return obj && obj.__esModule ? obj : { default: obj };
  14628. }
  14629. module.exports = exports["default"];
  14630. });
  14631. $__System.registerDynamic("101", [], true, function ($__require, exports, module) {
  14632. "use strict";
  14633. var global = this || self,
  14634. GLOBAL = global;
  14635. exports.__esModule = true;
  14636. exports.default = function () {
  14637. return {
  14638. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  14639. parserOpts.plugins.push("jsx");
  14640. }
  14641. };
  14642. };
  14643. module.exports = exports["default"];
  14644. });
  14645. $__System.registerDynamic("102", ["@node/path"], true, function ($__require, exports, module) {
  14646. "use strict";
  14647. var global = this || self,
  14648. GLOBAL = global;
  14649. exports.__esModule = true;
  14650. exports.default = function (_ref) {
  14651. var t = _ref.types;
  14652. function addDisplayName(id, call) {
  14653. var props = call.arguments[0].properties;
  14654. var safe = true;
  14655. for (var i = 0; i < props.length; i++) {
  14656. var prop = props[i];
  14657. var key = t.toComputedKey(prop);
  14658. if (t.isLiteral(key, { value: "displayName" })) {
  14659. safe = false;
  14660. break;
  14661. }
  14662. }
  14663. if (safe) {
  14664. props.unshift(t.objectProperty(t.identifier("displayName"), t.stringLiteral(id)));
  14665. }
  14666. }
  14667. var isCreateClassCallExpression = t.buildMatchMemberExpression("React.createClass");
  14668. var isCreateClassAddon = function isCreateClassAddon(callee) {
  14669. return callee.name === "createReactClass";
  14670. };
  14671. function isCreateClass(node) {
  14672. if (!node || !t.isCallExpression(node)) return false;
  14673. if (!isCreateClassCallExpression(node.callee) && !isCreateClassAddon(node.callee)) return false;
  14674. var args = node.arguments;
  14675. if (args.length !== 1) return false;
  14676. var first = args[0];
  14677. if (!t.isObjectExpression(first)) return false;
  14678. return true;
  14679. }
  14680. return {
  14681. visitor: {
  14682. ExportDefaultDeclaration: function ExportDefaultDeclaration(_ref2, state) {
  14683. var node = _ref2.node;
  14684. if (isCreateClass(node.declaration)) {
  14685. var displayName = state.file.opts.basename;
  14686. if (displayName === "index") {
  14687. displayName = _path2.default.basename(_path2.default.dirname(state.file.opts.filename));
  14688. }
  14689. addDisplayName(displayName, node.declaration);
  14690. }
  14691. },
  14692. CallExpression: function CallExpression(path) {
  14693. var node = path.node;
  14694. if (!isCreateClass(node)) return;
  14695. var id = void 0;
  14696. path.find(function (path) {
  14697. if (path.isAssignmentExpression()) {
  14698. id = path.node.left;
  14699. } else if (path.isObjectProperty()) {
  14700. id = path.node.key;
  14701. } else if (path.isVariableDeclarator()) {
  14702. id = path.node.id;
  14703. } else if (path.isStatement()) {
  14704. return true;
  14705. }
  14706. if (id) return true;
  14707. });
  14708. if (!id) return;
  14709. if (t.isMemberExpression(id)) {
  14710. id = id.property;
  14711. }
  14712. if (t.isIdentifier(id)) {
  14713. addDisplayName(id.name, node);
  14714. }
  14715. }
  14716. }
  14717. };
  14718. };
  14719. var _path = $__require("@node/path");
  14720. var _path2 = _interopRequireDefault(_path);
  14721. function _interopRequireDefault(obj) {
  14722. return obj && obj.__esModule ? obj : { default: obj };
  14723. }
  14724. module.exports = exports["default"];
  14725. });
  14726. $__System.registerDynamic("103", ["fd", "100", "101", "102"], true, function ($__require, exports, module) {
  14727. "use strict";
  14728. var global = this || self,
  14729. GLOBAL = global;
  14730. exports.__esModule = true;
  14731. var _babelPresetFlow = $__require("fd");
  14732. var _babelPresetFlow2 = _interopRequireDefault(_babelPresetFlow);
  14733. var _babelPluginTransformReactJsx = $__require("100");
  14734. var _babelPluginTransformReactJsx2 = _interopRequireDefault(_babelPluginTransformReactJsx);
  14735. var _babelPluginSyntaxJsx = $__require("101");
  14736. var _babelPluginSyntaxJsx2 = _interopRequireDefault(_babelPluginSyntaxJsx);
  14737. var _babelPluginTransformReactDisplayName = $__require("102");
  14738. var _babelPluginTransformReactDisplayName2 = _interopRequireDefault(_babelPluginTransformReactDisplayName);
  14739. function _interopRequireDefault(obj) {
  14740. return obj && obj.__esModule ? obj : { default: obj };
  14741. }
  14742. exports.default = {
  14743. presets: [_babelPresetFlow2.default],
  14744. plugins: [_babelPluginTransformReactJsx2.default, _babelPluginSyntaxJsx2.default, _babelPluginTransformReactDisplayName2.default],
  14745. env: {
  14746. development: {
  14747. plugins: []
  14748. }
  14749. }
  14750. };
  14751. module.exports = exports["default"];
  14752. });
  14753. $__System.registerDynamic("104", ["17"], true, function ($__require, exports, module) {
  14754. "use strict";
  14755. var global = this || self,
  14756. GLOBAL = global;
  14757. exports.__esModule = true;
  14758. var _getIterator2 = $__require("17");
  14759. var _getIterator3 = _interopRequireDefault(_getIterator2);
  14760. exports.default = function (_ref) {
  14761. var t = _ref.types;
  14762. function isString(node) {
  14763. return t.isLiteral(node) && typeof node.value === "string";
  14764. }
  14765. function buildBinaryExpression(left, right) {
  14766. return t.binaryExpression("+", left, right);
  14767. }
  14768. return {
  14769. visitor: {
  14770. TaggedTemplateExpression: function TaggedTemplateExpression(path, state) {
  14771. var node = path.node;
  14772. var quasi = node.quasi;
  14773. var args = [];
  14774. var strings = [];
  14775. var raw = [];
  14776. for (var _iterator = quasi.quasis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  14777. var _ref2;
  14778. if (_isArray) {
  14779. if (_i >= _iterator.length) break;
  14780. _ref2 = _iterator[_i++];
  14781. } else {
  14782. _i = _iterator.next();
  14783. if (_i.done) break;
  14784. _ref2 = _i.value;
  14785. }
  14786. var elem = _ref2;
  14787. strings.push(t.stringLiteral(elem.value.cooked));
  14788. raw.push(t.stringLiteral(elem.value.raw));
  14789. }
  14790. strings = t.arrayExpression(strings);
  14791. raw = t.arrayExpression(raw);
  14792. var templateName = "taggedTemplateLiteral";
  14793. if (state.opts.loose) templateName += "Loose";
  14794. var templateObject = state.file.addTemplateObject(templateName, strings, raw);
  14795. args.push(templateObject);
  14796. args = args.concat(quasi.expressions);
  14797. path.replaceWith(t.callExpression(node.tag, args));
  14798. },
  14799. TemplateLiteral: function TemplateLiteral(path, state) {
  14800. var nodes = [];
  14801. var expressions = path.get("expressions");
  14802. for (var _iterator2 = path.node.quasis, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  14803. var _ref3;
  14804. if (_isArray2) {
  14805. if (_i2 >= _iterator2.length) break;
  14806. _ref3 = _iterator2[_i2++];
  14807. } else {
  14808. _i2 = _iterator2.next();
  14809. if (_i2.done) break;
  14810. _ref3 = _i2.value;
  14811. }
  14812. var elem = _ref3;
  14813. nodes.push(t.stringLiteral(elem.value.cooked));
  14814. var expr = expressions.shift();
  14815. if (expr) {
  14816. if (state.opts.spec && !expr.isBaseType("string") && !expr.isBaseType("number")) {
  14817. nodes.push(t.callExpression(t.identifier("String"), [expr.node]));
  14818. } else {
  14819. nodes.push(expr.node);
  14820. }
  14821. }
  14822. }
  14823. nodes = nodes.filter(function (n) {
  14824. return !t.isLiteral(n, { value: "" });
  14825. });
  14826. if (!isString(nodes[0]) && !isString(nodes[1])) {
  14827. nodes.unshift(t.stringLiteral(""));
  14828. }
  14829. if (nodes.length > 1) {
  14830. var root = buildBinaryExpression(nodes.shift(), nodes.shift());
  14831. for (var _iterator3 = nodes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  14832. var _ref4;
  14833. if (_isArray3) {
  14834. if (_i3 >= _iterator3.length) break;
  14835. _ref4 = _iterator3[_i3++];
  14836. } else {
  14837. _i3 = _iterator3.next();
  14838. if (_i3.done) break;
  14839. _ref4 = _i3.value;
  14840. }
  14841. var node = _ref4;
  14842. root = buildBinaryExpression(root, node);
  14843. }
  14844. path.replaceWith(root);
  14845. } else {
  14846. path.replaceWith(nodes[0]);
  14847. }
  14848. }
  14849. }
  14850. };
  14851. };
  14852. function _interopRequireDefault(obj) {
  14853. return obj && obj.__esModule ? obj : { default: obj };
  14854. }
  14855. module.exports = exports["default"];
  14856. });
  14857. $__System.registerDynamic("105", [], true, function ($__require, exports, module) {
  14858. "use strict";
  14859. var global = this || self,
  14860. GLOBAL = global;
  14861. exports.__esModule = true;
  14862. exports.default = function () {
  14863. return {
  14864. visitor: {
  14865. NumericLiteral: function NumericLiteral(_ref) {
  14866. var node = _ref.node;
  14867. if (node.extra && /^0[ob]/i.test(node.extra.raw)) {
  14868. node.extra = undefined;
  14869. }
  14870. },
  14871. StringLiteral: function StringLiteral(_ref2) {
  14872. var node = _ref2.node;
  14873. if (node.extra && /\\[u]/gi.test(node.extra.raw)) {
  14874. node.extra = undefined;
  14875. }
  14876. }
  14877. }
  14878. };
  14879. };
  14880. module.exports = exports["default"];
  14881. });
  14882. $__System.registerDynamic("106", ["e7"], true, function ($__require, exports, module) {
  14883. "use strict";
  14884. var global = this || self,
  14885. GLOBAL = global;
  14886. exports.__esModule = true;
  14887. exports.default = function () {
  14888. return {
  14889. visitor: {
  14890. FunctionExpression: {
  14891. exit: function exit(path) {
  14892. if (path.key !== "value" && !path.parentPath.isObjectProperty()) {
  14893. var replacement = (0, _babelHelperFunctionName2.default)(path);
  14894. if (replacement) path.replaceWith(replacement);
  14895. }
  14896. }
  14897. },
  14898. ObjectProperty: function ObjectProperty(path) {
  14899. var value = path.get("value");
  14900. if (value.isFunction()) {
  14901. var newNode = (0, _babelHelperFunctionName2.default)(value);
  14902. if (newNode) value.replaceWith(newNode);
  14903. }
  14904. }
  14905. }
  14906. };
  14907. };
  14908. var _babelHelperFunctionName = $__require("e7");
  14909. var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
  14910. function _interopRequireDefault(obj) {
  14911. return obj && obj.__esModule ? obj : { default: obj };
  14912. }
  14913. module.exports = exports["default"];
  14914. });
  14915. $__System.registerDynamic("107", [], true, function ($__require, exports, module) {
  14916. "use strict";
  14917. var global = this || self,
  14918. GLOBAL = global;
  14919. exports.__esModule = true;
  14920. exports.default = function (_ref) {
  14921. var t = _ref.types;
  14922. return {
  14923. visitor: {
  14924. ArrowFunctionExpression: function ArrowFunctionExpression(path, state) {
  14925. if (state.opts.spec) {
  14926. var node = path.node;
  14927. if (node.shadow) return;
  14928. node.shadow = { this: false };
  14929. node.type = "FunctionExpression";
  14930. var boundThis = t.thisExpression();
  14931. boundThis._forceShadow = path;
  14932. path.ensureBlock();
  14933. path.get("body").unshiftContainer("body", t.expressionStatement(t.callExpression(state.addHelper("newArrowCheck"), [t.thisExpression(), boundThis])));
  14934. path.replaceWith(t.callExpression(t.memberExpression(node, t.identifier("bind")), [t.thisExpression()]));
  14935. } else {
  14936. path.arrowFunctionToShadowed();
  14937. }
  14938. }
  14939. }
  14940. };
  14941. };
  14942. module.exports = exports["default"];
  14943. });
  14944. $__System.registerDynamic("108", ["17"], true, function ($__require, exports, module) {
  14945. "use strict";
  14946. var global = this || self,
  14947. GLOBAL = global;
  14948. exports.__esModule = true;
  14949. var _getIterator2 = $__require("17");
  14950. var _getIterator3 = _interopRequireDefault(_getIterator2);
  14951. exports.default = function (_ref) {
  14952. var t = _ref.types;
  14953. function statementList(key, path) {
  14954. var paths = path.get(key);
  14955. for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  14956. var _ref2;
  14957. if (_isArray) {
  14958. if (_i >= _iterator.length) break;
  14959. _ref2 = _iterator[_i++];
  14960. } else {
  14961. _i = _iterator.next();
  14962. if (_i.done) break;
  14963. _ref2 = _i.value;
  14964. }
  14965. var _path = _ref2;
  14966. var func = _path.node;
  14967. if (!_path.isFunctionDeclaration()) continue;
  14968. var declar = t.variableDeclaration("let", [t.variableDeclarator(func.id, t.toExpression(func))]);
  14969. declar._blockHoist = 2;
  14970. func.id = null;
  14971. _path.replaceWith(declar);
  14972. }
  14973. }
  14974. return {
  14975. visitor: {
  14976. BlockStatement: function BlockStatement(path) {
  14977. var node = path.node,
  14978. parent = path.parent;
  14979. if (t.isFunction(parent, { body: node }) || t.isExportDeclaration(parent)) {
  14980. return;
  14981. }
  14982. statementList("body", path);
  14983. },
  14984. SwitchCase: function SwitchCase(path) {
  14985. statementList("consequent", path);
  14986. }
  14987. }
  14988. };
  14989. };
  14990. function _interopRequireDefault(obj) {
  14991. return obj && obj.__esModule ? obj : { default: obj };
  14992. }
  14993. module.exports = exports["default"];
  14994. });
  14995. $__System.registerDynamic("1e", ["30"], true, function ($__require, exports, module) {
  14996. "use strict";
  14997. var global = this || self,
  14998. GLOBAL = global;
  14999. exports.__esModule = true;
  15000. var _typeof2 = $__require("30");
  15001. var _typeof3 = _interopRequireDefault(_typeof2);
  15002. function _interopRequireDefault(obj) {
  15003. return obj && obj.__esModule ? obj : { default: obj };
  15004. }
  15005. exports.default = function (self, call) {
  15006. if (!self) {
  15007. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  15008. }
  15009. return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
  15010. };
  15011. });
  15012. $__System.registerDynamic('109', ['10a', '10b', '10c', '10d', 'c'], true, function ($__require, exports, module) {
  15013. var process = $__require('c');
  15014. var global = this || self,
  15015. GLOBAL = global;
  15016. // Works with __proto__ only. Old v8 can't work with null proto objects.
  15017. /* eslint-disable no-proto */
  15018. var isObject = $__require('10a'),
  15019. anObject = $__require('10b');
  15020. var check = function (O, proto) {
  15021. anObject(O);
  15022. if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  15023. };
  15024. module.exports = {
  15025. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  15026. function (test, buggy, set) {
  15027. try {
  15028. set = $__require('10c')(Function.call, $__require('10d').f(Object.prototype, '__proto__').set, 2);
  15029. set(test, []);
  15030. buggy = !(test instanceof Array);
  15031. } catch (e) {
  15032. buggy = true;
  15033. }
  15034. return function setPrototypeOf(O, proto) {
  15035. check(O, proto);
  15036. if (buggy) O.__proto__ = proto;else set(O, proto);
  15037. return O;
  15038. };
  15039. }({}, false) : undefined),
  15040. check: check
  15041. };
  15042. });
  15043. $__System.registerDynamic('10e', ['c6', '109', 'c'], true, function ($__require, exports, module) {
  15044. var process = $__require('c');
  15045. var global = this || self,
  15046. GLOBAL = global;
  15047. // 19.1.3.19 Object.setPrototypeOf(O, proto)
  15048. var $export = $__require('c6');
  15049. $export($export.S, 'Object', { setPrototypeOf: $__require('109').set });
  15050. });
  15051. $__System.registerDynamic('10f', ['10e', '37', 'c'], true, function ($__require, exports, module) {
  15052. var process = $__require('c');
  15053. var global = this || self,
  15054. GLOBAL = global;
  15055. $__require('10e');
  15056. module.exports = $__require('37').Object.setPrototypeOf;
  15057. });
  15058. $__System.registerDynamic("110", ["10f"], true, function ($__require, exports, module) {
  15059. var global = this || self,
  15060. GLOBAL = global;
  15061. module.exports = { "default": $__require("10f"), __esModule: true };
  15062. });
  15063. $__System.registerDynamic("1f", ["110", "d4", "30"], true, function ($__require, exports, module) {
  15064. "use strict";
  15065. var global = this || self,
  15066. GLOBAL = global;
  15067. exports.__esModule = true;
  15068. var _setPrototypeOf = $__require("110");
  15069. var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
  15070. var _create = $__require("d4");
  15071. var _create2 = _interopRequireDefault(_create);
  15072. var _typeof2 = $__require("30");
  15073. var _typeof3 = _interopRequireDefault(_typeof2);
  15074. function _interopRequireDefault(obj) {
  15075. return obj && obj.__esModule ? obj : { default: obj };
  15076. }
  15077. exports.default = function (subClass, superClass) {
  15078. if (typeof superClass !== "function" && superClass !== null) {
  15079. throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
  15080. }
  15081. subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
  15082. constructor: {
  15083. value: subClass,
  15084. enumerable: false,
  15085. writable: true,
  15086. configurable: true
  15087. }
  15088. });
  15089. if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
  15090. };
  15091. });
  15092. $__System.registerDynamic("111", ["1d", "1e", "1f", "e7", "112", "11"], true, function ($__require, exports, module) {
  15093. "use strict";
  15094. var global = this || self,
  15095. GLOBAL = global;
  15096. exports.__esModule = true;
  15097. var _classCallCheck2 = $__require("1d");
  15098. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  15099. var _possibleConstructorReturn2 = $__require("1e");
  15100. var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
  15101. var _inherits2 = $__require("1f");
  15102. var _inherits3 = _interopRequireDefault(_inherits2);
  15103. var _babelHelperFunctionName = $__require("e7");
  15104. var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
  15105. var _vanilla = $__require("112");
  15106. var _vanilla2 = _interopRequireDefault(_vanilla);
  15107. var _babelTypes = $__require("11");
  15108. var t = _interopRequireWildcard(_babelTypes);
  15109. function _interopRequireWildcard(obj) {
  15110. if (obj && obj.__esModule) {
  15111. return obj;
  15112. } else {
  15113. var newObj = {};if (obj != null) {
  15114. for (var key in obj) {
  15115. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  15116. }
  15117. }newObj.default = obj;return newObj;
  15118. }
  15119. }
  15120. function _interopRequireDefault(obj) {
  15121. return obj && obj.__esModule ? obj : { default: obj };
  15122. }
  15123. var LooseClassTransformer = function (_VanillaTransformer) {
  15124. (0, _inherits3.default)(LooseClassTransformer, _VanillaTransformer);
  15125. function LooseClassTransformer() {
  15126. (0, _classCallCheck3.default)(this, LooseClassTransformer);
  15127. var _this = (0, _possibleConstructorReturn3.default)(this, _VanillaTransformer.apply(this, arguments));
  15128. _this.isLoose = true;
  15129. return _this;
  15130. }
  15131. LooseClassTransformer.prototype._processMethod = function _processMethod(node, scope) {
  15132. if (!node.decorators) {
  15133. var classRef = this.classRef;
  15134. if (!node.static) classRef = t.memberExpression(classRef, t.identifier("prototype"));
  15135. var methodName = t.memberExpression(classRef, node.key, node.computed || t.isLiteral(node.key));
  15136. var func = t.functionExpression(null, node.params, node.body, node.generator, node.async);
  15137. func.returnType = node.returnType;
  15138. var key = t.toComputedKey(node, node.key);
  15139. if (t.isStringLiteral(key)) {
  15140. func = (0, _babelHelperFunctionName2.default)({
  15141. node: func,
  15142. id: key,
  15143. scope: scope
  15144. });
  15145. }
  15146. var expr = t.expressionStatement(t.assignmentExpression("=", methodName, func));
  15147. t.inheritsComments(expr, node);
  15148. this.body.push(expr);
  15149. return true;
  15150. }
  15151. };
  15152. return LooseClassTransformer;
  15153. }(_vanilla2.default);
  15154. exports.default = LooseClassTransformer;
  15155. module.exports = exports["default"];
  15156. });
  15157. $__System.registerDynamic("113", ["15", "e7", "114", "11"], true, function ($__require, exports, module) {
  15158. "use strict";
  15159. var global = this || self,
  15160. GLOBAL = global;
  15161. exports.__esModule = true;
  15162. var _keys = $__require("15");
  15163. var _keys2 = _interopRequireDefault(_keys);
  15164. exports.push = push;
  15165. exports.hasComputed = hasComputed;
  15166. exports.toComputedObjectFromClass = toComputedObjectFromClass;
  15167. exports.toClassObject = toClassObject;
  15168. exports.toDefineObject = toDefineObject;
  15169. var _babelHelperFunctionName = $__require("e7");
  15170. var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
  15171. var _has = $__require("114");
  15172. var _has2 = _interopRequireDefault(_has);
  15173. var _babelTypes = $__require("11");
  15174. var t = _interopRequireWildcard(_babelTypes);
  15175. function _interopRequireWildcard(obj) {
  15176. if (obj && obj.__esModule) {
  15177. return obj;
  15178. } else {
  15179. var newObj = {};if (obj != null) {
  15180. for (var key in obj) {
  15181. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  15182. }
  15183. }newObj.default = obj;return newObj;
  15184. }
  15185. }
  15186. function _interopRequireDefault(obj) {
  15187. return obj && obj.__esModule ? obj : { default: obj };
  15188. }
  15189. function toKind(node) {
  15190. if (t.isClassMethod(node) || t.isObjectMethod(node)) {
  15191. if (node.kind === "get" || node.kind === "set") {
  15192. return node.kind;
  15193. }
  15194. }
  15195. return "value";
  15196. }
  15197. function push(mutatorMap, node, kind, file, scope) {
  15198. var alias = t.toKeyAlias(node);
  15199. var map = {};
  15200. if ((0, _has2.default)(mutatorMap, alias)) map = mutatorMap[alias];
  15201. mutatorMap[alias] = map;
  15202. map._inherits = map._inherits || [];
  15203. map._inherits.push(node);
  15204. map._key = node.key;
  15205. if (node.computed) {
  15206. map._computed = true;
  15207. }
  15208. if (node.decorators) {
  15209. var decorators = map.decorators = map.decorators || t.arrayExpression([]);
  15210. decorators.elements = decorators.elements.concat(node.decorators.map(function (dec) {
  15211. return dec.expression;
  15212. }).reverse());
  15213. }
  15214. if (map.value || map.initializer) {
  15215. throw file.buildCodeFrameError(node, "Key conflict with sibling node");
  15216. }
  15217. var key = void 0,
  15218. value = void 0;
  15219. if (t.isObjectProperty(node) || t.isObjectMethod(node) || t.isClassMethod(node)) {
  15220. key = t.toComputedKey(node, node.key);
  15221. }
  15222. if (t.isObjectProperty(node) || t.isClassProperty(node)) {
  15223. value = node.value;
  15224. } else if (t.isObjectMethod(node) || t.isClassMethod(node)) {
  15225. value = t.functionExpression(null, node.params, node.body, node.generator, node.async);
  15226. value.returnType = node.returnType;
  15227. }
  15228. var inheritedKind = toKind(node);
  15229. if (!kind || inheritedKind !== "value") {
  15230. kind = inheritedKind;
  15231. }
  15232. if (scope && t.isStringLiteral(key) && (kind === "value" || kind === "initializer") && t.isFunctionExpression(value)) {
  15233. value = (0, _babelHelperFunctionName2.default)({ id: key, node: value, scope: scope });
  15234. }
  15235. if (value) {
  15236. t.inheritsComments(value, node);
  15237. map[kind] = value;
  15238. }
  15239. return map;
  15240. }
  15241. function hasComputed(mutatorMap) {
  15242. for (var key in mutatorMap) {
  15243. if (mutatorMap[key]._computed) {
  15244. return true;
  15245. }
  15246. }
  15247. return false;
  15248. }
  15249. function toComputedObjectFromClass(obj) {
  15250. var objExpr = t.arrayExpression([]);
  15251. for (var i = 0; i < obj.properties.length; i++) {
  15252. var prop = obj.properties[i];
  15253. var val = prop.value;
  15254. val.properties.unshift(t.objectProperty(t.identifier("key"), t.toComputedKey(prop)));
  15255. objExpr.elements.push(val);
  15256. }
  15257. return objExpr;
  15258. }
  15259. function toClassObject(mutatorMap) {
  15260. var objExpr = t.objectExpression([]);
  15261. (0, _keys2.default)(mutatorMap).forEach(function (mutatorMapKey) {
  15262. var map = mutatorMap[mutatorMapKey];
  15263. var mapNode = t.objectExpression([]);
  15264. var propNode = t.objectProperty(map._key, mapNode, map._computed);
  15265. (0, _keys2.default)(map).forEach(function (key) {
  15266. var node = map[key];
  15267. if (key[0] === "_") return;
  15268. var inheritNode = node;
  15269. if (t.isClassMethod(node) || t.isClassProperty(node)) node = node.value;
  15270. var prop = t.objectProperty(t.identifier(key), node);
  15271. t.inheritsComments(prop, inheritNode);
  15272. t.removeComments(inheritNode);
  15273. mapNode.properties.push(prop);
  15274. });
  15275. objExpr.properties.push(propNode);
  15276. });
  15277. return objExpr;
  15278. }
  15279. function toDefineObject(mutatorMap) {
  15280. (0, _keys2.default)(mutatorMap).forEach(function (key) {
  15281. var map = mutatorMap[key];
  15282. if (map.value) map.writable = t.booleanLiteral(true);
  15283. map.configurable = t.booleanLiteral(true);
  15284. map.enumerable = t.booleanLiteral(true);
  15285. });
  15286. return toClassObject(mutatorMap);
  15287. }
  15288. });
  15289. $__System.registerDynamic("112", ["17", "1d", "d0", "115", "116", "113", "10", "11"], true, function ($__require, exports, module) {
  15290. "use strict";
  15291. var global = this || self,
  15292. GLOBAL = global;
  15293. exports.__esModule = true;
  15294. var _getIterator2 = $__require("17");
  15295. var _getIterator3 = _interopRequireDefault(_getIterator2);
  15296. var _classCallCheck2 = $__require("1d");
  15297. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  15298. var _babelTraverse = $__require("d0");
  15299. var _babelHelperReplaceSupers = $__require("115");
  15300. var _babelHelperReplaceSupers2 = _interopRequireDefault(_babelHelperReplaceSupers);
  15301. var _babelHelperOptimiseCallExpression = $__require("116");
  15302. var _babelHelperOptimiseCallExpression2 = _interopRequireDefault(_babelHelperOptimiseCallExpression);
  15303. var _babelHelperDefineMap = $__require("113");
  15304. var defineMap = _interopRequireWildcard(_babelHelperDefineMap);
  15305. var _babelTemplate = $__require("10");
  15306. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  15307. var _babelTypes = $__require("11");
  15308. var t = _interopRequireWildcard(_babelTypes);
  15309. function _interopRequireWildcard(obj) {
  15310. if (obj && obj.__esModule) {
  15311. return obj;
  15312. } else {
  15313. var newObj = {};if (obj != null) {
  15314. for (var key in obj) {
  15315. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  15316. }
  15317. }newObj.default = obj;return newObj;
  15318. }
  15319. }
  15320. function _interopRequireDefault(obj) {
  15321. return obj && obj.__esModule ? obj : { default: obj };
  15322. }
  15323. var buildDerivedConstructor = (0, _babelTemplate2.default)("\n (function () {\n super(...arguments);\n })\n");
  15324. var noMethodVisitor = {
  15325. "FunctionExpression|FunctionDeclaration": function FunctionExpressionFunctionDeclaration(path) {
  15326. if (!path.is("shadow")) {
  15327. path.skip();
  15328. }
  15329. },
  15330. Method: function Method(path) {
  15331. path.skip();
  15332. }
  15333. };
  15334. var verifyConstructorVisitor = _babelTraverse.visitors.merge([noMethodVisitor, {
  15335. Super: function Super(path) {
  15336. if (this.isDerived && !this.hasBareSuper && !path.parentPath.isCallExpression({ callee: path.node })) {
  15337. throw path.buildCodeFrameError("'super.*' is not allowed before super()");
  15338. }
  15339. },
  15340. CallExpression: {
  15341. exit: function exit(path) {
  15342. if (path.get("callee").isSuper()) {
  15343. this.hasBareSuper = true;
  15344. if (!this.isDerived) {
  15345. throw path.buildCodeFrameError("super() is only allowed in a derived constructor");
  15346. }
  15347. }
  15348. }
  15349. },
  15350. ThisExpression: function ThisExpression(path) {
  15351. if (this.isDerived && !this.hasBareSuper) {
  15352. if (!path.inShadow("this")) {
  15353. throw path.buildCodeFrameError("'this' is not allowed before super()");
  15354. }
  15355. }
  15356. }
  15357. }]);
  15358. var findThisesVisitor = _babelTraverse.visitors.merge([noMethodVisitor, {
  15359. ThisExpression: function ThisExpression(path) {
  15360. this.superThises.push(path);
  15361. }
  15362. }]);
  15363. var ClassTransformer = function () {
  15364. function ClassTransformer(path, file) {
  15365. (0, _classCallCheck3.default)(this, ClassTransformer);
  15366. this.parent = path.parent;
  15367. this.scope = path.scope;
  15368. this.node = path.node;
  15369. this.path = path;
  15370. this.file = file;
  15371. this.clearDescriptors();
  15372. this.instancePropBody = [];
  15373. this.instancePropRefs = {};
  15374. this.staticPropBody = [];
  15375. this.body = [];
  15376. this.bareSuperAfter = [];
  15377. this.bareSupers = [];
  15378. this.pushedConstructor = false;
  15379. this.pushedInherits = false;
  15380. this.isLoose = false;
  15381. this.superThises = [];
  15382. this.classId = this.node.id;
  15383. this.classRef = this.node.id ? t.identifier(this.node.id.name) : this.scope.generateUidIdentifier("class");
  15384. this.superName = this.node.superClass || t.identifier("Function");
  15385. this.isDerived = !!this.node.superClass;
  15386. }
  15387. ClassTransformer.prototype.run = function run() {
  15388. var _this = this;
  15389. var superName = this.superName;
  15390. var file = this.file;
  15391. var body = this.body;
  15392. var constructorBody = this.constructorBody = t.blockStatement([]);
  15393. this.constructor = this.buildConstructor();
  15394. var closureParams = [];
  15395. var closureArgs = [];
  15396. if (this.isDerived) {
  15397. closureArgs.push(superName);
  15398. superName = this.scope.generateUidIdentifierBasedOnNode(superName);
  15399. closureParams.push(superName);
  15400. this.superName = superName;
  15401. }
  15402. this.buildBody();
  15403. constructorBody.body.unshift(t.expressionStatement(t.callExpression(file.addHelper("classCallCheck"), [t.thisExpression(), this.classRef])));
  15404. body = body.concat(this.staticPropBody.map(function (fn) {
  15405. return fn(_this.classRef);
  15406. }));
  15407. if (this.classId) {
  15408. if (body.length === 1) return t.toExpression(body[0]);
  15409. }
  15410. body.push(t.returnStatement(this.classRef));
  15411. var container = t.functionExpression(null, closureParams, t.blockStatement(body));
  15412. container.shadow = true;
  15413. return t.callExpression(container, closureArgs);
  15414. };
  15415. ClassTransformer.prototype.buildConstructor = function buildConstructor() {
  15416. var func = t.functionDeclaration(this.classRef, [], this.constructorBody);
  15417. t.inherits(func, this.node);
  15418. return func;
  15419. };
  15420. ClassTransformer.prototype.pushToMap = function pushToMap(node, enumerable) {
  15421. var kind = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "value";
  15422. var scope = arguments[3];
  15423. var mutatorMap = void 0;
  15424. if (node.static) {
  15425. this.hasStaticDescriptors = true;
  15426. mutatorMap = this.staticMutatorMap;
  15427. } else {
  15428. this.hasInstanceDescriptors = true;
  15429. mutatorMap = this.instanceMutatorMap;
  15430. }
  15431. var map = defineMap.push(mutatorMap, node, kind, this.file, scope);
  15432. if (enumerable) {
  15433. map.enumerable = t.booleanLiteral(true);
  15434. }
  15435. return map;
  15436. };
  15437. ClassTransformer.prototype.constructorMeMaybe = function constructorMeMaybe() {
  15438. var hasConstructor = false;
  15439. var paths = this.path.get("body.body");
  15440. for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  15441. var _ref;
  15442. if (_isArray) {
  15443. if (_i >= _iterator.length) break;
  15444. _ref = _iterator[_i++];
  15445. } else {
  15446. _i = _iterator.next();
  15447. if (_i.done) break;
  15448. _ref = _i.value;
  15449. }
  15450. var path = _ref;
  15451. hasConstructor = path.equals("kind", "constructor");
  15452. if (hasConstructor) break;
  15453. }
  15454. if (hasConstructor) return;
  15455. var params = void 0,
  15456. body = void 0;
  15457. if (this.isDerived) {
  15458. var _constructor = buildDerivedConstructor().expression;
  15459. params = _constructor.params;
  15460. body = _constructor.body;
  15461. } else {
  15462. params = [];
  15463. body = t.blockStatement([]);
  15464. }
  15465. this.path.get("body").unshiftContainer("body", t.classMethod("constructor", t.identifier("constructor"), params, body));
  15466. };
  15467. ClassTransformer.prototype.buildBody = function buildBody() {
  15468. this.constructorMeMaybe();
  15469. this.pushBody();
  15470. this.verifyConstructor();
  15471. if (this.userConstructor) {
  15472. var constructorBody = this.constructorBody;
  15473. constructorBody.body = constructorBody.body.concat(this.userConstructor.body.body);
  15474. t.inherits(this.constructor, this.userConstructor);
  15475. t.inherits(constructorBody, this.userConstructor.body);
  15476. }
  15477. this.pushDescriptors();
  15478. };
  15479. ClassTransformer.prototype.pushBody = function pushBody() {
  15480. var classBodyPaths = this.path.get("body.body");
  15481. for (var _iterator2 = classBodyPaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  15482. var _ref2;
  15483. if (_isArray2) {
  15484. if (_i2 >= _iterator2.length) break;
  15485. _ref2 = _iterator2[_i2++];
  15486. } else {
  15487. _i2 = _iterator2.next();
  15488. if (_i2.done) break;
  15489. _ref2 = _i2.value;
  15490. }
  15491. var path = _ref2;
  15492. var node = path.node;
  15493. if (path.isClassProperty()) {
  15494. throw path.buildCodeFrameError("Missing class properties transform.");
  15495. }
  15496. if (node.decorators) {
  15497. throw path.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");
  15498. }
  15499. if (t.isClassMethod(node)) {
  15500. var isConstructor = node.kind === "constructor";
  15501. if (isConstructor) {
  15502. path.traverse(verifyConstructorVisitor, this);
  15503. if (!this.hasBareSuper && this.isDerived) {
  15504. throw path.buildCodeFrameError("missing super() call in constructor");
  15505. }
  15506. }
  15507. var replaceSupers = new _babelHelperReplaceSupers2.default({
  15508. forceSuperMemoisation: isConstructor,
  15509. methodPath: path,
  15510. methodNode: node,
  15511. objectRef: this.classRef,
  15512. superRef: this.superName,
  15513. isStatic: node.static,
  15514. isLoose: this.isLoose,
  15515. scope: this.scope,
  15516. file: this.file
  15517. }, true);
  15518. replaceSupers.replace();
  15519. if (isConstructor) {
  15520. this.pushConstructor(replaceSupers, node, path);
  15521. } else {
  15522. this.pushMethod(node, path);
  15523. }
  15524. }
  15525. }
  15526. };
  15527. ClassTransformer.prototype.clearDescriptors = function clearDescriptors() {
  15528. this.hasInstanceDescriptors = false;
  15529. this.hasStaticDescriptors = false;
  15530. this.instanceMutatorMap = {};
  15531. this.staticMutatorMap = {};
  15532. };
  15533. ClassTransformer.prototype.pushDescriptors = function pushDescriptors() {
  15534. this.pushInherits();
  15535. var body = this.body;
  15536. var instanceProps = void 0;
  15537. var staticProps = void 0;
  15538. if (this.hasInstanceDescriptors) {
  15539. instanceProps = defineMap.toClassObject(this.instanceMutatorMap);
  15540. }
  15541. if (this.hasStaticDescriptors) {
  15542. staticProps = defineMap.toClassObject(this.staticMutatorMap);
  15543. }
  15544. if (instanceProps || staticProps) {
  15545. if (instanceProps) instanceProps = defineMap.toComputedObjectFromClass(instanceProps);
  15546. if (staticProps) staticProps = defineMap.toComputedObjectFromClass(staticProps);
  15547. var nullNode = t.nullLiteral();
  15548. var args = [this.classRef, nullNode, nullNode, nullNode, nullNode];
  15549. if (instanceProps) args[1] = instanceProps;
  15550. if (staticProps) args[2] = staticProps;
  15551. if (this.instanceInitializersId) {
  15552. args[3] = this.instanceInitializersId;
  15553. body.unshift(this.buildObjectAssignment(this.instanceInitializersId));
  15554. }
  15555. if (this.staticInitializersId) {
  15556. args[4] = this.staticInitializersId;
  15557. body.unshift(this.buildObjectAssignment(this.staticInitializersId));
  15558. }
  15559. var lastNonNullIndex = 0;
  15560. for (var i = 0; i < args.length; i++) {
  15561. if (args[i] !== nullNode) lastNonNullIndex = i;
  15562. }
  15563. args = args.slice(0, lastNonNullIndex + 1);
  15564. body.push(t.expressionStatement(t.callExpression(this.file.addHelper("createClass"), args)));
  15565. }
  15566. this.clearDescriptors();
  15567. };
  15568. ClassTransformer.prototype.buildObjectAssignment = function buildObjectAssignment(id) {
  15569. return t.variableDeclaration("var", [t.variableDeclarator(id, t.objectExpression([]))]);
  15570. };
  15571. ClassTransformer.prototype.wrapSuperCall = function wrapSuperCall(bareSuper, superRef, thisRef, body) {
  15572. var bareSuperNode = bareSuper.node;
  15573. if (this.isLoose) {
  15574. bareSuperNode.arguments.unshift(t.thisExpression());
  15575. if (bareSuperNode.arguments.length === 2 && t.isSpreadElement(bareSuperNode.arguments[1]) && t.isIdentifier(bareSuperNode.arguments[1].argument, { name: "arguments" })) {
  15576. bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;
  15577. bareSuperNode.callee = t.memberExpression(superRef, t.identifier("apply"));
  15578. } else {
  15579. bareSuperNode.callee = t.memberExpression(superRef, t.identifier("call"));
  15580. }
  15581. } else {
  15582. bareSuperNode = (0, _babelHelperOptimiseCallExpression2.default)(t.logicalExpression("||", t.memberExpression(this.classRef, t.identifier("__proto__")), t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("getPrototypeOf")), [this.classRef])), t.thisExpression(), bareSuperNode.arguments);
  15583. }
  15584. var call = t.callExpression(this.file.addHelper("possibleConstructorReturn"), [t.thisExpression(), bareSuperNode]);
  15585. var bareSuperAfter = this.bareSuperAfter.map(function (fn) {
  15586. return fn(thisRef);
  15587. });
  15588. if (bareSuper.parentPath.isExpressionStatement() && bareSuper.parentPath.container === body.node.body && body.node.body.length - 1 === bareSuper.parentPath.key) {
  15589. if (this.superThises.length || bareSuperAfter.length) {
  15590. bareSuper.scope.push({ id: thisRef });
  15591. call = t.assignmentExpression("=", thisRef, call);
  15592. }
  15593. if (bareSuperAfter.length) {
  15594. call = t.toSequenceExpression([call].concat(bareSuperAfter, [thisRef]));
  15595. }
  15596. bareSuper.parentPath.replaceWith(t.returnStatement(call));
  15597. } else {
  15598. bareSuper.replaceWithMultiple([t.variableDeclaration("var", [t.variableDeclarator(thisRef, call)])].concat(bareSuperAfter, [t.expressionStatement(thisRef)]));
  15599. }
  15600. };
  15601. ClassTransformer.prototype.verifyConstructor = function verifyConstructor() {
  15602. var _this2 = this;
  15603. if (!this.isDerived) return;
  15604. var path = this.userConstructorPath;
  15605. var body = path.get("body");
  15606. path.traverse(findThisesVisitor, this);
  15607. var guaranteedSuperBeforeFinish = !!this.bareSupers.length;
  15608. var superRef = this.superName || t.identifier("Function");
  15609. var thisRef = path.scope.generateUidIdentifier("this");
  15610. for (var _iterator3 = this.bareSupers, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  15611. var _ref3;
  15612. if (_isArray3) {
  15613. if (_i3 >= _iterator3.length) break;
  15614. _ref3 = _iterator3[_i3++];
  15615. } else {
  15616. _i3 = _iterator3.next();
  15617. if (_i3.done) break;
  15618. _ref3 = _i3.value;
  15619. }
  15620. var bareSuper = _ref3;
  15621. this.wrapSuperCall(bareSuper, superRef, thisRef, body);
  15622. if (guaranteedSuperBeforeFinish) {
  15623. bareSuper.find(function (parentPath) {
  15624. if (parentPath === path) {
  15625. return true;
  15626. }
  15627. if (parentPath.isLoop() || parentPath.isConditional()) {
  15628. guaranteedSuperBeforeFinish = false;
  15629. return true;
  15630. }
  15631. });
  15632. }
  15633. }
  15634. for (var _iterator4 = this.superThises, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  15635. var _ref4;
  15636. if (_isArray4) {
  15637. if (_i4 >= _iterator4.length) break;
  15638. _ref4 = _iterator4[_i4++];
  15639. } else {
  15640. _i4 = _iterator4.next();
  15641. if (_i4.done) break;
  15642. _ref4 = _i4.value;
  15643. }
  15644. var thisPath = _ref4;
  15645. thisPath.replaceWith(thisRef);
  15646. }
  15647. var wrapReturn = function wrapReturn(returnArg) {
  15648. return t.callExpression(_this2.file.addHelper("possibleConstructorReturn"), [thisRef].concat(returnArg || []));
  15649. };
  15650. var bodyPaths = body.get("body");
  15651. if (bodyPaths.length && !bodyPaths.pop().isReturnStatement()) {
  15652. body.pushContainer("body", t.returnStatement(guaranteedSuperBeforeFinish ? thisRef : wrapReturn()));
  15653. }
  15654. for (var _iterator5 = this.superReturns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
  15655. var _ref5;
  15656. if (_isArray5) {
  15657. if (_i5 >= _iterator5.length) break;
  15658. _ref5 = _iterator5[_i5++];
  15659. } else {
  15660. _i5 = _iterator5.next();
  15661. if (_i5.done) break;
  15662. _ref5 = _i5.value;
  15663. }
  15664. var returnPath = _ref5;
  15665. if (returnPath.node.argument) {
  15666. var ref = returnPath.scope.generateDeclaredUidIdentifier("ret");
  15667. returnPath.get("argument").replaceWithMultiple([t.assignmentExpression("=", ref, returnPath.node.argument), wrapReturn(ref)]);
  15668. } else {
  15669. returnPath.get("argument").replaceWith(wrapReturn());
  15670. }
  15671. }
  15672. };
  15673. ClassTransformer.prototype.pushMethod = function pushMethod(node, path) {
  15674. var scope = path ? path.scope : this.scope;
  15675. if (node.kind === "method") {
  15676. if (this._processMethod(node, scope)) return;
  15677. }
  15678. this.pushToMap(node, false, null, scope);
  15679. };
  15680. ClassTransformer.prototype._processMethod = function _processMethod() {
  15681. return false;
  15682. };
  15683. ClassTransformer.prototype.pushConstructor = function pushConstructor(replaceSupers, method, path) {
  15684. this.bareSupers = replaceSupers.bareSupers;
  15685. this.superReturns = replaceSupers.returns;
  15686. if (path.scope.hasOwnBinding(this.classRef.name)) {
  15687. path.scope.rename(this.classRef.name);
  15688. }
  15689. var construct = this.constructor;
  15690. this.userConstructorPath = path;
  15691. this.userConstructor = method;
  15692. this.hasConstructor = true;
  15693. t.inheritsComments(construct, method);
  15694. construct._ignoreUserWhitespace = true;
  15695. construct.params = method.params;
  15696. t.inherits(construct.body, method.body);
  15697. construct.body.directives = method.body.directives;
  15698. this._pushConstructor();
  15699. };
  15700. ClassTransformer.prototype._pushConstructor = function _pushConstructor() {
  15701. if (this.pushedConstructor) return;
  15702. this.pushedConstructor = true;
  15703. if (this.hasInstanceDescriptors || this.hasStaticDescriptors) {
  15704. this.pushDescriptors();
  15705. }
  15706. this.body.push(this.constructor);
  15707. this.pushInherits();
  15708. };
  15709. ClassTransformer.prototype.pushInherits = function pushInherits() {
  15710. if (!this.isDerived || this.pushedInherits) return;
  15711. this.pushedInherits = true;
  15712. this.body.unshift(t.expressionStatement(t.callExpression(this.file.addHelper("inherits"), [this.classRef, this.superName])));
  15713. };
  15714. return ClassTransformer;
  15715. }();
  15716. exports.default = ClassTransformer;
  15717. module.exports = exports["default"];
  15718. });
  15719. $__System.registerDynamic("e7", ["117", "10", "11"], true, function ($__require, exports, module) {
  15720. "use strict";
  15721. var global = this || self,
  15722. GLOBAL = global;
  15723. exports.__esModule = true;
  15724. exports.default = function (_ref) {
  15725. var node = _ref.node,
  15726. parent = _ref.parent,
  15727. scope = _ref.scope,
  15728. id = _ref.id;
  15729. if (node.id) return;
  15730. if ((t.isObjectProperty(parent) || t.isObjectMethod(parent, { kind: "method" })) && (!parent.computed || t.isLiteral(parent.key))) {
  15731. id = parent.key;
  15732. } else if (t.isVariableDeclarator(parent)) {
  15733. id = parent.id;
  15734. if (t.isIdentifier(id)) {
  15735. var binding = scope.parent.getBinding(id.name);
  15736. if (binding && binding.constant && scope.getBinding(id.name) === binding) {
  15737. node.id = id;
  15738. node.id[t.NOT_LOCAL_BINDING] = true;
  15739. return;
  15740. }
  15741. }
  15742. } else if (t.isAssignmentExpression(parent)) {
  15743. id = parent.left;
  15744. } else if (!id) {
  15745. return;
  15746. }
  15747. var name = void 0;
  15748. if (id && t.isLiteral(id)) {
  15749. name = id.value;
  15750. } else if (id && t.isIdentifier(id)) {
  15751. name = id.name;
  15752. } else {
  15753. return;
  15754. }
  15755. name = t.toBindingIdentifierName(name);
  15756. id = t.identifier(name);
  15757. id[t.NOT_LOCAL_BINDING] = true;
  15758. var state = visit(node, name, scope);
  15759. return wrap(state, node, id, scope) || node;
  15760. };
  15761. var _babelHelperGetFunctionArity = $__require("117");
  15762. var _babelHelperGetFunctionArity2 = _interopRequireDefault(_babelHelperGetFunctionArity);
  15763. var _babelTemplate = $__require("10");
  15764. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  15765. var _babelTypes = $__require("11");
  15766. var t = _interopRequireWildcard(_babelTypes);
  15767. function _interopRequireWildcard(obj) {
  15768. if (obj && obj.__esModule) {
  15769. return obj;
  15770. } else {
  15771. var newObj = {};if (obj != null) {
  15772. for (var key in obj) {
  15773. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  15774. }
  15775. }newObj.default = obj;return newObj;
  15776. }
  15777. }
  15778. function _interopRequireDefault(obj) {
  15779. return obj && obj.__esModule ? obj : { default: obj };
  15780. }
  15781. var buildPropertyMethodAssignmentWrapper = (0, _babelTemplate2.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n");
  15782. var buildGeneratorPropertyMethodAssignmentWrapper = (0, _babelTemplate2.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n");
  15783. var visitor = {
  15784. "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) {
  15785. if (path.node.name !== state.name) return;
  15786. var localDeclar = path.scope.getBindingIdentifier(state.name);
  15787. if (localDeclar !== state.outerDeclar) return;
  15788. state.selfReference = true;
  15789. path.stop();
  15790. }
  15791. };
  15792. function wrap(state, method, id, scope) {
  15793. if (state.selfReference) {
  15794. if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
  15795. scope.rename(id.name);
  15796. } else {
  15797. if (!t.isFunction(method)) return;
  15798. var build = buildPropertyMethodAssignmentWrapper;
  15799. if (method.generator) build = buildGeneratorPropertyMethodAssignmentWrapper;
  15800. var _template = build({
  15801. FUNCTION: method,
  15802. FUNCTION_ID: id,
  15803. FUNCTION_KEY: scope.generateUidIdentifier(id.name)
  15804. }).expression;
  15805. _template.callee._skipModulesRemap = true;
  15806. var params = _template.callee.body.body[0].params;
  15807. for (var i = 0, len = (0, _babelHelperGetFunctionArity2.default)(method); i < len; i++) {
  15808. params.push(scope.generateUidIdentifier("x"));
  15809. }
  15810. return _template;
  15811. }
  15812. }
  15813. method.id = id;
  15814. scope.getProgramParent().references[id.name] = true;
  15815. }
  15816. function visit(node, name, scope) {
  15817. var state = {
  15818. selfAssignment: false,
  15819. selfReference: false,
  15820. outerDeclar: scope.getBindingIdentifier(name),
  15821. references: [],
  15822. name: name
  15823. };
  15824. var binding = scope.getOwnBinding(name);
  15825. if (binding) {
  15826. if (binding.kind === "param") {
  15827. state.selfReference = true;
  15828. } else {}
  15829. } else if (state.outerDeclar || scope.hasGlobal(name)) {
  15830. scope.traverse(node, visitor, state);
  15831. }
  15832. return state;
  15833. }
  15834. module.exports = exports["default"];
  15835. });
  15836. $__System.registerDynamic("118", ["d3", "111", "112", "e7"], true, function ($__require, exports, module) {
  15837. "use strict";
  15838. var global = this || self,
  15839. GLOBAL = global;
  15840. exports.__esModule = true;
  15841. var _symbol = $__require("d3");
  15842. var _symbol2 = _interopRequireDefault(_symbol);
  15843. exports.default = function (_ref) {
  15844. var t = _ref.types;
  15845. var VISITED = (0, _symbol2.default)();
  15846. return {
  15847. visitor: {
  15848. ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
  15849. if (!path.get("declaration").isClassDeclaration()) return;
  15850. var node = path.node;
  15851. var ref = node.declaration.id || path.scope.generateUidIdentifier("class");
  15852. node.declaration.id = ref;
  15853. path.replaceWith(node.declaration);
  15854. path.insertAfter(t.exportDefaultDeclaration(ref));
  15855. },
  15856. ClassDeclaration: function ClassDeclaration(path) {
  15857. var node = path.node;
  15858. var ref = node.id || path.scope.generateUidIdentifier("class");
  15859. path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(ref, t.toExpression(node))]));
  15860. },
  15861. ClassExpression: function ClassExpression(path, state) {
  15862. var node = path.node;
  15863. if (node[VISITED]) return;
  15864. var inferred = (0, _babelHelperFunctionName2.default)(path);
  15865. if (inferred && inferred !== node) return path.replaceWith(inferred);
  15866. node[VISITED] = true;
  15867. var Constructor = _vanilla2.default;
  15868. if (state.opts.loose) Constructor = _loose2.default;
  15869. path.replaceWith(new Constructor(path, state.file).run());
  15870. }
  15871. }
  15872. };
  15873. };
  15874. var _loose = $__require("111");
  15875. var _loose2 = _interopRequireDefault(_loose);
  15876. var _vanilla = $__require("112");
  15877. var _vanilla2 = _interopRequireDefault(_vanilla);
  15878. var _babelHelperFunctionName = $__require("e7");
  15879. var _babelHelperFunctionName2 = _interopRequireDefault(_babelHelperFunctionName);
  15880. function _interopRequireDefault(obj) {
  15881. return obj && obj.__esModule ? obj : { default: obj };
  15882. }
  15883. module.exports = exports["default"];
  15884. });
  15885. $__System.registerDynamic("116", ["11"], true, function ($__require, exports, module) {
  15886. "use strict";
  15887. var global = this || self,
  15888. GLOBAL = global;
  15889. exports.__esModule = true;
  15890. exports.default = function (callee, thisNode, args) {
  15891. if (args.length === 1 && t.isSpreadElement(args[0]) && t.isIdentifier(args[0].argument, { name: "arguments" })) {
  15892. return t.callExpression(t.memberExpression(callee, t.identifier("apply")), [thisNode, args[0].argument]);
  15893. } else {
  15894. return t.callExpression(t.memberExpression(callee, t.identifier("call")), [thisNode].concat(args));
  15895. }
  15896. };
  15897. var _babelTypes = $__require("11");
  15898. var t = _interopRequireWildcard(_babelTypes);
  15899. function _interopRequireWildcard(obj) {
  15900. if (obj && obj.__esModule) {
  15901. return obj;
  15902. } else {
  15903. var newObj = {};if (obj != null) {
  15904. for (var key in obj) {
  15905. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  15906. }
  15907. }newObj.default = obj;return newObj;
  15908. }
  15909. }
  15910. module.exports = exports["default"];
  15911. });
  15912. $__System.registerDynamic("115", ["1d", "d3", "116", "f", "11"], true, function ($__require, exports, module) {
  15913. "use strict";
  15914. var global = this || self,
  15915. GLOBAL = global;
  15916. exports.__esModule = true;
  15917. var _classCallCheck2 = $__require("1d");
  15918. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  15919. var _symbol = $__require("d3");
  15920. var _symbol2 = _interopRequireDefault(_symbol);
  15921. var _babelHelperOptimiseCallExpression = $__require("116");
  15922. var _babelHelperOptimiseCallExpression2 = _interopRequireDefault(_babelHelperOptimiseCallExpression);
  15923. var _babelMessages = $__require("f");
  15924. var messages = _interopRequireWildcard(_babelMessages);
  15925. var _babelTypes = $__require("11");
  15926. var t = _interopRequireWildcard(_babelTypes);
  15927. function _interopRequireWildcard(obj) {
  15928. if (obj && obj.__esModule) {
  15929. return obj;
  15930. } else {
  15931. var newObj = {};if (obj != null) {
  15932. for (var key in obj) {
  15933. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  15934. }
  15935. }newObj.default = obj;return newObj;
  15936. }
  15937. }
  15938. function _interopRequireDefault(obj) {
  15939. return obj && obj.__esModule ? obj : { default: obj };
  15940. }
  15941. var HARDCORE_THIS_REF = (0, _symbol2.default)();
  15942. function isIllegalBareSuper(node, parent) {
  15943. if (!t.isSuper(node)) return false;
  15944. if (t.isMemberExpression(parent, { computed: false })) return false;
  15945. if (t.isCallExpression(parent, { callee: node })) return false;
  15946. return true;
  15947. }
  15948. function isMemberExpressionSuper(node) {
  15949. return t.isMemberExpression(node) && t.isSuper(node.object);
  15950. }
  15951. function getPrototypeOfExpression(objectRef, isStatic) {
  15952. var targetRef = isStatic ? objectRef : t.memberExpression(objectRef, t.identifier("prototype"));
  15953. return t.logicalExpression("||", t.memberExpression(targetRef, t.identifier("__proto__")), t.callExpression(t.memberExpression(t.identifier("Object"), t.identifier("getPrototypeOf")), [targetRef]));
  15954. }
  15955. var visitor = {
  15956. Function: function Function(path) {
  15957. if (!path.inShadow("this")) {
  15958. path.skip();
  15959. }
  15960. },
  15961. ReturnStatement: function ReturnStatement(path, state) {
  15962. if (!path.inShadow("this")) {
  15963. state.returns.push(path);
  15964. }
  15965. },
  15966. ThisExpression: function ThisExpression(path, state) {
  15967. if (!path.node[HARDCORE_THIS_REF]) {
  15968. state.thises.push(path);
  15969. }
  15970. },
  15971. enter: function enter(path, state) {
  15972. var callback = state.specHandle;
  15973. if (state.isLoose) callback = state.looseHandle;
  15974. var isBareSuper = path.isCallExpression() && path.get("callee").isSuper();
  15975. var result = callback.call(state, path);
  15976. if (result) {
  15977. state.hasSuper = true;
  15978. }
  15979. if (isBareSuper) {
  15980. state.bareSupers.push(path);
  15981. }
  15982. if (result === true) {
  15983. path.requeue();
  15984. }
  15985. if (result !== true && result) {
  15986. if (Array.isArray(result)) {
  15987. path.replaceWithMultiple(result);
  15988. } else {
  15989. path.replaceWith(result);
  15990. }
  15991. }
  15992. }
  15993. };
  15994. var ReplaceSupers = function () {
  15995. function ReplaceSupers(opts) {
  15996. var inClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  15997. (0, _classCallCheck3.default)(this, ReplaceSupers);
  15998. this.forceSuperMemoisation = opts.forceSuperMemoisation;
  15999. this.methodPath = opts.methodPath;
  16000. this.methodNode = opts.methodNode;
  16001. this.superRef = opts.superRef;
  16002. this.isStatic = opts.isStatic;
  16003. this.hasSuper = false;
  16004. this.inClass = inClass;
  16005. this.isLoose = opts.isLoose;
  16006. this.scope = this.methodPath.scope;
  16007. this.file = opts.file;
  16008. this.opts = opts;
  16009. this.bareSupers = [];
  16010. this.returns = [];
  16011. this.thises = [];
  16012. }
  16013. ReplaceSupers.prototype.getObjectRef = function getObjectRef() {
  16014. return this.opts.objectRef || this.opts.getObjectRef();
  16015. };
  16016. ReplaceSupers.prototype.setSuperProperty = function setSuperProperty(property, value, isComputed) {
  16017. return t.callExpression(this.file.addHelper("set"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic), isComputed ? property : t.stringLiteral(property.name), value, t.thisExpression()]);
  16018. };
  16019. ReplaceSupers.prototype.getSuperProperty = function getSuperProperty(property, isComputed) {
  16020. return t.callExpression(this.file.addHelper("get"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic), isComputed ? property : t.stringLiteral(property.name), t.thisExpression()]);
  16021. };
  16022. ReplaceSupers.prototype.replace = function replace() {
  16023. this.methodPath.traverse(visitor, this);
  16024. };
  16025. ReplaceSupers.prototype.getLooseSuperProperty = function getLooseSuperProperty(id, parent) {
  16026. var methodNode = this.methodNode;
  16027. var superRef = this.superRef || t.identifier("Function");
  16028. if (parent.property === id) {
  16029. return;
  16030. } else if (t.isCallExpression(parent, { callee: id })) {
  16031. return;
  16032. } else if (t.isMemberExpression(parent) && !methodNode.static) {
  16033. return t.memberExpression(superRef, t.identifier("prototype"));
  16034. } else {
  16035. return superRef;
  16036. }
  16037. };
  16038. ReplaceSupers.prototype.looseHandle = function looseHandle(path) {
  16039. var node = path.node;
  16040. if (path.isSuper()) {
  16041. return this.getLooseSuperProperty(node, path.parent);
  16042. } else if (path.isCallExpression()) {
  16043. var callee = node.callee;
  16044. if (!t.isMemberExpression(callee)) return;
  16045. if (!t.isSuper(callee.object)) return;
  16046. t.appendToMemberExpression(callee, t.identifier("call"));
  16047. node.arguments.unshift(t.thisExpression());
  16048. return true;
  16049. }
  16050. };
  16051. ReplaceSupers.prototype.specHandleAssignmentExpression = function specHandleAssignmentExpression(ref, path, node) {
  16052. if (node.operator === "=") {
  16053. return this.setSuperProperty(node.left.property, node.right, node.left.computed);
  16054. } else {
  16055. ref = ref || path.scope.generateUidIdentifier("ref");
  16056. return [t.variableDeclaration("var", [t.variableDeclarator(ref, node.left)]), t.expressionStatement(t.assignmentExpression("=", node.left, t.binaryExpression(node.operator[0], ref, node.right)))];
  16057. }
  16058. };
  16059. ReplaceSupers.prototype.specHandle = function specHandle(path) {
  16060. var property = void 0;
  16061. var computed = void 0;
  16062. var args = void 0;
  16063. var parent = path.parent;
  16064. var node = path.node;
  16065. if (isIllegalBareSuper(node, parent)) {
  16066. throw path.buildCodeFrameError(messages.get("classesIllegalBareSuper"));
  16067. }
  16068. if (t.isCallExpression(node)) {
  16069. var callee = node.callee;
  16070. if (t.isSuper(callee)) {
  16071. return;
  16072. } else if (isMemberExpressionSuper(callee)) {
  16073. property = callee.property;
  16074. computed = callee.computed;
  16075. args = node.arguments;
  16076. }
  16077. } else if (t.isMemberExpression(node) && t.isSuper(node.object)) {
  16078. property = node.property;
  16079. computed = node.computed;
  16080. } else if (t.isUpdateExpression(node) && isMemberExpressionSuper(node.argument)) {
  16081. var binary = t.binaryExpression(node.operator[0], node.argument, t.numericLiteral(1));
  16082. if (node.prefix) {
  16083. return this.specHandleAssignmentExpression(null, path, binary);
  16084. } else {
  16085. var ref = path.scope.generateUidIdentifier("ref");
  16086. return this.specHandleAssignmentExpression(ref, path, binary).concat(t.expressionStatement(ref));
  16087. }
  16088. } else if (t.isAssignmentExpression(node) && isMemberExpressionSuper(node.left)) {
  16089. return this.specHandleAssignmentExpression(null, path, node);
  16090. }
  16091. if (!property) return;
  16092. var superProperty = this.getSuperProperty(property, computed);
  16093. if (args) {
  16094. return this.optimiseCall(superProperty, args);
  16095. } else {
  16096. return superProperty;
  16097. }
  16098. };
  16099. ReplaceSupers.prototype.optimiseCall = function optimiseCall(callee, args) {
  16100. var thisNode = t.thisExpression();
  16101. thisNode[HARDCORE_THIS_REF] = true;
  16102. return (0, _babelHelperOptimiseCallExpression2.default)(callee, thisNode, args);
  16103. };
  16104. return ReplaceSupers;
  16105. }();
  16106. exports.default = ReplaceSupers;
  16107. module.exports = exports["default"];
  16108. });
  16109. $__System.registerDynamic("119", ["17", "d3", "115"], true, function ($__require, exports, module) {
  16110. "use strict";
  16111. var global = this || self,
  16112. GLOBAL = global;
  16113. exports.__esModule = true;
  16114. var _getIterator2 = $__require("17");
  16115. var _getIterator3 = _interopRequireDefault(_getIterator2);
  16116. var _symbol = $__require("d3");
  16117. var _symbol2 = _interopRequireDefault(_symbol);
  16118. exports.default = function (_ref) {
  16119. var t = _ref.types;
  16120. function Property(path, node, scope, getObjectRef, file) {
  16121. var replaceSupers = new _babelHelperReplaceSupers2.default({
  16122. getObjectRef: getObjectRef,
  16123. methodNode: node,
  16124. methodPath: path,
  16125. isStatic: true,
  16126. scope: scope,
  16127. file: file
  16128. });
  16129. replaceSupers.replace();
  16130. }
  16131. var CONTAINS_SUPER = (0, _symbol2.default)();
  16132. return {
  16133. visitor: {
  16134. Super: function Super(path) {
  16135. var parentObj = path.findParent(function (path) {
  16136. return path.isObjectExpression();
  16137. });
  16138. if (parentObj) parentObj.node[CONTAINS_SUPER] = true;
  16139. },
  16140. ObjectExpression: {
  16141. exit: function exit(path, file) {
  16142. if (!path.node[CONTAINS_SUPER]) return;
  16143. var objectRef = void 0;
  16144. var getObjectRef = function getObjectRef() {
  16145. return objectRef = objectRef || path.scope.generateUidIdentifier("obj");
  16146. };
  16147. var propPaths = path.get("properties");
  16148. for (var _iterator = propPaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  16149. var _ref2;
  16150. if (_isArray) {
  16151. if (_i >= _iterator.length) break;
  16152. _ref2 = _iterator[_i++];
  16153. } else {
  16154. _i = _iterator.next();
  16155. if (_i.done) break;
  16156. _ref2 = _i.value;
  16157. }
  16158. var propPath = _ref2;
  16159. if (propPath.isObjectProperty()) propPath = propPath.get("value");
  16160. Property(propPath, propPath.node, path.scope, getObjectRef, file);
  16161. }
  16162. if (objectRef) {
  16163. path.scope.push({ id: objectRef });
  16164. path.replaceWith(t.assignmentExpression("=", objectRef, path.node));
  16165. }
  16166. }
  16167. }
  16168. }
  16169. };
  16170. };
  16171. var _babelHelperReplaceSupers = $__require("115");
  16172. var _babelHelperReplaceSupers2 = _interopRequireDefault(_babelHelperReplaceSupers);
  16173. function _interopRequireDefault(obj) {
  16174. return obj && obj.__esModule ? obj : { default: obj };
  16175. }
  16176. module.exports = exports["default"];
  16177. });
  16178. $__System.registerDynamic("11a", ["11"], true, function ($__require, exports, module) {
  16179. "use strict";
  16180. var global = this || self,
  16181. GLOBAL = global;
  16182. exports.__esModule = true;
  16183. exports.default = function () {
  16184. return {
  16185. visitor: {
  16186. ObjectMethod: function ObjectMethod(path) {
  16187. var node = path.node;
  16188. if (node.kind === "method") {
  16189. var func = t.functionExpression(null, node.params, node.body, node.generator, node.async);
  16190. func.returnType = node.returnType;
  16191. path.replaceWith(t.objectProperty(node.key, func, node.computed));
  16192. }
  16193. },
  16194. ObjectProperty: function ObjectProperty(_ref) {
  16195. var node = _ref.node;
  16196. if (node.shorthand) {
  16197. node.shorthand = false;
  16198. }
  16199. }
  16200. }
  16201. };
  16202. };
  16203. var _babelTypes = $__require("11");
  16204. var t = _interopRequireWildcard(_babelTypes);
  16205. function _interopRequireWildcard(obj) {
  16206. if (obj && obj.__esModule) {
  16207. return obj;
  16208. } else {
  16209. var newObj = {};if (obj != null) {
  16210. for (var key in obj) {
  16211. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  16212. }
  16213. }newObj.default = obj;return newObj;
  16214. }
  16215. }
  16216. module.exports = exports["default"];
  16217. });
  16218. $__System.registerDynamic("11b", ["17"], true, function ($__require, exports, module) {
  16219. "use strict";
  16220. var global = this || self,
  16221. GLOBAL = global;
  16222. exports.__esModule = true;
  16223. var _getIterator2 = $__require("17");
  16224. var _getIterator3 = _interopRequireDefault(_getIterator2);
  16225. exports.default = function (_ref) {
  16226. var t = _ref.types,
  16227. template = _ref.template;
  16228. var buildMutatorMapAssign = template("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n ");
  16229. function getValue(prop) {
  16230. if (t.isObjectProperty(prop)) {
  16231. return prop.value;
  16232. } else if (t.isObjectMethod(prop)) {
  16233. return t.functionExpression(null, prop.params, prop.body, prop.generator, prop.async);
  16234. }
  16235. }
  16236. function pushAssign(objId, prop, body) {
  16237. if (prop.kind === "get" && prop.kind === "set") {
  16238. pushMutatorDefine(objId, prop, body);
  16239. } else {
  16240. body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(objId, prop.key, prop.computed || t.isLiteral(prop.key)), getValue(prop))));
  16241. }
  16242. }
  16243. function pushMutatorDefine(_ref2, prop) {
  16244. var objId = _ref2.objId,
  16245. body = _ref2.body,
  16246. getMutatorId = _ref2.getMutatorId,
  16247. scope = _ref2.scope;
  16248. var key = !prop.computed && t.isIdentifier(prop.key) ? t.stringLiteral(prop.key.name) : prop.key;
  16249. var maybeMemoise = scope.maybeGenerateMemoised(key);
  16250. if (maybeMemoise) {
  16251. body.push(t.expressionStatement(t.assignmentExpression("=", maybeMemoise, key)));
  16252. key = maybeMemoise;
  16253. }
  16254. body.push.apply(body, buildMutatorMapAssign({
  16255. MUTATOR_MAP_REF: getMutatorId(),
  16256. KEY: key,
  16257. VALUE: getValue(prop),
  16258. KIND: t.identifier(prop.kind)
  16259. }));
  16260. }
  16261. function loose(info) {
  16262. for (var _iterator = info.computedProps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  16263. var _ref3;
  16264. if (_isArray) {
  16265. if (_i >= _iterator.length) break;
  16266. _ref3 = _iterator[_i++];
  16267. } else {
  16268. _i = _iterator.next();
  16269. if (_i.done) break;
  16270. _ref3 = _i.value;
  16271. }
  16272. var prop = _ref3;
  16273. if (prop.kind === "get" || prop.kind === "set") {
  16274. pushMutatorDefine(info, prop);
  16275. } else {
  16276. pushAssign(info.objId, prop, info.body);
  16277. }
  16278. }
  16279. }
  16280. function spec(info) {
  16281. var objId = info.objId,
  16282. body = info.body,
  16283. computedProps = info.computedProps,
  16284. state = info.state;
  16285. for (var _iterator2 = computedProps, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  16286. var _ref4;
  16287. if (_isArray2) {
  16288. if (_i2 >= _iterator2.length) break;
  16289. _ref4 = _iterator2[_i2++];
  16290. } else {
  16291. _i2 = _iterator2.next();
  16292. if (_i2.done) break;
  16293. _ref4 = _i2.value;
  16294. }
  16295. var prop = _ref4;
  16296. var key = t.toComputedKey(prop);
  16297. if (prop.kind === "get" || prop.kind === "set") {
  16298. pushMutatorDefine(info, prop);
  16299. } else if (t.isStringLiteral(key, { value: "__proto__" })) {
  16300. pushAssign(objId, prop, body);
  16301. } else {
  16302. if (computedProps.length === 1) {
  16303. return t.callExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(prop)]);
  16304. } else {
  16305. body.push(t.expressionStatement(t.callExpression(state.addHelper("defineProperty"), [objId, key, getValue(prop)])));
  16306. }
  16307. }
  16308. }
  16309. }
  16310. return {
  16311. visitor: {
  16312. ObjectExpression: {
  16313. exit: function exit(path, state) {
  16314. var node = path.node,
  16315. parent = path.parent,
  16316. scope = path.scope;
  16317. var hasComputed = false;
  16318. for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  16319. var _ref5;
  16320. if (_isArray3) {
  16321. if (_i3 >= _iterator3.length) break;
  16322. _ref5 = _iterator3[_i3++];
  16323. } else {
  16324. _i3 = _iterator3.next();
  16325. if (_i3.done) break;
  16326. _ref5 = _i3.value;
  16327. }
  16328. var prop = _ref5;
  16329. hasComputed = prop.computed === true;
  16330. if (hasComputed) break;
  16331. }
  16332. if (!hasComputed) return;
  16333. var initProps = [];
  16334. var computedProps = [];
  16335. var foundComputed = false;
  16336. for (var _iterator4 = node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  16337. var _ref6;
  16338. if (_isArray4) {
  16339. if (_i4 >= _iterator4.length) break;
  16340. _ref6 = _iterator4[_i4++];
  16341. } else {
  16342. _i4 = _iterator4.next();
  16343. if (_i4.done) break;
  16344. _ref6 = _i4.value;
  16345. }
  16346. var _prop = _ref6;
  16347. if (_prop.computed) {
  16348. foundComputed = true;
  16349. }
  16350. if (foundComputed) {
  16351. computedProps.push(_prop);
  16352. } else {
  16353. initProps.push(_prop);
  16354. }
  16355. }
  16356. var objId = scope.generateUidIdentifierBasedOnNode(parent);
  16357. var initPropExpression = t.objectExpression(initProps);
  16358. var body = [];
  16359. body.push(t.variableDeclaration("var", [t.variableDeclarator(objId, initPropExpression)]));
  16360. var callback = spec;
  16361. if (state.opts.loose) callback = loose;
  16362. var mutatorRef = void 0;
  16363. var getMutatorId = function getMutatorId() {
  16364. if (!mutatorRef) {
  16365. mutatorRef = scope.generateUidIdentifier("mutatorMap");
  16366. body.push(t.variableDeclaration("var", [t.variableDeclarator(mutatorRef, t.objectExpression([]))]));
  16367. }
  16368. return mutatorRef;
  16369. };
  16370. var single = callback({
  16371. scope: scope,
  16372. objId: objId,
  16373. body: body,
  16374. computedProps: computedProps,
  16375. initPropExpression: initPropExpression,
  16376. getMutatorId: getMutatorId,
  16377. state: state
  16378. });
  16379. if (mutatorRef) {
  16380. body.push(t.expressionStatement(t.callExpression(state.addHelper("defineEnumerableProperties"), [objId, mutatorRef])));
  16381. }
  16382. if (single) {
  16383. path.replaceWith(single);
  16384. } else {
  16385. body.push(t.expressionStatement(objId));
  16386. path.replaceWithMultiple(body);
  16387. }
  16388. }
  16389. }
  16390. }
  16391. };
  16392. };
  16393. function _interopRequireDefault(obj) {
  16394. return obj && obj.__esModule ? obj : { default: obj };
  16395. }
  16396. module.exports = exports["default"];
  16397. });
  16398. $__System.registerDynamic("11c", [], true, function ($__require, exports, module) {
  16399. "use strict";
  16400. var global = this || self,
  16401. GLOBAL = global;
  16402. exports.__esModule = true;
  16403. exports.default = function (_ref) {
  16404. var messages = _ref.messages,
  16405. template = _ref.template,
  16406. t = _ref.types;
  16407. var buildForOfArray = template("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n ");
  16408. var buildForOfLoose = template("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n ");
  16409. var buildForOf = template("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");
  16410. function _ForOfStatementArray(path) {
  16411. var node = path.node,
  16412. scope = path.scope;
  16413. var nodes = [];
  16414. var right = node.right;
  16415. if (!t.isIdentifier(right) || !scope.hasBinding(right.name)) {
  16416. var uid = scope.generateUidIdentifier("arr");
  16417. nodes.push(t.variableDeclaration("var", [t.variableDeclarator(uid, right)]));
  16418. right = uid;
  16419. }
  16420. var iterationKey = scope.generateUidIdentifier("i");
  16421. var loop = buildForOfArray({
  16422. BODY: node.body,
  16423. KEY: iterationKey,
  16424. ARR: right
  16425. });
  16426. t.inherits(loop, node);
  16427. t.ensureBlock(loop);
  16428. var iterationValue = t.memberExpression(right, iterationKey, true);
  16429. var left = node.left;
  16430. if (t.isVariableDeclaration(left)) {
  16431. left.declarations[0].init = iterationValue;
  16432. loop.body.body.unshift(left);
  16433. } else {
  16434. loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=", left, iterationValue)));
  16435. }
  16436. if (path.parentPath.isLabeledStatement()) {
  16437. loop = t.labeledStatement(path.parentPath.node.label, loop);
  16438. }
  16439. nodes.push(loop);
  16440. return nodes;
  16441. }
  16442. return {
  16443. visitor: {
  16444. ForOfStatement: function ForOfStatement(path, state) {
  16445. if (path.get("right").isArrayExpression()) {
  16446. if (path.parentPath.isLabeledStatement()) {
  16447. return path.parentPath.replaceWithMultiple(_ForOfStatementArray(path));
  16448. } else {
  16449. return path.replaceWithMultiple(_ForOfStatementArray(path));
  16450. }
  16451. }
  16452. var callback = spec;
  16453. if (state.opts.loose) callback = loose;
  16454. var node = path.node;
  16455. var build = callback(path, state);
  16456. var declar = build.declar;
  16457. var loop = build.loop;
  16458. var block = loop.body;
  16459. path.ensureBlock();
  16460. if (declar) {
  16461. block.body.push(declar);
  16462. }
  16463. block.body = block.body.concat(node.body.body);
  16464. t.inherits(loop, node);
  16465. t.inherits(loop.body, node.body);
  16466. if (build.replaceParent) {
  16467. path.parentPath.replaceWithMultiple(build.node);
  16468. path.remove();
  16469. } else {
  16470. path.replaceWithMultiple(build.node);
  16471. }
  16472. }
  16473. }
  16474. };
  16475. function loose(path, file) {
  16476. var node = path.node,
  16477. scope = path.scope,
  16478. parent = path.parent;
  16479. var left = node.left;
  16480. var declar = void 0,
  16481. id = void 0;
  16482. if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {
  16483. id = left;
  16484. } else if (t.isVariableDeclaration(left)) {
  16485. id = scope.generateUidIdentifier("ref");
  16486. declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, id)]);
  16487. } else {
  16488. throw file.buildCodeFrameError(left, messages.get("unknownForHead", left.type));
  16489. }
  16490. var iteratorKey = scope.generateUidIdentifier("iterator");
  16491. var isArrayKey = scope.generateUidIdentifier("isArray");
  16492. var loop = buildForOfLoose({
  16493. LOOP_OBJECT: iteratorKey,
  16494. IS_ARRAY: isArrayKey,
  16495. OBJECT: node.right,
  16496. INDEX: scope.generateUidIdentifier("i"),
  16497. ID: id
  16498. });
  16499. if (!declar) {
  16500. loop.body.body.shift();
  16501. }
  16502. var isLabeledParent = t.isLabeledStatement(parent);
  16503. var labeled = void 0;
  16504. if (isLabeledParent) {
  16505. labeled = t.labeledStatement(parent.label, loop);
  16506. }
  16507. return {
  16508. replaceParent: isLabeledParent,
  16509. declar: declar,
  16510. node: labeled || loop,
  16511. loop: loop
  16512. };
  16513. }
  16514. function spec(path, file) {
  16515. var node = path.node,
  16516. scope = path.scope,
  16517. parent = path.parent;
  16518. var left = node.left;
  16519. var declar = void 0;
  16520. var stepKey = scope.generateUidIdentifier("step");
  16521. var stepValue = t.memberExpression(stepKey, t.identifier("value"));
  16522. if (t.isIdentifier(left) || t.isPattern(left) || t.isMemberExpression(left)) {
  16523. declar = t.expressionStatement(t.assignmentExpression("=", left, stepValue));
  16524. } else if (t.isVariableDeclaration(left)) {
  16525. declar = t.variableDeclaration(left.kind, [t.variableDeclarator(left.declarations[0].id, stepValue)]);
  16526. } else {
  16527. throw file.buildCodeFrameError(left, messages.get("unknownForHead", left.type));
  16528. }
  16529. var iteratorKey = scope.generateUidIdentifier("iterator");
  16530. var template = buildForOf({
  16531. ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"),
  16532. ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"),
  16533. ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"),
  16534. ITERATOR_KEY: iteratorKey,
  16535. STEP_KEY: stepKey,
  16536. OBJECT: node.right,
  16537. BODY: null
  16538. });
  16539. var isLabeledParent = t.isLabeledStatement(parent);
  16540. var tryBody = template[3].block.body;
  16541. var loop = tryBody[0];
  16542. if (isLabeledParent) {
  16543. tryBody[0] = t.labeledStatement(parent.label, loop);
  16544. }
  16545. return {
  16546. replaceParent: isLabeledParent,
  16547. declar: declar,
  16548. loop: loop,
  16549. node: template
  16550. };
  16551. }
  16552. };
  16553. module.exports = exports["default"];
  16554. });
  16555. $__System.registerDynamic("11d", ["11e", "11"], true, function ($__require, exports, module) {
  16556. "use strict";
  16557. var global = this || self,
  16558. GLOBAL = global;
  16559. exports.__esModule = true;
  16560. exports.default = function () {
  16561. return {
  16562. visitor: {
  16563. RegExpLiteral: function RegExpLiteral(path) {
  16564. var node = path.node;
  16565. if (!regex.is(node, "y")) return;
  16566. path.replaceWith(t.newExpression(t.identifier("RegExp"), [t.stringLiteral(node.pattern), t.stringLiteral(node.flags)]));
  16567. }
  16568. }
  16569. };
  16570. };
  16571. var _babelHelperRegex = $__require("11e");
  16572. var regex = _interopRequireWildcard(_babelHelperRegex);
  16573. var _babelTypes = $__require("11");
  16574. var t = _interopRequireWildcard(_babelTypes);
  16575. function _interopRequireWildcard(obj) {
  16576. if (obj && obj.__esModule) {
  16577. return obj;
  16578. } else {
  16579. var newObj = {};if (obj != null) {
  16580. for (var key in obj) {
  16581. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  16582. }
  16583. }newObj.default = obj;return newObj;
  16584. }
  16585. }
  16586. module.exports = exports["default"];
  16587. });
  16588. /*!
  16589. * RegJSGen
  16590. * Copyright 2014 Benjamin Tan <https://d10.github.io/>
  16591. * Available under MIT license <http://d10.mit-license.org/>
  16592. */
  16593. ;(function () {
  16594. 'use strict';
  16595. /** Used to determine if values are of the language type `Object` */
  16596. var objectTypes = {
  16597. 'function': true,
  16598. 'object': true
  16599. };
  16600. /** Used as a reference to the global object */
  16601. var root = objectTypes[typeof window] && window || this;
  16602. /** Backup possible global object */
  16603. var oldRoot = root;
  16604. /** Detect free variable `exports` */
  16605. var freeExports = objectTypes[typeof exports] && exports;
  16606. /** Detect free variable `module` */
  16607. var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
  16608. /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */
  16609. var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
  16610. if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
  16611. root = freeGlobal;
  16612. }
  16613. /*--------------------------------------------------------------------------*/
  16614. /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */
  16615. var stringFromCharCode = String.fromCharCode;
  16616. var floor = Math.floor;
  16617. function fromCodePoint() {
  16618. var MAX_SIZE = 0x4000;
  16619. var codeUnits = [];
  16620. var highSurrogate;
  16621. var lowSurrogate;
  16622. var index = -1;
  16623. var length = arguments.length;
  16624. if (!length) {
  16625. return '';
  16626. }
  16627. var result = '';
  16628. while (++index < length) {
  16629. var codePoint = Number(arguments[index]);
  16630. if (!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
  16631. codePoint < 0 || // not a valid Unicode code point
  16632. codePoint > 0x10FFFF || // not a valid Unicode code point
  16633. floor(codePoint) != codePoint // not an integer
  16634. ) {
  16635. throw RangeError('Invalid code point: ' + codePoint);
  16636. }
  16637. if (codePoint <= 0xFFFF) {
  16638. // BMP code point
  16639. codeUnits.push(codePoint);
  16640. } else {
  16641. // Astral code point; split in surrogate halves
  16642. // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  16643. codePoint -= 0x10000;
  16644. highSurrogate = (codePoint >> 10) + 0xD800;
  16645. lowSurrogate = codePoint % 0x400 + 0xDC00;
  16646. codeUnits.push(highSurrogate, lowSurrogate);
  16647. }
  16648. if (index + 1 == length || codeUnits.length > MAX_SIZE) {
  16649. result += stringFromCharCode.apply(null, codeUnits);
  16650. codeUnits.length = 0;
  16651. }
  16652. }
  16653. return result;
  16654. }
  16655. function assertType(type, expected) {
  16656. if (expected.indexOf('|') == -1) {
  16657. if (type == expected) {
  16658. return;
  16659. }
  16660. throw Error('Invalid node type: ' + type);
  16661. }
  16662. expected = assertType.hasOwnProperty(expected) ? assertType[expected] : assertType[expected] = RegExp('^(?:' + expected + ')$');
  16663. if (expected.test(type)) {
  16664. return;
  16665. }
  16666. throw Error('Invalid node type: ' + type);
  16667. }
  16668. /*--------------------------------------------------------------------------*/
  16669. function generate(node) {
  16670. var type = node.type;
  16671. if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') {
  16672. return generate[type](node);
  16673. }
  16674. throw Error('Invalid node type: ' + type);
  16675. }
  16676. /*--------------------------------------------------------------------------*/
  16677. function generateAlternative(node) {
  16678. assertType(node.type, 'alternative');
  16679. var terms = node.body,
  16680. length = terms ? terms.length : 0;
  16681. if (length == 1) {
  16682. return generateTerm(terms[0]);
  16683. } else {
  16684. var i = -1,
  16685. result = '';
  16686. while (++i < length) {
  16687. result += generateTerm(terms[i]);
  16688. }
  16689. return result;
  16690. }
  16691. }
  16692. function generateAnchor(node) {
  16693. assertType(node.type, 'anchor');
  16694. switch (node.kind) {
  16695. case 'start':
  16696. return '^';
  16697. case 'end':
  16698. return '$';
  16699. case 'boundary':
  16700. return '\\b';
  16701. case 'not-boundary':
  16702. return '\\B';
  16703. default:
  16704. throw Error('Invalid assertion');
  16705. }
  16706. }
  16707. function generateAtom(node) {
  16708. assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value');
  16709. return generate(node);
  16710. }
  16711. function generateCharacterClass(node) {
  16712. assertType(node.type, 'characterClass');
  16713. var classRanges = node.body,
  16714. length = classRanges ? classRanges.length : 0;
  16715. var i = -1,
  16716. result = '[';
  16717. if (node.negative) {
  16718. result += '^';
  16719. }
  16720. while (++i < length) {
  16721. result += generateClassAtom(classRanges[i]);
  16722. }
  16723. result += ']';
  16724. return result;
  16725. }
  16726. function generateCharacterClassEscape(node) {
  16727. assertType(node.type, 'characterClassEscape');
  16728. return '\\' + node.value;
  16729. }
  16730. function generateCharacterClassRange(node) {
  16731. assertType(node.type, 'characterClassRange');
  16732. var min = node.min,
  16733. max = node.max;
  16734. if (min.type == 'characterClassRange' || max.type == 'characterClassRange') {
  16735. throw Error('Invalid character class range');
  16736. }
  16737. return generateClassAtom(min) + '-' + generateClassAtom(max);
  16738. }
  16739. function generateClassAtom(node) {
  16740. assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value');
  16741. return generate(node);
  16742. }
  16743. function generateDisjunction(node) {
  16744. assertType(node.type, 'disjunction');
  16745. var body = node.body,
  16746. length = body ? body.length : 0;
  16747. if (length == 0) {
  16748. throw Error('No body');
  16749. } else if (length == 1) {
  16750. return generate(body[0]);
  16751. } else {
  16752. var i = -1,
  16753. result = '';
  16754. while (++i < length) {
  16755. if (i != 0) {
  16756. result += '|';
  16757. }
  16758. result += generate(body[i]);
  16759. }
  16760. return result;
  16761. }
  16762. }
  16763. function generateDot(node) {
  16764. assertType(node.type, 'dot');
  16765. return '.';
  16766. }
  16767. function generateGroup(node) {
  16768. assertType(node.type, 'group');
  16769. var result = '(';
  16770. switch (node.behavior) {
  16771. case 'normal':
  16772. break;
  16773. case 'ignore':
  16774. result += '?:';
  16775. break;
  16776. case 'lookahead':
  16777. result += '?=';
  16778. break;
  16779. case 'negativeLookahead':
  16780. result += '?!';
  16781. break;
  16782. default:
  16783. throw Error('Invalid behaviour: ' + node.behaviour);
  16784. }
  16785. var body = node.body,
  16786. length = body ? body.length : 0;
  16787. if (length == 1) {
  16788. result += generate(body[0]);
  16789. } else {
  16790. var i = -1;
  16791. while (++i < length) {
  16792. result += generate(body[i]);
  16793. }
  16794. }
  16795. result += ')';
  16796. return result;
  16797. }
  16798. function generateQuantifier(node) {
  16799. assertType(node.type, 'quantifier');
  16800. var quantifier = '',
  16801. min = node.min,
  16802. max = node.max;
  16803. switch (max) {
  16804. case undefined:
  16805. case null:
  16806. switch (min) {
  16807. case 0:
  16808. quantifier = '*';
  16809. break;
  16810. case 1:
  16811. quantifier = '+';
  16812. break;
  16813. default:
  16814. quantifier = '{' + min + ',}';
  16815. break;
  16816. }
  16817. break;
  16818. default:
  16819. if (min == max) {
  16820. quantifier = '{' + min + '}';
  16821. } else if (min == 0 && max == 1) {
  16822. quantifier = '?';
  16823. } else {
  16824. quantifier = '{' + min + ',' + max + '}';
  16825. }
  16826. break;
  16827. }
  16828. if (!node.greedy) {
  16829. quantifier += '?';
  16830. }
  16831. return generateAtom(node.body[0]) + quantifier;
  16832. }
  16833. function generateReference(node) {
  16834. assertType(node.type, 'reference');
  16835. return '\\' + node.matchIndex;
  16836. }
  16837. function generateTerm(node) {
  16838. assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value');
  16839. return generate(node);
  16840. }
  16841. function generateValue(node) {
  16842. assertType(node.type, 'value');
  16843. var kind = node.kind,
  16844. codePoint = node.codePoint;
  16845. switch (kind) {
  16846. case 'controlLetter':
  16847. return '\\c' + fromCodePoint(codePoint + 64);
  16848. case 'hexadecimalEscape':
  16849. return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2);
  16850. case 'identifier':
  16851. return '\\' + fromCodePoint(codePoint);
  16852. case 'null':
  16853. return '\\' + codePoint;
  16854. case 'octal':
  16855. return '\\' + codePoint.toString(8);
  16856. case 'singleEscape':
  16857. switch (codePoint) {
  16858. case 0x0008:
  16859. return '\\b';
  16860. case 0x009:
  16861. return '\\t';
  16862. case 0x00A:
  16863. return '\\n';
  16864. case 0x00B:
  16865. return '\\v';
  16866. case 0x00C:
  16867. return '\\f';
  16868. case 0x00D:
  16869. return '\\r';
  16870. default:
  16871. throw Error('Invalid codepoint: ' + codePoint);
  16872. }
  16873. case 'symbol':
  16874. return fromCodePoint(codePoint);
  16875. case 'unicodeEscape':
  16876. return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4);
  16877. case 'unicodeCodePointEscape':
  16878. return '\\u{' + codePoint.toString(16).toUpperCase() + '}';
  16879. default:
  16880. throw Error('Unsupported node kind: ' + kind);
  16881. }
  16882. }
  16883. /*--------------------------------------------------------------------------*/
  16884. generate.alternative = generateAlternative;
  16885. generate.anchor = generateAnchor;
  16886. generate.characterClass = generateCharacterClass;
  16887. generate.characterClassEscape = generateCharacterClassEscape;
  16888. generate.characterClassRange = generateCharacterClassRange;
  16889. generate.disjunction = generateDisjunction;
  16890. generate.dot = generateDot;
  16891. generate.group = generateGroup;
  16892. generate.quantifier = generateQuantifier;
  16893. generate.reference = generateReference;
  16894. generate.value = generateValue;
  16895. /*--------------------------------------------------------------------------*/
  16896. // export regjsgen
  16897. // some AMD build optimizers, like r.js, check for condition patterns like the following:
  16898. if ('function' == 'function' && 'object' == 'object' && true) {
  16899. // define as an anonymous module so, through path mapping, it can be aliased
  16900. $__System.registerDynamic('11f', [], false, function ($__require, $__exports, $__module) {
  16901. return (function () {
  16902. return {
  16903. 'generate': generate
  16904. };
  16905. }).call(this);
  16906. });
  16907. }
  16908. // check for `exports` after `define` in case a build optimizer adds an `exports` object
  16909. else if (freeExports && freeModule) {
  16910. // in Narwhal, Node.js, Rhino -require, or RingoJS
  16911. freeExports.generate = generate;
  16912. }
  16913. // in a browser or Rhino
  16914. else {
  16915. root.regjsgen = {
  16916. 'generate': generate
  16917. };
  16918. }
  16919. }).call(this);
  16920. $__System.registerDynamic('120', [], true, function ($__require, exports, module) {
  16921. var global = this || self,
  16922. GLOBAL = global;
  16923. // regjsparser
  16924. //
  16925. // ==================================================================
  16926. //
  16927. // See ECMA-262 Standard: 15.10.1
  16928. //
  16929. // NOTE: The ECMA-262 standard uses the term "Assertion" for /^/. Here the
  16930. // term "Anchor" is used.
  16931. //
  16932. // Pattern ::
  16933. // Disjunction
  16934. //
  16935. // Disjunction ::
  16936. // Alternative
  16937. // Alternative | Disjunction
  16938. //
  16939. // Alternative ::
  16940. // [empty]
  16941. // Alternative Term
  16942. //
  16943. // Term ::
  16944. // Anchor
  16945. // Atom
  16946. // Atom Quantifier
  16947. //
  16948. // Anchor ::
  16949. // ^
  16950. // $
  16951. // \ b
  16952. // \ B
  16953. // ( ? = Disjunction )
  16954. // ( ? ! Disjunction )
  16955. //
  16956. // Quantifier ::
  16957. // QuantifierPrefix
  16958. // QuantifierPrefix ?
  16959. //
  16960. // QuantifierPrefix ::
  16961. // *
  16962. // +
  16963. // ?
  16964. // { DecimalDigits }
  16965. // { DecimalDigits , }
  16966. // { DecimalDigits , DecimalDigits }
  16967. //
  16968. // Atom ::
  16969. // PatternCharacter
  16970. // .
  16971. // \ AtomEscape
  16972. // CharacterClass
  16973. // ( Disjunction )
  16974. // ( ? : Disjunction )
  16975. //
  16976. // PatternCharacter ::
  16977. // SourceCharacter but not any of: ^ $ \ . * + ? ( ) [ ] { } |
  16978. //
  16979. // AtomEscape ::
  16980. // DecimalEscape
  16981. // CharacterEscape
  16982. // CharacterClassEscape
  16983. //
  16984. // CharacterEscape[U] ::
  16985. // ControlEscape
  16986. // c ControlLetter
  16987. // HexEscapeSequence
  16988. // RegExpUnicodeEscapeSequence[?U] (ES6)
  16989. // IdentityEscape[?U]
  16990. //
  16991. // ControlEscape ::
  16992. // one of f n r t v
  16993. // ControlLetter ::
  16994. // one of
  16995. // a b c d e f g h i j k l m n o p q r s t u v w x y z
  16996. // A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  16997. //
  16998. // IdentityEscape ::
  16999. // SourceCharacter but not IdentifierPart
  17000. // <ZWJ>
  17001. // <ZWNJ>
  17002. //
  17003. // DecimalEscape ::
  17004. // DecimalIntegerLiteral [lookahead ∉ DecimalDigit]
  17005. //
  17006. // CharacterClassEscape ::
  17007. // one of d D s S w W
  17008. //
  17009. // CharacterClass ::
  17010. // [ [lookahead ∉ {^}] ClassRanges ]
  17011. // [ ^ ClassRanges ]
  17012. //
  17013. // ClassRanges ::
  17014. // [empty]
  17015. // NonemptyClassRanges
  17016. //
  17017. // NonemptyClassRanges ::
  17018. // ClassAtom
  17019. // ClassAtom NonemptyClassRangesNoDash
  17020. // ClassAtom - ClassAtom ClassRanges
  17021. //
  17022. // NonemptyClassRangesNoDash ::
  17023. // ClassAtom
  17024. // ClassAtomNoDash NonemptyClassRangesNoDash
  17025. // ClassAtomNoDash - ClassAtom ClassRanges
  17026. //
  17027. // ClassAtom ::
  17028. // -
  17029. // ClassAtomNoDash
  17030. //
  17031. // ClassAtomNoDash ::
  17032. // SourceCharacter but not one of \ or ] or -
  17033. // \ ClassEscape
  17034. //
  17035. // ClassEscape ::
  17036. // DecimalEscape
  17037. // b
  17038. // CharacterEscape
  17039. // CharacterClassEscape
  17040. (function () {
  17041. function parse(str, flags) {
  17042. function addRaw(node) {
  17043. node.raw = str.substring(node.range[0], node.range[1]);
  17044. return node;
  17045. }
  17046. function updateRawStart(node, start) {
  17047. node.range[0] = start;
  17048. return addRaw(node);
  17049. }
  17050. function createAnchor(kind, rawLength) {
  17051. return addRaw({
  17052. type: 'anchor',
  17053. kind: kind,
  17054. range: [pos - rawLength, pos]
  17055. });
  17056. }
  17057. function createValue(kind, codePoint, from, to) {
  17058. return addRaw({
  17059. type: 'value',
  17060. kind: kind,
  17061. codePoint: codePoint,
  17062. range: [from, to]
  17063. });
  17064. }
  17065. function createEscaped(kind, codePoint, value, fromOffset) {
  17066. fromOffset = fromOffset || 0;
  17067. return createValue(kind, codePoint, pos - (value.length + fromOffset), pos);
  17068. }
  17069. function createCharacter(matches) {
  17070. var _char = matches[0];
  17071. var first = _char.charCodeAt(0);
  17072. if (hasUnicodeFlag) {
  17073. var second;
  17074. if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) {
  17075. second = lookahead().charCodeAt(0);
  17076. if (second >= 0xDC00 && second <= 0xDFFF) {
  17077. // Unicode surrogate pair
  17078. pos++;
  17079. return createValue('symbol', (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, pos - 2, pos);
  17080. }
  17081. }
  17082. }
  17083. return createValue('symbol', first, pos - 1, pos);
  17084. }
  17085. function createDisjunction(alternatives, from, to) {
  17086. return addRaw({
  17087. type: 'disjunction',
  17088. body: alternatives,
  17089. range: [from, to]
  17090. });
  17091. }
  17092. function createDot() {
  17093. return addRaw({
  17094. type: 'dot',
  17095. range: [pos - 1, pos]
  17096. });
  17097. }
  17098. function createCharacterClassEscape(value) {
  17099. return addRaw({
  17100. type: 'characterClassEscape',
  17101. value: value,
  17102. range: [pos - 2, pos]
  17103. });
  17104. }
  17105. function createReference(matchIndex) {
  17106. return addRaw({
  17107. type: 'reference',
  17108. matchIndex: parseInt(matchIndex, 10),
  17109. range: [pos - 1 - matchIndex.length, pos]
  17110. });
  17111. }
  17112. function createGroup(behavior, disjunction, from, to) {
  17113. return addRaw({
  17114. type: 'group',
  17115. behavior: behavior,
  17116. body: disjunction,
  17117. range: [from, to]
  17118. });
  17119. }
  17120. function createQuantifier(min, max, from, to) {
  17121. if (to == null) {
  17122. from = pos - 1;
  17123. to = pos;
  17124. }
  17125. return addRaw({
  17126. type: 'quantifier',
  17127. min: min,
  17128. max: max,
  17129. greedy: true,
  17130. body: null, // set later on
  17131. range: [from, to]
  17132. });
  17133. }
  17134. function createAlternative(terms, from, to) {
  17135. return addRaw({
  17136. type: 'alternative',
  17137. body: terms,
  17138. range: [from, to]
  17139. });
  17140. }
  17141. function createCharacterClass(classRanges, negative, from, to) {
  17142. return addRaw({
  17143. type: 'characterClass',
  17144. body: classRanges,
  17145. negative: negative,
  17146. range: [from, to]
  17147. });
  17148. }
  17149. function createClassRange(min, max, from, to) {
  17150. // See 15.10.2.15:
  17151. if (min.codePoint > max.codePoint) {
  17152. bail('invalid range in character class', min.raw + '-' + max.raw, from, to);
  17153. }
  17154. return addRaw({
  17155. type: 'characterClassRange',
  17156. min: min,
  17157. max: max,
  17158. range: [from, to]
  17159. });
  17160. }
  17161. function flattenBody(body) {
  17162. if (body.type === 'alternative') {
  17163. return body.body;
  17164. } else {
  17165. return [body];
  17166. }
  17167. }
  17168. function isEmpty(obj) {
  17169. return obj.type === 'empty';
  17170. }
  17171. function incr(amount) {
  17172. amount = amount || 1;
  17173. var res = str.substring(pos, pos + amount);
  17174. pos += amount || 1;
  17175. return res;
  17176. }
  17177. function skip(value) {
  17178. if (!match(value)) {
  17179. bail('character', value);
  17180. }
  17181. }
  17182. function match(value) {
  17183. if (str.indexOf(value, pos) === pos) {
  17184. return incr(value.length);
  17185. }
  17186. }
  17187. function lookahead() {
  17188. return str[pos];
  17189. }
  17190. function current(value) {
  17191. return str.indexOf(value, pos) === pos;
  17192. }
  17193. function next(value) {
  17194. return str[pos + 1] === value;
  17195. }
  17196. function matchReg(regExp) {
  17197. var subStr = str.substring(pos);
  17198. var res = subStr.match(regExp);
  17199. if (res) {
  17200. res.range = [];
  17201. res.range[0] = pos;
  17202. incr(res[0].length);
  17203. res.range[1] = pos;
  17204. }
  17205. return res;
  17206. }
  17207. function parseDisjunction() {
  17208. // Disjunction ::
  17209. // Alternative
  17210. // Alternative | Disjunction
  17211. var res = [],
  17212. from = pos;
  17213. res.push(parseAlternative());
  17214. while (match('|')) {
  17215. res.push(parseAlternative());
  17216. }
  17217. if (res.length === 1) {
  17218. return res[0];
  17219. }
  17220. return createDisjunction(res, from, pos);
  17221. }
  17222. function parseAlternative() {
  17223. var res = [],
  17224. from = pos;
  17225. var term;
  17226. // Alternative ::
  17227. // [empty]
  17228. // Alternative Term
  17229. while (term = parseTerm()) {
  17230. res.push(term);
  17231. }
  17232. if (res.length === 1) {
  17233. return res[0];
  17234. }
  17235. return createAlternative(res, from, pos);
  17236. }
  17237. function parseTerm() {
  17238. // Term ::
  17239. // Anchor
  17240. // Atom
  17241. // Atom Quantifier
  17242. if (pos >= str.length || current('|') || current(')')) {
  17243. return null; /* Means: The term is empty */
  17244. }
  17245. var anchor = parseAnchor();
  17246. if (anchor) {
  17247. return anchor;
  17248. }
  17249. var atom = parseAtom();
  17250. if (!atom) {
  17251. bail('Expected atom');
  17252. }
  17253. var quantifier = parseQuantifier() || false;
  17254. if (quantifier) {
  17255. quantifier.body = flattenBody(atom);
  17256. // The quantifier contains the atom. Therefore, the beginning of the
  17257. // quantifier range is given by the beginning of the atom.
  17258. updateRawStart(quantifier, atom.range[0]);
  17259. return quantifier;
  17260. }
  17261. return atom;
  17262. }
  17263. function parseGroup(matchA, typeA, matchB, typeB) {
  17264. var type = null,
  17265. from = pos;
  17266. if (match(matchA)) {
  17267. type = typeA;
  17268. } else if (match(matchB)) {
  17269. type = typeB;
  17270. } else {
  17271. return false;
  17272. }
  17273. var body = parseDisjunction();
  17274. if (!body) {
  17275. bail('Expected disjunction');
  17276. }
  17277. skip(')');
  17278. var group = createGroup(type, flattenBody(body), from, pos);
  17279. if (type == 'normal') {
  17280. // Keep track of the number of closed groups. This is required for
  17281. // parseDecimalEscape(). In case the string is parsed a second time the
  17282. // value already holds the total count and no incrementation is required.
  17283. if (firstIteration) {
  17284. closedCaptureCounter++;
  17285. }
  17286. }
  17287. return group;
  17288. }
  17289. function parseAnchor() {
  17290. // Anchor ::
  17291. // ^
  17292. // $
  17293. // \ b
  17294. // \ B
  17295. // ( ? = Disjunction )
  17296. // ( ? ! Disjunction )
  17297. var res,
  17298. from = pos;
  17299. if (match('^')) {
  17300. return createAnchor('start', 1 /* rawLength */);
  17301. } else if (match('$')) {
  17302. return createAnchor('end', 1 /* rawLength */);
  17303. } else if (match('\\b')) {
  17304. return createAnchor('boundary', 2 /* rawLength */);
  17305. } else if (match('\\B')) {
  17306. return createAnchor('not-boundary', 2 /* rawLength */);
  17307. } else {
  17308. return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead');
  17309. }
  17310. }
  17311. function parseQuantifier() {
  17312. // Quantifier ::
  17313. // QuantifierPrefix
  17314. // QuantifierPrefix ?
  17315. //
  17316. // QuantifierPrefix ::
  17317. // *
  17318. // +
  17319. // ?
  17320. // { DecimalDigits }
  17321. // { DecimalDigits , }
  17322. // { DecimalDigits , DecimalDigits }
  17323. var res,
  17324. from = pos;
  17325. var quantifier;
  17326. var min, max;
  17327. if (match('*')) {
  17328. quantifier = createQuantifier(0);
  17329. } else if (match('+')) {
  17330. quantifier = createQuantifier(1);
  17331. } else if (match('?')) {
  17332. quantifier = createQuantifier(0, 1);
  17333. } else if (res = matchReg(/^\{([0-9]+)\}/)) {
  17334. min = parseInt(res[1], 10);
  17335. quantifier = createQuantifier(min, min, res.range[0], res.range[1]);
  17336. } else if (res = matchReg(/^\{([0-9]+),\}/)) {
  17337. min = parseInt(res[1], 10);
  17338. quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]);
  17339. } else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) {
  17340. min = parseInt(res[1], 10);
  17341. max = parseInt(res[2], 10);
  17342. if (min > max) {
  17343. bail('numbers out of order in {} quantifier', '', from, pos);
  17344. }
  17345. quantifier = createQuantifier(min, max, res.range[0], res.range[1]);
  17346. }
  17347. if (quantifier) {
  17348. if (match('?')) {
  17349. quantifier.greedy = false;
  17350. quantifier.range[1] += 1;
  17351. }
  17352. }
  17353. return quantifier;
  17354. }
  17355. function parseAtom() {
  17356. // Atom ::
  17357. // PatternCharacter
  17358. // .
  17359. // \ AtomEscape
  17360. // CharacterClass
  17361. // ( Disjunction )
  17362. // ( ? : Disjunction )
  17363. var res;
  17364. // jviereck: allow ']', '}' here as well to be compatible with browser's
  17365. // implementations: ']'.match(/]/);
  17366. // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) {
  17367. if (res = matchReg(/^[^^$\\.*+?(){[|]/)) {
  17368. // PatternCharacter
  17369. return createCharacter(res);
  17370. } else if (match('.')) {
  17371. // .
  17372. return createDot();
  17373. } else if (match('\\')) {
  17374. // \ AtomEscape
  17375. res = parseAtomEscape();
  17376. if (!res) {
  17377. bail('atomEscape');
  17378. }
  17379. return res;
  17380. } else if (res = parseCharacterClass()) {
  17381. return res;
  17382. } else {
  17383. // ( Disjunction )
  17384. // ( ? : Disjunction )
  17385. return parseGroup('(?:', 'ignore', '(', 'normal');
  17386. }
  17387. }
  17388. function parseUnicodeSurrogatePairEscape(firstEscape) {
  17389. if (hasUnicodeFlag) {
  17390. var first, second;
  17391. if (firstEscape.kind == 'unicodeEscape' && (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && current('\\') && next('u')) {
  17392. var prevPos = pos;
  17393. pos++;
  17394. var secondEscape = parseClassEscape();
  17395. if (secondEscape.kind == 'unicodeEscape' && (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) {
  17396. // Unicode surrogate pair
  17397. firstEscape.range[1] = secondEscape.range[1];
  17398. firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  17399. firstEscape.type = 'value';
  17400. firstEscape.kind = 'unicodeCodePointEscape';
  17401. addRaw(firstEscape);
  17402. } else {
  17403. pos = prevPos;
  17404. }
  17405. }
  17406. }
  17407. return firstEscape;
  17408. }
  17409. function parseClassEscape() {
  17410. return parseAtomEscape(true);
  17411. }
  17412. function parseAtomEscape(insideCharacterClass) {
  17413. // AtomEscape ::
  17414. // DecimalEscape
  17415. // CharacterEscape
  17416. // CharacterClassEscape
  17417. var res,
  17418. from = pos;
  17419. res = parseDecimalEscape();
  17420. if (res) {
  17421. return res;
  17422. }
  17423. // For ClassEscape
  17424. if (insideCharacterClass) {
  17425. if (match('b')) {
  17426. // 15.10.2.19
  17427. // The production ClassEscape :: b evaluates by returning the
  17428. // CharSet containing the one character <BS> (Unicode value 0008).
  17429. return createEscaped('singleEscape', 0x0008, '\\b');
  17430. } else if (match('B')) {
  17431. bail('\\B not possible inside of CharacterClass', '', from);
  17432. }
  17433. }
  17434. res = parseCharacterEscape();
  17435. return res;
  17436. }
  17437. function parseDecimalEscape() {
  17438. // DecimalEscape ::
  17439. // DecimalIntegerLiteral [lookahead ∉ DecimalDigit]
  17440. // CharacterClassEscape :: one of d D s S w W
  17441. var res, match;
  17442. if (res = matchReg(/^(?!0)\d+/)) {
  17443. match = res[0];
  17444. var refIdx = parseInt(res[0], 10);
  17445. if (refIdx <= closedCaptureCounter) {
  17446. // If the number is smaller than the normal-groups found so
  17447. // far, then it is a reference...
  17448. return createReference(res[0]);
  17449. } else {
  17450. // ... otherwise it needs to be interpreted as a octal (if the
  17451. // number is in an octal format). If it is NOT octal format,
  17452. // then the slash is ignored and the number is matched later
  17453. // as normal characters.
  17454. // Recall the negative decision to decide if the input must be parsed
  17455. // a second time with the total normal-groups.
  17456. backrefDenied.push(refIdx);
  17457. // Reset the position again, as maybe only parts of the previous
  17458. // matched numbers are actual octal numbers. E.g. in '019' only
  17459. // the '01' should be matched.
  17460. incr(-res[0].length);
  17461. if (res = matchReg(/^[0-7]{1,3}/)) {
  17462. return createEscaped('octal', parseInt(res[0], 8), res[0], 1);
  17463. } else {
  17464. // If we end up here, we have a case like /\91/. Then the
  17465. // first slash is to be ignored and the 9 & 1 to be treated
  17466. // like ordinary characters. Create a character for the
  17467. // first number only here - other number-characters
  17468. // (if available) will be matched later.
  17469. res = createCharacter(matchReg(/^[89]/));
  17470. return updateRawStart(res, res.range[0] - 1);
  17471. }
  17472. }
  17473. }
  17474. // Only allow octal numbers in the following. All matched numbers start
  17475. // with a zero (if the do not, the previous if-branch is executed).
  17476. // If the number is not octal format and starts with zero (e.g. `091`)
  17477. // then only the zeros `0` is treated here and the `91` are ordinary
  17478. // characters.
  17479. // Example:
  17480. // /\091/.exec('\091')[0].length === 3
  17481. else if (res = matchReg(/^[0-7]{1,3}/)) {
  17482. match = res[0];
  17483. if (/^0{1,3}$/.test(match)) {
  17484. // If they are all zeros, then only take the first one.
  17485. return createEscaped('null', 0x0000, '0', match.length + 1);
  17486. } else {
  17487. return createEscaped('octal', parseInt(match, 8), match, 1);
  17488. }
  17489. } else if (res = matchReg(/^[dDsSwW]/)) {
  17490. return createCharacterClassEscape(res[0]);
  17491. }
  17492. return false;
  17493. }
  17494. function parseCharacterEscape() {
  17495. // CharacterEscape ::
  17496. // ControlEscape
  17497. // c ControlLetter
  17498. // HexEscapeSequence
  17499. // UnicodeEscapeSequence
  17500. // IdentityEscape
  17501. var res;
  17502. if (res = matchReg(/^[fnrtv]/)) {
  17503. // ControlEscape
  17504. var codePoint = 0;
  17505. switch (res[0]) {
  17506. case 't':
  17507. codePoint = 0x009;break;
  17508. case 'n':
  17509. codePoint = 0x00A;break;
  17510. case 'v':
  17511. codePoint = 0x00B;break;
  17512. case 'f':
  17513. codePoint = 0x00C;break;
  17514. case 'r':
  17515. codePoint = 0x00D;break;
  17516. }
  17517. return createEscaped('singleEscape', codePoint, '\\' + res[0]);
  17518. } else if (res = matchReg(/^c([a-zA-Z])/)) {
  17519. // c ControlLetter
  17520. return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2);
  17521. } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) {
  17522. // HexEscapeSequence
  17523. return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2);
  17524. } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) {
  17525. // UnicodeEscapeSequence
  17526. return parseUnicodeSurrogatePairEscape(createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2));
  17527. } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) {
  17528. // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape)
  17529. return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4);
  17530. } else {
  17531. // IdentityEscape
  17532. return parseIdentityEscape();
  17533. }
  17534. }
  17535. // Taken from the Esprima parser.
  17536. function isIdentifierPart(ch) {
  17537. // Generated by `tools/generate-identifier-regex.js`.
  17538. var NonAsciiIdentifierPart = new RegExp('[\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\u08A0-\u08B2\u08E4-\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\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\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\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\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\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\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-\u13F4\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\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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]');
  17539. return ch === 36 || ch === 95 || // $ (dollar) and _ (underscore)
  17540. ch >= 65 && ch <= 90 || // A..Z
  17541. ch >= 97 && ch <= 122 || // a..z
  17542. ch >= 48 && ch <= 57 || // 0..9
  17543. ch === 92 || // \ (backslash)
  17544. ch >= 0x80 && NonAsciiIdentifierPart.test(String.fromCharCode(ch));
  17545. }
  17546. function parseIdentityEscape() {
  17547. // IdentityEscape ::
  17548. // SourceCharacter but not IdentifierPart
  17549. // <ZWJ>
  17550. // <ZWNJ>
  17551. var ZWJ = '\u200C';
  17552. var ZWNJ = '\u200D';
  17553. var tmp;
  17554. if (!isIdentifierPart(lookahead())) {
  17555. tmp = incr();
  17556. return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1);
  17557. }
  17558. if (match(ZWJ)) {
  17559. // <ZWJ>
  17560. return createEscaped('identifier', 0x200C, ZWJ);
  17561. } else if (match(ZWNJ)) {
  17562. // <ZWNJ>
  17563. return createEscaped('identifier', 0x200D, ZWNJ);
  17564. }
  17565. return null;
  17566. }
  17567. function parseCharacterClass() {
  17568. // CharacterClass ::
  17569. // [ [lookahead ∉ {^}] ClassRanges ]
  17570. // [ ^ ClassRanges ]
  17571. var res,
  17572. from = pos;
  17573. if (res = matchReg(/^\[\^/)) {
  17574. res = parseClassRanges();
  17575. skip(']');
  17576. return createCharacterClass(res, true, from, pos);
  17577. } else if (match('[')) {
  17578. res = parseClassRanges();
  17579. skip(']');
  17580. return createCharacterClass(res, false, from, pos);
  17581. }
  17582. return null;
  17583. }
  17584. function parseClassRanges() {
  17585. // ClassRanges ::
  17586. // [empty]
  17587. // NonemptyClassRanges
  17588. var res;
  17589. if (current(']')) {
  17590. // Empty array means nothing insinde of the ClassRange.
  17591. return [];
  17592. } else {
  17593. res = parseNonemptyClassRanges();
  17594. if (!res) {
  17595. bail('nonEmptyClassRanges');
  17596. }
  17597. return res;
  17598. }
  17599. }
  17600. function parseHelperClassRanges(atom) {
  17601. var from, to, res;
  17602. if (current('-') && !next(']')) {
  17603. // ClassAtom - ClassAtom ClassRanges
  17604. skip('-');
  17605. res = parseClassAtom();
  17606. if (!res) {
  17607. bail('classAtom');
  17608. }
  17609. to = pos;
  17610. var classRanges = parseClassRanges();
  17611. if (!classRanges) {
  17612. bail('classRanges');
  17613. }
  17614. from = atom.range[0];
  17615. if (classRanges.type === 'empty') {
  17616. return [createClassRange(atom, res, from, to)];
  17617. }
  17618. return [createClassRange(atom, res, from, to)].concat(classRanges);
  17619. }
  17620. res = parseNonemptyClassRangesNoDash();
  17621. if (!res) {
  17622. bail('nonEmptyClassRangesNoDash');
  17623. }
  17624. return [atom].concat(res);
  17625. }
  17626. function parseNonemptyClassRanges() {
  17627. // NonemptyClassRanges ::
  17628. // ClassAtom
  17629. // ClassAtom NonemptyClassRangesNoDash
  17630. // ClassAtom - ClassAtom ClassRanges
  17631. var atom = parseClassAtom();
  17632. if (!atom) {
  17633. bail('classAtom');
  17634. }
  17635. if (current(']')) {
  17636. // ClassAtom
  17637. return [atom];
  17638. }
  17639. // ClassAtom NonemptyClassRangesNoDash
  17640. // ClassAtom - ClassAtom ClassRanges
  17641. return parseHelperClassRanges(atom);
  17642. }
  17643. function parseNonemptyClassRangesNoDash() {
  17644. // NonemptyClassRangesNoDash ::
  17645. // ClassAtom
  17646. // ClassAtomNoDash NonemptyClassRangesNoDash
  17647. // ClassAtomNoDash - ClassAtom ClassRanges
  17648. var res = parseClassAtom();
  17649. if (!res) {
  17650. bail('classAtom');
  17651. }
  17652. if (current(']')) {
  17653. // ClassAtom
  17654. return res;
  17655. }
  17656. // ClassAtomNoDash NonemptyClassRangesNoDash
  17657. // ClassAtomNoDash - ClassAtom ClassRanges
  17658. return parseHelperClassRanges(res);
  17659. }
  17660. function parseClassAtom() {
  17661. // ClassAtom ::
  17662. // -
  17663. // ClassAtomNoDash
  17664. if (match('-')) {
  17665. return createCharacter('-');
  17666. } else {
  17667. return parseClassAtomNoDash();
  17668. }
  17669. }
  17670. function parseClassAtomNoDash() {
  17671. // ClassAtomNoDash ::
  17672. // SourceCharacter but not one of \ or ] or -
  17673. // \ ClassEscape
  17674. var res;
  17675. if (res = matchReg(/^[^\\\]-]/)) {
  17676. return createCharacter(res[0]);
  17677. } else if (match('\\')) {
  17678. res = parseClassEscape();
  17679. if (!res) {
  17680. bail('classEscape');
  17681. }
  17682. return parseUnicodeSurrogatePairEscape(res);
  17683. }
  17684. }
  17685. function bail(message, details, from, to) {
  17686. from = from == null ? pos : from;
  17687. to = to == null ? from : to;
  17688. var contextStart = Math.max(0, from - 10);
  17689. var contextEnd = Math.min(to + 10, str.length);
  17690. // Output a bit of context and a line pointing to where our error is.
  17691. //
  17692. // We are assuming that there are no actual newlines in the content as this is a regular expression.
  17693. var context = ' ' + str.substring(contextStart, contextEnd);
  17694. var pointer = ' ' + new Array(from - contextStart + 1).join(' ') + '^';
  17695. throw SyntaxError(message + ' at position ' + from + (details ? ': ' + details : '') + '\n' + context + '\n' + pointer);
  17696. }
  17697. var backrefDenied = [];
  17698. var closedCaptureCounter = 0;
  17699. var firstIteration = true;
  17700. var hasUnicodeFlag = (flags || "").indexOf("u") !== -1;
  17701. var pos = 0;
  17702. // Convert the input to a string and treat the empty string special.
  17703. str = String(str);
  17704. if (str === '') {
  17705. str = '(?:)';
  17706. }
  17707. var result = parseDisjunction();
  17708. if (result.range[1] !== str.length) {
  17709. bail('Could not parse entire input - got stuck', '', result.range[1]);
  17710. }
  17711. // The spec requires to interpret the `\2` in `/\2()()/` as backreference.
  17712. // As the parser collects the number of capture groups as the string is
  17713. // parsed it is impossible to make these decisions at the point when the
  17714. // `\2` is handled. In case the local decision turns out to be wrong after
  17715. // the parsing has finished, the input string is parsed a second time with
  17716. // the total number of capture groups set.
  17717. //
  17718. // SEE: https://github.com/jviereck/regjsparser/issues/70
  17719. for (var i = 0; i < backrefDenied.length; i++) {
  17720. if (backrefDenied[i] <= closedCaptureCounter) {
  17721. // Parse the input a second time.
  17722. pos = 0;
  17723. firstIteration = false;
  17724. return parseDisjunction();
  17725. }
  17726. }
  17727. return result;
  17728. }
  17729. var regjsparser = {
  17730. parse: parse
  17731. };
  17732. if (typeof module !== 'undefined' && module.exports) {
  17733. module.exports = regjsparser;
  17734. } else {
  17735. window.regjsparser = regjsparser;
  17736. }
  17737. })();
  17738. });
  17739. $__System.registerDynamic("121", [], true, function() {
  17740. return {
  17741. "75": 8490,
  17742. "83": 383,
  17743. "107": 8490,
  17744. "115": 383,
  17745. "181": 924,
  17746. "197": 8491,
  17747. "383": 83,
  17748. "452": 453,
  17749. "453": 452,
  17750. "455": 456,
  17751. "456": 455,
  17752. "458": 459,
  17753. "459": 458,
  17754. "497": 498,
  17755. "498": 497,
  17756. "837": 8126,
  17757. "914": 976,
  17758. "917": 1013,
  17759. "920": 1012,
  17760. "921": 8126,
  17761. "922": 1008,
  17762. "924": 181,
  17763. "928": 982,
  17764. "929": 1009,
  17765. "931": 962,
  17766. "934": 981,
  17767. "937": 8486,
  17768. "962": 931,
  17769. "976": 914,
  17770. "977": 1012,
  17771. "981": 934,
  17772. "982": 928,
  17773. "1008": 922,
  17774. "1009": 929,
  17775. "1012": [
  17776. 920,
  17777. 977
  17778. ],
  17779. "1013": 917,
  17780. "7776": 7835,
  17781. "7835": 7776,
  17782. "8126": [
  17783. 837,
  17784. 921
  17785. ],
  17786. "8486": 937,
  17787. "8490": 75,
  17788. "8491": 197,
  17789. "66560": 66600,
  17790. "66561": 66601,
  17791. "66562": 66602,
  17792. "66563": 66603,
  17793. "66564": 66604,
  17794. "66565": 66605,
  17795. "66566": 66606,
  17796. "66567": 66607,
  17797. "66568": 66608,
  17798. "66569": 66609,
  17799. "66570": 66610,
  17800. "66571": 66611,
  17801. "66572": 66612,
  17802. "66573": 66613,
  17803. "66574": 66614,
  17804. "66575": 66615,
  17805. "66576": 66616,
  17806. "66577": 66617,
  17807. "66578": 66618,
  17808. "66579": 66619,
  17809. "66580": 66620,
  17810. "66581": 66621,
  17811. "66582": 66622,
  17812. "66583": 66623,
  17813. "66584": 66624,
  17814. "66585": 66625,
  17815. "66586": 66626,
  17816. "66587": 66627,
  17817. "66588": 66628,
  17818. "66589": 66629,
  17819. "66590": 66630,
  17820. "66591": 66631,
  17821. "66592": 66632,
  17822. "66593": 66633,
  17823. "66594": 66634,
  17824. "66595": 66635,
  17825. "66596": 66636,
  17826. "66597": 66637,
  17827. "66598": 66638,
  17828. "66599": 66639,
  17829. "66600": 66560,
  17830. "66601": 66561,
  17831. "66602": 66562,
  17832. "66603": 66563,
  17833. "66604": 66564,
  17834. "66605": 66565,
  17835. "66606": 66566,
  17836. "66607": 66567,
  17837. "66608": 66568,
  17838. "66609": 66569,
  17839. "66610": 66570,
  17840. "66611": 66571,
  17841. "66612": 66572,
  17842. "66613": 66573,
  17843. "66614": 66574,
  17844. "66615": 66575,
  17845. "66616": 66576,
  17846. "66617": 66577,
  17847. "66618": 66578,
  17848. "66619": 66579,
  17849. "66620": 66580,
  17850. "66621": 66581,
  17851. "66622": 66582,
  17852. "66623": 66583,
  17853. "66624": 66584,
  17854. "66625": 66585,
  17855. "66626": 66586,
  17856. "66627": 66587,
  17857. "66628": 66588,
  17858. "66629": 66589,
  17859. "66630": 66590,
  17860. "66631": 66591,
  17861. "66632": 66592,
  17862. "66633": 66593,
  17863. "66634": 66594,
  17864. "66635": 66595,
  17865. "66636": 66596,
  17866. "66637": 66597,
  17867. "66638": 66598,
  17868. "66639": 66599,
  17869. "68736": 68800,
  17870. "68737": 68801,
  17871. "68738": 68802,
  17872. "68739": 68803,
  17873. "68740": 68804,
  17874. "68741": 68805,
  17875. "68742": 68806,
  17876. "68743": 68807,
  17877. "68744": 68808,
  17878. "68745": 68809,
  17879. "68746": 68810,
  17880. "68747": 68811,
  17881. "68748": 68812,
  17882. "68749": 68813,
  17883. "68750": 68814,
  17884. "68751": 68815,
  17885. "68752": 68816,
  17886. "68753": 68817,
  17887. "68754": 68818,
  17888. "68755": 68819,
  17889. "68756": 68820,
  17890. "68757": 68821,
  17891. "68758": 68822,
  17892. "68759": 68823,
  17893. "68760": 68824,
  17894. "68761": 68825,
  17895. "68762": 68826,
  17896. "68763": 68827,
  17897. "68764": 68828,
  17898. "68765": 68829,
  17899. "68766": 68830,
  17900. "68767": 68831,
  17901. "68768": 68832,
  17902. "68769": 68833,
  17903. "68770": 68834,
  17904. "68771": 68835,
  17905. "68772": 68836,
  17906. "68773": 68837,
  17907. "68774": 68838,
  17908. "68775": 68839,
  17909. "68776": 68840,
  17910. "68777": 68841,
  17911. "68778": 68842,
  17912. "68779": 68843,
  17913. "68780": 68844,
  17914. "68781": 68845,
  17915. "68782": 68846,
  17916. "68783": 68847,
  17917. "68784": 68848,
  17918. "68785": 68849,
  17919. "68786": 68850,
  17920. "68800": 68736,
  17921. "68801": 68737,
  17922. "68802": 68738,
  17923. "68803": 68739,
  17924. "68804": 68740,
  17925. "68805": 68741,
  17926. "68806": 68742,
  17927. "68807": 68743,
  17928. "68808": 68744,
  17929. "68809": 68745,
  17930. "68810": 68746,
  17931. "68811": 68747,
  17932. "68812": 68748,
  17933. "68813": 68749,
  17934. "68814": 68750,
  17935. "68815": 68751,
  17936. "68816": 68752,
  17937. "68817": 68753,
  17938. "68818": 68754,
  17939. "68819": 68755,
  17940. "68820": 68756,
  17941. "68821": 68757,
  17942. "68822": 68758,
  17943. "68823": 68759,
  17944. "68824": 68760,
  17945. "68825": 68761,
  17946. "68826": 68762,
  17947. "68827": 68763,
  17948. "68828": 68764,
  17949. "68829": 68765,
  17950. "68830": 68766,
  17951. "68831": 68767,
  17952. "68832": 68768,
  17953. "68833": 68769,
  17954. "68834": 68770,
  17955. "68835": 68771,
  17956. "68836": 68772,
  17957. "68837": 68773,
  17958. "68838": 68774,
  17959. "68839": 68775,
  17960. "68840": 68776,
  17961. "68841": 68777,
  17962. "68842": 68778,
  17963. "68843": 68779,
  17964. "68844": 68780,
  17965. "68845": 68781,
  17966. "68846": 68782,
  17967. "68847": 68783,
  17968. "68848": 68784,
  17969. "68849": 68785,
  17970. "68850": 68786,
  17971. "71840": 71872,
  17972. "71841": 71873,
  17973. "71842": 71874,
  17974. "71843": 71875,
  17975. "71844": 71876,
  17976. "71845": 71877,
  17977. "71846": 71878,
  17978. "71847": 71879,
  17979. "71848": 71880,
  17980. "71849": 71881,
  17981. "71850": 71882,
  17982. "71851": 71883,
  17983. "71852": 71884,
  17984. "71853": 71885,
  17985. "71854": 71886,
  17986. "71855": 71887,
  17987. "71856": 71888,
  17988. "71857": 71889,
  17989. "71858": 71890,
  17990. "71859": 71891,
  17991. "71860": 71892,
  17992. "71861": 71893,
  17993. "71862": 71894,
  17994. "71863": 71895,
  17995. "71864": 71896,
  17996. "71865": 71897,
  17997. "71866": 71898,
  17998. "71867": 71899,
  17999. "71868": 71900,
  18000. "71869": 71901,
  18001. "71870": 71902,
  18002. "71871": 71903,
  18003. "71872": 71840,
  18004. "71873": 71841,
  18005. "71874": 71842,
  18006. "71875": 71843,
  18007. "71876": 71844,
  18008. "71877": 71845,
  18009. "71878": 71846,
  18010. "71879": 71847,
  18011. "71880": 71848,
  18012. "71881": 71849,
  18013. "71882": 71850,
  18014. "71883": 71851,
  18015. "71884": 71852,
  18016. "71885": 71853,
  18017. "71886": 71854,
  18018. "71887": 71855,
  18019. "71888": 71856,
  18020. "71889": 71857,
  18021. "71890": 71858,
  18022. "71891": 71859,
  18023. "71892": 71860,
  18024. "71893": 71861,
  18025. "71894": 71862,
  18026. "71895": 71863,
  18027. "71896": 71864,
  18028. "71897": 71865,
  18029. "71898": 71866,
  18030. "71899": 71867,
  18031. "71900": 71868,
  18032. "71901": 71869,
  18033. "71902": 71870,
  18034. "71903": 71871
  18035. };
  18036. });
  18037. $__System.registerDynamic('122', [], true, function ($__require, exports, module) {
  18038. var global = this || self,
  18039. GLOBAL = global;
  18040. /*! https://mths.be/regenerate v1.3.2 by @mathias | MIT license */
  18041. ;(function (root) {
  18042. // Detect free variables `exports`.
  18043. var freeExports = typeof exports == 'object' && exports;
  18044. // Detect free variable `module`.
  18045. var freeModule = typeof module == 'object' && module && module.exports == freeExports && module;
  18046. // Detect free variable `global`, from Node.js/io.js or Browserified code,
  18047. // and use it as `root`.
  18048. var freeGlobal = typeof global == 'object' && global;
  18049. if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
  18050. root = freeGlobal;
  18051. }
  18052. /*--------------------------------------------------------------------------*/
  18053. var ERRORS = {
  18054. 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' + 'to the `start` value.',
  18055. 'codePointRange': 'Invalid code point value. Code points range from ' + 'U+000000 to U+10FFFF.'
  18056. };
  18057. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs
  18058. var HIGH_SURROGATE_MIN = 0xD800;
  18059. var HIGH_SURROGATE_MAX = 0xDBFF;
  18060. var LOW_SURROGATE_MIN = 0xDC00;
  18061. var LOW_SURROGATE_MAX = 0xDFFF;
  18062. // In Regenerate output, `\0` is never preceded by `\` because we sort by
  18063. // code point value, so let’s keep this regular expression simple.
  18064. var regexNull = /\\x00([^0123456789]|$)/g;
  18065. var object = {};
  18066. var hasOwnProperty = object.hasOwnProperty;
  18067. var extend = function (destination, source) {
  18068. var key;
  18069. for (key in source) {
  18070. if (hasOwnProperty.call(source, key)) {
  18071. destination[key] = source[key];
  18072. }
  18073. }
  18074. return destination;
  18075. };
  18076. var forEach = function (array, callback) {
  18077. var index = -1;
  18078. var length = array.length;
  18079. while (++index < length) {
  18080. callback(array[index], index);
  18081. }
  18082. };
  18083. var toString = object.toString;
  18084. var isArray = function (value) {
  18085. return toString.call(value) == '[object Array]';
  18086. };
  18087. var isNumber = function (value) {
  18088. return typeof value == 'number' || toString.call(value) == '[object Number]';
  18089. };
  18090. // This assumes that `number` is a positive integer that `toString()`s nicely
  18091. // (which is the case for all code point values).
  18092. var zeroes = '0000';
  18093. var pad = function (number, totalCharacters) {
  18094. var string = String(number);
  18095. return string.length < totalCharacters ? (zeroes + string).slice(-totalCharacters) : string;
  18096. };
  18097. var hex = function (number) {
  18098. return Number(number).toString(16).toUpperCase();
  18099. };
  18100. var slice = [].slice;
  18101. /*--------------------------------------------------------------------------*/
  18102. var dataFromCodePoints = function (codePoints) {
  18103. var index = -1;
  18104. var length = codePoints.length;
  18105. var max = length - 1;
  18106. var result = [];
  18107. var isStart = true;
  18108. var tmp;
  18109. var previous = 0;
  18110. while (++index < length) {
  18111. tmp = codePoints[index];
  18112. if (isStart) {
  18113. result.push(tmp);
  18114. previous = tmp;
  18115. isStart = false;
  18116. } else {
  18117. if (tmp == previous + 1) {
  18118. if (index != max) {
  18119. previous = tmp;
  18120. continue;
  18121. } else {
  18122. isStart = true;
  18123. result.push(tmp + 1);
  18124. }
  18125. } else {
  18126. // End the previous range and start a new one.
  18127. result.push(previous + 1, tmp);
  18128. previous = tmp;
  18129. }
  18130. }
  18131. }
  18132. if (!isStart) {
  18133. result.push(tmp + 1);
  18134. }
  18135. return result;
  18136. };
  18137. var dataRemove = function (data, codePoint) {
  18138. // Iterate over the data per `(start, end)` pair.
  18139. var index = 0;
  18140. var start;
  18141. var end;
  18142. var length = data.length;
  18143. while (index < length) {
  18144. start = data[index];
  18145. end = data[index + 1];
  18146. if (codePoint >= start && codePoint < end) {
  18147. // Modify this pair.
  18148. if (codePoint == start) {
  18149. if (end == start + 1) {
  18150. // Just remove `start` and `end`.
  18151. data.splice(index, 2);
  18152. return data;
  18153. } else {
  18154. // Just replace `start` with a new value.
  18155. data[index] = codePoint + 1;
  18156. return data;
  18157. }
  18158. } else if (codePoint == end - 1) {
  18159. // Just replace `end` with a new value.
  18160. data[index + 1] = codePoint;
  18161. return data;
  18162. } else {
  18163. // Replace `[start, end]` with `[startA, endA, startB, endB]`.
  18164. data.splice(index, 2, start, codePoint, codePoint + 1, end);
  18165. return data;
  18166. }
  18167. }
  18168. index += 2;
  18169. }
  18170. return data;
  18171. };
  18172. var dataRemoveRange = function (data, rangeStart, rangeEnd) {
  18173. if (rangeEnd < rangeStart) {
  18174. throw Error(ERRORS.rangeOrder);
  18175. }
  18176. // Iterate over the data per `(start, end)` pair.
  18177. var index = 0;
  18178. var start;
  18179. var end;
  18180. while (index < data.length) {
  18181. start = data[index];
  18182. end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
  18183. // Exit as soon as no more matching pairs can be found.
  18184. if (start > rangeEnd) {
  18185. return data;
  18186. }
  18187. // Check if this range pair is equal to, or forms a subset of, the range
  18188. // to be removed.
  18189. // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`.
  18190. // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`.
  18191. if (rangeStart <= start && rangeEnd >= end) {
  18192. // Remove this pair.
  18193. data.splice(index, 2);
  18194. continue;
  18195. }
  18196. // Check if both `rangeStart` and `rangeEnd` are within the bounds of
  18197. // this pair.
  18198. // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`.
  18199. if (rangeStart >= start && rangeEnd < end) {
  18200. if (rangeStart == start) {
  18201. // Replace `[start, end]` with `[startB, endB]`.
  18202. data[index] = rangeEnd + 1;
  18203. data[index + 1] = end + 1;
  18204. return data;
  18205. }
  18206. // Replace `[start, end]` with `[startA, endA, startB, endB]`.
  18207. data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1);
  18208. return data;
  18209. }
  18210. // Check if only `rangeStart` is within the bounds of this pair.
  18211. // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`.
  18212. if (rangeStart >= start && rangeStart <= end) {
  18213. // Replace `end` with `rangeStart`.
  18214. data[index + 1] = rangeStart;
  18215. // Note: we cannot `return` just yet, in case any following pairs still
  18216. // contain matching code points.
  18217. // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20
  18218. // → `[0, 4, 21, 31]`.
  18219. }
  18220. // Check if only `rangeEnd` is within the bounds of this pair.
  18221. // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`.
  18222. else if (rangeEnd >= start && rangeEnd <= end) {
  18223. // Just replace `start`.
  18224. data[index] = rangeEnd + 1;
  18225. return data;
  18226. }
  18227. index += 2;
  18228. }
  18229. return data;
  18230. };
  18231. var dataAdd = function (data, codePoint) {
  18232. // Iterate over the data per `(start, end)` pair.
  18233. var index = 0;
  18234. var start;
  18235. var end;
  18236. var lastIndex = null;
  18237. var length = data.length;
  18238. if (codePoint < 0x0 || codePoint > 0x10FFFF) {
  18239. throw RangeError(ERRORS.codePointRange);
  18240. }
  18241. while (index < length) {
  18242. start = data[index];
  18243. end = data[index + 1];
  18244. // Check if the code point is already in the set.
  18245. if (codePoint >= start && codePoint < end) {
  18246. return data;
  18247. }
  18248. if (codePoint == start - 1) {
  18249. // Just replace `start` with a new value.
  18250. data[index] = codePoint;
  18251. return data;
  18252. }
  18253. // At this point, if `start` is `greater` than `codePoint`, insert a new
  18254. // `[start, end]` pair before the current pair, or after the current pair
  18255. // if there is a known `lastIndex`.
  18256. if (start > codePoint) {
  18257. data.splice(lastIndex != null ? lastIndex + 2 : 0, 0, codePoint, codePoint + 1);
  18258. return data;
  18259. }
  18260. if (codePoint == end) {
  18261. // Check if adding this code point causes two separate ranges to become
  18262. // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`.
  18263. if (codePoint + 1 == data[index + 2]) {
  18264. data.splice(index, 4, start, data[index + 3]);
  18265. return data;
  18266. }
  18267. // Else, just replace `end` with a new value.
  18268. data[index + 1] = codePoint + 1;
  18269. return data;
  18270. }
  18271. lastIndex = index;
  18272. index += 2;
  18273. }
  18274. // The loop has finished; add the new pair to the end of the data set.
  18275. data.push(codePoint, codePoint + 1);
  18276. return data;
  18277. };
  18278. var dataAddData = function (dataA, dataB) {
  18279. // Iterate over the data per `(start, end)` pair.
  18280. var index = 0;
  18281. var start;
  18282. var end;
  18283. var data = dataA.slice();
  18284. var length = dataB.length;
  18285. while (index < length) {
  18286. start = dataB[index];
  18287. end = dataB[index + 1] - 1;
  18288. if (start == end) {
  18289. data = dataAdd(data, start);
  18290. } else {
  18291. data = dataAddRange(data, start, end);
  18292. }
  18293. index += 2;
  18294. }
  18295. return data;
  18296. };
  18297. var dataRemoveData = function (dataA, dataB) {
  18298. // Iterate over the data per `(start, end)` pair.
  18299. var index = 0;
  18300. var start;
  18301. var end;
  18302. var data = dataA.slice();
  18303. var length = dataB.length;
  18304. while (index < length) {
  18305. start = dataB[index];
  18306. end = dataB[index + 1] - 1;
  18307. if (start == end) {
  18308. data = dataRemove(data, start);
  18309. } else {
  18310. data = dataRemoveRange(data, start, end);
  18311. }
  18312. index += 2;
  18313. }
  18314. return data;
  18315. };
  18316. var dataAddRange = function (data, rangeStart, rangeEnd) {
  18317. if (rangeEnd < rangeStart) {
  18318. throw Error(ERRORS.rangeOrder);
  18319. }
  18320. if (rangeStart < 0x0 || rangeStart > 0x10FFFF || rangeEnd < 0x0 || rangeEnd > 0x10FFFF) {
  18321. throw RangeError(ERRORS.codePointRange);
  18322. }
  18323. // Iterate over the data per `(start, end)` pair.
  18324. var index = 0;
  18325. var start;
  18326. var end;
  18327. var added = false;
  18328. var length = data.length;
  18329. while (index < length) {
  18330. start = data[index];
  18331. end = data[index + 1];
  18332. if (added) {
  18333. // The range has already been added to the set; at this point, we just
  18334. // need to get rid of the following ranges in case they overlap.
  18335. // Check if this range can be combined with the previous range.
  18336. if (start == rangeEnd + 1) {
  18337. data.splice(index - 1, 2);
  18338. return data;
  18339. }
  18340. // Exit as soon as no more possibly overlapping pairs can be found.
  18341. if (start > rangeEnd) {
  18342. return data;
  18343. }
  18344. // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have
  18345. // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the
  18346. // `0,16` range that was previously added.
  18347. if (start >= rangeStart && start <= rangeEnd) {
  18348. // `start` lies within the range that was previously added.
  18349. if (end > rangeStart && end - 1 <= rangeEnd) {
  18350. // `end` lies within the range that was previously added as well,
  18351. // so remove this pair.
  18352. data.splice(index, 2);
  18353. index -= 2;
  18354. // Note: we cannot `return` just yet, as there may still be other
  18355. // overlapping pairs.
  18356. } else {
  18357. // `start` lies within the range that was previously added, but
  18358. // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so
  18359. // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`.
  18360. // Remove the previously added `end` and the current `start`.
  18361. data.splice(index - 1, 2);
  18362. index -= 2;
  18363. }
  18364. // Note: we cannot return yet.
  18365. }
  18366. } else if (start == rangeEnd + 1) {
  18367. data[index] = rangeStart;
  18368. return data;
  18369. }
  18370. // Check if a new pair must be inserted *before* the current one.
  18371. else if (start > rangeEnd) {
  18372. data.splice(index, 0, rangeStart, rangeEnd + 1);
  18373. return data;
  18374. } else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) {
  18375. // The new range lies entirely within an existing range pair. No action
  18376. // needed.
  18377. return data;
  18378. } else if (
  18379. // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`.
  18380. rangeStart >= start && rangeStart < end ||
  18381. // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`.
  18382. end == rangeStart) {
  18383. // Replace `end` with the new value.
  18384. data[index + 1] = rangeEnd + 1;
  18385. // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]`
  18386. // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part.
  18387. added = true;
  18388. // Note: we cannot `return` just yet.
  18389. } else if (rangeStart <= start && rangeEnd + 1 >= end) {
  18390. // The new range is a superset of the old range.
  18391. data[index] = rangeStart;
  18392. data[index + 1] = rangeEnd + 1;
  18393. added = true;
  18394. }
  18395. index += 2;
  18396. }
  18397. // The loop has finished without doing anything; add the new pair to the end
  18398. // of the data set.
  18399. if (!added) {
  18400. data.push(rangeStart, rangeEnd + 1);
  18401. }
  18402. return data;
  18403. };
  18404. var dataContains = function (data, codePoint) {
  18405. var index = 0;
  18406. var length = data.length;
  18407. // Exit early if `codePoint` is not within `data`’s overall range.
  18408. var start = data[index];
  18409. var end = data[length - 1];
  18410. if (length >= 2) {
  18411. if (codePoint < start || codePoint > end) {
  18412. return false;
  18413. }
  18414. }
  18415. // Iterate over the data per `(start, end)` pair.
  18416. while (index < length) {
  18417. start = data[index];
  18418. end = data[index + 1];
  18419. if (codePoint >= start && codePoint < end) {
  18420. return true;
  18421. }
  18422. index += 2;
  18423. }
  18424. return false;
  18425. };
  18426. var dataIntersection = function (data, codePoints) {
  18427. var index = 0;
  18428. var length = codePoints.length;
  18429. var codePoint;
  18430. var result = [];
  18431. while (index < length) {
  18432. codePoint = codePoints[index];
  18433. if (dataContains(data, codePoint)) {
  18434. result.push(codePoint);
  18435. }
  18436. ++index;
  18437. }
  18438. return dataFromCodePoints(result);
  18439. };
  18440. var dataIsEmpty = function (data) {
  18441. return !data.length;
  18442. };
  18443. var dataIsSingleton = function (data) {
  18444. // Check if the set only represents a single code point.
  18445. return data.length == 2 && data[0] + 1 == data[1];
  18446. };
  18447. var dataToArray = function (data) {
  18448. // Iterate over the data per `(start, end)` pair.
  18449. var index = 0;
  18450. var start;
  18451. var end;
  18452. var result = [];
  18453. var length = data.length;
  18454. while (index < length) {
  18455. start = data[index];
  18456. end = data[index + 1];
  18457. while (start < end) {
  18458. result.push(start);
  18459. ++start;
  18460. }
  18461. index += 2;
  18462. }
  18463. return result;
  18464. };
  18465. /*--------------------------------------------------------------------------*/
  18466. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  18467. var floor = Math.floor;
  18468. var highSurrogate = function (codePoint) {
  18469. return parseInt(floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, 10);
  18470. };
  18471. var lowSurrogate = function (codePoint) {
  18472. return parseInt((codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, 10);
  18473. };
  18474. var stringFromCharCode = String.fromCharCode;
  18475. var codePointToString = function (codePoint) {
  18476. var string;
  18477. // https://mathiasbynens.be/notes/javascript-escapes#single
  18478. // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a
  18479. // different meaning in regular expressions (word boundary), so it cannot
  18480. // be used here.
  18481. if (codePoint == 0x09) {
  18482. string = '\\t';
  18483. }
  18484. // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it.
  18485. // else if (codePoint == 0x0B) {
  18486. // string = '\\v';
  18487. // }
  18488. else if (codePoint == 0x0A) {
  18489. string = '\\n';
  18490. } else if (codePoint == 0x0C) {
  18491. string = '\\f';
  18492. } else if (codePoint == 0x0D) {
  18493. string = '\\r';
  18494. } else if (codePoint == 0x5C) {
  18495. string = '\\\\';
  18496. } else if (codePoint == 0x24 || codePoint >= 0x28 && codePoint <= 0x2B || codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F || codePoint >= 0x5B && codePoint <= 0x5E || codePoint >= 0x7B && codePoint <= 0x7D) {
  18497. // The code point maps to an unsafe printable ASCII character;
  18498. // backslash-escape it. Here’s the list of those symbols:
  18499. //
  18500. // $()*+-.?[\]^{|}
  18501. //
  18502. // See #7 for more info.
  18503. string = '\\' + stringFromCharCode(codePoint);
  18504. } else if (codePoint >= 0x20 && codePoint <= 0x7E) {
  18505. // The code point maps to one of these printable ASCII symbols
  18506. // (including the space character):
  18507. //
  18508. // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO
  18509. // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~
  18510. //
  18511. // These can safely be used directly.
  18512. string = stringFromCharCode(codePoint);
  18513. } else if (codePoint <= 0xFF) {
  18514. // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal
  18515. string = '\\x' + pad(hex(codePoint), 2);
  18516. } else {
  18517. // `codePoint <= 0xFFFF` holds true.
  18518. // https://mathiasbynens.be/notes/javascript-escapes#unicode
  18519. string = '\\u' + pad(hex(codePoint), 4);
  18520. }
  18521. // There’s no need to account for astral symbols / surrogate pairs here,
  18522. // since `codePointToString` is private and only used for BMP code points.
  18523. // But if that’s what you need, just add an `else` block with this code:
  18524. //
  18525. // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4)
  18526. // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4);
  18527. return string;
  18528. };
  18529. var codePointToStringUnicode = function (codePoint) {
  18530. if (codePoint <= 0xFFFF) {
  18531. return codePointToString(codePoint);
  18532. }
  18533. return '\\u{' + codePoint.toString(16).toUpperCase() + '}';
  18534. };
  18535. var symbolToCodePoint = function (symbol) {
  18536. var length = symbol.length;
  18537. var first = symbol.charCodeAt(0);
  18538. var second;
  18539. if (first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && length > 1 // There is a next code unit.
  18540. ) {
  18541. // `first` is a high surrogate, and there is a next character. Assume
  18542. // it’s a low surrogate (else it’s invalid usage of Regenerate anyway).
  18543. second = symbol.charCodeAt(1);
  18544. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  18545. return (first - HIGH_SURROGATE_MIN) * 0x400 + second - LOW_SURROGATE_MIN + 0x10000;
  18546. }
  18547. return first;
  18548. };
  18549. var createBMPCharacterClasses = function (data) {
  18550. // Iterate over the data per `(start, end)` pair.
  18551. var result = '';
  18552. var index = 0;
  18553. var start;
  18554. var end;
  18555. var length = data.length;
  18556. if (dataIsSingleton(data)) {
  18557. return codePointToString(data[0]);
  18558. }
  18559. while (index < length) {
  18560. start = data[index];
  18561. end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
  18562. if (start == end) {
  18563. result += codePointToString(start);
  18564. } else if (start + 1 == end) {
  18565. result += codePointToString(start) + codePointToString(end);
  18566. } else {
  18567. result += codePointToString(start) + '-' + codePointToString(end);
  18568. }
  18569. index += 2;
  18570. }
  18571. return '[' + result + ']';
  18572. };
  18573. var createUnicodeCharacterClasses = function (data) {
  18574. // Iterate over the data per `(start, end)` pair.
  18575. var result = '';
  18576. var index = 0;
  18577. var start;
  18578. var end;
  18579. var length = data.length;
  18580. if (dataIsSingleton(data)) {
  18581. return codePointToStringUnicode(data[0]);
  18582. }
  18583. while (index < length) {
  18584. start = data[index];
  18585. end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
  18586. if (start == end) {
  18587. result += codePointToStringUnicode(start);
  18588. } else if (start + 1 == end) {
  18589. result += codePointToStringUnicode(start) + codePointToStringUnicode(end);
  18590. } else {
  18591. result += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end);
  18592. }
  18593. index += 2;
  18594. }
  18595. return '[' + result + ']';
  18596. };
  18597. var splitAtBMP = function (data) {
  18598. // Iterate over the data per `(start, end)` pair.
  18599. var loneHighSurrogates = [];
  18600. var loneLowSurrogates = [];
  18601. var bmp = [];
  18602. var astral = [];
  18603. var index = 0;
  18604. var start;
  18605. var end;
  18606. var length = data.length;
  18607. while (index < length) {
  18608. start = data[index];
  18609. end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
  18610. if (start < HIGH_SURROGATE_MIN) {
  18611. // The range starts and ends before the high surrogate range.
  18612. // E.g. (0, 0x10).
  18613. if (end < HIGH_SURROGATE_MIN) {
  18614. bmp.push(start, end + 1);
  18615. }
  18616. // The range starts before the high surrogate range and ends within it.
  18617. // E.g. (0, 0xD855).
  18618. if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
  18619. bmp.push(start, HIGH_SURROGATE_MIN);
  18620. loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1);
  18621. }
  18622. // The range starts before the high surrogate range and ends in the low
  18623. // surrogate range. E.g. (0, 0xDCFF).
  18624. if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
  18625. bmp.push(start, HIGH_SURROGATE_MIN);
  18626. loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
  18627. loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
  18628. }
  18629. // The range starts before the high surrogate range and ends after the
  18630. // low surrogate range. E.g. (0, 0x10FFFF).
  18631. if (end > LOW_SURROGATE_MAX) {
  18632. bmp.push(start, HIGH_SURROGATE_MIN);
  18633. loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
  18634. loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
  18635. if (end <= 0xFFFF) {
  18636. bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
  18637. } else {
  18638. bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
  18639. astral.push(0xFFFF + 1, end + 1);
  18640. }
  18641. }
  18642. } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) {
  18643. // The range starts and ends in the high surrogate range.
  18644. // E.g. (0xD855, 0xD866).
  18645. if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
  18646. loneHighSurrogates.push(start, end + 1);
  18647. }
  18648. // The range starts in the high surrogate range and ends in the low
  18649. // surrogate range. E.g. (0xD855, 0xDCFF).
  18650. if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
  18651. loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
  18652. loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
  18653. }
  18654. // The range starts in the high surrogate range and ends after the low
  18655. // surrogate range. E.g. (0xD855, 0x10FFFF).
  18656. if (end > LOW_SURROGATE_MAX) {
  18657. loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
  18658. loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
  18659. if (end <= 0xFFFF) {
  18660. bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
  18661. } else {
  18662. bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
  18663. astral.push(0xFFFF + 1, end + 1);
  18664. }
  18665. }
  18666. } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) {
  18667. // The range starts and ends in the low surrogate range.
  18668. // E.g. (0xDCFF, 0xDDFF).
  18669. if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
  18670. loneLowSurrogates.push(start, end + 1);
  18671. }
  18672. // The range starts in the low surrogate range and ends after the low
  18673. // surrogate range. E.g. (0xDCFF, 0x10FFFF).
  18674. if (end > LOW_SURROGATE_MAX) {
  18675. loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1);
  18676. if (end <= 0xFFFF) {
  18677. bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
  18678. } else {
  18679. bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
  18680. astral.push(0xFFFF + 1, end + 1);
  18681. }
  18682. }
  18683. } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) {
  18684. // The range starts and ends after the low surrogate range.
  18685. // E.g. (0xFFAA, 0x10FFFF).
  18686. if (end <= 0xFFFF) {
  18687. bmp.push(start, end + 1);
  18688. } else {
  18689. bmp.push(start, 0xFFFF + 1);
  18690. astral.push(0xFFFF + 1, end + 1);
  18691. }
  18692. } else {
  18693. // The range starts and ends in the astral range.
  18694. astral.push(start, end + 1);
  18695. }
  18696. index += 2;
  18697. }
  18698. return {
  18699. 'loneHighSurrogates': loneHighSurrogates,
  18700. 'loneLowSurrogates': loneLowSurrogates,
  18701. 'bmp': bmp,
  18702. 'astral': astral
  18703. };
  18704. };
  18705. var optimizeSurrogateMappings = function (surrogateMappings) {
  18706. var result = [];
  18707. var tmpLow = [];
  18708. var addLow = false;
  18709. var mapping;
  18710. var nextMapping;
  18711. var highSurrogates;
  18712. var lowSurrogates;
  18713. var nextHighSurrogates;
  18714. var nextLowSurrogates;
  18715. var index = -1;
  18716. var length = surrogateMappings.length;
  18717. while (++index < length) {
  18718. mapping = surrogateMappings[index];
  18719. nextMapping = surrogateMappings[index + 1];
  18720. if (!nextMapping) {
  18721. result.push(mapping);
  18722. continue;
  18723. }
  18724. highSurrogates = mapping[0];
  18725. lowSurrogates = mapping[1];
  18726. nextHighSurrogates = nextMapping[0];
  18727. nextLowSurrogates = nextMapping[1];
  18728. // Check for identical high surrogate ranges.
  18729. tmpLow = lowSurrogates;
  18730. while (nextHighSurrogates && highSurrogates[0] == nextHighSurrogates[0] && highSurrogates[1] == nextHighSurrogates[1]) {
  18731. // Merge with the next item.
  18732. if (dataIsSingleton(nextLowSurrogates)) {
  18733. tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]);
  18734. } else {
  18735. tmpLow = dataAddRange(tmpLow, nextLowSurrogates[0], nextLowSurrogates[1] - 1);
  18736. }
  18737. ++index;
  18738. mapping = surrogateMappings[index];
  18739. highSurrogates = mapping[0];
  18740. lowSurrogates = mapping[1];
  18741. nextMapping = surrogateMappings[index + 1];
  18742. nextHighSurrogates = nextMapping && nextMapping[0];
  18743. nextLowSurrogates = nextMapping && nextMapping[1];
  18744. addLow = true;
  18745. }
  18746. result.push([highSurrogates, addLow ? tmpLow : lowSurrogates]);
  18747. addLow = false;
  18748. }
  18749. return optimizeByLowSurrogates(result);
  18750. };
  18751. var optimizeByLowSurrogates = function (surrogateMappings) {
  18752. if (surrogateMappings.length == 1) {
  18753. return surrogateMappings;
  18754. }
  18755. var index = -1;
  18756. var innerIndex = -1;
  18757. while (++index < surrogateMappings.length) {
  18758. var mapping = surrogateMappings[index];
  18759. var lowSurrogates = mapping[1];
  18760. var lowSurrogateStart = lowSurrogates[0];
  18761. var lowSurrogateEnd = lowSurrogates[1];
  18762. innerIndex = index; // Note: the loop starts at the next index.
  18763. while (++innerIndex < surrogateMappings.length) {
  18764. var otherMapping = surrogateMappings[innerIndex];
  18765. var otherLowSurrogates = otherMapping[1];
  18766. var otherLowSurrogateStart = otherLowSurrogates[0];
  18767. var otherLowSurrogateEnd = otherLowSurrogates[1];
  18768. if (lowSurrogateStart == otherLowSurrogateStart && lowSurrogateEnd == otherLowSurrogateEnd) {
  18769. // Add the code points in the other item to this one.
  18770. if (dataIsSingleton(otherMapping[0])) {
  18771. mapping[0] = dataAdd(mapping[0], otherMapping[0][0]);
  18772. } else {
  18773. mapping[0] = dataAddRange(mapping[0], otherMapping[0][0], otherMapping[0][1] - 1);
  18774. }
  18775. // Remove the other, now redundant, item.
  18776. surrogateMappings.splice(innerIndex, 1);
  18777. --innerIndex;
  18778. }
  18779. }
  18780. }
  18781. return surrogateMappings;
  18782. };
  18783. var surrogateSet = function (data) {
  18784. // Exit early if `data` is an empty set.
  18785. if (!data.length) {
  18786. return [];
  18787. }
  18788. // Iterate over the data per `(start, end)` pair.
  18789. var index = 0;
  18790. var start;
  18791. var end;
  18792. var startHigh;
  18793. var startLow;
  18794. var endHigh;
  18795. var endLow;
  18796. var surrogateMappings = [];
  18797. var length = data.length;
  18798. while (index < length) {
  18799. start = data[index];
  18800. end = data[index + 1] - 1;
  18801. startHigh = highSurrogate(start);
  18802. startLow = lowSurrogate(start);
  18803. endHigh = highSurrogate(end);
  18804. endLow = lowSurrogate(end);
  18805. var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN;
  18806. var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX;
  18807. var complete = false;
  18808. // Append the previous high-surrogate-to-low-surrogate mappings.
  18809. // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`.
  18810. if (startHigh == endHigh || startsWithLowestLowSurrogate && endsWithHighestLowSurrogate) {
  18811. surrogateMappings.push([[startHigh, endHigh + 1], [startLow, endLow + 1]]);
  18812. complete = true;
  18813. } else {
  18814. surrogateMappings.push([[startHigh, startHigh + 1], [startLow, LOW_SURROGATE_MAX + 1]]);
  18815. }
  18816. // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to
  18817. // `(endHigh - 1, LOW_SURROGATE_MAX)`.
  18818. if (!complete && startHigh + 1 < endHigh) {
  18819. if (endsWithHighestLowSurrogate) {
  18820. // Combine step 2 and step 3.
  18821. surrogateMappings.push([[startHigh + 1, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);
  18822. complete = true;
  18823. } else {
  18824. surrogateMappings.push([[startHigh + 1, endHigh], [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]]);
  18825. }
  18826. }
  18827. // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`.
  18828. if (!complete) {
  18829. surrogateMappings.push([[endHigh, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);
  18830. }
  18831. index += 2;
  18832. }
  18833. // The format of `surrogateMappings` is as follows:
  18834. //
  18835. // [ surrogateMapping1, surrogateMapping2 ]
  18836. //
  18837. // i.e.:
  18838. //
  18839. // [
  18840. // [ highSurrogates1, lowSurrogates1 ],
  18841. // [ highSurrogates2, lowSurrogates2 ]
  18842. // ]
  18843. return optimizeSurrogateMappings(surrogateMappings);
  18844. };
  18845. var createSurrogateCharacterClasses = function (surrogateMappings) {
  18846. var result = [];
  18847. forEach(surrogateMappings, function (surrogateMapping) {
  18848. var highSurrogates = surrogateMapping[0];
  18849. var lowSurrogates = surrogateMapping[1];
  18850. result.push(createBMPCharacterClasses(highSurrogates) + createBMPCharacterClasses(lowSurrogates));
  18851. });
  18852. return result.join('|');
  18853. };
  18854. var createCharacterClassesFromData = function (data, bmpOnly, hasUnicodeFlag) {
  18855. if (hasUnicodeFlag) {
  18856. return createUnicodeCharacterClasses(data);
  18857. }
  18858. var result = [];
  18859. var parts = splitAtBMP(data);
  18860. var loneHighSurrogates = parts.loneHighSurrogates;
  18861. var loneLowSurrogates = parts.loneLowSurrogates;
  18862. var bmp = parts.bmp;
  18863. var astral = parts.astral;
  18864. var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);
  18865. var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);
  18866. var surrogateMappings = surrogateSet(astral);
  18867. if (bmpOnly) {
  18868. bmp = dataAddData(bmp, loneHighSurrogates);
  18869. hasLoneHighSurrogates = false;
  18870. bmp = dataAddData(bmp, loneLowSurrogates);
  18871. hasLoneLowSurrogates = false;
  18872. }
  18873. if (!dataIsEmpty(bmp)) {
  18874. // The data set contains BMP code points that are not high surrogates
  18875. // needed for astral code points in the set.
  18876. result.push(createBMPCharacterClasses(bmp));
  18877. }
  18878. if (surrogateMappings.length) {
  18879. // The data set contains astral code points; append character classes
  18880. // based on their surrogate pairs.
  18881. result.push(createSurrogateCharacterClasses(surrogateMappings));
  18882. }
  18883. // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860
  18884. if (hasLoneHighSurrogates) {
  18885. result.push(createBMPCharacterClasses(loneHighSurrogates) +
  18886. // Make sure the high surrogates aren’t part of a surrogate pair.
  18887. '(?![\\uDC00-\\uDFFF])');
  18888. }
  18889. if (hasLoneLowSurrogates) {
  18890. result.push(
  18891. // It is not possible to accurately assert the low surrogates aren’t
  18892. // part of a surrogate pair, since JavaScript regular expressions do
  18893. // not support lookbehind.
  18894. '(?:[^\\uD800-\\uDBFF]|^)' + createBMPCharacterClasses(loneLowSurrogates));
  18895. }
  18896. return result.join('|');
  18897. };
  18898. /*--------------------------------------------------------------------------*/
  18899. // `regenerate` can be used as a constructor (and new methods can be added to
  18900. // its prototype) but also as a regular function, the latter of which is the
  18901. // documented and most common usage. For that reason, it’s not capitalized.
  18902. var regenerate = function (value) {
  18903. if (arguments.length > 1) {
  18904. value = slice.call(arguments);
  18905. }
  18906. if (this instanceof regenerate) {
  18907. this.data = [];
  18908. return value ? this.add(value) : this;
  18909. }
  18910. return new regenerate().add(value);
  18911. };
  18912. regenerate.version = '1.3.2';
  18913. var proto = regenerate.prototype;
  18914. extend(proto, {
  18915. 'add': function (value) {
  18916. var $this = this;
  18917. if (value == null) {
  18918. return $this;
  18919. }
  18920. if (value instanceof regenerate) {
  18921. // Allow passing other Regenerate instances.
  18922. $this.data = dataAddData($this.data, value.data);
  18923. return $this;
  18924. }
  18925. if (arguments.length > 1) {
  18926. value = slice.call(arguments);
  18927. }
  18928. if (isArray(value)) {
  18929. forEach(value, function (item) {
  18930. $this.add(item);
  18931. });
  18932. return $this;
  18933. }
  18934. $this.data = dataAdd($this.data, isNumber(value) ? value : symbolToCodePoint(value));
  18935. return $this;
  18936. },
  18937. 'remove': function (value) {
  18938. var $this = this;
  18939. if (value == null) {
  18940. return $this;
  18941. }
  18942. if (value instanceof regenerate) {
  18943. // Allow passing other Regenerate instances.
  18944. $this.data = dataRemoveData($this.data, value.data);
  18945. return $this;
  18946. }
  18947. if (arguments.length > 1) {
  18948. value = slice.call(arguments);
  18949. }
  18950. if (isArray(value)) {
  18951. forEach(value, function (item) {
  18952. $this.remove(item);
  18953. });
  18954. return $this;
  18955. }
  18956. $this.data = dataRemove($this.data, isNumber(value) ? value : symbolToCodePoint(value));
  18957. return $this;
  18958. },
  18959. 'addRange': function (start, end) {
  18960. var $this = this;
  18961. $this.data = dataAddRange($this.data, isNumber(start) ? start : symbolToCodePoint(start), isNumber(end) ? end : symbolToCodePoint(end));
  18962. return $this;
  18963. },
  18964. 'removeRange': function (start, end) {
  18965. var $this = this;
  18966. var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start);
  18967. var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end);
  18968. $this.data = dataRemoveRange($this.data, startCodePoint, endCodePoint);
  18969. return $this;
  18970. },
  18971. 'intersection': function (argument) {
  18972. var $this = this;
  18973. // Allow passing other Regenerate instances.
  18974. // TODO: Optimize this by writing and using `dataIntersectionData()`.
  18975. var array = argument instanceof regenerate ? dataToArray(argument.data) : argument;
  18976. $this.data = dataIntersection($this.data, array);
  18977. return $this;
  18978. },
  18979. 'contains': function (codePoint) {
  18980. return dataContains(this.data, isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint));
  18981. },
  18982. 'clone': function () {
  18983. var set = new regenerate();
  18984. set.data = this.data.slice(0);
  18985. return set;
  18986. },
  18987. 'toString': function (options) {
  18988. var result = createCharacterClassesFromData(this.data, options ? options.bmpOnly : false, options ? options.hasUnicodeFlag : false);
  18989. if (!result) {
  18990. // For an empty set, return something that can be inserted `/here/` to
  18991. // form a valid regular expression. Avoid `(?:)` since that matches the
  18992. // empty string.
  18993. return '[]';
  18994. }
  18995. // Use `\0` instead of `\x00` where possible.
  18996. return result.replace(regexNull, '\\0$1');
  18997. },
  18998. 'toRegExp': function (flags) {
  18999. var pattern = this.toString(flags && flags.indexOf('u') != -1 ? { 'hasUnicodeFlag': true } : null);
  19000. return RegExp(pattern, flags || '');
  19001. },
  19002. 'valueOf': function () {
  19003. // Note: `valueOf` is aliased as `toArray`.
  19004. return dataToArray(this.data);
  19005. }
  19006. });
  19007. proto.toArray = proto.valueOf;
  19008. // Some AMD build optimizers, like r.js, check for specific condition patterns
  19009. // like the following:
  19010. if (typeof undefined == 'function' && typeof define.amd == 'object' && define.amd) {
  19011. define(function () {
  19012. return regenerate;
  19013. });
  19014. } else if (freeExports && !freeExports.nodeType) {
  19015. if (freeModule) {
  19016. // in Node.js, io.js, or RingoJS v0.8.0+
  19017. freeModule.exports = regenerate;
  19018. } else {
  19019. // in Narwhal or RingoJS v0.7.0-
  19020. freeExports.regenerate = regenerate;
  19021. }
  19022. } else {
  19023. // in Rhino or a web browser
  19024. root.regenerate = regenerate;
  19025. }
  19026. })(exports);
  19027. });
  19028. $__System.registerDynamic('123', ['122'], true, function ($__require, exports, module) {
  19029. var global = this || self,
  19030. GLOBAL = global;
  19031. // Generated by `/scripts/character-class-escape-sets.js`. Do not edit.
  19032. var regenerate = $__require('122');
  19033. exports.REGULAR = {
  19034. 'd': regenerate().addRange(0x30, 0x39),
  19035. 'D': regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0xFFFF),
  19036. 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029),
  19037. 'S': regenerate().addRange(0x0, 0x8).addRange(0xE, 0x1F).addRange(0x21, 0x9F).addRange(0xA1, 0x167F).addRange(0x1681, 0x1FFF).addRange(0x200B, 0x2027).addRange(0x202A, 0x202E).addRange(0x2030, 0x205E).addRange(0x2060, 0x2FFF).addRange(0x3001, 0xFEFE).addRange(0xFF00, 0xFFFF),
  19038. 'w': regenerate(0x5F).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A),
  19039. 'W': regenerate(0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0xFFFF)
  19040. };
  19041. exports.UNICODE = {
  19042. 'd': regenerate().addRange(0x30, 0x39),
  19043. 'D': regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0x10FFFF),
  19044. 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029),
  19045. 'S': regenerate().addRange(0x0, 0x8).addRange(0xE, 0x1F).addRange(0x21, 0x9F).addRange(0xA1, 0x167F).addRange(0x1681, 0x1FFF).addRange(0x200B, 0x2027).addRange(0x202A, 0x202E).addRange(0x2030, 0x205E).addRange(0x2060, 0x2FFF).addRange(0x3001, 0xFEFE).addRange(0xFF00, 0x10FFFF),
  19046. 'w': regenerate(0x5F).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A),
  19047. 'W': regenerate(0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x10FFFF)
  19048. };
  19049. exports.UNICODE_IGNORE_CASE = {
  19050. 'd': regenerate().addRange(0x30, 0x39),
  19051. 'D': regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0x10FFFF),
  19052. 's': regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029),
  19053. 'S': regenerate().addRange(0x0, 0x8).addRange(0xE, 0x1F).addRange(0x21, 0x9F).addRange(0xA1, 0x167F).addRange(0x1681, 0x1FFF).addRange(0x200B, 0x2027).addRange(0x202A, 0x202E).addRange(0x2030, 0x205E).addRange(0x2060, 0x2FFF).addRange(0x3001, 0xFEFE).addRange(0xFF00, 0x10FFFF),
  19054. 'w': regenerate(0x5F, 0x17F, 0x212A).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A),
  19055. 'W': regenerate(0x4B, 0x53, 0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x10FFFF)
  19056. };
  19057. });
  19058. $__System.registerDynamic('124', ['11f', '120', '122', '121', '123'], true, function ($__require, exports, module) {
  19059. var global = this || self,
  19060. GLOBAL = global;
  19061. var generate = $__require('11f').generate;
  19062. var parse = $__require('120').parse;
  19063. var regenerate = $__require('122');
  19064. var iuMappings = $__require('121');
  19065. var ESCAPE_SETS = $__require('123');
  19066. function getCharacterClassEscapeSet(character) {
  19067. if (unicode) {
  19068. if (ignoreCase) {
  19069. return ESCAPE_SETS.UNICODE_IGNORE_CASE[character];
  19070. }
  19071. return ESCAPE_SETS.UNICODE[character];
  19072. }
  19073. return ESCAPE_SETS.REGULAR[character];
  19074. }
  19075. var object = {};
  19076. var hasOwnProperty = object.hasOwnProperty;
  19077. function has(object, property) {
  19078. return hasOwnProperty.call(object, property);
  19079. }
  19080. // Prepare a Regenerate set containing all code points, used for negative
  19081. // character classes (if any).
  19082. var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
  19083. // Without the `u` flag, the range stops at 0xFFFF.
  19084. // https://mths.be/es6#sec-pattern-semantics
  19085. var BMP_SET = regenerate().addRange(0x0, 0xFFFF);
  19086. // Prepare a Regenerate set containing all code points that are supposed to be
  19087. // matched by `/./u`. https://mths.be/es6#sec-atom
  19088. var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points
  19089. .remove(
  19090. // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators):
  19091. 0x000A, // Line Feed <LF>
  19092. 0x000D, // Carriage Return <CR>
  19093. 0x2028, // Line Separator <LS>
  19094. 0x2029 // Paragraph Separator <PS>
  19095. );
  19096. // Prepare a Regenerate set containing all code points that are supposed to be
  19097. // matched by `/./` (only BMP code points).
  19098. var DOT_SET = DOT_SET_UNICODE.clone().intersection(BMP_SET);
  19099. // Add a range of code points + any case-folded code points in that range to a
  19100. // set.
  19101. regenerate.prototype.iuAddRange = function (min, max) {
  19102. var $this = this;
  19103. do {
  19104. var folded = caseFold(min);
  19105. if (folded) {
  19106. $this.add(folded);
  19107. }
  19108. } while (++min <= max);
  19109. return $this;
  19110. };
  19111. function assign(target, source) {
  19112. for (var key in source) {
  19113. // Note: `hasOwnProperty` is not needed here.
  19114. target[key] = source[key];
  19115. }
  19116. }
  19117. function update(item, pattern) {
  19118. // TODO: Test if memoizing `pattern` here is worth the effort.
  19119. if (!pattern) {
  19120. return;
  19121. }
  19122. var tree = parse(pattern, '');
  19123. switch (tree.type) {
  19124. case 'characterClass':
  19125. case 'group':
  19126. case 'value':
  19127. // No wrapping needed.
  19128. break;
  19129. default:
  19130. // Wrap the pattern in a non-capturing group.
  19131. tree = wrap(tree, pattern);
  19132. }
  19133. assign(item, tree);
  19134. }
  19135. function wrap(tree, pattern) {
  19136. // Wrap the pattern in a non-capturing group.
  19137. return {
  19138. 'type': 'group',
  19139. 'behavior': 'ignore',
  19140. 'body': [tree],
  19141. 'raw': '(?:' + pattern + ')'
  19142. };
  19143. }
  19144. function caseFold(codePoint) {
  19145. return has(iuMappings, codePoint) ? iuMappings[codePoint] : false;
  19146. }
  19147. var ignoreCase = false;
  19148. var unicode = false;
  19149. function processCharacterClass(characterClassItem) {
  19150. var set = regenerate();
  19151. var body = characterClassItem.body.forEach(function (item) {
  19152. switch (item.type) {
  19153. case 'value':
  19154. set.add(item.codePoint);
  19155. if (ignoreCase && unicode) {
  19156. var folded = caseFold(item.codePoint);
  19157. if (folded) {
  19158. set.add(folded);
  19159. }
  19160. }
  19161. break;
  19162. case 'characterClassRange':
  19163. var min = item.min.codePoint;
  19164. var max = item.max.codePoint;
  19165. set.addRange(min, max);
  19166. if (ignoreCase && unicode) {
  19167. set.iuAddRange(min, max);
  19168. }
  19169. break;
  19170. case 'characterClassEscape':
  19171. set.add(getCharacterClassEscapeSet(item.value));
  19172. break;
  19173. // The `default` clause is only here as a safeguard; it should never be
  19174. // reached. Code coverage tools should ignore it.
  19175. /* istanbul ignore next */
  19176. default:
  19177. throw Error('Unknown term type: ' + item.type);
  19178. }
  19179. });
  19180. if (characterClassItem.negative) {
  19181. set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set);
  19182. }
  19183. update(characterClassItem, set.toString());
  19184. return characterClassItem;
  19185. }
  19186. function processTerm(item) {
  19187. switch (item.type) {
  19188. case 'dot':
  19189. update(item, (unicode ? DOT_SET_UNICODE : DOT_SET).toString());
  19190. break;
  19191. case 'characterClass':
  19192. item = processCharacterClass(item);
  19193. break;
  19194. case 'characterClassEscape':
  19195. update(item, getCharacterClassEscapeSet(item.value).toString());
  19196. break;
  19197. case 'alternative':
  19198. case 'disjunction':
  19199. case 'group':
  19200. case 'quantifier':
  19201. item.body = item.body.map(processTerm);
  19202. break;
  19203. case 'value':
  19204. var codePoint = item.codePoint;
  19205. var set = regenerate(codePoint);
  19206. if (ignoreCase && unicode) {
  19207. var folded = caseFold(codePoint);
  19208. if (folded) {
  19209. set.add(folded);
  19210. }
  19211. }
  19212. update(item, set.toString());
  19213. break;
  19214. case 'anchor':
  19215. case 'empty':
  19216. case 'group':
  19217. case 'reference':
  19218. // Nothing to do here.
  19219. break;
  19220. // The `default` clause is only here as a safeguard; it should never be
  19221. // reached. Code coverage tools should ignore it.
  19222. /* istanbul ignore next */
  19223. default:
  19224. throw Error('Unknown term type: ' + item.type);
  19225. }
  19226. return item;
  19227. };
  19228. module.exports = function (pattern, flags) {
  19229. var tree = parse(pattern, flags);
  19230. ignoreCase = flags ? flags.indexOf('i') > -1 : false;
  19231. unicode = flags ? flags.indexOf('u') > -1 : false;
  19232. assign(tree, processTerm(tree));
  19233. return generate(tree);
  19234. };
  19235. });
  19236. $__System.registerDynamic("125", [], true, function ($__require, exports, module) {
  19237. var global = this || self,
  19238. GLOBAL = global;
  19239. /**
  19240. * This function is like `baseIndexOf` except that it accepts a comparator.
  19241. *
  19242. * @private
  19243. * @param {Array} array The array to inspect.
  19244. * @param {*} value The value to search for.
  19245. * @param {number} fromIndex The index to search from.
  19246. * @param {Function} comparator The comparator invoked per element.
  19247. * @returns {number} Returns the index of the matched value, else `-1`.
  19248. */
  19249. function baseIndexOfWith(array, value, fromIndex, comparator) {
  19250. var index = fromIndex - 1,
  19251. length = array.length;
  19252. while (++index < length) {
  19253. if (comparator(array[index], value)) {
  19254. return index;
  19255. }
  19256. }
  19257. return -1;
  19258. }
  19259. module.exports = baseIndexOfWith;
  19260. });
  19261. $__System.registerDynamic('126', ['49', '127', '125', '93', 'bc'], true, function ($__require, exports, module) {
  19262. var global = this || self,
  19263. GLOBAL = global;
  19264. var arrayMap = $__require('49'),
  19265. baseIndexOf = $__require('127'),
  19266. baseIndexOfWith = $__require('125'),
  19267. baseUnary = $__require('93'),
  19268. copyArray = $__require('bc');
  19269. /** Used for built-in method references. */
  19270. var arrayProto = Array.prototype;
  19271. /** Built-in value references. */
  19272. var splice = arrayProto.splice;
  19273. /**
  19274. * The base implementation of `_.pullAllBy` without support for iteratee
  19275. * shorthands.
  19276. *
  19277. * @private
  19278. * @param {Array} array The array to modify.
  19279. * @param {Array} values The values to remove.
  19280. * @param {Function} [iteratee] The iteratee invoked per element.
  19281. * @param {Function} [comparator] The comparator invoked per element.
  19282. * @returns {Array} Returns `array`.
  19283. */
  19284. function basePullAll(array, values, iteratee, comparator) {
  19285. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  19286. index = -1,
  19287. length = values.length,
  19288. seen = array;
  19289. if (array === values) {
  19290. values = copyArray(values);
  19291. }
  19292. if (iteratee) {
  19293. seen = arrayMap(array, baseUnary(iteratee));
  19294. }
  19295. while (++index < length) {
  19296. var fromIndex = 0,
  19297. value = values[index],
  19298. computed = iteratee ? iteratee(value) : value;
  19299. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  19300. if (seen !== array) {
  19301. splice.call(seen, fromIndex, 1);
  19302. }
  19303. splice.call(array, fromIndex, 1);
  19304. }
  19305. }
  19306. return array;
  19307. }
  19308. module.exports = basePullAll;
  19309. });
  19310. $__System.registerDynamic('128', ['126'], true, function ($__require, exports, module) {
  19311. var global = this || self,
  19312. GLOBAL = global;
  19313. var basePullAll = $__require('126');
  19314. /**
  19315. * This method is like `_.pull` except that it accepts an array of values to remove.
  19316. *
  19317. * **Note:** Unlike `_.difference`, this method mutates `array`.
  19318. *
  19319. * @static
  19320. * @memberOf _
  19321. * @since 4.0.0
  19322. * @category Array
  19323. * @param {Array} array The array to modify.
  19324. * @param {Array} values The values to remove.
  19325. * @returns {Array} Returns `array`.
  19326. * @example
  19327. *
  19328. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  19329. *
  19330. * _.pullAll(array, ['a', 'c']);
  19331. * console.log(array);
  19332. * // => ['b', 'b']
  19333. */
  19334. function pullAll(array, values) {
  19335. return array && array.length && values && values.length ? basePullAll(array, values) : array;
  19336. }
  19337. module.exports = pullAll;
  19338. });
  19339. $__System.registerDynamic('129', ['95', '128'], true, function ($__require, exports, module) {
  19340. var global = this || self,
  19341. GLOBAL = global;
  19342. var baseRest = $__require('95'),
  19343. pullAll = $__require('128');
  19344. /**
  19345. * Removes all given values from `array` using
  19346. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  19347. * for equality comparisons.
  19348. *
  19349. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  19350. * to remove elements from an array by predicate.
  19351. *
  19352. * @static
  19353. * @memberOf _
  19354. * @since 2.0.0
  19355. * @category Array
  19356. * @param {Array} array The array to modify.
  19357. * @param {...*} [values] The values to remove.
  19358. * @returns {Array} Returns `array`.
  19359. * @example
  19360. *
  19361. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  19362. *
  19363. * _.pull(array, 'a', 'c');
  19364. * console.log(array);
  19365. * // => ['b', 'b']
  19366. */
  19367. var pull = baseRest(pullAll);
  19368. module.exports = pull;
  19369. });
  19370. $__System.registerDynamic("11e", ["129", "11"], true, function ($__require, exports, module) {
  19371. "use strict";
  19372. var global = this || self,
  19373. GLOBAL = global;
  19374. exports.__esModule = true;
  19375. exports.is = is;
  19376. exports.pullFlag = pullFlag;
  19377. var _pull = $__require("129");
  19378. var _pull2 = _interopRequireDefault(_pull);
  19379. var _babelTypes = $__require("11");
  19380. var t = _interopRequireWildcard(_babelTypes);
  19381. function _interopRequireWildcard(obj) {
  19382. if (obj && obj.__esModule) {
  19383. return obj;
  19384. } else {
  19385. var newObj = {};if (obj != null) {
  19386. for (var key in obj) {
  19387. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  19388. }
  19389. }newObj.default = obj;return newObj;
  19390. }
  19391. }
  19392. function _interopRequireDefault(obj) {
  19393. return obj && obj.__esModule ? obj : { default: obj };
  19394. }
  19395. function is(node, flag) {
  19396. return t.isRegExpLiteral(node) && node.flags.indexOf(flag) >= 0;
  19397. }
  19398. function pullFlag(node, flag) {
  19399. var flags = node.flags.split("");
  19400. if (node.flags.indexOf(flag) < 0) return;
  19401. (0, _pull2.default)(flags, flag);
  19402. node.flags = flags.join("");
  19403. }
  19404. });
  19405. $__System.registerDynamic("12a", ["124", "11e"], true, function ($__require, exports, module) {
  19406. "use strict";
  19407. var global = this || self,
  19408. GLOBAL = global;
  19409. exports.__esModule = true;
  19410. exports.default = function () {
  19411. return {
  19412. visitor: {
  19413. RegExpLiteral: function RegExpLiteral(_ref) {
  19414. var node = _ref.node;
  19415. if (!regex.is(node, "u")) return;
  19416. node.pattern = (0, _regexpuCore2.default)(node.pattern, node.flags);
  19417. regex.pullFlag(node, "u");
  19418. }
  19419. }
  19420. };
  19421. };
  19422. var _regexpuCore = $__require("124");
  19423. var _regexpuCore2 = _interopRequireDefault(_regexpuCore);
  19424. var _babelHelperRegex = $__require("11e");
  19425. var regex = _interopRequireWildcard(_babelHelperRegex);
  19426. function _interopRequireWildcard(obj) {
  19427. if (obj && obj.__esModule) {
  19428. return obj;
  19429. } else {
  19430. var newObj = {};if (obj != null) {
  19431. for (var key in obj) {
  19432. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  19433. }
  19434. }newObj.default = obj;return newObj;
  19435. }
  19436. }
  19437. function _interopRequireDefault(obj) {
  19438. return obj && obj.__esModule ? obj : { default: obj };
  19439. }
  19440. module.exports = exports["default"];
  19441. });
  19442. $__System.registerDynamic("12b", ["17"], true, function ($__require, exports, module) {
  19443. "use strict";
  19444. var global = this || self,
  19445. GLOBAL = global;
  19446. exports.__esModule = true;
  19447. var _getIterator2 = $__require("17");
  19448. var _getIterator3 = _interopRequireDefault(_getIterator2);
  19449. exports.default = function (_ref) {
  19450. var messages = _ref.messages;
  19451. return {
  19452. visitor: {
  19453. Scope: function Scope(_ref2) {
  19454. var scope = _ref2.scope;
  19455. for (var name in scope.bindings) {
  19456. var binding = scope.bindings[name];
  19457. if (binding.kind !== "const" && binding.kind !== "module") continue;
  19458. for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  19459. var _ref3;
  19460. if (_isArray) {
  19461. if (_i >= _iterator.length) break;
  19462. _ref3 = _iterator[_i++];
  19463. } else {
  19464. _i = _iterator.next();
  19465. if (_i.done) break;
  19466. _ref3 = _i.value;
  19467. }
  19468. var violation = _ref3;
  19469. throw violation.buildCodeFrameError(messages.get("readOnly", name));
  19470. }
  19471. }
  19472. }
  19473. }
  19474. };
  19475. };
  19476. function _interopRequireDefault(obj) {
  19477. return obj && obj.__esModule ? obj : { default: obj };
  19478. }
  19479. module.exports = exports["default"];
  19480. });
  19481. $__System.registerDynamic("12c", ["17"], true, function ($__require, exports, module) {
  19482. "use strict";
  19483. var global = this || self,
  19484. GLOBAL = global;
  19485. exports.__esModule = true;
  19486. var _getIterator2 = $__require("17");
  19487. var _getIterator3 = _interopRequireDefault(_getIterator2);
  19488. exports.default = function (_ref) {
  19489. var t = _ref.types;
  19490. function getSpreadLiteral(spread, scope, state) {
  19491. if (state.opts.loose && !t.isIdentifier(spread.argument, { name: "arguments" })) {
  19492. return spread.argument;
  19493. } else {
  19494. return scope.toArray(spread.argument, true);
  19495. }
  19496. }
  19497. function hasSpread(nodes) {
  19498. for (var i = 0; i < nodes.length; i++) {
  19499. if (t.isSpreadElement(nodes[i])) {
  19500. return true;
  19501. }
  19502. }
  19503. return false;
  19504. }
  19505. function build(props, scope, state) {
  19506. var nodes = [];
  19507. var _props = [];
  19508. function push() {
  19509. if (!_props.length) return;
  19510. nodes.push(t.arrayExpression(_props));
  19511. _props = [];
  19512. }
  19513. for (var _iterator = props, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  19514. var _ref2;
  19515. if (_isArray) {
  19516. if (_i >= _iterator.length) break;
  19517. _ref2 = _iterator[_i++];
  19518. } else {
  19519. _i = _iterator.next();
  19520. if (_i.done) break;
  19521. _ref2 = _i.value;
  19522. }
  19523. var prop = _ref2;
  19524. if (t.isSpreadElement(prop)) {
  19525. push();
  19526. nodes.push(getSpreadLiteral(prop, scope, state));
  19527. } else {
  19528. _props.push(prop);
  19529. }
  19530. }
  19531. push();
  19532. return nodes;
  19533. }
  19534. return {
  19535. visitor: {
  19536. ArrayExpression: function ArrayExpression(path, state) {
  19537. var node = path.node,
  19538. scope = path.scope;
  19539. var elements = node.elements;
  19540. if (!hasSpread(elements)) return;
  19541. var nodes = build(elements, scope, state);
  19542. var first = nodes.shift();
  19543. if (!t.isArrayExpression(first)) {
  19544. nodes.unshift(first);
  19545. first = t.arrayExpression([]);
  19546. }
  19547. path.replaceWith(t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes));
  19548. },
  19549. CallExpression: function CallExpression(path, state) {
  19550. var node = path.node,
  19551. scope = path.scope;
  19552. var args = node.arguments;
  19553. if (!hasSpread(args)) return;
  19554. var calleePath = path.get("callee");
  19555. if (calleePath.isSuper()) return;
  19556. var contextLiteral = t.identifier("undefined");
  19557. node.arguments = [];
  19558. var nodes = void 0;
  19559. if (args.length === 1 && args[0].argument.name === "arguments") {
  19560. nodes = [args[0].argument];
  19561. } else {
  19562. nodes = build(args, scope, state);
  19563. }
  19564. var first = nodes.shift();
  19565. if (nodes.length) {
  19566. node.arguments.push(t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes));
  19567. } else {
  19568. node.arguments.push(first);
  19569. }
  19570. var callee = node.callee;
  19571. if (calleePath.isMemberExpression()) {
  19572. var temp = scope.maybeGenerateMemoised(callee.object);
  19573. if (temp) {
  19574. callee.object = t.assignmentExpression("=", temp, callee.object);
  19575. contextLiteral = temp;
  19576. } else {
  19577. contextLiteral = callee.object;
  19578. }
  19579. t.appendToMemberExpression(callee, t.identifier("apply"));
  19580. } else {
  19581. node.callee = t.memberExpression(node.callee, t.identifier("apply"));
  19582. }
  19583. if (t.isSuper(contextLiteral)) {
  19584. contextLiteral = t.thisExpression();
  19585. }
  19586. node.arguments.unshift(contextLiteral);
  19587. },
  19588. NewExpression: function NewExpression(path, state) {
  19589. var node = path.node,
  19590. scope = path.scope;
  19591. var args = node.arguments;
  19592. if (!hasSpread(args)) return;
  19593. var nodes = build(args, scope, state);
  19594. var context = t.arrayExpression([t.nullLiteral()]);
  19595. args = t.callExpression(t.memberExpression(context, t.identifier("concat")), nodes);
  19596. path.replaceWith(t.newExpression(t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Function"), t.identifier("prototype")), t.identifier("bind")), t.identifier("apply")), [node.callee, args]), []));
  19597. }
  19598. }
  19599. };
  19600. };
  19601. function _interopRequireDefault(obj) {
  19602. return obj && obj.__esModule ? obj : { default: obj };
  19603. }
  19604. module.exports = exports["default"];
  19605. });
  19606. $__System.registerDynamic("12d", ["11"], true, function ($__require, exports, module) {
  19607. "use strict";
  19608. var global = this || self,
  19609. GLOBAL = global;
  19610. exports.__esModule = true;
  19611. exports.visitor = undefined;
  19612. var _babelTypes = $__require("11");
  19613. var t = _interopRequireWildcard(_babelTypes);
  19614. function _interopRequireWildcard(obj) {
  19615. if (obj && obj.__esModule) {
  19616. return obj;
  19617. } else {
  19618. var newObj = {};if (obj != null) {
  19619. for (var key in obj) {
  19620. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  19621. }
  19622. }newObj.default = obj;return newObj;
  19623. }
  19624. }
  19625. var visitor = exports.visitor = {
  19626. Function: function Function(path) {
  19627. var params = path.get("params");
  19628. var hoistTweak = t.isRestElement(params[params.length - 1]) ? 1 : 0;
  19629. var outputParamsLength = params.length - hoistTweak;
  19630. for (var i = 0; i < outputParamsLength; i++) {
  19631. var param = params[i];
  19632. if (param.isArrayPattern() || param.isObjectPattern()) {
  19633. var uid = path.scope.generateUidIdentifier("ref");
  19634. var declar = t.variableDeclaration("let", [t.variableDeclarator(param.node, uid)]);
  19635. declar._blockHoist = outputParamsLength - i;
  19636. path.ensureBlock();
  19637. path.get("body").unshiftContainer("body", declar);
  19638. param.replaceWith(uid);
  19639. }
  19640. }
  19641. }
  19642. };
  19643. });
  19644. $__System.registerDynamic("117", ["11"], true, function ($__require, exports, module) {
  19645. "use strict";
  19646. var global = this || self,
  19647. GLOBAL = global;
  19648. exports.__esModule = true;
  19649. exports.default = function (node) {
  19650. var params = node.params;
  19651. for (var i = 0; i < params.length; i++) {
  19652. var param = params[i];
  19653. if (t.isAssignmentPattern(param) || t.isRestElement(param)) {
  19654. return i;
  19655. }
  19656. }
  19657. return params.length;
  19658. };
  19659. var _babelTypes = $__require("11");
  19660. var t = _interopRequireWildcard(_babelTypes);
  19661. function _interopRequireWildcard(obj) {
  19662. if (obj && obj.__esModule) {
  19663. return obj;
  19664. } else {
  19665. var newObj = {};if (obj != null) {
  19666. for (var key in obj) {
  19667. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  19668. }
  19669. }newObj.default = obj;return newObj;
  19670. }
  19671. }
  19672. module.exports = exports["default"];
  19673. });
  19674. $__System.registerDynamic("db", ["17", "11"], true, function ($__require, exports, module) {
  19675. "use strict";
  19676. var global = this || self,
  19677. GLOBAL = global;
  19678. exports.__esModule = true;
  19679. var _getIterator2 = $__require("17");
  19680. var _getIterator3 = _interopRequireDefault(_getIterator2);
  19681. exports.default = function (path, emit) {
  19682. var kind = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "var";
  19683. path.traverse(visitor, { kind: kind, emit: emit });
  19684. };
  19685. var _babelTypes = $__require("11");
  19686. var t = _interopRequireWildcard(_babelTypes);
  19687. function _interopRequireWildcard(obj) {
  19688. if (obj && obj.__esModule) {
  19689. return obj;
  19690. } else {
  19691. var newObj = {};if (obj != null) {
  19692. for (var key in obj) {
  19693. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  19694. }
  19695. }newObj.default = obj;return newObj;
  19696. }
  19697. }
  19698. function _interopRequireDefault(obj) {
  19699. return obj && obj.__esModule ? obj : { default: obj };
  19700. }
  19701. var visitor = {
  19702. Scope: function Scope(path, state) {
  19703. if (state.kind === "let") path.skip();
  19704. },
  19705. Function: function Function(path) {
  19706. path.skip();
  19707. },
  19708. VariableDeclaration: function VariableDeclaration(path, state) {
  19709. if (state.kind && path.node.kind !== state.kind) return;
  19710. var nodes = [];
  19711. var declarations = path.get("declarations");
  19712. var firstId = void 0;
  19713. for (var _iterator = declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  19714. var _ref;
  19715. if (_isArray) {
  19716. if (_i >= _iterator.length) break;
  19717. _ref = _iterator[_i++];
  19718. } else {
  19719. _i = _iterator.next();
  19720. if (_i.done) break;
  19721. _ref = _i.value;
  19722. }
  19723. var declar = _ref;
  19724. firstId = declar.node.id;
  19725. if (declar.node.init) {
  19726. nodes.push(t.expressionStatement(t.assignmentExpression("=", declar.node.id, declar.node.init)));
  19727. }
  19728. for (var name in declar.getBindingIdentifiers()) {
  19729. state.emit(t.identifier(name), name);
  19730. }
  19731. }
  19732. if (path.parentPath.isFor({ left: path.node })) {
  19733. path.replaceWith(firstId);
  19734. } else {
  19735. path.replaceWithMultiple(nodes);
  19736. }
  19737. }
  19738. };
  19739. module.exports = exports["default"];
  19740. });
  19741. $__System.registerDynamic("12e", ["db", "11"], true, function ($__require, exports, module) {
  19742. "use strict";
  19743. var global = this || self,
  19744. GLOBAL = global;
  19745. exports.__esModule = true;
  19746. exports.default = function (path) {
  19747. var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : path.scope;
  19748. var node = path.node;
  19749. var container = t.functionExpression(null, [], node.body, node.generator, node.async);
  19750. var callee = container;
  19751. var args = [];
  19752. (0, _babelHelperHoistVariables2.default)(path, function (id) {
  19753. return scope.push({ id: id });
  19754. });
  19755. var state = {
  19756. foundThis: false,
  19757. foundArguments: false
  19758. };
  19759. path.traverse(visitor, state);
  19760. if (state.foundArguments) {
  19761. callee = t.memberExpression(container, t.identifier("apply"));
  19762. args = [];
  19763. if (state.foundThis) {
  19764. args.push(t.thisExpression());
  19765. }
  19766. if (state.foundArguments) {
  19767. if (!state.foundThis) args.push(t.nullLiteral());
  19768. args.push(t.identifier("arguments"));
  19769. }
  19770. }
  19771. var call = t.callExpression(callee, args);
  19772. if (node.generator) call = t.yieldExpression(call, true);
  19773. return t.returnStatement(call);
  19774. };
  19775. var _babelHelperHoistVariables = $__require("db");
  19776. var _babelHelperHoistVariables2 = _interopRequireDefault(_babelHelperHoistVariables);
  19777. var _babelTypes = $__require("11");
  19778. var t = _interopRequireWildcard(_babelTypes);
  19779. function _interopRequireWildcard(obj) {
  19780. if (obj && obj.__esModule) {
  19781. return obj;
  19782. } else {
  19783. var newObj = {};if (obj != null) {
  19784. for (var key in obj) {
  19785. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  19786. }
  19787. }newObj.default = obj;return newObj;
  19788. }
  19789. }
  19790. function _interopRequireDefault(obj) {
  19791. return obj && obj.__esModule ? obj : { default: obj };
  19792. }
  19793. var visitor = {
  19794. enter: function enter(path, state) {
  19795. if (path.isThisExpression()) {
  19796. state.foundThis = true;
  19797. }
  19798. if (path.isReferencedIdentifier({ name: "arguments" })) {
  19799. state.foundArguments = true;
  19800. }
  19801. },
  19802. Function: function Function(path) {
  19803. path.skip();
  19804. }
  19805. };
  19806. module.exports = exports["default"];
  19807. });
  19808. $__System.registerDynamic("12f", ["17", "117", "12e", "10", "11"], true, function ($__require, exports, module) {
  19809. "use strict";
  19810. var global = this || self,
  19811. GLOBAL = global;
  19812. exports.__esModule = true;
  19813. exports.visitor = undefined;
  19814. var _getIterator2 = $__require("17");
  19815. var _getIterator3 = _interopRequireDefault(_getIterator2);
  19816. var _babelHelperGetFunctionArity = $__require("117");
  19817. var _babelHelperGetFunctionArity2 = _interopRequireDefault(_babelHelperGetFunctionArity);
  19818. var _babelHelperCallDelegate = $__require("12e");
  19819. var _babelHelperCallDelegate2 = _interopRequireDefault(_babelHelperCallDelegate);
  19820. var _babelTemplate = $__require("10");
  19821. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  19822. var _babelTypes = $__require("11");
  19823. var t = _interopRequireWildcard(_babelTypes);
  19824. function _interopRequireWildcard(obj) {
  19825. if (obj && obj.__esModule) {
  19826. return obj;
  19827. } else {
  19828. var newObj = {};if (obj != null) {
  19829. for (var key in obj) {
  19830. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  19831. }
  19832. }newObj.default = obj;return newObj;
  19833. }
  19834. }
  19835. function _interopRequireDefault(obj) {
  19836. return obj && obj.__esModule ? obj : { default: obj };
  19837. }
  19838. var buildDefaultParam = (0, _babelTemplate2.default)("\n let VARIABLE_NAME =\n ARGUMENTS.length > ARGUMENT_KEY && ARGUMENTS[ARGUMENT_KEY] !== undefined ?\n ARGUMENTS[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n");
  19839. var buildCutOff = (0, _babelTemplate2.default)("\n let $0 = $1[$2];\n");
  19840. function hasDefaults(node) {
  19841. for (var _iterator = node.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  19842. var _ref;
  19843. if (_isArray) {
  19844. if (_i >= _iterator.length) break;
  19845. _ref = _iterator[_i++];
  19846. } else {
  19847. _i = _iterator.next();
  19848. if (_i.done) break;
  19849. _ref = _i.value;
  19850. }
  19851. var param = _ref;
  19852. if (!t.isIdentifier(param)) return true;
  19853. }
  19854. return false;
  19855. }
  19856. function isSafeBinding(scope, node) {
  19857. if (!scope.hasOwnBinding(node.name)) return true;
  19858. var _scope$getOwnBinding = scope.getOwnBinding(node.name),
  19859. kind = _scope$getOwnBinding.kind;
  19860. return kind === "param" || kind === "local";
  19861. }
  19862. var iifeVisitor = {
  19863. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  19864. var scope = path.scope,
  19865. node = path.node;
  19866. if (node.name === "eval" || !isSafeBinding(scope, node)) {
  19867. state.iife = true;
  19868. path.stop();
  19869. }
  19870. },
  19871. Scope: function Scope(path) {
  19872. path.skip();
  19873. }
  19874. };
  19875. var visitor = exports.visitor = {
  19876. Function: function Function(path) {
  19877. var node = path.node,
  19878. scope = path.scope;
  19879. if (!hasDefaults(node)) return;
  19880. path.ensureBlock();
  19881. var state = {
  19882. iife: false,
  19883. scope: scope
  19884. };
  19885. var body = [];
  19886. var argsIdentifier = t.identifier("arguments");
  19887. argsIdentifier._shadowedFunctionLiteral = path;
  19888. function pushDefNode(left, right, i) {
  19889. var defNode = buildDefaultParam({
  19890. VARIABLE_NAME: left,
  19891. DEFAULT_VALUE: right,
  19892. ARGUMENT_KEY: t.numericLiteral(i),
  19893. ARGUMENTS: argsIdentifier
  19894. });
  19895. defNode._blockHoist = node.params.length - i;
  19896. body.push(defNode);
  19897. }
  19898. var lastNonDefaultParam = (0, _babelHelperGetFunctionArity2.default)(node);
  19899. var params = path.get("params");
  19900. for (var i = 0; i < params.length; i++) {
  19901. var param = params[i];
  19902. if (!param.isAssignmentPattern()) {
  19903. if (!state.iife && !param.isIdentifier()) {
  19904. param.traverse(iifeVisitor, state);
  19905. }
  19906. continue;
  19907. }
  19908. var left = param.get("left");
  19909. var right = param.get("right");
  19910. if (i >= lastNonDefaultParam || left.isPattern()) {
  19911. var placeholder = scope.generateUidIdentifier("x");
  19912. placeholder._isDefaultPlaceholder = true;
  19913. node.params[i] = placeholder;
  19914. } else {
  19915. node.params[i] = left.node;
  19916. }
  19917. if (!state.iife) {
  19918. if (right.isIdentifier() && !isSafeBinding(scope, right.node)) {
  19919. state.iife = true;
  19920. } else {
  19921. right.traverse(iifeVisitor, state);
  19922. }
  19923. }
  19924. pushDefNode(left.node, right.node, i);
  19925. }
  19926. for (var _i2 = lastNonDefaultParam + 1; _i2 < node.params.length; _i2++) {
  19927. var _param = node.params[_i2];
  19928. if (_param._isDefaultPlaceholder) continue;
  19929. var declar = buildCutOff(_param, argsIdentifier, t.numericLiteral(_i2));
  19930. declar._blockHoist = node.params.length - _i2;
  19931. body.push(declar);
  19932. }
  19933. node.params = node.params.slice(0, lastNonDefaultParam);
  19934. if (state.iife) {
  19935. body.push((0, _babelHelperCallDelegate2.default)(path, scope));
  19936. path.set("body", t.blockStatement(body));
  19937. } else {
  19938. path.get("body").unshiftContainer("body", body);
  19939. }
  19940. }
  19941. };
  19942. });
  19943. $__System.registerDynamic("130", ["17", "10", "11"], true, function ($__require, exports, module) {
  19944. "use strict";
  19945. var global = this || self,
  19946. GLOBAL = global;
  19947. exports.__esModule = true;
  19948. exports.visitor = undefined;
  19949. var _getIterator2 = $__require("17");
  19950. var _getIterator3 = _interopRequireDefault(_getIterator2);
  19951. var _babelTemplate = $__require("10");
  19952. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  19953. var _babelTypes = $__require("11");
  19954. var t = _interopRequireWildcard(_babelTypes);
  19955. function _interopRequireWildcard(obj) {
  19956. if (obj && obj.__esModule) {
  19957. return obj;
  19958. } else {
  19959. var newObj = {};if (obj != null) {
  19960. for (var key in obj) {
  19961. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  19962. }
  19963. }newObj.default = obj;return newObj;
  19964. }
  19965. }
  19966. function _interopRequireDefault(obj) {
  19967. return obj && obj.__esModule ? obj : { default: obj };
  19968. }
  19969. var buildRest = (0, _babelTemplate2.default)("\n for (var LEN = ARGUMENTS.length,\n ARRAY = Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n");
  19970. var restIndex = (0, _babelTemplate2.default)("\n ARGUMENTS.length <= INDEX ? undefined : ARGUMENTS[INDEX]\n");
  19971. var restIndexImpure = (0, _babelTemplate2.default)("\n REF = INDEX, ARGUMENTS.length <= REF ? undefined : ARGUMENTS[REF]\n");
  19972. var restLength = (0, _babelTemplate2.default)("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n");
  19973. var memberExpressionOptimisationVisitor = {
  19974. Scope: function Scope(path, state) {
  19975. if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) {
  19976. path.skip();
  19977. }
  19978. },
  19979. Flow: function Flow(path) {
  19980. if (path.isTypeCastExpression()) return;
  19981. path.skip();
  19982. },
  19983. "Function|ClassProperty": function FunctionClassProperty(path, state) {
  19984. var oldNoOptimise = state.noOptimise;
  19985. state.noOptimise = true;
  19986. path.traverse(memberExpressionOptimisationVisitor, state);
  19987. state.noOptimise = oldNoOptimise;
  19988. path.skip();
  19989. },
  19990. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  19991. var node = path.node;
  19992. if (node.name === "arguments") {
  19993. state.deopted = true;
  19994. }
  19995. if (node.name !== state.name) return;
  19996. if (state.noOptimise) {
  19997. state.deopted = true;
  19998. } else {
  19999. var parentPath = path.parentPath;
  20000. if (parentPath.listKey === "params" && parentPath.key < state.offset) {
  20001. return;
  20002. }
  20003. if (parentPath.isMemberExpression({ object: node })) {
  20004. var grandparentPath = parentPath.parentPath;
  20005. var argsOptEligible = !state.deopted && !(grandparentPath.isAssignmentExpression() && parentPath.node === grandparentPath.node.left || grandparentPath.isLVal() || grandparentPath.isForXStatement() || grandparentPath.isUpdateExpression() || grandparentPath.isUnaryExpression({ operator: "delete" }) || (grandparentPath.isCallExpression() || grandparentPath.isNewExpression()) && parentPath.node === grandparentPath.node.callee);
  20006. if (argsOptEligible) {
  20007. if (parentPath.node.computed) {
  20008. if (parentPath.get("property").isBaseType("number")) {
  20009. state.candidates.push({ cause: "indexGetter", path: path });
  20010. return;
  20011. }
  20012. } else if (parentPath.node.property.name === "length") {
  20013. state.candidates.push({ cause: "lengthGetter", path: path });
  20014. return;
  20015. }
  20016. }
  20017. }
  20018. if (state.offset === 0 && parentPath.isSpreadElement()) {
  20019. var call = parentPath.parentPath;
  20020. if (call.isCallExpression() && call.node.arguments.length === 1) {
  20021. state.candidates.push({ cause: "argSpread", path: path });
  20022. return;
  20023. }
  20024. }
  20025. state.references.push(path);
  20026. }
  20027. },
  20028. BindingIdentifier: function BindingIdentifier(_ref, state) {
  20029. var node = _ref.node;
  20030. if (node.name === state.name) {
  20031. state.deopted = true;
  20032. }
  20033. }
  20034. };
  20035. function hasRest(node) {
  20036. return t.isRestElement(node.params[node.params.length - 1]);
  20037. }
  20038. function optimiseIndexGetter(path, argsId, offset) {
  20039. var index = void 0;
  20040. if (t.isNumericLiteral(path.parent.property)) {
  20041. index = t.numericLiteral(path.parent.property.value + offset);
  20042. } else if (offset === 0) {
  20043. index = path.parent.property;
  20044. } else {
  20045. index = t.binaryExpression("+", path.parent.property, t.numericLiteral(offset));
  20046. }
  20047. var scope = path.scope;
  20048. if (!scope.isPure(index)) {
  20049. var temp = scope.generateUidIdentifierBasedOnNode(index);
  20050. scope.push({ id: temp, kind: "var" });
  20051. path.parentPath.replaceWith(restIndexImpure({
  20052. ARGUMENTS: argsId,
  20053. INDEX: index,
  20054. REF: temp
  20055. }));
  20056. } else {
  20057. path.parentPath.replaceWith(restIndex({
  20058. ARGUMENTS: argsId,
  20059. INDEX: index
  20060. }));
  20061. }
  20062. }
  20063. function optimiseLengthGetter(path, argsId, offset) {
  20064. if (offset) {
  20065. path.parentPath.replaceWith(restLength({
  20066. ARGUMENTS: argsId,
  20067. OFFSET: t.numericLiteral(offset)
  20068. }));
  20069. } else {
  20070. path.replaceWith(argsId);
  20071. }
  20072. }
  20073. var visitor = exports.visitor = {
  20074. Function: function Function(path) {
  20075. var node = path.node,
  20076. scope = path.scope;
  20077. if (!hasRest(node)) return;
  20078. var rest = node.params.pop().argument;
  20079. var argsId = t.identifier("arguments");
  20080. argsId._shadowedFunctionLiteral = path;
  20081. var state = {
  20082. references: [],
  20083. offset: node.params.length,
  20084. argumentsNode: argsId,
  20085. outerBinding: scope.getBindingIdentifier(rest.name),
  20086. candidates: [],
  20087. name: rest.name,
  20088. deopted: false
  20089. };
  20090. path.traverse(memberExpressionOptimisationVisitor, state);
  20091. if (!state.deopted && !state.references.length) {
  20092. for (var _iterator = state.candidates, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  20093. var _ref3;
  20094. if (_isArray) {
  20095. if (_i >= _iterator.length) break;
  20096. _ref3 = _iterator[_i++];
  20097. } else {
  20098. _i = _iterator.next();
  20099. if (_i.done) break;
  20100. _ref3 = _i.value;
  20101. }
  20102. var _ref4 = _ref3;
  20103. var _path = _ref4.path,
  20104. cause = _ref4.cause;
  20105. switch (cause) {
  20106. case "indexGetter":
  20107. optimiseIndexGetter(_path, argsId, state.offset);
  20108. break;
  20109. case "lengthGetter":
  20110. optimiseLengthGetter(_path, argsId, state.offset);
  20111. break;
  20112. default:
  20113. _path.replaceWith(argsId);
  20114. }
  20115. }
  20116. return;
  20117. }
  20118. state.references = state.references.concat(state.candidates.map(function (_ref5) {
  20119. var path = _ref5.path;
  20120. return path;
  20121. }));
  20122. state.deopted = state.deopted || !!node.shadow;
  20123. var start = t.numericLiteral(node.params.length);
  20124. var key = scope.generateUidIdentifier("key");
  20125. var len = scope.generateUidIdentifier("len");
  20126. var arrKey = key;
  20127. var arrLen = len;
  20128. if (node.params.length) {
  20129. arrKey = t.binaryExpression("-", key, start);
  20130. arrLen = t.conditionalExpression(t.binaryExpression(">", len, start), t.binaryExpression("-", len, start), t.numericLiteral(0));
  20131. }
  20132. var loop = buildRest({
  20133. ARGUMENTS: argsId,
  20134. ARRAY_KEY: arrKey,
  20135. ARRAY_LEN: arrLen,
  20136. START: start,
  20137. ARRAY: rest,
  20138. KEY: key,
  20139. LEN: len
  20140. });
  20141. if (state.deopted) {
  20142. loop._blockHoist = node.params.length + 1;
  20143. node.body.body.unshift(loop);
  20144. } else {
  20145. loop._blockHoist = 1;
  20146. var target = path.getEarliestCommonAncestorFrom(state.references).getStatementParent();
  20147. target.findParent(function (path) {
  20148. if (path.isLoop()) {
  20149. target = path;
  20150. } else {
  20151. return path.isFunction();
  20152. }
  20153. });
  20154. target.insertBefore(loop);
  20155. }
  20156. }
  20157. };
  20158. });
  20159. $__System.registerDynamic("131", ["17", "d0", "12d", "12f", "130"], true, function ($__require, exports, module) {
  20160. "use strict";
  20161. var global = this || self,
  20162. GLOBAL = global;
  20163. exports.__esModule = true;
  20164. var _getIterator2 = $__require("17");
  20165. var _getIterator3 = _interopRequireDefault(_getIterator2);
  20166. exports.default = function () {
  20167. return {
  20168. visitor: _babelTraverse.visitors.merge([{
  20169. ArrowFunctionExpression: function ArrowFunctionExpression(path) {
  20170. var params = path.get("params");
  20171. for (var _iterator = params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  20172. var _ref;
  20173. if (_isArray) {
  20174. if (_i >= _iterator.length) break;
  20175. _ref = _iterator[_i++];
  20176. } else {
  20177. _i = _iterator.next();
  20178. if (_i.done) break;
  20179. _ref = _i.value;
  20180. }
  20181. var param = _ref;
  20182. if (param.isRestElement() || param.isAssignmentPattern()) {
  20183. path.arrowFunctionToShadowed();
  20184. break;
  20185. }
  20186. }
  20187. }
  20188. }, destructuring.visitor, rest.visitor, def.visitor])
  20189. };
  20190. };
  20191. var _babelTraverse = $__require("d0");
  20192. var _destructuring = $__require("12d");
  20193. var destructuring = _interopRequireWildcard(_destructuring);
  20194. var _default = $__require("12f");
  20195. var def = _interopRequireWildcard(_default);
  20196. var _rest = $__require("130");
  20197. var rest = _interopRequireWildcard(_rest);
  20198. function _interopRequireWildcard(obj) {
  20199. if (obj && obj.__esModule) {
  20200. return obj;
  20201. } else {
  20202. var newObj = {};if (obj != null) {
  20203. for (var key in obj) {
  20204. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  20205. }
  20206. }newObj.default = obj;return newObj;
  20207. }
  20208. }
  20209. function _interopRequireDefault(obj) {
  20210. return obj && obj.__esModule ? obj : { default: obj };
  20211. }
  20212. module.exports = exports["default"];
  20213. });
  20214. $__System.registerDynamic("132", ["1d", "17"], true, function ($__require, exports, module) {
  20215. "use strict";
  20216. var global = this || self,
  20217. GLOBAL = global;
  20218. exports.__esModule = true;
  20219. var _classCallCheck2 = $__require("1d");
  20220. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  20221. var _getIterator2 = $__require("17");
  20222. var _getIterator3 = _interopRequireDefault(_getIterator2);
  20223. exports.default = function (_ref) {
  20224. var t = _ref.types;
  20225. function variableDeclarationHasPattern(node) {
  20226. for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  20227. var _ref2;
  20228. if (_isArray) {
  20229. if (_i >= _iterator.length) break;
  20230. _ref2 = _iterator[_i++];
  20231. } else {
  20232. _i = _iterator.next();
  20233. if (_i.done) break;
  20234. _ref2 = _i.value;
  20235. }
  20236. var declar = _ref2;
  20237. if (t.isPattern(declar.id)) {
  20238. return true;
  20239. }
  20240. }
  20241. return false;
  20242. }
  20243. function hasRest(pattern) {
  20244. for (var _iterator2 = pattern.elements, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  20245. var _ref3;
  20246. if (_isArray2) {
  20247. if (_i2 >= _iterator2.length) break;
  20248. _ref3 = _iterator2[_i2++];
  20249. } else {
  20250. _i2 = _iterator2.next();
  20251. if (_i2.done) break;
  20252. _ref3 = _i2.value;
  20253. }
  20254. var elem = _ref3;
  20255. if (t.isRestElement(elem)) {
  20256. return true;
  20257. }
  20258. }
  20259. return false;
  20260. }
  20261. var arrayUnpackVisitor = {
  20262. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  20263. if (state.bindings[path.node.name]) {
  20264. state.deopt = true;
  20265. path.stop();
  20266. }
  20267. }
  20268. };
  20269. var DestructuringTransformer = function () {
  20270. function DestructuringTransformer(opts) {
  20271. (0, _classCallCheck3.default)(this, DestructuringTransformer);
  20272. this.blockHoist = opts.blockHoist;
  20273. this.operator = opts.operator;
  20274. this.arrays = {};
  20275. this.nodes = opts.nodes || [];
  20276. this.scope = opts.scope;
  20277. this.file = opts.file;
  20278. this.kind = opts.kind;
  20279. }
  20280. DestructuringTransformer.prototype.buildVariableAssignment = function buildVariableAssignment(id, init) {
  20281. var op = this.operator;
  20282. if (t.isMemberExpression(id)) op = "=";
  20283. var node = void 0;
  20284. if (op) {
  20285. node = t.expressionStatement(t.assignmentExpression(op, id, init));
  20286. } else {
  20287. node = t.variableDeclaration(this.kind, [t.variableDeclarator(id, init)]);
  20288. }
  20289. node._blockHoist = this.blockHoist;
  20290. return node;
  20291. };
  20292. DestructuringTransformer.prototype.buildVariableDeclaration = function buildVariableDeclaration(id, init) {
  20293. var declar = t.variableDeclaration("var", [t.variableDeclarator(id, init)]);
  20294. declar._blockHoist = this.blockHoist;
  20295. return declar;
  20296. };
  20297. DestructuringTransformer.prototype.push = function push(id, init) {
  20298. if (t.isObjectPattern(id)) {
  20299. this.pushObjectPattern(id, init);
  20300. } else if (t.isArrayPattern(id)) {
  20301. this.pushArrayPattern(id, init);
  20302. } else if (t.isAssignmentPattern(id)) {
  20303. this.pushAssignmentPattern(id, init);
  20304. } else {
  20305. this.nodes.push(this.buildVariableAssignment(id, init));
  20306. }
  20307. };
  20308. DestructuringTransformer.prototype.toArray = function toArray(node, count) {
  20309. if (this.file.opts.loose || t.isIdentifier(node) && this.arrays[node.name]) {
  20310. return node;
  20311. } else {
  20312. return this.scope.toArray(node, count);
  20313. }
  20314. };
  20315. DestructuringTransformer.prototype.pushAssignmentPattern = function pushAssignmentPattern(pattern, valueRef) {
  20316. var tempValueRef = this.scope.generateUidIdentifierBasedOnNode(valueRef);
  20317. var declar = t.variableDeclaration("var", [t.variableDeclarator(tempValueRef, valueRef)]);
  20318. declar._blockHoist = this.blockHoist;
  20319. this.nodes.push(declar);
  20320. var tempConditional = t.conditionalExpression(t.binaryExpression("===", tempValueRef, t.identifier("undefined")), pattern.right, tempValueRef);
  20321. var left = pattern.left;
  20322. if (t.isPattern(left)) {
  20323. var tempValueDefault = t.expressionStatement(t.assignmentExpression("=", tempValueRef, tempConditional));
  20324. tempValueDefault._blockHoist = this.blockHoist;
  20325. this.nodes.push(tempValueDefault);
  20326. this.push(left, tempValueRef);
  20327. } else {
  20328. this.nodes.push(this.buildVariableAssignment(left, tempConditional));
  20329. }
  20330. };
  20331. DestructuringTransformer.prototype.pushObjectRest = function pushObjectRest(pattern, objRef, spreadProp, spreadPropIndex) {
  20332. var keys = [];
  20333. for (var i = 0; i < pattern.properties.length; i++) {
  20334. var prop = pattern.properties[i];
  20335. if (i >= spreadPropIndex) break;
  20336. if (t.isRestProperty(prop)) continue;
  20337. var key = prop.key;
  20338. if (t.isIdentifier(key) && !prop.computed) key = t.stringLiteral(prop.key.name);
  20339. keys.push(key);
  20340. }
  20341. keys = t.arrayExpression(keys);
  20342. var value = t.callExpression(this.file.addHelper("objectWithoutProperties"), [objRef, keys]);
  20343. this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value));
  20344. };
  20345. DestructuringTransformer.prototype.pushObjectProperty = function pushObjectProperty(prop, propRef) {
  20346. if (t.isLiteral(prop.key)) prop.computed = true;
  20347. var pattern = prop.value;
  20348. var objRef = t.memberExpression(propRef, prop.key, prop.computed);
  20349. if (t.isPattern(pattern)) {
  20350. this.push(pattern, objRef);
  20351. } else {
  20352. this.nodes.push(this.buildVariableAssignment(pattern, objRef));
  20353. }
  20354. };
  20355. DestructuringTransformer.prototype.pushObjectPattern = function pushObjectPattern(pattern, objRef) {
  20356. if (!pattern.properties.length) {
  20357. this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("objectDestructuringEmpty"), [objRef])));
  20358. }
  20359. if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) {
  20360. var temp = this.scope.generateUidIdentifierBasedOnNode(objRef);
  20361. this.nodes.push(this.buildVariableDeclaration(temp, objRef));
  20362. objRef = temp;
  20363. }
  20364. for (var i = 0; i < pattern.properties.length; i++) {
  20365. var prop = pattern.properties[i];
  20366. if (t.isRestProperty(prop)) {
  20367. this.pushObjectRest(pattern, objRef, prop, i);
  20368. } else {
  20369. this.pushObjectProperty(prop, objRef);
  20370. }
  20371. }
  20372. };
  20373. DestructuringTransformer.prototype.canUnpackArrayPattern = function canUnpackArrayPattern(pattern, arr) {
  20374. if (!t.isArrayExpression(arr)) return false;
  20375. if (pattern.elements.length > arr.elements.length) return;
  20376. if (pattern.elements.length < arr.elements.length && !hasRest(pattern)) return false;
  20377. for (var _iterator3 = pattern.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  20378. var _ref4;
  20379. if (_isArray3) {
  20380. if (_i3 >= _iterator3.length) break;
  20381. _ref4 = _iterator3[_i3++];
  20382. } else {
  20383. _i3 = _iterator3.next();
  20384. if (_i3.done) break;
  20385. _ref4 = _i3.value;
  20386. }
  20387. var elem = _ref4;
  20388. if (!elem) return false;
  20389. if (t.isMemberExpression(elem)) return false;
  20390. }
  20391. for (var _iterator4 = arr.elements, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  20392. var _ref5;
  20393. if (_isArray4) {
  20394. if (_i4 >= _iterator4.length) break;
  20395. _ref5 = _iterator4[_i4++];
  20396. } else {
  20397. _i4 = _iterator4.next();
  20398. if (_i4.done) break;
  20399. _ref5 = _i4.value;
  20400. }
  20401. var _elem = _ref5;
  20402. if (t.isSpreadElement(_elem)) return false;
  20403. if (t.isCallExpression(_elem)) return false;
  20404. if (t.isMemberExpression(_elem)) return false;
  20405. }
  20406. var bindings = t.getBindingIdentifiers(pattern);
  20407. var state = { deopt: false, bindings: bindings };
  20408. this.scope.traverse(arr, arrayUnpackVisitor, state);
  20409. return !state.deopt;
  20410. };
  20411. DestructuringTransformer.prototype.pushUnpackedArrayPattern = function pushUnpackedArrayPattern(pattern, arr) {
  20412. for (var i = 0; i < pattern.elements.length; i++) {
  20413. var elem = pattern.elements[i];
  20414. if (t.isRestElement(elem)) {
  20415. this.push(elem.argument, t.arrayExpression(arr.elements.slice(i)));
  20416. } else {
  20417. this.push(elem, arr.elements[i]);
  20418. }
  20419. }
  20420. };
  20421. DestructuringTransformer.prototype.pushArrayPattern = function pushArrayPattern(pattern, arrayRef) {
  20422. if (!pattern.elements) return;
  20423. if (this.canUnpackArrayPattern(pattern, arrayRef)) {
  20424. return this.pushUnpackedArrayPattern(pattern, arrayRef);
  20425. }
  20426. var count = !hasRest(pattern) && pattern.elements.length;
  20427. var toArray = this.toArray(arrayRef, count);
  20428. if (t.isIdentifier(toArray)) {
  20429. arrayRef = toArray;
  20430. } else {
  20431. arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef);
  20432. this.arrays[arrayRef.name] = true;
  20433. this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray));
  20434. }
  20435. for (var i = 0; i < pattern.elements.length; i++) {
  20436. var elem = pattern.elements[i];
  20437. if (!elem) continue;
  20438. var elemRef = void 0;
  20439. if (t.isRestElement(elem)) {
  20440. elemRef = this.toArray(arrayRef);
  20441. elemRef = t.callExpression(t.memberExpression(elemRef, t.identifier("slice")), [t.numericLiteral(i)]);
  20442. elem = elem.argument;
  20443. } else {
  20444. elemRef = t.memberExpression(arrayRef, t.numericLiteral(i), true);
  20445. }
  20446. this.push(elem, elemRef);
  20447. }
  20448. };
  20449. DestructuringTransformer.prototype.init = function init(pattern, ref) {
  20450. if (!t.isArrayExpression(ref) && !t.isMemberExpression(ref)) {
  20451. var memo = this.scope.maybeGenerateMemoised(ref, true);
  20452. if (memo) {
  20453. this.nodes.push(this.buildVariableDeclaration(memo, ref));
  20454. ref = memo;
  20455. }
  20456. }
  20457. this.push(pattern, ref);
  20458. return this.nodes;
  20459. };
  20460. return DestructuringTransformer;
  20461. }();
  20462. return {
  20463. visitor: {
  20464. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  20465. var declaration = path.get("declaration");
  20466. if (!declaration.isVariableDeclaration()) return;
  20467. if (!variableDeclarationHasPattern(declaration.node)) return;
  20468. var specifiers = [];
  20469. for (var name in path.getOuterBindingIdentifiers(path)) {
  20470. var id = t.identifier(name);
  20471. specifiers.push(t.exportSpecifier(id, id));
  20472. }
  20473. path.replaceWith(declaration.node);
  20474. path.insertAfter(t.exportNamedDeclaration(null, specifiers));
  20475. },
  20476. ForXStatement: function ForXStatement(path, file) {
  20477. var node = path.node,
  20478. scope = path.scope;
  20479. var left = node.left;
  20480. if (t.isPattern(left)) {
  20481. var temp = scope.generateUidIdentifier("ref");
  20482. node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]);
  20483. path.ensureBlock();
  20484. node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)]));
  20485. return;
  20486. }
  20487. if (!t.isVariableDeclaration(left)) return;
  20488. var pattern = left.declarations[0].id;
  20489. if (!t.isPattern(pattern)) return;
  20490. var key = scope.generateUidIdentifier("ref");
  20491. node.left = t.variableDeclaration(left.kind, [t.variableDeclarator(key, null)]);
  20492. var nodes = [];
  20493. var destructuring = new DestructuringTransformer({
  20494. kind: left.kind,
  20495. file: file,
  20496. scope: scope,
  20497. nodes: nodes
  20498. });
  20499. destructuring.init(pattern, key);
  20500. path.ensureBlock();
  20501. var block = node.body;
  20502. block.body = nodes.concat(block.body);
  20503. },
  20504. CatchClause: function CatchClause(_ref6, file) {
  20505. var node = _ref6.node,
  20506. scope = _ref6.scope;
  20507. var pattern = node.param;
  20508. if (!t.isPattern(pattern)) return;
  20509. var ref = scope.generateUidIdentifier("ref");
  20510. node.param = ref;
  20511. var nodes = [];
  20512. var destructuring = new DestructuringTransformer({
  20513. kind: "let",
  20514. file: file,
  20515. scope: scope,
  20516. nodes: nodes
  20517. });
  20518. destructuring.init(pattern, ref);
  20519. node.body.body = nodes.concat(node.body.body);
  20520. },
  20521. AssignmentExpression: function AssignmentExpression(path, file) {
  20522. var node = path.node,
  20523. scope = path.scope;
  20524. if (!t.isPattern(node.left)) return;
  20525. var nodes = [];
  20526. var destructuring = new DestructuringTransformer({
  20527. operator: node.operator,
  20528. file: file,
  20529. scope: scope,
  20530. nodes: nodes
  20531. });
  20532. var ref = void 0;
  20533. if (path.isCompletionRecord() || !path.parentPath.isExpressionStatement()) {
  20534. ref = scope.generateUidIdentifierBasedOnNode(node.right, "ref");
  20535. nodes.push(t.variableDeclaration("var", [t.variableDeclarator(ref, node.right)]));
  20536. if (t.isArrayExpression(node.right)) {
  20537. destructuring.arrays[ref.name] = true;
  20538. }
  20539. }
  20540. destructuring.init(node.left, ref || node.right);
  20541. if (ref) {
  20542. nodes.push(t.expressionStatement(ref));
  20543. }
  20544. path.replaceWithMultiple(nodes);
  20545. },
  20546. VariableDeclaration: function VariableDeclaration(path, file) {
  20547. var node = path.node,
  20548. scope = path.scope,
  20549. parent = path.parent;
  20550. if (t.isForXStatement(parent)) return;
  20551. if (!parent || !path.container) return;
  20552. if (!variableDeclarationHasPattern(node)) return;
  20553. var nodes = [];
  20554. var declar = void 0;
  20555. for (var i = 0; i < node.declarations.length; i++) {
  20556. declar = node.declarations[i];
  20557. var patternId = declar.init;
  20558. var pattern = declar.id;
  20559. var destructuring = new DestructuringTransformer({
  20560. blockHoist: node._blockHoist,
  20561. nodes: nodes,
  20562. scope: scope,
  20563. kind: node.kind,
  20564. file: file
  20565. });
  20566. if (t.isPattern(pattern)) {
  20567. destructuring.init(pattern, patternId);
  20568. if (+i !== node.declarations.length - 1) {
  20569. t.inherits(nodes[nodes.length - 1], declar);
  20570. }
  20571. } else {
  20572. nodes.push(t.inherits(destructuring.buildVariableAssignment(declar.id, declar.init), declar));
  20573. }
  20574. }
  20575. var nodesOut = [];
  20576. for (var _iterator5 = nodes, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
  20577. var _ref7;
  20578. if (_isArray5) {
  20579. if (_i5 >= _iterator5.length) break;
  20580. _ref7 = _iterator5[_i5++];
  20581. } else {
  20582. _i5 = _iterator5.next();
  20583. if (_i5.done) break;
  20584. _ref7 = _i5.value;
  20585. }
  20586. var _node = _ref7;
  20587. var tail = nodesOut[nodesOut.length - 1];
  20588. if (tail && t.isVariableDeclaration(tail) && t.isVariableDeclaration(_node) && tail.kind === _node.kind) {
  20589. var _tail$declarations;
  20590. (_tail$declarations = tail.declarations).push.apply(_tail$declarations, _node.declarations);
  20591. } else {
  20592. nodesOut.push(_node);
  20593. }
  20594. }
  20595. for (var _iterator6 = nodesOut, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
  20596. var _ref8;
  20597. if (_isArray6) {
  20598. if (_i6 >= _iterator6.length) break;
  20599. _ref8 = _iterator6[_i6++];
  20600. } else {
  20601. _i6 = _iterator6.next();
  20602. if (_i6.done) break;
  20603. _ref8 = _i6.value;
  20604. }
  20605. var nodeOut = _ref8;
  20606. if (!nodeOut.declarations) continue;
  20607. for (var _iterator7 = nodeOut.declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
  20608. var _ref9;
  20609. if (_isArray7) {
  20610. if (_i7 >= _iterator7.length) break;
  20611. _ref9 = _iterator7[_i7++];
  20612. } else {
  20613. _i7 = _iterator7.next();
  20614. if (_i7.done) break;
  20615. _ref9 = _i7.value;
  20616. }
  20617. var declaration = _ref9;
  20618. var name = declaration.id.name;
  20619. if (scope.bindings[name]) {
  20620. scope.bindings[name].kind = nodeOut.kind;
  20621. }
  20622. }
  20623. }
  20624. if (nodesOut.length === 1) {
  20625. path.replaceWith(nodesOut[0]);
  20626. } else {
  20627. path.replaceWithMultiple(nodesOut);
  20628. }
  20629. }
  20630. }
  20631. };
  20632. };
  20633. function _interopRequireDefault(obj) {
  20634. return obj && obj.__esModule ? obj : { default: obj };
  20635. }
  20636. module.exports = exports["default"];
  20637. });
  20638. $__System.registerDynamic("133", ["11"], true, function ($__require, exports, module) {
  20639. "use strict";
  20640. var global = this || self,
  20641. GLOBAL = global;
  20642. exports.__esModule = true;
  20643. exports.visitor = undefined;
  20644. var _babelTypes = $__require("11");
  20645. var t = _interopRequireWildcard(_babelTypes);
  20646. function _interopRequireWildcard(obj) {
  20647. if (obj && obj.__esModule) {
  20648. return obj;
  20649. } else {
  20650. var newObj = {};if (obj != null) {
  20651. for (var key in obj) {
  20652. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  20653. }
  20654. }newObj.default = obj;return newObj;
  20655. }
  20656. }
  20657. function getTDZStatus(refPath, bindingPath) {
  20658. var executionStatus = bindingPath._guessExecutionStatusRelativeTo(refPath);
  20659. if (executionStatus === "before") {
  20660. return "inside";
  20661. } else if (executionStatus === "after") {
  20662. return "outside";
  20663. } else {
  20664. return "maybe";
  20665. }
  20666. }
  20667. function buildTDZAssert(node, file) {
  20668. return t.callExpression(file.addHelper("temporalRef"), [node, t.stringLiteral(node.name), file.addHelper("temporalUndefined")]);
  20669. }
  20670. function isReference(node, scope, state) {
  20671. var declared = state.letReferences[node.name];
  20672. if (!declared) return false;
  20673. return scope.getBindingIdentifier(node.name) === declared;
  20674. }
  20675. var visitor = exports.visitor = {
  20676. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  20677. if (!this.file.opts.tdz) return;
  20678. var node = path.node,
  20679. parent = path.parent,
  20680. scope = path.scope;
  20681. if (path.parentPath.isFor({ left: node })) return;
  20682. if (!isReference(node, scope, state)) return;
  20683. var bindingPath = scope.getBinding(node.name).path;
  20684. var status = getTDZStatus(path, bindingPath);
  20685. if (status === "inside") return;
  20686. if (status === "maybe") {
  20687. var assert = buildTDZAssert(node, state.file);
  20688. bindingPath.parent._tdzThis = true;
  20689. path.skip();
  20690. if (path.parentPath.isUpdateExpression()) {
  20691. if (parent._ignoreBlockScopingTDZ) return;
  20692. path.parentPath.replaceWith(t.sequenceExpression([assert, parent]));
  20693. } else {
  20694. path.replaceWith(assert);
  20695. }
  20696. } else if (status === "outside") {
  20697. path.replaceWith(t.throwStatement(t.inherits(t.newExpression(t.identifier("ReferenceError"), [t.stringLiteral(node.name + " is not defined - temporal dead zone")]), node)));
  20698. }
  20699. },
  20700. AssignmentExpression: {
  20701. exit: function exit(path, state) {
  20702. if (!this.file.opts.tdz) return;
  20703. var node = path.node;
  20704. if (node._ignoreBlockScopingTDZ) return;
  20705. var nodes = [];
  20706. var ids = path.getBindingIdentifiers();
  20707. for (var name in ids) {
  20708. var id = ids[name];
  20709. if (isReference(id, path.scope, state)) {
  20710. nodes.push(buildTDZAssert(id, state.file));
  20711. }
  20712. }
  20713. if (nodes.length) {
  20714. node._ignoreBlockScopingTDZ = true;
  20715. nodes.push(node);
  20716. path.replaceWithMultiple(nodes.map(t.expressionStatement));
  20717. }
  20718. }
  20719. }
  20720. };
  20721. });
  20722. $__System.registerDynamic('134', ['b7', 'c2', 'b8'], true, function ($__require, exports, module) {
  20723. var global = this || self,
  20724. GLOBAL = global;
  20725. var copyObject = $__require('b7'),
  20726. createAssigner = $__require('c2'),
  20727. keysIn = $__require('b8');
  20728. /**
  20729. * This method is like `_.assign` except that it iterates over own and
  20730. * inherited source properties.
  20731. *
  20732. * **Note:** This method mutates `object`.
  20733. *
  20734. * @static
  20735. * @memberOf _
  20736. * @since 4.0.0
  20737. * @alias extend
  20738. * @category Object
  20739. * @param {Object} object The destination object.
  20740. * @param {...Object} [sources] The source objects.
  20741. * @returns {Object} Returns `object`.
  20742. * @see _.assign
  20743. * @example
  20744. *
  20745. * function Foo() {
  20746. * this.a = 1;
  20747. * }
  20748. *
  20749. * function Bar() {
  20750. * this.c = 3;
  20751. * }
  20752. *
  20753. * Foo.prototype.b = 2;
  20754. * Bar.prototype.d = 4;
  20755. *
  20756. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  20757. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  20758. */
  20759. var assignIn = createAssigner(function (object, source) {
  20760. copyObject(source, keysIn(source), object);
  20761. });
  20762. module.exports = assignIn;
  20763. });
  20764. $__System.registerDynamic('135', ['134'], true, function ($__require, exports, module) {
  20765. var global = this || self,
  20766. GLOBAL = global;
  20767. module.exports = $__require('134');
  20768. });
  20769. $__System.registerDynamic('136', ['b1'], true, function ($__require, exports, module) {
  20770. var global = this || self,
  20771. GLOBAL = global;
  20772. var baseClone = $__require('b1');
  20773. /** Used to compose bitmasks for cloning. */
  20774. var CLONE_DEEP_FLAG = 1,
  20775. CLONE_SYMBOLS_FLAG = 4;
  20776. /**
  20777. * This method is like `_.clone` except that it recursively clones `value`.
  20778. *
  20779. * @static
  20780. * @memberOf _
  20781. * @since 1.0.0
  20782. * @category Lang
  20783. * @param {*} value The value to recursively clone.
  20784. * @returns {*} Returns the deep cloned value.
  20785. * @see _.clone
  20786. * @example
  20787. *
  20788. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  20789. *
  20790. * var deep = _.cloneDeep(objects);
  20791. * console.log(deep[0] === objects[0]);
  20792. * // => false
  20793. */
  20794. function cloneDeep(value) {
  20795. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  20796. }
  20797. module.exports = cloneDeep;
  20798. });
  20799. $__System.registerDynamic("137", [], true, function ($__require, exports, module) {
  20800. var global = this || self,
  20801. GLOBAL = global;
  20802. /** Used for built-in method references. */
  20803. var objectProto = Object.prototype;
  20804. /** Used to check objects for own properties. */
  20805. var hasOwnProperty = objectProto.hasOwnProperty;
  20806. /**
  20807. * The base implementation of `_.has` without support for deep paths.
  20808. *
  20809. * @private
  20810. * @param {Object} [object] The object to query.
  20811. * @param {Array|string} key The key to check.
  20812. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  20813. */
  20814. function baseHas(object, key) {
  20815. return object != null && hasOwnProperty.call(object, key);
  20816. }
  20817. module.exports = baseHas;
  20818. });
  20819. $__System.registerDynamic('83', ['4b', '90'], true, function ($__require, exports, module) {
  20820. var global = this || self,
  20821. GLOBAL = global;
  20822. var isArray = $__require('4b'),
  20823. isSymbol = $__require('90');
  20824. /** Used to match property names within property paths. */
  20825. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  20826. reIsPlainProp = /^\w*$/;
  20827. /**
  20828. * Checks if `value` is a property name and not a property path.
  20829. *
  20830. * @private
  20831. * @param {*} value The value to check.
  20832. * @param {Object} [object] The object to query keys on.
  20833. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  20834. */
  20835. function isKey(value, object) {
  20836. if (isArray(value)) {
  20837. return false;
  20838. }
  20839. var type = typeof value;
  20840. if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
  20841. return true;
  20842. }
  20843. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
  20844. }
  20845. module.exports = isKey;
  20846. });
  20847. $__System.registerDynamic('138', ['139'], true, function ($__require, exports, module) {
  20848. var global = this || self,
  20849. GLOBAL = global;
  20850. var MapCache = $__require('139');
  20851. /** Error message constants. */
  20852. var FUNC_ERROR_TEXT = 'Expected a function';
  20853. /**
  20854. * Creates a function that memoizes the result of `func`. If `resolver` is
  20855. * provided, it determines the cache key for storing the result based on the
  20856. * arguments provided to the memoized function. By default, the first argument
  20857. * provided to the memoized function is used as the map cache key. The `func`
  20858. * is invoked with the `this` binding of the memoized function.
  20859. *
  20860. * **Note:** The cache is exposed as the `cache` property on the memoized
  20861. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  20862. * constructor with one whose instances implement the
  20863. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  20864. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  20865. *
  20866. * @static
  20867. * @memberOf _
  20868. * @since 0.1.0
  20869. * @category Function
  20870. * @param {Function} func The function to have its output memoized.
  20871. * @param {Function} [resolver] The function to resolve the cache key.
  20872. * @returns {Function} Returns the new memoized function.
  20873. * @example
  20874. *
  20875. * var object = { 'a': 1, 'b': 2 };
  20876. * var other = { 'c': 3, 'd': 4 };
  20877. *
  20878. * var values = _.memoize(_.values);
  20879. * values(object);
  20880. * // => [1, 2]
  20881. *
  20882. * values(other);
  20883. * // => [3, 4]
  20884. *
  20885. * object.a = 2;
  20886. * values(object);
  20887. * // => [1, 2]
  20888. *
  20889. * // Modify the result cache.
  20890. * values.cache.set(object, ['a', 'b']);
  20891. * values(object);
  20892. * // => ['a', 'b']
  20893. *
  20894. * // Replace `_.memoize.Cache`.
  20895. * _.memoize.Cache = WeakMap;
  20896. */
  20897. function memoize(func, resolver) {
  20898. if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {
  20899. throw new TypeError(FUNC_ERROR_TEXT);
  20900. }
  20901. var memoized = function () {
  20902. var args = arguments,
  20903. key = resolver ? resolver.apply(this, args) : args[0],
  20904. cache = memoized.cache;
  20905. if (cache.has(key)) {
  20906. return cache.get(key);
  20907. }
  20908. var result = func.apply(this, args);
  20909. memoized.cache = cache.set(key, result) || cache;
  20910. return result;
  20911. };
  20912. memoized.cache = new (memoize.Cache || MapCache)();
  20913. return memoized;
  20914. }
  20915. // Expose `MapCache`.
  20916. memoize.Cache = MapCache;
  20917. module.exports = memoize;
  20918. });
  20919. $__System.registerDynamic('13a', ['138'], true, function ($__require, exports, module) {
  20920. var global = this || self,
  20921. GLOBAL = global;
  20922. var memoize = $__require('138');
  20923. /** Used as the maximum memoize cache size. */
  20924. var MAX_MEMOIZE_SIZE = 500;
  20925. /**
  20926. * A specialized version of `_.memoize` which clears the memoized function's
  20927. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  20928. *
  20929. * @private
  20930. * @param {Function} func The function to have its output memoized.
  20931. * @returns {Function} Returns the new memoized function.
  20932. */
  20933. function memoizeCapped(func) {
  20934. var result = memoize(func, function (key) {
  20935. if (cache.size === MAX_MEMOIZE_SIZE) {
  20936. cache.clear();
  20937. }
  20938. return key;
  20939. });
  20940. var cache = result.cache;
  20941. return result;
  20942. }
  20943. module.exports = memoizeCapped;
  20944. });
  20945. $__System.registerDynamic('13b', ['13a'], true, function ($__require, exports, module) {
  20946. var global = this || self,
  20947. GLOBAL = global;
  20948. var memoizeCapped = $__require('13a');
  20949. /** Used to match property names within property paths. */
  20950. var reLeadingDot = /^\./,
  20951. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  20952. /** Used to match backslashes in property paths. */
  20953. var reEscapeChar = /\\(\\)?/g;
  20954. /**
  20955. * Converts `string` to a property path array.
  20956. *
  20957. * @private
  20958. * @param {string} string The string to convert.
  20959. * @returns {Array} Returns the property path array.
  20960. */
  20961. var stringToPath = memoizeCapped(function (string) {
  20962. var result = [];
  20963. if (reLeadingDot.test(string)) {
  20964. result.push('');
  20965. }
  20966. string.replace(rePropName, function (match, number, quote, string) {
  20967. result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
  20968. });
  20969. return result;
  20970. });
  20971. module.exports = stringToPath;
  20972. });
  20973. $__System.registerDynamic('86', ['4b', '83', '13b', '9b'], true, function ($__require, exports, module) {
  20974. var global = this || self,
  20975. GLOBAL = global;
  20976. var isArray = $__require('4b'),
  20977. isKey = $__require('83'),
  20978. stringToPath = $__require('13b'),
  20979. toString = $__require('9b');
  20980. /**
  20981. * Casts `value` to a path array if it's not one.
  20982. *
  20983. * @private
  20984. * @param {*} value The value to inspect.
  20985. * @param {Object} [object] The object to query keys on.
  20986. * @returns {Array} Returns the cast property path array.
  20987. */
  20988. function castPath(value, object) {
  20989. if (isArray(value)) {
  20990. return value;
  20991. }
  20992. return isKey(value, object) ? [value] : stringToPath(toString(value));
  20993. }
  20994. module.exports = castPath;
  20995. });
  20996. $__System.registerDynamic('84', ['90'], true, function ($__require, exports, module) {
  20997. var global = this || self,
  20998. GLOBAL = global;
  20999. var isSymbol = $__require('90');
  21000. /** Used as references for various `Number` constants. */
  21001. var INFINITY = 1 / 0;
  21002. /**
  21003. * Converts `value` to a string key if it's not a string or symbol.
  21004. *
  21005. * @private
  21006. * @param {*} value The value to inspect.
  21007. * @returns {string|symbol} Returns the key.
  21008. */
  21009. function toKey(value) {
  21010. if (typeof value == 'string' || isSymbol(value)) {
  21011. return value;
  21012. }
  21013. var result = value + '';
  21014. return result == '0' && 1 / value == -INFINITY ? '-0' : result;
  21015. }
  21016. module.exports = toKey;
  21017. });
  21018. $__System.registerDynamic('80', ['86', '62', '4b', '13c', '13d', '84'], true, function ($__require, exports, module) {
  21019. var global = this || self,
  21020. GLOBAL = global;
  21021. var castPath = $__require('86'),
  21022. isArguments = $__require('62'),
  21023. isArray = $__require('4b'),
  21024. isIndex = $__require('13c'),
  21025. isLength = $__require('13d'),
  21026. toKey = $__require('84');
  21027. /**
  21028. * Checks if `path` exists on `object`.
  21029. *
  21030. * @private
  21031. * @param {Object} object The object to query.
  21032. * @param {Array|string} path The path to check.
  21033. * @param {Function} hasFunc The function to check properties.
  21034. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  21035. */
  21036. function hasPath(object, path, hasFunc) {
  21037. path = castPath(path, object);
  21038. var index = -1,
  21039. length = path.length,
  21040. result = false;
  21041. while (++index < length) {
  21042. var key = toKey(path[index]);
  21043. if (!(result = object != null && hasFunc(object, key))) {
  21044. break;
  21045. }
  21046. object = object[key];
  21047. }
  21048. if (result || ++index != length) {
  21049. return result;
  21050. }
  21051. length = object == null ? 0 : object.length;
  21052. return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
  21053. }
  21054. module.exports = hasPath;
  21055. });
  21056. $__System.registerDynamic('114', ['137', '80'], true, function ($__require, exports, module) {
  21057. var global = this || self,
  21058. GLOBAL = global;
  21059. var baseHas = $__require('137'),
  21060. hasPath = $__require('80');
  21061. /**
  21062. * Checks if `path` is a direct property of `object`.
  21063. *
  21064. * @static
  21065. * @since 0.1.0
  21066. * @memberOf _
  21067. * @category Object
  21068. * @param {Object} object The object to query.
  21069. * @param {Array|string} path The path to check.
  21070. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  21071. * @example
  21072. *
  21073. * var object = { 'a': { 'b': 2 } };
  21074. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  21075. *
  21076. * _.has(object, 'a');
  21077. * // => true
  21078. *
  21079. * _.has(object, 'a.b');
  21080. * // => true
  21081. *
  21082. * _.has(object, ['a', 'b']);
  21083. * // => true
  21084. *
  21085. * _.has(other, 'a');
  21086. * // => false
  21087. */
  21088. function has(object, path) {
  21089. return object != null && hasPath(object, path, baseHas);
  21090. }
  21091. module.exports = has;
  21092. });
  21093. $__System.registerDynamic("13e", ["1d", "c"], true, function ($__require, exports, module) {
  21094. "use strict";
  21095. var process = $__require("c");
  21096. var global = this || self,
  21097. GLOBAL = global;
  21098. exports.__esModule = true;
  21099. var _classCallCheck2 = $__require("1d");
  21100. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  21101. function _interopRequireDefault(obj) {
  21102. return obj && obj.__esModule ? obj : { default: obj };
  21103. }
  21104. var Hub = function Hub(file, options) {
  21105. (0, _classCallCheck3.default)(this, Hub);
  21106. this.file = file;
  21107. this.options = options;
  21108. };
  21109. exports.default = Hub;
  21110. module.exports = exports["default"];
  21111. });
  21112. $__System.registerDynamic('13f', [], true, function ($__require, exports, module) {
  21113. var global = this || self,
  21114. GLOBAL = global;
  21115. /**
  21116. * Helpers.
  21117. */
  21118. var s = 1000;
  21119. var m = s * 60;
  21120. var h = m * 60;
  21121. var d = h * 24;
  21122. var y = d * 365.25;
  21123. /**
  21124. * Parse or format the given `val`.
  21125. *
  21126. * Options:
  21127. *
  21128. * - `long` verbose formatting [false]
  21129. *
  21130. * @param {String|Number} val
  21131. * @param {Object} [options]
  21132. * @throws {Error} throw an error if val is not a non-empty string or a number
  21133. * @return {String|Number}
  21134. * @api public
  21135. */
  21136. module.exports = function (val, options) {
  21137. options = options || {};
  21138. var type = typeof val;
  21139. if (type === 'string' && val.length > 0) {
  21140. return parse(val);
  21141. } else if (type === 'number' && isNaN(val) === false) {
  21142. return options.long ? fmtLong(val) : fmtShort(val);
  21143. }
  21144. throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
  21145. };
  21146. /**
  21147. * Parse the given `str` and return milliseconds.
  21148. *
  21149. * @param {String} str
  21150. * @return {Number}
  21151. * @api private
  21152. */
  21153. function parse(str) {
  21154. str = String(str);
  21155. if (str.length > 100) {
  21156. return;
  21157. }
  21158. var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
  21159. if (!match) {
  21160. return;
  21161. }
  21162. var n = parseFloat(match[1]);
  21163. var type = (match[2] || 'ms').toLowerCase();
  21164. switch (type) {
  21165. case 'years':
  21166. case 'year':
  21167. case 'yrs':
  21168. case 'yr':
  21169. case 'y':
  21170. return n * y;
  21171. case 'days':
  21172. case 'day':
  21173. case 'd':
  21174. return n * d;
  21175. case 'hours':
  21176. case 'hour':
  21177. case 'hrs':
  21178. case 'hr':
  21179. case 'h':
  21180. return n * h;
  21181. case 'minutes':
  21182. case 'minute':
  21183. case 'mins':
  21184. case 'min':
  21185. case 'm':
  21186. return n * m;
  21187. case 'seconds':
  21188. case 'second':
  21189. case 'secs':
  21190. case 'sec':
  21191. case 's':
  21192. return n * s;
  21193. case 'milliseconds':
  21194. case 'millisecond':
  21195. case 'msecs':
  21196. case 'msec':
  21197. case 'ms':
  21198. return n;
  21199. default:
  21200. return undefined;
  21201. }
  21202. }
  21203. /**
  21204. * Short format for `ms`.
  21205. *
  21206. * @param {Number} ms
  21207. * @return {String}
  21208. * @api private
  21209. */
  21210. function fmtShort(ms) {
  21211. if (ms >= d) {
  21212. return Math.round(ms / d) + 'd';
  21213. }
  21214. if (ms >= h) {
  21215. return Math.round(ms / h) + 'h';
  21216. }
  21217. if (ms >= m) {
  21218. return Math.round(ms / m) + 'm';
  21219. }
  21220. if (ms >= s) {
  21221. return Math.round(ms / s) + 's';
  21222. }
  21223. return ms + 'ms';
  21224. }
  21225. /**
  21226. * Long format for `ms`.
  21227. *
  21228. * @param {Number} ms
  21229. * @return {String}
  21230. * @api private
  21231. */
  21232. function fmtLong(ms) {
  21233. return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms';
  21234. }
  21235. /**
  21236. * Pluralization helper.
  21237. */
  21238. function plural(ms, n, name) {
  21239. if (ms < n) {
  21240. return;
  21241. }
  21242. if (ms < n * 1.5) {
  21243. return Math.floor(ms / n) + ' ' + name;
  21244. }
  21245. return Math.ceil(ms / n) + ' ' + name + 's';
  21246. }
  21247. });
  21248. $__System.registerDynamic('140', ['13f'], true, function ($__require, exports, module) {
  21249. var global = this || self,
  21250. GLOBAL = global;
  21251. /**
  21252. * This is the common logic for both the Node.js and web browser
  21253. * implementations of `debug()`.
  21254. *
  21255. * Expose `debug()` as the module.
  21256. */
  21257. exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
  21258. exports.coerce = coerce;
  21259. exports.disable = disable;
  21260. exports.enable = enable;
  21261. exports.enabled = enabled;
  21262. exports.humanize = $__require('13f');
  21263. /**
  21264. * The currently active debug mode names, and names to skip.
  21265. */
  21266. exports.names = [];
  21267. exports.skips = [];
  21268. /**
  21269. * Map of special "%n" handling functions, for the debug "format" argument.
  21270. *
  21271. * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
  21272. */
  21273. exports.formatters = {};
  21274. /**
  21275. * Previous log timestamp.
  21276. */
  21277. var prevTime;
  21278. /**
  21279. * Select a color.
  21280. * @param {String} namespace
  21281. * @return {Number}
  21282. * @api private
  21283. */
  21284. function selectColor(namespace) {
  21285. var hash = 0,
  21286. i;
  21287. for (i in namespace) {
  21288. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  21289. hash |= 0; // Convert to 32bit integer
  21290. }
  21291. return exports.colors[Math.abs(hash) % exports.colors.length];
  21292. }
  21293. /**
  21294. * Create a debugger with the given `namespace`.
  21295. *
  21296. * @param {String} namespace
  21297. * @return {Function}
  21298. * @api public
  21299. */
  21300. function createDebug(namespace) {
  21301. function debug() {
  21302. // disabled?
  21303. if (!debug.enabled) return;
  21304. var self = debug;
  21305. // set `diff` timestamp
  21306. var curr = +new Date();
  21307. var ms = curr - (prevTime || curr);
  21308. self.diff = ms;
  21309. self.prev = prevTime;
  21310. self.curr = curr;
  21311. prevTime = curr;
  21312. // turn the `arguments` into a proper Array
  21313. var args = new Array(arguments.length);
  21314. for (var i = 0; i < args.length; i++) {
  21315. args[i] = arguments[i];
  21316. }
  21317. args[0] = exports.coerce(args[0]);
  21318. if ('string' !== typeof args[0]) {
  21319. // anything else let's inspect with %O
  21320. args.unshift('%O');
  21321. }
  21322. // apply any `formatters` transformations
  21323. var index = 0;
  21324. args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
  21325. // if we encounter an escaped % then don't increase the array index
  21326. if (match === '%%') return match;
  21327. index++;
  21328. var formatter = exports.formatters[format];
  21329. if ('function' === typeof formatter) {
  21330. var val = args[index];
  21331. match = formatter.call(self, val);
  21332. // now we need to remove `args[index]` since it's inlined in the `format`
  21333. args.splice(index, 1);
  21334. index--;
  21335. }
  21336. return match;
  21337. });
  21338. // apply env-specific formatting (colors, etc.)
  21339. exports.formatArgs.call(self, args);
  21340. var logFn = debug.log || exports.log || console.log.bind(console);
  21341. logFn.apply(self, args);
  21342. }
  21343. debug.namespace = namespace;
  21344. debug.enabled = exports.enabled(namespace);
  21345. debug.useColors = exports.useColors();
  21346. debug.color = selectColor(namespace);
  21347. // env-specific initialization logic for debug instances
  21348. if ('function' === typeof exports.init) {
  21349. exports.init(debug);
  21350. }
  21351. return debug;
  21352. }
  21353. /**
  21354. * Enables a debug mode by namespaces. This can include modes
  21355. * separated by a colon and wildcards.
  21356. *
  21357. * @param {String} namespaces
  21358. * @api public
  21359. */
  21360. function enable(namespaces) {
  21361. exports.save(namespaces);
  21362. exports.names = [];
  21363. exports.skips = [];
  21364. var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
  21365. var len = split.length;
  21366. for (var i = 0; i < len; i++) {
  21367. if (!split[i]) continue; // ignore empty strings
  21368. namespaces = split[i].replace(/\*/g, '.*?');
  21369. if (namespaces[0] === '-') {
  21370. exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  21371. } else {
  21372. exports.names.push(new RegExp('^' + namespaces + '$'));
  21373. }
  21374. }
  21375. }
  21376. /**
  21377. * Disable debug output.
  21378. *
  21379. * @api public
  21380. */
  21381. function disable() {
  21382. exports.enable('');
  21383. }
  21384. /**
  21385. * Returns true if the given mode name is enabled, false otherwise.
  21386. *
  21387. * @param {String} name
  21388. * @return {Boolean}
  21389. * @api public
  21390. */
  21391. function enabled(name) {
  21392. var i, len;
  21393. for (i = 0, len = exports.skips.length; i < len; i++) {
  21394. if (exports.skips[i].test(name)) {
  21395. return false;
  21396. }
  21397. }
  21398. for (i = 0, len = exports.names.length; i < len; i++) {
  21399. if (exports.names[i].test(name)) {
  21400. return true;
  21401. }
  21402. }
  21403. return false;
  21404. }
  21405. /**
  21406. * Coerce `val`.
  21407. *
  21408. * @param {Mixed} val
  21409. * @return {Mixed}
  21410. * @api private
  21411. */
  21412. function coerce(val) {
  21413. if (val instanceof Error) return val.stack || val.message;
  21414. return val;
  21415. }
  21416. });
  21417. $__System.registerDynamic('5e', ['@node/tty', '@node/util', '140', '@node/fs', '@node/net'], true, function ($__require, exports, module) {
  21418. var global = this || self,
  21419. GLOBAL = global;
  21420. /**
  21421. * Module dependencies.
  21422. */
  21423. var tty = $__require('@node/tty');
  21424. var util = $__require('@node/util');
  21425. /**
  21426. * This is the Node.js implementation of `debug()`.
  21427. *
  21428. * Expose `debug()` as the module.
  21429. */
  21430. exports = module.exports = $__require('140');
  21431. exports.init = init;
  21432. exports.log = log;
  21433. exports.formatArgs = formatArgs;
  21434. exports.save = save;
  21435. exports.load = load;
  21436. exports.useColors = useColors;
  21437. /**
  21438. * Colors.
  21439. */
  21440. exports.colors = [6, 2, 3, 4, 5, 1];
  21441. /**
  21442. * Build up the default `inspectOpts` object from the environment variables.
  21443. *
  21444. * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
  21445. */
  21446. exports.inspectOpts = Object.keys(process.env).filter(function (key) {
  21447. return (/^debug_/i.test(key)
  21448. );
  21449. }).reduce(function (obj, key) {
  21450. // camel-case
  21451. var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
  21452. return k.toUpperCase();
  21453. });
  21454. // coerce string value into JS value
  21455. var val = process.env[key];
  21456. if (/^(yes|on|true|enabled)$/i.test(val)) val = true;else if (/^(no|off|false|disabled)$/i.test(val)) val = false;else if (val === 'null') val = null;else val = Number(val);
  21457. obj[prop] = val;
  21458. return obj;
  21459. }, {});
  21460. /**
  21461. * The file descriptor to write the `debug()` calls to.
  21462. * Set the `DEBUG_FD` env variable to override with another value. i.e.:
  21463. *
  21464. * $ DEBUG_FD=3 node script.js 3>debug.log
  21465. */
  21466. var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
  21467. if (1 !== fd && 2 !== fd) {
  21468. util.deprecate(function () {}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')();
  21469. }
  21470. var stream = 1 === fd ? process.stdout : 2 === fd ? process.stderr : createWritableStdioStream(fd);
  21471. /**
  21472. * Is stdout a TTY? Colored output is enabled when `true`.
  21473. */
  21474. function useColors() {
  21475. return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(fd);
  21476. }
  21477. /**
  21478. * Map %o to `util.inspect()`, all on a single line.
  21479. */
  21480. exports.formatters.o = function (v) {
  21481. this.inspectOpts.colors = this.useColors;
  21482. return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' ');
  21483. };
  21484. /**
  21485. * Map %o to `util.inspect()`, allowing multiple lines if needed.
  21486. */
  21487. exports.formatters.O = function (v) {
  21488. this.inspectOpts.colors = this.useColors;
  21489. return util.inspect(v, this.inspectOpts);
  21490. };
  21491. /**
  21492. * Adds ANSI color escape codes if enabled.
  21493. *
  21494. * @api public
  21495. */
  21496. function formatArgs(args) {
  21497. var name = this.namespace;
  21498. var useColors = this.useColors;
  21499. if (useColors) {
  21500. var c = this.color;
  21501. var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
  21502. args[0] = prefix + args[0].split('\n').join('\n' + prefix);
  21503. args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
  21504. } else {
  21505. args[0] = new Date().toUTCString() + ' ' + name + ' ' + args[0];
  21506. }
  21507. }
  21508. /**
  21509. * Invokes `util.format()` with the specified arguments and writes to `stream`.
  21510. */
  21511. function log() {
  21512. return stream.write(util.format.apply(util, arguments) + '\n');
  21513. }
  21514. /**
  21515. * Save `namespaces`.
  21516. *
  21517. * @param {String} namespaces
  21518. * @api private
  21519. */
  21520. function save(namespaces) {
  21521. if (null == namespaces) {
  21522. // If you set a process.env field to null or undefined, it gets cast to the
  21523. // string 'null' or 'undefined'. Just delete instead.
  21524. delete process.env.DEBUG;
  21525. } else {
  21526. process.env.DEBUG = namespaces;
  21527. }
  21528. }
  21529. /**
  21530. * Load `namespaces`.
  21531. *
  21532. * @return {String} returns the previously persisted debug modes
  21533. * @api private
  21534. */
  21535. function load() {
  21536. return process.env.DEBUG;
  21537. }
  21538. /**
  21539. * Copied from `node/src/node.js`.
  21540. *
  21541. * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
  21542. * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
  21543. */
  21544. function createWritableStdioStream(fd) {
  21545. var stream;
  21546. var tty_wrap = process.binding('tty_wrap');
  21547. // Note stream._type is used for test-module-load-list.js
  21548. switch (tty_wrap.guessHandleType(fd)) {
  21549. case 'TTY':
  21550. stream = new tty.WriteStream(fd);
  21551. stream._type = 'tty';
  21552. // Hack to have stream not keep the event loop alive.
  21553. // See https://github.com/joyent/node/issues/1726
  21554. if (stream._handle && stream._handle.unref) {
  21555. stream._handle.unref();
  21556. }
  21557. break;
  21558. case 'FILE':
  21559. var fs = $__require('@node/fs');
  21560. stream = new fs.SyncWriteStream(fd, { autoClose: false });
  21561. stream._type = 'fs';
  21562. break;
  21563. case 'PIPE':
  21564. case 'TCP':
  21565. var net = $__require('@node/net');
  21566. stream = new net.Socket({
  21567. fd: fd,
  21568. readable: false,
  21569. writable: true
  21570. });
  21571. // FIXME Should probably have an option in net.Socket to create a
  21572. // stream from an existing fd which is writable only. But for now
  21573. // we'll just add this hack and set the `readable` member to false.
  21574. // Test: ./node test/fixtures/echo.js < /etc/passwd
  21575. stream.readable = false;
  21576. stream.read = null;
  21577. stream._type = 'pipe';
  21578. // FIXME Hack to have stream not keep the event loop alive.
  21579. // See https://github.com/joyent/node/issues/1726
  21580. if (stream._handle && stream._handle.unref) {
  21581. stream._handle.unref();
  21582. }
  21583. break;
  21584. default:
  21585. // Probably an error on in uv_guess_handle()
  21586. throw new Error('Implement me. Unknown stream file type!');
  21587. }
  21588. // For supporting legacy API we put the FD here.
  21589. stream.fd = fd;
  21590. stream._isStdio = true;
  21591. return stream;
  21592. }
  21593. /**
  21594. * Init logic for `debug` instances.
  21595. *
  21596. * Create a new `inspectOpts` object in case `useColors` is set
  21597. * differently for a particular `debug` instance.
  21598. */
  21599. function init(debug) {
  21600. debug.inspectOpts = {};
  21601. var keys = Object.keys(exports.inspectOpts);
  21602. for (var i = 0; i < keys.length; i++) {
  21603. debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
  21604. }
  21605. }
  21606. /**
  21607. * Enable namespaces listed in `process.env.DEBUG` initially.
  21608. */
  21609. exports.enable(load());
  21610. });
  21611. $__System.registerDynamic('141', ['c'], true, function ($__require, exports, module) {
  21612. /**
  21613. * Copyright 2013-2015, Facebook, Inc.
  21614. * All rights reserved.
  21615. *
  21616. * This source code is licensed under the BSD-style license found in the
  21617. * LICENSE file in the root directory of this source tree. An additional grant
  21618. * of patent rights can be found in the PATENTS file in the same directory.
  21619. */
  21620. 'use strict';
  21621. /**
  21622. * Use invariant() to assert state which your program assumes to be true.
  21623. *
  21624. * Provide sprintf-style format (only %s is supported) and arguments
  21625. * to provide information about what broke and what you were
  21626. * expecting.
  21627. *
  21628. * The invariant message will be stripped in production, but the invariant
  21629. * will remain to ensure logic does not differ in production.
  21630. */
  21631. var process = $__require('c');
  21632. var global = this || self,
  21633. GLOBAL = global;
  21634. var NODE_ENV = 'production';
  21635. var invariant = function (condition, format, a, b, c, d, e, f) {
  21636. if (NODE_ENV !== 'production') {
  21637. if (format === undefined) {
  21638. throw new Error('invariant requires an error message argument');
  21639. }
  21640. }
  21641. if (!condition) {
  21642. var error;
  21643. if (format === undefined) {
  21644. error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
  21645. } else {
  21646. var args = [a, b, c, d, e, f];
  21647. var argIndex = 0;
  21648. error = new Error(format.replace(/%s/g, function () {
  21649. return args[argIndex++];
  21650. }));
  21651. error.name = 'Invariant Violation';
  21652. }
  21653. error.framesToPop = 1; // we don't care about invariant's own frame
  21654. throw error;
  21655. }
  21656. };
  21657. module.exports = invariant;
  21658. });
  21659. $__System.registerDynamic('d1', ['142', 'b7', 'c2', '3f', '143', '40'], true, function ($__require, exports, module) {
  21660. var global = this || self,
  21661. GLOBAL = global;
  21662. var assignValue = $__require('142'),
  21663. copyObject = $__require('b7'),
  21664. createAssigner = $__require('c2'),
  21665. isArrayLike = $__require('3f'),
  21666. isPrototype = $__require('143'),
  21667. keys = $__require('40');
  21668. /** Used for built-in method references. */
  21669. var objectProto = Object.prototype;
  21670. /** Used to check objects for own properties. */
  21671. var hasOwnProperty = objectProto.hasOwnProperty;
  21672. /**
  21673. * Assigns own enumerable string keyed properties of source objects to the
  21674. * destination object. Source objects are applied from left to right.
  21675. * Subsequent sources overwrite property assignments of previous sources.
  21676. *
  21677. * **Note:** This method mutates `object` and is loosely based on
  21678. * [`Object.assign`](https://mdn.io/Object/assign).
  21679. *
  21680. * @static
  21681. * @memberOf _
  21682. * @since 0.10.0
  21683. * @category Object
  21684. * @param {Object} object The destination object.
  21685. * @param {...Object} [sources] The source objects.
  21686. * @returns {Object} Returns `object`.
  21687. * @see _.assignIn
  21688. * @example
  21689. *
  21690. * function Foo() {
  21691. * this.a = 1;
  21692. * }
  21693. *
  21694. * function Bar() {
  21695. * this.c = 3;
  21696. * }
  21697. *
  21698. * Foo.prototype.b = 2;
  21699. * Bar.prototype.d = 4;
  21700. *
  21701. * _.assign({ 'a': 0 }, new Foo, new Bar);
  21702. * // => { 'a': 1, 'c': 3 }
  21703. */
  21704. var assign = createAssigner(function (object, source) {
  21705. if (isPrototype(source) || isArrayLike(source)) {
  21706. copyObject(source, keys(source), object);
  21707. return;
  21708. }
  21709. for (var key in source) {
  21710. if (hasOwnProperty.call(source, key)) {
  21711. assignValue(object, key, source[key]);
  21712. }
  21713. }
  21714. });
  21715. module.exports = assign;
  21716. });
  21717. $__System.registerDynamic('144', [], true, function ($__require, exports, module) {
  21718. var global = this || self,
  21719. GLOBAL = global;
  21720. /** Used as references for various `Number` constants. */
  21721. var MAX_SAFE_INTEGER = 9007199254740991;
  21722. /* Built-in method references for those with the same name as other `lodash` methods. */
  21723. var nativeFloor = Math.floor;
  21724. /**
  21725. * The base implementation of `_.repeat` which doesn't coerce arguments.
  21726. *
  21727. * @private
  21728. * @param {string} string The string to repeat.
  21729. * @param {number} n The number of times to repeat the string.
  21730. * @returns {string} Returns the repeated string.
  21731. */
  21732. function baseRepeat(string, n) {
  21733. var result = '';
  21734. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  21735. return result;
  21736. }
  21737. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  21738. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  21739. do {
  21740. if (n % 2) {
  21741. result += string;
  21742. }
  21743. n = nativeFloor(n / 2);
  21744. if (n) {
  21745. string += string;
  21746. }
  21747. } while (n);
  21748. return result;
  21749. }
  21750. module.exports = baseRepeat;
  21751. });
  21752. $__System.registerDynamic('9e', ['61', '49', '4b', '90'], true, function ($__require, exports, module) {
  21753. var global = this || self,
  21754. GLOBAL = global;
  21755. var Symbol = $__require('61'),
  21756. arrayMap = $__require('49'),
  21757. isArray = $__require('4b'),
  21758. isSymbol = $__require('90');
  21759. /** Used as references for various `Number` constants. */
  21760. var INFINITY = 1 / 0;
  21761. /** Used to convert symbols to primitives and strings. */
  21762. var symbolProto = Symbol ? Symbol.prototype : undefined,
  21763. symbolToString = symbolProto ? symbolProto.toString : undefined;
  21764. /**
  21765. * The base implementation of `_.toString` which doesn't convert nullish
  21766. * values to empty strings.
  21767. *
  21768. * @private
  21769. * @param {*} value The value to process.
  21770. * @returns {string} Returns the string.
  21771. */
  21772. function baseToString(value) {
  21773. // Exit early for strings to avoid a performance hit in some environments.
  21774. if (typeof value == 'string') {
  21775. return value;
  21776. }
  21777. if (isArray(value)) {
  21778. // Recursively convert values (susceptible to call stack limits).
  21779. return arrayMap(value, baseToString) + '';
  21780. }
  21781. if (isSymbol(value)) {
  21782. return symbolToString ? symbolToString.call(value) : '';
  21783. }
  21784. var result = value + '';
  21785. return result == '0' && 1 / value == -INFINITY ? '-0' : result;
  21786. }
  21787. module.exports = baseToString;
  21788. });
  21789. $__System.registerDynamic('9b', ['9e'], true, function ($__require, exports, module) {
  21790. var global = this || self,
  21791. GLOBAL = global;
  21792. var baseToString = $__require('9e');
  21793. /**
  21794. * Converts `value` to a string. An empty string is returned for `null`
  21795. * and `undefined` values. The sign of `-0` is preserved.
  21796. *
  21797. * @static
  21798. * @memberOf _
  21799. * @since 4.0.0
  21800. * @category Lang
  21801. * @param {*} value The value to convert.
  21802. * @returns {string} Returns the converted string.
  21803. * @example
  21804. *
  21805. * _.toString(null);
  21806. * // => ''
  21807. *
  21808. * _.toString(-0);
  21809. * // => '-0'
  21810. *
  21811. * _.toString([1, 2, 3]);
  21812. * // => '1,2,3'
  21813. */
  21814. function toString(value) {
  21815. return value == null ? '' : baseToString(value);
  21816. }
  21817. module.exports = toString;
  21818. });
  21819. $__System.registerDynamic('5c', ['144', '96', '3c', '9b'], true, function ($__require, exports, module) {
  21820. var global = this || self,
  21821. GLOBAL = global;
  21822. var baseRepeat = $__require('144'),
  21823. isIterateeCall = $__require('96'),
  21824. toInteger = $__require('3c'),
  21825. toString = $__require('9b');
  21826. /**
  21827. * Repeats the given string `n` times.
  21828. *
  21829. * @static
  21830. * @memberOf _
  21831. * @since 3.0.0
  21832. * @category String
  21833. * @param {string} [string=''] The string to repeat.
  21834. * @param {number} [n=1] The number of times to repeat the string.
  21835. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  21836. * @returns {string} Returns the repeated string.
  21837. * @example
  21838. *
  21839. * _.repeat('*', 3);
  21840. * // => '***'
  21841. *
  21842. * _.repeat('abc', 2);
  21843. * // => 'abcabc'
  21844. *
  21845. * _.repeat('abc', 0);
  21846. * // => ''
  21847. */
  21848. function repeat(string, n, guard) {
  21849. if (guard ? isIterateeCall(string, n, guard) : n === undefined) {
  21850. n = 1;
  21851. } else {
  21852. n = toInteger(n);
  21853. }
  21854. return baseRepeat(toString(string), n);
  21855. }
  21856. module.exports = repeat;
  21857. });
  21858. $__System.registerDynamic("145", ["1d", "146", "11", "c"], true, function ($__require, exports, module) {
  21859. "use strict";
  21860. var process = $__require("c");
  21861. var global = this || self,
  21862. GLOBAL = global;
  21863. exports.__esModule = true;
  21864. var _classCallCheck2 = $__require("1d");
  21865. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  21866. var _binding = $__require("146");
  21867. var _binding2 = _interopRequireDefault(_binding);
  21868. var _babelTypes = $__require("11");
  21869. var t = _interopRequireWildcard(_babelTypes);
  21870. function _interopRequireWildcard(obj) {
  21871. if (obj && obj.__esModule) {
  21872. return obj;
  21873. } else {
  21874. var newObj = {};if (obj != null) {
  21875. for (var key in obj) {
  21876. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  21877. }
  21878. }newObj.default = obj;return newObj;
  21879. }
  21880. }
  21881. function _interopRequireDefault(obj) {
  21882. return obj && obj.__esModule ? obj : { default: obj };
  21883. }
  21884. var renameVisitor = {
  21885. ReferencedIdentifier: function ReferencedIdentifier(_ref, state) {
  21886. var node = _ref.node;
  21887. if (node.name === state.oldName) {
  21888. node.name = state.newName;
  21889. }
  21890. },
  21891. Scope: function Scope(path, state) {
  21892. if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
  21893. path.skip();
  21894. }
  21895. },
  21896. "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) {
  21897. var ids = path.getOuterBindingIdentifiers();
  21898. for (var name in ids) {
  21899. if (name === state.oldName) ids[name].name = state.newName;
  21900. }
  21901. }
  21902. };
  21903. var Renamer = function () {
  21904. function Renamer(binding, oldName, newName) {
  21905. (0, _classCallCheck3.default)(this, Renamer);
  21906. this.newName = newName;
  21907. this.oldName = oldName;
  21908. this.binding = binding;
  21909. }
  21910. Renamer.prototype.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) {
  21911. var exportDeclar = parentDeclar.parentPath.isExportDeclaration() && parentDeclar.parentPath;
  21912. if (!exportDeclar) return;
  21913. var isDefault = exportDeclar.isExportDefaultDeclaration();
  21914. if (isDefault && (parentDeclar.isFunctionDeclaration() || parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) {
  21915. parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default");
  21916. }
  21917. var bindingIdentifiers = parentDeclar.getOuterBindingIdentifiers();
  21918. var specifiers = [];
  21919. for (var name in bindingIdentifiers) {
  21920. var localName = name === this.oldName ? this.newName : name;
  21921. var exportedName = isDefault ? "default" : name;
  21922. specifiers.push(t.exportSpecifier(t.identifier(localName), t.identifier(exportedName)));
  21923. }
  21924. if (specifiers.length) {
  21925. var aliasDeclar = t.exportNamedDeclaration(null, specifiers);
  21926. if (parentDeclar.isFunctionDeclaration()) {
  21927. aliasDeclar._blockHoist = 3;
  21928. }
  21929. exportDeclar.insertAfter(aliasDeclar);
  21930. exportDeclar.replaceWith(parentDeclar.node);
  21931. }
  21932. };
  21933. Renamer.prototype.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) {
  21934. return;
  21935. if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return;
  21936. if (this.binding.kind !== "hoisted") return;
  21937. path.node.id = t.identifier(this.oldName);
  21938. path.node._blockHoist = 3;
  21939. path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(t.identifier(this.newName), t.toExpression(path.node))]));
  21940. };
  21941. Renamer.prototype.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) {
  21942. return;
  21943. if (!path.isFunctionExpression() && !path.isClassExpression()) return;
  21944. if (this.binding.kind !== "local") return;
  21945. path.node.id = t.identifier(this.oldName);
  21946. this.binding.scope.parent.push({
  21947. id: t.identifier(this.newName)
  21948. });
  21949. path.replaceWith(t.assignmentExpression("=", t.identifier(this.newName), path.node));
  21950. };
  21951. Renamer.prototype.rename = function rename(block) {
  21952. var binding = this.binding,
  21953. oldName = this.oldName,
  21954. newName = this.newName;
  21955. var scope = binding.scope,
  21956. path = binding.path;
  21957. var parentDeclar = path.find(function (path) {
  21958. return path.isDeclaration() || path.isFunctionExpression();
  21959. });
  21960. if (parentDeclar) {
  21961. this.maybeConvertFromExportDeclaration(parentDeclar);
  21962. }
  21963. scope.traverse(block || scope.block, renameVisitor, this);
  21964. if (!block) {
  21965. scope.removeOwnBinding(oldName);
  21966. scope.bindings[newName] = binding;
  21967. this.binding.identifier.name = newName;
  21968. }
  21969. if (binding.type === "hoisted") {}
  21970. if (parentDeclar) {
  21971. this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
  21972. this.maybeConvertFromClassFunctionExpression(parentDeclar);
  21973. }
  21974. };
  21975. return Renamer;
  21976. }();
  21977. exports.default = Renamer;
  21978. module.exports = exports["default"];
  21979. });
  21980. $__System.registerDynamic('96', ['72', '3f', '13c', '81'], true, function ($__require, exports, module) {
  21981. var global = this || self,
  21982. GLOBAL = global;
  21983. var eq = $__require('72'),
  21984. isArrayLike = $__require('3f'),
  21985. isIndex = $__require('13c'),
  21986. isObject = $__require('81');
  21987. /**
  21988. * Checks if the given arguments are from an iteratee call.
  21989. *
  21990. * @private
  21991. * @param {*} value The potential iteratee value argument.
  21992. * @param {*} index The potential iteratee index or key argument.
  21993. * @param {*} object The potential iteratee object argument.
  21994. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  21995. * else `false`.
  21996. */
  21997. function isIterateeCall(value, index, object) {
  21998. if (!isObject(object)) {
  21999. return false;
  22000. }
  22001. var type = typeof index;
  22002. if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {
  22003. return eq(object[index], value);
  22004. }
  22005. return false;
  22006. }
  22007. module.exports = isIterateeCall;
  22008. });
  22009. $__System.registerDynamic('c2', ['95', '96'], true, function ($__require, exports, module) {
  22010. var global = this || self,
  22011. GLOBAL = global;
  22012. var baseRest = $__require('95'),
  22013. isIterateeCall = $__require('96');
  22014. /**
  22015. * Creates a function like `_.assign`.
  22016. *
  22017. * @private
  22018. * @param {Function} assigner The function to assign values.
  22019. * @returns {Function} Returns the new assigner function.
  22020. */
  22021. function createAssigner(assigner) {
  22022. return baseRest(function (object, sources) {
  22023. var index = -1,
  22024. length = sources.length,
  22025. customizer = length > 1 ? sources[length - 1] : undefined,
  22026. guard = length > 2 ? sources[2] : undefined;
  22027. customizer = assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined;
  22028. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  22029. customizer = length < 3 ? undefined : customizer;
  22030. length = 1;
  22031. }
  22032. object = Object(object);
  22033. while (++index < length) {
  22034. var source = sources[index];
  22035. if (source) {
  22036. assigner(object, source, index, customizer);
  22037. }
  22038. }
  22039. return object;
  22040. });
  22041. }
  22042. module.exports = createAssigner;
  22043. });
  22044. $__System.registerDynamic('147', ['b7', 'c2', 'b8'], true, function ($__require, exports, module) {
  22045. var global = this || self,
  22046. GLOBAL = global;
  22047. var copyObject = $__require('b7'),
  22048. createAssigner = $__require('c2'),
  22049. keysIn = $__require('b8');
  22050. /**
  22051. * This method is like `_.assignIn` except that it accepts `customizer`
  22052. * which is invoked to produce the assigned values. If `customizer` returns
  22053. * `undefined`, assignment is handled by the method instead. The `customizer`
  22054. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  22055. *
  22056. * **Note:** This method mutates `object`.
  22057. *
  22058. * @static
  22059. * @memberOf _
  22060. * @since 4.0.0
  22061. * @alias extendWith
  22062. * @category Object
  22063. * @param {Object} object The destination object.
  22064. * @param {...Object} sources The source objects.
  22065. * @param {Function} [customizer] The function to customize assigned values.
  22066. * @returns {Object} Returns `object`.
  22067. * @see _.assignWith
  22068. * @example
  22069. *
  22070. * function customizer(objValue, srcValue) {
  22071. * return _.isUndefined(objValue) ? srcValue : objValue;
  22072. * }
  22073. *
  22074. * var defaults = _.partialRight(_.assignInWith, customizer);
  22075. *
  22076. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  22077. * // => { 'a': 1, 'b': 2 }
  22078. */
  22079. var assignInWith = createAssigner(function (object, source, srcIndex, customizer) {
  22080. copyObject(source, keysIn(source), object, customizer);
  22081. });
  22082. module.exports = assignInWith;
  22083. });
  22084. $__System.registerDynamic("148", [], true, function ($__require, exports, module) {
  22085. var global = this || self,
  22086. GLOBAL = global;
  22087. /**
  22088. * A faster alternative to `Function#apply`, this function invokes `func`
  22089. * with the `this` binding of `thisArg` and the arguments of `args`.
  22090. *
  22091. * @private
  22092. * @param {Function} func The function to invoke.
  22093. * @param {*} thisArg The `this` binding of `func`.
  22094. * @param {Array} args The arguments to invoke `func` with.
  22095. * @returns {*} Returns the result of `func`.
  22096. */
  22097. function apply(func, thisArg, args) {
  22098. switch (args.length) {
  22099. case 0:
  22100. return func.call(thisArg);
  22101. case 1:
  22102. return func.call(thisArg, args[0]);
  22103. case 2:
  22104. return func.call(thisArg, args[0], args[1]);
  22105. case 3:
  22106. return func.call(thisArg, args[0], args[1], args[2]);
  22107. }
  22108. return func.apply(thisArg, args);
  22109. }
  22110. module.exports = apply;
  22111. });
  22112. $__System.registerDynamic('149', ['148'], true, function ($__require, exports, module) {
  22113. var global = this || self,
  22114. GLOBAL = global;
  22115. var apply = $__require('148');
  22116. /* Built-in method references for those with the same name as other `lodash` methods. */
  22117. var nativeMax = Math.max;
  22118. /**
  22119. * A specialized version of `baseRest` which transforms the rest array.
  22120. *
  22121. * @private
  22122. * @param {Function} func The function to apply a rest parameter to.
  22123. * @param {number} [start=func.length-1] The start position of the rest parameter.
  22124. * @param {Function} transform The rest array transform.
  22125. * @returns {Function} Returns the new function.
  22126. */
  22127. function overRest(func, start, transform) {
  22128. start = nativeMax(start === undefined ? func.length - 1 : start, 0);
  22129. return function () {
  22130. var args = arguments,
  22131. index = -1,
  22132. length = nativeMax(args.length - start, 0),
  22133. array = Array(length);
  22134. while (++index < length) {
  22135. array[index] = args[start + index];
  22136. }
  22137. index = -1;
  22138. var otherArgs = Array(start + 1);
  22139. while (++index < start) {
  22140. otherArgs[index] = args[index];
  22141. }
  22142. otherArgs[start] = transform(array);
  22143. return apply(func, this, otherArgs);
  22144. };
  22145. }
  22146. module.exports = overRest;
  22147. });
  22148. $__System.registerDynamic("14a", [], true, function ($__require, exports, module) {
  22149. var global = this || self,
  22150. GLOBAL = global;
  22151. /**
  22152. * Creates a function that returns `value`.
  22153. *
  22154. * @static
  22155. * @memberOf _
  22156. * @since 2.4.0
  22157. * @category Util
  22158. * @param {*} value The value to return from the new function.
  22159. * @returns {Function} Returns the new constant function.
  22160. * @example
  22161. *
  22162. * var objects = _.times(2, _.constant({ 'a': 1 }));
  22163. *
  22164. * console.log(objects);
  22165. * // => [{ 'a': 1 }, { 'a': 1 }]
  22166. *
  22167. * console.log(objects[0] === objects[1]);
  22168. * // => true
  22169. */
  22170. function constant(value) {
  22171. return function () {
  22172. return value;
  22173. };
  22174. }
  22175. module.exports = constant;
  22176. });
  22177. $__System.registerDynamic("89", [], true, function ($__require, exports, module) {
  22178. var global = this || self,
  22179. GLOBAL = global;
  22180. /**
  22181. * This method returns the first argument it receives.
  22182. *
  22183. * @static
  22184. * @since 0.1.0
  22185. * @memberOf _
  22186. * @category Util
  22187. * @param {*} value Any value.
  22188. * @returns {*} Returns `value`.
  22189. * @example
  22190. *
  22191. * var object = { 'a': 1 };
  22192. *
  22193. * console.log(_.identity(object) === object);
  22194. * // => true
  22195. */
  22196. function identity(value) {
  22197. return value;
  22198. }
  22199. module.exports = identity;
  22200. });
  22201. $__System.registerDynamic('14b', ['14a', '14c', '89'], true, function ($__require, exports, module) {
  22202. var global = this || self,
  22203. GLOBAL = global;
  22204. var constant = $__require('14a'),
  22205. defineProperty = $__require('14c'),
  22206. identity = $__require('89');
  22207. /**
  22208. * The base implementation of `setToString` without support for hot loop shorting.
  22209. *
  22210. * @private
  22211. * @param {Function} func The function to modify.
  22212. * @param {Function} string The `toString` result.
  22213. * @returns {Function} Returns `func`.
  22214. */
  22215. var baseSetToString = !defineProperty ? identity : function (func, string) {
  22216. return defineProperty(func, 'toString', {
  22217. 'configurable': true,
  22218. 'enumerable': false,
  22219. 'value': constant(string),
  22220. 'writable': true
  22221. });
  22222. };
  22223. module.exports = baseSetToString;
  22224. });
  22225. $__System.registerDynamic("14d", [], true, function ($__require, exports, module) {
  22226. var global = this || self,
  22227. GLOBAL = global;
  22228. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  22229. var HOT_COUNT = 800,
  22230. HOT_SPAN = 16;
  22231. /* Built-in method references for those with the same name as other `lodash` methods. */
  22232. var nativeNow = Date.now;
  22233. /**
  22234. * Creates a function that'll short out and invoke `identity` instead
  22235. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  22236. * milliseconds.
  22237. *
  22238. * @private
  22239. * @param {Function} func The function to restrict.
  22240. * @returns {Function} Returns the new shortable function.
  22241. */
  22242. function shortOut(func) {
  22243. var count = 0,
  22244. lastCalled = 0;
  22245. return function () {
  22246. var stamp = nativeNow(),
  22247. remaining = HOT_SPAN - (stamp - lastCalled);
  22248. lastCalled = stamp;
  22249. if (remaining > 0) {
  22250. if (++count >= HOT_COUNT) {
  22251. return arguments[0];
  22252. }
  22253. } else {
  22254. count = 0;
  22255. }
  22256. return func.apply(undefined, arguments);
  22257. };
  22258. }
  22259. module.exports = shortOut;
  22260. });
  22261. $__System.registerDynamic('14e', ['14b', '14d'], true, function ($__require, exports, module) {
  22262. var global = this || self,
  22263. GLOBAL = global;
  22264. var baseSetToString = $__require('14b'),
  22265. shortOut = $__require('14d');
  22266. /**
  22267. * Sets the `toString` method of `func` to return `string`.
  22268. *
  22269. * @private
  22270. * @param {Function} func The function to modify.
  22271. * @param {Function} string The `toString` result.
  22272. * @returns {Function} Returns `func`.
  22273. */
  22274. var setToString = shortOut(baseSetToString);
  22275. module.exports = setToString;
  22276. });
  22277. $__System.registerDynamic('95', ['89', '149', '14e'], true, function ($__require, exports, module) {
  22278. var global = this || self,
  22279. GLOBAL = global;
  22280. var identity = $__require('89'),
  22281. overRest = $__require('149'),
  22282. setToString = $__require('14e');
  22283. /**
  22284. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  22285. *
  22286. * @private
  22287. * @param {Function} func The function to apply a rest parameter to.
  22288. * @param {number} [start=func.length-1] The start position of the rest parameter.
  22289. * @returns {Function} Returns the new function.
  22290. */
  22291. function baseRest(func, start) {
  22292. return setToString(overRest(func, start, identity), func + '');
  22293. }
  22294. module.exports = baseRest;
  22295. });
  22296. $__System.registerDynamic('14f', ['72'], true, function ($__require, exports, module) {
  22297. var global = this || self,
  22298. GLOBAL = global;
  22299. var eq = $__require('72');
  22300. /** Used for built-in method references. */
  22301. var objectProto = Object.prototype;
  22302. /** Used to check objects for own properties. */
  22303. var hasOwnProperty = objectProto.hasOwnProperty;
  22304. /**
  22305. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  22306. * of source objects to the destination object for all destination properties
  22307. * that resolve to `undefined`.
  22308. *
  22309. * @private
  22310. * @param {*} objValue The destination value.
  22311. * @param {*} srcValue The source value.
  22312. * @param {string} key The key of the property to assign.
  22313. * @param {Object} object The parent object of `objValue`.
  22314. * @returns {*} Returns the value to assign.
  22315. */
  22316. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  22317. if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
  22318. return srcValue;
  22319. }
  22320. return objValue;
  22321. }
  22322. module.exports = customDefaultsAssignIn;
  22323. });
  22324. $__System.registerDynamic('d6', ['148', '147', '95', '14f'], true, function ($__require, exports, module) {
  22325. var global = this || self,
  22326. GLOBAL = global;
  22327. var apply = $__require('148'),
  22328. assignInWith = $__require('147'),
  22329. baseRest = $__require('95'),
  22330. customDefaultsAssignIn = $__require('14f');
  22331. /**
  22332. * Assigns own and inherited enumerable string keyed properties of source
  22333. * objects to the destination object for all destination properties that
  22334. * resolve to `undefined`. Source objects are applied from left to right.
  22335. * Once a property is set, additional values of the same property are ignored.
  22336. *
  22337. * **Note:** This method mutates `object`.
  22338. *
  22339. * @static
  22340. * @since 0.1.0
  22341. * @memberOf _
  22342. * @category Object
  22343. * @param {Object} object The destination object.
  22344. * @param {...Object} [sources] The source objects.
  22345. * @returns {Object} Returns `object`.
  22346. * @see _.defaultsDeep
  22347. * @example
  22348. *
  22349. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  22350. * // => { 'a': 1, 'b': 2 }
  22351. */
  22352. var defaults = baseRest(function (args) {
  22353. args.push(undefined, customDefaultsAssignIn);
  22354. return apply(assignInWith, undefined, args);
  22355. });
  22356. module.exports = defaults;
  22357. });
  22358. $__System.registerDynamic("146", ["1d", "c"], true, function ($__require, exports, module) {
  22359. "use strict";
  22360. var process = $__require("c");
  22361. var global = this || self,
  22362. GLOBAL = global;
  22363. exports.__esModule = true;
  22364. var _classCallCheck2 = $__require("1d");
  22365. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  22366. function _interopRequireDefault(obj) {
  22367. return obj && obj.__esModule ? obj : { default: obj };
  22368. }
  22369. var Binding = function () {
  22370. function Binding(_ref) {
  22371. var existing = _ref.existing,
  22372. identifier = _ref.identifier,
  22373. scope = _ref.scope,
  22374. path = _ref.path,
  22375. kind = _ref.kind;
  22376. (0, _classCallCheck3.default)(this, Binding);
  22377. this.identifier = identifier;
  22378. this.scope = scope;
  22379. this.path = path;
  22380. this.kind = kind;
  22381. this.constantViolations = [];
  22382. this.constant = true;
  22383. this.referencePaths = [];
  22384. this.referenced = false;
  22385. this.references = 0;
  22386. this.clearValue();
  22387. if (existing) {
  22388. this.constantViolations = [].concat(existing.path, existing.constantViolations, this.constantViolations);
  22389. }
  22390. }
  22391. Binding.prototype.deoptValue = function deoptValue() {
  22392. this.clearValue();
  22393. this.hasDeoptedValue = true;
  22394. };
  22395. Binding.prototype.setValue = function setValue(value) {
  22396. if (this.hasDeoptedValue) return;
  22397. this.hasValue = true;
  22398. this.value = value;
  22399. };
  22400. Binding.prototype.clearValue = function clearValue() {
  22401. this.hasDeoptedValue = false;
  22402. this.hasValue = false;
  22403. this.value = null;
  22404. };
  22405. Binding.prototype.reassign = function reassign(path) {
  22406. this.constant = false;
  22407. if (this.constantViolations.indexOf(path) !== -1) {
  22408. return;
  22409. }
  22410. this.constantViolations.push(path);
  22411. };
  22412. Binding.prototype.reference = function reference(path) {
  22413. if (this.referencePaths.indexOf(path) !== -1) {
  22414. return;
  22415. }
  22416. this.referenced = true;
  22417. this.references++;
  22418. this.referencePaths.push(path);
  22419. };
  22420. Binding.prototype.dereference = function dereference() {
  22421. this.references--;
  22422. this.referenced = !!this.references;
  22423. };
  22424. return Binding;
  22425. }();
  22426. exports.default = Binding;
  22427. module.exports = exports["default"];
  22428. });
  22429. $__System.registerDynamic("150", [], true, function() {
  22430. return {
  22431. "builtin": {
  22432. "Array": false,
  22433. "ArrayBuffer": false,
  22434. "Boolean": false,
  22435. "constructor": false,
  22436. "DataView": false,
  22437. "Date": false,
  22438. "decodeURI": false,
  22439. "decodeURIComponent": false,
  22440. "encodeURI": false,
  22441. "encodeURIComponent": false,
  22442. "Error": false,
  22443. "escape": false,
  22444. "eval": false,
  22445. "EvalError": false,
  22446. "Float32Array": false,
  22447. "Float64Array": false,
  22448. "Function": false,
  22449. "hasOwnProperty": false,
  22450. "Infinity": false,
  22451. "Int16Array": false,
  22452. "Int32Array": false,
  22453. "Int8Array": false,
  22454. "isFinite": false,
  22455. "isNaN": false,
  22456. "isPrototypeOf": false,
  22457. "JSON": false,
  22458. "Map": false,
  22459. "Math": false,
  22460. "NaN": false,
  22461. "Number": false,
  22462. "Object": false,
  22463. "parseFloat": false,
  22464. "parseInt": false,
  22465. "Promise": false,
  22466. "propertyIsEnumerable": false,
  22467. "Proxy": false,
  22468. "RangeError": false,
  22469. "ReferenceError": false,
  22470. "Reflect": false,
  22471. "RegExp": false,
  22472. "Set": false,
  22473. "String": false,
  22474. "Symbol": false,
  22475. "SyntaxError": false,
  22476. "System": false,
  22477. "toLocaleString": false,
  22478. "toString": false,
  22479. "TypeError": false,
  22480. "Uint16Array": false,
  22481. "Uint32Array": false,
  22482. "Uint8Array": false,
  22483. "Uint8ClampedArray": false,
  22484. "undefined": false,
  22485. "unescape": false,
  22486. "URIError": false,
  22487. "valueOf": false,
  22488. "WeakMap": false,
  22489. "WeakSet": false
  22490. },
  22491. "es5": {
  22492. "Array": false,
  22493. "Boolean": false,
  22494. "constructor": false,
  22495. "Date": false,
  22496. "decodeURI": false,
  22497. "decodeURIComponent": false,
  22498. "encodeURI": false,
  22499. "encodeURIComponent": false,
  22500. "Error": false,
  22501. "escape": false,
  22502. "eval": false,
  22503. "EvalError": false,
  22504. "Function": false,
  22505. "hasOwnProperty": false,
  22506. "Infinity": false,
  22507. "isFinite": false,
  22508. "isNaN": false,
  22509. "isPrototypeOf": false,
  22510. "JSON": false,
  22511. "Math": false,
  22512. "NaN": false,
  22513. "Number": false,
  22514. "Object": false,
  22515. "parseFloat": false,
  22516. "parseInt": false,
  22517. "propertyIsEnumerable": false,
  22518. "RangeError": false,
  22519. "ReferenceError": false,
  22520. "RegExp": false,
  22521. "String": false,
  22522. "SyntaxError": false,
  22523. "toLocaleString": false,
  22524. "toString": false,
  22525. "TypeError": false,
  22526. "undefined": false,
  22527. "unescape": false,
  22528. "URIError": false,
  22529. "valueOf": false
  22530. },
  22531. "es6": {
  22532. "Array": false,
  22533. "ArrayBuffer": false,
  22534. "Boolean": false,
  22535. "constructor": false,
  22536. "DataView": false,
  22537. "Date": false,
  22538. "decodeURI": false,
  22539. "decodeURIComponent": false,
  22540. "encodeURI": false,
  22541. "encodeURIComponent": false,
  22542. "Error": false,
  22543. "escape": false,
  22544. "eval": false,
  22545. "EvalError": false,
  22546. "Float32Array": false,
  22547. "Float64Array": false,
  22548. "Function": false,
  22549. "hasOwnProperty": false,
  22550. "Infinity": false,
  22551. "Int16Array": false,
  22552. "Int32Array": false,
  22553. "Int8Array": false,
  22554. "isFinite": false,
  22555. "isNaN": false,
  22556. "isPrototypeOf": false,
  22557. "JSON": false,
  22558. "Map": false,
  22559. "Math": false,
  22560. "NaN": false,
  22561. "Number": false,
  22562. "Object": false,
  22563. "parseFloat": false,
  22564. "parseInt": false,
  22565. "Promise": false,
  22566. "propertyIsEnumerable": false,
  22567. "Proxy": false,
  22568. "RangeError": false,
  22569. "ReferenceError": false,
  22570. "Reflect": false,
  22571. "RegExp": false,
  22572. "Set": false,
  22573. "String": false,
  22574. "Symbol": false,
  22575. "SyntaxError": false,
  22576. "System": false,
  22577. "toLocaleString": false,
  22578. "toString": false,
  22579. "TypeError": false,
  22580. "Uint16Array": false,
  22581. "Uint32Array": false,
  22582. "Uint8Array": false,
  22583. "Uint8ClampedArray": false,
  22584. "undefined": false,
  22585. "unescape": false,
  22586. "URIError": false,
  22587. "valueOf": false,
  22588. "WeakMap": false,
  22589. "WeakSet": false
  22590. },
  22591. "browser": {
  22592. "addEventListener": false,
  22593. "alert": false,
  22594. "AnalyserNode": false,
  22595. "Animation": false,
  22596. "AnimationEffectReadOnly": false,
  22597. "AnimationEffectTiming": false,
  22598. "AnimationEffectTimingReadOnly": false,
  22599. "AnimationEvent": false,
  22600. "AnimationPlaybackEvent": false,
  22601. "AnimationTimeline": false,
  22602. "applicationCache": false,
  22603. "ApplicationCache": false,
  22604. "ApplicationCacheErrorEvent": false,
  22605. "atob": false,
  22606. "Attr": false,
  22607. "Audio": false,
  22608. "AudioBuffer": false,
  22609. "AudioBufferSourceNode": false,
  22610. "AudioContext": false,
  22611. "AudioDestinationNode": false,
  22612. "AudioListener": false,
  22613. "AudioNode": false,
  22614. "AudioParam": false,
  22615. "AudioProcessingEvent": false,
  22616. "AutocompleteErrorEvent": false,
  22617. "BarProp": false,
  22618. "BatteryManager": false,
  22619. "BeforeUnloadEvent": false,
  22620. "BiquadFilterNode": false,
  22621. "Blob": false,
  22622. "blur": false,
  22623. "btoa": false,
  22624. "Cache": false,
  22625. "caches": false,
  22626. "CacheStorage": false,
  22627. "cancelAnimationFrame": false,
  22628. "cancelIdleCallback": false,
  22629. "CanvasGradient": false,
  22630. "CanvasPattern": false,
  22631. "CanvasRenderingContext2D": false,
  22632. "CDATASection": false,
  22633. "ChannelMergerNode": false,
  22634. "ChannelSplitterNode": false,
  22635. "CharacterData": false,
  22636. "clearInterval": false,
  22637. "clearTimeout": false,
  22638. "clientInformation": false,
  22639. "ClientRect": false,
  22640. "ClientRectList": false,
  22641. "ClipboardEvent": false,
  22642. "close": false,
  22643. "closed": false,
  22644. "CloseEvent": false,
  22645. "Comment": false,
  22646. "CompositionEvent": false,
  22647. "confirm": false,
  22648. "console": false,
  22649. "ConvolverNode": false,
  22650. "createImageBitmap": false,
  22651. "Credential": false,
  22652. "CredentialsContainer": false,
  22653. "crypto": false,
  22654. "Crypto": false,
  22655. "CryptoKey": false,
  22656. "CSS": false,
  22657. "CSSAnimation": false,
  22658. "CSSFontFaceRule": false,
  22659. "CSSImportRule": false,
  22660. "CSSKeyframeRule": false,
  22661. "CSSKeyframesRule": false,
  22662. "CSSMediaRule": false,
  22663. "CSSPageRule": false,
  22664. "CSSRule": false,
  22665. "CSSRuleList": false,
  22666. "CSSStyleDeclaration": false,
  22667. "CSSStyleRule": false,
  22668. "CSSStyleSheet": false,
  22669. "CSSSupportsRule": false,
  22670. "CSSTransition": false,
  22671. "CSSUnknownRule": false,
  22672. "CSSViewportRule": false,
  22673. "customElements": false,
  22674. "CustomEvent": false,
  22675. "DataTransfer": false,
  22676. "DataTransferItem": false,
  22677. "DataTransferItemList": false,
  22678. "Debug": false,
  22679. "defaultStatus": false,
  22680. "defaultstatus": false,
  22681. "DelayNode": false,
  22682. "DeviceMotionEvent": false,
  22683. "DeviceOrientationEvent": false,
  22684. "devicePixelRatio": false,
  22685. "dispatchEvent": false,
  22686. "document": false,
  22687. "Document": false,
  22688. "DocumentFragment": false,
  22689. "DocumentTimeline": false,
  22690. "DocumentType": false,
  22691. "DOMError": false,
  22692. "DOMException": false,
  22693. "DOMImplementation": false,
  22694. "DOMParser": false,
  22695. "DOMSettableTokenList": false,
  22696. "DOMStringList": false,
  22697. "DOMStringMap": false,
  22698. "DOMTokenList": false,
  22699. "DragEvent": false,
  22700. "DynamicsCompressorNode": false,
  22701. "Element": false,
  22702. "ElementTimeControl": false,
  22703. "ErrorEvent": false,
  22704. "event": false,
  22705. "Event": false,
  22706. "EventSource": false,
  22707. "EventTarget": false,
  22708. "external": false,
  22709. "FederatedCredential": false,
  22710. "fetch": false,
  22711. "File": false,
  22712. "FileError": false,
  22713. "FileList": false,
  22714. "FileReader": false,
  22715. "find": false,
  22716. "focus": false,
  22717. "FocusEvent": false,
  22718. "FontFace": false,
  22719. "FormData": false,
  22720. "frameElement": false,
  22721. "frames": false,
  22722. "GainNode": false,
  22723. "Gamepad": false,
  22724. "GamepadButton": false,
  22725. "GamepadEvent": false,
  22726. "getComputedStyle": false,
  22727. "getSelection": false,
  22728. "HashChangeEvent": false,
  22729. "Headers": false,
  22730. "history": false,
  22731. "History": false,
  22732. "HTMLAllCollection": false,
  22733. "HTMLAnchorElement": false,
  22734. "HTMLAppletElement": false,
  22735. "HTMLAreaElement": false,
  22736. "HTMLAudioElement": false,
  22737. "HTMLBaseElement": false,
  22738. "HTMLBlockquoteElement": false,
  22739. "HTMLBodyElement": false,
  22740. "HTMLBRElement": false,
  22741. "HTMLButtonElement": false,
  22742. "HTMLCanvasElement": false,
  22743. "HTMLCollection": false,
  22744. "HTMLContentElement": false,
  22745. "HTMLDataListElement": false,
  22746. "HTMLDetailsElement": false,
  22747. "HTMLDialogElement": false,
  22748. "HTMLDirectoryElement": false,
  22749. "HTMLDivElement": false,
  22750. "HTMLDListElement": false,
  22751. "HTMLDocument": false,
  22752. "HTMLElement": false,
  22753. "HTMLEmbedElement": false,
  22754. "HTMLFieldSetElement": false,
  22755. "HTMLFontElement": false,
  22756. "HTMLFormControlsCollection": false,
  22757. "HTMLFormElement": false,
  22758. "HTMLFrameElement": false,
  22759. "HTMLFrameSetElement": false,
  22760. "HTMLHeadElement": false,
  22761. "HTMLHeadingElement": false,
  22762. "HTMLHRElement": false,
  22763. "HTMLHtmlElement": false,
  22764. "HTMLIFrameElement": false,
  22765. "HTMLImageElement": false,
  22766. "HTMLInputElement": false,
  22767. "HTMLIsIndexElement": false,
  22768. "HTMLKeygenElement": false,
  22769. "HTMLLabelElement": false,
  22770. "HTMLLayerElement": false,
  22771. "HTMLLegendElement": false,
  22772. "HTMLLIElement": false,
  22773. "HTMLLinkElement": false,
  22774. "HTMLMapElement": false,
  22775. "HTMLMarqueeElement": false,
  22776. "HTMLMediaElement": false,
  22777. "HTMLMenuElement": false,
  22778. "HTMLMetaElement": false,
  22779. "HTMLMeterElement": false,
  22780. "HTMLModElement": false,
  22781. "HTMLObjectElement": false,
  22782. "HTMLOListElement": false,
  22783. "HTMLOptGroupElement": false,
  22784. "HTMLOptionElement": false,
  22785. "HTMLOptionsCollection": false,
  22786. "HTMLOutputElement": false,
  22787. "HTMLParagraphElement": false,
  22788. "HTMLParamElement": false,
  22789. "HTMLPictureElement": false,
  22790. "HTMLPreElement": false,
  22791. "HTMLProgressElement": false,
  22792. "HTMLQuoteElement": false,
  22793. "HTMLScriptElement": false,
  22794. "HTMLSelectElement": false,
  22795. "HTMLShadowElement": false,
  22796. "HTMLSourceElement": false,
  22797. "HTMLSpanElement": false,
  22798. "HTMLStyleElement": false,
  22799. "HTMLTableCaptionElement": false,
  22800. "HTMLTableCellElement": false,
  22801. "HTMLTableColElement": false,
  22802. "HTMLTableElement": false,
  22803. "HTMLTableRowElement": false,
  22804. "HTMLTableSectionElement": false,
  22805. "HTMLTemplateElement": false,
  22806. "HTMLTextAreaElement": false,
  22807. "HTMLTitleElement": false,
  22808. "HTMLTrackElement": false,
  22809. "HTMLUListElement": false,
  22810. "HTMLUnknownElement": false,
  22811. "HTMLVideoElement": false,
  22812. "IDBCursor": false,
  22813. "IDBCursorWithValue": false,
  22814. "IDBDatabase": false,
  22815. "IDBEnvironment": false,
  22816. "IDBFactory": false,
  22817. "IDBIndex": false,
  22818. "IDBKeyRange": false,
  22819. "IDBObjectStore": false,
  22820. "IDBOpenDBRequest": false,
  22821. "IDBRequest": false,
  22822. "IDBTransaction": false,
  22823. "IDBVersionChangeEvent": false,
  22824. "Image": false,
  22825. "ImageBitmap": false,
  22826. "ImageData": false,
  22827. "indexedDB": false,
  22828. "innerHeight": false,
  22829. "innerWidth": false,
  22830. "InputEvent": false,
  22831. "InputMethodContext": false,
  22832. "IntersectionObserver": false,
  22833. "IntersectionObserverEntry": false,
  22834. "Intl": false,
  22835. "KeyboardEvent": false,
  22836. "KeyframeEffect": false,
  22837. "KeyframeEffectReadOnly": false,
  22838. "length": false,
  22839. "localStorage": false,
  22840. "location": false,
  22841. "Location": false,
  22842. "locationbar": false,
  22843. "matchMedia": false,
  22844. "MediaElementAudioSourceNode": false,
  22845. "MediaEncryptedEvent": false,
  22846. "MediaError": false,
  22847. "MediaKeyError": false,
  22848. "MediaKeyEvent": false,
  22849. "MediaKeyMessageEvent": false,
  22850. "MediaKeys": false,
  22851. "MediaKeySession": false,
  22852. "MediaKeyStatusMap": false,
  22853. "MediaKeySystemAccess": false,
  22854. "MediaList": false,
  22855. "MediaQueryList": false,
  22856. "MediaQueryListEvent": false,
  22857. "MediaSource": false,
  22858. "MediaRecorder": false,
  22859. "MediaStream": false,
  22860. "MediaStreamAudioDestinationNode": false,
  22861. "MediaStreamAudioSourceNode": false,
  22862. "MediaStreamEvent": false,
  22863. "MediaStreamTrack": false,
  22864. "menubar": false,
  22865. "MessageChannel": false,
  22866. "MessageEvent": false,
  22867. "MessagePort": false,
  22868. "MIDIAccess": false,
  22869. "MIDIConnectionEvent": false,
  22870. "MIDIInput": false,
  22871. "MIDIInputMap": false,
  22872. "MIDIMessageEvent": false,
  22873. "MIDIOutput": false,
  22874. "MIDIOutputMap": false,
  22875. "MIDIPort": false,
  22876. "MimeType": false,
  22877. "MimeTypeArray": false,
  22878. "MouseEvent": false,
  22879. "moveBy": false,
  22880. "moveTo": false,
  22881. "MutationEvent": false,
  22882. "MutationObserver": false,
  22883. "MutationRecord": false,
  22884. "name": false,
  22885. "NamedNodeMap": false,
  22886. "navigator": false,
  22887. "Navigator": false,
  22888. "Node": false,
  22889. "NodeFilter": false,
  22890. "NodeIterator": false,
  22891. "NodeList": false,
  22892. "Notification": false,
  22893. "OfflineAudioCompletionEvent": false,
  22894. "OfflineAudioContext": false,
  22895. "offscreenBuffering": false,
  22896. "onbeforeunload": true,
  22897. "onblur": true,
  22898. "onerror": true,
  22899. "onfocus": true,
  22900. "onload": true,
  22901. "onresize": true,
  22902. "onunload": true,
  22903. "open": false,
  22904. "openDatabase": false,
  22905. "opener": false,
  22906. "opera": false,
  22907. "Option": false,
  22908. "OscillatorNode": false,
  22909. "outerHeight": false,
  22910. "outerWidth": false,
  22911. "PageTransitionEvent": false,
  22912. "pageXOffset": false,
  22913. "pageYOffset": false,
  22914. "parent": false,
  22915. "PasswordCredential": false,
  22916. "Path2D": false,
  22917. "performance": false,
  22918. "Performance": false,
  22919. "PerformanceEntry": false,
  22920. "PerformanceMark": false,
  22921. "PerformanceMeasure": false,
  22922. "PerformanceNavigation": false,
  22923. "PerformanceResourceTiming": false,
  22924. "PerformanceTiming": false,
  22925. "PeriodicWave": false,
  22926. "Permissions": false,
  22927. "PermissionStatus": false,
  22928. "personalbar": false,
  22929. "Plugin": false,
  22930. "PluginArray": false,
  22931. "PopStateEvent": false,
  22932. "postMessage": false,
  22933. "print": false,
  22934. "ProcessingInstruction": false,
  22935. "ProgressEvent": false,
  22936. "PromiseRejectionEvent": false,
  22937. "prompt": false,
  22938. "PushManager": false,
  22939. "PushSubscription": false,
  22940. "RadioNodeList": false,
  22941. "Range": false,
  22942. "ReadableByteStream": false,
  22943. "ReadableStream": false,
  22944. "removeEventListener": false,
  22945. "Request": false,
  22946. "requestAnimationFrame": false,
  22947. "requestIdleCallback": false,
  22948. "resizeBy": false,
  22949. "resizeTo": false,
  22950. "Response": false,
  22951. "RTCIceCandidate": false,
  22952. "RTCSessionDescription": false,
  22953. "RTCPeerConnection": false,
  22954. "screen": false,
  22955. "Screen": false,
  22956. "screenLeft": false,
  22957. "ScreenOrientation": false,
  22958. "screenTop": false,
  22959. "screenX": false,
  22960. "screenY": false,
  22961. "ScriptProcessorNode": false,
  22962. "scroll": false,
  22963. "scrollbars": false,
  22964. "scrollBy": false,
  22965. "scrollTo": false,
  22966. "scrollX": false,
  22967. "scrollY": false,
  22968. "SecurityPolicyViolationEvent": false,
  22969. "Selection": false,
  22970. "self": false,
  22971. "ServiceWorker": false,
  22972. "ServiceWorkerContainer": false,
  22973. "ServiceWorkerRegistration": false,
  22974. "sessionStorage": false,
  22975. "setInterval": false,
  22976. "setTimeout": false,
  22977. "ShadowRoot": false,
  22978. "SharedKeyframeList": false,
  22979. "SharedWorker": false,
  22980. "showModalDialog": false,
  22981. "SiteBoundCredential": false,
  22982. "speechSynthesis": false,
  22983. "SpeechSynthesisEvent": false,
  22984. "SpeechSynthesisUtterance": false,
  22985. "status": false,
  22986. "statusbar": false,
  22987. "stop": false,
  22988. "Storage": false,
  22989. "StorageEvent": false,
  22990. "styleMedia": false,
  22991. "StyleSheet": false,
  22992. "StyleSheetList": false,
  22993. "SubtleCrypto": false,
  22994. "SVGAElement": false,
  22995. "SVGAltGlyphDefElement": false,
  22996. "SVGAltGlyphElement": false,
  22997. "SVGAltGlyphItemElement": false,
  22998. "SVGAngle": false,
  22999. "SVGAnimateColorElement": false,
  23000. "SVGAnimatedAngle": false,
  23001. "SVGAnimatedBoolean": false,
  23002. "SVGAnimatedEnumeration": false,
  23003. "SVGAnimatedInteger": false,
  23004. "SVGAnimatedLength": false,
  23005. "SVGAnimatedLengthList": false,
  23006. "SVGAnimatedNumber": false,
  23007. "SVGAnimatedNumberList": false,
  23008. "SVGAnimatedPathData": false,
  23009. "SVGAnimatedPoints": false,
  23010. "SVGAnimatedPreserveAspectRatio": false,
  23011. "SVGAnimatedRect": false,
  23012. "SVGAnimatedString": false,
  23013. "SVGAnimatedTransformList": false,
  23014. "SVGAnimateElement": false,
  23015. "SVGAnimateMotionElement": false,
  23016. "SVGAnimateTransformElement": false,
  23017. "SVGAnimationElement": false,
  23018. "SVGCircleElement": false,
  23019. "SVGClipPathElement": false,
  23020. "SVGColor": false,
  23021. "SVGColorProfileElement": false,
  23022. "SVGColorProfileRule": false,
  23023. "SVGComponentTransferFunctionElement": false,
  23024. "SVGCSSRule": false,
  23025. "SVGCursorElement": false,
  23026. "SVGDefsElement": false,
  23027. "SVGDescElement": false,
  23028. "SVGDiscardElement": false,
  23029. "SVGDocument": false,
  23030. "SVGElement": false,
  23031. "SVGElementInstance": false,
  23032. "SVGElementInstanceList": false,
  23033. "SVGEllipseElement": false,
  23034. "SVGEvent": false,
  23035. "SVGExternalResourcesRequired": false,
  23036. "SVGFEBlendElement": false,
  23037. "SVGFEColorMatrixElement": false,
  23038. "SVGFEComponentTransferElement": false,
  23039. "SVGFECompositeElement": false,
  23040. "SVGFEConvolveMatrixElement": false,
  23041. "SVGFEDiffuseLightingElement": false,
  23042. "SVGFEDisplacementMapElement": false,
  23043. "SVGFEDistantLightElement": false,
  23044. "SVGFEDropShadowElement": false,
  23045. "SVGFEFloodElement": false,
  23046. "SVGFEFuncAElement": false,
  23047. "SVGFEFuncBElement": false,
  23048. "SVGFEFuncGElement": false,
  23049. "SVGFEFuncRElement": false,
  23050. "SVGFEGaussianBlurElement": false,
  23051. "SVGFEImageElement": false,
  23052. "SVGFEMergeElement": false,
  23053. "SVGFEMergeNodeElement": false,
  23054. "SVGFEMorphologyElement": false,
  23055. "SVGFEOffsetElement": false,
  23056. "SVGFEPointLightElement": false,
  23057. "SVGFESpecularLightingElement": false,
  23058. "SVGFESpotLightElement": false,
  23059. "SVGFETileElement": false,
  23060. "SVGFETurbulenceElement": false,
  23061. "SVGFilterElement": false,
  23062. "SVGFilterPrimitiveStandardAttributes": false,
  23063. "SVGFitToViewBox": false,
  23064. "SVGFontElement": false,
  23065. "SVGFontFaceElement": false,
  23066. "SVGFontFaceFormatElement": false,
  23067. "SVGFontFaceNameElement": false,
  23068. "SVGFontFaceSrcElement": false,
  23069. "SVGFontFaceUriElement": false,
  23070. "SVGForeignObjectElement": false,
  23071. "SVGGElement": false,
  23072. "SVGGeometryElement": false,
  23073. "SVGGlyphElement": false,
  23074. "SVGGlyphRefElement": false,
  23075. "SVGGradientElement": false,
  23076. "SVGGraphicsElement": false,
  23077. "SVGHKernElement": false,
  23078. "SVGICCColor": false,
  23079. "SVGImageElement": false,
  23080. "SVGLangSpace": false,
  23081. "SVGLength": false,
  23082. "SVGLengthList": false,
  23083. "SVGLinearGradientElement": false,
  23084. "SVGLineElement": false,
  23085. "SVGLocatable": false,
  23086. "SVGMarkerElement": false,
  23087. "SVGMaskElement": false,
  23088. "SVGMatrix": false,
  23089. "SVGMetadataElement": false,
  23090. "SVGMissingGlyphElement": false,
  23091. "SVGMPathElement": false,
  23092. "SVGNumber": false,
  23093. "SVGNumberList": false,
  23094. "SVGPaint": false,
  23095. "SVGPathElement": false,
  23096. "SVGPathSeg": false,
  23097. "SVGPathSegArcAbs": false,
  23098. "SVGPathSegArcRel": false,
  23099. "SVGPathSegClosePath": false,
  23100. "SVGPathSegCurvetoCubicAbs": false,
  23101. "SVGPathSegCurvetoCubicRel": false,
  23102. "SVGPathSegCurvetoCubicSmoothAbs": false,
  23103. "SVGPathSegCurvetoCubicSmoothRel": false,
  23104. "SVGPathSegCurvetoQuadraticAbs": false,
  23105. "SVGPathSegCurvetoQuadraticRel": false,
  23106. "SVGPathSegCurvetoQuadraticSmoothAbs": false,
  23107. "SVGPathSegCurvetoQuadraticSmoothRel": false,
  23108. "SVGPathSegLinetoAbs": false,
  23109. "SVGPathSegLinetoHorizontalAbs": false,
  23110. "SVGPathSegLinetoHorizontalRel": false,
  23111. "SVGPathSegLinetoRel": false,
  23112. "SVGPathSegLinetoVerticalAbs": false,
  23113. "SVGPathSegLinetoVerticalRel": false,
  23114. "SVGPathSegList": false,
  23115. "SVGPathSegMovetoAbs": false,
  23116. "SVGPathSegMovetoRel": false,
  23117. "SVGPatternElement": false,
  23118. "SVGPoint": false,
  23119. "SVGPointList": false,
  23120. "SVGPolygonElement": false,
  23121. "SVGPolylineElement": false,
  23122. "SVGPreserveAspectRatio": false,
  23123. "SVGRadialGradientElement": false,
  23124. "SVGRect": false,
  23125. "SVGRectElement": false,
  23126. "SVGRenderingIntent": false,
  23127. "SVGScriptElement": false,
  23128. "SVGSetElement": false,
  23129. "SVGStopElement": false,
  23130. "SVGStringList": false,
  23131. "SVGStylable": false,
  23132. "SVGStyleElement": false,
  23133. "SVGSVGElement": false,
  23134. "SVGSwitchElement": false,
  23135. "SVGSymbolElement": false,
  23136. "SVGTests": false,
  23137. "SVGTextContentElement": false,
  23138. "SVGTextElement": false,
  23139. "SVGTextPathElement": false,
  23140. "SVGTextPositioningElement": false,
  23141. "SVGTitleElement": false,
  23142. "SVGTransform": false,
  23143. "SVGTransformable": false,
  23144. "SVGTransformList": false,
  23145. "SVGTRefElement": false,
  23146. "SVGTSpanElement": false,
  23147. "SVGUnitTypes": false,
  23148. "SVGURIReference": false,
  23149. "SVGUseElement": false,
  23150. "SVGViewElement": false,
  23151. "SVGViewSpec": false,
  23152. "SVGVKernElement": false,
  23153. "SVGZoomAndPan": false,
  23154. "SVGZoomEvent": false,
  23155. "Text": false,
  23156. "TextDecoder": false,
  23157. "TextEncoder": false,
  23158. "TextEvent": false,
  23159. "TextMetrics": false,
  23160. "TextTrack": false,
  23161. "TextTrackCue": false,
  23162. "TextTrackCueList": false,
  23163. "TextTrackList": false,
  23164. "TimeEvent": false,
  23165. "TimeRanges": false,
  23166. "toolbar": false,
  23167. "top": false,
  23168. "Touch": false,
  23169. "TouchEvent": false,
  23170. "TouchList": false,
  23171. "TrackEvent": false,
  23172. "TransitionEvent": false,
  23173. "TreeWalker": false,
  23174. "UIEvent": false,
  23175. "URL": false,
  23176. "URLSearchParams": false,
  23177. "ValidityState": false,
  23178. "VTTCue": false,
  23179. "WaveShaperNode": false,
  23180. "WebGLActiveInfo": false,
  23181. "WebGLBuffer": false,
  23182. "WebGLContextEvent": false,
  23183. "WebGLFramebuffer": false,
  23184. "WebGLProgram": false,
  23185. "WebGLRenderbuffer": false,
  23186. "WebGLRenderingContext": false,
  23187. "WebGLShader": false,
  23188. "WebGLShaderPrecisionFormat": false,
  23189. "WebGLTexture": false,
  23190. "WebGLUniformLocation": false,
  23191. "WebSocket": false,
  23192. "WheelEvent": false,
  23193. "window": false,
  23194. "Window": false,
  23195. "Worker": false,
  23196. "XDomainRequest": false,
  23197. "XMLDocument": false,
  23198. "XMLHttpRequest": false,
  23199. "XMLHttpRequestEventTarget": false,
  23200. "XMLHttpRequestProgressEvent": false,
  23201. "XMLHttpRequestUpload": false,
  23202. "XMLSerializer": false,
  23203. "XPathEvaluator": false,
  23204. "XPathException": false,
  23205. "XPathExpression": false,
  23206. "XPathNamespace": false,
  23207. "XPathNSResolver": false,
  23208. "XPathResult": false,
  23209. "XSLTProcessor": false
  23210. },
  23211. "worker": {
  23212. "applicationCache": false,
  23213. "atob": false,
  23214. "Blob": false,
  23215. "BroadcastChannel": false,
  23216. "btoa": false,
  23217. "Cache": false,
  23218. "caches": false,
  23219. "clearInterval": false,
  23220. "clearTimeout": false,
  23221. "close": true,
  23222. "console": false,
  23223. "fetch": false,
  23224. "FileReaderSync": false,
  23225. "FormData": false,
  23226. "Headers": false,
  23227. "IDBCursor": false,
  23228. "IDBCursorWithValue": false,
  23229. "IDBDatabase": false,
  23230. "IDBFactory": false,
  23231. "IDBIndex": false,
  23232. "IDBKeyRange": false,
  23233. "IDBObjectStore": false,
  23234. "IDBOpenDBRequest": false,
  23235. "IDBRequest": false,
  23236. "IDBTransaction": false,
  23237. "IDBVersionChangeEvent": false,
  23238. "ImageData": false,
  23239. "importScripts": true,
  23240. "indexedDB": false,
  23241. "location": false,
  23242. "MessageChannel": false,
  23243. "MessagePort": false,
  23244. "name": false,
  23245. "navigator": false,
  23246. "Notification": false,
  23247. "onclose": true,
  23248. "onconnect": true,
  23249. "onerror": true,
  23250. "onlanguagechange": true,
  23251. "onmessage": true,
  23252. "onoffline": true,
  23253. "ononline": true,
  23254. "onrejectionhandled": true,
  23255. "onunhandledrejection": true,
  23256. "performance": false,
  23257. "Performance": false,
  23258. "PerformanceEntry": false,
  23259. "PerformanceMark": false,
  23260. "PerformanceMeasure": false,
  23261. "PerformanceNavigation": false,
  23262. "PerformanceResourceTiming": false,
  23263. "PerformanceTiming": false,
  23264. "postMessage": true,
  23265. "Promise": false,
  23266. "Request": false,
  23267. "Response": false,
  23268. "self": true,
  23269. "ServiceWorkerRegistration": false,
  23270. "setInterval": false,
  23271. "setTimeout": false,
  23272. "TextDecoder": false,
  23273. "TextEncoder": false,
  23274. "URL": false,
  23275. "URLSearchParams": false,
  23276. "WebSocket": false,
  23277. "Worker": false,
  23278. "XMLHttpRequest": false
  23279. },
  23280. "node": {
  23281. "__dirname": false,
  23282. "__filename": false,
  23283. "arguments": false,
  23284. "Buffer": false,
  23285. "clearImmediate": false,
  23286. "clearInterval": false,
  23287. "clearTimeout": false,
  23288. "console": false,
  23289. "exports": true,
  23290. "GLOBAL": false,
  23291. "global": false,
  23292. "Intl": false,
  23293. "module": false,
  23294. "process": false,
  23295. "require": false,
  23296. "root": false,
  23297. "setImmediate": false,
  23298. "setInterval": false,
  23299. "setTimeout": false
  23300. },
  23301. "commonjs": {
  23302. "exports": true,
  23303. "module": false,
  23304. "require": false,
  23305. "global": false
  23306. },
  23307. "amd": {
  23308. "define": false,
  23309. "require": false
  23310. },
  23311. "mocha": {
  23312. "after": false,
  23313. "afterEach": false,
  23314. "before": false,
  23315. "beforeEach": false,
  23316. "context": false,
  23317. "describe": false,
  23318. "it": false,
  23319. "mocha": false,
  23320. "run": false,
  23321. "setup": false,
  23322. "specify": false,
  23323. "suite": false,
  23324. "suiteSetup": false,
  23325. "suiteTeardown": false,
  23326. "teardown": false,
  23327. "test": false,
  23328. "xcontext": false,
  23329. "xdescribe": false,
  23330. "xit": false,
  23331. "xspecify": false
  23332. },
  23333. "jasmine": {
  23334. "afterAll": false,
  23335. "afterEach": false,
  23336. "beforeAll": false,
  23337. "beforeEach": false,
  23338. "describe": false,
  23339. "expect": false,
  23340. "fail": false,
  23341. "fdescribe": false,
  23342. "fit": false,
  23343. "it": false,
  23344. "jasmine": false,
  23345. "pending": false,
  23346. "runs": false,
  23347. "spyOn": false,
  23348. "spyOnProperty": false,
  23349. "waits": false,
  23350. "waitsFor": false,
  23351. "xdescribe": false,
  23352. "xit": false
  23353. },
  23354. "jest": {
  23355. "afterAll": false,
  23356. "afterEach": false,
  23357. "beforeAll": false,
  23358. "beforeEach": false,
  23359. "check": false,
  23360. "describe": false,
  23361. "expect": false,
  23362. "gen": false,
  23363. "it": false,
  23364. "fdescribe": false,
  23365. "fit": false,
  23366. "jest": false,
  23367. "pit": false,
  23368. "require": false,
  23369. "test": false,
  23370. "xdescribe": false,
  23371. "xit": false,
  23372. "xtest": false
  23373. },
  23374. "qunit": {
  23375. "asyncTest": false,
  23376. "deepEqual": false,
  23377. "equal": false,
  23378. "expect": false,
  23379. "module": false,
  23380. "notDeepEqual": false,
  23381. "notEqual": false,
  23382. "notOk": false,
  23383. "notPropEqual": false,
  23384. "notStrictEqual": false,
  23385. "ok": false,
  23386. "propEqual": false,
  23387. "QUnit": false,
  23388. "raises": false,
  23389. "start": false,
  23390. "stop": false,
  23391. "strictEqual": false,
  23392. "test": false,
  23393. "throws": false
  23394. },
  23395. "phantomjs": {
  23396. "console": true,
  23397. "exports": true,
  23398. "phantom": true,
  23399. "require": true,
  23400. "WebPage": true
  23401. },
  23402. "couch": {
  23403. "emit": false,
  23404. "exports": false,
  23405. "getRow": false,
  23406. "log": false,
  23407. "module": false,
  23408. "provides": false,
  23409. "require": false,
  23410. "respond": false,
  23411. "send": false,
  23412. "start": false,
  23413. "sum": false
  23414. },
  23415. "rhino": {
  23416. "defineClass": false,
  23417. "deserialize": false,
  23418. "gc": false,
  23419. "help": false,
  23420. "importClass": false,
  23421. "importPackage": false,
  23422. "java": false,
  23423. "load": false,
  23424. "loadClass": false,
  23425. "Packages": false,
  23426. "print": false,
  23427. "quit": false,
  23428. "readFile": false,
  23429. "readUrl": false,
  23430. "runCommand": false,
  23431. "seal": false,
  23432. "serialize": false,
  23433. "spawn": false,
  23434. "sync": false,
  23435. "toint32": false,
  23436. "version": false
  23437. },
  23438. "nashorn": {
  23439. "__DIR__": false,
  23440. "__FILE__": false,
  23441. "__LINE__": false,
  23442. "com": false,
  23443. "edu": false,
  23444. "exit": false,
  23445. "Java": false,
  23446. "java": false,
  23447. "javafx": false,
  23448. "JavaImporter": false,
  23449. "javax": false,
  23450. "JSAdapter": false,
  23451. "load": false,
  23452. "loadWithNewGlobal": false,
  23453. "org": false,
  23454. "Packages": false,
  23455. "print": false,
  23456. "quit": false
  23457. },
  23458. "wsh": {
  23459. "ActiveXObject": true,
  23460. "Enumerator": true,
  23461. "GetObject": true,
  23462. "ScriptEngine": true,
  23463. "ScriptEngineBuildVersion": true,
  23464. "ScriptEngineMajorVersion": true,
  23465. "ScriptEngineMinorVersion": true,
  23466. "VBArray": true,
  23467. "WScript": true,
  23468. "WSH": true,
  23469. "XDomainRequest": true
  23470. },
  23471. "jquery": {
  23472. "$": false,
  23473. "jQuery": false
  23474. },
  23475. "yui": {
  23476. "Y": false,
  23477. "YUI": false,
  23478. "YUI_config": false
  23479. },
  23480. "shelljs": {
  23481. "cat": false,
  23482. "cd": false,
  23483. "chmod": false,
  23484. "config": false,
  23485. "cp": false,
  23486. "dirs": false,
  23487. "echo": false,
  23488. "env": false,
  23489. "error": false,
  23490. "exec": false,
  23491. "exit": false,
  23492. "find": false,
  23493. "grep": false,
  23494. "ls": false,
  23495. "ln": false,
  23496. "mkdir": false,
  23497. "mv": false,
  23498. "popd": false,
  23499. "pushd": false,
  23500. "pwd": false,
  23501. "rm": false,
  23502. "sed": false,
  23503. "set": false,
  23504. "target": false,
  23505. "tempdir": false,
  23506. "test": false,
  23507. "touch": false,
  23508. "which": false
  23509. },
  23510. "prototypejs": {
  23511. "$": false,
  23512. "$$": false,
  23513. "$A": false,
  23514. "$break": false,
  23515. "$continue": false,
  23516. "$F": false,
  23517. "$H": false,
  23518. "$R": false,
  23519. "$w": false,
  23520. "Abstract": false,
  23521. "Ajax": false,
  23522. "Autocompleter": false,
  23523. "Builder": false,
  23524. "Class": false,
  23525. "Control": false,
  23526. "Draggable": false,
  23527. "Draggables": false,
  23528. "Droppables": false,
  23529. "Effect": false,
  23530. "Element": false,
  23531. "Enumerable": false,
  23532. "Event": false,
  23533. "Field": false,
  23534. "Form": false,
  23535. "Hash": false,
  23536. "Insertion": false,
  23537. "ObjectRange": false,
  23538. "PeriodicalExecuter": false,
  23539. "Position": false,
  23540. "Prototype": false,
  23541. "Scriptaculous": false,
  23542. "Selector": false,
  23543. "Sortable": false,
  23544. "SortableObserver": false,
  23545. "Sound": false,
  23546. "Template": false,
  23547. "Toggle": false,
  23548. "Try": false
  23549. },
  23550. "meteor": {
  23551. "$": false,
  23552. "_": false,
  23553. "Accounts": false,
  23554. "AccountsClient": false,
  23555. "AccountsServer": false,
  23556. "AccountsCommon": false,
  23557. "App": false,
  23558. "Assets": false,
  23559. "Blaze": false,
  23560. "check": false,
  23561. "Cordova": false,
  23562. "DDP": false,
  23563. "DDPServer": false,
  23564. "DDPRateLimiter": false,
  23565. "Deps": false,
  23566. "EJSON": false,
  23567. "Email": false,
  23568. "HTTP": false,
  23569. "Log": false,
  23570. "Match": false,
  23571. "Meteor": false,
  23572. "Mongo": false,
  23573. "MongoInternals": false,
  23574. "Npm": false,
  23575. "Package": false,
  23576. "Plugin": false,
  23577. "process": false,
  23578. "Random": false,
  23579. "ReactiveDict": false,
  23580. "ReactiveVar": false,
  23581. "Router": false,
  23582. "ServiceConfiguration": false,
  23583. "Session": false,
  23584. "share": false,
  23585. "Spacebars": false,
  23586. "Template": false,
  23587. "Tinytest": false,
  23588. "Tracker": false,
  23589. "UI": false,
  23590. "Utils": false,
  23591. "WebApp": false,
  23592. "WebAppInternals": false
  23593. },
  23594. "mongo": {
  23595. "_isWindows": false,
  23596. "_rand": false,
  23597. "BulkWriteResult": false,
  23598. "cat": false,
  23599. "cd": false,
  23600. "connect": false,
  23601. "db": false,
  23602. "getHostName": false,
  23603. "getMemInfo": false,
  23604. "hostname": false,
  23605. "ISODate": false,
  23606. "listFiles": false,
  23607. "load": false,
  23608. "ls": false,
  23609. "md5sumFile": false,
  23610. "mkdir": false,
  23611. "Mongo": false,
  23612. "NumberInt": false,
  23613. "NumberLong": false,
  23614. "ObjectId": false,
  23615. "PlanCache": false,
  23616. "print": false,
  23617. "printjson": false,
  23618. "pwd": false,
  23619. "quit": false,
  23620. "removeFile": false,
  23621. "rs": false,
  23622. "sh": false,
  23623. "UUID": false,
  23624. "version": false,
  23625. "WriteResult": false
  23626. },
  23627. "applescript": {
  23628. "$": false,
  23629. "Application": false,
  23630. "Automation": false,
  23631. "console": false,
  23632. "delay": false,
  23633. "Library": false,
  23634. "ObjC": false,
  23635. "ObjectSpecifier": false,
  23636. "Path": false,
  23637. "Progress": false,
  23638. "Ref": false
  23639. },
  23640. "serviceworker": {
  23641. "caches": false,
  23642. "Cache": false,
  23643. "CacheStorage": false,
  23644. "Client": false,
  23645. "clients": false,
  23646. "Clients": false,
  23647. "ExtendableEvent": false,
  23648. "ExtendableMessageEvent": false,
  23649. "FetchEvent": false,
  23650. "importScripts": false,
  23651. "registration": false,
  23652. "self": false,
  23653. "ServiceWorker": false,
  23654. "ServiceWorkerContainer": false,
  23655. "ServiceWorkerGlobalScope": false,
  23656. "ServiceWorkerMessageEvent": false,
  23657. "ServiceWorkerRegistration": false,
  23658. "skipWaiting": false,
  23659. "WindowClient": false
  23660. },
  23661. "atomtest": {
  23662. "advanceClock": false,
  23663. "fakeClearInterval": false,
  23664. "fakeClearTimeout": false,
  23665. "fakeSetInterval": false,
  23666. "fakeSetTimeout": false,
  23667. "resetTimeouts": false,
  23668. "waitsForPromise": false
  23669. },
  23670. "embertest": {
  23671. "andThen": false,
  23672. "click": false,
  23673. "currentPath": false,
  23674. "currentRouteName": false,
  23675. "currentURL": false,
  23676. "fillIn": false,
  23677. "find": false,
  23678. "findWithAssert": false,
  23679. "keyEvent": false,
  23680. "pauseTest": false,
  23681. "resumeTest": false,
  23682. "triggerEvent": false,
  23683. "visit": false
  23684. },
  23685. "protractor": {
  23686. "$": false,
  23687. "$$": false,
  23688. "browser": false,
  23689. "By": false,
  23690. "by": false,
  23691. "DartObject": false,
  23692. "element": false,
  23693. "protractor": false
  23694. },
  23695. "shared-node-browser": {
  23696. "clearInterval": false,
  23697. "clearTimeout": false,
  23698. "console": false,
  23699. "setInterval": false,
  23700. "setTimeout": false
  23701. },
  23702. "webextensions": {
  23703. "browser": false,
  23704. "chrome": false,
  23705. "opr": false
  23706. },
  23707. "greasemonkey": {
  23708. "GM_addStyle": false,
  23709. "GM_deleteValue": false,
  23710. "GM_getResourceText": false,
  23711. "GM_getResourceURL": false,
  23712. "GM_getValue": false,
  23713. "GM_info": false,
  23714. "GM_listValues": false,
  23715. "GM_log": false,
  23716. "GM_openInTab": false,
  23717. "GM_registerMenuCommand": false,
  23718. "GM_setClipboard": false,
  23719. "GM_setValue": false,
  23720. "GM_xmlhttpRequest": false,
  23721. "unsafeWindow": false
  23722. }
  23723. };
  23724. });
  23725. $__System.registerDynamic('151', ['150'], true, function ($__require, exports, module) {
  23726. var global = this || self,
  23727. GLOBAL = global;
  23728. module.exports = $__require('150');
  23729. });
  23730. $__System.registerDynamic("152", ["15", "d4", "cf", "1d", "17", "a5", "5c", "145", "d0", "d6", "f", "146", "151", "11", "153", "c"], true, function ($__require, exports, module) {
  23731. "use strict";
  23732. var process = $__require("c");
  23733. var global = this || self,
  23734. GLOBAL = global;
  23735. exports.__esModule = true;
  23736. var _keys = $__require("15");
  23737. var _keys2 = _interopRequireDefault(_keys);
  23738. var _create = $__require("d4");
  23739. var _create2 = _interopRequireDefault(_create);
  23740. var _map = $__require("cf");
  23741. var _map2 = _interopRequireDefault(_map);
  23742. var _classCallCheck2 = $__require("1d");
  23743. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  23744. var _getIterator2 = $__require("17");
  23745. var _getIterator3 = _interopRequireDefault(_getIterator2);
  23746. var _includes = $__require("a5");
  23747. var _includes2 = _interopRequireDefault(_includes);
  23748. var _repeat = $__require("5c");
  23749. var _repeat2 = _interopRequireDefault(_repeat);
  23750. var _renamer = $__require("145");
  23751. var _renamer2 = _interopRequireDefault(_renamer);
  23752. var _index = $__require("d0");
  23753. var _index2 = _interopRequireDefault(_index);
  23754. var _defaults = $__require("d6");
  23755. var _defaults2 = _interopRequireDefault(_defaults);
  23756. var _babelMessages = $__require("f");
  23757. var messages = _interopRequireWildcard(_babelMessages);
  23758. var _binding2 = $__require("146");
  23759. var _binding3 = _interopRequireDefault(_binding2);
  23760. var _globals = $__require("151");
  23761. var _globals2 = _interopRequireDefault(_globals);
  23762. var _babelTypes = $__require("11");
  23763. var t = _interopRequireWildcard(_babelTypes);
  23764. var _cache = $__require("153");
  23765. function _interopRequireWildcard(obj) {
  23766. if (obj && obj.__esModule) {
  23767. return obj;
  23768. } else {
  23769. var newObj = {};if (obj != null) {
  23770. for (var key in obj) {
  23771. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  23772. }
  23773. }newObj.default = obj;return newObj;
  23774. }
  23775. }
  23776. function _interopRequireDefault(obj) {
  23777. return obj && obj.__esModule ? obj : { default: obj };
  23778. }
  23779. var _crawlCallsCount = 0;
  23780. function getCache(path, parentScope, self) {
  23781. var scopes = _cache.scope.get(path.node) || [];
  23782. for (var _iterator = scopes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  23783. var _ref;
  23784. if (_isArray) {
  23785. if (_i >= _iterator.length) break;
  23786. _ref = _iterator[_i++];
  23787. } else {
  23788. _i = _iterator.next();
  23789. if (_i.done) break;
  23790. _ref = _i.value;
  23791. }
  23792. var scope = _ref;
  23793. if (scope.parent === parentScope && scope.path === path) return scope;
  23794. }
  23795. scopes.push(self);
  23796. if (!_cache.scope.has(path.node)) {
  23797. _cache.scope.set(path.node, scopes);
  23798. }
  23799. }
  23800. function gatherNodeParts(node, parts) {
  23801. if (t.isModuleDeclaration(node)) {
  23802. if (node.source) {
  23803. gatherNodeParts(node.source, parts);
  23804. } else if (node.specifiers && node.specifiers.length) {
  23805. for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  23806. var _ref2;
  23807. if (_isArray2) {
  23808. if (_i2 >= _iterator2.length) break;
  23809. _ref2 = _iterator2[_i2++];
  23810. } else {
  23811. _i2 = _iterator2.next();
  23812. if (_i2.done) break;
  23813. _ref2 = _i2.value;
  23814. }
  23815. var specifier = _ref2;
  23816. gatherNodeParts(specifier, parts);
  23817. }
  23818. } else if (node.declaration) {
  23819. gatherNodeParts(node.declaration, parts);
  23820. }
  23821. } else if (t.isModuleSpecifier(node)) {
  23822. gatherNodeParts(node.local, parts);
  23823. } else if (t.isMemberExpression(node)) {
  23824. gatherNodeParts(node.object, parts);
  23825. gatherNodeParts(node.property, parts);
  23826. } else if (t.isIdentifier(node)) {
  23827. parts.push(node.name);
  23828. } else if (t.isLiteral(node)) {
  23829. parts.push(node.value);
  23830. } else if (t.isCallExpression(node)) {
  23831. gatherNodeParts(node.callee, parts);
  23832. } else if (t.isObjectExpression(node) || t.isObjectPattern(node)) {
  23833. for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  23834. var _ref3;
  23835. if (_isArray3) {
  23836. if (_i3 >= _iterator3.length) break;
  23837. _ref3 = _iterator3[_i3++];
  23838. } else {
  23839. _i3 = _iterator3.next();
  23840. if (_i3.done) break;
  23841. _ref3 = _i3.value;
  23842. }
  23843. var prop = _ref3;
  23844. gatherNodeParts(prop.key || prop.argument, parts);
  23845. }
  23846. }
  23847. }
  23848. var collectorVisitor = {
  23849. For: function For(path) {
  23850. for (var _iterator4 = t.FOR_INIT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  23851. var _ref4;
  23852. if (_isArray4) {
  23853. if (_i4 >= _iterator4.length) break;
  23854. _ref4 = _iterator4[_i4++];
  23855. } else {
  23856. _i4 = _iterator4.next();
  23857. if (_i4.done) break;
  23858. _ref4 = _i4.value;
  23859. }
  23860. var key = _ref4;
  23861. var declar = path.get(key);
  23862. if (declar.isVar()) path.scope.getFunctionParent().registerBinding("var", declar);
  23863. }
  23864. },
  23865. Declaration: function Declaration(path) {
  23866. if (path.isBlockScoped()) return;
  23867. if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) return;
  23868. path.scope.getFunctionParent().registerDeclaration(path);
  23869. },
  23870. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  23871. state.references.push(path);
  23872. },
  23873. ForXStatement: function ForXStatement(path, state) {
  23874. var left = path.get("left");
  23875. if (left.isPattern() || left.isIdentifier()) {
  23876. state.constantViolations.push(left);
  23877. }
  23878. },
  23879. ExportDeclaration: {
  23880. exit: function exit(path) {
  23881. var node = path.node,
  23882. scope = path.scope;
  23883. var declar = node.declaration;
  23884. if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) {
  23885. var _id = declar.id;
  23886. if (!_id) return;
  23887. var binding = scope.getBinding(_id.name);
  23888. if (binding) binding.reference(path);
  23889. } else if (t.isVariableDeclaration(declar)) {
  23890. for (var _iterator5 = declar.declarations, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
  23891. var _ref5;
  23892. if (_isArray5) {
  23893. if (_i5 >= _iterator5.length) break;
  23894. _ref5 = _iterator5[_i5++];
  23895. } else {
  23896. _i5 = _iterator5.next();
  23897. if (_i5.done) break;
  23898. _ref5 = _i5.value;
  23899. }
  23900. var decl = _ref5;
  23901. var ids = t.getBindingIdentifiers(decl);
  23902. for (var name in ids) {
  23903. var _binding = scope.getBinding(name);
  23904. if (_binding) _binding.reference(path);
  23905. }
  23906. }
  23907. }
  23908. }
  23909. },
  23910. LabeledStatement: function LabeledStatement(path) {
  23911. path.scope.getProgramParent().addGlobal(path.node);
  23912. path.scope.getBlockParent().registerDeclaration(path);
  23913. },
  23914. AssignmentExpression: function AssignmentExpression(path, state) {
  23915. state.assignments.push(path);
  23916. },
  23917. UpdateExpression: function UpdateExpression(path, state) {
  23918. state.constantViolations.push(path.get("argument"));
  23919. },
  23920. UnaryExpression: function UnaryExpression(path, state) {
  23921. if (path.node.operator === "delete") {
  23922. state.constantViolations.push(path.get("argument"));
  23923. }
  23924. },
  23925. BlockScoped: function BlockScoped(path) {
  23926. var scope = path.scope;
  23927. if (scope.path === path) scope = scope.parent;
  23928. scope.getBlockParent().registerDeclaration(path);
  23929. },
  23930. ClassDeclaration: function ClassDeclaration(path) {
  23931. var id = path.node.id;
  23932. if (!id) return;
  23933. var name = id.name;
  23934. path.scope.bindings[name] = path.scope.getBinding(name);
  23935. },
  23936. Block: function Block(path) {
  23937. var paths = path.get("body");
  23938. for (var _iterator6 = paths, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
  23939. var _ref6;
  23940. if (_isArray6) {
  23941. if (_i6 >= _iterator6.length) break;
  23942. _ref6 = _iterator6[_i6++];
  23943. } else {
  23944. _i6 = _iterator6.next();
  23945. if (_i6.done) break;
  23946. _ref6 = _i6.value;
  23947. }
  23948. var bodyPath = _ref6;
  23949. if (bodyPath.isFunctionDeclaration()) {
  23950. path.scope.getBlockParent().registerDeclaration(bodyPath);
  23951. }
  23952. }
  23953. }
  23954. };
  23955. var uid = 0;
  23956. var Scope = function () {
  23957. function Scope(path, parentScope) {
  23958. (0, _classCallCheck3.default)(this, Scope);
  23959. if (parentScope && parentScope.block === path.node) {
  23960. return parentScope;
  23961. }
  23962. var cached = getCache(path, parentScope, this);
  23963. if (cached) return cached;
  23964. this.uid = uid++;
  23965. this.parent = parentScope;
  23966. this.hub = path.hub;
  23967. this.parentBlock = path.parent;
  23968. this.block = path.node;
  23969. this.path = path;
  23970. this.labels = new _map2.default();
  23971. }
  23972. Scope.prototype.traverse = function traverse(node, opts, state) {
  23973. (0, _index2.default)(node, opts, this, state, this.path);
  23974. };
  23975. Scope.prototype.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier() {
  23976. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp";
  23977. var id = this.generateUidIdentifier(name);
  23978. this.push({ id: id });
  23979. return id;
  23980. };
  23981. Scope.prototype.generateUidIdentifier = function generateUidIdentifier() {
  23982. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp";
  23983. return t.identifier(this.generateUid(name));
  23984. };
  23985. Scope.prototype.generateUid = function generateUid() {
  23986. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp";
  23987. name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
  23988. var uid = void 0;
  23989. var i = 0;
  23990. do {
  23991. uid = this._generateUid(name, i);
  23992. i++;
  23993. } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid));
  23994. var program = this.getProgramParent();
  23995. program.references[uid] = true;
  23996. program.uids[uid] = true;
  23997. return uid;
  23998. };
  23999. Scope.prototype._generateUid = function _generateUid(name, i) {
  24000. var id = name;
  24001. if (i > 1) id += i;
  24002. return "_" + id;
  24003. };
  24004. Scope.prototype.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) {
  24005. var node = parent;
  24006. if (t.isAssignmentExpression(parent)) {
  24007. node = parent.left;
  24008. } else if (t.isVariableDeclarator(parent)) {
  24009. node = parent.id;
  24010. } else if (t.isObjectProperty(node) || t.isObjectMethod(node)) {
  24011. node = node.key;
  24012. }
  24013. var parts = [];
  24014. gatherNodeParts(node, parts);
  24015. var id = parts.join("$");
  24016. id = id.replace(/^_/, "") || defaultName || "ref";
  24017. return this.generateUidIdentifier(id.slice(0, 20));
  24018. };
  24019. Scope.prototype.isStatic = function isStatic(node) {
  24020. if (t.isThisExpression(node) || t.isSuper(node)) {
  24021. return true;
  24022. }
  24023. if (t.isIdentifier(node)) {
  24024. var binding = this.getBinding(node.name);
  24025. if (binding) {
  24026. return binding.constant;
  24027. } else {
  24028. return this.hasBinding(node.name);
  24029. }
  24030. }
  24031. return false;
  24032. };
  24033. Scope.prototype.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) {
  24034. if (this.isStatic(node)) {
  24035. return null;
  24036. } else {
  24037. var _id2 = this.generateUidIdentifierBasedOnNode(node);
  24038. if (!dontPush) this.push({ id: _id2 });
  24039. return _id2;
  24040. }
  24041. };
  24042. Scope.prototype.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) {
  24043. if (kind === "param") return;
  24044. if (kind === "hoisted" && local.kind === "let") return;
  24045. var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
  24046. if (duplicate) {
  24047. throw this.hub.file.buildCodeFrameError(id, messages.get("scopeDuplicateDeclaration", name), TypeError);
  24048. }
  24049. };
  24050. Scope.prototype.rename = function rename(oldName, newName, block) {
  24051. var binding = this.getBinding(oldName);
  24052. if (binding) {
  24053. newName = newName || this.generateUidIdentifier(oldName).name;
  24054. return new _renamer2.default(binding, oldName, newName).rename(block);
  24055. }
  24056. };
  24057. Scope.prototype._renameFromMap = function _renameFromMap(map, oldName, newName, value) {
  24058. if (map[oldName]) {
  24059. map[newName] = value;
  24060. map[oldName] = null;
  24061. }
  24062. };
  24063. Scope.prototype.dump = function dump() {
  24064. var sep = (0, _repeat2.default)("-", 60);
  24065. console.log(sep);
  24066. var scope = this;
  24067. do {
  24068. console.log("#", scope.block.type);
  24069. for (var name in scope.bindings) {
  24070. var binding = scope.bindings[name];
  24071. console.log(" -", name, {
  24072. constant: binding.constant,
  24073. references: binding.references,
  24074. violations: binding.constantViolations.length,
  24075. kind: binding.kind
  24076. });
  24077. }
  24078. } while (scope = scope.parent);
  24079. console.log(sep);
  24080. };
  24081. Scope.prototype.toArray = function toArray(node, i) {
  24082. var file = this.hub.file;
  24083. if (t.isIdentifier(node)) {
  24084. var binding = this.getBinding(node.name);
  24085. if (binding && binding.constant && binding.path.isGenericType("Array")) return node;
  24086. }
  24087. if (t.isArrayExpression(node)) {
  24088. return node;
  24089. }
  24090. if (t.isIdentifier(node, { name: "arguments" })) {
  24091. return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"), t.identifier("prototype")), t.identifier("slice")), t.identifier("call")), [node]);
  24092. }
  24093. var helperName = "toArray";
  24094. var args = [node];
  24095. if (i === true) {
  24096. helperName = "toConsumableArray";
  24097. } else if (i) {
  24098. args.push(t.numericLiteral(i));
  24099. helperName = "slicedToArray";
  24100. }
  24101. return t.callExpression(file.addHelper(helperName), args);
  24102. };
  24103. Scope.prototype.hasLabel = function hasLabel(name) {
  24104. return !!this.getLabel(name);
  24105. };
  24106. Scope.prototype.getLabel = function getLabel(name) {
  24107. return this.labels.get(name);
  24108. };
  24109. Scope.prototype.registerLabel = function registerLabel(path) {
  24110. this.labels.set(path.node.label.name, path);
  24111. };
  24112. Scope.prototype.registerDeclaration = function registerDeclaration(path) {
  24113. if (path.isLabeledStatement()) {
  24114. this.registerLabel(path);
  24115. } else if (path.isFunctionDeclaration()) {
  24116. this.registerBinding("hoisted", path.get("id"), path);
  24117. } else if (path.isVariableDeclaration()) {
  24118. var declarations = path.get("declarations");
  24119. for (var _iterator7 = declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
  24120. var _ref7;
  24121. if (_isArray7) {
  24122. if (_i7 >= _iterator7.length) break;
  24123. _ref7 = _iterator7[_i7++];
  24124. } else {
  24125. _i7 = _iterator7.next();
  24126. if (_i7.done) break;
  24127. _ref7 = _i7.value;
  24128. }
  24129. var declar = _ref7;
  24130. this.registerBinding(path.node.kind, declar);
  24131. }
  24132. } else if (path.isClassDeclaration()) {
  24133. this.registerBinding("let", path);
  24134. } else if (path.isImportDeclaration()) {
  24135. var specifiers = path.get("specifiers");
  24136. for (var _iterator8 = specifiers, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) {
  24137. var _ref8;
  24138. if (_isArray8) {
  24139. if (_i8 >= _iterator8.length) break;
  24140. _ref8 = _iterator8[_i8++];
  24141. } else {
  24142. _i8 = _iterator8.next();
  24143. if (_i8.done) break;
  24144. _ref8 = _i8.value;
  24145. }
  24146. var specifier = _ref8;
  24147. this.registerBinding("module", specifier);
  24148. }
  24149. } else if (path.isExportDeclaration()) {
  24150. var _declar = path.get("declaration");
  24151. if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) {
  24152. this.registerDeclaration(_declar);
  24153. }
  24154. } else {
  24155. this.registerBinding("unknown", path);
  24156. }
  24157. };
  24158. Scope.prototype.buildUndefinedNode = function buildUndefinedNode() {
  24159. if (this.hasBinding("undefined")) {
  24160. return t.unaryExpression("void", t.numericLiteral(0), true);
  24161. } else {
  24162. return t.identifier("undefined");
  24163. }
  24164. };
  24165. Scope.prototype.registerConstantViolation = function registerConstantViolation(path) {
  24166. var ids = path.getBindingIdentifiers();
  24167. for (var name in ids) {
  24168. var binding = this.getBinding(name);
  24169. if (binding) binding.reassign(path);
  24170. }
  24171. };
  24172. Scope.prototype.registerBinding = function registerBinding(kind, path) {
  24173. var bindingPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : path;
  24174. if (!kind) throw new ReferenceError("no `kind`");
  24175. if (path.isVariableDeclaration()) {
  24176. var declarators = path.get("declarations");
  24177. for (var _iterator9 = declarators, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) {
  24178. var _ref9;
  24179. if (_isArray9) {
  24180. if (_i9 >= _iterator9.length) break;
  24181. _ref9 = _iterator9[_i9++];
  24182. } else {
  24183. _i9 = _iterator9.next();
  24184. if (_i9.done) break;
  24185. _ref9 = _i9.value;
  24186. }
  24187. var declar = _ref9;
  24188. this.registerBinding(kind, declar);
  24189. }
  24190. return;
  24191. }
  24192. var parent = this.getProgramParent();
  24193. var ids = path.getBindingIdentifiers(true);
  24194. for (var name in ids) {
  24195. for (var _iterator10 = ids[name], _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) {
  24196. var _ref10;
  24197. if (_isArray10) {
  24198. if (_i10 >= _iterator10.length) break;
  24199. _ref10 = _iterator10[_i10++];
  24200. } else {
  24201. _i10 = _iterator10.next();
  24202. if (_i10.done) break;
  24203. _ref10 = _i10.value;
  24204. }
  24205. var _id3 = _ref10;
  24206. var local = this.getOwnBinding(name);
  24207. if (local) {
  24208. if (local.identifier === _id3) continue;
  24209. this.checkBlockScopedCollisions(local, kind, name, _id3);
  24210. }
  24211. if (local && local.path.isFlow()) local = null;
  24212. parent.references[name] = true;
  24213. this.bindings[name] = new _binding3.default({
  24214. identifier: _id3,
  24215. existing: local,
  24216. scope: this,
  24217. path: bindingPath,
  24218. kind: kind
  24219. });
  24220. }
  24221. }
  24222. };
  24223. Scope.prototype.addGlobal = function addGlobal(node) {
  24224. this.globals[node.name] = node;
  24225. };
  24226. Scope.prototype.hasUid = function hasUid(name) {
  24227. var scope = this;
  24228. do {
  24229. if (scope.uids[name]) return true;
  24230. } while (scope = scope.parent);
  24231. return false;
  24232. };
  24233. Scope.prototype.hasGlobal = function hasGlobal(name) {
  24234. var scope = this;
  24235. do {
  24236. if (scope.globals[name]) return true;
  24237. } while (scope = scope.parent);
  24238. return false;
  24239. };
  24240. Scope.prototype.hasReference = function hasReference(name) {
  24241. var scope = this;
  24242. do {
  24243. if (scope.references[name]) return true;
  24244. } while (scope = scope.parent);
  24245. return false;
  24246. };
  24247. Scope.prototype.isPure = function isPure(node, constantsOnly) {
  24248. if (t.isIdentifier(node)) {
  24249. var binding = this.getBinding(node.name);
  24250. if (!binding) return false;
  24251. if (constantsOnly) return binding.constant;
  24252. return true;
  24253. } else if (t.isClass(node)) {
  24254. if (node.superClass && !this.isPure(node.superClass, constantsOnly)) return false;
  24255. return this.isPure(node.body, constantsOnly);
  24256. } else if (t.isClassBody(node)) {
  24257. for (var _iterator11 = node.body, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, _getIterator3.default)(_iterator11);;) {
  24258. var _ref11;
  24259. if (_isArray11) {
  24260. if (_i11 >= _iterator11.length) break;
  24261. _ref11 = _iterator11[_i11++];
  24262. } else {
  24263. _i11 = _iterator11.next();
  24264. if (_i11.done) break;
  24265. _ref11 = _i11.value;
  24266. }
  24267. var method = _ref11;
  24268. if (!this.isPure(method, constantsOnly)) return false;
  24269. }
  24270. return true;
  24271. } else if (t.isBinary(node)) {
  24272. return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
  24273. } else if (t.isArrayExpression(node)) {
  24274. for (var _iterator12 = node.elements, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, _getIterator3.default)(_iterator12);;) {
  24275. var _ref12;
  24276. if (_isArray12) {
  24277. if (_i12 >= _iterator12.length) break;
  24278. _ref12 = _iterator12[_i12++];
  24279. } else {
  24280. _i12 = _iterator12.next();
  24281. if (_i12.done) break;
  24282. _ref12 = _i12.value;
  24283. }
  24284. var elem = _ref12;
  24285. if (!this.isPure(elem, constantsOnly)) return false;
  24286. }
  24287. return true;
  24288. } else if (t.isObjectExpression(node)) {
  24289. for (var _iterator13 = node.properties, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, _getIterator3.default)(_iterator13);;) {
  24290. var _ref13;
  24291. if (_isArray13) {
  24292. if (_i13 >= _iterator13.length) break;
  24293. _ref13 = _iterator13[_i13++];
  24294. } else {
  24295. _i13 = _iterator13.next();
  24296. if (_i13.done) break;
  24297. _ref13 = _i13.value;
  24298. }
  24299. var prop = _ref13;
  24300. if (!this.isPure(prop, constantsOnly)) return false;
  24301. }
  24302. return true;
  24303. } else if (t.isClassMethod(node)) {
  24304. if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
  24305. if (node.kind === "get" || node.kind === "set") return false;
  24306. return true;
  24307. } else if (t.isClassProperty(node) || t.isObjectProperty(node)) {
  24308. if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
  24309. return this.isPure(node.value, constantsOnly);
  24310. } else if (t.isUnaryExpression(node)) {
  24311. return this.isPure(node.argument, constantsOnly);
  24312. } else {
  24313. return t.isPureish(node);
  24314. }
  24315. };
  24316. Scope.prototype.setData = function setData(key, val) {
  24317. return this.data[key] = val;
  24318. };
  24319. Scope.prototype.getData = function getData(key) {
  24320. var scope = this;
  24321. do {
  24322. var data = scope.data[key];
  24323. if (data != null) return data;
  24324. } while (scope = scope.parent);
  24325. };
  24326. Scope.prototype.removeData = function removeData(key) {
  24327. var scope = this;
  24328. do {
  24329. var data = scope.data[key];
  24330. if (data != null) scope.data[key] = null;
  24331. } while (scope = scope.parent);
  24332. };
  24333. Scope.prototype.init = function init() {
  24334. if (!this.references) this.crawl();
  24335. };
  24336. Scope.prototype.crawl = function crawl() {
  24337. _crawlCallsCount++;
  24338. this._crawl();
  24339. _crawlCallsCount--;
  24340. };
  24341. Scope.prototype._crawl = function _crawl() {
  24342. var path = this.path;
  24343. this.references = (0, _create2.default)(null);
  24344. this.bindings = (0, _create2.default)(null);
  24345. this.globals = (0, _create2.default)(null);
  24346. this.uids = (0, _create2.default)(null);
  24347. this.data = (0, _create2.default)(null);
  24348. if (path.isLoop()) {
  24349. for (var _iterator14 = t.FOR_INIT_KEYS, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, _getIterator3.default)(_iterator14);;) {
  24350. var _ref14;
  24351. if (_isArray14) {
  24352. if (_i14 >= _iterator14.length) break;
  24353. _ref14 = _iterator14[_i14++];
  24354. } else {
  24355. _i14 = _iterator14.next();
  24356. if (_i14.done) break;
  24357. _ref14 = _i14.value;
  24358. }
  24359. var key = _ref14;
  24360. var node = path.get(key);
  24361. if (node.isBlockScoped()) this.registerBinding(node.node.kind, node);
  24362. }
  24363. }
  24364. if (path.isFunctionExpression() && path.has("id")) {
  24365. if (!path.get("id").node[t.NOT_LOCAL_BINDING]) {
  24366. this.registerBinding("local", path.get("id"), path);
  24367. }
  24368. }
  24369. if (path.isClassExpression() && path.has("id")) {
  24370. if (!path.get("id").node[t.NOT_LOCAL_BINDING]) {
  24371. this.registerBinding("local", path);
  24372. }
  24373. }
  24374. if (path.isFunction()) {
  24375. var params = path.get("params");
  24376. for (var _iterator15 = params, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, _getIterator3.default)(_iterator15);;) {
  24377. var _ref15;
  24378. if (_isArray15) {
  24379. if (_i15 >= _iterator15.length) break;
  24380. _ref15 = _iterator15[_i15++];
  24381. } else {
  24382. _i15 = _iterator15.next();
  24383. if (_i15.done) break;
  24384. _ref15 = _i15.value;
  24385. }
  24386. var param = _ref15;
  24387. this.registerBinding("param", param);
  24388. }
  24389. }
  24390. if (path.isCatchClause()) {
  24391. this.registerBinding("let", path);
  24392. }
  24393. var parent = this.getProgramParent();
  24394. if (parent.crawling) return;
  24395. var state = {
  24396. references: [],
  24397. constantViolations: [],
  24398. assignments: []
  24399. };
  24400. this.crawling = true;
  24401. path.traverse(collectorVisitor, state);
  24402. this.crawling = false;
  24403. for (var _iterator16 = state.assignments, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : (0, _getIterator3.default)(_iterator16);;) {
  24404. var _ref16;
  24405. if (_isArray16) {
  24406. if (_i16 >= _iterator16.length) break;
  24407. _ref16 = _iterator16[_i16++];
  24408. } else {
  24409. _i16 = _iterator16.next();
  24410. if (_i16.done) break;
  24411. _ref16 = _i16.value;
  24412. }
  24413. var _path = _ref16;
  24414. var ids = _path.getBindingIdentifiers();
  24415. var programParent = void 0;
  24416. for (var name in ids) {
  24417. if (_path.scope.getBinding(name)) continue;
  24418. programParent = programParent || _path.scope.getProgramParent();
  24419. programParent.addGlobal(ids[name]);
  24420. }
  24421. _path.scope.registerConstantViolation(_path);
  24422. }
  24423. for (var _iterator17 = state.references, _isArray17 = Array.isArray(_iterator17), _i17 = 0, _iterator17 = _isArray17 ? _iterator17 : (0, _getIterator3.default)(_iterator17);;) {
  24424. var _ref17;
  24425. if (_isArray17) {
  24426. if (_i17 >= _iterator17.length) break;
  24427. _ref17 = _iterator17[_i17++];
  24428. } else {
  24429. _i17 = _iterator17.next();
  24430. if (_i17.done) break;
  24431. _ref17 = _i17.value;
  24432. }
  24433. var ref = _ref17;
  24434. var binding = ref.scope.getBinding(ref.node.name);
  24435. if (binding) {
  24436. binding.reference(ref);
  24437. } else {
  24438. ref.scope.getProgramParent().addGlobal(ref.node);
  24439. }
  24440. }
  24441. for (var _iterator18 = state.constantViolations, _isArray18 = Array.isArray(_iterator18), _i18 = 0, _iterator18 = _isArray18 ? _iterator18 : (0, _getIterator3.default)(_iterator18);;) {
  24442. var _ref18;
  24443. if (_isArray18) {
  24444. if (_i18 >= _iterator18.length) break;
  24445. _ref18 = _iterator18[_i18++];
  24446. } else {
  24447. _i18 = _iterator18.next();
  24448. if (_i18.done) break;
  24449. _ref18 = _i18.value;
  24450. }
  24451. var _path2 = _ref18;
  24452. _path2.scope.registerConstantViolation(_path2);
  24453. }
  24454. };
  24455. Scope.prototype.push = function push(opts) {
  24456. var path = this.path;
  24457. if (!path.isBlockStatement() && !path.isProgram()) {
  24458. path = this.getBlockParent().path;
  24459. }
  24460. if (path.isSwitchStatement()) {
  24461. path = this.getFunctionParent().path;
  24462. }
  24463. if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
  24464. t.ensureBlock(path.node);
  24465. path = path.get("body");
  24466. }
  24467. var unique = opts.unique;
  24468. var kind = opts.kind || "var";
  24469. var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
  24470. var dataKey = "declaration:" + kind + ":" + blockHoist;
  24471. var declarPath = !unique && path.getData(dataKey);
  24472. if (!declarPath) {
  24473. var declar = t.variableDeclaration(kind, []);
  24474. declar._generated = true;
  24475. declar._blockHoist = blockHoist;
  24476. var _path$unshiftContaine = path.unshiftContainer("body", [declar]);
  24477. declarPath = _path$unshiftContaine[0];
  24478. if (!unique) path.setData(dataKey, declarPath);
  24479. }
  24480. var declarator = t.variableDeclarator(opts.id, opts.init);
  24481. declarPath.node.declarations.push(declarator);
  24482. this.registerBinding(kind, declarPath.get("declarations").pop());
  24483. };
  24484. Scope.prototype.getProgramParent = function getProgramParent() {
  24485. var scope = this;
  24486. do {
  24487. if (scope.path.isProgram()) {
  24488. return scope;
  24489. }
  24490. } while (scope = scope.parent);
  24491. throw new Error("We couldn't find a Function or Program...");
  24492. };
  24493. Scope.prototype.getFunctionParent = function getFunctionParent() {
  24494. var scope = this;
  24495. do {
  24496. if (scope.path.isFunctionParent()) {
  24497. return scope;
  24498. }
  24499. } while (scope = scope.parent);
  24500. throw new Error("We couldn't find a Function or Program...");
  24501. };
  24502. Scope.prototype.getBlockParent = function getBlockParent() {
  24503. var scope = this;
  24504. do {
  24505. if (scope.path.isBlockParent()) {
  24506. return scope;
  24507. }
  24508. } while (scope = scope.parent);
  24509. throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
  24510. };
  24511. Scope.prototype.getAllBindings = function getAllBindings() {
  24512. var ids = (0, _create2.default)(null);
  24513. var scope = this;
  24514. do {
  24515. (0, _defaults2.default)(ids, scope.bindings);
  24516. scope = scope.parent;
  24517. } while (scope);
  24518. return ids;
  24519. };
  24520. Scope.prototype.getAllBindingsOfKind = function getAllBindingsOfKind() {
  24521. var ids = (0, _create2.default)(null);
  24522. for (var _iterator19 = arguments, _isArray19 = Array.isArray(_iterator19), _i19 = 0, _iterator19 = _isArray19 ? _iterator19 : (0, _getIterator3.default)(_iterator19);;) {
  24523. var _ref19;
  24524. if (_isArray19) {
  24525. if (_i19 >= _iterator19.length) break;
  24526. _ref19 = _iterator19[_i19++];
  24527. } else {
  24528. _i19 = _iterator19.next();
  24529. if (_i19.done) break;
  24530. _ref19 = _i19.value;
  24531. }
  24532. var kind = _ref19;
  24533. var scope = this;
  24534. do {
  24535. for (var name in scope.bindings) {
  24536. var binding = scope.bindings[name];
  24537. if (binding.kind === kind) ids[name] = binding;
  24538. }
  24539. scope = scope.parent;
  24540. } while (scope);
  24541. }
  24542. return ids;
  24543. };
  24544. Scope.prototype.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) {
  24545. return this.getBindingIdentifier(name) === node;
  24546. };
  24547. Scope.prototype.warnOnFlowBinding = function warnOnFlowBinding(binding) {
  24548. if (_crawlCallsCount === 0 && binding && binding.path.isFlow()) {
  24549. console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n ");
  24550. }
  24551. return binding;
  24552. };
  24553. Scope.prototype.getBinding = function getBinding(name) {
  24554. var scope = this;
  24555. do {
  24556. var binding = scope.getOwnBinding(name);
  24557. if (binding) return this.warnOnFlowBinding(binding);
  24558. } while (scope = scope.parent);
  24559. };
  24560. Scope.prototype.getOwnBinding = function getOwnBinding(name) {
  24561. return this.warnOnFlowBinding(this.bindings[name]);
  24562. };
  24563. Scope.prototype.getBindingIdentifier = function getBindingIdentifier(name) {
  24564. var info = this.getBinding(name);
  24565. return info && info.identifier;
  24566. };
  24567. Scope.prototype.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) {
  24568. var binding = this.bindings[name];
  24569. return binding && binding.identifier;
  24570. };
  24571. Scope.prototype.hasOwnBinding = function hasOwnBinding(name) {
  24572. return !!this.getOwnBinding(name);
  24573. };
  24574. Scope.prototype.hasBinding = function hasBinding(name, noGlobals) {
  24575. if (!name) return false;
  24576. if (this.hasOwnBinding(name)) return true;
  24577. if (this.parentHasBinding(name, noGlobals)) return true;
  24578. if (this.hasUid(name)) return true;
  24579. if (!noGlobals && (0, _includes2.default)(Scope.globals, name)) return true;
  24580. if (!noGlobals && (0, _includes2.default)(Scope.contextVariables, name)) return true;
  24581. return false;
  24582. };
  24583. Scope.prototype.parentHasBinding = function parentHasBinding(name, noGlobals) {
  24584. return this.parent && this.parent.hasBinding(name, noGlobals);
  24585. };
  24586. Scope.prototype.moveBindingTo = function moveBindingTo(name, scope) {
  24587. var info = this.getBinding(name);
  24588. if (info) {
  24589. info.scope.removeOwnBinding(name);
  24590. info.scope = scope;
  24591. scope.bindings[name] = info;
  24592. }
  24593. };
  24594. Scope.prototype.removeOwnBinding = function removeOwnBinding(name) {
  24595. delete this.bindings[name];
  24596. };
  24597. Scope.prototype.removeBinding = function removeBinding(name) {
  24598. var info = this.getBinding(name);
  24599. if (info) {
  24600. info.scope.removeOwnBinding(name);
  24601. }
  24602. var scope = this;
  24603. do {
  24604. if (scope.uids[name]) {
  24605. scope.uids[name] = false;
  24606. }
  24607. } while (scope = scope.parent);
  24608. };
  24609. return Scope;
  24610. }();
  24611. Scope.globals = (0, _keys2.default)(_globals2.default.builtin);
  24612. Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
  24613. exports.default = Scope;
  24614. module.exports = exports["default"];
  24615. });
  24616. $__System.registerDynamic("154", ["17", "11", "155", "c"], true, function ($__require, exports, module) {
  24617. "use strict";
  24618. var process = $__require("c");
  24619. var global = this || self,
  24620. GLOBAL = global;
  24621. exports.__esModule = true;
  24622. var _getIterator2 = $__require("17");
  24623. var _getIterator3 = _interopRequireDefault(_getIterator2);
  24624. exports.findParent = findParent;
  24625. exports.find = find;
  24626. exports.getFunctionParent = getFunctionParent;
  24627. exports.getStatementParent = getStatementParent;
  24628. exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
  24629. exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
  24630. exports.getAncestry = getAncestry;
  24631. exports.isAncestor = isAncestor;
  24632. exports.isDescendant = isDescendant;
  24633. exports.inType = inType;
  24634. exports.inShadow = inShadow;
  24635. var _babelTypes = $__require("11");
  24636. var t = _interopRequireWildcard(_babelTypes);
  24637. var _index = $__require("155");
  24638. var _index2 = _interopRequireDefault(_index);
  24639. function _interopRequireWildcard(obj) {
  24640. if (obj && obj.__esModule) {
  24641. return obj;
  24642. } else {
  24643. var newObj = {};if (obj != null) {
  24644. for (var key in obj) {
  24645. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  24646. }
  24647. }newObj.default = obj;return newObj;
  24648. }
  24649. }
  24650. function _interopRequireDefault(obj) {
  24651. return obj && obj.__esModule ? obj : { default: obj };
  24652. }
  24653. function findParent(callback) {
  24654. var path = this;
  24655. while (path = path.parentPath) {
  24656. if (callback(path)) return path;
  24657. }
  24658. return null;
  24659. }
  24660. function find(callback) {
  24661. var path = this;
  24662. do {
  24663. if (callback(path)) return path;
  24664. } while (path = path.parentPath);
  24665. return null;
  24666. }
  24667. function getFunctionParent() {
  24668. return this.findParent(function (path) {
  24669. return path.isFunction() || path.isProgram();
  24670. });
  24671. }
  24672. function getStatementParent() {
  24673. var path = this;
  24674. do {
  24675. if (Array.isArray(path.container)) {
  24676. return path;
  24677. }
  24678. } while (path = path.parentPath);
  24679. }
  24680. function getEarliestCommonAncestorFrom(paths) {
  24681. return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) {
  24682. var earliest = void 0;
  24683. var keys = t.VISITOR_KEYS[deepest.type];
  24684. for (var _iterator = ancestries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  24685. var _ref;
  24686. if (_isArray) {
  24687. if (_i >= _iterator.length) break;
  24688. _ref = _iterator[_i++];
  24689. } else {
  24690. _i = _iterator.next();
  24691. if (_i.done) break;
  24692. _ref = _i.value;
  24693. }
  24694. var ancestry = _ref;
  24695. var path = ancestry[i + 1];
  24696. if (!earliest) {
  24697. earliest = path;
  24698. continue;
  24699. }
  24700. if (path.listKey && earliest.listKey === path.listKey) {
  24701. if (path.key < earliest.key) {
  24702. earliest = path;
  24703. continue;
  24704. }
  24705. }
  24706. var earliestKeyIndex = keys.indexOf(earliest.parentKey);
  24707. var currentKeyIndex = keys.indexOf(path.parentKey);
  24708. if (earliestKeyIndex > currentKeyIndex) {
  24709. earliest = path;
  24710. }
  24711. }
  24712. return earliest;
  24713. });
  24714. }
  24715. function getDeepestCommonAncestorFrom(paths, filter) {
  24716. var _this = this;
  24717. if (!paths.length) {
  24718. return this;
  24719. }
  24720. if (paths.length === 1) {
  24721. return paths[0];
  24722. }
  24723. var minDepth = Infinity;
  24724. var lastCommonIndex = void 0,
  24725. lastCommon = void 0;
  24726. var ancestries = paths.map(function (path) {
  24727. var ancestry = [];
  24728. do {
  24729. ancestry.unshift(path);
  24730. } while ((path = path.parentPath) && path !== _this);
  24731. if (ancestry.length < minDepth) {
  24732. minDepth = ancestry.length;
  24733. }
  24734. return ancestry;
  24735. });
  24736. var first = ancestries[0];
  24737. depthLoop: for (var i = 0; i < minDepth; i++) {
  24738. var shouldMatch = first[i];
  24739. for (var _iterator2 = ancestries, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  24740. var _ref2;
  24741. if (_isArray2) {
  24742. if (_i2 >= _iterator2.length) break;
  24743. _ref2 = _iterator2[_i2++];
  24744. } else {
  24745. _i2 = _iterator2.next();
  24746. if (_i2.done) break;
  24747. _ref2 = _i2.value;
  24748. }
  24749. var ancestry = _ref2;
  24750. if (ancestry[i] !== shouldMatch) {
  24751. break depthLoop;
  24752. }
  24753. }
  24754. lastCommonIndex = i;
  24755. lastCommon = shouldMatch;
  24756. }
  24757. if (lastCommon) {
  24758. if (filter) {
  24759. return filter(lastCommon, lastCommonIndex, ancestries);
  24760. } else {
  24761. return lastCommon;
  24762. }
  24763. } else {
  24764. throw new Error("Couldn't find intersection");
  24765. }
  24766. }
  24767. function getAncestry() {
  24768. var path = this;
  24769. var paths = [];
  24770. do {
  24771. paths.push(path);
  24772. } while (path = path.parentPath);
  24773. return paths;
  24774. }
  24775. function isAncestor(maybeDescendant) {
  24776. return maybeDescendant.isDescendant(this);
  24777. }
  24778. function isDescendant(maybeAncestor) {
  24779. return !!this.findParent(function (parent) {
  24780. return parent === maybeAncestor;
  24781. });
  24782. }
  24783. function inType() {
  24784. var path = this;
  24785. while (path) {
  24786. for (var _iterator3 = arguments, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  24787. var _ref3;
  24788. if (_isArray3) {
  24789. if (_i3 >= _iterator3.length) break;
  24790. _ref3 = _iterator3[_i3++];
  24791. } else {
  24792. _i3 = _iterator3.next();
  24793. if (_i3.done) break;
  24794. _ref3 = _i3.value;
  24795. }
  24796. var type = _ref3;
  24797. if (path.node.type === type) return true;
  24798. }
  24799. path = path.parentPath;
  24800. }
  24801. return false;
  24802. }
  24803. function inShadow(key) {
  24804. var parentFn = this.isFunction() ? this : this.findParent(function (p) {
  24805. return p.isFunction();
  24806. });
  24807. if (!parentFn) return;
  24808. if (parentFn.isFunctionExpression() || parentFn.isFunctionDeclaration()) {
  24809. var shadow = parentFn.node.shadow;
  24810. if (shadow && (!key || shadow[key] !== false)) {
  24811. return parentFn;
  24812. }
  24813. } else if (parentFn.isArrowFunctionExpression()) {
  24814. return parentFn;
  24815. }
  24816. return null;
  24817. }
  24818. });
  24819. $__System.registerDynamic("156", ["17", "11", "c"], true, function ($__require, exports, module) {
  24820. "use strict";
  24821. var process = $__require("c");
  24822. var global = this || self,
  24823. GLOBAL = global;
  24824. exports.__esModule = true;
  24825. var _getIterator2 = $__require("17");
  24826. var _getIterator3 = _interopRequireDefault(_getIterator2);
  24827. exports.default = function (node) {
  24828. if (!this.isReferenced()) return;
  24829. var binding = this.scope.getBinding(node.name);
  24830. if (binding) {
  24831. if (binding.identifier.typeAnnotation) {
  24832. return binding.identifier.typeAnnotation;
  24833. } else {
  24834. return getTypeAnnotationBindingConstantViolations(this, node.name);
  24835. }
  24836. }
  24837. if (node.name === "undefined") {
  24838. return t.voidTypeAnnotation();
  24839. } else if (node.name === "NaN" || node.name === "Infinity") {
  24840. return t.numberTypeAnnotation();
  24841. } else if (node.name === "arguments") {}
  24842. };
  24843. var _babelTypes = $__require("11");
  24844. var t = _interopRequireWildcard(_babelTypes);
  24845. function _interopRequireWildcard(obj) {
  24846. if (obj && obj.__esModule) {
  24847. return obj;
  24848. } else {
  24849. var newObj = {};if (obj != null) {
  24850. for (var key in obj) {
  24851. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  24852. }
  24853. }newObj.default = obj;return newObj;
  24854. }
  24855. }
  24856. function _interopRequireDefault(obj) {
  24857. return obj && obj.__esModule ? obj : { default: obj };
  24858. }
  24859. function getTypeAnnotationBindingConstantViolations(path, name) {
  24860. var binding = path.scope.getBinding(name);
  24861. var types = [];
  24862. path.typeAnnotation = t.unionTypeAnnotation(types);
  24863. var functionConstantViolations = [];
  24864. var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
  24865. var testType = getConditionalAnnotation(path, name);
  24866. if (testType) {
  24867. var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
  24868. constantViolations = constantViolations.filter(function (path) {
  24869. return testConstantViolations.indexOf(path) < 0;
  24870. });
  24871. types.push(testType.typeAnnotation);
  24872. }
  24873. if (constantViolations.length) {
  24874. constantViolations = constantViolations.concat(functionConstantViolations);
  24875. for (var _iterator = constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  24876. var _ref;
  24877. if (_isArray) {
  24878. if (_i >= _iterator.length) break;
  24879. _ref = _iterator[_i++];
  24880. } else {
  24881. _i = _iterator.next();
  24882. if (_i.done) break;
  24883. _ref = _i.value;
  24884. }
  24885. var violation = _ref;
  24886. types.push(violation.getTypeAnnotation());
  24887. }
  24888. }
  24889. if (types.length) {
  24890. return t.createUnionTypeAnnotation(types);
  24891. }
  24892. }
  24893. function getConstantViolationsBefore(binding, path, functions) {
  24894. var violations = binding.constantViolations.slice();
  24895. violations.unshift(binding.path);
  24896. return violations.filter(function (violation) {
  24897. violation = violation.resolve();
  24898. var status = violation._guessExecutionStatusRelativeTo(path);
  24899. if (functions && status === "function") functions.push(violation);
  24900. return status === "before";
  24901. });
  24902. }
  24903. function inferAnnotationFromBinaryExpression(name, path) {
  24904. var operator = path.node.operator;
  24905. var right = path.get("right").resolve();
  24906. var left = path.get("left").resolve();
  24907. var target = void 0;
  24908. if (left.isIdentifier({ name: name })) {
  24909. target = right;
  24910. } else if (right.isIdentifier({ name: name })) {
  24911. target = left;
  24912. }
  24913. if (target) {
  24914. if (operator === "===") {
  24915. return target.getTypeAnnotation();
  24916. } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  24917. return t.numberTypeAnnotation();
  24918. } else {
  24919. return;
  24920. }
  24921. } else {
  24922. if (operator !== "===") return;
  24923. }
  24924. var typeofPath = void 0;
  24925. var typePath = void 0;
  24926. if (left.isUnaryExpression({ operator: "typeof" })) {
  24927. typeofPath = left;
  24928. typePath = right;
  24929. } else if (right.isUnaryExpression({ operator: "typeof" })) {
  24930. typeofPath = right;
  24931. typePath = left;
  24932. }
  24933. if (!typePath && !typeofPath) return;
  24934. typePath = typePath.resolve();
  24935. if (!typePath.isLiteral()) return;
  24936. var typeValue = typePath.node.value;
  24937. if (typeof typeValue !== "string") return;
  24938. if (!typeofPath.get("argument").isIdentifier({ name: name })) return;
  24939. return t.createTypeAnnotationBasedOnTypeof(typePath.node.value);
  24940. }
  24941. function getParentConditionalPath(path) {
  24942. var parentPath = void 0;
  24943. while (parentPath = path.parentPath) {
  24944. if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
  24945. if (path.key === "test") {
  24946. return;
  24947. } else {
  24948. return parentPath;
  24949. }
  24950. } else {
  24951. path = parentPath;
  24952. }
  24953. }
  24954. }
  24955. function getConditionalAnnotation(path, name) {
  24956. var ifStatement = getParentConditionalPath(path);
  24957. if (!ifStatement) return;
  24958. var test = ifStatement.get("test");
  24959. var paths = [test];
  24960. var types = [];
  24961. do {
  24962. var _path = paths.shift().resolve();
  24963. if (_path.isLogicalExpression()) {
  24964. paths.push(_path.get("left"));
  24965. paths.push(_path.get("right"));
  24966. }
  24967. if (_path.isBinaryExpression()) {
  24968. var type = inferAnnotationFromBinaryExpression(name, _path);
  24969. if (type) types.push(type);
  24970. }
  24971. } while (paths.length);
  24972. if (types.length) {
  24973. return {
  24974. typeAnnotation: t.createUnionTypeAnnotation(types),
  24975. ifStatement: ifStatement
  24976. };
  24977. } else {
  24978. return getConditionalAnnotation(ifStatement, name);
  24979. }
  24980. }
  24981. module.exports = exports["default"];
  24982. });
  24983. $__System.registerDynamic("157", ["156", "11", "c"], true, function ($__require, exports, module) {
  24984. "use strict";
  24985. var process = $__require("c");
  24986. var global = this || self,
  24987. GLOBAL = global;
  24988. exports.__esModule = true;
  24989. exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = exports.Identifier = undefined;
  24990. var _infererReference = $__require("156");
  24991. Object.defineProperty(exports, "Identifier", {
  24992. enumerable: true,
  24993. get: function get() {
  24994. return _interopRequireDefault(_infererReference).default;
  24995. }
  24996. });
  24997. exports.VariableDeclarator = VariableDeclarator;
  24998. exports.TypeCastExpression = TypeCastExpression;
  24999. exports.NewExpression = NewExpression;
  25000. exports.TemplateLiteral = TemplateLiteral;
  25001. exports.UnaryExpression = UnaryExpression;
  25002. exports.BinaryExpression = BinaryExpression;
  25003. exports.LogicalExpression = LogicalExpression;
  25004. exports.ConditionalExpression = ConditionalExpression;
  25005. exports.SequenceExpression = SequenceExpression;
  25006. exports.AssignmentExpression = AssignmentExpression;
  25007. exports.UpdateExpression = UpdateExpression;
  25008. exports.StringLiteral = StringLiteral;
  25009. exports.NumericLiteral = NumericLiteral;
  25010. exports.BooleanLiteral = BooleanLiteral;
  25011. exports.NullLiteral = NullLiteral;
  25012. exports.RegExpLiteral = RegExpLiteral;
  25013. exports.ObjectExpression = ObjectExpression;
  25014. exports.ArrayExpression = ArrayExpression;
  25015. exports.RestElement = RestElement;
  25016. exports.CallExpression = CallExpression;
  25017. exports.TaggedTemplateExpression = TaggedTemplateExpression;
  25018. var _babelTypes = $__require("11");
  25019. var t = _interopRequireWildcard(_babelTypes);
  25020. function _interopRequireWildcard(obj) {
  25021. if (obj && obj.__esModule) {
  25022. return obj;
  25023. } else {
  25024. var newObj = {};if (obj != null) {
  25025. for (var key in obj) {
  25026. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  25027. }
  25028. }newObj.default = obj;return newObj;
  25029. }
  25030. }
  25031. function _interopRequireDefault(obj) {
  25032. return obj && obj.__esModule ? obj : { default: obj };
  25033. }
  25034. function VariableDeclarator() {
  25035. var id = this.get("id");
  25036. if (id.isIdentifier()) {
  25037. return this.get("init").getTypeAnnotation();
  25038. } else {
  25039. return;
  25040. }
  25041. }
  25042. function TypeCastExpression(node) {
  25043. return node.typeAnnotation;
  25044. }
  25045. TypeCastExpression.validParent = true;
  25046. function NewExpression(node) {
  25047. if (this.get("callee").isIdentifier()) {
  25048. return t.genericTypeAnnotation(node.callee);
  25049. }
  25050. }
  25051. function TemplateLiteral() {
  25052. return t.stringTypeAnnotation();
  25053. }
  25054. function UnaryExpression(node) {
  25055. var operator = node.operator;
  25056. if (operator === "void") {
  25057. return t.voidTypeAnnotation();
  25058. } else if (t.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
  25059. return t.numberTypeAnnotation();
  25060. } else if (t.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
  25061. return t.stringTypeAnnotation();
  25062. } else if (t.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
  25063. return t.booleanTypeAnnotation();
  25064. }
  25065. }
  25066. function BinaryExpression(node) {
  25067. var operator = node.operator;
  25068. if (t.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  25069. return t.numberTypeAnnotation();
  25070. } else if (t.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
  25071. return t.booleanTypeAnnotation();
  25072. } else if (operator === "+") {
  25073. var right = this.get("right");
  25074. var left = this.get("left");
  25075. if (left.isBaseType("number") && right.isBaseType("number")) {
  25076. return t.numberTypeAnnotation();
  25077. } else if (left.isBaseType("string") || right.isBaseType("string")) {
  25078. return t.stringTypeAnnotation();
  25079. }
  25080. return t.unionTypeAnnotation([t.stringTypeAnnotation(), t.numberTypeAnnotation()]);
  25081. }
  25082. }
  25083. function LogicalExpression() {
  25084. return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]);
  25085. }
  25086. function ConditionalExpression() {
  25087. return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]);
  25088. }
  25089. function SequenceExpression() {
  25090. return this.get("expressions").pop().getTypeAnnotation();
  25091. }
  25092. function AssignmentExpression() {
  25093. return this.get("right").getTypeAnnotation();
  25094. }
  25095. function UpdateExpression(node) {
  25096. var operator = node.operator;
  25097. if (operator === "++" || operator === "--") {
  25098. return t.numberTypeAnnotation();
  25099. }
  25100. }
  25101. function StringLiteral() {
  25102. return t.stringTypeAnnotation();
  25103. }
  25104. function NumericLiteral() {
  25105. return t.numberTypeAnnotation();
  25106. }
  25107. function BooleanLiteral() {
  25108. return t.booleanTypeAnnotation();
  25109. }
  25110. function NullLiteral() {
  25111. return t.nullLiteralTypeAnnotation();
  25112. }
  25113. function RegExpLiteral() {
  25114. return t.genericTypeAnnotation(t.identifier("RegExp"));
  25115. }
  25116. function ObjectExpression() {
  25117. return t.genericTypeAnnotation(t.identifier("Object"));
  25118. }
  25119. function ArrayExpression() {
  25120. return t.genericTypeAnnotation(t.identifier("Array"));
  25121. }
  25122. function RestElement() {
  25123. return ArrayExpression();
  25124. }
  25125. RestElement.validParent = true;
  25126. function Func() {
  25127. return t.genericTypeAnnotation(t.identifier("Function"));
  25128. }
  25129. exports.FunctionExpression = Func;
  25130. exports.ArrowFunctionExpression = Func;
  25131. exports.FunctionDeclaration = Func;
  25132. exports.ClassExpression = Func;
  25133. exports.ClassDeclaration = Func;
  25134. function CallExpression() {
  25135. return resolveCall(this.get("callee"));
  25136. }
  25137. function TaggedTemplateExpression() {
  25138. return resolveCall(this.get("tag"));
  25139. }
  25140. function resolveCall(callee) {
  25141. callee = callee.resolve();
  25142. if (callee.isFunction()) {
  25143. if (callee.is("async")) {
  25144. if (callee.is("generator")) {
  25145. return t.genericTypeAnnotation(t.identifier("AsyncIterator"));
  25146. } else {
  25147. return t.genericTypeAnnotation(t.identifier("Promise"));
  25148. }
  25149. } else {
  25150. if (callee.node.returnType) {
  25151. return callee.node.returnType;
  25152. } else {}
  25153. }
  25154. }
  25155. }
  25156. });
  25157. $__System.registerDynamic("158", ["17", "157", "11", "c"], true, function ($__require, exports, module) {
  25158. "use strict";
  25159. var process = $__require("c");
  25160. var global = this || self,
  25161. GLOBAL = global;
  25162. exports.__esModule = true;
  25163. var _getIterator2 = $__require("17");
  25164. var _getIterator3 = _interopRequireDefault(_getIterator2);
  25165. exports.getTypeAnnotation = getTypeAnnotation;
  25166. exports._getTypeAnnotation = _getTypeAnnotation;
  25167. exports.isBaseType = isBaseType;
  25168. exports.couldBeBaseType = couldBeBaseType;
  25169. exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
  25170. exports.isGenericType = isGenericType;
  25171. var _inferers = $__require("157");
  25172. var inferers = _interopRequireWildcard(_inferers);
  25173. var _babelTypes = $__require("11");
  25174. var t = _interopRequireWildcard(_babelTypes);
  25175. function _interopRequireWildcard(obj) {
  25176. if (obj && obj.__esModule) {
  25177. return obj;
  25178. } else {
  25179. var newObj = {};if (obj != null) {
  25180. for (var key in obj) {
  25181. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  25182. }
  25183. }newObj.default = obj;return newObj;
  25184. }
  25185. }
  25186. function _interopRequireDefault(obj) {
  25187. return obj && obj.__esModule ? obj : { default: obj };
  25188. }
  25189. function getTypeAnnotation() {
  25190. if (this.typeAnnotation) return this.typeAnnotation;
  25191. var type = this._getTypeAnnotation() || t.anyTypeAnnotation();
  25192. if (t.isTypeAnnotation(type)) type = type.typeAnnotation;
  25193. return this.typeAnnotation = type;
  25194. }
  25195. function _getTypeAnnotation() {
  25196. var node = this.node;
  25197. if (!node) {
  25198. if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
  25199. var declar = this.parentPath.parentPath;
  25200. var declarParent = declar.parentPath;
  25201. if (declar.key === "left" && declarParent.isForInStatement()) {
  25202. return t.stringTypeAnnotation();
  25203. }
  25204. if (declar.key === "left" && declarParent.isForOfStatement()) {
  25205. return t.anyTypeAnnotation();
  25206. }
  25207. return t.voidTypeAnnotation();
  25208. } else {
  25209. return;
  25210. }
  25211. }
  25212. if (node.typeAnnotation) {
  25213. return node.typeAnnotation;
  25214. }
  25215. var inferer = inferers[node.type];
  25216. if (inferer) {
  25217. return inferer.call(this, node);
  25218. }
  25219. inferer = inferers[this.parentPath.type];
  25220. if (inferer && inferer.validParent) {
  25221. return this.parentPath.getTypeAnnotation();
  25222. }
  25223. }
  25224. function isBaseType(baseName, soft) {
  25225. return _isBaseType(baseName, this.getTypeAnnotation(), soft);
  25226. }
  25227. function _isBaseType(baseName, type, soft) {
  25228. if (baseName === "string") {
  25229. return t.isStringTypeAnnotation(type);
  25230. } else if (baseName === "number") {
  25231. return t.isNumberTypeAnnotation(type);
  25232. } else if (baseName === "boolean") {
  25233. return t.isBooleanTypeAnnotation(type);
  25234. } else if (baseName === "any") {
  25235. return t.isAnyTypeAnnotation(type);
  25236. } else if (baseName === "mixed") {
  25237. return t.isMixedTypeAnnotation(type);
  25238. } else if (baseName === "empty") {
  25239. return t.isEmptyTypeAnnotation(type);
  25240. } else if (baseName === "void") {
  25241. return t.isVoidTypeAnnotation(type);
  25242. } else {
  25243. if (soft) {
  25244. return false;
  25245. } else {
  25246. throw new Error("Unknown base type " + baseName);
  25247. }
  25248. }
  25249. }
  25250. function couldBeBaseType(name) {
  25251. var type = this.getTypeAnnotation();
  25252. if (t.isAnyTypeAnnotation(type)) return true;
  25253. if (t.isUnionTypeAnnotation(type)) {
  25254. for (var _iterator = type.types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  25255. var _ref;
  25256. if (_isArray) {
  25257. if (_i >= _iterator.length) break;
  25258. _ref = _iterator[_i++];
  25259. } else {
  25260. _i = _iterator.next();
  25261. if (_i.done) break;
  25262. _ref = _i.value;
  25263. }
  25264. var type2 = _ref;
  25265. if (t.isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) {
  25266. return true;
  25267. }
  25268. }
  25269. return false;
  25270. } else {
  25271. return _isBaseType(name, type, true);
  25272. }
  25273. }
  25274. function baseTypeStrictlyMatches(right) {
  25275. var left = this.getTypeAnnotation();
  25276. right = right.getTypeAnnotation();
  25277. if (!t.isAnyTypeAnnotation(left) && t.isFlowBaseAnnotation(left)) {
  25278. return right.type === left.type;
  25279. }
  25280. }
  25281. function isGenericType(genericName) {
  25282. var type = this.getTypeAnnotation();
  25283. return t.isGenericTypeAnnotation(type) && t.isIdentifier(type.id, { name: genericName });
  25284. }
  25285. });
  25286. $__System.registerDynamic("159", [], true, function ($__require, exports, module) {
  25287. var global = this || self,
  25288. GLOBAL = global;
  25289. // Copyright 2014, 2015, 2016, 2017 Simon Lydell
  25290. // License: MIT. (See LICENSE.)
  25291. Object.defineProperty(exports, "__esModule", {
  25292. value: true
  25293. });
  25294. // This regex comes from regex.coffee, and is inserted here by generate-index.js
  25295. // (run `npm run build`).
  25296. exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\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;
  25297. exports.matchToToken = function (match) {
  25298. var token = { type: "invalid", value: match[0] };
  25299. if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace";
  25300. return token;
  25301. };
  25302. });
  25303. $__System.registerDynamic('15a', [], true, function ($__require, exports, module) {
  25304. 'use strict';
  25305. var global = this || self,
  25306. GLOBAL = global;
  25307. var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
  25308. module.exports = function (str) {
  25309. if (typeof str !== 'string') {
  25310. throw new TypeError('Expected a string');
  25311. }
  25312. return str.replace(matchOperatorsRe, '\\$&');
  25313. };
  25314. });
  25315. $__System.registerDynamic('15b', [], true, function ($__require, exports, module) {
  25316. 'use strict';
  25317. var global = this || self,
  25318. GLOBAL = global;
  25319. function assembleStyles() {
  25320. var styles = {
  25321. modifiers: {
  25322. reset: [0, 0],
  25323. bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
  25324. dim: [2, 22],
  25325. italic: [3, 23],
  25326. underline: [4, 24],
  25327. inverse: [7, 27],
  25328. hidden: [8, 28],
  25329. strikethrough: [9, 29]
  25330. },
  25331. colors: {
  25332. black: [30, 39],
  25333. red: [31, 39],
  25334. green: [32, 39],
  25335. yellow: [33, 39],
  25336. blue: [34, 39],
  25337. magenta: [35, 39],
  25338. cyan: [36, 39],
  25339. white: [37, 39],
  25340. gray: [90, 39]
  25341. },
  25342. bgColors: {
  25343. bgBlack: [40, 49],
  25344. bgRed: [41, 49],
  25345. bgGreen: [42, 49],
  25346. bgYellow: [43, 49],
  25347. bgBlue: [44, 49],
  25348. bgMagenta: [45, 49],
  25349. bgCyan: [46, 49],
  25350. bgWhite: [47, 49]
  25351. }
  25352. };
  25353. // fix humans
  25354. styles.colors.grey = styles.colors.gray;
  25355. Object.keys(styles).forEach(function (groupName) {
  25356. var group = styles[groupName];
  25357. Object.keys(group).forEach(function (styleName) {
  25358. var style = group[styleName];
  25359. styles[styleName] = group[styleName] = {
  25360. open: '\u001b[' + style[0] + 'm',
  25361. close: '\u001b[' + style[1] + 'm'
  25362. };
  25363. });
  25364. Object.defineProperty(styles, groupName, {
  25365. value: group,
  25366. enumerable: false
  25367. });
  25368. });
  25369. return styles;
  25370. }
  25371. module.exports = assembleStyles();
  25372. /* Object.defineProperty(module, 'exports', {
  25373. enumerable: true,
  25374. get: assembleStyles
  25375. }); */
  25376. });
  25377. $__System.registerDynamic('15c', ['15d'], true, function ($__require, exports, module) {
  25378. 'use strict';
  25379. var global = this || self,
  25380. GLOBAL = global;
  25381. var ansiRegex = $__require('15d')();
  25382. module.exports = function (str) {
  25383. return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
  25384. };
  25385. });
  25386. $__System.registerDynamic('15d', [], true, function ($__require, exports, module) {
  25387. 'use strict';
  25388. var global = this || self,
  25389. GLOBAL = global;
  25390. module.exports = function () {
  25391. return (/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g
  25392. );
  25393. };
  25394. });
  25395. $__System.registerDynamic('15e', ['15d'], true, function ($__require, exports, module) {
  25396. 'use strict';
  25397. var global = this || self,
  25398. GLOBAL = global;
  25399. var ansiRegex = $__require('15d');
  25400. var re = new RegExp(ansiRegex().source); // remove the `g` flag
  25401. module.exports = re.test.bind(re);
  25402. });
  25403. $__System.registerDynamic('15f', ['c'], true, function ($__require, exports, module) {
  25404. 'use strict';
  25405. var process = $__require('c');
  25406. var global = this || self,
  25407. GLOBAL = global;
  25408. var argv = process.argv;
  25409. var terminator = argv.indexOf('--');
  25410. var hasFlag = function (flag) {
  25411. flag = '--' + flag;
  25412. var pos = argv.indexOf(flag);
  25413. return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
  25414. };
  25415. module.exports = function () {
  25416. if ('FORCE_COLOR' in process.env) {
  25417. return true;
  25418. }
  25419. if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
  25420. return false;
  25421. }
  25422. if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
  25423. return true;
  25424. }
  25425. if (process.stdout && !process.stdout.isTTY) {
  25426. return false;
  25427. }
  25428. if (process.platform === 'win32') {
  25429. return true;
  25430. }
  25431. if ('COLORTERM' in process.env) {
  25432. return true;
  25433. }
  25434. if (process.env.TERM === 'dumb') {
  25435. return false;
  25436. }
  25437. if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
  25438. return true;
  25439. }
  25440. return false;
  25441. }();
  25442. });
  25443. $__System.registerDynamic('160', ['15a', '15b', '15c', '15e', '15f', 'c'], true, function ($__require, exports, module) {
  25444. 'use strict';
  25445. var process = $__require('c');
  25446. var global = this || self,
  25447. GLOBAL = global;
  25448. var escapeStringRegexp = $__require('15a');
  25449. var ansiStyles = $__require('15b');
  25450. var stripAnsi = $__require('15c');
  25451. var hasAnsi = $__require('15e');
  25452. var supportsColor = $__require('15f');
  25453. var defineProps = Object.defineProperties;
  25454. var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM);
  25455. function Chalk(options) {
  25456. // detect mode if not set manually
  25457. this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
  25458. }
  25459. // use bright blue on Windows as the normal blue color is illegible
  25460. if (isSimpleWindowsTerm) {
  25461. ansiStyles.blue.open = '\u001b[94m';
  25462. }
  25463. var styles = function () {
  25464. var ret = {};
  25465. Object.keys(ansiStyles).forEach(function (key) {
  25466. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
  25467. ret[key] = {
  25468. get: function () {
  25469. return build.call(this, this._styles.concat(key));
  25470. }
  25471. };
  25472. });
  25473. return ret;
  25474. }();
  25475. var proto = defineProps(function chalk() {}, styles);
  25476. function build(_styles) {
  25477. var builder = function () {
  25478. return applyStyle.apply(builder, arguments);
  25479. };
  25480. builder._styles = _styles;
  25481. builder.enabled = this.enabled;
  25482. // __proto__ is used because we must return a function, but there is
  25483. // no way to create a function with a different prototype.
  25484. /* eslint-disable no-proto */
  25485. builder.__proto__ = proto;
  25486. return builder;
  25487. }
  25488. function applyStyle() {
  25489. // support varags, but simply cast to string in case there's only one arg
  25490. var args = arguments;
  25491. var argsLen = args.length;
  25492. var str = argsLen !== 0 && String(arguments[0]);
  25493. if (argsLen > 1) {
  25494. // don't slice `arguments`, it prevents v8 optimizations
  25495. for (var a = 1; a < argsLen; a++) {
  25496. str += ' ' + args[a];
  25497. }
  25498. }
  25499. if (!this.enabled || !str) {
  25500. return str;
  25501. }
  25502. var nestedStyles = this._styles;
  25503. var i = nestedStyles.length;
  25504. // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
  25505. // see https://github.com/chalk/chalk/issues/58
  25506. // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
  25507. var originalDim = ansiStyles.dim.open;
  25508. if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {
  25509. ansiStyles.dim.open = '';
  25510. }
  25511. while (i--) {
  25512. var code = ansiStyles[nestedStyles[i]];
  25513. // Replace any instances already present with a re-opening code
  25514. // otherwise only the part of the string until said closing code
  25515. // will be colored, and the rest will simply be 'plain'.
  25516. str = code.open + str.replace(code.closeRe, code.open) + code.close;
  25517. }
  25518. // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
  25519. ansiStyles.dim.open = originalDim;
  25520. return str;
  25521. }
  25522. function init() {
  25523. var ret = {};
  25524. Object.keys(styles).forEach(function (name) {
  25525. ret[name] = {
  25526. get: function () {
  25527. return build.call(this, [name]);
  25528. }
  25529. };
  25530. });
  25531. return ret;
  25532. }
  25533. defineProps(Chalk.prototype, init());
  25534. module.exports = new Chalk();
  25535. module.exports.styles = ansiStyles;
  25536. module.exports.hasColor = hasAnsi;
  25537. module.exports.stripColor = stripAnsi;
  25538. module.exports.supportsColor = supportsColor;
  25539. });
  25540. $__System.registerDynamic("d5", ["159", "ff", "160"], true, function ($__require, exports, module) {
  25541. "use strict";
  25542. var global = this || self,
  25543. GLOBAL = global;
  25544. exports.__esModule = true;
  25545. exports.default = function (rawLines, lineNumber, colNumber) {
  25546. var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  25547. colNumber = Math.max(colNumber, 0);
  25548. var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor;
  25549. var chalk = _chalk2.default;
  25550. if (opts.forceColor) {
  25551. chalk = new _chalk2.default.constructor({ enabled: true });
  25552. }
  25553. var maybeHighlight = function maybeHighlight(chalkFn, string) {
  25554. return highlighted ? chalkFn(string) : string;
  25555. };
  25556. var defs = getDefs(chalk);
  25557. if (highlighted) rawLines = highlight(defs, rawLines);
  25558. var linesAbove = opts.linesAbove || 2;
  25559. var linesBelow = opts.linesBelow || 3;
  25560. var lines = rawLines.split(NEWLINE);
  25561. var start = Math.max(lineNumber - (linesAbove + 1), 0);
  25562. var end = Math.min(lines.length, lineNumber + linesBelow);
  25563. if (!lineNumber && !colNumber) {
  25564. start = 0;
  25565. end = lines.length;
  25566. }
  25567. var numberMaxWidth = String(end).length;
  25568. var frame = lines.slice(start, end).map(function (line, index) {
  25569. var number = start + 1 + index;
  25570. var paddedNumber = (" " + number).slice(-numberMaxWidth);
  25571. var gutter = " " + paddedNumber + " | ";
  25572. if (number === lineNumber) {
  25573. var markerLine = "";
  25574. if (colNumber) {
  25575. var markerSpacing = line.slice(0, colNumber - 1).replace(/[^\t]/g, " ");
  25576. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^")].join("");
  25577. }
  25578. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
  25579. } else {
  25580. return " " + maybeHighlight(defs.gutter, gutter) + line;
  25581. }
  25582. }).join("\n");
  25583. if (highlighted) {
  25584. return chalk.reset(frame);
  25585. } else {
  25586. return frame;
  25587. }
  25588. };
  25589. var _jsTokens = $__require("159");
  25590. var _jsTokens2 = _interopRequireDefault(_jsTokens);
  25591. var _esutils = $__require("ff");
  25592. var _esutils2 = _interopRequireDefault(_esutils);
  25593. var _chalk = $__require("160");
  25594. var _chalk2 = _interopRequireDefault(_chalk);
  25595. function _interopRequireDefault(obj) {
  25596. return obj && obj.__esModule ? obj : { default: obj };
  25597. }
  25598. function getDefs(chalk) {
  25599. return {
  25600. keyword: chalk.cyan,
  25601. capitalized: chalk.yellow,
  25602. jsx_tag: chalk.yellow,
  25603. punctuator: chalk.yellow,
  25604. number: chalk.magenta,
  25605. string: chalk.green,
  25606. regex: chalk.magenta,
  25607. comment: chalk.grey,
  25608. invalid: chalk.white.bgRed.bold,
  25609. gutter: chalk.grey,
  25610. marker: chalk.red.bold
  25611. };
  25612. }
  25613. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  25614. var JSX_TAG = /^[a-z][\w-]*$/i;
  25615. var BRACKET = /^[()\[\]{}]$/;
  25616. function getTokenType(match) {
  25617. var _match$slice = match.slice(-2),
  25618. offset = _match$slice[0],
  25619. text = _match$slice[1];
  25620. var token = (0, _jsTokens.matchToToken)(match);
  25621. if (token.type === "name") {
  25622. if (_esutils2.default.keyword.isReservedWordES6(token.value)) {
  25623. return "keyword";
  25624. }
  25625. if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
  25626. return "jsx_tag";
  25627. }
  25628. if (token.value[0] !== token.value[0].toLowerCase()) {
  25629. return "capitalized";
  25630. }
  25631. }
  25632. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  25633. return "bracket";
  25634. }
  25635. return token.type;
  25636. }
  25637. function highlight(defs, text) {
  25638. return text.replace(_jsTokens2.default, function () {
  25639. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  25640. args[_key] = arguments[_key];
  25641. }
  25642. var type = getTokenType(args);
  25643. var colorize = defs[type];
  25644. if (colorize) {
  25645. return args[0].split(NEWLINE).map(function (str) {
  25646. return colorize(str);
  25647. }).join("\n");
  25648. } else {
  25649. return args[0];
  25650. }
  25651. });
  25652. }
  25653. module.exports = exports["default"];
  25654. });
  25655. $__System.registerDynamic("161", ["17", "d5", "d0", "155", "d7", "11", "c"], true, function ($__require, exports, module) {
  25656. "use strict";
  25657. var process = $__require("c");
  25658. var global = this || self,
  25659. GLOBAL = global;
  25660. exports.__esModule = true;
  25661. var _getIterator2 = $__require("17");
  25662. var _getIterator3 = _interopRequireDefault(_getIterator2);
  25663. exports.replaceWithMultiple = replaceWithMultiple;
  25664. exports.replaceWithSourceString = replaceWithSourceString;
  25665. exports.replaceWith = replaceWith;
  25666. exports._replaceWith = _replaceWith;
  25667. exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
  25668. exports.replaceInline = replaceInline;
  25669. var _babelCodeFrame = $__require("d5");
  25670. var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame);
  25671. var _index = $__require("d0");
  25672. var _index2 = _interopRequireDefault(_index);
  25673. var _index3 = $__require("155");
  25674. var _index4 = _interopRequireDefault(_index3);
  25675. var _babylon = $__require("d7");
  25676. var _babelTypes = $__require("11");
  25677. var t = _interopRequireWildcard(_babelTypes);
  25678. function _interopRequireWildcard(obj) {
  25679. if (obj && obj.__esModule) {
  25680. return obj;
  25681. } else {
  25682. var newObj = {};if (obj != null) {
  25683. for (var key in obj) {
  25684. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  25685. }
  25686. }newObj.default = obj;return newObj;
  25687. }
  25688. }
  25689. function _interopRequireDefault(obj) {
  25690. return obj && obj.__esModule ? obj : { default: obj };
  25691. }
  25692. var hoistVariablesVisitor = {
  25693. Function: function Function(path) {
  25694. path.skip();
  25695. },
  25696. VariableDeclaration: function VariableDeclaration(path) {
  25697. if (path.node.kind !== "var") return;
  25698. var bindings = path.getBindingIdentifiers();
  25699. for (var key in bindings) {
  25700. path.scope.push({ id: bindings[key] });
  25701. }
  25702. var exprs = [];
  25703. for (var _iterator = path.node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  25704. var _ref;
  25705. if (_isArray) {
  25706. if (_i >= _iterator.length) break;
  25707. _ref = _iterator[_i++];
  25708. } else {
  25709. _i = _iterator.next();
  25710. if (_i.done) break;
  25711. _ref = _i.value;
  25712. }
  25713. var declar = _ref;
  25714. if (declar.init) {
  25715. exprs.push(t.expressionStatement(t.assignmentExpression("=", declar.id, declar.init)));
  25716. }
  25717. }
  25718. path.replaceWithMultiple(exprs);
  25719. }
  25720. };
  25721. function replaceWithMultiple(nodes) {
  25722. this.resync();
  25723. nodes = this._verifyNodeList(nodes);
  25724. t.inheritLeadingComments(nodes[0], this.node);
  25725. t.inheritTrailingComments(nodes[nodes.length - 1], this.node);
  25726. this.node = this.container[this.key] = null;
  25727. this.insertAfter(nodes);
  25728. if (this.node) {
  25729. this.requeue();
  25730. } else {
  25731. this.remove();
  25732. }
  25733. }
  25734. function replaceWithSourceString(replacement) {
  25735. this.resync();
  25736. try {
  25737. replacement = "(" + replacement + ")";
  25738. replacement = (0, _babylon.parse)(replacement);
  25739. } catch (err) {
  25740. var loc = err.loc;
  25741. if (loc) {
  25742. err.message += " - make sure this is an expression.";
  25743. err.message += "\n" + (0, _babelCodeFrame2.default)(replacement, loc.line, loc.column + 1);
  25744. }
  25745. throw err;
  25746. }
  25747. replacement = replacement.program.body[0].expression;
  25748. _index2.default.removeProperties(replacement);
  25749. return this.replaceWith(replacement);
  25750. }
  25751. function replaceWith(replacement) {
  25752. this.resync();
  25753. if (this.removed) {
  25754. throw new Error("You can't replace this node, we've already removed it");
  25755. }
  25756. if (replacement instanceof _index4.default) {
  25757. replacement = replacement.node;
  25758. }
  25759. if (!replacement) {
  25760. throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
  25761. }
  25762. if (this.node === replacement) {
  25763. return;
  25764. }
  25765. if (this.isProgram() && !t.isProgram(replacement)) {
  25766. throw new Error("You can only replace a Program root node with another Program node");
  25767. }
  25768. if (Array.isArray(replacement)) {
  25769. throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
  25770. }
  25771. if (typeof replacement === "string") {
  25772. throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
  25773. }
  25774. if (this.isNodeType("Statement") && t.isExpression(replacement)) {
  25775. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
  25776. replacement = t.expressionStatement(replacement);
  25777. }
  25778. }
  25779. if (this.isNodeType("Expression") && t.isStatement(replacement)) {
  25780. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
  25781. return this.replaceExpressionWithStatements([replacement]);
  25782. }
  25783. }
  25784. var oldNode = this.node;
  25785. if (oldNode) {
  25786. t.inheritsComments(replacement, oldNode);
  25787. t.removeComments(oldNode);
  25788. }
  25789. this._replaceWith(replacement);
  25790. this.type = replacement.type;
  25791. this.setScope();
  25792. this.requeue();
  25793. }
  25794. function _replaceWith(node) {
  25795. if (!this.container) {
  25796. throw new ReferenceError("Container is falsy");
  25797. }
  25798. if (this.inList) {
  25799. t.validate(this.parent, this.key, [node]);
  25800. } else {
  25801. t.validate(this.parent, this.key, node);
  25802. }
  25803. this.debug(function () {
  25804. return "Replace with " + (node && node.type);
  25805. });
  25806. this.node = this.container[this.key] = node;
  25807. }
  25808. function replaceExpressionWithStatements(nodes) {
  25809. this.resync();
  25810. var toSequenceExpression = t.toSequenceExpression(nodes, this.scope);
  25811. if (t.isSequenceExpression(toSequenceExpression)) {
  25812. var exprs = toSequenceExpression.expressions;
  25813. if (exprs.length >= 2 && this.parentPath.isExpressionStatement()) {
  25814. this._maybePopFromStatements(exprs);
  25815. }
  25816. if (exprs.length === 1) {
  25817. this.replaceWith(exprs[0]);
  25818. } else {
  25819. this.replaceWith(toSequenceExpression);
  25820. }
  25821. } else if (toSequenceExpression) {
  25822. this.replaceWith(toSequenceExpression);
  25823. } else {
  25824. var container = t.functionExpression(null, [], t.blockStatement(nodes));
  25825. container.shadow = true;
  25826. this.replaceWith(t.callExpression(container, []));
  25827. this.traverse(hoistVariablesVisitor);
  25828. var completionRecords = this.get("callee").getCompletionRecords();
  25829. for (var _iterator2 = completionRecords, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  25830. var _ref2;
  25831. if (_isArray2) {
  25832. if (_i2 >= _iterator2.length) break;
  25833. _ref2 = _iterator2[_i2++];
  25834. } else {
  25835. _i2 = _iterator2.next();
  25836. if (_i2.done) break;
  25837. _ref2 = _i2.value;
  25838. }
  25839. var path = _ref2;
  25840. if (!path.isExpressionStatement()) continue;
  25841. var loop = path.findParent(function (path) {
  25842. return path.isLoop();
  25843. });
  25844. if (loop) {
  25845. var uid = loop.getData("expressionReplacementReturnUid");
  25846. if (!uid) {
  25847. var callee = this.get("callee");
  25848. uid = callee.scope.generateDeclaredUidIdentifier("ret");
  25849. callee.get("body").pushContainer("body", t.returnStatement(uid));
  25850. loop.setData("expressionReplacementReturnUid", uid);
  25851. } else {
  25852. uid = t.identifier(uid.name);
  25853. }
  25854. path.get("expression").replaceWith(t.assignmentExpression("=", uid, path.node.expression));
  25855. } else {
  25856. path.replaceWith(t.returnStatement(path.node.expression));
  25857. }
  25858. }
  25859. return this.node;
  25860. }
  25861. }
  25862. function replaceInline(nodes) {
  25863. this.resync();
  25864. if (Array.isArray(nodes)) {
  25865. if (Array.isArray(this.container)) {
  25866. nodes = this._verifyNodeList(nodes);
  25867. this._containerInsertAfter(nodes);
  25868. return this.remove();
  25869. } else {
  25870. return this.replaceWithMultiple(nodes);
  25871. }
  25872. } else {
  25873. return this.replaceWith(nodes);
  25874. }
  25875. }
  25876. });
  25877. $__System.registerDynamic('162', ['163', '37', '164', '165', '166', 'c'], true, function ($__require, exports, module) {
  25878. 'use strict';
  25879. var process = $__require('c');
  25880. var global = this || self,
  25881. GLOBAL = global;
  25882. var global = $__require('163'),
  25883. core = $__require('37'),
  25884. dP = $__require('164'),
  25885. DESCRIPTORS = $__require('165'),
  25886. SPECIES = $__require('166')('species');
  25887. module.exports = function (KEY) {
  25888. var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
  25889. if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
  25890. configurable: true,
  25891. get: function () {
  25892. return this;
  25893. }
  25894. });
  25895. };
  25896. });
  25897. $__System.registerDynamic('167', ['164', '168', '169', '10c', '16a', '16b', '16c', '16d', '16e', '162', '165', '16f', 'c'], true, function ($__require, exports, module) {
  25898. 'use strict';
  25899. var process = $__require('c');
  25900. var global = this || self,
  25901. GLOBAL = global;
  25902. var dP = $__require('164').f,
  25903. create = $__require('168'),
  25904. redefineAll = $__require('169'),
  25905. ctx = $__require('10c'),
  25906. anInstance = $__require('16a'),
  25907. defined = $__require('16b'),
  25908. forOf = $__require('16c'),
  25909. $iterDefine = $__require('16d'),
  25910. step = $__require('16e'),
  25911. setSpecies = $__require('162'),
  25912. DESCRIPTORS = $__require('165'),
  25913. fastKey = $__require('16f').fastKey,
  25914. SIZE = DESCRIPTORS ? '_s' : 'size';
  25915. var getEntry = function (that, key) {
  25916. // fast case
  25917. var index = fastKey(key),
  25918. entry;
  25919. if (index !== 'F') return that._i[index];
  25920. // frozen object case
  25921. for (entry = that._f; entry; entry = entry.n) {
  25922. if (entry.k == key) return entry;
  25923. }
  25924. };
  25925. module.exports = {
  25926. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  25927. var C = wrapper(function (that, iterable) {
  25928. anInstance(that, C, NAME, '_i');
  25929. that._i = create(null); // index
  25930. that._f = undefined; // first entry
  25931. that._l = undefined; // last entry
  25932. that[SIZE] = 0; // size
  25933. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  25934. });
  25935. redefineAll(C.prototype, {
  25936. // 23.1.3.1 Map.prototype.clear()
  25937. // 23.2.3.2 Set.prototype.clear()
  25938. clear: function clear() {
  25939. for (var that = this, data = that._i, entry = that._f; entry; entry = entry.n) {
  25940. entry.r = true;
  25941. if (entry.p) entry.p = entry.p.n = undefined;
  25942. delete data[entry.i];
  25943. }
  25944. that._f = that._l = undefined;
  25945. that[SIZE] = 0;
  25946. },
  25947. // 23.1.3.3 Map.prototype.delete(key)
  25948. // 23.2.3.4 Set.prototype.delete(value)
  25949. 'delete': function (key) {
  25950. var that = this,
  25951. entry = getEntry(that, key);
  25952. if (entry) {
  25953. var next = entry.n,
  25954. prev = entry.p;
  25955. delete that._i[entry.i];
  25956. entry.r = true;
  25957. if (prev) prev.n = next;
  25958. if (next) next.p = prev;
  25959. if (that._f == entry) that._f = next;
  25960. if (that._l == entry) that._l = prev;
  25961. that[SIZE]--;
  25962. }return !!entry;
  25963. },
  25964. // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
  25965. // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
  25966. forEach: function forEach(callbackfn /*, that = undefined */) {
  25967. anInstance(this, C, 'forEach');
  25968. var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3),
  25969. entry;
  25970. while (entry = entry ? entry.n : this._f) {
  25971. f(entry.v, entry.k, this);
  25972. // revert to the last existing entry
  25973. while (entry && entry.r) entry = entry.p;
  25974. }
  25975. },
  25976. // 23.1.3.7 Map.prototype.has(key)
  25977. // 23.2.3.7 Set.prototype.has(value)
  25978. has: function has(key) {
  25979. return !!getEntry(this, key);
  25980. }
  25981. });
  25982. if (DESCRIPTORS) dP(C.prototype, 'size', {
  25983. get: function () {
  25984. return defined(this[SIZE]);
  25985. }
  25986. });
  25987. return C;
  25988. },
  25989. def: function (that, key, value) {
  25990. var entry = getEntry(that, key),
  25991. prev,
  25992. index;
  25993. // change existing entry
  25994. if (entry) {
  25995. entry.v = value;
  25996. // create new entry
  25997. } else {
  25998. that._l = entry = {
  25999. i: index = fastKey(key, true), // <- index
  26000. k: key, // <- key
  26001. v: value, // <- value
  26002. p: prev = that._l, // <- previous entry
  26003. n: undefined, // <- next entry
  26004. r: false // <- removed
  26005. };
  26006. if (!that._f) that._f = entry;
  26007. if (prev) prev.n = entry;
  26008. that[SIZE]++;
  26009. // add to index
  26010. if (index !== 'F') that._i[index] = entry;
  26011. }return that;
  26012. },
  26013. getEntry: getEntry,
  26014. setStrong: function (C, NAME, IS_MAP) {
  26015. // add .keys, .values, .entries, [@@iterator]
  26016. // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
  26017. $iterDefine(C, NAME, function (iterated, kind) {
  26018. this._t = iterated; // target
  26019. this._k = kind; // kind
  26020. this._l = undefined; // previous
  26021. }, function () {
  26022. var that = this,
  26023. kind = that._k,
  26024. entry = that._l;
  26025. // revert to the last existing entry
  26026. while (entry && entry.r) entry = entry.p;
  26027. // get next entry
  26028. if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
  26029. // or finish the iteration
  26030. that._t = undefined;
  26031. return step(1);
  26032. }
  26033. // return step by kind
  26034. if (kind == 'keys') return step(0, entry.k);
  26035. if (kind == 'values') return step(0, entry.v);
  26036. return step(0, [entry.k, entry.v]);
  26037. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  26038. // add [@@species], 23.1.2.2, 23.2.2.2
  26039. setSpecies(NAME);
  26040. }
  26041. };
  26042. });
  26043. $__System.registerDynamic('170', ['167', '33', 'c'], true, function ($__require, exports, module) {
  26044. 'use strict';
  26045. var process = $__require('c');
  26046. var global = this || self,
  26047. GLOBAL = global;
  26048. var strong = $__require('167');
  26049. // 23.1 Map Objects
  26050. module.exports = $__require('33')('Map', function (get) {
  26051. return function Map() {
  26052. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  26053. };
  26054. }, {
  26055. // 23.1.3.6 Map.prototype.get(key)
  26056. get: function get(key) {
  26057. var entry = strong.getEntry(this, key);
  26058. return entry && entry.v;
  26059. },
  26060. // 23.1.3.9 Map.prototype.set(key, value)
  26061. set: function set(key, value) {
  26062. return strong.def(this, key === 0 ? 0 : key, value);
  26063. }
  26064. }, strong, true);
  26065. });
  26066. $__System.registerDynamic('171', ['16c', 'c'], true, function ($__require, exports, module) {
  26067. var process = $__require('c');
  26068. var global = this || self,
  26069. GLOBAL = global;
  26070. var forOf = $__require('16c');
  26071. module.exports = function (iter, ITERATOR) {
  26072. var result = [];
  26073. forOf(iter, false, result.push, result, ITERATOR);
  26074. return result;
  26075. };
  26076. });
  26077. $__System.registerDynamic('172', ['173', '171', 'c'], true, function ($__require, exports, module) {
  26078. var process = $__require('c');
  26079. var global = this || self,
  26080. GLOBAL = global;
  26081. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  26082. var classof = $__require('173'),
  26083. from = $__require('171');
  26084. module.exports = function (NAME) {
  26085. return function toJSON() {
  26086. if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
  26087. return from(this);
  26088. };
  26089. };
  26090. });
  26091. $__System.registerDynamic('174', ['c6', '172', 'c'], true, function ($__require, exports, module) {
  26092. var process = $__require('c');
  26093. var global = this || self,
  26094. GLOBAL = global;
  26095. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  26096. var $export = $__require('c6');
  26097. $export($export.P + $export.R, 'Map', { toJSON: $__require('172')('Map') });
  26098. });
  26099. $__System.registerDynamic('175', ['35', '176', '36', '170', '174', '37', 'c'], true, function ($__require, exports, module) {
  26100. var process = $__require('c');
  26101. var global = this || self,
  26102. GLOBAL = global;
  26103. $__require('35');
  26104. $__require('176');
  26105. $__require('36');
  26106. $__require('170');
  26107. $__require('174');
  26108. module.exports = $__require('37').Map;
  26109. });
  26110. $__System.registerDynamic("cf", ["175"], true, function ($__require, exports, module) {
  26111. var global = this || self,
  26112. GLOBAL = global;
  26113. module.exports = { "default": $__require("175"), __esModule: true };
  26114. });
  26115. $__System.registerDynamic("177", ["30", "17", "cf", "c"], true, function ($__require, exports, module) {
  26116. "use strict";
  26117. var process = $__require("c");
  26118. var global = this || self,
  26119. GLOBAL = global;
  26120. exports.__esModule = true;
  26121. var _typeof2 = $__require("30");
  26122. var _typeof3 = _interopRequireDefault(_typeof2);
  26123. var _getIterator2 = $__require("17");
  26124. var _getIterator3 = _interopRequireDefault(_getIterator2);
  26125. var _map = $__require("cf");
  26126. var _map2 = _interopRequireDefault(_map);
  26127. exports.evaluateTruthy = evaluateTruthy;
  26128. exports.evaluate = evaluate;
  26129. function _interopRequireDefault(obj) {
  26130. return obj && obj.__esModule ? obj : { default: obj };
  26131. }
  26132. var VALID_CALLEES = ["String", "Number", "Math"];
  26133. var INVALID_METHODS = ["random"];
  26134. function evaluateTruthy() {
  26135. var res = this.evaluate();
  26136. if (res.confident) return !!res.value;
  26137. }
  26138. function evaluate() {
  26139. var confident = true;
  26140. var deoptPath = void 0;
  26141. var seen = new _map2.default();
  26142. function deopt(path) {
  26143. if (!confident) return;
  26144. deoptPath = path;
  26145. confident = false;
  26146. }
  26147. var value = evaluate(this);
  26148. if (!confident) value = undefined;
  26149. return {
  26150. confident: confident,
  26151. deopt: deoptPath,
  26152. value: value
  26153. };
  26154. function evaluate(path) {
  26155. var node = path.node;
  26156. if (seen.has(node)) {
  26157. var existing = seen.get(node);
  26158. if (existing.resolved) {
  26159. return existing.value;
  26160. } else {
  26161. deopt(path);
  26162. return;
  26163. }
  26164. } else {
  26165. var item = { resolved: false };
  26166. seen.set(node, item);
  26167. var val = _evaluate(path);
  26168. if (confident) {
  26169. item.resolved = true;
  26170. item.value = val;
  26171. }
  26172. return val;
  26173. }
  26174. }
  26175. function _evaluate(path) {
  26176. if (!confident) return;
  26177. var node = path.node;
  26178. if (path.isSequenceExpression()) {
  26179. var exprs = path.get("expressions");
  26180. return evaluate(exprs[exprs.length - 1]);
  26181. }
  26182. if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
  26183. return node.value;
  26184. }
  26185. if (path.isNullLiteral()) {
  26186. return null;
  26187. }
  26188. if (path.isTemplateLiteral()) {
  26189. var str = "";
  26190. var i = 0;
  26191. var _exprs = path.get("expressions");
  26192. for (var _iterator = node.quasis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  26193. var _ref;
  26194. if (_isArray) {
  26195. if (_i >= _iterator.length) break;
  26196. _ref = _iterator[_i++];
  26197. } else {
  26198. _i = _iterator.next();
  26199. if (_i.done) break;
  26200. _ref = _i.value;
  26201. }
  26202. var elem = _ref;
  26203. if (!confident) break;
  26204. str += elem.value.cooked;
  26205. var expr = _exprs[i++];
  26206. if (expr) str += String(evaluate(expr));
  26207. }
  26208. if (!confident) return;
  26209. return str;
  26210. }
  26211. if (path.isConditionalExpression()) {
  26212. var testResult = evaluate(path.get("test"));
  26213. if (!confident) return;
  26214. if (testResult) {
  26215. return evaluate(path.get("consequent"));
  26216. } else {
  26217. return evaluate(path.get("alternate"));
  26218. }
  26219. }
  26220. if (path.isExpressionWrapper()) {
  26221. return evaluate(path.get("expression"));
  26222. }
  26223. if (path.isMemberExpression() && !path.parentPath.isCallExpression({ callee: node })) {
  26224. var property = path.get("property");
  26225. var object = path.get("object");
  26226. if (object.isLiteral() && property.isIdentifier()) {
  26227. var _value = object.node.value;
  26228. var type = typeof _value === "undefined" ? "undefined" : (0, _typeof3.default)(_value);
  26229. if (type === "number" || type === "string") {
  26230. return _value[property.node.name];
  26231. }
  26232. }
  26233. }
  26234. if (path.isReferencedIdentifier()) {
  26235. var binding = path.scope.getBinding(node.name);
  26236. if (binding && binding.constantViolations.length > 0) {
  26237. return deopt(binding.path);
  26238. }
  26239. if (binding && path.node.start < binding.path.node.end) {
  26240. return deopt(binding.path);
  26241. }
  26242. if (binding && binding.hasValue) {
  26243. return binding.value;
  26244. } else {
  26245. if (node.name === "undefined") {
  26246. return binding ? deopt(binding.path) : undefined;
  26247. } else if (node.name === "Infinity") {
  26248. return binding ? deopt(binding.path) : Infinity;
  26249. } else if (node.name === "NaN") {
  26250. return binding ? deopt(binding.path) : NaN;
  26251. }
  26252. var resolved = path.resolve();
  26253. if (resolved === path) {
  26254. return deopt(path);
  26255. } else {
  26256. return evaluate(resolved);
  26257. }
  26258. }
  26259. }
  26260. if (path.isUnaryExpression({ prefix: true })) {
  26261. if (node.operator === "void") {
  26262. return undefined;
  26263. }
  26264. var argument = path.get("argument");
  26265. if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
  26266. return "function";
  26267. }
  26268. var arg = evaluate(argument);
  26269. if (!confident) return;
  26270. switch (node.operator) {
  26271. case "!":
  26272. return !arg;
  26273. case "+":
  26274. return +arg;
  26275. case "-":
  26276. return -arg;
  26277. case "~":
  26278. return ~arg;
  26279. case "typeof":
  26280. return typeof arg === "undefined" ? "undefined" : (0, _typeof3.default)(arg);
  26281. }
  26282. }
  26283. if (path.isArrayExpression()) {
  26284. var arr = [];
  26285. var elems = path.get("elements");
  26286. for (var _iterator2 = elems, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  26287. var _ref2;
  26288. if (_isArray2) {
  26289. if (_i2 >= _iterator2.length) break;
  26290. _ref2 = _iterator2[_i2++];
  26291. } else {
  26292. _i2 = _iterator2.next();
  26293. if (_i2.done) break;
  26294. _ref2 = _i2.value;
  26295. }
  26296. var _elem = _ref2;
  26297. _elem = _elem.evaluate();
  26298. if (_elem.confident) {
  26299. arr.push(_elem.value);
  26300. } else {
  26301. return deopt(_elem);
  26302. }
  26303. }
  26304. return arr;
  26305. }
  26306. if (path.isObjectExpression()) {
  26307. var obj = {};
  26308. var props = path.get("properties");
  26309. for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  26310. var _ref3;
  26311. if (_isArray3) {
  26312. if (_i3 >= _iterator3.length) break;
  26313. _ref3 = _iterator3[_i3++];
  26314. } else {
  26315. _i3 = _iterator3.next();
  26316. if (_i3.done) break;
  26317. _ref3 = _i3.value;
  26318. }
  26319. var prop = _ref3;
  26320. if (prop.isObjectMethod() || prop.isSpreadProperty()) {
  26321. return deopt(prop);
  26322. }
  26323. var keyPath = prop.get("key");
  26324. var key = keyPath;
  26325. if (prop.node.computed) {
  26326. key = key.evaluate();
  26327. if (!key.confident) {
  26328. return deopt(keyPath);
  26329. }
  26330. key = key.value;
  26331. } else if (key.isIdentifier()) {
  26332. key = key.node.name;
  26333. } else {
  26334. key = key.node.value;
  26335. }
  26336. var valuePath = prop.get("value");
  26337. var _value2 = valuePath.evaluate();
  26338. if (!_value2.confident) {
  26339. return deopt(valuePath);
  26340. }
  26341. _value2 = _value2.value;
  26342. obj[key] = _value2;
  26343. }
  26344. return obj;
  26345. }
  26346. if (path.isLogicalExpression()) {
  26347. var wasConfident = confident;
  26348. var left = evaluate(path.get("left"));
  26349. var leftConfident = confident;
  26350. confident = wasConfident;
  26351. var right = evaluate(path.get("right"));
  26352. var rightConfident = confident;
  26353. confident = leftConfident && rightConfident;
  26354. switch (node.operator) {
  26355. case "||":
  26356. if (left && leftConfident) {
  26357. confident = true;
  26358. return left;
  26359. }
  26360. if (!confident) return;
  26361. return left || right;
  26362. case "&&":
  26363. if (!left && leftConfident || !right && rightConfident) {
  26364. confident = true;
  26365. }
  26366. if (!confident) return;
  26367. return left && right;
  26368. }
  26369. }
  26370. if (path.isBinaryExpression()) {
  26371. var _left = evaluate(path.get("left"));
  26372. if (!confident) return;
  26373. var _right = evaluate(path.get("right"));
  26374. if (!confident) return;
  26375. switch (node.operator) {
  26376. case "-":
  26377. return _left - _right;
  26378. case "+":
  26379. return _left + _right;
  26380. case "/":
  26381. return _left / _right;
  26382. case "*":
  26383. return _left * _right;
  26384. case "%":
  26385. return _left % _right;
  26386. case "**":
  26387. return Math.pow(_left, _right);
  26388. case "<":
  26389. return _left < _right;
  26390. case ">":
  26391. return _left > _right;
  26392. case "<=":
  26393. return _left <= _right;
  26394. case ">=":
  26395. return _left >= _right;
  26396. case "==":
  26397. return _left == _right;
  26398. case "!=":
  26399. return _left != _right;
  26400. case "===":
  26401. return _left === _right;
  26402. case "!==":
  26403. return _left !== _right;
  26404. case "|":
  26405. return _left | _right;
  26406. case "&":
  26407. return _left & _right;
  26408. case "^":
  26409. return _left ^ _right;
  26410. case "<<":
  26411. return _left << _right;
  26412. case ">>":
  26413. return _left >> _right;
  26414. case ">>>":
  26415. return _left >>> _right;
  26416. }
  26417. }
  26418. if (path.isCallExpression()) {
  26419. var callee = path.get("callee");
  26420. var context = void 0;
  26421. var func = void 0;
  26422. if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
  26423. func = global[node.callee.name];
  26424. }
  26425. if (callee.isMemberExpression()) {
  26426. var _object = callee.get("object");
  26427. var _property = callee.get("property");
  26428. if (_object.isIdentifier() && _property.isIdentifier() && VALID_CALLEES.indexOf(_object.node.name) >= 0 && INVALID_METHODS.indexOf(_property.node.name) < 0) {
  26429. context = global[_object.node.name];
  26430. func = context[_property.node.name];
  26431. }
  26432. if (_object.isLiteral() && _property.isIdentifier()) {
  26433. var _type = (0, _typeof3.default)(_object.node.value);
  26434. if (_type === "string" || _type === "number") {
  26435. context = _object.node.value;
  26436. func = context[_property.node.name];
  26437. }
  26438. }
  26439. }
  26440. if (func) {
  26441. var args = path.get("arguments").map(evaluate);
  26442. if (!confident) return;
  26443. return func.apply(context, args);
  26444. }
  26445. }
  26446. deopt(path);
  26447. }
  26448. }
  26449. });
  26450. $__System.registerDynamic("178", ["11", "c"], true, function ($__require, exports, module) {
  26451. "use strict";
  26452. var process = $__require("c");
  26453. var global = this || self,
  26454. GLOBAL = global;
  26455. exports.__esModule = true;
  26456. exports.toComputedKey = toComputedKey;
  26457. exports.ensureBlock = ensureBlock;
  26458. exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
  26459. var _babelTypes = $__require("11");
  26460. var t = _interopRequireWildcard(_babelTypes);
  26461. function _interopRequireWildcard(obj) {
  26462. if (obj && obj.__esModule) {
  26463. return obj;
  26464. } else {
  26465. var newObj = {};if (obj != null) {
  26466. for (var key in obj) {
  26467. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  26468. }
  26469. }newObj.default = obj;return newObj;
  26470. }
  26471. }
  26472. function toComputedKey() {
  26473. var node = this.node;
  26474. var key = void 0;
  26475. if (this.isMemberExpression()) {
  26476. key = node.property;
  26477. } else if (this.isProperty() || this.isMethod()) {
  26478. key = node.key;
  26479. } else {
  26480. throw new ReferenceError("todo");
  26481. }
  26482. if (!node.computed) {
  26483. if (t.isIdentifier(key)) key = t.stringLiteral(key.name);
  26484. }
  26485. return key;
  26486. }
  26487. function ensureBlock() {
  26488. return t.ensureBlock(this.node);
  26489. }
  26490. function arrowFunctionToShadowed() {
  26491. if (!this.isArrowFunctionExpression()) return;
  26492. this.ensureBlock();
  26493. var node = this.node;
  26494. node.expression = false;
  26495. node.type = "FunctionExpression";
  26496. node.shadow = node.shadow || true;
  26497. }
  26498. });
  26499. $__System.registerDynamic("179", ["17", "a5", "11", "c"], true, function ($__require, exports, module) {
  26500. "use strict";
  26501. var process = $__require("c");
  26502. var global = this || self,
  26503. GLOBAL = global;
  26504. exports.__esModule = true;
  26505. exports.is = undefined;
  26506. var _getIterator2 = $__require("17");
  26507. var _getIterator3 = _interopRequireDefault(_getIterator2);
  26508. exports.matchesPattern = matchesPattern;
  26509. exports.has = has;
  26510. exports.isStatic = isStatic;
  26511. exports.isnt = isnt;
  26512. exports.equals = equals;
  26513. exports.isNodeType = isNodeType;
  26514. exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
  26515. exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
  26516. exports.isCompletionRecord = isCompletionRecord;
  26517. exports.isStatementOrBlock = isStatementOrBlock;
  26518. exports.referencesImport = referencesImport;
  26519. exports.getSource = getSource;
  26520. exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
  26521. exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
  26522. exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions;
  26523. exports.resolve = resolve;
  26524. exports._resolve = _resolve;
  26525. var _includes = $__require("a5");
  26526. var _includes2 = _interopRequireDefault(_includes);
  26527. var _babelTypes = $__require("11");
  26528. var t = _interopRequireWildcard(_babelTypes);
  26529. function _interopRequireWildcard(obj) {
  26530. if (obj && obj.__esModule) {
  26531. return obj;
  26532. } else {
  26533. var newObj = {};if (obj != null) {
  26534. for (var key in obj) {
  26535. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  26536. }
  26537. }newObj.default = obj;return newObj;
  26538. }
  26539. }
  26540. function _interopRequireDefault(obj) {
  26541. return obj && obj.__esModule ? obj : { default: obj };
  26542. }
  26543. function matchesPattern(pattern, allowPartial) {
  26544. if (!this.isMemberExpression()) return false;
  26545. var parts = pattern.split(".");
  26546. var search = [this.node];
  26547. var i = 0;
  26548. function matches(name) {
  26549. var part = parts[i];
  26550. return part === "*" || name === part;
  26551. }
  26552. while (search.length) {
  26553. var node = search.shift();
  26554. if (allowPartial && i === parts.length) {
  26555. return true;
  26556. }
  26557. if (t.isIdentifier(node)) {
  26558. if (!matches(node.name)) return false;
  26559. } else if (t.isLiteral(node)) {
  26560. if (!matches(node.value)) return false;
  26561. } else if (t.isMemberExpression(node)) {
  26562. if (node.computed && !t.isLiteral(node.property)) {
  26563. return false;
  26564. } else {
  26565. search.unshift(node.property);
  26566. search.unshift(node.object);
  26567. continue;
  26568. }
  26569. } else if (t.isThisExpression(node)) {
  26570. if (!matches("this")) return false;
  26571. } else {
  26572. return false;
  26573. }
  26574. if (++i > parts.length) {
  26575. return false;
  26576. }
  26577. }
  26578. return i === parts.length;
  26579. }
  26580. function has(key) {
  26581. var val = this.node && this.node[key];
  26582. if (val && Array.isArray(val)) {
  26583. return !!val.length;
  26584. } else {
  26585. return !!val;
  26586. }
  26587. }
  26588. function isStatic() {
  26589. return this.scope.isStatic(this.node);
  26590. }
  26591. var is = exports.is = has;
  26592. function isnt(key) {
  26593. return !this.has(key);
  26594. }
  26595. function equals(key, value) {
  26596. return this.node[key] === value;
  26597. }
  26598. function isNodeType(type) {
  26599. return t.isType(this.type, type);
  26600. }
  26601. function canHaveVariableDeclarationOrExpression() {
  26602. return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
  26603. }
  26604. function canSwapBetweenExpressionAndStatement(replacement) {
  26605. if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
  26606. return false;
  26607. }
  26608. if (this.isExpression()) {
  26609. return t.isBlockStatement(replacement);
  26610. } else if (this.isBlockStatement()) {
  26611. return t.isExpression(replacement);
  26612. }
  26613. return false;
  26614. }
  26615. function isCompletionRecord(allowInsideFunction) {
  26616. var path = this;
  26617. var first = true;
  26618. do {
  26619. var container = path.container;
  26620. if (path.isFunction() && !first) {
  26621. return !!allowInsideFunction;
  26622. }
  26623. first = false;
  26624. if (Array.isArray(container) && path.key !== container.length - 1) {
  26625. return false;
  26626. }
  26627. } while ((path = path.parentPath) && !path.isProgram());
  26628. return true;
  26629. }
  26630. function isStatementOrBlock() {
  26631. if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {
  26632. return false;
  26633. } else {
  26634. return (0, _includes2.default)(t.STATEMENT_OR_BLOCK_KEYS, this.key);
  26635. }
  26636. }
  26637. function referencesImport(moduleSource, importName) {
  26638. if (!this.isReferencedIdentifier()) return false;
  26639. var binding = this.scope.getBinding(this.node.name);
  26640. if (!binding || binding.kind !== "module") return false;
  26641. var path = binding.path;
  26642. var parent = path.parentPath;
  26643. if (!parent.isImportDeclaration()) return false;
  26644. if (parent.node.source.value === moduleSource) {
  26645. if (!importName) return true;
  26646. } else {
  26647. return false;
  26648. }
  26649. if (path.isImportDefaultSpecifier() && importName === "default") {
  26650. return true;
  26651. }
  26652. if (path.isImportNamespaceSpecifier() && importName === "*") {
  26653. return true;
  26654. }
  26655. if (path.isImportSpecifier() && path.node.imported.name === importName) {
  26656. return true;
  26657. }
  26658. return false;
  26659. }
  26660. function getSource() {
  26661. var node = this.node;
  26662. if (node.end) {
  26663. return this.hub.file.code.slice(node.start, node.end);
  26664. } else {
  26665. return "";
  26666. }
  26667. }
  26668. function willIMaybeExecuteBefore(target) {
  26669. return this._guessExecutionStatusRelativeTo(target) !== "after";
  26670. }
  26671. function _guessExecutionStatusRelativeTo(target) {
  26672. var targetFuncParent = target.scope.getFunctionParent();
  26673. var selfFuncParent = this.scope.getFunctionParent();
  26674. if (targetFuncParent.node !== selfFuncParent.node) {
  26675. var status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent);
  26676. if (status) {
  26677. return status;
  26678. } else {
  26679. target = targetFuncParent.path;
  26680. }
  26681. }
  26682. var targetPaths = target.getAncestry();
  26683. if (targetPaths.indexOf(this) >= 0) return "after";
  26684. var selfPaths = this.getAncestry();
  26685. var commonPath = void 0;
  26686. var targetIndex = void 0;
  26687. var selfIndex = void 0;
  26688. for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) {
  26689. var selfPath = selfPaths[selfIndex];
  26690. targetIndex = targetPaths.indexOf(selfPath);
  26691. if (targetIndex >= 0) {
  26692. commonPath = selfPath;
  26693. break;
  26694. }
  26695. }
  26696. if (!commonPath) {
  26697. return "before";
  26698. }
  26699. var targetRelationship = targetPaths[targetIndex - 1];
  26700. var selfRelationship = selfPaths[selfIndex - 1];
  26701. if (!targetRelationship || !selfRelationship) {
  26702. return "before";
  26703. }
  26704. if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) {
  26705. return targetRelationship.key > selfRelationship.key ? "before" : "after";
  26706. }
  26707. var targetKeyPosition = t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key);
  26708. var selfKeyPosition = t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key);
  26709. return targetKeyPosition > selfKeyPosition ? "before" : "after";
  26710. }
  26711. function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) {
  26712. var targetFuncPath = targetFuncParent.path;
  26713. if (!targetFuncPath.isFunctionDeclaration()) return;
  26714. var binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name);
  26715. if (!binding.references) return "before";
  26716. var referencePaths = binding.referencePaths;
  26717. for (var _iterator = referencePaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  26718. var _ref;
  26719. if (_isArray) {
  26720. if (_i >= _iterator.length) break;
  26721. _ref = _iterator[_i++];
  26722. } else {
  26723. _i = _iterator.next();
  26724. if (_i.done) break;
  26725. _ref = _i.value;
  26726. }
  26727. var path = _ref;
  26728. if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
  26729. return;
  26730. }
  26731. }
  26732. var allStatus = void 0;
  26733. for (var _iterator2 = referencePaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  26734. var _ref2;
  26735. if (_isArray2) {
  26736. if (_i2 >= _iterator2.length) break;
  26737. _ref2 = _iterator2[_i2++];
  26738. } else {
  26739. _i2 = _iterator2.next();
  26740. if (_i2.done) break;
  26741. _ref2 = _i2.value;
  26742. }
  26743. var _path = _ref2;
  26744. var childOfFunction = !!_path.find(function (path) {
  26745. return path.node === targetFuncPath.node;
  26746. });
  26747. if (childOfFunction) continue;
  26748. var status = this._guessExecutionStatusRelativeTo(_path);
  26749. if (allStatus) {
  26750. if (allStatus !== status) return;
  26751. } else {
  26752. allStatus = status;
  26753. }
  26754. }
  26755. return allStatus;
  26756. }
  26757. function resolve(dangerous, resolved) {
  26758. return this._resolve(dangerous, resolved) || this;
  26759. }
  26760. function _resolve(dangerous, resolved) {
  26761. if (resolved && resolved.indexOf(this) >= 0) return;
  26762. resolved = resolved || [];
  26763. resolved.push(this);
  26764. if (this.isVariableDeclarator()) {
  26765. if (this.get("id").isIdentifier()) {
  26766. return this.get("init").resolve(dangerous, resolved);
  26767. } else {}
  26768. } else if (this.isReferencedIdentifier()) {
  26769. var binding = this.scope.getBinding(this.node.name);
  26770. if (!binding) return;
  26771. if (!binding.constant) return;
  26772. if (binding.kind === "module") return;
  26773. if (binding.path !== this) {
  26774. var ret = binding.path.resolve(dangerous, resolved);
  26775. if (this.find(function (parent) {
  26776. return parent.node === ret.node;
  26777. })) return;
  26778. return ret;
  26779. }
  26780. } else if (this.isTypeCastExpression()) {
  26781. return this.get("expression").resolve(dangerous, resolved);
  26782. } else if (dangerous && this.isMemberExpression()) {
  26783. var targetKey = this.toComputedKey();
  26784. if (!t.isLiteral(targetKey)) return;
  26785. var targetName = targetKey.value;
  26786. var target = this.get("object").resolve(dangerous, resolved);
  26787. if (target.isObjectExpression()) {
  26788. var props = target.get("properties");
  26789. for (var _iterator3 = props, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  26790. var _ref3;
  26791. if (_isArray3) {
  26792. if (_i3 >= _iterator3.length) break;
  26793. _ref3 = _iterator3[_i3++];
  26794. } else {
  26795. _i3 = _iterator3.next();
  26796. if (_i3.done) break;
  26797. _ref3 = _i3.value;
  26798. }
  26799. var prop = _ref3;
  26800. if (!prop.isProperty()) continue;
  26801. var key = prop.get("key");
  26802. var match = prop.isnt("computed") && key.isIdentifier({ name: targetName });
  26803. match = match || key.isLiteral({ value: targetName });
  26804. if (match) return prop.get("value").resolve(dangerous, resolved);
  26805. }
  26806. } else if (target.isArrayExpression() && !isNaN(+targetName)) {
  26807. var elems = target.get("elements");
  26808. var elem = elems[targetName];
  26809. if (elem) return elem.resolve(dangerous, resolved);
  26810. }
  26811. }
  26812. }
  26813. });
  26814. $__System.registerDynamic("17a", ["17", "d0", "c"], true, function ($__require, exports, module) {
  26815. "use strict";
  26816. var process = $__require("c");
  26817. var global = this || self,
  26818. GLOBAL = global;
  26819. exports.__esModule = true;
  26820. var _getIterator2 = $__require("17");
  26821. var _getIterator3 = _interopRequireDefault(_getIterator2);
  26822. exports.call = call;
  26823. exports._call = _call;
  26824. exports.isBlacklisted = isBlacklisted;
  26825. exports.visit = visit;
  26826. exports.skip = skip;
  26827. exports.skipKey = skipKey;
  26828. exports.stop = stop;
  26829. exports.setScope = setScope;
  26830. exports.setContext = setContext;
  26831. exports.resync = resync;
  26832. exports._resyncParent = _resyncParent;
  26833. exports._resyncKey = _resyncKey;
  26834. exports._resyncList = _resyncList;
  26835. exports._resyncRemoved = _resyncRemoved;
  26836. exports.popContext = popContext;
  26837. exports.pushContext = pushContext;
  26838. exports.setup = setup;
  26839. exports.setKey = setKey;
  26840. exports.requeue = requeue;
  26841. exports._getQueueContexts = _getQueueContexts;
  26842. var _index = $__require("d0");
  26843. var _index2 = _interopRequireDefault(_index);
  26844. function _interopRequireDefault(obj) {
  26845. return obj && obj.__esModule ? obj : { default: obj };
  26846. }
  26847. function call(key) {
  26848. var opts = this.opts;
  26849. this.debug(function () {
  26850. return key;
  26851. });
  26852. if (this.node) {
  26853. if (this._call(opts[key])) return true;
  26854. }
  26855. if (this.node) {
  26856. return this._call(opts[this.node.type] && opts[this.node.type][key]);
  26857. }
  26858. return false;
  26859. }
  26860. function _call(fns) {
  26861. if (!fns) return false;
  26862. for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  26863. var _ref;
  26864. if (_isArray) {
  26865. if (_i >= _iterator.length) break;
  26866. _ref = _iterator[_i++];
  26867. } else {
  26868. _i = _iterator.next();
  26869. if (_i.done) break;
  26870. _ref = _i.value;
  26871. }
  26872. var fn = _ref;
  26873. if (!fn) continue;
  26874. var node = this.node;
  26875. if (!node) return true;
  26876. var ret = fn.call(this.state, this, this.state);
  26877. if (ret) throw new Error("Unexpected return value from visitor method " + fn);
  26878. if (this.node !== node) return true;
  26879. if (this.shouldStop || this.shouldSkip || this.removed) return true;
  26880. }
  26881. return false;
  26882. }
  26883. function isBlacklisted() {
  26884. var blacklist = this.opts.blacklist;
  26885. return blacklist && blacklist.indexOf(this.node.type) > -1;
  26886. }
  26887. function visit() {
  26888. if (!this.node) {
  26889. return false;
  26890. }
  26891. if (this.isBlacklisted()) {
  26892. return false;
  26893. }
  26894. if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
  26895. return false;
  26896. }
  26897. if (this.call("enter") || this.shouldSkip) {
  26898. this.debug(function () {
  26899. return "Skip...";
  26900. });
  26901. return this.shouldStop;
  26902. }
  26903. this.debug(function () {
  26904. return "Recursing into...";
  26905. });
  26906. _index2.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
  26907. this.call("exit");
  26908. return this.shouldStop;
  26909. }
  26910. function skip() {
  26911. this.shouldSkip = true;
  26912. }
  26913. function skipKey(key) {
  26914. this.skipKeys[key] = true;
  26915. }
  26916. function stop() {
  26917. this.shouldStop = true;
  26918. this.shouldSkip = true;
  26919. }
  26920. function setScope() {
  26921. if (this.opts && this.opts.noScope) return;
  26922. var target = this.context && this.context.scope;
  26923. if (!target) {
  26924. var path = this.parentPath;
  26925. while (path && !target) {
  26926. if (path.opts && path.opts.noScope) return;
  26927. target = path.scope;
  26928. path = path.parentPath;
  26929. }
  26930. }
  26931. this.scope = this.getScope(target);
  26932. if (this.scope) this.scope.init();
  26933. }
  26934. function setContext(context) {
  26935. this.shouldSkip = false;
  26936. this.shouldStop = false;
  26937. this.removed = false;
  26938. this.skipKeys = {};
  26939. if (context) {
  26940. this.context = context;
  26941. this.state = context.state;
  26942. this.opts = context.opts;
  26943. }
  26944. this.setScope();
  26945. return this;
  26946. }
  26947. function resync() {
  26948. if (this.removed) return;
  26949. this._resyncParent();
  26950. this._resyncList();
  26951. this._resyncKey();
  26952. }
  26953. function _resyncParent() {
  26954. if (this.parentPath) {
  26955. this.parent = this.parentPath.node;
  26956. }
  26957. }
  26958. function _resyncKey() {
  26959. if (!this.container) return;
  26960. if (this.node === this.container[this.key]) return;
  26961. if (Array.isArray(this.container)) {
  26962. for (var i = 0; i < this.container.length; i++) {
  26963. if (this.container[i] === this.node) {
  26964. return this.setKey(i);
  26965. }
  26966. }
  26967. } else {
  26968. for (var key in this.container) {
  26969. if (this.container[key] === this.node) {
  26970. return this.setKey(key);
  26971. }
  26972. }
  26973. }
  26974. this.key = null;
  26975. }
  26976. function _resyncList() {
  26977. if (!this.parent || !this.inList) return;
  26978. var newContainer = this.parent[this.listKey];
  26979. if (this.container === newContainer) return;
  26980. this.container = newContainer || null;
  26981. }
  26982. function _resyncRemoved() {
  26983. if (this.key == null || !this.container || this.container[this.key] !== this.node) {
  26984. this._markRemoved();
  26985. }
  26986. }
  26987. function popContext() {
  26988. this.contexts.pop();
  26989. this.setContext(this.contexts[this.contexts.length - 1]);
  26990. }
  26991. function pushContext(context) {
  26992. this.contexts.push(context);
  26993. this.setContext(context);
  26994. }
  26995. function setup(parentPath, container, listKey, key) {
  26996. this.inList = !!listKey;
  26997. this.listKey = listKey;
  26998. this.parentKey = listKey || key;
  26999. this.container = container;
  27000. this.parentPath = parentPath || this.parentPath;
  27001. this.setKey(key);
  27002. }
  27003. function setKey(key) {
  27004. this.key = key;
  27005. this.node = this.container[this.key];
  27006. this.type = this.node && this.node.type;
  27007. }
  27008. function requeue() {
  27009. var pathToQueue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this;
  27010. if (pathToQueue.removed) return;
  27011. var contexts = this.contexts;
  27012. for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  27013. var _ref2;
  27014. if (_isArray2) {
  27015. if (_i2 >= _iterator2.length) break;
  27016. _ref2 = _iterator2[_i2++];
  27017. } else {
  27018. _i2 = _iterator2.next();
  27019. if (_i2.done) break;
  27020. _ref2 = _i2.value;
  27021. }
  27022. var context = _ref2;
  27023. context.maybeQueue(pathToQueue);
  27024. }
  27025. }
  27026. function _getQueueContexts() {
  27027. var path = this;
  27028. var contexts = this.contexts;
  27029. while (!contexts.length) {
  27030. path = path.parentPath;
  27031. contexts = path.contexts;
  27032. }
  27033. return contexts;
  27034. }
  27035. });
  27036. $__System.registerDynamic("17b", ["c"], true, function ($__require, exports, module) {
  27037. "use strict";
  27038. var process = $__require("c");
  27039. var global = this || self,
  27040. GLOBAL = global;
  27041. exports.__esModule = true;
  27042. var hooks = exports.hooks = [function (self, parent) {
  27043. var removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement();
  27044. if (removeParent) {
  27045. parent.remove();
  27046. return true;
  27047. }
  27048. }, function (self, parent) {
  27049. if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
  27050. parent.replaceWith(parent.node.expressions[0]);
  27051. return true;
  27052. }
  27053. }, function (self, parent) {
  27054. if (parent.isBinary()) {
  27055. if (self.key === "left") {
  27056. parent.replaceWith(parent.node.right);
  27057. } else {
  27058. parent.replaceWith(parent.node.left);
  27059. }
  27060. return true;
  27061. }
  27062. }, function (self, parent) {
  27063. if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
  27064. self.replaceWith({
  27065. type: "BlockStatement",
  27066. body: []
  27067. });
  27068. return true;
  27069. }
  27070. }];
  27071. });
  27072. $__System.registerDynamic("17c", ["17", "17b", "c"], true, function ($__require, exports, module) {
  27073. "use strict";
  27074. var process = $__require("c");
  27075. var global = this || self,
  27076. GLOBAL = global;
  27077. exports.__esModule = true;
  27078. var _getIterator2 = $__require("17");
  27079. var _getIterator3 = _interopRequireDefault(_getIterator2);
  27080. exports.remove = remove;
  27081. exports._callRemovalHooks = _callRemovalHooks;
  27082. exports._remove = _remove;
  27083. exports._markRemoved = _markRemoved;
  27084. exports._assertUnremoved = _assertUnremoved;
  27085. var _removalHooks = $__require("17b");
  27086. function _interopRequireDefault(obj) {
  27087. return obj && obj.__esModule ? obj : { default: obj };
  27088. }
  27089. function remove() {
  27090. this._assertUnremoved();
  27091. this.resync();
  27092. if (this._callRemovalHooks()) {
  27093. this._markRemoved();
  27094. return;
  27095. }
  27096. this.shareCommentsWithSiblings();
  27097. this._remove();
  27098. this._markRemoved();
  27099. }
  27100. function _callRemovalHooks() {
  27101. for (var _iterator = _removalHooks.hooks, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  27102. var _ref;
  27103. if (_isArray) {
  27104. if (_i >= _iterator.length) break;
  27105. _ref = _iterator[_i++];
  27106. } else {
  27107. _i = _iterator.next();
  27108. if (_i.done) break;
  27109. _ref = _i.value;
  27110. }
  27111. var fn = _ref;
  27112. if (fn(this, this.parentPath)) return true;
  27113. }
  27114. }
  27115. function _remove() {
  27116. if (Array.isArray(this.container)) {
  27117. this.container.splice(this.key, 1);
  27118. this.updateSiblingKeys(this.key, -1);
  27119. } else {
  27120. this._replaceWith(null);
  27121. }
  27122. }
  27123. function _markRemoved() {
  27124. this.shouldSkip = true;
  27125. this.removed = true;
  27126. this.node = null;
  27127. }
  27128. function _assertUnremoved() {
  27129. if (this.removed) {
  27130. throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
  27131. }
  27132. }
  27133. });
  27134. $__System.registerDynamic("1d", [], true, function ($__require, exports, module) {
  27135. "use strict";
  27136. var global = this || self,
  27137. GLOBAL = global;
  27138. exports.__esModule = true;
  27139. exports.default = function (instance, Constructor) {
  27140. if (!(instance instanceof Constructor)) {
  27141. throw new TypeError("Cannot call a class as a function");
  27142. }
  27143. };
  27144. });
  27145. $__System.registerDynamic("17d", ["17", "1d", "11", "c"], true, function ($__require, exports, module) {
  27146. "use strict";
  27147. var process = $__require("c");
  27148. var global = this || self,
  27149. GLOBAL = global;
  27150. exports.__esModule = true;
  27151. var _getIterator2 = $__require("17");
  27152. var _getIterator3 = _interopRequireDefault(_getIterator2);
  27153. var _classCallCheck2 = $__require("1d");
  27154. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  27155. var _babelTypes = $__require("11");
  27156. var t = _interopRequireWildcard(_babelTypes);
  27157. function _interopRequireWildcard(obj) {
  27158. if (obj && obj.__esModule) {
  27159. return obj;
  27160. } else {
  27161. var newObj = {};if (obj != null) {
  27162. for (var key in obj) {
  27163. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  27164. }
  27165. }newObj.default = obj;return newObj;
  27166. }
  27167. }
  27168. function _interopRequireDefault(obj) {
  27169. return obj && obj.__esModule ? obj : { default: obj };
  27170. }
  27171. var referenceVisitor = {
  27172. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  27173. if (path.isJSXIdentifier() && _babelTypes.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
  27174. return;
  27175. }
  27176. if (path.node.name === "this") {
  27177. var scope = path.scope;
  27178. do {
  27179. if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) break;
  27180. } while (scope = scope.parent);
  27181. if (scope) state.breakOnScopePaths.push(scope.path);
  27182. }
  27183. var binding = path.scope.getBinding(path.node.name);
  27184. if (!binding) return;
  27185. if (binding !== state.scope.getBinding(path.node.name)) return;
  27186. state.bindings[path.node.name] = binding;
  27187. }
  27188. };
  27189. var PathHoister = function () {
  27190. function PathHoister(path, scope) {
  27191. (0, _classCallCheck3.default)(this, PathHoister);
  27192. this.breakOnScopePaths = [];
  27193. this.bindings = {};
  27194. this.scopes = [];
  27195. this.scope = scope;
  27196. this.path = path;
  27197. this.attachAfter = false;
  27198. }
  27199. PathHoister.prototype.isCompatibleScope = function isCompatibleScope(scope) {
  27200. for (var key in this.bindings) {
  27201. var binding = this.bindings[key];
  27202. if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
  27203. return false;
  27204. }
  27205. }
  27206. return true;
  27207. };
  27208. PathHoister.prototype.getCompatibleScopes = function getCompatibleScopes() {
  27209. var scope = this.path.scope;
  27210. do {
  27211. if (this.isCompatibleScope(scope)) {
  27212. this.scopes.push(scope);
  27213. } else {
  27214. break;
  27215. }
  27216. if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
  27217. break;
  27218. }
  27219. } while (scope = scope.parent);
  27220. };
  27221. PathHoister.prototype.getAttachmentPath = function getAttachmentPath() {
  27222. var path = this._getAttachmentPath();
  27223. if (!path) return;
  27224. var targetScope = path.scope;
  27225. if (targetScope.path === path) {
  27226. targetScope = path.scope.parent;
  27227. }
  27228. if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
  27229. for (var name in this.bindings) {
  27230. if (!targetScope.hasOwnBinding(name)) continue;
  27231. var binding = this.bindings[name];
  27232. if (binding.kind === "param") continue;
  27233. if (this.getAttachmentParentForPath(binding.path).key > path.key) {
  27234. this.attachAfter = true;
  27235. path = binding.path;
  27236. for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  27237. var _ref;
  27238. if (_isArray) {
  27239. if (_i >= _iterator.length) break;
  27240. _ref = _iterator[_i++];
  27241. } else {
  27242. _i = _iterator.next();
  27243. if (_i.done) break;
  27244. _ref = _i.value;
  27245. }
  27246. var violationPath = _ref;
  27247. if (this.getAttachmentParentForPath(violationPath).key > path.key) {
  27248. path = violationPath;
  27249. }
  27250. }
  27251. }
  27252. }
  27253. }
  27254. if (path.parentPath.isExportDeclaration()) {
  27255. path = path.parentPath;
  27256. }
  27257. return path;
  27258. };
  27259. PathHoister.prototype._getAttachmentPath = function _getAttachmentPath() {
  27260. var scopes = this.scopes;
  27261. var scope = scopes.pop();
  27262. if (!scope) return;
  27263. if (scope.path.isFunction()) {
  27264. if (this.hasOwnParamBindings(scope)) {
  27265. if (this.scope === scope) return;
  27266. return scope.path.get("body").get("body")[0];
  27267. } else {
  27268. return this.getNextScopeAttachmentParent();
  27269. }
  27270. } else if (scope.path.isProgram()) {
  27271. return this.getNextScopeAttachmentParent();
  27272. }
  27273. };
  27274. PathHoister.prototype.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() {
  27275. var scope = this.scopes.pop();
  27276. if (scope) return this.getAttachmentParentForPath(scope.path);
  27277. };
  27278. PathHoister.prototype.getAttachmentParentForPath = function getAttachmentParentForPath(path) {
  27279. do {
  27280. if (!path.parentPath || Array.isArray(path.container) && path.isStatement() || path.isVariableDeclarator() && path.parentPath.node !== null && path.parentPath.node.declarations.length > 1) return path;
  27281. } while (path = path.parentPath);
  27282. };
  27283. PathHoister.prototype.hasOwnParamBindings = function hasOwnParamBindings(scope) {
  27284. for (var name in this.bindings) {
  27285. if (!scope.hasOwnBinding(name)) continue;
  27286. var binding = this.bindings[name];
  27287. if (binding.kind === "param" && binding.constant) return true;
  27288. }
  27289. return false;
  27290. };
  27291. PathHoister.prototype.run = function run() {
  27292. var node = this.path.node;
  27293. if (node._hoisted) return;
  27294. node._hoisted = true;
  27295. this.path.traverse(referenceVisitor, this);
  27296. this.getCompatibleScopes();
  27297. var attachTo = this.getAttachmentPath();
  27298. if (!attachTo) return;
  27299. if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
  27300. var uid = attachTo.scope.generateUidIdentifier("ref");
  27301. var declarator = t.variableDeclarator(uid, this.path.node);
  27302. var insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
  27303. attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t.variableDeclaration("var", [declarator])]);
  27304. var parent = this.path.parentPath;
  27305. if (parent.isJSXElement() && this.path.container === parent.node.children) {
  27306. uid = t.JSXExpressionContainer(uid);
  27307. }
  27308. this.path.replaceWith(uid);
  27309. };
  27310. return PathHoister;
  27311. }();
  27312. exports.default = PathHoister;
  27313. module.exports = exports["default"];
  27314. });
  27315. $__System.registerDynamic("17e", ["30", "17", "153", "17d", "155", "11", "c"], true, function ($__require, exports, module) {
  27316. "use strict";
  27317. var process = $__require("c");
  27318. var global = this || self,
  27319. GLOBAL = global;
  27320. exports.__esModule = true;
  27321. var _typeof2 = $__require("30");
  27322. var _typeof3 = _interopRequireDefault(_typeof2);
  27323. var _getIterator2 = $__require("17");
  27324. var _getIterator3 = _interopRequireDefault(_getIterator2);
  27325. exports.insertBefore = insertBefore;
  27326. exports._containerInsert = _containerInsert;
  27327. exports._containerInsertBefore = _containerInsertBefore;
  27328. exports._containerInsertAfter = _containerInsertAfter;
  27329. exports._maybePopFromStatements = _maybePopFromStatements;
  27330. exports.insertAfter = insertAfter;
  27331. exports.updateSiblingKeys = updateSiblingKeys;
  27332. exports._verifyNodeList = _verifyNodeList;
  27333. exports.unshiftContainer = unshiftContainer;
  27334. exports.pushContainer = pushContainer;
  27335. exports.hoist = hoist;
  27336. var _cache = $__require("153");
  27337. var _hoister = $__require("17d");
  27338. var _hoister2 = _interopRequireDefault(_hoister);
  27339. var _index = $__require("155");
  27340. var _index2 = _interopRequireDefault(_index);
  27341. var _babelTypes = $__require("11");
  27342. var t = _interopRequireWildcard(_babelTypes);
  27343. function _interopRequireWildcard(obj) {
  27344. if (obj && obj.__esModule) {
  27345. return obj;
  27346. } else {
  27347. var newObj = {};if (obj != null) {
  27348. for (var key in obj) {
  27349. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  27350. }
  27351. }newObj.default = obj;return newObj;
  27352. }
  27353. }
  27354. function _interopRequireDefault(obj) {
  27355. return obj && obj.__esModule ? obj : { default: obj };
  27356. }
  27357. function insertBefore(nodes) {
  27358. this._assertUnremoved();
  27359. nodes = this._verifyNodeList(nodes);
  27360. if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) {
  27361. return this.parentPath.insertBefore(nodes);
  27362. } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") {
  27363. if (this.node) nodes.push(this.node);
  27364. this.replaceExpressionWithStatements(nodes);
  27365. } else {
  27366. this._maybePopFromStatements(nodes);
  27367. if (Array.isArray(this.container)) {
  27368. return this._containerInsertBefore(nodes);
  27369. } else if (this.isStatementOrBlock()) {
  27370. if (this.node) nodes.push(this.node);
  27371. this._replaceWith(t.blockStatement(nodes));
  27372. } else {
  27373. 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?");
  27374. }
  27375. }
  27376. return [this];
  27377. }
  27378. function _containerInsert(from, nodes) {
  27379. this.updateSiblingKeys(from, nodes.length);
  27380. var paths = [];
  27381. for (var i = 0; i < nodes.length; i++) {
  27382. var to = from + i;
  27383. var node = nodes[i];
  27384. this.container.splice(to, 0, node);
  27385. if (this.context) {
  27386. var path = this.context.create(this.parent, this.container, to, this.listKey);
  27387. if (this.context.queue) path.pushContext(this.context);
  27388. paths.push(path);
  27389. } else {
  27390. paths.push(_index2.default.get({
  27391. parentPath: this.parentPath,
  27392. parent: this.parent,
  27393. container: this.container,
  27394. listKey: this.listKey,
  27395. key: to
  27396. }));
  27397. }
  27398. }
  27399. var contexts = this._getQueueContexts();
  27400. for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  27401. var _ref;
  27402. if (_isArray) {
  27403. if (_i >= _iterator.length) break;
  27404. _ref = _iterator[_i++];
  27405. } else {
  27406. _i = _iterator.next();
  27407. if (_i.done) break;
  27408. _ref = _i.value;
  27409. }
  27410. var _path = _ref;
  27411. _path.setScope();
  27412. _path.debug(function () {
  27413. return "Inserted.";
  27414. });
  27415. for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  27416. var _ref2;
  27417. if (_isArray2) {
  27418. if (_i2 >= _iterator2.length) break;
  27419. _ref2 = _iterator2[_i2++];
  27420. } else {
  27421. _i2 = _iterator2.next();
  27422. if (_i2.done) break;
  27423. _ref2 = _i2.value;
  27424. }
  27425. var context = _ref2;
  27426. context.maybeQueue(_path, true);
  27427. }
  27428. }
  27429. return paths;
  27430. }
  27431. function _containerInsertBefore(nodes) {
  27432. return this._containerInsert(this.key, nodes);
  27433. }
  27434. function _containerInsertAfter(nodes) {
  27435. return this._containerInsert(this.key + 1, nodes);
  27436. }
  27437. function _maybePopFromStatements(nodes) {
  27438. var last = nodes[nodes.length - 1];
  27439. var isIdentifier = t.isIdentifier(last) || t.isExpressionStatement(last) && t.isIdentifier(last.expression);
  27440. if (isIdentifier && !this.isCompletionRecord()) {
  27441. nodes.pop();
  27442. }
  27443. }
  27444. function insertAfter(nodes) {
  27445. this._assertUnremoved();
  27446. nodes = this._verifyNodeList(nodes);
  27447. if (this.parentPath.isExpressionStatement() || this.parentPath.isLabeledStatement()) {
  27448. return this.parentPath.insertAfter(nodes);
  27449. } else if (this.isNodeType("Expression") || this.parentPath.isForStatement() && this.key === "init") {
  27450. if (this.node) {
  27451. var temp = this.scope.generateDeclaredUidIdentifier();
  27452. nodes.unshift(t.expressionStatement(t.assignmentExpression("=", temp, this.node)));
  27453. nodes.push(t.expressionStatement(temp));
  27454. }
  27455. this.replaceExpressionWithStatements(nodes);
  27456. } else {
  27457. this._maybePopFromStatements(nodes);
  27458. if (Array.isArray(this.container)) {
  27459. return this._containerInsertAfter(nodes);
  27460. } else if (this.isStatementOrBlock()) {
  27461. if (this.node) nodes.unshift(this.node);
  27462. this._replaceWith(t.blockStatement(nodes));
  27463. } else {
  27464. 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?");
  27465. }
  27466. }
  27467. return [this];
  27468. }
  27469. function updateSiblingKeys(fromIndex, incrementBy) {
  27470. if (!this.parent) return;
  27471. var paths = _cache.path.get(this.parent);
  27472. for (var i = 0; i < paths.length; i++) {
  27473. var path = paths[i];
  27474. if (path.key >= fromIndex) {
  27475. path.key += incrementBy;
  27476. }
  27477. }
  27478. }
  27479. function _verifyNodeList(nodes) {
  27480. if (!nodes) {
  27481. return [];
  27482. }
  27483. if (nodes.constructor !== Array) {
  27484. nodes = [nodes];
  27485. }
  27486. for (var i = 0; i < nodes.length; i++) {
  27487. var node = nodes[i];
  27488. var msg = void 0;
  27489. if (!node) {
  27490. msg = "has falsy node";
  27491. } else if ((typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node)) !== "object") {
  27492. msg = "contains a non-object node";
  27493. } else if (!node.type) {
  27494. msg = "without a type";
  27495. } else if (node instanceof _index2.default) {
  27496. msg = "has a NodePath when it expected a raw object";
  27497. }
  27498. if (msg) {
  27499. var type = Array.isArray(node) ? "array" : typeof node === "undefined" ? "undefined" : (0, _typeof3.default)(node);
  27500. throw new Error("Node list " + msg + " with the index of " + i + " and type of " + type);
  27501. }
  27502. }
  27503. return nodes;
  27504. }
  27505. function unshiftContainer(listKey, nodes) {
  27506. this._assertUnremoved();
  27507. nodes = this._verifyNodeList(nodes);
  27508. var path = _index2.default.get({
  27509. parentPath: this,
  27510. parent: this.node,
  27511. container: this.node[listKey],
  27512. listKey: listKey,
  27513. key: 0
  27514. });
  27515. return path.insertBefore(nodes);
  27516. }
  27517. function pushContainer(listKey, nodes) {
  27518. this._assertUnremoved();
  27519. nodes = this._verifyNodeList(nodes);
  27520. var container = this.node[listKey];
  27521. var path = _index2.default.get({
  27522. parentPath: this,
  27523. parent: this.node,
  27524. container: container,
  27525. listKey: listKey,
  27526. key: container.length
  27527. });
  27528. return path.replaceWithMultiple(nodes);
  27529. }
  27530. function hoist() {
  27531. var scope = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.scope;
  27532. var hoister = new _hoister2.default(this, scope);
  27533. return hoister.run();
  27534. }
  27535. });
  27536. $__System.registerDynamic("17f", ["d4", "17", "155", "11", "c"], true, function ($__require, exports, module) {
  27537. "use strict";
  27538. var process = $__require("c");
  27539. var global = this || self,
  27540. GLOBAL = global;
  27541. exports.__esModule = true;
  27542. var _create = $__require("d4");
  27543. var _create2 = _interopRequireDefault(_create);
  27544. var _getIterator2 = $__require("17");
  27545. var _getIterator3 = _interopRequireDefault(_getIterator2);
  27546. exports.getStatementParent = getStatementParent;
  27547. exports.getOpposite = getOpposite;
  27548. exports.getCompletionRecords = getCompletionRecords;
  27549. exports.getSibling = getSibling;
  27550. exports.getPrevSibling = getPrevSibling;
  27551. exports.getNextSibling = getNextSibling;
  27552. exports.getAllNextSiblings = getAllNextSiblings;
  27553. exports.getAllPrevSiblings = getAllPrevSiblings;
  27554. exports.get = get;
  27555. exports._getKey = _getKey;
  27556. exports._getPattern = _getPattern;
  27557. exports.getBindingIdentifiers = getBindingIdentifiers;
  27558. exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
  27559. exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
  27560. exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
  27561. var _index = $__require("155");
  27562. var _index2 = _interopRequireDefault(_index);
  27563. var _babelTypes = $__require("11");
  27564. var t = _interopRequireWildcard(_babelTypes);
  27565. function _interopRequireWildcard(obj) {
  27566. if (obj && obj.__esModule) {
  27567. return obj;
  27568. } else {
  27569. var newObj = {};if (obj != null) {
  27570. for (var key in obj) {
  27571. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  27572. }
  27573. }newObj.default = obj;return newObj;
  27574. }
  27575. }
  27576. function _interopRequireDefault(obj) {
  27577. return obj && obj.__esModule ? obj : { default: obj };
  27578. }
  27579. function getStatementParent() {
  27580. var path = this;
  27581. do {
  27582. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  27583. break;
  27584. } else {
  27585. path = path.parentPath;
  27586. }
  27587. } while (path);
  27588. if (path && (path.isProgram() || path.isFile())) {
  27589. throw new Error("File/Program node, we can't possibly find a statement parent to this");
  27590. }
  27591. return path;
  27592. }
  27593. function getOpposite() {
  27594. if (this.key === "left") {
  27595. return this.getSibling("right");
  27596. } else if (this.key === "right") {
  27597. return this.getSibling("left");
  27598. }
  27599. }
  27600. function getCompletionRecords() {
  27601. var paths = [];
  27602. var add = function add(path) {
  27603. if (path) paths = paths.concat(path.getCompletionRecords());
  27604. };
  27605. if (this.isIfStatement()) {
  27606. add(this.get("consequent"));
  27607. add(this.get("alternate"));
  27608. } else if (this.isDoExpression() || this.isFor() || this.isWhile()) {
  27609. add(this.get("body"));
  27610. } else if (this.isProgram() || this.isBlockStatement()) {
  27611. add(this.get("body").pop());
  27612. } else if (this.isFunction()) {
  27613. return this.get("body").getCompletionRecords();
  27614. } else if (this.isTryStatement()) {
  27615. add(this.get("block"));
  27616. add(this.get("handler"));
  27617. add(this.get("finalizer"));
  27618. } else {
  27619. paths.push(this);
  27620. }
  27621. return paths;
  27622. }
  27623. function getSibling(key) {
  27624. return _index2.default.get({
  27625. parentPath: this.parentPath,
  27626. parent: this.parent,
  27627. container: this.container,
  27628. listKey: this.listKey,
  27629. key: key
  27630. });
  27631. }
  27632. function getPrevSibling() {
  27633. return this.getSibling(this.key - 1);
  27634. }
  27635. function getNextSibling() {
  27636. return this.getSibling(this.key + 1);
  27637. }
  27638. function getAllNextSiblings() {
  27639. var _key = this.key;
  27640. var sibling = this.getSibling(++_key);
  27641. var siblings = [];
  27642. while (sibling.node) {
  27643. siblings.push(sibling);
  27644. sibling = this.getSibling(++_key);
  27645. }
  27646. return siblings;
  27647. }
  27648. function getAllPrevSiblings() {
  27649. var _key = this.key;
  27650. var sibling = this.getSibling(--_key);
  27651. var siblings = [];
  27652. while (sibling.node) {
  27653. siblings.push(sibling);
  27654. sibling = this.getSibling(--_key);
  27655. }
  27656. return siblings;
  27657. }
  27658. function get(key, context) {
  27659. if (context === true) context = this.context;
  27660. var parts = key.split(".");
  27661. if (parts.length === 1) {
  27662. return this._getKey(key, context);
  27663. } else {
  27664. return this._getPattern(parts, context);
  27665. }
  27666. }
  27667. function _getKey(key, context) {
  27668. var _this = this;
  27669. var node = this.node;
  27670. var container = node[key];
  27671. if (Array.isArray(container)) {
  27672. return container.map(function (_, i) {
  27673. return _index2.default.get({
  27674. listKey: key,
  27675. parentPath: _this,
  27676. parent: node,
  27677. container: container,
  27678. key: i
  27679. }).setContext(context);
  27680. });
  27681. } else {
  27682. return _index2.default.get({
  27683. parentPath: this,
  27684. parent: node,
  27685. container: node,
  27686. key: key
  27687. }).setContext(context);
  27688. }
  27689. }
  27690. function _getPattern(parts, context) {
  27691. var path = this;
  27692. for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  27693. var _ref;
  27694. if (_isArray) {
  27695. if (_i >= _iterator.length) break;
  27696. _ref = _iterator[_i++];
  27697. } else {
  27698. _i = _iterator.next();
  27699. if (_i.done) break;
  27700. _ref = _i.value;
  27701. }
  27702. var part = _ref;
  27703. if (part === ".") {
  27704. path = path.parentPath;
  27705. } else {
  27706. if (Array.isArray(path)) {
  27707. path = path[part];
  27708. } else {
  27709. path = path.get(part, context);
  27710. }
  27711. }
  27712. }
  27713. return path;
  27714. }
  27715. function getBindingIdentifiers(duplicates) {
  27716. return t.getBindingIdentifiers(this.node, duplicates);
  27717. }
  27718. function getOuterBindingIdentifiers(duplicates) {
  27719. return t.getOuterBindingIdentifiers(this.node, duplicates);
  27720. }
  27721. function getBindingIdentifierPaths() {
  27722. var duplicates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  27723. var outerOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  27724. var path = this;
  27725. var search = [].concat(path);
  27726. var ids = (0, _create2.default)(null);
  27727. while (search.length) {
  27728. var id = search.shift();
  27729. if (!id) continue;
  27730. if (!id.node) continue;
  27731. var keys = t.getBindingIdentifiers.keys[id.node.type];
  27732. if (id.isIdentifier()) {
  27733. if (duplicates) {
  27734. var _ids = ids[id.node.name] = ids[id.node.name] || [];
  27735. _ids.push(id);
  27736. } else {
  27737. ids[id.node.name] = id;
  27738. }
  27739. continue;
  27740. }
  27741. if (id.isExportDeclaration()) {
  27742. var declaration = id.get("declaration");
  27743. if (declaration.isDeclaration()) {
  27744. search.push(declaration);
  27745. }
  27746. continue;
  27747. }
  27748. if (outerOnly) {
  27749. if (id.isFunctionDeclaration()) {
  27750. search.push(id.get("id"));
  27751. continue;
  27752. }
  27753. if (id.isFunctionExpression()) {
  27754. continue;
  27755. }
  27756. }
  27757. if (keys) {
  27758. for (var i = 0; i < keys.length; i++) {
  27759. var key = keys[i];
  27760. var child = id.get(key);
  27761. if (Array.isArray(child) || child.node) {
  27762. search = search.concat(child);
  27763. }
  27764. }
  27765. }
  27766. }
  27767. return ids;
  27768. }
  27769. function getOuterBindingIdentifierPaths(duplicates) {
  27770. return this.getBindingIdentifierPaths(duplicates, true);
  27771. }
  27772. });
  27773. $__System.registerDynamic("180", ["c"], true, function ($__require, exports, module) {
  27774. "use strict";
  27775. var process = $__require("c");
  27776. var global = this || self,
  27777. GLOBAL = global;
  27778. exports.__esModule = true;
  27779. exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
  27780. exports.addComment = addComment;
  27781. exports.addComments = addComments;
  27782. function shareCommentsWithSiblings() {
  27783. if (typeof this.key === "string") return;
  27784. var node = this.node;
  27785. if (!node) return;
  27786. var trailing = node.trailingComments;
  27787. var leading = node.leadingComments;
  27788. if (!trailing && !leading) return;
  27789. var prev = this.getSibling(this.key - 1);
  27790. var next = this.getSibling(this.key + 1);
  27791. if (!prev.node) prev = next;
  27792. if (!next.node) next = prev;
  27793. prev.addComments("trailing", leading);
  27794. next.addComments("leading", trailing);
  27795. }
  27796. function addComment(type, content, line) {
  27797. this.addComments(type, [{
  27798. type: line ? "CommentLine" : "CommentBlock",
  27799. value: content
  27800. }]);
  27801. }
  27802. function addComments(type, comments) {
  27803. if (!comments) return;
  27804. var node = this.node;
  27805. if (!node) return;
  27806. var key = type + "Comments";
  27807. if (node[key]) {
  27808. node[key] = node[key].concat(comments);
  27809. } else {
  27810. node[key] = comments;
  27811. }
  27812. }
  27813. });
  27814. $__System.registerDynamic("155", ["17", "1d", "181", "5e", "141", "d0", "d1", "152", "11", "153", "154", "158", "161", "177", "178", "179", "17a", "17c", "17e", "17f", "180", "c"], true, function ($__require, exports, module) {
  27815. "use strict";
  27816. var process = $__require("c");
  27817. var global = this || self,
  27818. GLOBAL = global;
  27819. exports.__esModule = true;
  27820. var _getIterator2 = $__require("17");
  27821. var _getIterator3 = _interopRequireDefault(_getIterator2);
  27822. var _classCallCheck2 = $__require("1d");
  27823. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  27824. var _virtualTypes = $__require("181");
  27825. var virtualTypes = _interopRequireWildcard(_virtualTypes);
  27826. var _debug2 = $__require("5e");
  27827. var _debug3 = _interopRequireDefault(_debug2);
  27828. var _invariant = $__require("141");
  27829. var _invariant2 = _interopRequireDefault(_invariant);
  27830. var _index = $__require("d0");
  27831. var _index2 = _interopRequireDefault(_index);
  27832. var _assign = $__require("d1");
  27833. var _assign2 = _interopRequireDefault(_assign);
  27834. var _scope = $__require("152");
  27835. var _scope2 = _interopRequireDefault(_scope);
  27836. var _babelTypes = $__require("11");
  27837. var t = _interopRequireWildcard(_babelTypes);
  27838. var _cache = $__require("153");
  27839. function _interopRequireWildcard(obj) {
  27840. if (obj && obj.__esModule) {
  27841. return obj;
  27842. } else {
  27843. var newObj = {};if (obj != null) {
  27844. for (var key in obj) {
  27845. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  27846. }
  27847. }newObj.default = obj;return newObj;
  27848. }
  27849. }
  27850. function _interopRequireDefault(obj) {
  27851. return obj && obj.__esModule ? obj : { default: obj };
  27852. }
  27853. var _debug = (0, _debug3.default)("babel");
  27854. var NodePath = function () {
  27855. function NodePath(hub, parent) {
  27856. (0, _classCallCheck3.default)(this, NodePath);
  27857. this.parent = parent;
  27858. this.hub = hub;
  27859. this.contexts = [];
  27860. this.data = {};
  27861. this.shouldSkip = false;
  27862. this.shouldStop = false;
  27863. this.removed = false;
  27864. this.state = null;
  27865. this.opts = null;
  27866. this.skipKeys = null;
  27867. this.parentPath = null;
  27868. this.context = null;
  27869. this.container = null;
  27870. this.listKey = null;
  27871. this.inList = false;
  27872. this.parentKey = null;
  27873. this.key = null;
  27874. this.node = null;
  27875. this.scope = null;
  27876. this.type = null;
  27877. this.typeAnnotation = null;
  27878. }
  27879. NodePath.get = function get(_ref) {
  27880. var hub = _ref.hub,
  27881. parentPath = _ref.parentPath,
  27882. parent = _ref.parent,
  27883. container = _ref.container,
  27884. listKey = _ref.listKey,
  27885. key = _ref.key;
  27886. if (!hub && parentPath) {
  27887. hub = parentPath.hub;
  27888. }
  27889. (0, _invariant2.default)(parent, "To get a node path the parent needs to exist");
  27890. var targetNode = container[key];
  27891. var paths = _cache.path.get(parent) || [];
  27892. if (!_cache.path.has(parent)) {
  27893. _cache.path.set(parent, paths);
  27894. }
  27895. var path = void 0;
  27896. for (var i = 0; i < paths.length; i++) {
  27897. var pathCheck = paths[i];
  27898. if (pathCheck.node === targetNode) {
  27899. path = pathCheck;
  27900. break;
  27901. }
  27902. }
  27903. if (!path) {
  27904. path = new NodePath(hub, parent);
  27905. paths.push(path);
  27906. }
  27907. path.setup(parentPath, container, listKey, key);
  27908. return path;
  27909. };
  27910. NodePath.prototype.getScope = function getScope(scope) {
  27911. var ourScope = scope;
  27912. if (this.isScope()) {
  27913. ourScope = new _scope2.default(this, scope);
  27914. }
  27915. return ourScope;
  27916. };
  27917. NodePath.prototype.setData = function setData(key, val) {
  27918. return this.data[key] = val;
  27919. };
  27920. NodePath.prototype.getData = function getData(key, def) {
  27921. var val = this.data[key];
  27922. if (!val && def) val = this.data[key] = def;
  27923. return val;
  27924. };
  27925. NodePath.prototype.buildCodeFrameError = function buildCodeFrameError(msg) {
  27926. var Error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SyntaxError;
  27927. return this.hub.file.buildCodeFrameError(this.node, msg, Error);
  27928. };
  27929. NodePath.prototype.traverse = function traverse(visitor, state) {
  27930. (0, _index2.default)(this.node, visitor, this.scope, state, this);
  27931. };
  27932. NodePath.prototype.mark = function mark(type, message) {
  27933. this.hub.file.metadata.marked.push({
  27934. type: type,
  27935. message: message,
  27936. loc: this.node.loc
  27937. });
  27938. };
  27939. NodePath.prototype.set = function set(key, node) {
  27940. t.validate(this.node, key, node);
  27941. this.node[key] = node;
  27942. };
  27943. NodePath.prototype.getPathLocation = function getPathLocation() {
  27944. var parts = [];
  27945. var path = this;
  27946. do {
  27947. var key = path.key;
  27948. if (path.inList) key = path.listKey + "[" + key + "]";
  27949. parts.unshift(key);
  27950. } while (path = path.parentPath);
  27951. return parts.join(".");
  27952. };
  27953. NodePath.prototype.debug = function debug(buildMessage) {
  27954. if (!_debug.enabled) return;
  27955. _debug(this.getPathLocation() + " " + this.type + ": " + buildMessage());
  27956. };
  27957. return NodePath;
  27958. }();
  27959. exports.default = NodePath;
  27960. (0, _assign2.default)(NodePath.prototype, $__require("154"));
  27961. (0, _assign2.default)(NodePath.prototype, $__require("158"));
  27962. (0, _assign2.default)(NodePath.prototype, $__require("161"));
  27963. (0, _assign2.default)(NodePath.prototype, $__require("177"));
  27964. (0, _assign2.default)(NodePath.prototype, $__require("178"));
  27965. (0, _assign2.default)(NodePath.prototype, $__require("179"));
  27966. (0, _assign2.default)(NodePath.prototype, $__require("17a"));
  27967. (0, _assign2.default)(NodePath.prototype, $__require("17c"));
  27968. (0, _assign2.default)(NodePath.prototype, $__require("17e"));
  27969. (0, _assign2.default)(NodePath.prototype, $__require("17f"));
  27970. (0, _assign2.default)(NodePath.prototype, $__require("180"));
  27971. var _loop2 = function _loop2() {
  27972. if (_isArray) {
  27973. if (_i >= _iterator.length) return "break";
  27974. _ref2 = _iterator[_i++];
  27975. } else {
  27976. _i = _iterator.next();
  27977. if (_i.done) return "break";
  27978. _ref2 = _i.value;
  27979. }
  27980. var type = _ref2;
  27981. var typeKey = "is" + type;
  27982. NodePath.prototype[typeKey] = function (opts) {
  27983. return t[typeKey](this.node, opts);
  27984. };
  27985. NodePath.prototype["assert" + type] = function (opts) {
  27986. if (!this[typeKey](opts)) {
  27987. throw new TypeError("Expected node path of type " + type);
  27988. }
  27989. };
  27990. };
  27991. for (var _iterator = t.TYPES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  27992. var _ref2;
  27993. var _ret2 = _loop2();
  27994. if (_ret2 === "break") break;
  27995. }
  27996. var _loop = function _loop(type) {
  27997. if (type[0] === "_") return "continue";
  27998. if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type);
  27999. var virtualType = virtualTypes[type];
  28000. NodePath.prototype["is" + type] = function (opts) {
  28001. return virtualType.checkPath(this, opts);
  28002. };
  28003. };
  28004. for (var type in virtualTypes) {
  28005. var _ret = _loop(type);
  28006. if (_ret === "continue") continue;
  28007. }
  28008. module.exports = exports["default"];
  28009. });
  28010. $__System.registerDynamic("182", ["17", "1d", "155", "11", "c"], true, function ($__require, exports, module) {
  28011. "use strict";
  28012. var process = $__require("c");
  28013. var global = this || self,
  28014. GLOBAL = global;
  28015. exports.__esModule = true;
  28016. var _getIterator2 = $__require("17");
  28017. var _getIterator3 = _interopRequireDefault(_getIterator2);
  28018. var _classCallCheck2 = $__require("1d");
  28019. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  28020. var _path2 = $__require("155");
  28021. var _path3 = _interopRequireDefault(_path2);
  28022. var _babelTypes = $__require("11");
  28023. var t = _interopRequireWildcard(_babelTypes);
  28024. function _interopRequireWildcard(obj) {
  28025. if (obj && obj.__esModule) {
  28026. return obj;
  28027. } else {
  28028. var newObj = {};if (obj != null) {
  28029. for (var key in obj) {
  28030. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  28031. }
  28032. }newObj.default = obj;return newObj;
  28033. }
  28034. }
  28035. function _interopRequireDefault(obj) {
  28036. return obj && obj.__esModule ? obj : { default: obj };
  28037. }
  28038. var testing = "production" === "test";
  28039. var TraversalContext = function () {
  28040. function TraversalContext(scope, opts, state, parentPath) {
  28041. (0, _classCallCheck3.default)(this, TraversalContext);
  28042. this.queue = null;
  28043. this.parentPath = parentPath;
  28044. this.scope = scope;
  28045. this.state = state;
  28046. this.opts = opts;
  28047. }
  28048. TraversalContext.prototype.shouldVisit = function shouldVisit(node) {
  28049. var opts = this.opts;
  28050. if (opts.enter || opts.exit) return true;
  28051. if (opts[node.type]) return true;
  28052. var keys = t.VISITOR_KEYS[node.type];
  28053. if (!keys || !keys.length) return false;
  28054. for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  28055. var _ref;
  28056. if (_isArray) {
  28057. if (_i >= _iterator.length) break;
  28058. _ref = _iterator[_i++];
  28059. } else {
  28060. _i = _iterator.next();
  28061. if (_i.done) break;
  28062. _ref = _i.value;
  28063. }
  28064. var key = _ref;
  28065. if (node[key]) return true;
  28066. }
  28067. return false;
  28068. };
  28069. TraversalContext.prototype.create = function create(node, obj, key, listKey) {
  28070. return _path3.default.get({
  28071. parentPath: this.parentPath,
  28072. parent: node,
  28073. container: obj,
  28074. key: key,
  28075. listKey: listKey
  28076. });
  28077. };
  28078. TraversalContext.prototype.maybeQueue = function maybeQueue(path, notPriority) {
  28079. if (this.trap) {
  28080. throw new Error("Infinite cycle detected");
  28081. }
  28082. if (this.queue) {
  28083. if (notPriority) {
  28084. this.queue.push(path);
  28085. } else {
  28086. this.priorityQueue.push(path);
  28087. }
  28088. }
  28089. };
  28090. TraversalContext.prototype.visitMultiple = function visitMultiple(container, parent, listKey) {
  28091. if (container.length === 0) return false;
  28092. var queue = [];
  28093. for (var key = 0; key < container.length; key++) {
  28094. var node = container[key];
  28095. if (node && this.shouldVisit(node)) {
  28096. queue.push(this.create(parent, container, key, listKey));
  28097. }
  28098. }
  28099. return this.visitQueue(queue);
  28100. };
  28101. TraversalContext.prototype.visitSingle = function visitSingle(node, key) {
  28102. if (this.shouldVisit(node[key])) {
  28103. return this.visitQueue([this.create(node, node, key)]);
  28104. } else {
  28105. return false;
  28106. }
  28107. };
  28108. TraversalContext.prototype.visitQueue = function visitQueue(queue) {
  28109. this.queue = queue;
  28110. this.priorityQueue = [];
  28111. var visited = [];
  28112. var stop = false;
  28113. for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  28114. var _ref2;
  28115. if (_isArray2) {
  28116. if (_i2 >= _iterator2.length) break;
  28117. _ref2 = _iterator2[_i2++];
  28118. } else {
  28119. _i2 = _iterator2.next();
  28120. if (_i2.done) break;
  28121. _ref2 = _i2.value;
  28122. }
  28123. var path = _ref2;
  28124. path.resync();
  28125. if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
  28126. path.pushContext(this);
  28127. }
  28128. if (path.key === null) continue;
  28129. if (testing && queue.length >= 10000) {
  28130. this.trap = true;
  28131. }
  28132. if (visited.indexOf(path.node) >= 0) continue;
  28133. visited.push(path.node);
  28134. if (path.visit()) {
  28135. stop = true;
  28136. break;
  28137. }
  28138. if (this.priorityQueue.length) {
  28139. stop = this.visitQueue(this.priorityQueue);
  28140. this.priorityQueue = [];
  28141. this.queue = queue;
  28142. if (stop) break;
  28143. }
  28144. }
  28145. for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  28146. var _ref3;
  28147. if (_isArray3) {
  28148. if (_i3 >= _iterator3.length) break;
  28149. _ref3 = _iterator3[_i3++];
  28150. } else {
  28151. _i3 = _iterator3.next();
  28152. if (_i3.done) break;
  28153. _ref3 = _i3.value;
  28154. }
  28155. var _path = _ref3;
  28156. _path.popContext();
  28157. }
  28158. this.queue = null;
  28159. return stop;
  28160. };
  28161. TraversalContext.prototype.visit = function visit(node, key) {
  28162. var nodes = node[key];
  28163. if (!nodes) return false;
  28164. if (Array.isArray(nodes)) {
  28165. return this.visitMultiple(nodes, node, key);
  28166. } else {
  28167. return this.visitSingle(node, key);
  28168. }
  28169. };
  28170. return TraversalContext;
  28171. }();
  28172. exports.default = TraversalContext;
  28173. module.exports = exports["default"];
  28174. });
  28175. $__System.registerDynamic("181", ["11", "c"], true, function ($__require, exports, module) {
  28176. "use strict";
  28177. var process = $__require("c");
  28178. var global = this || self,
  28179. GLOBAL = global;
  28180. exports.__esModule = true;
  28181. exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = undefined;
  28182. var _babelTypes = $__require("11");
  28183. var t = _interopRequireWildcard(_babelTypes);
  28184. function _interopRequireWildcard(obj) {
  28185. if (obj && obj.__esModule) {
  28186. return obj;
  28187. } else {
  28188. var newObj = {};if (obj != null) {
  28189. for (var key in obj) {
  28190. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  28191. }
  28192. }newObj.default = obj;return newObj;
  28193. }
  28194. }
  28195. var ReferencedIdentifier = exports.ReferencedIdentifier = {
  28196. types: ["Identifier", "JSXIdentifier"],
  28197. checkPath: function checkPath(_ref, opts) {
  28198. var node = _ref.node,
  28199. parent = _ref.parent;
  28200. if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) {
  28201. if (t.isJSXIdentifier(node, opts)) {
  28202. if (_babelTypes.react.isCompatTag(node.name)) return false;
  28203. } else {
  28204. return false;
  28205. }
  28206. }
  28207. return t.isReferenced(node, parent);
  28208. }
  28209. };
  28210. var ReferencedMemberExpression = exports.ReferencedMemberExpression = {
  28211. types: ["MemberExpression"],
  28212. checkPath: function checkPath(_ref2) {
  28213. var node = _ref2.node,
  28214. parent = _ref2.parent;
  28215. return t.isMemberExpression(node) && t.isReferenced(node, parent);
  28216. }
  28217. };
  28218. var BindingIdentifier = exports.BindingIdentifier = {
  28219. types: ["Identifier"],
  28220. checkPath: function checkPath(_ref3) {
  28221. var node = _ref3.node,
  28222. parent = _ref3.parent;
  28223. return t.isIdentifier(node) && t.isBinding(node, parent);
  28224. }
  28225. };
  28226. var Statement = exports.Statement = {
  28227. types: ["Statement"],
  28228. checkPath: function checkPath(_ref4) {
  28229. var node = _ref4.node,
  28230. parent = _ref4.parent;
  28231. if (t.isStatement(node)) {
  28232. if (t.isVariableDeclaration(node)) {
  28233. if (t.isForXStatement(parent, { left: node })) return false;
  28234. if (t.isForStatement(parent, { init: node })) return false;
  28235. }
  28236. return true;
  28237. } else {
  28238. return false;
  28239. }
  28240. }
  28241. };
  28242. var Expression = exports.Expression = {
  28243. types: ["Expression"],
  28244. checkPath: function checkPath(path) {
  28245. if (path.isIdentifier()) {
  28246. return path.isReferencedIdentifier();
  28247. } else {
  28248. return t.isExpression(path.node);
  28249. }
  28250. }
  28251. };
  28252. var Scope = exports.Scope = {
  28253. types: ["Scopable"],
  28254. checkPath: function checkPath(path) {
  28255. return t.isScope(path.node, path.parent);
  28256. }
  28257. };
  28258. var Referenced = exports.Referenced = {
  28259. checkPath: function checkPath(path) {
  28260. return t.isReferenced(path.node, path.parent);
  28261. }
  28262. };
  28263. var BlockScoped = exports.BlockScoped = {
  28264. checkPath: function checkPath(path) {
  28265. return t.isBlockScoped(path.node);
  28266. }
  28267. };
  28268. var Var = exports.Var = {
  28269. types: ["VariableDeclaration"],
  28270. checkPath: function checkPath(path) {
  28271. return t.isVar(path.node);
  28272. }
  28273. };
  28274. var User = exports.User = {
  28275. checkPath: function checkPath(path) {
  28276. return path.node && !!path.node.loc;
  28277. }
  28278. };
  28279. var Generated = exports.Generated = {
  28280. checkPath: function checkPath(path) {
  28281. return !path.isUser();
  28282. }
  28283. };
  28284. var Pure = exports.Pure = {
  28285. checkPath: function checkPath(path, opts) {
  28286. return path.scope.isPure(path.node, opts);
  28287. }
  28288. };
  28289. var Flow = exports.Flow = {
  28290. types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
  28291. checkPath: function checkPath(_ref5) {
  28292. var node = _ref5.node;
  28293. if (t.isFlow(node)) {
  28294. return true;
  28295. } else if (t.isImportDeclaration(node)) {
  28296. return node.importKind === "type" || node.importKind === "typeof";
  28297. } else if (t.isExportDeclaration(node)) {
  28298. return node.exportKind === "type";
  28299. } else if (t.isImportSpecifier(node)) {
  28300. return node.importKind === "type" || node.importKind === "typeof";
  28301. } else {
  28302. return false;
  28303. }
  28304. }
  28305. };
  28306. });
  28307. $__System.registerDynamic("183", ["30", "15", "17", "181", "f", "11", "ce", "c"], true, function ($__require, exports, module) {
  28308. "use strict";
  28309. var process = $__require("c");
  28310. var global = this || self,
  28311. GLOBAL = global;
  28312. exports.__esModule = true;
  28313. var _typeof2 = $__require("30");
  28314. var _typeof3 = _interopRequireDefault(_typeof2);
  28315. var _keys = $__require("15");
  28316. var _keys2 = _interopRequireDefault(_keys);
  28317. var _getIterator2 = $__require("17");
  28318. var _getIterator3 = _interopRequireDefault(_getIterator2);
  28319. exports.explode = explode;
  28320. exports.verify = verify;
  28321. exports.merge = merge;
  28322. var _virtualTypes = $__require("181");
  28323. var virtualTypes = _interopRequireWildcard(_virtualTypes);
  28324. var _babelMessages = $__require("f");
  28325. var messages = _interopRequireWildcard(_babelMessages);
  28326. var _babelTypes = $__require("11");
  28327. var t = _interopRequireWildcard(_babelTypes);
  28328. var _clone = $__require("ce");
  28329. var _clone2 = _interopRequireDefault(_clone);
  28330. function _interopRequireWildcard(obj) {
  28331. if (obj && obj.__esModule) {
  28332. return obj;
  28333. } else {
  28334. var newObj = {};if (obj != null) {
  28335. for (var key in obj) {
  28336. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  28337. }
  28338. }newObj.default = obj;return newObj;
  28339. }
  28340. }
  28341. function _interopRequireDefault(obj) {
  28342. return obj && obj.__esModule ? obj : { default: obj };
  28343. }
  28344. function explode(visitor) {
  28345. if (visitor._exploded) return visitor;
  28346. visitor._exploded = true;
  28347. for (var nodeType in visitor) {
  28348. if (shouldIgnoreKey(nodeType)) continue;
  28349. var parts = nodeType.split("|");
  28350. if (parts.length === 1) continue;
  28351. var fns = visitor[nodeType];
  28352. delete visitor[nodeType];
  28353. for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  28354. var _ref;
  28355. if (_isArray) {
  28356. if (_i >= _iterator.length) break;
  28357. _ref = _iterator[_i++];
  28358. } else {
  28359. _i = _iterator.next();
  28360. if (_i.done) break;
  28361. _ref = _i.value;
  28362. }
  28363. var part = _ref;
  28364. visitor[part] = fns;
  28365. }
  28366. }
  28367. verify(visitor);
  28368. delete visitor.__esModule;
  28369. ensureEntranceObjects(visitor);
  28370. ensureCallbackArrays(visitor);
  28371. for (var _iterator2 = (0, _keys2.default)(visitor), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  28372. var _ref2;
  28373. if (_isArray2) {
  28374. if (_i2 >= _iterator2.length) break;
  28375. _ref2 = _iterator2[_i2++];
  28376. } else {
  28377. _i2 = _iterator2.next();
  28378. if (_i2.done) break;
  28379. _ref2 = _i2.value;
  28380. }
  28381. var _nodeType3 = _ref2;
  28382. if (shouldIgnoreKey(_nodeType3)) continue;
  28383. var wrapper = virtualTypes[_nodeType3];
  28384. if (!wrapper) continue;
  28385. var _fns2 = visitor[_nodeType3];
  28386. for (var type in _fns2) {
  28387. _fns2[type] = wrapCheck(wrapper, _fns2[type]);
  28388. }
  28389. delete visitor[_nodeType3];
  28390. if (wrapper.types) {
  28391. for (var _iterator4 = wrapper.types, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  28392. var _ref4;
  28393. if (_isArray4) {
  28394. if (_i4 >= _iterator4.length) break;
  28395. _ref4 = _iterator4[_i4++];
  28396. } else {
  28397. _i4 = _iterator4.next();
  28398. if (_i4.done) break;
  28399. _ref4 = _i4.value;
  28400. }
  28401. var _type = _ref4;
  28402. if (visitor[_type]) {
  28403. mergePair(visitor[_type], _fns2);
  28404. } else {
  28405. visitor[_type] = _fns2;
  28406. }
  28407. }
  28408. } else {
  28409. mergePair(visitor, _fns2);
  28410. }
  28411. }
  28412. for (var _nodeType in visitor) {
  28413. if (shouldIgnoreKey(_nodeType)) continue;
  28414. var _fns = visitor[_nodeType];
  28415. var aliases = t.FLIPPED_ALIAS_KEYS[_nodeType];
  28416. var deprecratedKey = t.DEPRECATED_KEYS[_nodeType];
  28417. if (deprecratedKey) {
  28418. console.trace("Visitor defined for " + _nodeType + " but it has been renamed to " + deprecratedKey);
  28419. aliases = [deprecratedKey];
  28420. }
  28421. if (!aliases) continue;
  28422. delete visitor[_nodeType];
  28423. for (var _iterator3 = aliases, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  28424. var _ref3;
  28425. if (_isArray3) {
  28426. if (_i3 >= _iterator3.length) break;
  28427. _ref3 = _iterator3[_i3++];
  28428. } else {
  28429. _i3 = _iterator3.next();
  28430. if (_i3.done) break;
  28431. _ref3 = _i3.value;
  28432. }
  28433. var alias = _ref3;
  28434. var existing = visitor[alias];
  28435. if (existing) {
  28436. mergePair(existing, _fns);
  28437. } else {
  28438. visitor[alias] = (0, _clone2.default)(_fns);
  28439. }
  28440. }
  28441. }
  28442. for (var _nodeType2 in visitor) {
  28443. if (shouldIgnoreKey(_nodeType2)) continue;
  28444. ensureCallbackArrays(visitor[_nodeType2]);
  28445. }
  28446. return visitor;
  28447. }
  28448. function verify(visitor) {
  28449. if (visitor._verified) return;
  28450. if (typeof visitor === "function") {
  28451. throw new Error(messages.get("traverseVerifyRootFunction"));
  28452. }
  28453. for (var nodeType in visitor) {
  28454. if (nodeType === "enter" || nodeType === "exit") {
  28455. validateVisitorMethods(nodeType, visitor[nodeType]);
  28456. }
  28457. if (shouldIgnoreKey(nodeType)) continue;
  28458. if (t.TYPES.indexOf(nodeType) < 0) {
  28459. throw new Error(messages.get("traverseVerifyNodeType", nodeType));
  28460. }
  28461. var visitors = visitor[nodeType];
  28462. if ((typeof visitors === "undefined" ? "undefined" : (0, _typeof3.default)(visitors)) === "object") {
  28463. for (var visitorKey in visitors) {
  28464. if (visitorKey === "enter" || visitorKey === "exit") {
  28465. validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]);
  28466. } else {
  28467. throw new Error(messages.get("traverseVerifyVisitorProperty", nodeType, visitorKey));
  28468. }
  28469. }
  28470. }
  28471. }
  28472. visitor._verified = true;
  28473. }
  28474. function validateVisitorMethods(path, val) {
  28475. var fns = [].concat(val);
  28476. for (var _iterator5 = fns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
  28477. var _ref5;
  28478. if (_isArray5) {
  28479. if (_i5 >= _iterator5.length) break;
  28480. _ref5 = _iterator5[_i5++];
  28481. } else {
  28482. _i5 = _iterator5.next();
  28483. if (_i5.done) break;
  28484. _ref5 = _i5.value;
  28485. }
  28486. var fn = _ref5;
  28487. if (typeof fn !== "function") {
  28488. throw new TypeError("Non-function found defined in " + path + " with type " + (typeof fn === "undefined" ? "undefined" : (0, _typeof3.default)(fn)));
  28489. }
  28490. }
  28491. }
  28492. function merge(visitors) {
  28493. var states = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  28494. var wrapper = arguments[2];
  28495. var rootVisitor = {};
  28496. for (var i = 0; i < visitors.length; i++) {
  28497. var visitor = visitors[i];
  28498. var state = states[i];
  28499. explode(visitor);
  28500. for (var type in visitor) {
  28501. var visitorType = visitor[type];
  28502. if (state || wrapper) {
  28503. visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
  28504. }
  28505. var nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
  28506. mergePair(nodeVisitor, visitorType);
  28507. }
  28508. }
  28509. return rootVisitor;
  28510. }
  28511. function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
  28512. var newVisitor = {};
  28513. var _loop = function _loop(key) {
  28514. var fns = oldVisitor[key];
  28515. if (!Array.isArray(fns)) return "continue";
  28516. fns = fns.map(function (fn) {
  28517. var newFn = fn;
  28518. if (state) {
  28519. newFn = function newFn(path) {
  28520. return fn.call(state, path, state);
  28521. };
  28522. }
  28523. if (wrapper) {
  28524. newFn = wrapper(state.key, key, newFn);
  28525. }
  28526. return newFn;
  28527. });
  28528. newVisitor[key] = fns;
  28529. };
  28530. for (var key in oldVisitor) {
  28531. var _ret = _loop(key);
  28532. if (_ret === "continue") continue;
  28533. }
  28534. return newVisitor;
  28535. }
  28536. function ensureEntranceObjects(obj) {
  28537. for (var key in obj) {
  28538. if (shouldIgnoreKey(key)) continue;
  28539. var fns = obj[key];
  28540. if (typeof fns === "function") {
  28541. obj[key] = { enter: fns };
  28542. }
  28543. }
  28544. }
  28545. function ensureCallbackArrays(obj) {
  28546. if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter];
  28547. if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit];
  28548. }
  28549. function wrapCheck(wrapper, fn) {
  28550. var newFn = function newFn(path) {
  28551. if (wrapper.checkPath(path)) {
  28552. return fn.apply(this, arguments);
  28553. }
  28554. };
  28555. newFn.toString = function () {
  28556. return fn.toString();
  28557. };
  28558. return newFn;
  28559. }
  28560. function shouldIgnoreKey(key) {
  28561. if (key[0] === "_") return true;
  28562. if (key === "enter" || key === "exit" || key === "shouldSkip") return true;
  28563. if (key === "blacklist" || key === "noScope" || key === "skipKeys") return true;
  28564. return false;
  28565. }
  28566. function mergePair(dest, src) {
  28567. for (var key in src) {
  28568. dest[key] = [].concat(dest[key] || [], src[key]);
  28569. }
  28570. }
  28571. });
  28572. $__System.registerDynamic("f", ["5b", "@node/util"], true, function ($__require, exports, module) {
  28573. "use strict";
  28574. var global = this || self,
  28575. GLOBAL = global;
  28576. exports.__esModule = true;
  28577. exports.MESSAGES = undefined;
  28578. var _stringify = $__require("5b");
  28579. var _stringify2 = _interopRequireDefault(_stringify);
  28580. exports.get = get;
  28581. exports.parseArgs = parseArgs;
  28582. var _util = $__require("@node/util");
  28583. var util = _interopRequireWildcard(_util);
  28584. function _interopRequireWildcard(obj) {
  28585. if (obj && obj.__esModule) {
  28586. return obj;
  28587. } else {
  28588. var newObj = {};if (obj != null) {
  28589. for (var key in obj) {
  28590. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  28591. }
  28592. }newObj.default = obj;return newObj;
  28593. }
  28594. }
  28595. function _interopRequireDefault(obj) {
  28596. return obj && obj.__esModule ? obj : { default: obj };
  28597. }
  28598. var MESSAGES = exports.MESSAGES = {
  28599. tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",
  28600. classesIllegalBareSuper: "Illegal use of bare super",
  28601. classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead",
  28602. scopeDuplicateDeclaration: "Duplicate declaration $1",
  28603. settersNoRest: "Setters aren't allowed to have a rest",
  28604. noAssignmentsInForHead: "No assignments allowed in for-in/of head",
  28605. expectedMemberExpressionOrIdentifier: "Expected type MemberExpression or Identifier",
  28606. invalidParentForThisNode: "We don't know how to handle this node within the current parent - please open an issue",
  28607. readOnly: "$1 is read-only",
  28608. unknownForHead: "Unknown node type $1 in ForStatement",
  28609. didYouMean: "Did you mean $1?",
  28610. codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",
  28611. missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",
  28612. unsupportedOutputType: "Unsupported output type $1",
  28613. illegalMethodName: "Illegal method name $1",
  28614. lostTrackNodePath: "We lost track of this node's position, likely because the AST was directly manipulated",
  28615. modulesIllegalExportName: "Illegal export $1",
  28616. modulesDuplicateDeclarations: "Duplicate module declarations with the same source but in different scopes",
  28617. undeclaredVariable: "Reference to undeclared variable $1",
  28618. undeclaredVariableType: "Referencing a type alias outside of a type annotation",
  28619. undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?",
  28620. traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",
  28621. traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",
  28622. traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",
  28623. traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type",
  28624. pluginNotObject: "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",
  28625. pluginNotFunction: "Plugin $2 specified in $1 was expected to return a function but returned $3",
  28626. pluginUnknown: "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",
  28627. pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3"
  28628. };
  28629. function get(key) {
  28630. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  28631. args[_key - 1] = arguments[_key];
  28632. }
  28633. var msg = MESSAGES[key];
  28634. if (!msg) throw new ReferenceError("Unknown message " + (0, _stringify2.default)(key));
  28635. args = parseArgs(args);
  28636. return msg.replace(/\$(\d+)/g, function (str, i) {
  28637. return args[i - 1];
  28638. });
  28639. }
  28640. function parseArgs(args) {
  28641. return args.map(function (val) {
  28642. if (val != null && val.inspect) {
  28643. return val.inspect();
  28644. } else {
  28645. try {
  28646. return (0, _stringify2.default)(val) || val + "";
  28647. } catch (e) {
  28648. return util.inspect(val);
  28649. }
  28650. }
  28651. });
  28652. }
  28653. });
  28654. $__System.registerDynamic('184', ['185', '4b', '7b'], true, function ($__require, exports, module) {
  28655. var global = this || self,
  28656. GLOBAL = global;
  28657. var baseGetTag = $__require('185'),
  28658. isArray = $__require('4b'),
  28659. isObjectLike = $__require('7b');
  28660. /** `Object#toString` result references. */
  28661. var stringTag = '[object String]';
  28662. /**
  28663. * Checks if `value` is classified as a `String` primitive or object.
  28664. *
  28665. * @static
  28666. * @since 0.1.0
  28667. * @memberOf _
  28668. * @category Lang
  28669. * @param {*} value The value to check.
  28670. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  28671. * @example
  28672. *
  28673. * _.isString('abc');
  28674. * // => true
  28675. *
  28676. * _.isString(1);
  28677. * // => false
  28678. */
  28679. function isString(value) {
  28680. return typeof value == 'string' || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
  28681. }
  28682. module.exports = isString;
  28683. });
  28684. $__System.registerDynamic('90', ['185', '7b'], true, function ($__require, exports, module) {
  28685. var global = this || self,
  28686. GLOBAL = global;
  28687. var baseGetTag = $__require('185'),
  28688. isObjectLike = $__require('7b');
  28689. /** `Object#toString` result references. */
  28690. var symbolTag = '[object Symbol]';
  28691. /**
  28692. * Checks if `value` is classified as a `Symbol` primitive or object.
  28693. *
  28694. * @static
  28695. * @memberOf _
  28696. * @since 4.0.0
  28697. * @category Lang
  28698. * @param {*} value The value to check.
  28699. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  28700. * @example
  28701. *
  28702. * _.isSymbol(Symbol.iterator);
  28703. * // => true
  28704. *
  28705. * _.isSymbol('abc');
  28706. * // => false
  28707. */
  28708. function isSymbol(value) {
  28709. return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
  28710. }
  28711. module.exports = isSymbol;
  28712. });
  28713. $__System.registerDynamic('186', ['81', '90'], true, function ($__require, exports, module) {
  28714. var global = this || self,
  28715. GLOBAL = global;
  28716. var isObject = $__require('81'),
  28717. isSymbol = $__require('90');
  28718. /** Used as references for various `Number` constants. */
  28719. var NAN = 0 / 0;
  28720. /** Used to match leading and trailing whitespace. */
  28721. var reTrim = /^\s+|\s+$/g;
  28722. /** Used to detect bad signed hexadecimal string values. */
  28723. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  28724. /** Used to detect binary string values. */
  28725. var reIsBinary = /^0b[01]+$/i;
  28726. /** Used to detect octal string values. */
  28727. var reIsOctal = /^0o[0-7]+$/i;
  28728. /** Built-in method references without a dependency on `root`. */
  28729. var freeParseInt = parseInt;
  28730. /**
  28731. * Converts `value` to a number.
  28732. *
  28733. * @static
  28734. * @memberOf _
  28735. * @since 4.0.0
  28736. * @category Lang
  28737. * @param {*} value The value to process.
  28738. * @returns {number} Returns the number.
  28739. * @example
  28740. *
  28741. * _.toNumber(3.2);
  28742. * // => 3.2
  28743. *
  28744. * _.toNumber(Number.MIN_VALUE);
  28745. * // => 5e-324
  28746. *
  28747. * _.toNumber(Infinity);
  28748. * // => Infinity
  28749. *
  28750. * _.toNumber('3.2');
  28751. * // => 3.2
  28752. */
  28753. function toNumber(value) {
  28754. if (typeof value == 'number') {
  28755. return value;
  28756. }
  28757. if (isSymbol(value)) {
  28758. return NAN;
  28759. }
  28760. if (isObject(value)) {
  28761. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  28762. value = isObject(other) ? other + '' : other;
  28763. }
  28764. if (typeof value != 'string') {
  28765. return value === 0 ? value : +value;
  28766. }
  28767. value = value.replace(reTrim, '');
  28768. var isBinary = reIsBinary.test(value);
  28769. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  28770. }
  28771. module.exports = toNumber;
  28772. });
  28773. $__System.registerDynamic('187', ['186'], true, function ($__require, exports, module) {
  28774. var global = this || self,
  28775. GLOBAL = global;
  28776. var toNumber = $__require('186');
  28777. /** Used as references for various `Number` constants. */
  28778. var INFINITY = 1 / 0,
  28779. MAX_INTEGER = 1.7976931348623157e+308;
  28780. /**
  28781. * Converts `value` to a finite number.
  28782. *
  28783. * @static
  28784. * @memberOf _
  28785. * @since 4.12.0
  28786. * @category Lang
  28787. * @param {*} value The value to convert.
  28788. * @returns {number} Returns the converted number.
  28789. * @example
  28790. *
  28791. * _.toFinite(3.2);
  28792. * // => 3.2
  28793. *
  28794. * _.toFinite(Number.MIN_VALUE);
  28795. * // => 5e-324
  28796. *
  28797. * _.toFinite(Infinity);
  28798. * // => 1.7976931348623157e+308
  28799. *
  28800. * _.toFinite('3.2');
  28801. * // => 3.2
  28802. */
  28803. function toFinite(value) {
  28804. if (!value) {
  28805. return value === 0 ? value : 0;
  28806. }
  28807. value = toNumber(value);
  28808. if (value === INFINITY || value === -INFINITY) {
  28809. var sign = value < 0 ? -1 : 1;
  28810. return sign * MAX_INTEGER;
  28811. }
  28812. return value === value ? value : 0;
  28813. }
  28814. module.exports = toFinite;
  28815. });
  28816. $__System.registerDynamic('3c', ['187'], true, function ($__require, exports, module) {
  28817. var global = this || self,
  28818. GLOBAL = global;
  28819. var toFinite = $__require('187');
  28820. /**
  28821. * Converts `value` to an integer.
  28822. *
  28823. * **Note:** This method is loosely based on
  28824. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  28825. *
  28826. * @static
  28827. * @memberOf _
  28828. * @since 4.0.0
  28829. * @category Lang
  28830. * @param {*} value The value to convert.
  28831. * @returns {number} Returns the converted integer.
  28832. * @example
  28833. *
  28834. * _.toInteger(3.2);
  28835. * // => 3
  28836. *
  28837. * _.toInteger(Number.MIN_VALUE);
  28838. * // => 0
  28839. *
  28840. * _.toInteger(Infinity);
  28841. * // => 1.7976931348623157e+308
  28842. *
  28843. * _.toInteger('3.2');
  28844. * // => 3
  28845. */
  28846. function toInteger(value) {
  28847. var result = toFinite(value),
  28848. remainder = result % 1;
  28849. return result === result ? remainder ? result - remainder : result : 0;
  28850. }
  28851. module.exports = toInteger;
  28852. });
  28853. $__System.registerDynamic("49", [], true, function ($__require, exports, module) {
  28854. var global = this || self,
  28855. GLOBAL = global;
  28856. /**
  28857. * A specialized version of `_.map` for arrays without support for iteratee
  28858. * shorthands.
  28859. *
  28860. * @private
  28861. * @param {Array} [array] The array to iterate over.
  28862. * @param {Function} iteratee The function invoked per iteration.
  28863. * @returns {Array} Returns the new mapped array.
  28864. */
  28865. function arrayMap(array, iteratee) {
  28866. var index = -1,
  28867. length = array == null ? 0 : array.length,
  28868. result = Array(length);
  28869. while (++index < length) {
  28870. result[index] = iteratee(array[index], index, array);
  28871. }
  28872. return result;
  28873. }
  28874. module.exports = arrayMap;
  28875. });
  28876. $__System.registerDynamic('188', ['49'], true, function ($__require, exports, module) {
  28877. var global = this || self,
  28878. GLOBAL = global;
  28879. var arrayMap = $__require('49');
  28880. /**
  28881. * The base implementation of `_.values` and `_.valuesIn` which creates an
  28882. * array of `object` property values corresponding to the property names
  28883. * of `props`.
  28884. *
  28885. * @private
  28886. * @param {Object} object The object to query.
  28887. * @param {Array} props The property names to get values for.
  28888. * @returns {Object} Returns the array of property values.
  28889. */
  28890. function baseValues(object, props) {
  28891. return arrayMap(props, function (key) {
  28892. return object[key];
  28893. });
  28894. }
  28895. module.exports = baseValues;
  28896. });
  28897. $__System.registerDynamic('189', ['188', '40'], true, function ($__require, exports, module) {
  28898. var global = this || self,
  28899. GLOBAL = global;
  28900. var baseValues = $__require('188'),
  28901. keys = $__require('40');
  28902. /**
  28903. * Creates an array of the own enumerable string keyed property values of `object`.
  28904. *
  28905. * **Note:** Non-object values are coerced to objects.
  28906. *
  28907. * @static
  28908. * @since 0.1.0
  28909. * @memberOf _
  28910. * @category Object
  28911. * @param {Object} object The object to query.
  28912. * @returns {Array} Returns the array of property values.
  28913. * @example
  28914. *
  28915. * function Foo() {
  28916. * this.a = 1;
  28917. * this.b = 2;
  28918. * }
  28919. *
  28920. * Foo.prototype.c = 3;
  28921. *
  28922. * _.values(new Foo);
  28923. * // => [1, 2] (iteration order is not guaranteed)
  28924. *
  28925. * _.values('hi');
  28926. * // => ['h', 'i']
  28927. */
  28928. function values(object) {
  28929. return object == null ? [] : baseValues(object, keys(object));
  28930. }
  28931. module.exports = values;
  28932. });
  28933. $__System.registerDynamic('a5', ['127', '3f', '184', '3c', '189'], true, function ($__require, exports, module) {
  28934. var global = this || self,
  28935. GLOBAL = global;
  28936. var baseIndexOf = $__require('127'),
  28937. isArrayLike = $__require('3f'),
  28938. isString = $__require('184'),
  28939. toInteger = $__require('3c'),
  28940. values = $__require('189');
  28941. /* Built-in method references for those with the same name as other `lodash` methods. */
  28942. var nativeMax = Math.max;
  28943. /**
  28944. * Checks if `value` is in `collection`. If `collection` is a string, it's
  28945. * checked for a substring of `value`, otherwise
  28946. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  28947. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  28948. * the offset from the end of `collection`.
  28949. *
  28950. * @static
  28951. * @memberOf _
  28952. * @since 0.1.0
  28953. * @category Collection
  28954. * @param {Array|Object|string} collection The collection to inspect.
  28955. * @param {*} value The value to search for.
  28956. * @param {number} [fromIndex=0] The index to search from.
  28957. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  28958. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  28959. * @example
  28960. *
  28961. * _.includes([1, 2, 3], 1);
  28962. * // => true
  28963. *
  28964. * _.includes([1, 2, 3], 1, 2);
  28965. * // => false
  28966. *
  28967. * _.includes({ 'a': 1, 'b': 2 }, 1);
  28968. * // => true
  28969. *
  28970. * _.includes('abcd', 'bc');
  28971. * // => true
  28972. */
  28973. function includes(collection, value, fromIndex, guard) {
  28974. collection = isArrayLike(collection) ? collection : values(collection);
  28975. fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
  28976. var length = collection.length;
  28977. if (fromIndex < 0) {
  28978. fromIndex = nativeMax(length + fromIndex, 0);
  28979. }
  28980. return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
  28981. }
  28982. module.exports = includes;
  28983. });
  28984. $__System.registerDynamic('c7', ['18a', '18b', '18c', '18d', '18e', '18f', 'c'], true, function ($__require, exports, module) {
  28985. 'use strict';
  28986. // 19.1.2.1 Object.assign(target, source, ...)
  28987. var process = $__require('c');
  28988. var global = this || self,
  28989. GLOBAL = global;
  28990. var getKeys = $__require('18a'),
  28991. gOPS = $__require('18b'),
  28992. pIE = $__require('18c'),
  28993. toObject = $__require('18d'),
  28994. IObject = $__require('18e'),
  28995. $assign = Object.assign;
  28996. // should work with symbols and should have deterministic property order (V8 bug)
  28997. module.exports = !$assign || $__require('18f')(function () {
  28998. var A = {},
  28999. B = {},
  29000. S = Symbol(),
  29001. K = 'abcdefghijklmnopqrst';
  29002. A[S] = 7;
  29003. K.split('').forEach(function (k) {
  29004. B[k] = k;
  29005. });
  29006. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  29007. }) ? function assign(target, source) {
  29008. // eslint-disable-line no-unused-vars
  29009. var T = toObject(target),
  29010. aLen = arguments.length,
  29011. index = 1,
  29012. getSymbols = gOPS.f,
  29013. isEnum = pIE.f;
  29014. while (aLen > index) {
  29015. var S = IObject(arguments[index++]),
  29016. keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S),
  29017. length = keys.length,
  29018. j = 0,
  29019. key;
  29020. while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  29021. }return T;
  29022. } : $assign;
  29023. });
  29024. $__System.registerDynamic('32', ['169', '16f', '10b', '10a', '16a', '16c', '190', '191', 'c'], true, function ($__require, exports, module) {
  29025. 'use strict';
  29026. var process = $__require('c');
  29027. var global = this || self,
  29028. GLOBAL = global;
  29029. var redefineAll = $__require('169'),
  29030. getWeak = $__require('16f').getWeak,
  29031. anObject = $__require('10b'),
  29032. isObject = $__require('10a'),
  29033. anInstance = $__require('16a'),
  29034. forOf = $__require('16c'),
  29035. createArrayMethod = $__require('190'),
  29036. $has = $__require('191'),
  29037. arrayFind = createArrayMethod(5),
  29038. arrayFindIndex = createArrayMethod(6),
  29039. id = 0;
  29040. // fallback for uncaught frozen keys
  29041. var uncaughtFrozenStore = function (that) {
  29042. return that._l || (that._l = new UncaughtFrozenStore());
  29043. };
  29044. var UncaughtFrozenStore = function () {
  29045. this.a = [];
  29046. };
  29047. var findUncaughtFrozen = function (store, key) {
  29048. return arrayFind(store.a, function (it) {
  29049. return it[0] === key;
  29050. });
  29051. };
  29052. UncaughtFrozenStore.prototype = {
  29053. get: function (key) {
  29054. var entry = findUncaughtFrozen(this, key);
  29055. if (entry) return entry[1];
  29056. },
  29057. has: function (key) {
  29058. return !!findUncaughtFrozen(this, key);
  29059. },
  29060. set: function (key, value) {
  29061. var entry = findUncaughtFrozen(this, key);
  29062. if (entry) entry[1] = value;else this.a.push([key, value]);
  29063. },
  29064. 'delete': function (key) {
  29065. var index = arrayFindIndex(this.a, function (it) {
  29066. return it[0] === key;
  29067. });
  29068. if (~index) this.a.splice(index, 1);
  29069. return !!~index;
  29070. }
  29071. };
  29072. module.exports = {
  29073. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  29074. var C = wrapper(function (that, iterable) {
  29075. anInstance(that, C, NAME, '_i');
  29076. that._i = id++; // collection id
  29077. that._l = undefined; // leak store for uncaught frozen objects
  29078. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  29079. });
  29080. redefineAll(C.prototype, {
  29081. // 23.3.3.2 WeakMap.prototype.delete(key)
  29082. // 23.4.3.3 WeakSet.prototype.delete(value)
  29083. 'delete': function (key) {
  29084. if (!isObject(key)) return false;
  29085. var data = getWeak(key);
  29086. if (data === true) return uncaughtFrozenStore(this)['delete'](key);
  29087. return data && $has(data, this._i) && delete data[this._i];
  29088. },
  29089. // 23.3.3.4 WeakMap.prototype.has(key)
  29090. // 23.4.3.4 WeakSet.prototype.has(value)
  29091. has: function has(key) {
  29092. if (!isObject(key)) return false;
  29093. var data = getWeak(key);
  29094. if (data === true) return uncaughtFrozenStore(this).has(key);
  29095. return data && $has(data, this._i);
  29096. }
  29097. });
  29098. return C;
  29099. },
  29100. def: function (that, key, value) {
  29101. var data = getWeak(anObject(key), true);
  29102. if (data === true) uncaughtFrozenStore(that).set(key, value);else data[that._i] = value;
  29103. return that;
  29104. },
  29105. ufstore: uncaughtFrozenStore
  29106. };
  29107. });
  29108. $__System.registerDynamic('169', ['192', 'c'], true, function ($__require, exports, module) {
  29109. var process = $__require('c');
  29110. var global = this || self,
  29111. GLOBAL = global;
  29112. var hide = $__require('192');
  29113. module.exports = function (target, src, safe) {
  29114. for (var key in src) {
  29115. if (safe && target[key]) target[key] = src[key];else hide(target, key, src[key]);
  29116. }return target;
  29117. };
  29118. });
  29119. $__System.registerDynamic('193', ['10b', 'c'], true, function ($__require, exports, module) {
  29120. var process = $__require('c');
  29121. var global = this || self,
  29122. GLOBAL = global;
  29123. // call something on iterator step with safe closing on error
  29124. var anObject = $__require('10b');
  29125. module.exports = function (iterator, fn, value, entries) {
  29126. try {
  29127. return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  29128. // 7.4.6 IteratorClose(iterator, completion)
  29129. } catch (e) {
  29130. var ret = iterator['return'];
  29131. if (ret !== undefined) anObject(ret.call(iterator));
  29132. throw e;
  29133. }
  29134. };
  29135. });
  29136. $__System.registerDynamic('194', ['195', '166', 'c'], true, function ($__require, exports, module) {
  29137. var process = $__require('c');
  29138. var global = this || self,
  29139. GLOBAL = global;
  29140. // check on default Array iterator
  29141. var Iterators = $__require('195'),
  29142. ITERATOR = $__require('166')('iterator'),
  29143. ArrayProto = Array.prototype;
  29144. module.exports = function (it) {
  29145. return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  29146. };
  29147. });
  29148. $__System.registerDynamic('16c', ['10c', '193', '194', '10b', '196', '197', 'c'], true, function ($__require, exports, module) {
  29149. var process = $__require('c');
  29150. var global = this || self,
  29151. GLOBAL = global;
  29152. var ctx = $__require('10c'),
  29153. call = $__require('193'),
  29154. isArrayIter = $__require('194'),
  29155. anObject = $__require('10b'),
  29156. toLength = $__require('196'),
  29157. getIterFn = $__require('197'),
  29158. BREAK = {},
  29159. RETURN = {};
  29160. var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  29161. var iterFn = ITERATOR ? function () {
  29162. return iterable;
  29163. } : getIterFn(iterable),
  29164. f = ctx(fn, that, entries ? 2 : 1),
  29165. index = 0,
  29166. length,
  29167. step,
  29168. iterator,
  29169. result;
  29170. if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  29171. // fast case for arrays with default iterator
  29172. if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
  29173. result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
  29174. if (result === BREAK || result === RETURN) return result;
  29175. } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
  29176. result = call(iterator, f, step.value, entries);
  29177. if (result === BREAK || result === RETURN) return result;
  29178. }
  29179. };
  29180. exports.BREAK = BREAK;
  29181. exports.RETURN = RETURN;
  29182. });
  29183. $__System.registerDynamic('16a', ['c'], true, function ($__require, exports, module) {
  29184. var process = $__require('c');
  29185. var global = this || self,
  29186. GLOBAL = global;
  29187. module.exports = function (it, Constructor, name, forbiddenField) {
  29188. if (!(it instanceof Constructor) || forbiddenField !== undefined && forbiddenField in it) {
  29189. throw TypeError(name + ': incorrect invocation!');
  29190. }return it;
  29191. };
  29192. });
  29193. $__System.registerDynamic('198', ['10a', '199', '166', 'c'], true, function ($__require, exports, module) {
  29194. var process = $__require('c');
  29195. var global = this || self,
  29196. GLOBAL = global;
  29197. var isObject = $__require('10a'),
  29198. isArray = $__require('199'),
  29199. SPECIES = $__require('166')('species');
  29200. module.exports = function (original) {
  29201. var C;
  29202. if (isArray(original)) {
  29203. C = original.constructor;
  29204. // cross-realm fallback
  29205. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  29206. if (isObject(C)) {
  29207. C = C[SPECIES];
  29208. if (C === null) C = undefined;
  29209. }
  29210. }return C === undefined ? Array : C;
  29211. };
  29212. });
  29213. $__System.registerDynamic('19a', ['198', 'c'], true, function ($__require, exports, module) {
  29214. var process = $__require('c');
  29215. var global = this || self,
  29216. GLOBAL = global;
  29217. // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
  29218. var speciesConstructor = $__require('198');
  29219. module.exports = function (original, length) {
  29220. return new (speciesConstructor(original))(length);
  29221. };
  29222. });
  29223. $__System.registerDynamic('190', ['10c', '18e', '18d', '196', '19a', 'c'], true, function ($__require, exports, module) {
  29224. var process = $__require('c');
  29225. var global = this || self,
  29226. GLOBAL = global;
  29227. // 0 -> Array#forEach
  29228. // 1 -> Array#map
  29229. // 2 -> Array#filter
  29230. // 3 -> Array#some
  29231. // 4 -> Array#every
  29232. // 5 -> Array#find
  29233. // 6 -> Array#findIndex
  29234. var ctx = $__require('10c'),
  29235. IObject = $__require('18e'),
  29236. toObject = $__require('18d'),
  29237. toLength = $__require('196'),
  29238. asc = $__require('19a');
  29239. module.exports = function (TYPE, $create) {
  29240. var IS_MAP = TYPE == 1,
  29241. IS_FILTER = TYPE == 2,
  29242. IS_SOME = TYPE == 3,
  29243. IS_EVERY = TYPE == 4,
  29244. IS_FIND_INDEX = TYPE == 6,
  29245. NO_HOLES = TYPE == 5 || IS_FIND_INDEX,
  29246. create = $create || asc;
  29247. return function ($this, callbackfn, that) {
  29248. var O = toObject($this),
  29249. self = IObject(O),
  29250. f = ctx(callbackfn, that, 3),
  29251. length = toLength(self.length),
  29252. index = 0,
  29253. result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined,
  29254. val,
  29255. res;
  29256. for (; length > index; index++) if (NO_HOLES || index in self) {
  29257. val = self[index];
  29258. res = f(val, index, O);
  29259. if (TYPE) {
  29260. if (IS_MAP) result[index] = res; // map
  29261. else if (res) switch (TYPE) {
  29262. case 3:
  29263. return true; // some
  29264. case 5:
  29265. return val; // find
  29266. case 6:
  29267. return index; // findIndex
  29268. case 2:
  29269. result.push(val); // filter
  29270. } else if (IS_EVERY) return false; // every
  29271. }
  29272. }
  29273. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  29274. };
  29275. };
  29276. });
  29277. $__System.registerDynamic('33', ['163', 'c6', '16f', '18f', '192', '169', '16c', '16a', '10a', '19b', '164', '190', '165', 'c'], true, function ($__require, exports, module) {
  29278. 'use strict';
  29279. var process = $__require('c');
  29280. var global = this || self,
  29281. GLOBAL = global;
  29282. var global = $__require('163'),
  29283. $export = $__require('c6'),
  29284. meta = $__require('16f'),
  29285. fails = $__require('18f'),
  29286. hide = $__require('192'),
  29287. redefineAll = $__require('169'),
  29288. forOf = $__require('16c'),
  29289. anInstance = $__require('16a'),
  29290. isObject = $__require('10a'),
  29291. setToStringTag = $__require('19b'),
  29292. dP = $__require('164').f,
  29293. each = $__require('190')(0),
  29294. DESCRIPTORS = $__require('165');
  29295. module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  29296. var Base = global[NAME],
  29297. C = Base,
  29298. ADDER = IS_MAP ? 'set' : 'add',
  29299. proto = C && C.prototype,
  29300. O = {};
  29301. if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
  29302. new C().entries().next();
  29303. }))) {
  29304. // create collection constructor
  29305. C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
  29306. redefineAll(C.prototype, methods);
  29307. meta.NEED = true;
  29308. } else {
  29309. C = wrapper(function (target, iterable) {
  29310. anInstance(target, C, NAME, '_c');
  29311. target._c = new Base();
  29312. if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target);
  29313. });
  29314. each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) {
  29315. var IS_ADDER = KEY == 'add' || KEY == 'set';
  29316. if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) {
  29317. anInstance(this, C, KEY);
  29318. if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;
  29319. var result = this._c[KEY](a === 0 ? 0 : a, b);
  29320. return IS_ADDER ? this : result;
  29321. });
  29322. });
  29323. if ('size' in proto) dP(C.prototype, 'size', {
  29324. get: function () {
  29325. return this._c.size;
  29326. }
  29327. });
  29328. }
  29329. setToStringTag(C, NAME);
  29330. O[NAME] = C;
  29331. $export($export.G + $export.W + $export.F, O);
  29332. if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
  29333. return C;
  29334. };
  29335. });
  29336. $__System.registerDynamic('19c', ['190', '19d', '16f', 'c7', '32', '10a', '33', 'c'], true, function ($__require, exports, module) {
  29337. 'use strict';
  29338. var process = $__require('c');
  29339. var global = this || self,
  29340. GLOBAL = global;
  29341. var each = $__require('190')(0),
  29342. redefine = $__require('19d'),
  29343. meta = $__require('16f'),
  29344. assign = $__require('c7'),
  29345. weak = $__require('32'),
  29346. isObject = $__require('10a'),
  29347. getWeak = meta.getWeak,
  29348. isExtensible = Object.isExtensible,
  29349. uncaughtFrozenStore = weak.ufstore,
  29350. tmp = {},
  29351. InternalMap;
  29352. var wrapper = function (get) {
  29353. return function WeakMap() {
  29354. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  29355. };
  29356. };
  29357. var methods = {
  29358. // 23.3.3.3 WeakMap.prototype.get(key)
  29359. get: function get(key) {
  29360. if (isObject(key)) {
  29361. var data = getWeak(key);
  29362. if (data === true) return uncaughtFrozenStore(this).get(key);
  29363. return data ? data[this._i] : undefined;
  29364. }
  29365. },
  29366. // 23.3.3.5 WeakMap.prototype.set(key, value)
  29367. set: function set(key, value) {
  29368. return weak.def(this, key, value);
  29369. }
  29370. };
  29371. // 23.3 WeakMap Objects
  29372. var $WeakMap = module.exports = $__require('33')('WeakMap', wrapper, methods, weak, true, true);
  29373. // IE11 WeakMap frozen keys fix
  29374. if (new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7) {
  29375. InternalMap = weak.getConstructor(wrapper);
  29376. assign(InternalMap.prototype, methods);
  29377. meta.NEED = true;
  29378. each(['delete', 'has', 'get', 'set'], function (key) {
  29379. var proto = $WeakMap.prototype,
  29380. method = proto[key];
  29381. redefine(proto, key, function (a, b) {
  29382. // store frozen objects on internal weakmap shim
  29383. if (isObject(a) && !isExtensible(a)) {
  29384. if (!this._f) this._f = new InternalMap();
  29385. var result = this._f[key](a, b);
  29386. return key == 'set' ? this : result;
  29387. // store all the rest on native weakmap
  29388. }return method.call(this, a, b);
  29389. });
  29390. });
  29391. }
  29392. });
  29393. $__System.registerDynamic('19e', ['35', '36', '19c', '37', 'c'], true, function ($__require, exports, module) {
  29394. var process = $__require('c');
  29395. var global = this || self,
  29396. GLOBAL = global;
  29397. $__require('35');
  29398. $__require('36');
  29399. $__require('19c');
  29400. module.exports = $__require('37').WeakMap;
  29401. });
  29402. $__System.registerDynamic("19f", ["19e"], true, function ($__require, exports, module) {
  29403. var global = this || self,
  29404. GLOBAL = global;
  29405. module.exports = { "default": $__require("19e"), __esModule: true };
  29406. });
  29407. $__System.registerDynamic("153", ["19f", "c"], true, function ($__require, exports, module) {
  29408. "use strict";
  29409. var process = $__require("c");
  29410. var global = this || self,
  29411. GLOBAL = global;
  29412. exports.__esModule = true;
  29413. exports.scope = exports.path = undefined;
  29414. var _weakMap = $__require("19f");
  29415. var _weakMap2 = _interopRequireDefault(_weakMap);
  29416. exports.clear = clear;
  29417. exports.clearPath = clearPath;
  29418. exports.clearScope = clearScope;
  29419. function _interopRequireDefault(obj) {
  29420. return obj && obj.__esModule ? obj : { default: obj };
  29421. }
  29422. var path = exports.path = new _weakMap2.default();
  29423. var scope = exports.scope = new _weakMap2.default();
  29424. function clear() {
  29425. clearPath();
  29426. clearScope();
  29427. }
  29428. function clearPath() {
  29429. exports.path = path = new _weakMap2.default();
  29430. }
  29431. function clearScope() {
  29432. exports.scope = scope = new _weakMap2.default();
  29433. }
  29434. });
  29435. $__System.registerDynamic("d0", ["17", "155", "152", "13e", "182", "183", "f", "a5", "11", "153", "c"], true, function ($__require, exports, module) {
  29436. "use strict";
  29437. var process = $__require("c");
  29438. var global = this || self,
  29439. GLOBAL = global;
  29440. exports.__esModule = true;
  29441. exports.visitors = exports.Hub = exports.Scope = exports.NodePath = undefined;
  29442. var _getIterator2 = $__require("17");
  29443. var _getIterator3 = _interopRequireDefault(_getIterator2);
  29444. var _path = $__require("155");
  29445. Object.defineProperty(exports, "NodePath", {
  29446. enumerable: true,
  29447. get: function get() {
  29448. return _interopRequireDefault(_path).default;
  29449. }
  29450. });
  29451. var _scope = $__require("152");
  29452. Object.defineProperty(exports, "Scope", {
  29453. enumerable: true,
  29454. get: function get() {
  29455. return _interopRequireDefault(_scope).default;
  29456. }
  29457. });
  29458. var _hub = $__require("13e");
  29459. Object.defineProperty(exports, "Hub", {
  29460. enumerable: true,
  29461. get: function get() {
  29462. return _interopRequireDefault(_hub).default;
  29463. }
  29464. });
  29465. exports.default = traverse;
  29466. var _context = $__require("182");
  29467. var _context2 = _interopRequireDefault(_context);
  29468. var _visitors = $__require("183");
  29469. var visitors = _interopRequireWildcard(_visitors);
  29470. var _babelMessages = $__require("f");
  29471. var messages = _interopRequireWildcard(_babelMessages);
  29472. var _includes = $__require("a5");
  29473. var _includes2 = _interopRequireDefault(_includes);
  29474. var _babelTypes = $__require("11");
  29475. var t = _interopRequireWildcard(_babelTypes);
  29476. var _cache = $__require("153");
  29477. var cache = _interopRequireWildcard(_cache);
  29478. function _interopRequireWildcard(obj) {
  29479. if (obj && obj.__esModule) {
  29480. return obj;
  29481. } else {
  29482. var newObj = {};if (obj != null) {
  29483. for (var key in obj) {
  29484. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  29485. }
  29486. }newObj.default = obj;return newObj;
  29487. }
  29488. }
  29489. function _interopRequireDefault(obj) {
  29490. return obj && obj.__esModule ? obj : { default: obj };
  29491. }
  29492. exports.visitors = visitors;
  29493. function traverse(parent, opts, scope, state, parentPath) {
  29494. if (!parent) return;
  29495. if (!opts) opts = {};
  29496. if (!opts.noScope && !scope) {
  29497. if (parent.type !== "Program" && parent.type !== "File") {
  29498. throw new Error(messages.get("traverseNeedsParent", parent.type));
  29499. }
  29500. }
  29501. visitors.explode(opts);
  29502. traverse.node(parent, opts, scope, state, parentPath);
  29503. }
  29504. traverse.visitors = visitors;
  29505. traverse.verify = visitors.verify;
  29506. traverse.explode = visitors.explode;
  29507. traverse.NodePath = $__require("155");
  29508. traverse.Scope = $__require("152");
  29509. traverse.Hub = $__require("13e");
  29510. traverse.cheap = function (node, enter) {
  29511. return t.traverseFast(node, enter);
  29512. };
  29513. traverse.node = function (node, opts, scope, state, parentPath, skipKeys) {
  29514. var keys = t.VISITOR_KEYS[node.type];
  29515. if (!keys) return;
  29516. var context = new _context2.default(scope, opts, state, parentPath);
  29517. for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  29518. var _ref;
  29519. if (_isArray) {
  29520. if (_i >= _iterator.length) break;
  29521. _ref = _iterator[_i++];
  29522. } else {
  29523. _i = _iterator.next();
  29524. if (_i.done) break;
  29525. _ref = _i.value;
  29526. }
  29527. var key = _ref;
  29528. if (skipKeys && skipKeys[key]) continue;
  29529. if (context.visit(node, key)) return;
  29530. }
  29531. };
  29532. traverse.clearNode = function (node, opts) {
  29533. t.removeProperties(node, opts);
  29534. cache.path.delete(node);
  29535. };
  29536. traverse.removeProperties = function (tree, opts) {
  29537. t.traverseFast(tree, traverse.clearNode, opts);
  29538. return tree;
  29539. };
  29540. function hasBlacklistedType(path, state) {
  29541. if (path.node.type === state.type) {
  29542. state.has = true;
  29543. path.stop();
  29544. }
  29545. }
  29546. traverse.hasType = function (tree, scope, type, blacklistTypes) {
  29547. if ((0, _includes2.default)(blacklistTypes, tree.type)) return false;
  29548. if (tree.type === type) return true;
  29549. var state = {
  29550. has: false,
  29551. type: type
  29552. };
  29553. traverse(tree, {
  29554. blacklist: blacklistTypes,
  29555. enter: hasBlacklistedType
  29556. }, scope, state);
  29557. return state.has;
  29558. };
  29559. traverse.clearCache = function () {
  29560. cache.clear();
  29561. };
  29562. traverse.clearCache.clearPath = cache.clearPath;
  29563. traverse.clearCache.clearScope = cache.clearScope;
  29564. traverse.copyCache = function (source, destination) {
  29565. if (cache.path.has(source)) {
  29566. cache.path.set(destination, cache.path.get(source));
  29567. }
  29568. };
  29569. });
  29570. $__System.registerDynamic('d7', [], true, function ($__require, exports, module) {
  29571. 'use strict';
  29572. var global = this || self,
  29573. GLOBAL = global;
  29574. Object.defineProperty(exports, '__esModule', { value: true });
  29575. /* eslint max-len: 0 */
  29576. // This is a trick taken from Esprima. It turns out that, on
  29577. // non-Chrome browsers, to check whether a string is in a set, a
  29578. // predicate containing a big ugly `switch` statement is faster than
  29579. // a regular expression, and on Chrome the two are about on par.
  29580. // This function uses `eval` (non-lexical) to produce such a
  29581. // predicate from a space-separated string of words.
  29582. //
  29583. // It starts by sorting the words by length.
  29584. function makePredicate(words) {
  29585. words = words.split(" ");
  29586. return function (str) {
  29587. return words.indexOf(str) >= 0;
  29588. };
  29589. }
  29590. // Reserved word lists for various dialects of the language
  29591. var reservedWords = {
  29592. 6: makePredicate("enum await"),
  29593. strict: makePredicate("implements interface let package private protected public static yield"),
  29594. strictBind: makePredicate("eval arguments")
  29595. };
  29596. // And the keywords
  29597. var isKeyword = makePredicate("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 let const class extends export import yield super");
  29598. // ## Character categories
  29599. // Big ugly regular expressions that match characters in the
  29600. // whitespace, identifier, and identifier-start categories. These
  29601. // are only applied when a character is found to actually have a
  29602. // code point above 128.
  29603. // Generated by `bin/generate-identifier-regex.js`.
  29604. 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\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\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\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-\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\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\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";
  29605. 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\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\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\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\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\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\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\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\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\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\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\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\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";
  29606. var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
  29607. var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
  29608. nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
  29609. // These are a run-length and offset encoded representation of the
  29610. // >0xffff code points that are a valid part of identifiers. The
  29611. // offset starts at 0x10000, and each pair of numbers represents an
  29612. // offset to the next range, and then a size of the range. They were
  29613. // generated by `bin/generate-identifier-regex.js`.
  29614. // eslint-disable-next-line comma-spacing
  29615. var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 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, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 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, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 449, 56, 264, 8, 2, 36, 18, 0, 50, 29, 881, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 65, 0, 32, 6124, 20, 754, 9486, 1, 3071, 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, 4149, 196, 60, 67, 1213, 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, 42710, 42, 4148, 12, 221, 3, 5761, 10591, 541];
  29616. // eslint-disable-next-line comma-spacing
  29617. var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 838, 7, 2, 7, 17, 9, 57, 21, 2, 13, 19882, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 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, 2214, 6, 110, 6, 6, 9, 792487, 239];
  29618. // This has a complexity linear to the value of the code. The
  29619. // assumption is that looking up astral identifier characters is
  29620. // rare.
  29621. function isInAstralSet(code, set) {
  29622. var pos = 0x10000;
  29623. for (var i = 0; i < set.length; i += 2) {
  29624. pos += set[i];
  29625. if (pos > code) return false;
  29626. pos += set[i + 1];
  29627. if (pos >= code) return true;
  29628. }
  29629. }
  29630. // Test whether a given character code starts an identifier.
  29631. function isIdentifierStart(code) {
  29632. if (code < 65) return code === 36;
  29633. if (code < 91) return true;
  29634. if (code < 97) return code === 95;
  29635. if (code < 123) return true;
  29636. if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
  29637. return isInAstralSet(code, astralIdentifierStartCodes);
  29638. }
  29639. // Test whether a given character is part of an identifier.
  29640. function isIdentifierChar(code) {
  29641. if (code < 48) return code === 36;
  29642. if (code < 58) return true;
  29643. if (code < 65) return false;
  29644. if (code < 91) return true;
  29645. if (code < 97) return code === 95;
  29646. if (code < 123) return true;
  29647. if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
  29648. return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
  29649. }
  29650. // A second optional argument can be given to further configure
  29651. var defaultOptions = {
  29652. // Source type ("script" or "module") for different semantics
  29653. sourceType: "script",
  29654. // Source filename.
  29655. sourceFilename: undefined,
  29656. // Line from which to start counting source. Useful for
  29657. // integration with other tools.
  29658. startLine: 1,
  29659. // When enabled, a return at the top level is not considered an
  29660. // error.
  29661. allowReturnOutsideFunction: false,
  29662. // When enabled, import/export statements are not constrained to
  29663. // appearing at the top of the program.
  29664. allowImportExportEverywhere: false,
  29665. // TODO
  29666. allowSuperOutsideMethod: false,
  29667. // An array of plugins to enable
  29668. plugins: [],
  29669. // TODO
  29670. strictMode: null
  29671. };
  29672. // Interpret and default an options object
  29673. function getOptions(opts) {
  29674. var options = {};
  29675. for (var key in defaultOptions) {
  29676. options[key] = opts && key in opts ? opts[key] : defaultOptions[key];
  29677. }
  29678. return options;
  29679. }
  29680. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
  29681. return typeof obj;
  29682. } : function (obj) {
  29683. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  29684. };
  29685. var classCallCheck = function (instance, Constructor) {
  29686. if (!(instance instanceof Constructor)) {
  29687. throw new TypeError("Cannot call a class as a function");
  29688. }
  29689. };
  29690. var inherits = function (subClass, superClass) {
  29691. if (typeof superClass !== "function" && superClass !== null) {
  29692. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  29693. }
  29694. subClass.prototype = Object.create(superClass && superClass.prototype, {
  29695. constructor: {
  29696. value: subClass,
  29697. enumerable: false,
  29698. writable: true,
  29699. configurable: true
  29700. }
  29701. });
  29702. if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  29703. };
  29704. var possibleConstructorReturn = function (self, call) {
  29705. if (!self) {
  29706. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  29707. }
  29708. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  29709. };
  29710. // ## Token types
  29711. // The assignment of fine-grained, information-carrying type objects
  29712. // allows the tokenizer to store the information it has about a
  29713. // token in a way that is very cheap for the parser to look up.
  29714. // All token type variables start with an underscore, to make them
  29715. // easy to recognize.
  29716. // The `beforeExpr` property is used to disambiguate between regular
  29717. // expressions and divisions. It is set on all token types that can
  29718. // be followed by an expression (thus, a slash after them would be a
  29719. // regular expression).
  29720. //
  29721. // `isLoop` marks a keyword as starting a loop, which is important
  29722. // to know when parsing a label, in order to allow or disallow
  29723. // continue jumps to that label.
  29724. var beforeExpr = true;
  29725. var startsExpr = true;
  29726. var isLoop = true;
  29727. var isAssign = true;
  29728. var prefix = true;
  29729. var postfix = true;
  29730. var TokenType = function TokenType(label) {
  29731. var conf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  29732. classCallCheck(this, TokenType);
  29733. this.label = label;
  29734. this.keyword = conf.keyword;
  29735. this.beforeExpr = !!conf.beforeExpr;
  29736. this.startsExpr = !!conf.startsExpr;
  29737. this.rightAssociative = !!conf.rightAssociative;
  29738. this.isLoop = !!conf.isLoop;
  29739. this.isAssign = !!conf.isAssign;
  29740. this.prefix = !!conf.prefix;
  29741. this.postfix = !!conf.postfix;
  29742. this.binop = conf.binop || null;
  29743. this.updateContext = null;
  29744. };
  29745. var KeywordTokenType = function (_TokenType) {
  29746. inherits(KeywordTokenType, _TokenType);
  29747. function KeywordTokenType(name) {
  29748. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  29749. classCallCheck(this, KeywordTokenType);
  29750. options.keyword = name;
  29751. return possibleConstructorReturn(this, _TokenType.call(this, name, options));
  29752. }
  29753. return KeywordTokenType;
  29754. }(TokenType);
  29755. var BinopTokenType = function (_TokenType2) {
  29756. inherits(BinopTokenType, _TokenType2);
  29757. function BinopTokenType(name, prec) {
  29758. classCallCheck(this, BinopTokenType);
  29759. return possibleConstructorReturn(this, _TokenType2.call(this, name, { beforeExpr: beforeExpr, binop: prec }));
  29760. }
  29761. return BinopTokenType;
  29762. }(TokenType);
  29763. var types = {
  29764. num: new TokenType("num", { startsExpr: startsExpr }),
  29765. regexp: new TokenType("regexp", { startsExpr: startsExpr }),
  29766. string: new TokenType("string", { startsExpr: startsExpr }),
  29767. name: new TokenType("name", { startsExpr: startsExpr }),
  29768. eof: new TokenType("eof"),
  29769. // Punctuation token types.
  29770. bracketL: new TokenType("[", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
  29771. bracketR: new TokenType("]"),
  29772. braceL: new TokenType("{", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
  29773. braceBarL: new TokenType("{|", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
  29774. braceR: new TokenType("}"),
  29775. braceBarR: new TokenType("|}"),
  29776. parenL: new TokenType("(", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
  29777. parenR: new TokenType(")"),
  29778. comma: new TokenType(",", { beforeExpr: beforeExpr }),
  29779. semi: new TokenType(";", { beforeExpr: beforeExpr }),
  29780. colon: new TokenType(":", { beforeExpr: beforeExpr }),
  29781. doubleColon: new TokenType("::", { beforeExpr: beforeExpr }),
  29782. dot: new TokenType("."),
  29783. question: new TokenType("?", { beforeExpr: beforeExpr }),
  29784. arrow: new TokenType("=>", { beforeExpr: beforeExpr }),
  29785. template: new TokenType("template"),
  29786. ellipsis: new TokenType("...", { beforeExpr: beforeExpr }),
  29787. backQuote: new TokenType("`", { startsExpr: startsExpr }),
  29788. dollarBraceL: new TokenType("${", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
  29789. at: new TokenType("@"),
  29790. // Operators. These carry several kinds of properties to help the
  29791. // parser use them properly (the presence of these properties is
  29792. // what categorizes them as operators).
  29793. //
  29794. // `binop`, when present, specifies that this operator is a binary
  29795. // operator, and will refer to its precedence.
  29796. //
  29797. // `prefix` and `postfix` mark the operator as a prefix or postfix
  29798. // unary operator.
  29799. //
  29800. // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
  29801. // binary operators with a very low precedence, that should result
  29802. // in AssignmentExpression nodes.
  29803. eq: new TokenType("=", { beforeExpr: beforeExpr, isAssign: isAssign }),
  29804. assign: new TokenType("_=", { beforeExpr: beforeExpr, isAssign: isAssign }),
  29805. incDec: new TokenType("++/--", { prefix: prefix, postfix: postfix, startsExpr: startsExpr }),
  29806. prefix: new TokenType("prefix", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }),
  29807. logicalOR: new BinopTokenType("||", 1),
  29808. logicalAND: new BinopTokenType("&&", 2),
  29809. bitwiseOR: new BinopTokenType("|", 3),
  29810. bitwiseXOR: new BinopTokenType("^", 4),
  29811. bitwiseAND: new BinopTokenType("&", 5),
  29812. equality: new BinopTokenType("==/!=", 6),
  29813. relational: new BinopTokenType("</>", 7),
  29814. bitShift: new BinopTokenType("<</>>", 8),
  29815. plusMin: new TokenType("+/-", { beforeExpr: beforeExpr, binop: 9, prefix: prefix, startsExpr: startsExpr }),
  29816. modulo: new BinopTokenType("%", 10),
  29817. star: new BinopTokenType("*", 10),
  29818. slash: new BinopTokenType("/", 10),
  29819. exponent: new TokenType("**", { beforeExpr: beforeExpr, binop: 11, rightAssociative: true })
  29820. };
  29821. var keywords = {
  29822. "break": new KeywordTokenType("break"),
  29823. "case": new KeywordTokenType("case", { beforeExpr: beforeExpr }),
  29824. "catch": new KeywordTokenType("catch"),
  29825. "continue": new KeywordTokenType("continue"),
  29826. "debugger": new KeywordTokenType("debugger"),
  29827. "default": new KeywordTokenType("default", { beforeExpr: beforeExpr }),
  29828. "do": new KeywordTokenType("do", { isLoop: isLoop, beforeExpr: beforeExpr }),
  29829. "else": new KeywordTokenType("else", { beforeExpr: beforeExpr }),
  29830. "finally": new KeywordTokenType("finally"),
  29831. "for": new KeywordTokenType("for", { isLoop: isLoop }),
  29832. "function": new KeywordTokenType("function", { startsExpr: startsExpr }),
  29833. "if": new KeywordTokenType("if"),
  29834. "return": new KeywordTokenType("return", { beforeExpr: beforeExpr }),
  29835. "switch": new KeywordTokenType("switch"),
  29836. "throw": new KeywordTokenType("throw", { beforeExpr: beforeExpr }),
  29837. "try": new KeywordTokenType("try"),
  29838. "var": new KeywordTokenType("var"),
  29839. "let": new KeywordTokenType("let"),
  29840. "const": new KeywordTokenType("const"),
  29841. "while": new KeywordTokenType("while", { isLoop: isLoop }),
  29842. "with": new KeywordTokenType("with"),
  29843. "new": new KeywordTokenType("new", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
  29844. "this": new KeywordTokenType("this", { startsExpr: startsExpr }),
  29845. "super": new KeywordTokenType("super", { startsExpr: startsExpr }),
  29846. "class": new KeywordTokenType("class"),
  29847. "extends": new KeywordTokenType("extends", { beforeExpr: beforeExpr }),
  29848. "export": new KeywordTokenType("export"),
  29849. "import": new KeywordTokenType("import", { startsExpr: startsExpr }),
  29850. "yield": new KeywordTokenType("yield", { beforeExpr: beforeExpr, startsExpr: startsExpr }),
  29851. "null": new KeywordTokenType("null", { startsExpr: startsExpr }),
  29852. "true": new KeywordTokenType("true", { startsExpr: startsExpr }),
  29853. "false": new KeywordTokenType("false", { startsExpr: startsExpr }),
  29854. "in": new KeywordTokenType("in", { beforeExpr: beforeExpr, binop: 7 }),
  29855. "instanceof": new KeywordTokenType("instanceof", { beforeExpr: beforeExpr, binop: 7 }),
  29856. "typeof": new KeywordTokenType("typeof", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }),
  29857. "void": new KeywordTokenType("void", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr }),
  29858. "delete": new KeywordTokenType("delete", { beforeExpr: beforeExpr, prefix: prefix, startsExpr: startsExpr })
  29859. };
  29860. // Map keyword names to token types.
  29861. Object.keys(keywords).forEach(function (name) {
  29862. types["_" + name] = keywords[name];
  29863. });
  29864. // Matches a whole line break (where CRLF is considered a single
  29865. // line break). Used to count lines.
  29866. var lineBreak = /\r\n?|\n|\u2028|\u2029/;
  29867. var lineBreakG = new RegExp(lineBreak.source, "g");
  29868. function isNewLine(code) {
  29869. return code === 10 || code === 13 || code === 0x2028 || code === 0x2029;
  29870. }
  29871. var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
  29872. // The algorithm used to determine whether a regexp can appear at a
  29873. // given point in the program is loosely based on sweet.js' approach.
  29874. // See https://github.com/mozilla/sweet.js/wiki/design
  29875. var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
  29876. classCallCheck(this, TokContext);
  29877. this.token = token;
  29878. this.isExpr = !!isExpr;
  29879. this.preserveSpace = !!preserveSpace;
  29880. this.override = override;
  29881. };
  29882. var types$1 = {
  29883. braceStatement: new TokContext("{", false),
  29884. braceExpression: new TokContext("{", true),
  29885. templateQuasi: new TokContext("${", true),
  29886. parenStatement: new TokContext("(", false),
  29887. parenExpression: new TokContext("(", true),
  29888. template: new TokContext("`", true, true, function (p) {
  29889. return p.readTmplToken();
  29890. }),
  29891. functionExpression: new TokContext("function", true)
  29892. };
  29893. // Token-specific context update code
  29894. types.parenR.updateContext = types.braceR.updateContext = function () {
  29895. if (this.state.context.length === 1) {
  29896. this.state.exprAllowed = true;
  29897. return;
  29898. }
  29899. var out = this.state.context.pop();
  29900. if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) {
  29901. this.state.context.pop();
  29902. this.state.exprAllowed = false;
  29903. } else if (out === types$1.templateQuasi) {
  29904. this.state.exprAllowed = true;
  29905. } else {
  29906. this.state.exprAllowed = !out.isExpr;
  29907. }
  29908. };
  29909. types.name.updateContext = function (prevType) {
  29910. this.state.exprAllowed = false;
  29911. if (prevType === types._let || prevType === types._const || prevType === types._var) {
  29912. if (lineBreak.test(this.input.slice(this.state.end))) {
  29913. this.state.exprAllowed = true;
  29914. }
  29915. }
  29916. };
  29917. types.braceL.updateContext = function (prevType) {
  29918. this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression);
  29919. this.state.exprAllowed = true;
  29920. };
  29921. types.dollarBraceL.updateContext = function () {
  29922. this.state.context.push(types$1.templateQuasi);
  29923. this.state.exprAllowed = true;
  29924. };
  29925. types.parenL.updateContext = function (prevType) {
  29926. var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;
  29927. this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression);
  29928. this.state.exprAllowed = true;
  29929. };
  29930. types.incDec.updateContext = function () {
  29931. // tokExprAllowed stays unchanged
  29932. };
  29933. types._function.updateContext = function () {
  29934. if (this.curContext() !== types$1.braceStatement) {
  29935. this.state.context.push(types$1.functionExpression);
  29936. }
  29937. this.state.exprAllowed = false;
  29938. };
  29939. types.backQuote.updateContext = function () {
  29940. if (this.curContext() === types$1.template) {
  29941. this.state.context.pop();
  29942. } else {
  29943. this.state.context.push(types$1.template);
  29944. }
  29945. this.state.exprAllowed = false;
  29946. };
  29947. // These are used when `options.locations` is on, for the
  29948. // `startLoc` and `endLoc` properties.
  29949. var Position = function Position(line, col) {
  29950. classCallCheck(this, Position);
  29951. this.line = line;
  29952. this.column = col;
  29953. };
  29954. var SourceLocation = function SourceLocation(start, end) {
  29955. classCallCheck(this, SourceLocation);
  29956. this.start = start;
  29957. this.end = end;
  29958. };
  29959. // The `getLineInfo` function is mostly useful when the
  29960. // `locations` option is off (for performance reasons) and you
  29961. // want to find the line/column position for a given character
  29962. // offset. `input` should be the code string that the offset refers
  29963. // into.
  29964. function getLineInfo(input, offset) {
  29965. for (var line = 1, cur = 0;;) {
  29966. lineBreakG.lastIndex = cur;
  29967. var match = lineBreakG.exec(input);
  29968. if (match && match.index < offset) {
  29969. ++line;
  29970. cur = match.index + match[0].length;
  29971. } else {
  29972. return new Position(line, offset - cur);
  29973. }
  29974. }
  29975. }
  29976. var State = function () {
  29977. function State() {
  29978. classCallCheck(this, State);
  29979. }
  29980. State.prototype.init = function init(options, input) {
  29981. this.strict = options.strictMode === false ? false : options.sourceType === "module";
  29982. this.input = input;
  29983. this.potentialArrowAt = -1;
  29984. this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.inClassProperty = this.noAnonFunctionType = false;
  29985. this.labels = [];
  29986. this.decorators = [];
  29987. this.tokens = [];
  29988. this.comments = [];
  29989. this.trailingComments = [];
  29990. this.leadingComments = [];
  29991. this.commentStack = [];
  29992. this.pos = this.lineStart = 0;
  29993. this.curLine = options.startLine;
  29994. this.type = types.eof;
  29995. this.value = null;
  29996. this.start = this.end = this.pos;
  29997. this.startLoc = this.endLoc = this.curPosition();
  29998. this.lastTokEndLoc = this.lastTokStartLoc = null;
  29999. this.lastTokStart = this.lastTokEnd = this.pos;
  30000. this.context = [types$1.braceStatement];
  30001. this.exprAllowed = true;
  30002. this.containsEsc = this.containsOctal = false;
  30003. this.octalPosition = null;
  30004. this.invalidTemplateEscapePosition = null;
  30005. this.exportedIdentifiers = [];
  30006. return this;
  30007. };
  30008. // TODO
  30009. // TODO
  30010. // Used to signify the start of a potential arrow function
  30011. // Flags to track whether we are in a function, a generator.
  30012. // Labels in scope.
  30013. // Leading decorators.
  30014. // Token store.
  30015. // Comment store.
  30016. // Comment attachment store
  30017. // The current position of the tokenizer in the input.
  30018. // Properties of the current token:
  30019. // Its type
  30020. // For tokens that include more information than their type, the value
  30021. // Its start and end offset
  30022. // And, if locations are used, the {line, column} object
  30023. // corresponding to those offsets
  30024. // Position information for the previous token
  30025. // The context stack is used to superficially track syntactic
  30026. // context to predict whether a regular expression is allowed in a
  30027. // given position.
  30028. // Used to signal to callers of `readWord1` whether the word
  30029. // contained any escape sequences. This is needed because words with
  30030. // escape sequences must not be interpreted as keywords.
  30031. // TODO
  30032. // Names of exports store. `default` is stored as a name for both
  30033. // `export default foo;` and `export { foo as default };`.
  30034. State.prototype.curPosition = function curPosition() {
  30035. return new Position(this.curLine, this.pos - this.lineStart);
  30036. };
  30037. State.prototype.clone = function clone(skipArrays) {
  30038. var state = new State();
  30039. for (var key in this) {
  30040. var val = this[key];
  30041. if ((!skipArrays || key === "context") && Array.isArray(val)) {
  30042. val = val.slice();
  30043. }
  30044. state[key] = val;
  30045. }
  30046. return state;
  30047. };
  30048. return State;
  30049. }();
  30050. // Object type used to represent tokens. Note that normally, tokens
  30051. // simply exist as properties on the parser object. This is only
  30052. // used for the onToken callback and the external tokenizer.
  30053. var Token = function Token(state) {
  30054. classCallCheck(this, Token);
  30055. this.type = state.type;
  30056. this.value = state.value;
  30057. this.start = state.start;
  30058. this.end = state.end;
  30059. this.loc = new SourceLocation(state.startLoc, state.endLoc);
  30060. };
  30061. // ## Tokenizer
  30062. function codePointToString(code) {
  30063. // UTF-16 Decoding
  30064. if (code <= 0xFFFF) {
  30065. return String.fromCharCode(code);
  30066. } else {
  30067. return String.fromCharCode((code - 0x10000 >> 10) + 0xD800, (code - 0x10000 & 1023) + 0xDC00);
  30068. }
  30069. }
  30070. var Tokenizer = function () {
  30071. function Tokenizer(options, input) {
  30072. classCallCheck(this, Tokenizer);
  30073. this.state = new State();
  30074. this.state.init(options, input);
  30075. }
  30076. // Move to the next token
  30077. Tokenizer.prototype.next = function next() {
  30078. if (!this.isLookahead) {
  30079. this.state.tokens.push(new Token(this.state));
  30080. }
  30081. this.state.lastTokEnd = this.state.end;
  30082. this.state.lastTokStart = this.state.start;
  30083. this.state.lastTokEndLoc = this.state.endLoc;
  30084. this.state.lastTokStartLoc = this.state.startLoc;
  30085. this.nextToken();
  30086. };
  30087. // TODO
  30088. Tokenizer.prototype.eat = function eat(type) {
  30089. if (this.match(type)) {
  30090. this.next();
  30091. return true;
  30092. } else {
  30093. return false;
  30094. }
  30095. };
  30096. // TODO
  30097. Tokenizer.prototype.match = function match(type) {
  30098. return this.state.type === type;
  30099. };
  30100. // TODO
  30101. Tokenizer.prototype.isKeyword = function isKeyword$$1(word) {
  30102. return isKeyword(word);
  30103. };
  30104. // TODO
  30105. Tokenizer.prototype.lookahead = function lookahead() {
  30106. var old = this.state;
  30107. this.state = old.clone(true);
  30108. this.isLookahead = true;
  30109. this.next();
  30110. this.isLookahead = false;
  30111. var curr = this.state.clone(true);
  30112. this.state = old;
  30113. return curr;
  30114. };
  30115. // Toggle strict mode. Re-reads the next number or string to please
  30116. // pedantic tests (`"use strict"; 010;` should fail).
  30117. Tokenizer.prototype.setStrict = function setStrict(strict) {
  30118. this.state.strict = strict;
  30119. if (!this.match(types.num) && !this.match(types.string)) return;
  30120. this.state.pos = this.state.start;
  30121. while (this.state.pos < this.state.lineStart) {
  30122. this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1;
  30123. --this.state.curLine;
  30124. }
  30125. this.nextToken();
  30126. };
  30127. Tokenizer.prototype.curContext = function curContext() {
  30128. return this.state.context[this.state.context.length - 1];
  30129. };
  30130. // Read a single token, updating the parser object's token-related
  30131. // properties.
  30132. Tokenizer.prototype.nextToken = function nextToken() {
  30133. var curContext = this.curContext();
  30134. if (!curContext || !curContext.preserveSpace) this.skipSpace();
  30135. this.state.containsOctal = false;
  30136. this.state.octalPosition = null;
  30137. this.state.start = this.state.pos;
  30138. this.state.startLoc = this.state.curPosition();
  30139. if (this.state.pos >= this.input.length) return this.finishToken(types.eof);
  30140. if (curContext.override) {
  30141. return curContext.override(this);
  30142. } else {
  30143. return this.readToken(this.fullCharCodeAtPos());
  30144. }
  30145. };
  30146. Tokenizer.prototype.readToken = function readToken(code) {
  30147. // Identifier or keyword. '\uXXXX' sequences are allowed in
  30148. // identifiers, so '\' also dispatches to that.
  30149. if (isIdentifierStart(code) || code === 92 /* '\' */) {
  30150. return this.readWord();
  30151. } else {
  30152. return this.getTokenFromCode(code);
  30153. }
  30154. };
  30155. Tokenizer.prototype.fullCharCodeAtPos = function fullCharCodeAtPos() {
  30156. var code = this.input.charCodeAt(this.state.pos);
  30157. if (code <= 0xd7ff || code >= 0xe000) return code;
  30158. var next = this.input.charCodeAt(this.state.pos + 1);
  30159. return (code << 10) + next - 0x35fdc00;
  30160. };
  30161. Tokenizer.prototype.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) {
  30162. var comment = {
  30163. type: block ? "CommentBlock" : "CommentLine",
  30164. value: text,
  30165. start: start,
  30166. end: end,
  30167. loc: new SourceLocation(startLoc, endLoc)
  30168. };
  30169. if (!this.isLookahead) {
  30170. this.state.tokens.push(comment);
  30171. this.state.comments.push(comment);
  30172. this.addComment(comment);
  30173. }
  30174. };
  30175. Tokenizer.prototype.skipBlockComment = function skipBlockComment() {
  30176. var startLoc = this.state.curPosition();
  30177. var start = this.state.pos;
  30178. var end = this.input.indexOf("*/", this.state.pos += 2);
  30179. if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
  30180. this.state.pos = end + 2;
  30181. lineBreakG.lastIndex = start;
  30182. var match = void 0;
  30183. while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) {
  30184. ++this.state.curLine;
  30185. this.state.lineStart = match.index + match[0].length;
  30186. }
  30187. this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition());
  30188. };
  30189. Tokenizer.prototype.skipLineComment = function skipLineComment(startSkip) {
  30190. var start = this.state.pos;
  30191. var startLoc = this.state.curPosition();
  30192. var ch = this.input.charCodeAt(this.state.pos += startSkip);
  30193. while (this.state.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
  30194. ++this.state.pos;
  30195. ch = this.input.charCodeAt(this.state.pos);
  30196. }
  30197. this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition());
  30198. };
  30199. // Called at the start of the parse and after every token. Skips
  30200. // whitespace and comments, and.
  30201. Tokenizer.prototype.skipSpace = function skipSpace() {
  30202. loop: while (this.state.pos < this.input.length) {
  30203. var ch = this.input.charCodeAt(this.state.pos);
  30204. switch (ch) {
  30205. case 32:case 160:
  30206. // ' '
  30207. ++this.state.pos;
  30208. break;
  30209. case 13:
  30210. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  30211. ++this.state.pos;
  30212. }
  30213. case 10:case 8232:case 8233:
  30214. ++this.state.pos;
  30215. ++this.state.curLine;
  30216. this.state.lineStart = this.state.pos;
  30217. break;
  30218. case 47:
  30219. // '/'
  30220. switch (this.input.charCodeAt(this.state.pos + 1)) {
  30221. case 42:
  30222. // '*'
  30223. this.skipBlockComment();
  30224. break;
  30225. case 47:
  30226. this.skipLineComment(2);
  30227. break;
  30228. default:
  30229. break loop;
  30230. }
  30231. break;
  30232. default:
  30233. if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
  30234. ++this.state.pos;
  30235. } else {
  30236. break loop;
  30237. }
  30238. }
  30239. }
  30240. };
  30241. // Called at the end of every token. Sets `end`, `val`, and
  30242. // maintains `context` and `exprAllowed`, and skips the space after
  30243. // the token, so that the next one's `start` will point at the
  30244. // right position.
  30245. Tokenizer.prototype.finishToken = function finishToken(type, val) {
  30246. this.state.end = this.state.pos;
  30247. this.state.endLoc = this.state.curPosition();
  30248. var prevType = this.state.type;
  30249. this.state.type = type;
  30250. this.state.value = val;
  30251. this.updateContext(prevType);
  30252. };
  30253. // ### Token reading
  30254. // This is the function that is called to fetch the next token. It
  30255. // is somewhat obscure, because it works in character codes rather
  30256. // than characters, and because operator parsing has been inlined
  30257. // into it.
  30258. //
  30259. // All in the name of speed.
  30260. //
  30261. Tokenizer.prototype.readToken_dot = function readToken_dot() {
  30262. var next = this.input.charCodeAt(this.state.pos + 1);
  30263. if (next >= 48 && next <= 57) {
  30264. return this.readNumber(true);
  30265. }
  30266. var next2 = this.input.charCodeAt(this.state.pos + 2);
  30267. if (next === 46 && next2 === 46) {
  30268. // 46 = dot '.'
  30269. this.state.pos += 3;
  30270. return this.finishToken(types.ellipsis);
  30271. } else {
  30272. ++this.state.pos;
  30273. return this.finishToken(types.dot);
  30274. }
  30275. };
  30276. Tokenizer.prototype.readToken_slash = function readToken_slash() {
  30277. // '/'
  30278. if (this.state.exprAllowed) {
  30279. ++this.state.pos;
  30280. return this.readRegexp();
  30281. }
  30282. var next = this.input.charCodeAt(this.state.pos + 1);
  30283. if (next === 61) {
  30284. return this.finishOp(types.assign, 2);
  30285. } else {
  30286. return this.finishOp(types.slash, 1);
  30287. }
  30288. };
  30289. Tokenizer.prototype.readToken_mult_modulo = function readToken_mult_modulo(code) {
  30290. // '%*'
  30291. var type = code === 42 ? types.star : types.modulo;
  30292. var width = 1;
  30293. var next = this.input.charCodeAt(this.state.pos + 1);
  30294. if (next === 42) {
  30295. // '*'
  30296. width++;
  30297. next = this.input.charCodeAt(this.state.pos + 2);
  30298. type = types.exponent;
  30299. }
  30300. if (next === 61) {
  30301. width++;
  30302. type = types.assign;
  30303. }
  30304. return this.finishOp(type, width);
  30305. };
  30306. Tokenizer.prototype.readToken_pipe_amp = function readToken_pipe_amp(code) {
  30307. // '|&'
  30308. var next = this.input.charCodeAt(this.state.pos + 1);
  30309. if (next === code) return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2);
  30310. if (next === 61) return this.finishOp(types.assign, 2);
  30311. if (code === 124 && next === 125 && this.hasPlugin("flow")) return this.finishOp(types.braceBarR, 2);
  30312. return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1);
  30313. };
  30314. Tokenizer.prototype.readToken_caret = function readToken_caret() {
  30315. // '^'
  30316. var next = this.input.charCodeAt(this.state.pos + 1);
  30317. if (next === 61) {
  30318. return this.finishOp(types.assign, 2);
  30319. } else {
  30320. return this.finishOp(types.bitwiseXOR, 1);
  30321. }
  30322. };
  30323. Tokenizer.prototype.readToken_plus_min = function readToken_plus_min(code) {
  30324. // '+-'
  30325. var next = this.input.charCodeAt(this.state.pos + 1);
  30326. if (next === code) {
  30327. if (next === 45 && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) {
  30328. // A `-->` line comment
  30329. this.skipLineComment(3);
  30330. this.skipSpace();
  30331. return this.nextToken();
  30332. }
  30333. return this.finishOp(types.incDec, 2);
  30334. }
  30335. if (next === 61) {
  30336. return this.finishOp(types.assign, 2);
  30337. } else {
  30338. return this.finishOp(types.plusMin, 1);
  30339. }
  30340. };
  30341. Tokenizer.prototype.readToken_lt_gt = function readToken_lt_gt(code) {
  30342. // '<>'
  30343. var next = this.input.charCodeAt(this.state.pos + 1);
  30344. var size = 1;
  30345. if (next === code) {
  30346. size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
  30347. if (this.input.charCodeAt(this.state.pos + size) === 61) return this.finishOp(types.assign, size + 1);
  30348. return this.finishOp(types.bitShift, size);
  30349. }
  30350. if (next === 33 && code === 60 && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
  30351. if (this.inModule) this.unexpected();
  30352. // `<!--`, an XML-style comment that should be interpreted as a line comment
  30353. this.skipLineComment(4);
  30354. this.skipSpace();
  30355. return this.nextToken();
  30356. }
  30357. if (next === 61) {
  30358. // <= | >=
  30359. size = 2;
  30360. }
  30361. return this.finishOp(types.relational, size);
  30362. };
  30363. Tokenizer.prototype.readToken_eq_excl = function readToken_eq_excl(code) {
  30364. // '=!'
  30365. var next = this.input.charCodeAt(this.state.pos + 1);
  30366. if (next === 61) return this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  30367. if (code === 61 && next === 62) {
  30368. // '=>'
  30369. this.state.pos += 2;
  30370. return this.finishToken(types.arrow);
  30371. }
  30372. return this.finishOp(code === 61 ? types.eq : types.prefix, 1);
  30373. };
  30374. Tokenizer.prototype.getTokenFromCode = function getTokenFromCode(code) {
  30375. switch (code) {
  30376. // The interpretation of a dot depends on whether it is followed
  30377. // by a digit or another two dots.
  30378. case 46:
  30379. // '.'
  30380. return this.readToken_dot();
  30381. // Punctuation tokens.
  30382. case 40:
  30383. ++this.state.pos;return this.finishToken(types.parenL);
  30384. case 41:
  30385. ++this.state.pos;return this.finishToken(types.parenR);
  30386. case 59:
  30387. ++this.state.pos;return this.finishToken(types.semi);
  30388. case 44:
  30389. ++this.state.pos;return this.finishToken(types.comma);
  30390. case 91:
  30391. ++this.state.pos;return this.finishToken(types.bracketL);
  30392. case 93:
  30393. ++this.state.pos;return this.finishToken(types.bracketR);
  30394. case 123:
  30395. if (this.hasPlugin("flow") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  30396. return this.finishOp(types.braceBarL, 2);
  30397. } else {
  30398. ++this.state.pos;
  30399. return this.finishToken(types.braceL);
  30400. }
  30401. case 125:
  30402. ++this.state.pos;return this.finishToken(types.braceR);
  30403. case 58:
  30404. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  30405. return this.finishOp(types.doubleColon, 2);
  30406. } else {
  30407. ++this.state.pos;
  30408. return this.finishToken(types.colon);
  30409. }
  30410. case 63:
  30411. ++this.state.pos;return this.finishToken(types.question);
  30412. case 64:
  30413. ++this.state.pos;return this.finishToken(types.at);
  30414. case 96:
  30415. // '`'
  30416. ++this.state.pos;
  30417. return this.finishToken(types.backQuote);
  30418. case 48:
  30419. // '0'
  30420. var next = this.input.charCodeAt(this.state.pos + 1);
  30421. if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number
  30422. if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number
  30423. if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
  30424. // Anything else beginning with a digit is an integer, octal
  30425. // number, or float.
  30426. case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:
  30427. // 1-9
  30428. return this.readNumber(false);
  30429. // Quotes produce strings.
  30430. case 34:case 39:
  30431. // '"', "'"
  30432. return this.readString(code);
  30433. // Operators are parsed inline in tiny state machines. '=' (61) is
  30434. // often referred to. `finishOp` simply skips the amount of
  30435. // characters it is given as second argument, and returns a token
  30436. // of the type given by its first argument.
  30437. case 47:
  30438. // '/'
  30439. return this.readToken_slash();
  30440. case 37:case 42:
  30441. // '%*'
  30442. return this.readToken_mult_modulo(code);
  30443. case 124:case 38:
  30444. // '|&'
  30445. return this.readToken_pipe_amp(code);
  30446. case 94:
  30447. // '^'
  30448. return this.readToken_caret();
  30449. case 43:case 45:
  30450. // '+-'
  30451. return this.readToken_plus_min(code);
  30452. case 60:case 62:
  30453. // '<>'
  30454. return this.readToken_lt_gt(code);
  30455. case 61:case 33:
  30456. // '=!'
  30457. return this.readToken_eq_excl(code);
  30458. case 126:
  30459. // '~'
  30460. return this.finishOp(types.prefix, 1);
  30461. }
  30462. this.raise(this.state.pos, "Unexpected character '" + codePointToString(code) + "'");
  30463. };
  30464. Tokenizer.prototype.finishOp = function finishOp(type, size) {
  30465. var str = this.input.slice(this.state.pos, this.state.pos + size);
  30466. this.state.pos += size;
  30467. return this.finishToken(type, str);
  30468. };
  30469. Tokenizer.prototype.readRegexp = function readRegexp() {
  30470. var start = this.state.pos;
  30471. var escaped = void 0,
  30472. inClass = void 0;
  30473. for (;;) {
  30474. if (this.state.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
  30475. var ch = this.input.charAt(this.state.pos);
  30476. if (lineBreak.test(ch)) {
  30477. this.raise(start, "Unterminated regular expression");
  30478. }
  30479. if (escaped) {
  30480. escaped = false;
  30481. } else {
  30482. if (ch === "[") {
  30483. inClass = true;
  30484. } else if (ch === "]" && inClass) {
  30485. inClass = false;
  30486. } else if (ch === "/" && !inClass) {
  30487. break;
  30488. }
  30489. escaped = ch === "\\";
  30490. }
  30491. ++this.state.pos;
  30492. }
  30493. var content = this.input.slice(start, this.state.pos);
  30494. ++this.state.pos;
  30495. // Need to use `readWord1` because '\uXXXX' sequences are allowed
  30496. // here (don't ask).
  30497. var mods = this.readWord1();
  30498. if (mods) {
  30499. var validFlags = /^[gmsiyu]*$/;
  30500. if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
  30501. }
  30502. return this.finishToken(types.regexp, {
  30503. pattern: content,
  30504. flags: mods
  30505. });
  30506. };
  30507. // Read an integer in the given radix. Return null if zero digits
  30508. // were read, the integer value otherwise. When `len` is given, this
  30509. // will return `null` unless the integer has exactly `len` digits.
  30510. Tokenizer.prototype.readInt = function readInt(radix, len) {
  30511. var start = this.state.pos;
  30512. var total = 0;
  30513. for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  30514. var code = this.input.charCodeAt(this.state.pos);
  30515. var val = void 0;
  30516. if (code >= 97) {
  30517. val = code - 97 + 10; // a
  30518. } else if (code >= 65) {
  30519. val = code - 65 + 10; // A
  30520. } else if (code >= 48 && code <= 57) {
  30521. val = code - 48; // 0-9
  30522. } else {
  30523. val = Infinity;
  30524. }
  30525. if (val >= radix) break;
  30526. ++this.state.pos;
  30527. total = total * radix + val;
  30528. }
  30529. if (this.state.pos === start || len != null && this.state.pos - start !== len) return null;
  30530. return total;
  30531. };
  30532. Tokenizer.prototype.readRadixNumber = function readRadixNumber(radix) {
  30533. this.state.pos += 2; // 0x
  30534. var val = this.readInt(radix);
  30535. if (val == null) this.raise(this.state.start + 2, "Expected number in radix " + radix);
  30536. if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
  30537. return this.finishToken(types.num, val);
  30538. };
  30539. // Read an integer, octal integer, or floating-point number.
  30540. Tokenizer.prototype.readNumber = function readNumber(startsWithDot) {
  30541. var start = this.state.pos;
  30542. var octal = this.input.charCodeAt(start) === 48; // '0'
  30543. var isFloat = false;
  30544. if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
  30545. if (octal && this.state.pos == start + 1) octal = false; // number === 0
  30546. var next = this.input.charCodeAt(this.state.pos);
  30547. if (next === 46 && !octal) {
  30548. // '.'
  30549. ++this.state.pos;
  30550. this.readInt(10);
  30551. isFloat = true;
  30552. next = this.input.charCodeAt(this.state.pos);
  30553. }
  30554. if ((next === 69 || next === 101) && !octal) {
  30555. // 'eE'
  30556. next = this.input.charCodeAt(++this.state.pos);
  30557. if (next === 43 || next === 45) ++this.state.pos; // '+-'
  30558. if (this.readInt(10) === null) this.raise(start, "Invalid number");
  30559. isFloat = true;
  30560. }
  30561. if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
  30562. var str = this.input.slice(start, this.state.pos);
  30563. var val = void 0;
  30564. if (isFloat) {
  30565. val = parseFloat(str);
  30566. } else if (!octal || str.length === 1) {
  30567. val = parseInt(str, 10);
  30568. } else if (this.state.strict) {
  30569. this.raise(start, "Invalid number");
  30570. } else if (/[89]/.test(str)) {
  30571. val = parseInt(str, 10);
  30572. } else {
  30573. val = parseInt(str, 8);
  30574. }
  30575. return this.finishToken(types.num, val);
  30576. };
  30577. // Read a string value, interpreting backslash-escapes.
  30578. Tokenizer.prototype.readCodePoint = function readCodePoint(throwOnInvalid) {
  30579. var ch = this.input.charCodeAt(this.state.pos);
  30580. var code = void 0;
  30581. if (ch === 123) {
  30582. // '{'
  30583. var codePos = ++this.state.pos;
  30584. code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid);
  30585. ++this.state.pos;
  30586. if (code === null) {
  30587. --this.state.invalidTemplateEscapePosition; // to point to the '\'' instead of the 'u'
  30588. } else if (code > 0x10FFFF) {
  30589. if (throwOnInvalid) {
  30590. this.raise(codePos, "Code point out of bounds");
  30591. } else {
  30592. this.state.invalidTemplateEscapePosition = codePos - 2;
  30593. return null;
  30594. }
  30595. }
  30596. } else {
  30597. code = this.readHexChar(4, throwOnInvalid);
  30598. }
  30599. return code;
  30600. };
  30601. Tokenizer.prototype.readString = function readString(quote) {
  30602. var out = "",
  30603. chunkStart = ++this.state.pos;
  30604. for (;;) {
  30605. if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated string constant");
  30606. var ch = this.input.charCodeAt(this.state.pos);
  30607. if (ch === quote) break;
  30608. if (ch === 92) {
  30609. // '\'
  30610. out += this.input.slice(chunkStart, this.state.pos);
  30611. out += this.readEscapedChar(false);
  30612. chunkStart = this.state.pos;
  30613. } else {
  30614. if (isNewLine(ch)) this.raise(this.state.start, "Unterminated string constant");
  30615. ++this.state.pos;
  30616. }
  30617. }
  30618. out += this.input.slice(chunkStart, this.state.pos++);
  30619. return this.finishToken(types.string, out);
  30620. };
  30621. // Reads template string tokens.
  30622. Tokenizer.prototype.readTmplToken = function readTmplToken() {
  30623. var out = "",
  30624. chunkStart = this.state.pos,
  30625. containsInvalid = false;
  30626. for (;;) {
  30627. if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated template");
  30628. var ch = this.input.charCodeAt(this.state.pos);
  30629. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
  30630. // '`', '${'
  30631. if (this.state.pos === this.state.start && this.match(types.template)) {
  30632. if (ch === 36) {
  30633. this.state.pos += 2;
  30634. return this.finishToken(types.dollarBraceL);
  30635. } else {
  30636. ++this.state.pos;
  30637. return this.finishToken(types.backQuote);
  30638. }
  30639. }
  30640. out += this.input.slice(chunkStart, this.state.pos);
  30641. return this.finishToken(types.template, containsInvalid ? null : out);
  30642. }
  30643. if (ch === 92) {
  30644. // '\'
  30645. out += this.input.slice(chunkStart, this.state.pos);
  30646. var escaped = this.readEscapedChar(true);
  30647. if (escaped === null) {
  30648. containsInvalid = true;
  30649. } else {
  30650. out += escaped;
  30651. }
  30652. chunkStart = this.state.pos;
  30653. } else if (isNewLine(ch)) {
  30654. out += this.input.slice(chunkStart, this.state.pos);
  30655. ++this.state.pos;
  30656. switch (ch) {
  30657. case 13:
  30658. if (this.input.charCodeAt(this.state.pos) === 10) ++this.state.pos;
  30659. case 10:
  30660. out += "\n";
  30661. break;
  30662. default:
  30663. out += String.fromCharCode(ch);
  30664. break;
  30665. }
  30666. ++this.state.curLine;
  30667. this.state.lineStart = this.state.pos;
  30668. chunkStart = this.state.pos;
  30669. } else {
  30670. ++this.state.pos;
  30671. }
  30672. }
  30673. };
  30674. // Used to read escaped characters
  30675. Tokenizer.prototype.readEscapedChar = function readEscapedChar(inTemplate) {
  30676. var throwOnInvalid = !inTemplate;
  30677. var ch = this.input.charCodeAt(++this.state.pos);
  30678. ++this.state.pos;
  30679. switch (ch) {
  30680. case 110:
  30681. return "\n"; // 'n' -> '\n'
  30682. case 114:
  30683. return "\r"; // 'r' -> '\r'
  30684. case 120:
  30685. {
  30686. // 'x'
  30687. var code = this.readHexChar(2, throwOnInvalid);
  30688. return code === null ? null : String.fromCharCode(code);
  30689. }
  30690. case 117:
  30691. {
  30692. // 'u'
  30693. var _code = this.readCodePoint(throwOnInvalid);
  30694. return _code === null ? null : codePointToString(_code);
  30695. }
  30696. case 116:
  30697. return "\t"; // 't' -> '\t'
  30698. case 98:
  30699. return "\b"; // 'b' -> '\b'
  30700. case 118:
  30701. return "\x0B"; // 'v' -> '\u000b'
  30702. case 102:
  30703. return "\f"; // 'f' -> '\f'
  30704. case 13:
  30705. if (this.input.charCodeAt(this.state.pos) === 10) ++this.state.pos; // '\r\n'
  30706. case 10:
  30707. // ' \n'
  30708. this.state.lineStart = this.state.pos;
  30709. ++this.state.curLine;
  30710. return "";
  30711. default:
  30712. if (ch >= 48 && ch <= 55) {
  30713. var codePos = this.state.pos - 1;
  30714. var octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0];
  30715. var octal = parseInt(octalStr, 8);
  30716. if (octal > 255) {
  30717. octalStr = octalStr.slice(0, -1);
  30718. octal = parseInt(octalStr, 8);
  30719. }
  30720. if (octal > 0) {
  30721. if (inTemplate) {
  30722. this.state.invalidTemplateEscapePosition = codePos;
  30723. return null;
  30724. } else if (this.state.strict) {
  30725. this.raise(codePos, "Octal literal in strict mode");
  30726. } else if (!this.state.containsOctal) {
  30727. // These properties are only used to throw an error for an octal which occurs
  30728. // in a directive which occurs prior to a "use strict" directive.
  30729. this.state.containsOctal = true;
  30730. this.state.octalPosition = codePos;
  30731. }
  30732. }
  30733. this.state.pos += octalStr.length - 1;
  30734. return String.fromCharCode(octal);
  30735. }
  30736. return String.fromCharCode(ch);
  30737. }
  30738. };
  30739. // Used to read character escape sequences ('\x', '\u').
  30740. Tokenizer.prototype.readHexChar = function readHexChar(len, throwOnInvalid) {
  30741. var codePos = this.state.pos;
  30742. var n = this.readInt(16, len);
  30743. if (n === null) {
  30744. if (throwOnInvalid) {
  30745. this.raise(codePos, "Bad character escape sequence");
  30746. } else {
  30747. this.state.pos = codePos - 1;
  30748. this.state.invalidTemplateEscapePosition = codePos - 1;
  30749. }
  30750. }
  30751. return n;
  30752. };
  30753. // Read an identifier, and return it as a string. Sets `this.state.containsEsc`
  30754. // to whether the word contained a '\u' escape.
  30755. //
  30756. // Incrementally adds only escaped chars, adding other chunks as-is
  30757. // as a micro-optimization.
  30758. Tokenizer.prototype.readWord1 = function readWord1() {
  30759. this.state.containsEsc = false;
  30760. var word = "",
  30761. first = true,
  30762. chunkStart = this.state.pos;
  30763. while (this.state.pos < this.input.length) {
  30764. var ch = this.fullCharCodeAtPos();
  30765. if (isIdentifierChar(ch)) {
  30766. this.state.pos += ch <= 0xffff ? 1 : 2;
  30767. } else if (ch === 92) {
  30768. // "\"
  30769. this.state.containsEsc = true;
  30770. word += this.input.slice(chunkStart, this.state.pos);
  30771. var escStart = this.state.pos;
  30772. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  30773. // "u"
  30774. this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX");
  30775. }
  30776. ++this.state.pos;
  30777. var esc = this.readCodePoint(true);
  30778. if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) {
  30779. this.raise(escStart, "Invalid Unicode escape");
  30780. }
  30781. word += codePointToString(esc);
  30782. chunkStart = this.state.pos;
  30783. } else {
  30784. break;
  30785. }
  30786. first = false;
  30787. }
  30788. return word + this.input.slice(chunkStart, this.state.pos);
  30789. };
  30790. // Read an identifier or keyword token. Will check for reserved
  30791. // words when necessary.
  30792. Tokenizer.prototype.readWord = function readWord() {
  30793. var word = this.readWord1();
  30794. var type = types.name;
  30795. if (!this.state.containsEsc && this.isKeyword(word)) {
  30796. type = keywords[word];
  30797. }
  30798. return this.finishToken(type, word);
  30799. };
  30800. Tokenizer.prototype.braceIsBlock = function braceIsBlock(prevType) {
  30801. if (prevType === types.colon) {
  30802. var parent = this.curContext();
  30803. if (parent === types$1.braceStatement || parent === types$1.braceExpression) {
  30804. return !parent.isExpr;
  30805. }
  30806. }
  30807. if (prevType === types._return) {
  30808. return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  30809. }
  30810. if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR) {
  30811. return true;
  30812. }
  30813. if (prevType === types.braceL) {
  30814. return this.curContext() === types$1.braceStatement;
  30815. }
  30816. return !this.state.exprAllowed;
  30817. };
  30818. Tokenizer.prototype.updateContext = function updateContext(prevType) {
  30819. var type = this.state.type;
  30820. var update = void 0;
  30821. if (type.keyword && prevType === types.dot) {
  30822. this.state.exprAllowed = false;
  30823. } else if (update = type.updateContext) {
  30824. update.call(this, prevType);
  30825. } else {
  30826. this.state.exprAllowed = type.beforeExpr;
  30827. }
  30828. };
  30829. return Tokenizer;
  30830. }();
  30831. var plugins = {};
  30832. var frozenDeprecatedWildcardPluginList = ["jsx", "doExpressions", "objectRestSpread", "decorators", "classProperties", "exportExtensions", "asyncGenerators", "functionBind", "functionSent", "dynamicImport", "flow"];
  30833. var Parser = function (_Tokenizer) {
  30834. inherits(Parser, _Tokenizer);
  30835. function Parser(options, input) {
  30836. classCallCheck(this, Parser);
  30837. options = getOptions(options);
  30838. var _this = possibleConstructorReturn(this, _Tokenizer.call(this, options, input));
  30839. _this.options = options;
  30840. _this.inModule = _this.options.sourceType === "module";
  30841. _this.input = input;
  30842. _this.plugins = _this.loadPlugins(_this.options.plugins);
  30843. _this.filename = options.sourceFilename;
  30844. // If enabled, skip leading hashbang line.
  30845. if (_this.state.pos === 0 && _this.input[0] === "#" && _this.input[1] === "!") {
  30846. _this.skipLineComment(2);
  30847. }
  30848. return _this;
  30849. }
  30850. Parser.prototype.isReservedWord = function isReservedWord(word) {
  30851. if (word === "await") {
  30852. return this.inModule;
  30853. } else {
  30854. return reservedWords[6](word);
  30855. }
  30856. };
  30857. Parser.prototype.hasPlugin = function hasPlugin(name) {
  30858. if (this.plugins["*"] && frozenDeprecatedWildcardPluginList.indexOf(name) > -1) {
  30859. return true;
  30860. }
  30861. return !!this.plugins[name];
  30862. };
  30863. Parser.prototype.extend = function extend(name, f) {
  30864. this[name] = f(this[name]);
  30865. };
  30866. Parser.prototype.loadAllPlugins = function loadAllPlugins() {
  30867. var _this2 = this;
  30868. // ensure flow plugin loads last, also ensure estree is not loaded with *
  30869. var pluginNames = Object.keys(plugins).filter(function (name) {
  30870. return name !== "flow" && name !== "estree";
  30871. });
  30872. pluginNames.push("flow");
  30873. pluginNames.forEach(function (name) {
  30874. var plugin = plugins[name];
  30875. if (plugin) plugin(_this2);
  30876. });
  30877. };
  30878. Parser.prototype.loadPlugins = function loadPlugins(pluginList) {
  30879. // TODO: Deprecate "*" option in next major version of Babylon
  30880. if (pluginList.indexOf("*") >= 0) {
  30881. this.loadAllPlugins();
  30882. return { "*": true };
  30883. }
  30884. var pluginMap = {};
  30885. if (pluginList.indexOf("flow") >= 0) {
  30886. // ensure flow plugin loads last
  30887. pluginList = pluginList.filter(function (plugin) {
  30888. return plugin !== "flow";
  30889. });
  30890. pluginList.push("flow");
  30891. }
  30892. if (pluginList.indexOf("estree") >= 0) {
  30893. // ensure estree plugin loads first
  30894. pluginList = pluginList.filter(function (plugin) {
  30895. return plugin !== "estree";
  30896. });
  30897. pluginList.unshift("estree");
  30898. }
  30899. for (var _iterator = pluginList, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  30900. var _ref;
  30901. if (_isArray) {
  30902. if (_i >= _iterator.length) break;
  30903. _ref = _iterator[_i++];
  30904. } else {
  30905. _i = _iterator.next();
  30906. if (_i.done) break;
  30907. _ref = _i.value;
  30908. }
  30909. var name = _ref;
  30910. if (!pluginMap[name]) {
  30911. pluginMap[name] = true;
  30912. var plugin = plugins[name];
  30913. if (plugin) plugin(this);
  30914. }
  30915. }
  30916. return pluginMap;
  30917. };
  30918. Parser.prototype.parse = function parse() {
  30919. var file = this.startNode();
  30920. var program = this.startNode();
  30921. this.nextToken();
  30922. return this.parseTopLevel(file, program);
  30923. };
  30924. return Parser;
  30925. }(Tokenizer);
  30926. var pp = Parser.prototype;
  30927. // ## Parser utilities
  30928. // TODO
  30929. pp.addExtra = function (node, key, val) {
  30930. if (!node) return;
  30931. var extra = node.extra = node.extra || {};
  30932. extra[key] = val;
  30933. };
  30934. // TODO
  30935. pp.isRelational = function (op) {
  30936. return this.match(types.relational) && this.state.value === op;
  30937. };
  30938. // TODO
  30939. pp.expectRelational = function (op) {
  30940. if (this.isRelational(op)) {
  30941. this.next();
  30942. } else {
  30943. this.unexpected(null, types.relational);
  30944. }
  30945. };
  30946. // Tests whether parsed token is a contextual keyword.
  30947. pp.isContextual = function (name) {
  30948. return this.match(types.name) && this.state.value === name;
  30949. };
  30950. // Consumes contextual keyword if possible.
  30951. pp.eatContextual = function (name) {
  30952. return this.state.value === name && this.eat(types.name);
  30953. };
  30954. // Asserts that following token is given contextual keyword.
  30955. pp.expectContextual = function (name, message) {
  30956. if (!this.eatContextual(name)) this.unexpected(null, message);
  30957. };
  30958. // Test whether a semicolon can be inserted at the current position.
  30959. pp.canInsertSemicolon = function () {
  30960. return this.match(types.eof) || this.match(types.braceR) || lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  30961. };
  30962. // TODO
  30963. pp.isLineTerminator = function () {
  30964. return this.eat(types.semi) || this.canInsertSemicolon();
  30965. };
  30966. // Consume a semicolon, or, failing that, see if we are allowed to
  30967. // pretend that there is a semicolon at this position.
  30968. pp.semicolon = function () {
  30969. if (!this.isLineTerminator()) this.unexpected(null, types.semi);
  30970. };
  30971. // Expect a token of a given type. If found, consume it, otherwise,
  30972. // raise an unexpected token error at given pos.
  30973. pp.expect = function (type, pos) {
  30974. return this.eat(type) || this.unexpected(pos, type);
  30975. };
  30976. // Raise an unexpected token error. Can take the expected token type
  30977. // instead of a message string.
  30978. pp.unexpected = function (pos) {
  30979. var messageOrType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Unexpected token";
  30980. if (messageOrType && (typeof messageOrType === "undefined" ? "undefined" : _typeof(messageOrType)) === "object" && messageOrType.label) {
  30981. messageOrType = "Unexpected token, expected " + messageOrType.label;
  30982. }
  30983. this.raise(pos != null ? pos : this.state.start, messageOrType);
  30984. };
  30985. /* eslint max-len: 0 */
  30986. var pp$1 = Parser.prototype;
  30987. // ### Statement parsing
  30988. // Parse a program. Initializes the parser, reads any number of
  30989. // statements, and wraps them in a Program node. Optionally takes a
  30990. // `program` argument. If present, the statements will be appended
  30991. // to its body instead of creating a new node.
  30992. pp$1.parseTopLevel = function (file, program) {
  30993. program.sourceType = this.options.sourceType;
  30994. this.parseBlockBody(program, true, true, types.eof);
  30995. file.program = this.finishNode(program, "Program");
  30996. file.comments = this.state.comments;
  30997. file.tokens = this.state.tokens;
  30998. return this.finishNode(file, "File");
  30999. };
  31000. var loopLabel = { kind: "loop" };
  31001. var switchLabel = { kind: "switch" };
  31002. // TODO
  31003. pp$1.stmtToDirective = function (stmt) {
  31004. var expr = stmt.expression;
  31005. var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
  31006. var directive = this.startNodeAt(stmt.start, stmt.loc.start);
  31007. var raw = this.input.slice(expr.start, expr.end);
  31008. var val = directiveLiteral.value = raw.slice(1, -1); // remove quotes
  31009. this.addExtra(directiveLiteral, "raw", raw);
  31010. this.addExtra(directiveLiteral, "rawValue", val);
  31011. directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
  31012. return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
  31013. };
  31014. // Parse a single statement.
  31015. //
  31016. // If expecting a statement and finding a slash operator, parse a
  31017. // regular expression literal. This is to handle cases like
  31018. // `if (foo) /blah/.exec(foo)`, where looking at the previous token
  31019. // does not help.
  31020. pp$1.parseStatement = function (declaration, topLevel) {
  31021. if (this.match(types.at)) {
  31022. this.parseDecorators(true);
  31023. }
  31024. var starttype = this.state.type;
  31025. var node = this.startNode();
  31026. // Most types of statements are recognized by the keyword they
  31027. // start with. Many are trivial to parse, some require a bit of
  31028. // complexity.
  31029. switch (starttype) {
  31030. case types._break:case types._continue:
  31031. return this.parseBreakContinueStatement(node, starttype.keyword);
  31032. case types._debugger:
  31033. return this.parseDebuggerStatement(node);
  31034. case types._do:
  31035. return this.parseDoStatement(node);
  31036. case types._for:
  31037. return this.parseForStatement(node);
  31038. case types._function:
  31039. if (!declaration) this.unexpected();
  31040. return this.parseFunctionStatement(node);
  31041. case types._class:
  31042. if (!declaration) this.unexpected();
  31043. return this.parseClass(node, true);
  31044. case types._if:
  31045. return this.parseIfStatement(node);
  31046. case types._return:
  31047. return this.parseReturnStatement(node);
  31048. case types._switch:
  31049. return this.parseSwitchStatement(node);
  31050. case types._throw:
  31051. return this.parseThrowStatement(node);
  31052. case types._try:
  31053. return this.parseTryStatement(node);
  31054. case types._let:
  31055. case types._const:
  31056. if (!declaration) this.unexpected(); // NOTE: falls through to _var
  31057. case types._var:
  31058. return this.parseVarStatement(node, starttype);
  31059. case types._while:
  31060. return this.parseWhileStatement(node);
  31061. case types._with:
  31062. return this.parseWithStatement(node);
  31063. case types.braceL:
  31064. return this.parseBlock();
  31065. case types.semi:
  31066. return this.parseEmptyStatement(node);
  31067. case types._export:
  31068. case types._import:
  31069. if (this.hasPlugin("dynamicImport") && this.lookahead().type === types.parenL) break;
  31070. if (!this.options.allowImportExportEverywhere) {
  31071. if (!topLevel) {
  31072. this.raise(this.state.start, "'import' and 'export' may only appear at the top level");
  31073. }
  31074. if (!this.inModule) {
  31075. this.raise(this.state.start, "'import' and 'export' may appear only with 'sourceType: module'");
  31076. }
  31077. }
  31078. return starttype === types._import ? this.parseImport(node) : this.parseExport(node);
  31079. case types.name:
  31080. if (this.state.value === "async") {
  31081. // peek ahead and see if next token is a function
  31082. var state = this.state.clone();
  31083. this.next();
  31084. if (this.match(types._function) && !this.canInsertSemicolon()) {
  31085. this.expect(types._function);
  31086. return this.parseFunction(node, true, false, true);
  31087. } else {
  31088. this.state = state;
  31089. }
  31090. }
  31091. }
  31092. // If the statement does not start with a statement keyword or a
  31093. // brace, it's an ExpressionStatement or LabeledStatement. We
  31094. // simply start parsing an expression, and afterwards, if the
  31095. // next token is a colon and the expression was a simple
  31096. // Identifier node, we switch to interpreting it as a label.
  31097. var maybeName = this.state.value;
  31098. var expr = this.parseExpression();
  31099. if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) {
  31100. return this.parseLabeledStatement(node, maybeName, expr);
  31101. } else {
  31102. return this.parseExpressionStatement(node, expr);
  31103. }
  31104. };
  31105. pp$1.takeDecorators = function (node) {
  31106. if (this.state.decorators.length) {
  31107. node.decorators = this.state.decorators;
  31108. this.state.decorators = [];
  31109. }
  31110. };
  31111. pp$1.parseDecorators = function (allowExport) {
  31112. while (this.match(types.at)) {
  31113. var decorator = this.parseDecorator();
  31114. this.state.decorators.push(decorator);
  31115. }
  31116. if (allowExport && this.match(types._export)) {
  31117. return;
  31118. }
  31119. if (!this.match(types._class)) {
  31120. this.raise(this.state.start, "Leading decorators must be attached to a class declaration");
  31121. }
  31122. };
  31123. pp$1.parseDecorator = function () {
  31124. if (!this.hasPlugin("decorators")) {
  31125. this.unexpected();
  31126. }
  31127. var node = this.startNode();
  31128. this.next();
  31129. node.expression = this.parseMaybeAssign();
  31130. return this.finishNode(node, "Decorator");
  31131. };
  31132. pp$1.parseBreakContinueStatement = function (node, keyword) {
  31133. var isBreak = keyword === "break";
  31134. this.next();
  31135. if (this.isLineTerminator()) {
  31136. node.label = null;
  31137. } else if (!this.match(types.name)) {
  31138. this.unexpected();
  31139. } else {
  31140. node.label = this.parseIdentifier();
  31141. this.semicolon();
  31142. }
  31143. // Verify that there is an actual destination to break or
  31144. // continue to.
  31145. var i = void 0;
  31146. for (i = 0; i < this.state.labels.length; ++i) {
  31147. var lab = this.state.labels[i];
  31148. if (node.label == null || lab.name === node.label.name) {
  31149. if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
  31150. if (node.label && isBreak) break;
  31151. }
  31152. }
  31153. if (i === this.state.labels.length) this.raise(node.start, "Unsyntactic " + keyword);
  31154. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  31155. };
  31156. pp$1.parseDebuggerStatement = function (node) {
  31157. this.next();
  31158. this.semicolon();
  31159. return this.finishNode(node, "DebuggerStatement");
  31160. };
  31161. pp$1.parseDoStatement = function (node) {
  31162. this.next();
  31163. this.state.labels.push(loopLabel);
  31164. node.body = this.parseStatement(false);
  31165. this.state.labels.pop();
  31166. this.expect(types._while);
  31167. node.test = this.parseParenExpression();
  31168. this.eat(types.semi);
  31169. return this.finishNode(node, "DoWhileStatement");
  31170. };
  31171. // Disambiguating between a `for` and a `for`/`in` or `for`/`of`
  31172. // loop is non-trivial. Basically, we have to parse the init `var`
  31173. // statement or expression, disallowing the `in` operator (see
  31174. // the second parameter to `parseExpression`), and then check
  31175. // whether the next token is `in` or `of`. When there is no init
  31176. // part (semicolon immediately after the opening parenthesis), it
  31177. // is a regular `for` loop.
  31178. pp$1.parseForStatement = function (node) {
  31179. this.next();
  31180. this.state.labels.push(loopLabel);
  31181. var forAwait = false;
  31182. if (this.hasPlugin("asyncGenerators") && this.state.inAsync && this.isContextual("await")) {
  31183. forAwait = true;
  31184. this.next();
  31185. }
  31186. this.expect(types.parenL);
  31187. if (this.match(types.semi)) {
  31188. if (forAwait) {
  31189. this.unexpected();
  31190. }
  31191. return this.parseFor(node, null);
  31192. }
  31193. if (this.match(types._var) || this.match(types._let) || this.match(types._const)) {
  31194. var _init = this.startNode();
  31195. var varKind = this.state.type;
  31196. this.next();
  31197. this.parseVar(_init, true, varKind);
  31198. this.finishNode(_init, "VariableDeclaration");
  31199. if (this.match(types._in) || this.isContextual("of")) {
  31200. if (_init.declarations.length === 1 && !_init.declarations[0].init) {
  31201. return this.parseForIn(node, _init, forAwait);
  31202. }
  31203. }
  31204. if (forAwait) {
  31205. this.unexpected();
  31206. }
  31207. return this.parseFor(node, _init);
  31208. }
  31209. var refShorthandDefaultPos = { start: 0 };
  31210. var init = this.parseExpression(true, refShorthandDefaultPos);
  31211. if (this.match(types._in) || this.isContextual("of")) {
  31212. var description = this.isContextual("of") ? "for-of statement" : "for-in statement";
  31213. this.toAssignable(init, undefined, description);
  31214. this.checkLVal(init, undefined, undefined, description);
  31215. return this.parseForIn(node, init, forAwait);
  31216. } else if (refShorthandDefaultPos.start) {
  31217. this.unexpected(refShorthandDefaultPos.start);
  31218. }
  31219. if (forAwait) {
  31220. this.unexpected();
  31221. }
  31222. return this.parseFor(node, init);
  31223. };
  31224. pp$1.parseFunctionStatement = function (node) {
  31225. this.next();
  31226. return this.parseFunction(node, true);
  31227. };
  31228. pp$1.parseIfStatement = function (node) {
  31229. this.next();
  31230. node.test = this.parseParenExpression();
  31231. node.consequent = this.parseStatement(false);
  31232. node.alternate = this.eat(types._else) ? this.parseStatement(false) : null;
  31233. return this.finishNode(node, "IfStatement");
  31234. };
  31235. pp$1.parseReturnStatement = function (node) {
  31236. if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) {
  31237. this.raise(this.state.start, "'return' outside of function");
  31238. }
  31239. this.next();
  31240. // In `return` (and `break`/`continue`), the keywords with
  31241. // optional arguments, we eagerly look for a semicolon or the
  31242. // possibility to insert one.
  31243. if (this.isLineTerminator()) {
  31244. node.argument = null;
  31245. } else {
  31246. node.argument = this.parseExpression();
  31247. this.semicolon();
  31248. }
  31249. return this.finishNode(node, "ReturnStatement");
  31250. };
  31251. pp$1.parseSwitchStatement = function (node) {
  31252. this.next();
  31253. node.discriminant = this.parseParenExpression();
  31254. node.cases = [];
  31255. this.expect(types.braceL);
  31256. this.state.labels.push(switchLabel);
  31257. // Statements under must be grouped (by label) in SwitchCase
  31258. // nodes. `cur` is used to keep the node that we are currently
  31259. // adding statements to.
  31260. var cur = void 0;
  31261. for (var sawDefault; !this.match(types.braceR);) {
  31262. if (this.match(types._case) || this.match(types._default)) {
  31263. var isCase = this.match(types._case);
  31264. if (cur) this.finishNode(cur, "SwitchCase");
  31265. node.cases.push(cur = this.startNode());
  31266. cur.consequent = [];
  31267. this.next();
  31268. if (isCase) {
  31269. cur.test = this.parseExpression();
  31270. } else {
  31271. if (sawDefault) this.raise(this.state.lastTokStart, "Multiple default clauses");
  31272. sawDefault = true;
  31273. cur.test = null;
  31274. }
  31275. this.expect(types.colon);
  31276. } else {
  31277. if (cur) {
  31278. cur.consequent.push(this.parseStatement(true));
  31279. } else {
  31280. this.unexpected();
  31281. }
  31282. }
  31283. }
  31284. if (cur) this.finishNode(cur, "SwitchCase");
  31285. this.next(); // Closing brace
  31286. this.state.labels.pop();
  31287. return this.finishNode(node, "SwitchStatement");
  31288. };
  31289. pp$1.parseThrowStatement = function (node) {
  31290. this.next();
  31291. if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) this.raise(this.state.lastTokEnd, "Illegal newline after throw");
  31292. node.argument = this.parseExpression();
  31293. this.semicolon();
  31294. return this.finishNode(node, "ThrowStatement");
  31295. };
  31296. // Reused empty array added for node fields that are always empty.
  31297. var empty = [];
  31298. pp$1.parseTryStatement = function (node) {
  31299. this.next();
  31300. node.block = this.parseBlock();
  31301. node.handler = null;
  31302. if (this.match(types._catch)) {
  31303. var clause = this.startNode();
  31304. this.next();
  31305. this.expect(types.parenL);
  31306. clause.param = this.parseBindingAtom();
  31307. this.checkLVal(clause.param, true, Object.create(null), "catch clause");
  31308. this.expect(types.parenR);
  31309. clause.body = this.parseBlock();
  31310. node.handler = this.finishNode(clause, "CatchClause");
  31311. }
  31312. node.guardedHandlers = empty;
  31313. node.finalizer = this.eat(types._finally) ? this.parseBlock() : null;
  31314. if (!node.handler && !node.finalizer) {
  31315. this.raise(node.start, "Missing catch or finally clause");
  31316. }
  31317. return this.finishNode(node, "TryStatement");
  31318. };
  31319. pp$1.parseVarStatement = function (node, kind) {
  31320. this.next();
  31321. this.parseVar(node, false, kind);
  31322. this.semicolon();
  31323. return this.finishNode(node, "VariableDeclaration");
  31324. };
  31325. pp$1.parseWhileStatement = function (node) {
  31326. this.next();
  31327. node.test = this.parseParenExpression();
  31328. this.state.labels.push(loopLabel);
  31329. node.body = this.parseStatement(false);
  31330. this.state.labels.pop();
  31331. return this.finishNode(node, "WhileStatement");
  31332. };
  31333. pp$1.parseWithStatement = function (node) {
  31334. if (this.state.strict) this.raise(this.state.start, "'with' in strict mode");
  31335. this.next();
  31336. node.object = this.parseParenExpression();
  31337. node.body = this.parseStatement(false);
  31338. return this.finishNode(node, "WithStatement");
  31339. };
  31340. pp$1.parseEmptyStatement = function (node) {
  31341. this.next();
  31342. return this.finishNode(node, "EmptyStatement");
  31343. };
  31344. pp$1.parseLabeledStatement = function (node, maybeName, expr) {
  31345. for (var _iterator = this.state.labels, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  31346. var _ref;
  31347. if (_isArray) {
  31348. if (_i >= _iterator.length) break;
  31349. _ref = _iterator[_i++];
  31350. } else {
  31351. _i = _iterator.next();
  31352. if (_i.done) break;
  31353. _ref = _i.value;
  31354. }
  31355. var _label = _ref;
  31356. if (_label.name === maybeName) {
  31357. this.raise(expr.start, "Label '" + maybeName + "' is already declared");
  31358. }
  31359. }
  31360. var kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null;
  31361. for (var i = this.state.labels.length - 1; i >= 0; i--) {
  31362. var label = this.state.labels[i];
  31363. if (label.statementStart === node.start) {
  31364. label.statementStart = this.state.start;
  31365. label.kind = kind;
  31366. } else {
  31367. break;
  31368. }
  31369. }
  31370. this.state.labels.push({ name: maybeName, kind: kind, statementStart: this.state.start });
  31371. node.body = this.parseStatement(true);
  31372. this.state.labels.pop();
  31373. node.label = expr;
  31374. return this.finishNode(node, "LabeledStatement");
  31375. };
  31376. pp$1.parseExpressionStatement = function (node, expr) {
  31377. node.expression = expr;
  31378. this.semicolon();
  31379. return this.finishNode(node, "ExpressionStatement");
  31380. };
  31381. // Parse a semicolon-enclosed block of statements, handling `"use
  31382. // strict"` declarations when `allowStrict` is true (used for
  31383. // function bodies).
  31384. pp$1.parseBlock = function (allowDirectives) {
  31385. var node = this.startNode();
  31386. this.expect(types.braceL);
  31387. this.parseBlockBody(node, allowDirectives, false, types.braceR);
  31388. return this.finishNode(node, "BlockStatement");
  31389. };
  31390. pp$1.isValidDirective = function (stmt) {
  31391. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  31392. };
  31393. pp$1.parseBlockBody = function (node, allowDirectives, topLevel, end) {
  31394. node.body = [];
  31395. node.directives = [];
  31396. var parsedNonDirective = false;
  31397. var oldStrict = void 0;
  31398. var octalPosition = void 0;
  31399. while (!this.eat(end)) {
  31400. if (!parsedNonDirective && this.state.containsOctal && !octalPosition) {
  31401. octalPosition = this.state.octalPosition;
  31402. }
  31403. var stmt = this.parseStatement(true, topLevel);
  31404. if (allowDirectives && !parsedNonDirective && this.isValidDirective(stmt)) {
  31405. var directive = this.stmtToDirective(stmt);
  31406. node.directives.push(directive);
  31407. if (oldStrict === undefined && directive.value.value === "use strict") {
  31408. oldStrict = this.state.strict;
  31409. this.setStrict(true);
  31410. if (octalPosition) {
  31411. this.raise(octalPosition, "Octal literal in strict mode");
  31412. }
  31413. }
  31414. continue;
  31415. }
  31416. parsedNonDirective = true;
  31417. node.body.push(stmt);
  31418. }
  31419. if (oldStrict === false) {
  31420. this.setStrict(false);
  31421. }
  31422. };
  31423. // Parse a regular `for` loop. The disambiguation code in
  31424. // `parseStatement` will already have parsed the init statement or
  31425. // expression.
  31426. pp$1.parseFor = function (node, init) {
  31427. node.init = init;
  31428. this.expect(types.semi);
  31429. node.test = this.match(types.semi) ? null : this.parseExpression();
  31430. this.expect(types.semi);
  31431. node.update = this.match(types.parenR) ? null : this.parseExpression();
  31432. this.expect(types.parenR);
  31433. node.body = this.parseStatement(false);
  31434. this.state.labels.pop();
  31435. return this.finishNode(node, "ForStatement");
  31436. };
  31437. // Parse a `for`/`in` and `for`/`of` loop, which are almost
  31438. // same from parser's perspective.
  31439. pp$1.parseForIn = function (node, init, forAwait) {
  31440. var type = void 0;
  31441. if (forAwait) {
  31442. this.eatContextual("of");
  31443. type = "ForAwaitStatement";
  31444. } else {
  31445. type = this.match(types._in) ? "ForInStatement" : "ForOfStatement";
  31446. this.next();
  31447. }
  31448. node.left = init;
  31449. node.right = this.parseExpression();
  31450. this.expect(types.parenR);
  31451. node.body = this.parseStatement(false);
  31452. this.state.labels.pop();
  31453. return this.finishNode(node, type);
  31454. };
  31455. // Parse a list of variable declarations.
  31456. pp$1.parseVar = function (node, isFor, kind) {
  31457. node.declarations = [];
  31458. node.kind = kind.keyword;
  31459. for (;;) {
  31460. var decl = this.startNode();
  31461. this.parseVarHead(decl);
  31462. if (this.eat(types.eq)) {
  31463. decl.init = this.parseMaybeAssign(isFor);
  31464. } else if (kind === types._const && !(this.match(types._in) || this.isContextual("of"))) {
  31465. this.unexpected();
  31466. } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) {
  31467. this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value");
  31468. } else {
  31469. decl.init = null;
  31470. }
  31471. node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
  31472. if (!this.eat(types.comma)) break;
  31473. }
  31474. return node;
  31475. };
  31476. pp$1.parseVarHead = function (decl) {
  31477. decl.id = this.parseBindingAtom();
  31478. this.checkLVal(decl.id, true, undefined, "variable declaration");
  31479. };
  31480. // Parse a function declaration or literal (depending on the
  31481. // `isStatement` parameter).
  31482. pp$1.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, optionalId) {
  31483. var oldInMethod = this.state.inMethod;
  31484. this.state.inMethod = false;
  31485. this.initFunction(node, isAsync);
  31486. if (this.match(types.star)) {
  31487. if (node.async && !this.hasPlugin("asyncGenerators")) {
  31488. this.unexpected();
  31489. } else {
  31490. node.generator = true;
  31491. this.next();
  31492. }
  31493. }
  31494. if (isStatement && !optionalId && !this.match(types.name) && !this.match(types._yield)) {
  31495. this.unexpected();
  31496. }
  31497. if (this.match(types.name) || this.match(types._yield)) {
  31498. node.id = this.parseBindingIdentifier();
  31499. }
  31500. this.parseFunctionParams(node);
  31501. this.parseFunctionBody(node, allowExpressionBody);
  31502. this.state.inMethod = oldInMethod;
  31503. return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
  31504. };
  31505. pp$1.parseFunctionParams = function (node) {
  31506. this.expect(types.parenL);
  31507. node.params = this.parseBindingList(types.parenR);
  31508. };
  31509. // Parse a class declaration or literal (depending on the
  31510. // `isStatement` parameter).
  31511. pp$1.parseClass = function (node, isStatement, optionalId) {
  31512. this.next();
  31513. this.takeDecorators(node);
  31514. this.parseClassId(node, isStatement, optionalId);
  31515. this.parseClassSuper(node);
  31516. this.parseClassBody(node);
  31517. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  31518. };
  31519. pp$1.isClassProperty = function () {
  31520. return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR);
  31521. };
  31522. pp$1.isClassMethod = function () {
  31523. return this.match(types.parenL);
  31524. };
  31525. pp$1.isNonstaticConstructor = function (method) {
  31526. return !method.computed && !method.static && (method.key.name === "constructor" || // Identifier
  31527. method.key.value === "constructor" // Literal
  31528. );
  31529. };
  31530. pp$1.parseClassBody = function (node) {
  31531. // class bodies are implicitly strict
  31532. var oldStrict = this.state.strict;
  31533. this.state.strict = true;
  31534. var hadConstructorCall = false;
  31535. var hadConstructor = false;
  31536. var decorators = [];
  31537. var classBody = this.startNode();
  31538. classBody.body = [];
  31539. this.expect(types.braceL);
  31540. while (!this.eat(types.braceR)) {
  31541. if (this.eat(types.semi)) {
  31542. if (decorators.length > 0) {
  31543. this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon");
  31544. }
  31545. continue;
  31546. }
  31547. if (this.match(types.at)) {
  31548. decorators.push(this.parseDecorator());
  31549. continue;
  31550. }
  31551. var method = this.startNode();
  31552. // steal the decorators if there are any
  31553. if (decorators.length) {
  31554. method.decorators = decorators;
  31555. decorators = [];
  31556. }
  31557. method.static = false;
  31558. if (this.match(types.name) && this.state.value === "static") {
  31559. var key = this.parseIdentifier(true); // eats 'static'
  31560. if (this.isClassMethod()) {
  31561. // a method named 'static'
  31562. method.kind = "method";
  31563. method.computed = false;
  31564. method.key = key;
  31565. this.parseClassMethod(classBody, method, false, false);
  31566. continue;
  31567. } else if (this.isClassProperty()) {
  31568. // a property named 'static'
  31569. method.computed = false;
  31570. method.key = key;
  31571. classBody.body.push(this.parseClassProperty(method));
  31572. continue;
  31573. }
  31574. // otherwise something static
  31575. method.static = true;
  31576. }
  31577. if (this.eat(types.star)) {
  31578. // a generator
  31579. method.kind = "method";
  31580. this.parsePropertyName(method);
  31581. if (this.isNonstaticConstructor(method)) {
  31582. this.raise(method.key.start, "Constructor can't be a generator");
  31583. }
  31584. if (!method.computed && method.static && (method.key.name === "prototype" || method.key.value === "prototype")) {
  31585. this.raise(method.key.start, "Classes may not have static property named prototype");
  31586. }
  31587. this.parseClassMethod(classBody, method, true, false);
  31588. } else {
  31589. var isSimple = this.match(types.name);
  31590. var _key = this.parsePropertyName(method);
  31591. if (!method.computed && method.static && (method.key.name === "prototype" || method.key.value === "prototype")) {
  31592. this.raise(method.key.start, "Classes may not have static property named prototype");
  31593. }
  31594. if (this.isClassMethod()) {
  31595. // a normal method
  31596. if (this.isNonstaticConstructor(method)) {
  31597. if (hadConstructor) {
  31598. this.raise(_key.start, "Duplicate constructor in the same class");
  31599. } else if (method.decorators) {
  31600. this.raise(method.start, "You can't attach decorators to a class constructor");
  31601. }
  31602. hadConstructor = true;
  31603. method.kind = "constructor";
  31604. } else {
  31605. method.kind = "method";
  31606. }
  31607. this.parseClassMethod(classBody, method, false, false);
  31608. } else if (this.isClassProperty()) {
  31609. // a normal property
  31610. if (this.isNonstaticConstructor(method)) {
  31611. this.raise(method.key.start, "Classes may not have a non-static field named 'constructor'");
  31612. }
  31613. classBody.body.push(this.parseClassProperty(method));
  31614. } else if (isSimple && _key.name === "async" && !this.isLineTerminator()) {
  31615. // an async method
  31616. var isGenerator = this.hasPlugin("asyncGenerators") && this.eat(types.star);
  31617. method.kind = "method";
  31618. this.parsePropertyName(method);
  31619. if (this.isNonstaticConstructor(method)) {
  31620. this.raise(method.key.start, "Constructor can't be an async function");
  31621. }
  31622. this.parseClassMethod(classBody, method, isGenerator, true);
  31623. } else if (isSimple && (_key.name === "get" || _key.name === "set") && !(this.isLineTerminator() && this.match(types.star))) {
  31624. // `get\n*` is an uninitialized property named 'get' followed by a generator.
  31625. // a getter or setter
  31626. method.kind = _key.name;
  31627. this.parsePropertyName(method);
  31628. if (this.isNonstaticConstructor(method)) {
  31629. this.raise(method.key.start, "Constructor can't have get/set modifier");
  31630. }
  31631. this.parseClassMethod(classBody, method, false, false);
  31632. this.checkGetterSetterParamCount(method);
  31633. } else if (this.hasPlugin("classConstructorCall") && isSimple && _key.name === "call" && this.match(types.name) && this.state.value === "constructor") {
  31634. // a (deprecated) call constructor
  31635. if (hadConstructorCall) {
  31636. this.raise(method.start, "Duplicate constructor call in the same class");
  31637. } else if (method.decorators) {
  31638. this.raise(method.start, "You can't attach decorators to a class constructor");
  31639. }
  31640. hadConstructorCall = true;
  31641. method.kind = "constructorCall";
  31642. this.parsePropertyName(method); // consume "constructor" and make it the method's name
  31643. this.parseClassMethod(classBody, method, false, false);
  31644. } else if (this.isLineTerminator()) {
  31645. // an uninitialized class property (due to ASI, since we don't otherwise recognize the next token)
  31646. if (this.isNonstaticConstructor(method)) {
  31647. this.raise(method.key.start, "Classes may not have a non-static field named 'constructor'");
  31648. }
  31649. classBody.body.push(this.parseClassProperty(method));
  31650. } else {
  31651. this.unexpected();
  31652. }
  31653. }
  31654. }
  31655. if (decorators.length) {
  31656. this.raise(this.state.start, "You have trailing decorators with no method");
  31657. }
  31658. node.body = this.finishNode(classBody, "ClassBody");
  31659. this.state.strict = oldStrict;
  31660. };
  31661. pp$1.parseClassProperty = function (node) {
  31662. this.state.inClassProperty = true;
  31663. if (this.match(types.eq)) {
  31664. if (!this.hasPlugin("classProperties")) this.unexpected();
  31665. this.next();
  31666. node.value = this.parseMaybeAssign();
  31667. } else {
  31668. node.value = null;
  31669. }
  31670. this.semicolon();
  31671. this.state.inClassProperty = false;
  31672. return this.finishNode(node, "ClassProperty");
  31673. };
  31674. pp$1.parseClassMethod = function (classBody, method, isGenerator, isAsync) {
  31675. this.parseMethod(method, isGenerator, isAsync);
  31676. classBody.body.push(this.finishNode(method, "ClassMethod"));
  31677. };
  31678. pp$1.parseClassId = function (node, isStatement, optionalId) {
  31679. if (this.match(types.name)) {
  31680. node.id = this.parseIdentifier();
  31681. } else {
  31682. if (optionalId || !isStatement) {
  31683. node.id = null;
  31684. } else {
  31685. this.unexpected();
  31686. }
  31687. }
  31688. };
  31689. pp$1.parseClassSuper = function (node) {
  31690. node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;
  31691. };
  31692. // Parses module export declaration.
  31693. pp$1.parseExport = function (node) {
  31694. this.next();
  31695. // export * from '...'
  31696. if (this.match(types.star)) {
  31697. var specifier = this.startNode();
  31698. this.next();
  31699. if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) {
  31700. specifier.exported = this.parseIdentifier();
  31701. node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")];
  31702. this.parseExportSpecifiersMaybe(node);
  31703. this.parseExportFrom(node, true);
  31704. } else {
  31705. this.parseExportFrom(node, true);
  31706. return this.finishNode(node, "ExportAllDeclaration");
  31707. }
  31708. } else if (this.hasPlugin("exportExtensions") && this.isExportDefaultSpecifier()) {
  31709. var _specifier = this.startNode();
  31710. _specifier.exported = this.parseIdentifier(true);
  31711. node.specifiers = [this.finishNode(_specifier, "ExportDefaultSpecifier")];
  31712. if (this.match(types.comma) && this.lookahead().type === types.star) {
  31713. this.expect(types.comma);
  31714. var _specifier2 = this.startNode();
  31715. this.expect(types.star);
  31716. this.expectContextual("as");
  31717. _specifier2.exported = this.parseIdentifier();
  31718. node.specifiers.push(this.finishNode(_specifier2, "ExportNamespaceSpecifier"));
  31719. } else {
  31720. this.parseExportSpecifiersMaybe(node);
  31721. }
  31722. this.parseExportFrom(node, true);
  31723. } else if (this.eat(types._default)) {
  31724. // export default ...
  31725. var expr = this.startNode();
  31726. var needsSemi = false;
  31727. if (this.eat(types._function)) {
  31728. expr = this.parseFunction(expr, true, false, false, true);
  31729. } else if (this.match(types._class)) {
  31730. expr = this.parseClass(expr, true, true);
  31731. } else {
  31732. needsSemi = true;
  31733. expr = this.parseMaybeAssign();
  31734. }
  31735. node.declaration = expr;
  31736. if (needsSemi) this.semicolon();
  31737. this.checkExport(node, true, true);
  31738. return this.finishNode(node, "ExportDefaultDeclaration");
  31739. } else if (this.shouldParseExportDeclaration()) {
  31740. node.specifiers = [];
  31741. node.source = null;
  31742. node.declaration = this.parseExportDeclaration(node);
  31743. } else {
  31744. // export { x, y as z } [from '...']
  31745. node.declaration = null;
  31746. node.specifiers = this.parseExportSpecifiers();
  31747. this.parseExportFrom(node);
  31748. }
  31749. this.checkExport(node, true);
  31750. return this.finishNode(node, "ExportNamedDeclaration");
  31751. };
  31752. pp$1.parseExportDeclaration = function () {
  31753. return this.parseStatement(true);
  31754. };
  31755. pp$1.isExportDefaultSpecifier = function () {
  31756. if (this.match(types.name)) {
  31757. return this.state.value !== "async";
  31758. }
  31759. if (!this.match(types._default)) {
  31760. return false;
  31761. }
  31762. var lookahead = this.lookahead();
  31763. return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from";
  31764. };
  31765. pp$1.parseExportSpecifiersMaybe = function (node) {
  31766. if (this.eat(types.comma)) {
  31767. node.specifiers = node.specifiers.concat(this.parseExportSpecifiers());
  31768. }
  31769. };
  31770. pp$1.parseExportFrom = function (node, expect) {
  31771. if (this.eatContextual("from")) {
  31772. node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected();
  31773. this.checkExport(node);
  31774. } else {
  31775. if (expect) {
  31776. this.unexpected();
  31777. } else {
  31778. node.source = null;
  31779. }
  31780. }
  31781. this.semicolon();
  31782. };
  31783. pp$1.shouldParseExportDeclaration = function () {
  31784. return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "let" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isContextual("async");
  31785. };
  31786. pp$1.checkExport = function (node, checkNames, isDefault) {
  31787. if (checkNames) {
  31788. // Check for duplicate exports
  31789. if (isDefault) {
  31790. // Default exports
  31791. this.checkDuplicateExports(node, "default");
  31792. } else if (node.specifiers && node.specifiers.length) {
  31793. // Named exports
  31794. for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  31795. var _ref2;
  31796. if (_isArray2) {
  31797. if (_i2 >= _iterator2.length) break;
  31798. _ref2 = _iterator2[_i2++];
  31799. } else {
  31800. _i2 = _iterator2.next();
  31801. if (_i2.done) break;
  31802. _ref2 = _i2.value;
  31803. }
  31804. var specifier = _ref2;
  31805. this.checkDuplicateExports(specifier, specifier.exported.name);
  31806. }
  31807. } else if (node.declaration) {
  31808. // Exported declarations
  31809. if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
  31810. this.checkDuplicateExports(node, node.declaration.id.name);
  31811. } else if (node.declaration.type === "VariableDeclaration") {
  31812. for (var _iterator3 = node.declaration.declarations, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  31813. var _ref3;
  31814. if (_isArray3) {
  31815. if (_i3 >= _iterator3.length) break;
  31816. _ref3 = _iterator3[_i3++];
  31817. } else {
  31818. _i3 = _iterator3.next();
  31819. if (_i3.done) break;
  31820. _ref3 = _i3.value;
  31821. }
  31822. var declaration = _ref3;
  31823. this.checkDeclaration(declaration.id);
  31824. }
  31825. }
  31826. }
  31827. }
  31828. if (this.state.decorators.length) {
  31829. var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
  31830. if (!node.declaration || !isClass) {
  31831. this.raise(node.start, "You can only use decorators on an export when exporting a class");
  31832. }
  31833. this.takeDecorators(node.declaration);
  31834. }
  31835. };
  31836. pp$1.checkDeclaration = function (node) {
  31837. if (node.type === "ObjectPattern") {
  31838. for (var _iterator4 = node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  31839. var _ref4;
  31840. if (_isArray4) {
  31841. if (_i4 >= _iterator4.length) break;
  31842. _ref4 = _iterator4[_i4++];
  31843. } else {
  31844. _i4 = _iterator4.next();
  31845. if (_i4.done) break;
  31846. _ref4 = _i4.value;
  31847. }
  31848. var prop = _ref4;
  31849. this.checkDeclaration(prop);
  31850. }
  31851. } else if (node.type === "ArrayPattern") {
  31852. for (var _iterator5 = node.elements, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
  31853. var _ref5;
  31854. if (_isArray5) {
  31855. if (_i5 >= _iterator5.length) break;
  31856. _ref5 = _iterator5[_i5++];
  31857. } else {
  31858. _i5 = _iterator5.next();
  31859. if (_i5.done) break;
  31860. _ref5 = _i5.value;
  31861. }
  31862. var elem = _ref5;
  31863. if (elem) {
  31864. this.checkDeclaration(elem);
  31865. }
  31866. }
  31867. } else if (node.type === "ObjectProperty") {
  31868. this.checkDeclaration(node.value);
  31869. } else if (node.type === "RestElement" || node.type === "RestProperty") {
  31870. this.checkDeclaration(node.argument);
  31871. } else if (node.type === "Identifier") {
  31872. this.checkDuplicateExports(node, node.name);
  31873. }
  31874. };
  31875. pp$1.checkDuplicateExports = function (node, name) {
  31876. if (this.state.exportedIdentifiers.indexOf(name) > -1) {
  31877. this.raiseDuplicateExportError(node, name);
  31878. }
  31879. this.state.exportedIdentifiers.push(name);
  31880. };
  31881. pp$1.raiseDuplicateExportError = function (node, name) {
  31882. this.raise(node.start, name === "default" ? "Only one default export allowed per module." : "`" + name + "` has already been exported. Exported identifiers must be unique.");
  31883. };
  31884. // Parses a comma-separated list of module exports.
  31885. pp$1.parseExportSpecifiers = function () {
  31886. var nodes = [];
  31887. var first = true;
  31888. var needsFrom = void 0;
  31889. // export { x, y as z } [from '...']
  31890. this.expect(types.braceL);
  31891. while (!this.eat(types.braceR)) {
  31892. if (first) {
  31893. first = false;
  31894. } else {
  31895. this.expect(types.comma);
  31896. if (this.eat(types.braceR)) break;
  31897. }
  31898. var isDefault = this.match(types._default);
  31899. if (isDefault && !needsFrom) needsFrom = true;
  31900. var node = this.startNode();
  31901. node.local = this.parseIdentifier(isDefault);
  31902. node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
  31903. nodes.push(this.finishNode(node, "ExportSpecifier"));
  31904. }
  31905. // https://github.com/ember-cli/ember-cli/pull/3739
  31906. if (needsFrom && !this.isContextual("from")) {
  31907. this.unexpected();
  31908. }
  31909. return nodes;
  31910. };
  31911. // Parses import declaration.
  31912. pp$1.parseImport = function (node) {
  31913. this.eat(types._import);
  31914. // import '...'
  31915. if (this.match(types.string)) {
  31916. node.specifiers = [];
  31917. node.source = this.parseExprAtom();
  31918. } else {
  31919. node.specifiers = [];
  31920. this.parseImportSpecifiers(node);
  31921. this.expectContextual("from");
  31922. node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected();
  31923. }
  31924. this.semicolon();
  31925. return this.finishNode(node, "ImportDeclaration");
  31926. };
  31927. // Parses a comma-separated list of module imports.
  31928. pp$1.parseImportSpecifiers = function (node) {
  31929. var first = true;
  31930. if (this.match(types.name)) {
  31931. // import defaultObj, { x, y as z } from '...'
  31932. var startPos = this.state.start;
  31933. var startLoc = this.state.startLoc;
  31934. node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc));
  31935. if (!this.eat(types.comma)) return;
  31936. }
  31937. if (this.match(types.star)) {
  31938. var specifier = this.startNode();
  31939. this.next();
  31940. this.expectContextual("as");
  31941. specifier.local = this.parseIdentifier();
  31942. this.checkLVal(specifier.local, true, undefined, "import namespace specifier");
  31943. node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier"));
  31944. return;
  31945. }
  31946. this.expect(types.braceL);
  31947. while (!this.eat(types.braceR)) {
  31948. if (first) {
  31949. first = false;
  31950. } else {
  31951. // Detect an attempt to deep destructure
  31952. if (this.eat(types.colon)) {
  31953. this.unexpected(null, "ES2015 named imports do not destructure. Use another statement for destructuring after the import.");
  31954. }
  31955. this.expect(types.comma);
  31956. if (this.eat(types.braceR)) break;
  31957. }
  31958. this.parseImportSpecifier(node);
  31959. }
  31960. };
  31961. pp$1.parseImportSpecifier = function (node) {
  31962. var specifier = this.startNode();
  31963. specifier.imported = this.parseIdentifier(true);
  31964. if (this.eatContextual("as")) {
  31965. specifier.local = this.parseIdentifier();
  31966. } else {
  31967. this.checkReservedWord(specifier.imported.name, specifier.start, true, true);
  31968. specifier.local = specifier.imported.__clone();
  31969. }
  31970. this.checkLVal(specifier.local, true, undefined, "import specifier");
  31971. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  31972. };
  31973. pp$1.parseImportSpecifierDefault = function (id, startPos, startLoc) {
  31974. var node = this.startNodeAt(startPos, startLoc);
  31975. node.local = id;
  31976. this.checkLVal(node.local, true, undefined, "default import specifier");
  31977. return this.finishNode(node, "ImportDefaultSpecifier");
  31978. };
  31979. var pp$2 = Parser.prototype;
  31980. // Convert existing expression atom to assignable pattern
  31981. // if possible.
  31982. pp$2.toAssignable = function (node, isBinding, contextDescription) {
  31983. if (node) {
  31984. switch (node.type) {
  31985. case "Identifier":
  31986. case "ObjectPattern":
  31987. case "ArrayPattern":
  31988. case "AssignmentPattern":
  31989. break;
  31990. case "ObjectExpression":
  31991. node.type = "ObjectPattern";
  31992. for (var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  31993. var _ref;
  31994. if (_isArray) {
  31995. if (_i >= _iterator.length) break;
  31996. _ref = _iterator[_i++];
  31997. } else {
  31998. _i = _iterator.next();
  31999. if (_i.done) break;
  32000. _ref = _i.value;
  32001. }
  32002. var prop = _ref;
  32003. if (prop.type === "ObjectMethod") {
  32004. if (prop.kind === "get" || prop.kind === "set") {
  32005. this.raise(prop.key.start, "Object pattern can't contain getter or setter");
  32006. } else {
  32007. this.raise(prop.key.start, "Object pattern can't contain methods");
  32008. }
  32009. } else {
  32010. this.toAssignable(prop, isBinding, "object destructuring pattern");
  32011. }
  32012. }
  32013. break;
  32014. case "ObjectProperty":
  32015. this.toAssignable(node.value, isBinding, contextDescription);
  32016. break;
  32017. case "SpreadProperty":
  32018. node.type = "RestProperty";
  32019. var arg = node.argument;
  32020. this.toAssignable(arg, isBinding, contextDescription);
  32021. break;
  32022. case "ArrayExpression":
  32023. node.type = "ArrayPattern";
  32024. this.toAssignableList(node.elements, isBinding, contextDescription);
  32025. break;
  32026. case "AssignmentExpression":
  32027. if (node.operator === "=") {
  32028. node.type = "AssignmentPattern";
  32029. delete node.operator;
  32030. } else {
  32031. this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
  32032. }
  32033. break;
  32034. case "MemberExpression":
  32035. if (!isBinding) break;
  32036. default:
  32037. {
  32038. var message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : /* istanbul ignore next */"expression");
  32039. this.raise(node.start, message);
  32040. }
  32041. }
  32042. }
  32043. return node;
  32044. };
  32045. // Convert list of expression atoms to binding list.
  32046. pp$2.toAssignableList = function (exprList, isBinding, contextDescription) {
  32047. var end = exprList.length;
  32048. if (end) {
  32049. var last = exprList[end - 1];
  32050. if (last && last.type === "RestElement") {
  32051. --end;
  32052. } else if (last && last.type === "SpreadElement") {
  32053. last.type = "RestElement";
  32054. var arg = last.argument;
  32055. this.toAssignable(arg, isBinding, contextDescription);
  32056. if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") {
  32057. this.unexpected(arg.start);
  32058. }
  32059. --end;
  32060. }
  32061. }
  32062. for (var i = 0; i < end; i++) {
  32063. var elt = exprList[i];
  32064. if (elt) this.toAssignable(elt, isBinding, contextDescription);
  32065. }
  32066. return exprList;
  32067. };
  32068. // Convert list of expression atoms to a list of
  32069. pp$2.toReferencedList = function (exprList) {
  32070. return exprList;
  32071. };
  32072. // Parses spread element.
  32073. pp$2.parseSpread = function (refShorthandDefaultPos) {
  32074. var node = this.startNode();
  32075. this.next();
  32076. node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos);
  32077. return this.finishNode(node, "SpreadElement");
  32078. };
  32079. pp$2.parseRest = function () {
  32080. var node = this.startNode();
  32081. this.next();
  32082. node.argument = this.parseBindingIdentifier();
  32083. return this.finishNode(node, "RestElement");
  32084. };
  32085. pp$2.shouldAllowYieldIdentifier = function () {
  32086. return this.match(types._yield) && !this.state.strict && !this.state.inGenerator;
  32087. };
  32088. pp$2.parseBindingIdentifier = function () {
  32089. return this.parseIdentifier(this.shouldAllowYieldIdentifier());
  32090. };
  32091. // Parses lvalue (assignable) atom.
  32092. pp$2.parseBindingAtom = function () {
  32093. switch (this.state.type) {
  32094. case types._yield:
  32095. if (this.state.strict || this.state.inGenerator) this.unexpected();
  32096. // fall-through
  32097. case types.name:
  32098. return this.parseIdentifier(true);
  32099. case types.bracketL:
  32100. var node = this.startNode();
  32101. this.next();
  32102. node.elements = this.parseBindingList(types.bracketR, true);
  32103. return this.finishNode(node, "ArrayPattern");
  32104. case types.braceL:
  32105. return this.parseObj(true);
  32106. default:
  32107. this.unexpected();
  32108. }
  32109. };
  32110. pp$2.parseBindingList = function (close, allowEmpty) {
  32111. var elts = [];
  32112. var first = true;
  32113. while (!this.eat(close)) {
  32114. if (first) {
  32115. first = false;
  32116. } else {
  32117. this.expect(types.comma);
  32118. }
  32119. if (allowEmpty && this.match(types.comma)) {
  32120. elts.push(null);
  32121. } else if (this.eat(close)) {
  32122. break;
  32123. } else if (this.match(types.ellipsis)) {
  32124. elts.push(this.parseAssignableListItemTypes(this.parseRest()));
  32125. this.expect(close);
  32126. break;
  32127. } else {
  32128. var decorators = [];
  32129. while (this.match(types.at)) {
  32130. decorators.push(this.parseDecorator());
  32131. }
  32132. var left = this.parseMaybeDefault();
  32133. if (decorators.length) {
  32134. left.decorators = decorators;
  32135. }
  32136. this.parseAssignableListItemTypes(left);
  32137. elts.push(this.parseMaybeDefault(left.start, left.loc.start, left));
  32138. }
  32139. }
  32140. return elts;
  32141. };
  32142. pp$2.parseAssignableListItemTypes = function (param) {
  32143. return param;
  32144. };
  32145. // Parses assignment pattern around given atom if possible.
  32146. pp$2.parseMaybeDefault = function (startPos, startLoc, left) {
  32147. startLoc = startLoc || this.state.startLoc;
  32148. startPos = startPos || this.state.start;
  32149. left = left || this.parseBindingAtom();
  32150. if (!this.eat(types.eq)) return left;
  32151. var node = this.startNodeAt(startPos, startLoc);
  32152. node.left = left;
  32153. node.right = this.parseMaybeAssign();
  32154. return this.finishNode(node, "AssignmentPattern");
  32155. };
  32156. // Verify that a node is an lval — something that can be assigned
  32157. // to.
  32158. pp$2.checkLVal = function (expr, isBinding, checkClashes, contextDescription) {
  32159. switch (expr.type) {
  32160. case "Identifier":
  32161. this.checkReservedWord(expr.name, expr.start, false, true);
  32162. if (checkClashes) {
  32163. // we need to prefix this with an underscore for the cases where we have a key of
  32164. // `__proto__`. there's a bug in old V8 where the following wouldn't work:
  32165. //
  32166. // > var obj = Object.create(null);
  32167. // undefined
  32168. // > obj.__proto__
  32169. // null
  32170. // > obj.__proto__ = true;
  32171. // true
  32172. // > obj.__proto__
  32173. // null
  32174. var key = "_" + expr.name;
  32175. if (checkClashes[key]) {
  32176. this.raise(expr.start, "Argument name clash in strict mode");
  32177. } else {
  32178. checkClashes[key] = true;
  32179. }
  32180. }
  32181. break;
  32182. case "MemberExpression":
  32183. if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression");
  32184. break;
  32185. case "ObjectPattern":
  32186. for (var _iterator2 = expr.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  32187. var _ref2;
  32188. if (_isArray2) {
  32189. if (_i2 >= _iterator2.length) break;
  32190. _ref2 = _iterator2[_i2++];
  32191. } else {
  32192. _i2 = _iterator2.next();
  32193. if (_i2.done) break;
  32194. _ref2 = _i2.value;
  32195. }
  32196. var prop = _ref2;
  32197. if (prop.type === "ObjectProperty") prop = prop.value;
  32198. this.checkLVal(prop, isBinding, checkClashes, "object destructuring pattern");
  32199. }
  32200. break;
  32201. case "ArrayPattern":
  32202. for (var _iterator3 = expr.elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  32203. var _ref3;
  32204. if (_isArray3) {
  32205. if (_i3 >= _iterator3.length) break;
  32206. _ref3 = _iterator3[_i3++];
  32207. } else {
  32208. _i3 = _iterator3.next();
  32209. if (_i3.done) break;
  32210. _ref3 = _i3.value;
  32211. }
  32212. var elem = _ref3;
  32213. if (elem) this.checkLVal(elem, isBinding, checkClashes, "array destructuring pattern");
  32214. }
  32215. break;
  32216. case "AssignmentPattern":
  32217. this.checkLVal(expr.left, isBinding, checkClashes, "assignment pattern");
  32218. break;
  32219. case "RestProperty":
  32220. this.checkLVal(expr.argument, isBinding, checkClashes, "rest property");
  32221. break;
  32222. case "RestElement":
  32223. this.checkLVal(expr.argument, isBinding, checkClashes, "rest element");
  32224. break;
  32225. default:
  32226. {
  32227. var message = (isBinding ? /* istanbul ignore next */"Binding invalid" : "Invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : /* istanbul ignore next */"expression");
  32228. this.raise(expr.start, message);
  32229. }
  32230. }
  32231. };
  32232. /* eslint max-len: 0 */
  32233. // A recursive descent parser operates by defining functions for all
  32234. // syntactic elements, and recursively calling those, each function
  32235. // advancing the input stream and returning an AST node. Precedence
  32236. // of constructs (for example, the fact that `!x[1]` means `!(x[1])`
  32237. // instead of `(!x)[1]` is handled by the fact that the parser
  32238. // function that parses unary prefix operators is called first, and
  32239. // in turn calls the function that parses `[]` subscripts — that
  32240. // way, it'll receive the node for `x[1]` already parsed, and wraps
  32241. // *that* in the unary operator node.
  32242. //
  32243. // Acorn uses an [operator precedence parser][opp] to handle binary
  32244. // operator precedence, because it is much more compact than using
  32245. // the technique outlined above, which uses different, nesting
  32246. // functions to specify precedence, for all of the ten binary
  32247. // precedence levels that JavaScript defines.
  32248. //
  32249. // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
  32250. var pp$3 = Parser.prototype;
  32251. // Check if property name clashes with already added.
  32252. // Object/class getters and setters are not allowed to clash —
  32253. // either with each other or with an init property — and in
  32254. // strict mode, init properties are also not allowed to be repeated.
  32255. pp$3.checkPropClash = function (prop, propHash) {
  32256. if (prop.computed || prop.kind) return;
  32257. var key = prop.key;
  32258. // It is either an Identifier or a String/NumericLiteral
  32259. var name = key.type === "Identifier" ? key.name : String(key.value);
  32260. if (name === "__proto__") {
  32261. if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
  32262. propHash.proto = true;
  32263. }
  32264. };
  32265. // Convenience method to parse an Expression only
  32266. pp$3.getExpression = function () {
  32267. this.nextToken();
  32268. var expr = this.parseExpression();
  32269. if (!this.match(types.eof)) {
  32270. this.unexpected();
  32271. }
  32272. return expr;
  32273. };
  32274. // ### Expression parsing
  32275. // These nest, from the most general expression type at the top to
  32276. // 'atomic', nondivisible expression types at the bottom. Most of
  32277. // the functions will simply let the function (s) below them parse,
  32278. // and, *if* the syntactic construct they handle is present, wrap
  32279. // the AST node that the inner parser gave them in another node.
  32280. // Parse a full expression. The optional arguments are used to
  32281. // forbid the `in` operator (in for loops initialization expressions)
  32282. // and provide reference for storing '=' operator inside shorthand
  32283. // property assignment in contexts where both object expression
  32284. // and object pattern might appear (so it's possible to raise
  32285. // delayed syntax error at correct position).
  32286. pp$3.parseExpression = function (noIn, refShorthandDefaultPos) {
  32287. var startPos = this.state.start;
  32288. var startLoc = this.state.startLoc;
  32289. var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
  32290. if (this.match(types.comma)) {
  32291. var node = this.startNodeAt(startPos, startLoc);
  32292. node.expressions = [expr];
  32293. while (this.eat(types.comma)) {
  32294. node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
  32295. }
  32296. this.toReferencedList(node.expressions);
  32297. return this.finishNode(node, "SequenceExpression");
  32298. }
  32299. return expr;
  32300. };
  32301. // Parse an assignment expression. This includes applications of
  32302. // operators like `+=`.
  32303. pp$3.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
  32304. var startPos = this.state.start;
  32305. var startLoc = this.state.startLoc;
  32306. if (this.match(types._yield) && this.state.inGenerator) {
  32307. var _left = this.parseYield();
  32308. if (afterLeftParse) _left = afterLeftParse.call(this, _left, startPos, startLoc);
  32309. return _left;
  32310. }
  32311. var failOnShorthandAssign = void 0;
  32312. if (refShorthandDefaultPos) {
  32313. failOnShorthandAssign = false;
  32314. } else {
  32315. refShorthandDefaultPos = { start: 0 };
  32316. failOnShorthandAssign = true;
  32317. }
  32318. if (this.match(types.parenL) || this.match(types.name)) {
  32319. this.state.potentialArrowAt = this.state.start;
  32320. }
  32321. var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos);
  32322. if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc);
  32323. if (this.state.type.isAssign) {
  32324. var node = this.startNodeAt(startPos, startLoc);
  32325. node.operator = this.state.value;
  32326. node.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left;
  32327. refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
  32328. this.checkLVal(left, undefined, undefined, "assignment expression");
  32329. if (left.extra && left.extra.parenthesized) {
  32330. var errorMsg = void 0;
  32331. if (left.type === "ObjectPattern") {
  32332. errorMsg = "`({a}) = 0` use `({a} = 0)`";
  32333. } else if (left.type === "ArrayPattern") {
  32334. errorMsg = "`([a]) = 0` use `([a] = 0)`";
  32335. }
  32336. if (errorMsg) {
  32337. this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg);
  32338. }
  32339. }
  32340. this.next();
  32341. node.right = this.parseMaybeAssign(noIn);
  32342. return this.finishNode(node, "AssignmentExpression");
  32343. } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
  32344. this.unexpected(refShorthandDefaultPos.start);
  32345. }
  32346. return left;
  32347. };
  32348. // Parse a ternary conditional (`?:`) operator.
  32349. pp$3.parseMaybeConditional = function (noIn, refShorthandDefaultPos, refNeedsArrowPos) {
  32350. var startPos = this.state.start;
  32351. var startLoc = this.state.startLoc;
  32352. var expr = this.parseExprOps(noIn, refShorthandDefaultPos);
  32353. if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
  32354. return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos);
  32355. };
  32356. pp$3.parseConditional = function (expr, noIn, startPos, startLoc) {
  32357. if (this.eat(types.question)) {
  32358. var node = this.startNodeAt(startPos, startLoc);
  32359. node.test = expr;
  32360. node.consequent = this.parseMaybeAssign();
  32361. this.expect(types.colon);
  32362. node.alternate = this.parseMaybeAssign(noIn);
  32363. return this.finishNode(node, "ConditionalExpression");
  32364. }
  32365. return expr;
  32366. };
  32367. // Start the precedence parser.
  32368. pp$3.parseExprOps = function (noIn, refShorthandDefaultPos) {
  32369. var startPos = this.state.start;
  32370. var startLoc = this.state.startLoc;
  32371. var expr = this.parseMaybeUnary(refShorthandDefaultPos);
  32372. if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
  32373. return expr;
  32374. } else {
  32375. return this.parseExprOp(expr, startPos, startLoc, -1, noIn);
  32376. }
  32377. };
  32378. // Parse binary operators with the operator precedence parsing
  32379. // algorithm. `left` is the left-hand side of the operator.
  32380. // `minPrec` provides context that allows the function to stop and
  32381. // defer further parser to one of its callers when it encounters an
  32382. // operator that has a lower precedence than the set it is parsing.
  32383. pp$3.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) {
  32384. var prec = this.state.type.binop;
  32385. if (prec != null && (!noIn || !this.match(types._in))) {
  32386. if (prec > minPrec) {
  32387. var node = this.startNodeAt(leftStartPos, leftStartLoc);
  32388. node.left = left;
  32389. node.operator = this.state.value;
  32390. if (node.operator === "**" && left.type === "UnaryExpression" && left.extra && !left.extra.parenthesizedArgument && !left.extra.parenthesized) {
  32391. this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");
  32392. }
  32393. var op = this.state.type;
  32394. this.next();
  32395. var startPos = this.state.start;
  32396. var startLoc = this.state.startLoc;
  32397. node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn);
  32398. this.finishNode(node, op === types.logicalOR || op === types.logicalAND ? "LogicalExpression" : "BinaryExpression");
  32399. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
  32400. }
  32401. }
  32402. return left;
  32403. };
  32404. // Parse unary operators, both prefix and postfix.
  32405. pp$3.parseMaybeUnary = function (refShorthandDefaultPos) {
  32406. if (this.state.type.prefix) {
  32407. var node = this.startNode();
  32408. var update = this.match(types.incDec);
  32409. node.operator = this.state.value;
  32410. node.prefix = true;
  32411. this.next();
  32412. var argType = this.state.type;
  32413. node.argument = this.parseMaybeUnary();
  32414. this.addExtra(node, "parenthesizedArgument", argType === types.parenL && (!node.argument.extra || !node.argument.extra.parenthesized));
  32415. if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
  32416. this.unexpected(refShorthandDefaultPos.start);
  32417. }
  32418. if (update) {
  32419. this.checkLVal(node.argument, undefined, undefined, "prefix operation");
  32420. } else if (this.state.strict && node.operator === "delete" && node.argument.type === "Identifier") {
  32421. this.raise(node.start, "Deleting local variable in strict mode");
  32422. }
  32423. return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
  32424. }
  32425. var startPos = this.state.start;
  32426. var startLoc = this.state.startLoc;
  32427. var expr = this.parseExprSubscripts(refShorthandDefaultPos);
  32428. if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
  32429. while (this.state.type.postfix && !this.canInsertSemicolon()) {
  32430. var _node = this.startNodeAt(startPos, startLoc);
  32431. _node.operator = this.state.value;
  32432. _node.prefix = false;
  32433. _node.argument = expr;
  32434. this.checkLVal(expr, undefined, undefined, "postfix operation");
  32435. this.next();
  32436. expr = this.finishNode(_node, "UpdateExpression");
  32437. }
  32438. return expr;
  32439. };
  32440. // Parse call, dot, and `[]`-subscript expressions.
  32441. pp$3.parseExprSubscripts = function (refShorthandDefaultPos) {
  32442. var startPos = this.state.start;
  32443. var startLoc = this.state.startLoc;
  32444. var potentialArrowAt = this.state.potentialArrowAt;
  32445. var expr = this.parseExprAtom(refShorthandDefaultPos);
  32446. if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
  32447. return expr;
  32448. }
  32449. if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
  32450. return expr;
  32451. }
  32452. return this.parseSubscripts(expr, startPos, startLoc);
  32453. };
  32454. pp$3.parseSubscripts = function (base, startPos, startLoc, noCalls) {
  32455. for (;;) {
  32456. if (!noCalls && this.eat(types.doubleColon)) {
  32457. var node = this.startNodeAt(startPos, startLoc);
  32458. node.object = base;
  32459. node.callee = this.parseNoCallExpr();
  32460. return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
  32461. } else if (this.eat(types.dot)) {
  32462. var _node2 = this.startNodeAt(startPos, startLoc);
  32463. _node2.object = base;
  32464. _node2.property = this.parseIdentifier(true);
  32465. _node2.computed = false;
  32466. base = this.finishNode(_node2, "MemberExpression");
  32467. } else if (this.eat(types.bracketL)) {
  32468. var _node3 = this.startNodeAt(startPos, startLoc);
  32469. _node3.object = base;
  32470. _node3.property = this.parseExpression();
  32471. _node3.computed = true;
  32472. this.expect(types.bracketR);
  32473. base = this.finishNode(_node3, "MemberExpression");
  32474. } else if (!noCalls && this.match(types.parenL)) {
  32475. var possibleAsync = this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
  32476. this.next();
  32477. var _node4 = this.startNodeAt(startPos, startLoc);
  32478. _node4.callee = base;
  32479. _node4.arguments = this.parseCallExpressionArguments(types.parenR, possibleAsync);
  32480. if (_node4.callee.type === "Import" && _node4.arguments.length !== 1) {
  32481. this.raise(_node4.start, "import() requires exactly one argument");
  32482. }
  32483. base = this.finishNode(_node4, "CallExpression");
  32484. if (possibleAsync && this.shouldParseAsyncArrow()) {
  32485. return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node4);
  32486. } else {
  32487. this.toReferencedList(_node4.arguments);
  32488. }
  32489. } else if (this.match(types.backQuote)) {
  32490. var _node5 = this.startNodeAt(startPos, startLoc);
  32491. _node5.tag = base;
  32492. _node5.quasi = this.parseTemplate(true);
  32493. base = this.finishNode(_node5, "TaggedTemplateExpression");
  32494. } else {
  32495. return base;
  32496. }
  32497. }
  32498. };
  32499. pp$3.parseCallExpressionArguments = function (close, possibleAsyncArrow) {
  32500. var elts = [];
  32501. var innerParenStart = void 0;
  32502. var first = true;
  32503. while (!this.eat(close)) {
  32504. if (first) {
  32505. first = false;
  32506. } else {
  32507. this.expect(types.comma);
  32508. if (this.eat(close)) break;
  32509. }
  32510. // we need to make sure that if this is an async arrow functions, that we don't allow inner parens inside the params
  32511. if (this.match(types.parenL) && !innerParenStart) {
  32512. innerParenStart = this.state.start;
  32513. }
  32514. elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { start: 0 } : undefined, possibleAsyncArrow ? { start: 0 } : undefined));
  32515. }
  32516. // we found an async arrow function so let's not allow any inner parens
  32517. if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) {
  32518. this.unexpected();
  32519. }
  32520. return elts;
  32521. };
  32522. pp$3.shouldParseAsyncArrow = function () {
  32523. return this.match(types.arrow);
  32524. };
  32525. pp$3.parseAsyncArrowFromCallExpression = function (node, call) {
  32526. this.expect(types.arrow);
  32527. return this.parseArrowExpression(node, call.arguments, true);
  32528. };
  32529. // Parse a no-call expression (like argument of `new` or `::` operators).
  32530. pp$3.parseNoCallExpr = function () {
  32531. var startPos = this.state.start;
  32532. var startLoc = this.state.startLoc;
  32533. return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  32534. };
  32535. // Parse an atomic expression — either a single token that is an
  32536. // expression, an expression started by a keyword like `function` or
  32537. // `new`, or an expression wrapped in punctuation like `()`, `[]`,
  32538. // or `{}`.
  32539. pp$3.parseExprAtom = function (refShorthandDefaultPos) {
  32540. var canBeArrow = this.state.potentialArrowAt === this.state.start;
  32541. var node = void 0;
  32542. switch (this.state.type) {
  32543. case types._super:
  32544. if (!this.state.inMethod && !this.state.inClassProperty && !this.options.allowSuperOutsideMethod) {
  32545. this.raise(this.state.start, "'super' outside of function or class");
  32546. }
  32547. node = this.startNode();
  32548. this.next();
  32549. if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) {
  32550. this.unexpected();
  32551. }
  32552. if (this.match(types.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) {
  32553. this.raise(node.start, "super() outside of class constructor");
  32554. }
  32555. return this.finishNode(node, "Super");
  32556. case types._import:
  32557. if (!this.hasPlugin("dynamicImport")) this.unexpected();
  32558. node = this.startNode();
  32559. this.next();
  32560. if (!this.match(types.parenL)) {
  32561. this.unexpected(null, types.parenL);
  32562. }
  32563. return this.finishNode(node, "Import");
  32564. case types._this:
  32565. node = this.startNode();
  32566. this.next();
  32567. return this.finishNode(node, "ThisExpression");
  32568. case types._yield:
  32569. if (this.state.inGenerator) this.unexpected();
  32570. case types.name:
  32571. node = this.startNode();
  32572. var allowAwait = this.state.value === "await" && this.state.inAsync;
  32573. var allowYield = this.shouldAllowYieldIdentifier();
  32574. var id = this.parseIdentifier(allowAwait || allowYield);
  32575. if (id.name === "await") {
  32576. if (this.state.inAsync || this.inModule) {
  32577. return this.parseAwait(node);
  32578. }
  32579. } else if (id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) {
  32580. this.next();
  32581. return this.parseFunction(node, false, false, true);
  32582. } else if (canBeArrow && id.name === "async" && this.match(types.name)) {
  32583. var params = [this.parseIdentifier()];
  32584. this.expect(types.arrow);
  32585. // let foo = bar => {};
  32586. return this.parseArrowExpression(node, params, true);
  32587. }
  32588. if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {
  32589. return this.parseArrowExpression(node, [id]);
  32590. }
  32591. return id;
  32592. case types._do:
  32593. if (this.hasPlugin("doExpressions")) {
  32594. var _node6 = this.startNode();
  32595. this.next();
  32596. var oldInFunction = this.state.inFunction;
  32597. var oldLabels = this.state.labels;
  32598. this.state.labels = [];
  32599. this.state.inFunction = false;
  32600. _node6.body = this.parseBlock(false, true);
  32601. this.state.inFunction = oldInFunction;
  32602. this.state.labels = oldLabels;
  32603. return this.finishNode(_node6, "DoExpression");
  32604. }
  32605. case types.regexp:
  32606. var value = this.state.value;
  32607. node = this.parseLiteral(value.value, "RegExpLiteral");
  32608. node.pattern = value.pattern;
  32609. node.flags = value.flags;
  32610. return node;
  32611. case types.num:
  32612. return this.parseLiteral(this.state.value, "NumericLiteral");
  32613. case types.string:
  32614. return this.parseLiteral(this.state.value, "StringLiteral");
  32615. case types._null:
  32616. node = this.startNode();
  32617. this.next();
  32618. return this.finishNode(node, "NullLiteral");
  32619. case types._true:case types._false:
  32620. node = this.startNode();
  32621. node.value = this.match(types._true);
  32622. this.next();
  32623. return this.finishNode(node, "BooleanLiteral");
  32624. case types.parenL:
  32625. return this.parseParenAndDistinguishExpression(null, null, canBeArrow);
  32626. case types.bracketL:
  32627. node = this.startNode();
  32628. this.next();
  32629. node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos);
  32630. this.toReferencedList(node.elements);
  32631. return this.finishNode(node, "ArrayExpression");
  32632. case types.braceL:
  32633. return this.parseObj(false, refShorthandDefaultPos);
  32634. case types._function:
  32635. return this.parseFunctionExpression();
  32636. case types.at:
  32637. this.parseDecorators();
  32638. case types._class:
  32639. node = this.startNode();
  32640. this.takeDecorators(node);
  32641. return this.parseClass(node, false);
  32642. case types._new:
  32643. return this.parseNew();
  32644. case types.backQuote:
  32645. return this.parseTemplate(false);
  32646. case types.doubleColon:
  32647. node = this.startNode();
  32648. this.next();
  32649. node.object = null;
  32650. var callee = node.callee = this.parseNoCallExpr();
  32651. if (callee.type === "MemberExpression") {
  32652. return this.finishNode(node, "BindExpression");
  32653. } else {
  32654. this.raise(callee.start, "Binding should be performed on object property.");
  32655. }
  32656. default:
  32657. this.unexpected();
  32658. }
  32659. };
  32660. pp$3.parseFunctionExpression = function () {
  32661. var node = this.startNode();
  32662. var meta = this.parseIdentifier(true);
  32663. if (this.state.inGenerator && this.eat(types.dot) && this.hasPlugin("functionSent")) {
  32664. return this.parseMetaProperty(node, meta, "sent");
  32665. } else {
  32666. return this.parseFunction(node, false);
  32667. }
  32668. };
  32669. pp$3.parseMetaProperty = function (node, meta, propertyName) {
  32670. node.meta = meta;
  32671. node.property = this.parseIdentifier(true);
  32672. if (node.property.name !== propertyName) {
  32673. this.raise(node.property.start, "The only valid meta property for new is " + meta.name + "." + propertyName);
  32674. }
  32675. return this.finishNode(node, "MetaProperty");
  32676. };
  32677. pp$3.parseLiteral = function (value, type, startPos, startLoc) {
  32678. startPos = startPos || this.state.start;
  32679. startLoc = startLoc || this.state.startLoc;
  32680. var node = this.startNodeAt(startPos, startLoc);
  32681. this.addExtra(node, "rawValue", value);
  32682. this.addExtra(node, "raw", this.input.slice(startPos, this.state.end));
  32683. node.value = value;
  32684. this.next();
  32685. return this.finishNode(node, type);
  32686. };
  32687. pp$3.parseParenExpression = function () {
  32688. this.expect(types.parenL);
  32689. var val = this.parseExpression();
  32690. this.expect(types.parenR);
  32691. return val;
  32692. };
  32693. pp$3.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow) {
  32694. startPos = startPos || this.state.start;
  32695. startLoc = startLoc || this.state.startLoc;
  32696. var val = void 0;
  32697. this.expect(types.parenL);
  32698. var innerStartPos = this.state.start;
  32699. var innerStartLoc = this.state.startLoc;
  32700. var exprList = [];
  32701. var refShorthandDefaultPos = { start: 0 };
  32702. var refNeedsArrowPos = { start: 0 };
  32703. var first = true;
  32704. var spreadStart = void 0;
  32705. var optionalCommaStart = void 0;
  32706. while (!this.match(types.parenR)) {
  32707. if (first) {
  32708. first = false;
  32709. } else {
  32710. this.expect(types.comma, refNeedsArrowPos.start || null);
  32711. if (this.match(types.parenR)) {
  32712. optionalCommaStart = this.state.start;
  32713. break;
  32714. }
  32715. }
  32716. if (this.match(types.ellipsis)) {
  32717. var spreadNodeStartPos = this.state.start;
  32718. var spreadNodeStartLoc = this.state.startLoc;
  32719. spreadStart = this.state.start;
  32720. exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartPos, spreadNodeStartLoc));
  32721. break;
  32722. } else {
  32723. exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos));
  32724. }
  32725. }
  32726. var innerEndPos = this.state.start;
  32727. var innerEndLoc = this.state.startLoc;
  32728. this.expect(types.parenR);
  32729. var arrowNode = this.startNodeAt(startPos, startLoc);
  32730. if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
  32731. for (var _iterator = exprList, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  32732. var _ref;
  32733. if (_isArray) {
  32734. if (_i >= _iterator.length) break;
  32735. _ref = _iterator[_i++];
  32736. } else {
  32737. _i = _iterator.next();
  32738. if (_i.done) break;
  32739. _ref = _i.value;
  32740. }
  32741. var param = _ref;
  32742. if (param.extra && param.extra.parenthesized) this.unexpected(param.extra.parenStart);
  32743. }
  32744. return this.parseArrowExpression(arrowNode, exprList);
  32745. }
  32746. if (!exprList.length) {
  32747. this.unexpected(this.state.lastTokStart);
  32748. }
  32749. if (optionalCommaStart) this.unexpected(optionalCommaStart);
  32750. if (spreadStart) this.unexpected(spreadStart);
  32751. if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
  32752. if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start);
  32753. if (exprList.length > 1) {
  32754. val = this.startNodeAt(innerStartPos, innerStartLoc);
  32755. val.expressions = exprList;
  32756. this.toReferencedList(val.expressions);
  32757. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  32758. } else {
  32759. val = exprList[0];
  32760. }
  32761. this.addExtra(val, "parenthesized", true);
  32762. this.addExtra(val, "parenStart", startPos);
  32763. return val;
  32764. };
  32765. pp$3.shouldParseArrow = function () {
  32766. return !this.canInsertSemicolon();
  32767. };
  32768. pp$3.parseArrow = function (node) {
  32769. if (this.eat(types.arrow)) {
  32770. return node;
  32771. }
  32772. };
  32773. pp$3.parseParenItem = function (node) {
  32774. return node;
  32775. };
  32776. // New's precedence is slightly tricky. It must allow its argument
  32777. // to be a `[]` or dot subscript expression, but not a call — at
  32778. // least, not without wrapping it in parentheses. Thus, it uses the
  32779. pp$3.parseNew = function () {
  32780. var node = this.startNode();
  32781. var meta = this.parseIdentifier(true);
  32782. if (this.eat(types.dot)) {
  32783. var metaProp = this.parseMetaProperty(node, meta, "target");
  32784. if (!this.state.inFunction) {
  32785. this.raise(metaProp.property.start, "new.target can only be used in functions");
  32786. }
  32787. return metaProp;
  32788. }
  32789. node.callee = this.parseNoCallExpr();
  32790. if (this.eat(types.parenL)) {
  32791. node.arguments = this.parseExprList(types.parenR);
  32792. this.toReferencedList(node.arguments);
  32793. } else {
  32794. node.arguments = [];
  32795. }
  32796. return this.finishNode(node, "NewExpression");
  32797. };
  32798. // Parse template expression.
  32799. pp$3.parseTemplateElement = function (isTagged) {
  32800. var elem = this.startNode();
  32801. if (this.state.value === null) {
  32802. if (!isTagged || !this.hasPlugin("templateInvalidEscapes")) {
  32803. this.raise(this.state.invalidTemplateEscapePosition, "Invalid escape sequence in template");
  32804. } else {
  32805. this.state.invalidTemplateEscapePosition = null;
  32806. }
  32807. }
  32808. elem.value = {
  32809. raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
  32810. cooked: this.state.value
  32811. };
  32812. this.next();
  32813. elem.tail = this.match(types.backQuote);
  32814. return this.finishNode(elem, "TemplateElement");
  32815. };
  32816. pp$3.parseTemplate = function (isTagged) {
  32817. var node = this.startNode();
  32818. this.next();
  32819. node.expressions = [];
  32820. var curElt = this.parseTemplateElement(isTagged);
  32821. node.quasis = [curElt];
  32822. while (!curElt.tail) {
  32823. this.expect(types.dollarBraceL);
  32824. node.expressions.push(this.parseExpression());
  32825. this.expect(types.braceR);
  32826. node.quasis.push(curElt = this.parseTemplateElement(isTagged));
  32827. }
  32828. this.next();
  32829. return this.finishNode(node, "TemplateLiteral");
  32830. };
  32831. // Parse an object literal or binding pattern.
  32832. pp$3.parseObj = function (isPattern, refShorthandDefaultPos) {
  32833. var decorators = [];
  32834. var propHash = Object.create(null);
  32835. var first = true;
  32836. var node = this.startNode();
  32837. node.properties = [];
  32838. this.next();
  32839. var firstRestLocation = null;
  32840. while (!this.eat(types.braceR)) {
  32841. if (first) {
  32842. first = false;
  32843. } else {
  32844. this.expect(types.comma);
  32845. if (this.eat(types.braceR)) break;
  32846. }
  32847. while (this.match(types.at)) {
  32848. decorators.push(this.parseDecorator());
  32849. }
  32850. var prop = this.startNode(),
  32851. isGenerator = false,
  32852. isAsync = false,
  32853. startPos = void 0,
  32854. startLoc = void 0;
  32855. if (decorators.length) {
  32856. prop.decorators = decorators;
  32857. decorators = [];
  32858. }
  32859. if (this.hasPlugin("objectRestSpread") && this.match(types.ellipsis)) {
  32860. prop = this.parseSpread(isPattern ? { start: 0 } : undefined);
  32861. prop.type = isPattern ? "RestProperty" : "SpreadProperty";
  32862. if (isPattern) this.toAssignable(prop.argument, true, "object pattern");
  32863. node.properties.push(prop);
  32864. if (isPattern) {
  32865. var position = this.state.start;
  32866. if (firstRestLocation !== null) {
  32867. this.unexpected(firstRestLocation, "Cannot have multiple rest elements when destructuring");
  32868. } else if (this.eat(types.braceR)) {
  32869. break;
  32870. } else if (this.match(types.comma) && this.lookahead().type === types.braceR) {
  32871. // TODO: temporary rollback
  32872. // this.unexpected(position, "A trailing comma is not permitted after the rest element");
  32873. continue;
  32874. } else {
  32875. firstRestLocation = position;
  32876. continue;
  32877. }
  32878. } else {
  32879. continue;
  32880. }
  32881. }
  32882. prop.method = false;
  32883. prop.shorthand = false;
  32884. if (isPattern || refShorthandDefaultPos) {
  32885. startPos = this.state.start;
  32886. startLoc = this.state.startLoc;
  32887. }
  32888. if (!isPattern) {
  32889. isGenerator = this.eat(types.star);
  32890. }
  32891. if (!isPattern && this.isContextual("async")) {
  32892. if (isGenerator) this.unexpected();
  32893. var asyncId = this.parseIdentifier();
  32894. if (this.match(types.colon) || this.match(types.parenL) || this.match(types.braceR) || this.match(types.eq) || this.match(types.comma)) {
  32895. prop.key = asyncId;
  32896. prop.computed = false;
  32897. } else {
  32898. isAsync = true;
  32899. if (this.hasPlugin("asyncGenerators")) isGenerator = this.eat(types.star);
  32900. this.parsePropertyName(prop);
  32901. }
  32902. } else {
  32903. this.parsePropertyName(prop);
  32904. }
  32905. this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos);
  32906. this.checkPropClash(prop, propHash);
  32907. if (prop.shorthand) {
  32908. this.addExtra(prop, "shorthand", true);
  32909. }
  32910. node.properties.push(prop);
  32911. }
  32912. if (firstRestLocation !== null) {
  32913. this.unexpected(firstRestLocation, "The rest element has to be the last element when destructuring");
  32914. }
  32915. if (decorators.length) {
  32916. this.raise(this.state.start, "You have trailing decorators with no property");
  32917. }
  32918. return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
  32919. };
  32920. pp$3.isGetterOrSetterMethod = function (prop, isPattern) {
  32921. return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || // get "string"() {}
  32922. this.match(types.num) || // get 1() {}
  32923. this.match(types.bracketL) || // get ["string"]() {}
  32924. this.match(types.name) || // get foo() {}
  32925. this.state.type.keyword // get debugger() {}
  32926. );
  32927. };
  32928. // get methods aren't allowed to have any parameters
  32929. // set methods must have exactly 1 parameter
  32930. pp$3.checkGetterSetterParamCount = function (method) {
  32931. var paramCount = method.kind === "get" ? 0 : 1;
  32932. if (method.params.length !== paramCount) {
  32933. var start = method.start;
  32934. if (method.kind === "get") {
  32935. this.raise(start, "getter should have no params");
  32936. } else {
  32937. this.raise(start, "setter should have exactly one param");
  32938. }
  32939. }
  32940. };
  32941. pp$3.parseObjectMethod = function (prop, isGenerator, isAsync, isPattern) {
  32942. if (isAsync || isGenerator || this.match(types.parenL)) {
  32943. if (isPattern) this.unexpected();
  32944. prop.kind = "method";
  32945. prop.method = true;
  32946. this.parseMethod(prop, isGenerator, isAsync);
  32947. return this.finishNode(prop, "ObjectMethod");
  32948. }
  32949. if (this.isGetterOrSetterMethod(prop, isPattern)) {
  32950. if (isGenerator || isAsync) this.unexpected();
  32951. prop.kind = prop.key.name;
  32952. this.parsePropertyName(prop);
  32953. this.parseMethod(prop);
  32954. this.checkGetterSetterParamCount(prop);
  32955. return this.finishNode(prop, "ObjectMethod");
  32956. }
  32957. };
  32958. pp$3.parseObjectProperty = function (prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {
  32959. if (this.eat(types.colon)) {
  32960. prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
  32961. return this.finishNode(prop, "ObjectProperty");
  32962. }
  32963. if (!prop.computed && prop.key.type === "Identifier") {
  32964. this.checkReservedWord(prop.key.name, prop.key.start, true, true);
  32965. if (isPattern) {
  32966. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  32967. } else if (this.match(types.eq) && refShorthandDefaultPos) {
  32968. if (!refShorthandDefaultPos.start) {
  32969. refShorthandDefaultPos.start = this.state.start;
  32970. }
  32971. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  32972. } else {
  32973. prop.value = prop.key.__clone();
  32974. }
  32975. prop.shorthand = true;
  32976. return this.finishNode(prop, "ObjectProperty");
  32977. }
  32978. };
  32979. pp$3.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos) {
  32980. var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos);
  32981. if (!node) this.unexpected();
  32982. return node;
  32983. };
  32984. pp$3.parsePropertyName = function (prop) {
  32985. if (this.eat(types.bracketL)) {
  32986. prop.computed = true;
  32987. prop.key = this.parseMaybeAssign();
  32988. this.expect(types.bracketR);
  32989. } else {
  32990. prop.computed = false;
  32991. var oldInPropertyName = this.state.inPropertyName;
  32992. this.state.inPropertyName = true;
  32993. prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  32994. this.state.inPropertyName = oldInPropertyName;
  32995. }
  32996. return prop.key;
  32997. };
  32998. // Initialize empty function node.
  32999. pp$3.initFunction = function (node, isAsync) {
  33000. node.id = null;
  33001. node.generator = false;
  33002. node.expression = false;
  33003. node.async = !!isAsync;
  33004. };
  33005. // Parse object or class method.
  33006. pp$3.parseMethod = function (node, isGenerator, isAsync) {
  33007. var oldInMethod = this.state.inMethod;
  33008. this.state.inMethod = node.kind || true;
  33009. this.initFunction(node, isAsync);
  33010. this.expect(types.parenL);
  33011. node.params = this.parseBindingList(types.parenR);
  33012. node.generator = !!isGenerator;
  33013. this.parseFunctionBody(node);
  33014. this.state.inMethod = oldInMethod;
  33015. return node;
  33016. };
  33017. // Parse arrow function expression with given parameters.
  33018. pp$3.parseArrowExpression = function (node, params, isAsync) {
  33019. this.initFunction(node, isAsync);
  33020. node.params = this.toAssignableList(params, true, "arrow function parameters");
  33021. this.parseFunctionBody(node, true);
  33022. return this.finishNode(node, "ArrowFunctionExpression");
  33023. };
  33024. pp$3.isStrictBody = function (node, isExpression) {
  33025. if (!isExpression && node.body.directives.length) {
  33026. for (var _iterator2 = node.body.directives, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  33027. var _ref2;
  33028. if (_isArray2) {
  33029. if (_i2 >= _iterator2.length) break;
  33030. _ref2 = _iterator2[_i2++];
  33031. } else {
  33032. _i2 = _iterator2.next();
  33033. if (_i2.done) break;
  33034. _ref2 = _i2.value;
  33035. }
  33036. var directive = _ref2;
  33037. if (directive.value.value === "use strict") {
  33038. return true;
  33039. }
  33040. }
  33041. }
  33042. return false;
  33043. };
  33044. // Parse function body and check parameters.
  33045. pp$3.parseFunctionBody = function (node, allowExpression) {
  33046. var isExpression = allowExpression && !this.match(types.braceL);
  33047. var oldInAsync = this.state.inAsync;
  33048. this.state.inAsync = node.async;
  33049. if (isExpression) {
  33050. node.body = this.parseMaybeAssign();
  33051. node.expression = true;
  33052. } else {
  33053. // Start a new scope with regard to labels and the `inFunction`
  33054. // flag (restore them to their old value afterwards).
  33055. var oldInFunc = this.state.inFunction;
  33056. var oldInGen = this.state.inGenerator;
  33057. var oldLabels = this.state.labels;
  33058. this.state.inFunction = true;this.state.inGenerator = node.generator;this.state.labels = [];
  33059. node.body = this.parseBlock(true);
  33060. node.expression = false;
  33061. this.state.inFunction = oldInFunc;this.state.inGenerator = oldInGen;this.state.labels = oldLabels;
  33062. }
  33063. this.state.inAsync = oldInAsync;
  33064. // If this is a strict mode function, verify that argument names
  33065. // are not repeated, and it does not try to bind the words `eval`
  33066. // or `arguments`.
  33067. var isStrict = this.isStrictBody(node, isExpression);
  33068. // Also check when allowExpression === true for arrow functions
  33069. var checkLVal = this.state.strict || allowExpression || isStrict;
  33070. if (isStrict && node.id && node.id.type === "Identifier" && node.id.name === "yield") {
  33071. this.raise(node.id.start, "Binding yield in strict mode");
  33072. }
  33073. if (checkLVal) {
  33074. var nameHash = Object.create(null);
  33075. var oldStrict = this.state.strict;
  33076. if (isStrict) this.state.strict = true;
  33077. if (node.id) {
  33078. this.checkLVal(node.id, true, undefined, "function name");
  33079. }
  33080. for (var _iterator3 = node.params, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  33081. var _ref3;
  33082. if (_isArray3) {
  33083. if (_i3 >= _iterator3.length) break;
  33084. _ref3 = _iterator3[_i3++];
  33085. } else {
  33086. _i3 = _iterator3.next();
  33087. if (_i3.done) break;
  33088. _ref3 = _i3.value;
  33089. }
  33090. var param = _ref3;
  33091. if (isStrict && param.type !== "Identifier") {
  33092. this.raise(param.start, "Non-simple parameter in strict mode");
  33093. }
  33094. this.checkLVal(param, true, nameHash, "function parameter list");
  33095. }
  33096. this.state.strict = oldStrict;
  33097. }
  33098. };
  33099. // Parses a comma-separated list of expressions, and returns them as
  33100. // an array. `close` is the token type that ends the list, and
  33101. // `allowEmpty` can be turned on to allow subsequent commas with
  33102. // nothing in between them to be parsed as `null` (which is needed
  33103. // for array literals).
  33104. pp$3.parseExprList = function (close, allowEmpty, refShorthandDefaultPos) {
  33105. var elts = [];
  33106. var first = true;
  33107. while (!this.eat(close)) {
  33108. if (first) {
  33109. first = false;
  33110. } else {
  33111. this.expect(types.comma);
  33112. if (this.eat(close)) break;
  33113. }
  33114. elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos));
  33115. }
  33116. return elts;
  33117. };
  33118. pp$3.parseExprListItem = function (allowEmpty, refShorthandDefaultPos, refNeedsArrowPos) {
  33119. var elt = void 0;
  33120. if (allowEmpty && this.match(types.comma)) {
  33121. elt = null;
  33122. } else if (this.match(types.ellipsis)) {
  33123. elt = this.parseSpread(refShorthandDefaultPos);
  33124. } else {
  33125. elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos);
  33126. }
  33127. return elt;
  33128. };
  33129. // Parse the next token as an identifier. If `liberal` is true (used
  33130. // when parsing properties), it will also convert keywords into
  33131. // identifiers.
  33132. pp$3.parseIdentifier = function (liberal) {
  33133. var node = this.startNode();
  33134. if (!liberal) {
  33135. this.checkReservedWord(this.state.value, this.state.start, !!this.state.type.keyword, false);
  33136. }
  33137. if (this.match(types.name)) {
  33138. node.name = this.state.value;
  33139. } else if (this.state.type.keyword) {
  33140. node.name = this.state.type.keyword;
  33141. } else {
  33142. this.unexpected();
  33143. }
  33144. if (!liberal && node.name === "await" && this.state.inAsync) {
  33145. this.raise(node.start, "invalid use of await inside of an async function");
  33146. }
  33147. node.loc.identifierName = node.name;
  33148. this.next();
  33149. return this.finishNode(node, "Identifier");
  33150. };
  33151. pp$3.checkReservedWord = function (word, startLoc, checkKeywords, isBinding) {
  33152. if (this.isReservedWord(word) || checkKeywords && this.isKeyword(word)) {
  33153. this.raise(startLoc, word + " is a reserved word");
  33154. }
  33155. if (this.state.strict && (reservedWords.strict(word) || isBinding && reservedWords.strictBind(word))) {
  33156. this.raise(startLoc, word + " is a reserved word in strict mode");
  33157. }
  33158. };
  33159. // Parses await expression inside async function.
  33160. pp$3.parseAwait = function (node) {
  33161. // istanbul ignore next: this condition is checked at the call site so won't be hit here
  33162. if (!this.state.inAsync) {
  33163. this.unexpected();
  33164. }
  33165. if (this.match(types.star)) {
  33166. this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead.");
  33167. }
  33168. node.argument = this.parseMaybeUnary();
  33169. return this.finishNode(node, "AwaitExpression");
  33170. };
  33171. // Parses yield expression inside generator.
  33172. pp$3.parseYield = function () {
  33173. var node = this.startNode();
  33174. this.next();
  33175. if (this.match(types.semi) || this.canInsertSemicolon() || !this.match(types.star) && !this.state.type.startsExpr) {
  33176. node.delegate = false;
  33177. node.argument = null;
  33178. } else {
  33179. node.delegate = this.eat(types.star);
  33180. node.argument = this.parseMaybeAssign();
  33181. }
  33182. return this.finishNode(node, "YieldExpression");
  33183. };
  33184. // Start an AST node, attaching a start offset.
  33185. var pp$4 = Parser.prototype;
  33186. var commentKeys = ["leadingComments", "trailingComments", "innerComments"];
  33187. var Node = function () {
  33188. function Node(pos, loc, filename) {
  33189. classCallCheck(this, Node);
  33190. this.type = "";
  33191. this.start = pos;
  33192. this.end = 0;
  33193. this.loc = new SourceLocation(loc);
  33194. if (filename) this.loc.filename = filename;
  33195. }
  33196. Node.prototype.__clone = function __clone() {
  33197. var node2 = new Node();
  33198. for (var key in this) {
  33199. // Do not clone comments that are already attached to the node
  33200. if (commentKeys.indexOf(key) < 0) {
  33201. node2[key] = this[key];
  33202. }
  33203. }
  33204. return node2;
  33205. };
  33206. return Node;
  33207. }();
  33208. pp$4.startNode = function () {
  33209. return new Node(this.state.start, this.state.startLoc, this.filename);
  33210. };
  33211. pp$4.startNodeAt = function (pos, loc) {
  33212. return new Node(pos, loc, this.filename);
  33213. };
  33214. function finishNodeAt(node, type, pos, loc) {
  33215. node.type = type;
  33216. node.end = pos;
  33217. node.loc.end = loc;
  33218. this.processComment(node);
  33219. return node;
  33220. }
  33221. // Finish an AST node, adding `type` and `end` properties.
  33222. pp$4.finishNode = function (node, type) {
  33223. return finishNodeAt.call(this, node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
  33224. };
  33225. // Finish node at given position
  33226. pp$4.finishNodeAt = function (node, type, pos, loc) {
  33227. return finishNodeAt.call(this, node, type, pos, loc);
  33228. };
  33229. var pp$5 = Parser.prototype;
  33230. // This function is used to raise exceptions on parse errors. It
  33231. // takes an offset integer (into the current `input`) to indicate
  33232. // the location of the error, attaches the position to the end
  33233. // of the error message, and then raises a `SyntaxError` with that
  33234. // message.
  33235. pp$5.raise = function (pos, message) {
  33236. var loc = getLineInfo(this.input, pos);
  33237. message += " (" + loc.line + ":" + loc.column + ")";
  33238. var err = new SyntaxError(message);
  33239. err.pos = pos;
  33240. err.loc = loc;
  33241. throw err;
  33242. };
  33243. /* eslint max-len: 0 */
  33244. /**
  33245. * Based on the comment attachment algorithm used in espree and estraverse.
  33246. *
  33247. * Redistribution and use in source and binary forms, with or without
  33248. * modification, are permitted provided that the following conditions are met:
  33249. *
  33250. * * Redistributions of source code must retain the above copyright
  33251. * notice, this list of conditions and the following disclaimer.
  33252. * * Redistributions in binary form must reproduce the above copyright
  33253. * notice, this list of conditions and the following disclaimer in the
  33254. * documentation and/or other materials provided with the distribution.
  33255. *
  33256. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  33257. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  33258. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  33259. * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  33260. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  33261. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  33262. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  33263. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33264. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  33265. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33266. */
  33267. function last(stack) {
  33268. return stack[stack.length - 1];
  33269. }
  33270. var pp$6 = Parser.prototype;
  33271. pp$6.addComment = function (comment) {
  33272. if (this.filename) comment.loc.filename = this.filename;
  33273. this.state.trailingComments.push(comment);
  33274. this.state.leadingComments.push(comment);
  33275. };
  33276. pp$6.processComment = function (node) {
  33277. if (node.type === "Program" && node.body.length > 0) return;
  33278. var stack = this.state.commentStack;
  33279. var firstChild = void 0,
  33280. lastChild = void 0,
  33281. trailingComments = void 0,
  33282. i = void 0,
  33283. j = void 0;
  33284. if (this.state.trailingComments.length > 0) {
  33285. // If the first comment in trailingComments comes after the
  33286. // current node, then we're good - all comments in the array will
  33287. // come after the node and so it's safe to add them as official
  33288. // trailingComments.
  33289. if (this.state.trailingComments[0].start >= node.end) {
  33290. trailingComments = this.state.trailingComments;
  33291. this.state.trailingComments = [];
  33292. } else {
  33293. // Otherwise, if the first comment doesn't come after the
  33294. // current node, that means we have a mix of leading and trailing
  33295. // comments in the array and that leadingComments contains the
  33296. // same items as trailingComments. Reset trailingComments to
  33297. // zero items and we'll handle this by evaluating leadingComments
  33298. // later.
  33299. this.state.trailingComments.length = 0;
  33300. }
  33301. } else {
  33302. var lastInStack = last(stack);
  33303. if (stack.length > 0 && lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
  33304. trailingComments = lastInStack.trailingComments;
  33305. lastInStack.trailingComments = null;
  33306. }
  33307. }
  33308. // Eating the stack.
  33309. if (stack.length > 0 && last(stack).start >= node.start) {
  33310. firstChild = stack.pop();
  33311. }
  33312. while (stack.length > 0 && last(stack).start >= node.start) {
  33313. lastChild = stack.pop();
  33314. }
  33315. if (!lastChild && firstChild) lastChild = firstChild;
  33316. // Attach comments that follow a trailing comma on the last
  33317. // property in an object literal or a trailing comma in function arguments
  33318. // as trailing comments
  33319. if (firstChild && (firstChild.type === "ObjectProperty" || node.type === "CallExpression") && this.state.leadingComments.length > 0) {
  33320. var lastComment = last(this.state.leadingComments);
  33321. if (lastComment.start >= node.start) {
  33322. if (this.state.commentPreviousNode) {
  33323. for (j = 0; j < this.state.leadingComments.length; j++) {
  33324. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  33325. this.state.leadingComments.splice(j, 1);
  33326. j--;
  33327. }
  33328. }
  33329. if (this.state.leadingComments.length > 0) {
  33330. firstChild.trailingComments = this.state.leadingComments;
  33331. this.state.leadingComments = [];
  33332. }
  33333. }
  33334. }
  33335. }
  33336. if (lastChild) {
  33337. if (lastChild.leadingComments) {
  33338. if (lastChild !== node && last(lastChild.leadingComments).end <= node.start) {
  33339. node.leadingComments = lastChild.leadingComments;
  33340. lastChild.leadingComments = null;
  33341. } else {
  33342. // A leading comment for an anonymous class had been stolen by its first ClassMethod,
  33343. // so this takes back the leading comment.
  33344. // See also: https://github.com/eslint/espree/issues/158
  33345. for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
  33346. if (lastChild.leadingComments[i].end <= node.start) {
  33347. node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
  33348. break;
  33349. }
  33350. }
  33351. }
  33352. }
  33353. } else if (this.state.leadingComments.length > 0) {
  33354. if (last(this.state.leadingComments).end <= node.start) {
  33355. if (this.state.commentPreviousNode) {
  33356. for (j = 0; j < this.state.leadingComments.length; j++) {
  33357. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  33358. this.state.leadingComments.splice(j, 1);
  33359. j--;
  33360. }
  33361. }
  33362. }
  33363. if (this.state.leadingComments.length > 0) {
  33364. node.leadingComments = this.state.leadingComments;
  33365. this.state.leadingComments = [];
  33366. }
  33367. } else {
  33368. // https://github.com/eslint/espree/issues/2
  33369. //
  33370. // In special cases, such as return (without a value) and
  33371. // debugger, all comments will end up as leadingComments and
  33372. // will otherwise be eliminated. This step runs when the
  33373. // commentStack is empty and there are comments left
  33374. // in leadingComments.
  33375. //
  33376. // This loop figures out the stopping point between the actual
  33377. // leading and trailing comments by finding the location of the
  33378. // first comment that comes after the given node.
  33379. for (i = 0; i < this.state.leadingComments.length; i++) {
  33380. if (this.state.leadingComments[i].end > node.start) {
  33381. break;
  33382. }
  33383. }
  33384. // Split the array based on the location of the first comment
  33385. // that comes after the node. Keep in mind that this could
  33386. // result in an empty array, and if so, the array must be
  33387. // deleted.
  33388. node.leadingComments = this.state.leadingComments.slice(0, i);
  33389. if (node.leadingComments.length === 0) {
  33390. node.leadingComments = null;
  33391. }
  33392. // Similarly, trailing comments are attached later. The variable
  33393. // must be reset to null if there are no trailing comments.
  33394. trailingComments = this.state.leadingComments.slice(i);
  33395. if (trailingComments.length === 0) {
  33396. trailingComments = null;
  33397. }
  33398. }
  33399. }
  33400. this.state.commentPreviousNode = node;
  33401. if (trailingComments) {
  33402. if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
  33403. node.innerComments = trailingComments;
  33404. } else {
  33405. node.trailingComments = trailingComments;
  33406. }
  33407. }
  33408. stack.push(node);
  33409. };
  33410. var pp$7 = Parser.prototype;
  33411. pp$7.estreeParseRegExpLiteral = function (_ref) {
  33412. var pattern = _ref.pattern,
  33413. flags = _ref.flags;
  33414. var regex = null;
  33415. try {
  33416. regex = new RegExp(pattern, flags);
  33417. } catch (e) {
  33418. // In environments that don't support these flags value will
  33419. // be null as the regex can't be represented natively.
  33420. }
  33421. var node = this.estreeParseLiteral(regex);
  33422. node.regex = { pattern: pattern, flags: flags };
  33423. return node;
  33424. };
  33425. pp$7.estreeParseLiteral = function (value) {
  33426. return this.parseLiteral(value, "Literal");
  33427. };
  33428. pp$7.directiveToStmt = function (directive) {
  33429. var directiveLiteral = directive.value;
  33430. var stmt = this.startNodeAt(directive.start, directive.loc.start);
  33431. var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
  33432. expression.value = directiveLiteral.value;
  33433. expression.raw = directiveLiteral.extra.raw;
  33434. stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
  33435. stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
  33436. return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
  33437. };
  33438. function isSimpleProperty(node) {
  33439. return node && node.type === "Property" && node.kind === "init" && node.method === false;
  33440. }
  33441. var estreePlugin = function (instance) {
  33442. instance.extend("checkDeclaration", function (inner) {
  33443. return function (node) {
  33444. if (isSimpleProperty(node)) {
  33445. this.checkDeclaration(node.value);
  33446. } else {
  33447. inner.call(this, node);
  33448. }
  33449. };
  33450. });
  33451. instance.extend("checkGetterSetterParamCount", function () {
  33452. return function (prop) {
  33453. var paramCount = prop.kind === "get" ? 0 : 1;
  33454. if (prop.value.params.length !== paramCount) {
  33455. var start = prop.start;
  33456. if (prop.kind === "get") {
  33457. this.raise(start, "getter should have no params");
  33458. } else {
  33459. this.raise(start, "setter should have exactly one param");
  33460. }
  33461. }
  33462. };
  33463. });
  33464. instance.extend("checkLVal", function (inner) {
  33465. return function (expr, isBinding, checkClashes) {
  33466. var _this = this;
  33467. switch (expr.type) {
  33468. case "ObjectPattern":
  33469. expr.properties.forEach(function (prop) {
  33470. _this.checkLVal(prop.type === "Property" ? prop.value : prop, isBinding, checkClashes, "object destructuring pattern");
  33471. });
  33472. break;
  33473. default:
  33474. for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  33475. args[_key - 3] = arguments[_key];
  33476. }
  33477. inner.call.apply(inner, [this, expr, isBinding, checkClashes].concat(args));
  33478. }
  33479. };
  33480. });
  33481. instance.extend("checkPropClash", function () {
  33482. return function (prop, propHash) {
  33483. if (prop.computed || !isSimpleProperty(prop)) return;
  33484. var key = prop.key;
  33485. // It is either an Identifier or a String/NumericLiteral
  33486. var name = key.type === "Identifier" ? key.name : String(key.value);
  33487. if (name === "__proto__") {
  33488. if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
  33489. propHash.proto = true;
  33490. }
  33491. };
  33492. });
  33493. instance.extend("isStrictBody", function () {
  33494. return function (node, isExpression) {
  33495. if (!isExpression && node.body.body.length > 0) {
  33496. for (var _iterator = node.body.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  33497. var _ref2;
  33498. if (_isArray) {
  33499. if (_i >= _iterator.length) break;
  33500. _ref2 = _iterator[_i++];
  33501. } else {
  33502. _i = _iterator.next();
  33503. if (_i.done) break;
  33504. _ref2 = _i.value;
  33505. }
  33506. var directive = _ref2;
  33507. if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") {
  33508. if (directive.expression.value === "use strict") return true;
  33509. } else {
  33510. // Break for the first non literal expression
  33511. break;
  33512. }
  33513. }
  33514. }
  33515. return false;
  33516. };
  33517. });
  33518. instance.extend("isValidDirective", function () {
  33519. return function (stmt) {
  33520. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized);
  33521. };
  33522. });
  33523. instance.extend("stmtToDirective", function (inner) {
  33524. return function (stmt) {
  33525. var directive = inner.call(this, stmt);
  33526. var value = stmt.expression.value;
  33527. // Reset value to the actual value as in estree mode we want
  33528. // the stmt to have the real value and not the raw value
  33529. directive.value.value = value;
  33530. return directive;
  33531. };
  33532. });
  33533. instance.extend("parseBlockBody", function (inner) {
  33534. return function (node) {
  33535. var _this2 = this;
  33536. for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  33537. args[_key2 - 1] = arguments[_key2];
  33538. }
  33539. inner.call.apply(inner, [this, node].concat(args));
  33540. node.directives.reverse().forEach(function (directive) {
  33541. node.body.unshift(_this2.directiveToStmt(directive));
  33542. });
  33543. delete node.directives;
  33544. };
  33545. });
  33546. instance.extend("parseClassMethod", function (inner) {
  33547. return function (classBody) {
  33548. for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  33549. args[_key3 - 1] = arguments[_key3];
  33550. }
  33551. inner.call.apply(inner, [this, classBody].concat(args));
  33552. var body = classBody.body;
  33553. body[body.length - 1].type = "MethodDefinition";
  33554. };
  33555. });
  33556. instance.extend("parseExprAtom", function (inner) {
  33557. return function () {
  33558. switch (this.state.type) {
  33559. case types.regexp:
  33560. return this.estreeParseRegExpLiteral(this.state.value);
  33561. case types.num:
  33562. case types.string:
  33563. return this.estreeParseLiteral(this.state.value);
  33564. case types._null:
  33565. return this.estreeParseLiteral(null);
  33566. case types._true:
  33567. return this.estreeParseLiteral(true);
  33568. case types._false:
  33569. return this.estreeParseLiteral(false);
  33570. default:
  33571. for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  33572. args[_key4] = arguments[_key4];
  33573. }
  33574. return inner.call.apply(inner, [this].concat(args));
  33575. }
  33576. };
  33577. });
  33578. instance.extend("parseLiteral", function (inner) {
  33579. return function () {
  33580. for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  33581. args[_key5] = arguments[_key5];
  33582. }
  33583. var node = inner.call.apply(inner, [this].concat(args));
  33584. node.raw = node.extra.raw;
  33585. delete node.extra;
  33586. return node;
  33587. };
  33588. });
  33589. instance.extend("parseMethod", function (inner) {
  33590. return function (node) {
  33591. var funcNode = this.startNode();
  33592. funcNode.kind = node.kind; // provide kind, so inner method correctly sets state
  33593. for (var _len6 = arguments.length, args = Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
  33594. args[_key6 - 1] = arguments[_key6];
  33595. }
  33596. funcNode = inner.call.apply(inner, [this, funcNode].concat(args));
  33597. delete funcNode.kind;
  33598. node.value = this.finishNode(funcNode, "FunctionExpression");
  33599. return node;
  33600. };
  33601. });
  33602. instance.extend("parseObjectMethod", function (inner) {
  33603. return function () {
  33604. for (var _len7 = arguments.length, args = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  33605. args[_key7] = arguments[_key7];
  33606. }
  33607. var node = inner.call.apply(inner, [this].concat(args));
  33608. if (node) {
  33609. if (node.kind === "method") node.kind = "init";
  33610. node.type = "Property";
  33611. }
  33612. return node;
  33613. };
  33614. });
  33615. instance.extend("parseObjectProperty", function (inner) {
  33616. return function () {
  33617. for (var _len8 = arguments.length, args = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  33618. args[_key8] = arguments[_key8];
  33619. }
  33620. var node = inner.call.apply(inner, [this].concat(args));
  33621. if (node) {
  33622. node.kind = "init";
  33623. node.type = "Property";
  33624. }
  33625. return node;
  33626. };
  33627. });
  33628. instance.extend("toAssignable", function (inner) {
  33629. return function (node, isBinding) {
  33630. for (var _len9 = arguments.length, args = Array(_len9 > 2 ? _len9 - 2 : 0), _key9 = 2; _key9 < _len9; _key9++) {
  33631. args[_key9 - 2] = arguments[_key9];
  33632. }
  33633. if (isSimpleProperty(node)) {
  33634. this.toAssignable.apply(this, [node.value, isBinding].concat(args));
  33635. return node;
  33636. } else if (node.type === "ObjectExpression") {
  33637. node.type = "ObjectPattern";
  33638. for (var _iterator2 = node.properties, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  33639. var _ref3;
  33640. if (_isArray2) {
  33641. if (_i2 >= _iterator2.length) break;
  33642. _ref3 = _iterator2[_i2++];
  33643. } else {
  33644. _i2 = _iterator2.next();
  33645. if (_i2.done) break;
  33646. _ref3 = _i2.value;
  33647. }
  33648. var prop = _ref3;
  33649. if (prop.kind === "get" || prop.kind === "set") {
  33650. this.raise(prop.key.start, "Object pattern can't contain getter or setter");
  33651. } else if (prop.method) {
  33652. this.raise(prop.key.start, "Object pattern can't contain methods");
  33653. } else {
  33654. this.toAssignable(prop, isBinding, "object destructuring pattern");
  33655. }
  33656. }
  33657. return node;
  33658. }
  33659. return inner.call.apply(inner, [this, node, isBinding].concat(args));
  33660. };
  33661. });
  33662. };
  33663. /* eslint max-len: 0 */
  33664. var primitiveTypes = ["any", "mixed", "empty", "bool", "boolean", "number", "string", "void", "null"];
  33665. var pp$8 = Parser.prototype;
  33666. pp$8.flowParseTypeInitialiser = function (tok) {
  33667. var oldInType = this.state.inType;
  33668. this.state.inType = true;
  33669. this.expect(tok || types.colon);
  33670. var type = this.flowParseType();
  33671. this.state.inType = oldInType;
  33672. return type;
  33673. };
  33674. pp$8.flowParsePredicate = function () {
  33675. var node = this.startNode();
  33676. var moduloLoc = this.state.startLoc;
  33677. var moduloPos = this.state.start;
  33678. this.expect(types.modulo);
  33679. var checksLoc = this.state.startLoc;
  33680. this.expectContextual("checks");
  33681. // Force '%' and 'checks' to be adjacent
  33682. if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) {
  33683. this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here.");
  33684. }
  33685. if (this.eat(types.parenL)) {
  33686. node.expression = this.parseExpression();
  33687. this.expect(types.parenR);
  33688. return this.finishNode(node, "DeclaredPredicate");
  33689. } else {
  33690. return this.finishNode(node, "InferredPredicate");
  33691. }
  33692. };
  33693. pp$8.flowParseTypeAndPredicateInitialiser = function () {
  33694. var oldInType = this.state.inType;
  33695. this.state.inType = true;
  33696. this.expect(types.colon);
  33697. var type = null;
  33698. var predicate = null;
  33699. if (this.match(types.modulo)) {
  33700. this.state.inType = oldInType;
  33701. predicate = this.flowParsePredicate();
  33702. } else {
  33703. type = this.flowParseType();
  33704. this.state.inType = oldInType;
  33705. if (this.match(types.modulo)) {
  33706. predicate = this.flowParsePredicate();
  33707. }
  33708. }
  33709. return [type, predicate];
  33710. };
  33711. pp$8.flowParseDeclareClass = function (node) {
  33712. this.next();
  33713. this.flowParseInterfaceish(node, true);
  33714. return this.finishNode(node, "DeclareClass");
  33715. };
  33716. pp$8.flowParseDeclareFunction = function (node) {
  33717. this.next();
  33718. var id = node.id = this.parseIdentifier();
  33719. var typeNode = this.startNode();
  33720. var typeContainer = this.startNode();
  33721. if (this.isRelational("<")) {
  33722. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  33723. } else {
  33724. typeNode.typeParameters = null;
  33725. }
  33726. this.expect(types.parenL);
  33727. var tmp = this.flowParseFunctionTypeParams();
  33728. typeNode.params = tmp.params;
  33729. typeNode.rest = tmp.rest;
  33730. this.expect(types.parenR);
  33731. var predicate = null;
  33732. var _flowParseTypeAndPred = this.flowParseTypeAndPredicateInitialiser();
  33733. typeNode.returnType = _flowParseTypeAndPred[0];
  33734. predicate = _flowParseTypeAndPred[1];
  33735. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  33736. typeContainer.predicate = predicate;
  33737. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  33738. this.finishNode(id, id.type);
  33739. this.semicolon();
  33740. return this.finishNode(node, "DeclareFunction");
  33741. };
  33742. pp$8.flowParseDeclare = function (node) {
  33743. if (this.match(types._class)) {
  33744. return this.flowParseDeclareClass(node);
  33745. } else if (this.match(types._function)) {
  33746. return this.flowParseDeclareFunction(node);
  33747. } else if (this.match(types._var)) {
  33748. return this.flowParseDeclareVariable(node);
  33749. } else if (this.isContextual("module")) {
  33750. if (this.lookahead().type === types.dot) {
  33751. return this.flowParseDeclareModuleExports(node);
  33752. } else {
  33753. return this.flowParseDeclareModule(node);
  33754. }
  33755. } else if (this.isContextual("type")) {
  33756. return this.flowParseDeclareTypeAlias(node);
  33757. } else if (this.isContextual("interface")) {
  33758. return this.flowParseDeclareInterface(node);
  33759. } else {
  33760. this.unexpected();
  33761. }
  33762. };
  33763. pp$8.flowParseDeclareVariable = function (node) {
  33764. this.next();
  33765. node.id = this.flowParseTypeAnnotatableIdentifier();
  33766. this.semicolon();
  33767. return this.finishNode(node, "DeclareVariable");
  33768. };
  33769. pp$8.flowParseDeclareModule = function (node) {
  33770. this.next();
  33771. if (this.match(types.string)) {
  33772. node.id = this.parseExprAtom();
  33773. } else {
  33774. node.id = this.parseIdentifier();
  33775. }
  33776. var bodyNode = node.body = this.startNode();
  33777. var body = bodyNode.body = [];
  33778. this.expect(types.braceL);
  33779. while (!this.match(types.braceR)) {
  33780. var _bodyNode = this.startNode();
  33781. if (this.match(types._import)) {
  33782. var lookahead = this.lookahead();
  33783. if (lookahead.value !== "type" && lookahead.value !== "typeof") {
  33784. this.unexpected(null, "Imports within a `declare module` body must always be `import type` or `import typeof`");
  33785. }
  33786. this.parseImport(_bodyNode);
  33787. } else {
  33788. this.expectContextual("declare", "Only declares and type imports are allowed inside declare module");
  33789. _bodyNode = this.flowParseDeclare(_bodyNode, true);
  33790. }
  33791. body.push(_bodyNode);
  33792. }
  33793. this.expect(types.braceR);
  33794. this.finishNode(bodyNode, "BlockStatement");
  33795. return this.finishNode(node, "DeclareModule");
  33796. };
  33797. pp$8.flowParseDeclareModuleExports = function (node) {
  33798. this.expectContextual("module");
  33799. this.expect(types.dot);
  33800. this.expectContextual("exports");
  33801. node.typeAnnotation = this.flowParseTypeAnnotation();
  33802. this.semicolon();
  33803. return this.finishNode(node, "DeclareModuleExports");
  33804. };
  33805. pp$8.flowParseDeclareTypeAlias = function (node) {
  33806. this.next();
  33807. this.flowParseTypeAlias(node);
  33808. return this.finishNode(node, "DeclareTypeAlias");
  33809. };
  33810. pp$8.flowParseDeclareInterface = function (node) {
  33811. this.next();
  33812. this.flowParseInterfaceish(node);
  33813. return this.finishNode(node, "DeclareInterface");
  33814. };
  33815. // Interfaces
  33816. pp$8.flowParseInterfaceish = function (node) {
  33817. node.id = this.parseIdentifier();
  33818. if (this.isRelational("<")) {
  33819. node.typeParameters = this.flowParseTypeParameterDeclaration();
  33820. } else {
  33821. node.typeParameters = null;
  33822. }
  33823. node.extends = [];
  33824. node.mixins = [];
  33825. if (this.eat(types._extends)) {
  33826. do {
  33827. node.extends.push(this.flowParseInterfaceExtends());
  33828. } while (this.eat(types.comma));
  33829. }
  33830. if (this.isContextual("mixins")) {
  33831. this.next();
  33832. do {
  33833. node.mixins.push(this.flowParseInterfaceExtends());
  33834. } while (this.eat(types.comma));
  33835. }
  33836. node.body = this.flowParseObjectType(true, false, false);
  33837. };
  33838. pp$8.flowParseInterfaceExtends = function () {
  33839. var node = this.startNode();
  33840. node.id = this.flowParseQualifiedTypeIdentifier();
  33841. if (this.isRelational("<")) {
  33842. node.typeParameters = this.flowParseTypeParameterInstantiation();
  33843. } else {
  33844. node.typeParameters = null;
  33845. }
  33846. return this.finishNode(node, "InterfaceExtends");
  33847. };
  33848. pp$8.flowParseInterface = function (node) {
  33849. this.flowParseInterfaceish(node, false);
  33850. return this.finishNode(node, "InterfaceDeclaration");
  33851. };
  33852. pp$8.flowParseRestrictedIdentifier = function (liberal) {
  33853. if (primitiveTypes.indexOf(this.state.value) > -1) {
  33854. this.raise(this.state.start, "Cannot overwrite primitive type " + this.state.value);
  33855. }
  33856. return this.parseIdentifier(liberal);
  33857. };
  33858. // Type aliases
  33859. pp$8.flowParseTypeAlias = function (node) {
  33860. node.id = this.flowParseRestrictedIdentifier();
  33861. if (this.isRelational("<")) {
  33862. node.typeParameters = this.flowParseTypeParameterDeclaration();
  33863. } else {
  33864. node.typeParameters = null;
  33865. }
  33866. node.right = this.flowParseTypeInitialiser(types.eq);
  33867. this.semicolon();
  33868. return this.finishNode(node, "TypeAlias");
  33869. };
  33870. // Type annotations
  33871. pp$8.flowParseTypeParameter = function () {
  33872. var node = this.startNode();
  33873. var variance = this.flowParseVariance();
  33874. var ident = this.flowParseTypeAnnotatableIdentifier();
  33875. node.name = ident.name;
  33876. node.variance = variance;
  33877. node.bound = ident.typeAnnotation;
  33878. if (this.match(types.eq)) {
  33879. this.eat(types.eq);
  33880. node.default = this.flowParseType();
  33881. }
  33882. return this.finishNode(node, "TypeParameter");
  33883. };
  33884. pp$8.flowParseTypeParameterDeclaration = function () {
  33885. var oldInType = this.state.inType;
  33886. var node = this.startNode();
  33887. node.params = [];
  33888. this.state.inType = true;
  33889. // istanbul ignore else: this condition is already checked at all call sites
  33890. if (this.isRelational("<") || this.match(types.jsxTagStart)) {
  33891. this.next();
  33892. } else {
  33893. this.unexpected();
  33894. }
  33895. do {
  33896. node.params.push(this.flowParseTypeParameter());
  33897. if (!this.isRelational(">")) {
  33898. this.expect(types.comma);
  33899. }
  33900. } while (!this.isRelational(">"));
  33901. this.expectRelational(">");
  33902. this.state.inType = oldInType;
  33903. return this.finishNode(node, "TypeParameterDeclaration");
  33904. };
  33905. pp$8.flowParseTypeParameterInstantiation = function () {
  33906. var node = this.startNode();
  33907. var oldInType = this.state.inType;
  33908. node.params = [];
  33909. this.state.inType = true;
  33910. this.expectRelational("<");
  33911. while (!this.isRelational(">")) {
  33912. node.params.push(this.flowParseType());
  33913. if (!this.isRelational(">")) {
  33914. this.expect(types.comma);
  33915. }
  33916. }
  33917. this.expectRelational(">");
  33918. this.state.inType = oldInType;
  33919. return this.finishNode(node, "TypeParameterInstantiation");
  33920. };
  33921. pp$8.flowParseObjectPropertyKey = function () {
  33922. return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  33923. };
  33924. pp$8.flowParseObjectTypeIndexer = function (node, isStatic, variance) {
  33925. node.static = isStatic;
  33926. this.expect(types.bracketL);
  33927. if (this.lookahead().type === types.colon) {
  33928. node.id = this.flowParseObjectPropertyKey();
  33929. node.key = this.flowParseTypeInitialiser();
  33930. } else {
  33931. node.id = null;
  33932. node.key = this.flowParseType();
  33933. }
  33934. this.expect(types.bracketR);
  33935. node.value = this.flowParseTypeInitialiser();
  33936. node.variance = variance;
  33937. this.flowObjectTypeSemicolon();
  33938. return this.finishNode(node, "ObjectTypeIndexer");
  33939. };
  33940. pp$8.flowParseObjectTypeMethodish = function (node) {
  33941. node.params = [];
  33942. node.rest = null;
  33943. node.typeParameters = null;
  33944. if (this.isRelational("<")) {
  33945. node.typeParameters = this.flowParseTypeParameterDeclaration();
  33946. }
  33947. this.expect(types.parenL);
  33948. while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
  33949. node.params.push(this.flowParseFunctionTypeParam());
  33950. if (!this.match(types.parenR)) {
  33951. this.expect(types.comma);
  33952. }
  33953. }
  33954. if (this.eat(types.ellipsis)) {
  33955. node.rest = this.flowParseFunctionTypeParam();
  33956. }
  33957. this.expect(types.parenR);
  33958. node.returnType = this.flowParseTypeInitialiser();
  33959. return this.finishNode(node, "FunctionTypeAnnotation");
  33960. };
  33961. pp$8.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
  33962. var node = this.startNodeAt(startPos, startLoc);
  33963. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(startPos, startLoc));
  33964. node.static = isStatic;
  33965. node.key = key;
  33966. node.optional = false;
  33967. this.flowObjectTypeSemicolon();
  33968. return this.finishNode(node, "ObjectTypeProperty");
  33969. };
  33970. pp$8.flowParseObjectTypeCallProperty = function (node, isStatic) {
  33971. var valueNode = this.startNode();
  33972. node.static = isStatic;
  33973. node.value = this.flowParseObjectTypeMethodish(valueNode);
  33974. this.flowObjectTypeSemicolon();
  33975. return this.finishNode(node, "ObjectTypeCallProperty");
  33976. };
  33977. pp$8.flowParseObjectType = function (allowStatic, allowExact, allowSpread) {
  33978. var oldInType = this.state.inType;
  33979. this.state.inType = true;
  33980. var nodeStart = this.startNode();
  33981. var node = void 0;
  33982. var propertyKey = void 0;
  33983. var isStatic = false;
  33984. nodeStart.callProperties = [];
  33985. nodeStart.properties = [];
  33986. nodeStart.indexers = [];
  33987. var endDelim = void 0;
  33988. var exact = void 0;
  33989. if (allowExact && this.match(types.braceBarL)) {
  33990. this.expect(types.braceBarL);
  33991. endDelim = types.braceBarR;
  33992. exact = true;
  33993. } else {
  33994. this.expect(types.braceL);
  33995. endDelim = types.braceR;
  33996. exact = false;
  33997. }
  33998. nodeStart.exact = exact;
  33999. while (!this.match(endDelim)) {
  34000. var optional = false;
  34001. var startPos = this.state.start;
  34002. var startLoc = this.state.startLoc;
  34003. node = this.startNode();
  34004. if (allowStatic && this.isContextual("static") && this.lookahead().type !== types.colon) {
  34005. this.next();
  34006. isStatic = true;
  34007. }
  34008. var variancePos = this.state.start;
  34009. var variance = this.flowParseVariance();
  34010. if (this.match(types.bracketL)) {
  34011. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
  34012. } else if (this.match(types.parenL) || this.isRelational("<")) {
  34013. if (variance) {
  34014. this.unexpected(variancePos);
  34015. }
  34016. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
  34017. } else {
  34018. if (this.match(types.ellipsis)) {
  34019. if (!allowSpread) {
  34020. this.unexpected(null, "Spread operator cannot appear in class or interface definitions");
  34021. }
  34022. if (variance) {
  34023. this.unexpected(variance.start, "Spread properties cannot have variance");
  34024. }
  34025. this.expect(types.ellipsis);
  34026. node.argument = this.flowParseType();
  34027. this.flowObjectTypeSemicolon();
  34028. nodeStart.properties.push(this.finishNode(node, "ObjectTypeSpreadProperty"));
  34029. } else {
  34030. propertyKey = this.flowParseObjectPropertyKey();
  34031. if (this.isRelational("<") || this.match(types.parenL)) {
  34032. // This is a method property
  34033. if (variance) {
  34034. this.unexpected(variance.start);
  34035. }
  34036. nodeStart.properties.push(this.flowParseObjectTypeMethod(startPos, startLoc, isStatic, propertyKey));
  34037. } else {
  34038. if (this.eat(types.question)) {
  34039. optional = true;
  34040. }
  34041. node.key = propertyKey;
  34042. node.value = this.flowParseTypeInitialiser();
  34043. node.optional = optional;
  34044. node.static = isStatic;
  34045. node.variance = variance;
  34046. this.flowObjectTypeSemicolon();
  34047. nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty"));
  34048. }
  34049. }
  34050. }
  34051. isStatic = false;
  34052. }
  34053. this.expect(endDelim);
  34054. var out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  34055. this.state.inType = oldInType;
  34056. return out;
  34057. };
  34058. pp$8.flowObjectTypeSemicolon = function () {
  34059. if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) {
  34060. this.unexpected();
  34061. }
  34062. };
  34063. pp$8.flowParseQualifiedTypeIdentifier = function (startPos, startLoc, id) {
  34064. startPos = startPos || this.state.start;
  34065. startLoc = startLoc || this.state.startLoc;
  34066. var node = id || this.parseIdentifier();
  34067. while (this.eat(types.dot)) {
  34068. var node2 = this.startNodeAt(startPos, startLoc);
  34069. node2.qualification = node;
  34070. node2.id = this.parseIdentifier();
  34071. node = this.finishNode(node2, "QualifiedTypeIdentifier");
  34072. }
  34073. return node;
  34074. };
  34075. pp$8.flowParseGenericType = function (startPos, startLoc, id) {
  34076. var node = this.startNodeAt(startPos, startLoc);
  34077. node.typeParameters = null;
  34078. node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
  34079. if (this.isRelational("<")) {
  34080. node.typeParameters = this.flowParseTypeParameterInstantiation();
  34081. }
  34082. return this.finishNode(node, "GenericTypeAnnotation");
  34083. };
  34084. pp$8.flowParseTypeofType = function () {
  34085. var node = this.startNode();
  34086. this.expect(types._typeof);
  34087. node.argument = this.flowParsePrimaryType();
  34088. return this.finishNode(node, "TypeofTypeAnnotation");
  34089. };
  34090. pp$8.flowParseTupleType = function () {
  34091. var node = this.startNode();
  34092. node.types = [];
  34093. this.expect(types.bracketL);
  34094. // We allow trailing commas
  34095. while (this.state.pos < this.input.length && !this.match(types.bracketR)) {
  34096. node.types.push(this.flowParseType());
  34097. if (this.match(types.bracketR)) break;
  34098. this.expect(types.comma);
  34099. }
  34100. this.expect(types.bracketR);
  34101. return this.finishNode(node, "TupleTypeAnnotation");
  34102. };
  34103. pp$8.flowParseFunctionTypeParam = function () {
  34104. var name = null;
  34105. var optional = false;
  34106. var typeAnnotation = null;
  34107. var node = this.startNode();
  34108. var lh = this.lookahead();
  34109. if (lh.type === types.colon || lh.type === types.question) {
  34110. name = this.parseIdentifier();
  34111. if (this.eat(types.question)) {
  34112. optional = true;
  34113. }
  34114. typeAnnotation = this.flowParseTypeInitialiser();
  34115. } else {
  34116. typeAnnotation = this.flowParseType();
  34117. }
  34118. node.name = name;
  34119. node.optional = optional;
  34120. node.typeAnnotation = typeAnnotation;
  34121. return this.finishNode(node, "FunctionTypeParam");
  34122. };
  34123. pp$8.reinterpretTypeAsFunctionTypeParam = function (type) {
  34124. var node = this.startNodeAt(type.start, type.loc.start);
  34125. node.name = null;
  34126. node.optional = false;
  34127. node.typeAnnotation = type;
  34128. return this.finishNode(node, "FunctionTypeParam");
  34129. };
  34130. pp$8.flowParseFunctionTypeParams = function () {
  34131. var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  34132. var ret = { params: params, rest: null };
  34133. while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
  34134. ret.params.push(this.flowParseFunctionTypeParam());
  34135. if (!this.match(types.parenR)) {
  34136. this.expect(types.comma);
  34137. }
  34138. }
  34139. if (this.eat(types.ellipsis)) {
  34140. ret.rest = this.flowParseFunctionTypeParam();
  34141. }
  34142. return ret;
  34143. };
  34144. pp$8.flowIdentToTypeAnnotation = function (startPos, startLoc, node, id) {
  34145. switch (id.name) {
  34146. case "any":
  34147. return this.finishNode(node, "AnyTypeAnnotation");
  34148. case "void":
  34149. return this.finishNode(node, "VoidTypeAnnotation");
  34150. case "bool":
  34151. case "boolean":
  34152. return this.finishNode(node, "BooleanTypeAnnotation");
  34153. case "mixed":
  34154. return this.finishNode(node, "MixedTypeAnnotation");
  34155. case "empty":
  34156. return this.finishNode(node, "EmptyTypeAnnotation");
  34157. case "number":
  34158. return this.finishNode(node, "NumberTypeAnnotation");
  34159. case "string":
  34160. return this.finishNode(node, "StringTypeAnnotation");
  34161. default:
  34162. return this.flowParseGenericType(startPos, startLoc, id);
  34163. }
  34164. };
  34165. // The parsing of types roughly parallels the parsing of expressions, and
  34166. // primary types are kind of like primary expressions...they're the
  34167. // primitives with which other types are constructed.
  34168. pp$8.flowParsePrimaryType = function () {
  34169. var startPos = this.state.start;
  34170. var startLoc = this.state.startLoc;
  34171. var node = this.startNode();
  34172. var tmp = void 0;
  34173. var type = void 0;
  34174. var isGroupedType = false;
  34175. var oldNoAnonFunctionType = this.state.noAnonFunctionType;
  34176. switch (this.state.type) {
  34177. case types.name:
  34178. return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
  34179. case types.braceL:
  34180. return this.flowParseObjectType(false, false, true);
  34181. case types.braceBarL:
  34182. return this.flowParseObjectType(false, true, true);
  34183. case types.bracketL:
  34184. return this.flowParseTupleType();
  34185. case types.relational:
  34186. if (this.state.value === "<") {
  34187. node.typeParameters = this.flowParseTypeParameterDeclaration();
  34188. this.expect(types.parenL);
  34189. tmp = this.flowParseFunctionTypeParams();
  34190. node.params = tmp.params;
  34191. node.rest = tmp.rest;
  34192. this.expect(types.parenR);
  34193. this.expect(types.arrow);
  34194. node.returnType = this.flowParseType();
  34195. return this.finishNode(node, "FunctionTypeAnnotation");
  34196. }
  34197. break;
  34198. case types.parenL:
  34199. this.next();
  34200. // Check to see if this is actually a grouped type
  34201. if (!this.match(types.parenR) && !this.match(types.ellipsis)) {
  34202. if (this.match(types.name)) {
  34203. var token = this.lookahead().type;
  34204. isGroupedType = token !== types.question && token !== types.colon;
  34205. } else {
  34206. isGroupedType = true;
  34207. }
  34208. }
  34209. if (isGroupedType) {
  34210. this.state.noAnonFunctionType = false;
  34211. type = this.flowParseType();
  34212. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  34213. // A `,` or a `) =>` means this is an anonymous function type
  34214. if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) {
  34215. this.expect(types.parenR);
  34216. return type;
  34217. } else {
  34218. // Eat a comma if there is one
  34219. this.eat(types.comma);
  34220. }
  34221. }
  34222. if (type) {
  34223. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  34224. } else {
  34225. tmp = this.flowParseFunctionTypeParams();
  34226. }
  34227. node.params = tmp.params;
  34228. node.rest = tmp.rest;
  34229. this.expect(types.parenR);
  34230. this.expect(types.arrow);
  34231. node.returnType = this.flowParseType();
  34232. node.typeParameters = null;
  34233. return this.finishNode(node, "FunctionTypeAnnotation");
  34234. case types.string:
  34235. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  34236. case types._true:case types._false:
  34237. node.value = this.match(types._true);
  34238. this.next();
  34239. return this.finishNode(node, "BooleanLiteralTypeAnnotation");
  34240. case types.plusMin:
  34241. if (this.state.value === "-") {
  34242. this.next();
  34243. if (!this.match(types.num)) this.unexpected(null, "Unexpected token, expected number");
  34244. return this.parseLiteral(-this.state.value, "NumericLiteralTypeAnnotation", node.start, node.loc.start);
  34245. }
  34246. this.unexpected();
  34247. case types.num:
  34248. return this.parseLiteral(this.state.value, "NumericLiteralTypeAnnotation");
  34249. case types._null:
  34250. node.value = this.match(types._null);
  34251. this.next();
  34252. return this.finishNode(node, "NullLiteralTypeAnnotation");
  34253. case types._this:
  34254. node.value = this.match(types._this);
  34255. this.next();
  34256. return this.finishNode(node, "ThisTypeAnnotation");
  34257. case types.star:
  34258. this.next();
  34259. return this.finishNode(node, "ExistentialTypeParam");
  34260. default:
  34261. if (this.state.type.keyword === "typeof") {
  34262. return this.flowParseTypeofType();
  34263. }
  34264. }
  34265. this.unexpected();
  34266. };
  34267. pp$8.flowParsePostfixType = function () {
  34268. var startPos = this.state.start,
  34269. startLoc = this.state.startLoc;
  34270. var type = this.flowParsePrimaryType();
  34271. while (!this.canInsertSemicolon() && this.match(types.bracketL)) {
  34272. var node = this.startNodeAt(startPos, startLoc);
  34273. node.elementType = type;
  34274. this.expect(types.bracketL);
  34275. this.expect(types.bracketR);
  34276. type = this.finishNode(node, "ArrayTypeAnnotation");
  34277. }
  34278. return type;
  34279. };
  34280. pp$8.flowParsePrefixType = function () {
  34281. var node = this.startNode();
  34282. if (this.eat(types.question)) {
  34283. node.typeAnnotation = this.flowParsePrefixType();
  34284. return this.finishNode(node, "NullableTypeAnnotation");
  34285. } else {
  34286. return this.flowParsePostfixType();
  34287. }
  34288. };
  34289. pp$8.flowParseAnonFunctionWithoutParens = function () {
  34290. var param = this.flowParsePrefixType();
  34291. if (!this.state.noAnonFunctionType && this.eat(types.arrow)) {
  34292. var node = this.startNodeAt(param.start, param.loc.start);
  34293. node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  34294. node.rest = null;
  34295. node.returnType = this.flowParseType();
  34296. node.typeParameters = null;
  34297. return this.finishNode(node, "FunctionTypeAnnotation");
  34298. }
  34299. return param;
  34300. };
  34301. pp$8.flowParseIntersectionType = function () {
  34302. var node = this.startNode();
  34303. this.eat(types.bitwiseAND);
  34304. var type = this.flowParseAnonFunctionWithoutParens();
  34305. node.types = [type];
  34306. while (this.eat(types.bitwiseAND)) {
  34307. node.types.push(this.flowParseAnonFunctionWithoutParens());
  34308. }
  34309. return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
  34310. };
  34311. pp$8.flowParseUnionType = function () {
  34312. var node = this.startNode();
  34313. this.eat(types.bitwiseOR);
  34314. var type = this.flowParseIntersectionType();
  34315. node.types = [type];
  34316. while (this.eat(types.bitwiseOR)) {
  34317. node.types.push(this.flowParseIntersectionType());
  34318. }
  34319. return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
  34320. };
  34321. pp$8.flowParseType = function () {
  34322. var oldInType = this.state.inType;
  34323. this.state.inType = true;
  34324. var type = this.flowParseUnionType();
  34325. this.state.inType = oldInType;
  34326. return type;
  34327. };
  34328. pp$8.flowParseTypeAnnotation = function () {
  34329. var node = this.startNode();
  34330. node.typeAnnotation = this.flowParseTypeInitialiser();
  34331. return this.finishNode(node, "TypeAnnotation");
  34332. };
  34333. pp$8.flowParseTypeAndPredicateAnnotation = function () {
  34334. var node = this.startNode();
  34335. var _flowParseTypeAndPred2 = this.flowParseTypeAndPredicateInitialiser();
  34336. node.typeAnnotation = _flowParseTypeAndPred2[0];
  34337. node.predicate = _flowParseTypeAndPred2[1];
  34338. return this.finishNode(node, "TypeAnnotation");
  34339. };
  34340. pp$8.flowParseTypeAnnotatableIdentifier = function () {
  34341. var ident = this.flowParseRestrictedIdentifier();
  34342. if (this.match(types.colon)) {
  34343. ident.typeAnnotation = this.flowParseTypeAnnotation();
  34344. this.finishNode(ident, ident.type);
  34345. }
  34346. return ident;
  34347. };
  34348. pp$8.typeCastToParameter = function (node) {
  34349. node.expression.typeAnnotation = node.typeAnnotation;
  34350. return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  34351. };
  34352. pp$8.flowParseVariance = function () {
  34353. var variance = null;
  34354. if (this.match(types.plusMin)) {
  34355. if (this.state.value === "+") {
  34356. variance = "plus";
  34357. } else if (this.state.value === "-") {
  34358. variance = "minus";
  34359. }
  34360. this.next();
  34361. }
  34362. return variance;
  34363. };
  34364. var flowPlugin = function (instance) {
  34365. // plain function return types: function name(): string {}
  34366. instance.extend("parseFunctionBody", function (inner) {
  34367. return function (node, allowExpression) {
  34368. if (this.match(types.colon) && !allowExpression) {
  34369. // if allowExpression is true then we're parsing an arrow function and if
  34370. // there's a return type then it's been handled elsewhere
  34371. node.returnType = this.flowParseTypeAndPredicateAnnotation();
  34372. }
  34373. return inner.call(this, node, allowExpression);
  34374. };
  34375. });
  34376. // interfaces
  34377. instance.extend("parseStatement", function (inner) {
  34378. return function (declaration, topLevel) {
  34379. // strict mode handling of `interface` since it's a reserved word
  34380. if (this.state.strict && this.match(types.name) && this.state.value === "interface") {
  34381. var node = this.startNode();
  34382. this.next();
  34383. return this.flowParseInterface(node);
  34384. } else {
  34385. return inner.call(this, declaration, topLevel);
  34386. }
  34387. };
  34388. });
  34389. // declares, interfaces and type aliases
  34390. instance.extend("parseExpressionStatement", function (inner) {
  34391. return function (node, expr) {
  34392. if (expr.type === "Identifier") {
  34393. if (expr.name === "declare") {
  34394. if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var)) {
  34395. return this.flowParseDeclare(node);
  34396. }
  34397. } else if (this.match(types.name)) {
  34398. if (expr.name === "interface") {
  34399. return this.flowParseInterface(node);
  34400. } else if (expr.name === "type") {
  34401. return this.flowParseTypeAlias(node);
  34402. }
  34403. }
  34404. }
  34405. return inner.call(this, node, expr);
  34406. };
  34407. });
  34408. // export type
  34409. instance.extend("shouldParseExportDeclaration", function (inner) {
  34410. return function () {
  34411. return this.isContextual("type") || this.isContextual("interface") || inner.call(this);
  34412. };
  34413. });
  34414. instance.extend("isExportDefaultSpecifier", function (inner) {
  34415. return function () {
  34416. if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface")) {
  34417. return false;
  34418. }
  34419. return inner.call(this);
  34420. };
  34421. });
  34422. instance.extend("parseConditional", function (inner) {
  34423. return function (expr, noIn, startPos, startLoc, refNeedsArrowPos) {
  34424. // only do the expensive clone if there is a question mark
  34425. // and if we come from inside parens
  34426. if (refNeedsArrowPos && this.match(types.question)) {
  34427. var state = this.state.clone();
  34428. try {
  34429. return inner.call(this, expr, noIn, startPos, startLoc);
  34430. } catch (err) {
  34431. if (err instanceof SyntaxError) {
  34432. this.state = state;
  34433. refNeedsArrowPos.start = err.pos || this.state.start;
  34434. return expr;
  34435. } else {
  34436. // istanbul ignore next: no such error is expected
  34437. throw err;
  34438. }
  34439. }
  34440. }
  34441. return inner.call(this, expr, noIn, startPos, startLoc);
  34442. };
  34443. });
  34444. instance.extend("parseParenItem", function (inner) {
  34445. return function (node, startPos, startLoc) {
  34446. node = inner.call(this, node, startPos, startLoc);
  34447. if (this.eat(types.question)) {
  34448. node.optional = true;
  34449. }
  34450. if (this.match(types.colon)) {
  34451. var typeCastNode = this.startNodeAt(startPos, startLoc);
  34452. typeCastNode.expression = node;
  34453. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  34454. return this.finishNode(typeCastNode, "TypeCastExpression");
  34455. }
  34456. return node;
  34457. };
  34458. });
  34459. instance.extend("parseExport", function (inner) {
  34460. return function (node) {
  34461. node = inner.call(this, node);
  34462. if (node.type === "ExportNamedDeclaration") {
  34463. node.exportKind = node.exportKind || "value";
  34464. }
  34465. return node;
  34466. };
  34467. });
  34468. instance.extend("parseExportDeclaration", function (inner) {
  34469. return function (node) {
  34470. if (this.isContextual("type")) {
  34471. node.exportKind = "type";
  34472. var declarationNode = this.startNode();
  34473. this.next();
  34474. if (this.match(types.braceL)) {
  34475. // export type { foo, bar };
  34476. node.specifiers = this.parseExportSpecifiers();
  34477. this.parseExportFrom(node);
  34478. return null;
  34479. } else {
  34480. // export type Foo = Bar;
  34481. return this.flowParseTypeAlias(declarationNode);
  34482. }
  34483. } else if (this.isContextual("interface")) {
  34484. node.exportKind = "type";
  34485. var _declarationNode = this.startNode();
  34486. this.next();
  34487. return this.flowParseInterface(_declarationNode);
  34488. } else {
  34489. return inner.call(this, node);
  34490. }
  34491. };
  34492. });
  34493. instance.extend("parseClassId", function (inner) {
  34494. return function (node) {
  34495. inner.apply(this, arguments);
  34496. if (this.isRelational("<")) {
  34497. node.typeParameters = this.flowParseTypeParameterDeclaration();
  34498. }
  34499. };
  34500. });
  34501. // don't consider `void` to be a keyword as then it'll use the void token type
  34502. // and set startExpr
  34503. instance.extend("isKeyword", function (inner) {
  34504. return function (name) {
  34505. if (this.state.inType && name === "void") {
  34506. return false;
  34507. } else {
  34508. return inner.call(this, name);
  34509. }
  34510. };
  34511. });
  34512. // ensure that inside flow types, we bypass the jsx parser plugin
  34513. instance.extend("readToken", function (inner) {
  34514. return function (code) {
  34515. if (this.state.inType && (code === 62 || code === 60)) {
  34516. return this.finishOp(types.relational, 1);
  34517. } else {
  34518. return inner.call(this, code);
  34519. }
  34520. };
  34521. });
  34522. // don't lex any token as a jsx one inside a flow type
  34523. instance.extend("jsx_readToken", function (inner) {
  34524. return function () {
  34525. if (!this.state.inType) return inner.call(this);
  34526. };
  34527. });
  34528. instance.extend("toAssignable", function (inner) {
  34529. return function (node, isBinding, contextDescription) {
  34530. if (node.type === "TypeCastExpression") {
  34531. return inner.call(this, this.typeCastToParameter(node), isBinding, contextDescription);
  34532. } else {
  34533. return inner.call(this, node, isBinding, contextDescription);
  34534. }
  34535. };
  34536. });
  34537. // turn type casts that we found in function parameter head into type annotated params
  34538. instance.extend("toAssignableList", function (inner) {
  34539. return function (exprList, isBinding, contextDescription) {
  34540. for (var i = 0; i < exprList.length; i++) {
  34541. var expr = exprList[i];
  34542. if (expr && expr.type === "TypeCastExpression") {
  34543. exprList[i] = this.typeCastToParameter(expr);
  34544. }
  34545. }
  34546. return inner.call(this, exprList, isBinding, contextDescription);
  34547. };
  34548. });
  34549. // this is a list of nodes, from something like a call expression, we need to filter the
  34550. // type casts that we've found that are illegal in this context
  34551. instance.extend("toReferencedList", function () {
  34552. return function (exprList) {
  34553. for (var i = 0; i < exprList.length; i++) {
  34554. var expr = exprList[i];
  34555. if (expr && expr._exprListItem && expr.type === "TypeCastExpression") {
  34556. this.raise(expr.start, "Unexpected type cast");
  34557. }
  34558. }
  34559. return exprList;
  34560. };
  34561. });
  34562. // parse an item inside a expression list eg. `(NODE, NODE)` where NODE represents
  34563. // the position where this function is called
  34564. instance.extend("parseExprListItem", function (inner) {
  34565. return function () {
  34566. var container = this.startNode();
  34567. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  34568. args[_key] = arguments[_key];
  34569. }
  34570. var node = inner.call.apply(inner, [this].concat(args));
  34571. if (this.match(types.colon)) {
  34572. container._exprListItem = true;
  34573. container.expression = node;
  34574. container.typeAnnotation = this.flowParseTypeAnnotation();
  34575. return this.finishNode(container, "TypeCastExpression");
  34576. } else {
  34577. return node;
  34578. }
  34579. };
  34580. });
  34581. instance.extend("checkLVal", function (inner) {
  34582. return function (node) {
  34583. if (node.type !== "TypeCastExpression") {
  34584. return inner.apply(this, arguments);
  34585. }
  34586. };
  34587. });
  34588. // parse class property type annotations
  34589. instance.extend("parseClassProperty", function (inner) {
  34590. return function (node) {
  34591. delete node.variancePos;
  34592. if (this.match(types.colon)) {
  34593. node.typeAnnotation = this.flowParseTypeAnnotation();
  34594. }
  34595. return inner.call(this, node);
  34596. };
  34597. });
  34598. // determine whether or not we're currently in the position where a class method would appear
  34599. instance.extend("isClassMethod", function (inner) {
  34600. return function () {
  34601. return this.isRelational("<") || inner.call(this);
  34602. };
  34603. });
  34604. // determine whether or not we're currently in the position where a class property would appear
  34605. instance.extend("isClassProperty", function (inner) {
  34606. return function () {
  34607. return this.match(types.colon) || inner.call(this);
  34608. };
  34609. });
  34610. instance.extend("isNonstaticConstructor", function (inner) {
  34611. return function (method) {
  34612. return !this.match(types.colon) && inner.call(this, method);
  34613. };
  34614. });
  34615. // parse type parameters for class methods
  34616. instance.extend("parseClassMethod", function (inner) {
  34617. return function (classBody, method) {
  34618. if (method.variance) {
  34619. this.unexpected(method.variancePos);
  34620. }
  34621. delete method.variance;
  34622. delete method.variancePos;
  34623. if (this.isRelational("<")) {
  34624. method.typeParameters = this.flowParseTypeParameterDeclaration();
  34625. }
  34626. for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
  34627. args[_key2 - 2] = arguments[_key2];
  34628. }
  34629. inner.call.apply(inner, [this, classBody, method].concat(args));
  34630. };
  34631. });
  34632. // parse a the super class type parameters and implements
  34633. instance.extend("parseClassSuper", function (inner) {
  34634. return function (node, isStatement) {
  34635. inner.call(this, node, isStatement);
  34636. if (node.superClass && this.isRelational("<")) {
  34637. node.superTypeParameters = this.flowParseTypeParameterInstantiation();
  34638. }
  34639. if (this.isContextual("implements")) {
  34640. this.next();
  34641. var implemented = node.implements = [];
  34642. do {
  34643. var _node = this.startNode();
  34644. _node.id = this.parseIdentifier();
  34645. if (this.isRelational("<")) {
  34646. _node.typeParameters = this.flowParseTypeParameterInstantiation();
  34647. } else {
  34648. _node.typeParameters = null;
  34649. }
  34650. implemented.push(this.finishNode(_node, "ClassImplements"));
  34651. } while (this.eat(types.comma));
  34652. }
  34653. };
  34654. });
  34655. instance.extend("parsePropertyName", function (inner) {
  34656. return function (node) {
  34657. var variancePos = this.state.start;
  34658. var variance = this.flowParseVariance();
  34659. var key = inner.call(this, node);
  34660. node.variance = variance;
  34661. node.variancePos = variancePos;
  34662. return key;
  34663. };
  34664. });
  34665. // parse type parameters for object method shorthand
  34666. instance.extend("parseObjPropValue", function (inner) {
  34667. return function (prop) {
  34668. if (prop.variance) {
  34669. this.unexpected(prop.variancePos);
  34670. }
  34671. delete prop.variance;
  34672. delete prop.variancePos;
  34673. var typeParameters = void 0;
  34674. // method shorthand
  34675. if (this.isRelational("<")) {
  34676. typeParameters = this.flowParseTypeParameterDeclaration();
  34677. if (!this.match(types.parenL)) this.unexpected();
  34678. }
  34679. inner.apply(this, arguments);
  34680. // add typeParameters if we found them
  34681. if (typeParameters) {
  34682. (prop.value || prop).typeParameters = typeParameters;
  34683. }
  34684. };
  34685. });
  34686. instance.extend("parseAssignableListItemTypes", function () {
  34687. return function (param) {
  34688. if (this.eat(types.question)) {
  34689. param.optional = true;
  34690. }
  34691. if (this.match(types.colon)) {
  34692. param.typeAnnotation = this.flowParseTypeAnnotation();
  34693. }
  34694. this.finishNode(param, param.type);
  34695. return param;
  34696. };
  34697. });
  34698. instance.extend("parseMaybeDefault", function (inner) {
  34699. return function () {
  34700. for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  34701. args[_key3] = arguments[_key3];
  34702. }
  34703. var node = inner.apply(this, args);
  34704. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  34705. this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`");
  34706. }
  34707. return node;
  34708. };
  34709. });
  34710. // parse typeof and type imports
  34711. instance.extend("parseImportSpecifiers", function (inner) {
  34712. return function (node) {
  34713. node.importKind = "value";
  34714. var kind = null;
  34715. if (this.match(types._typeof)) {
  34716. kind = "typeof";
  34717. } else if (this.isContextual("type")) {
  34718. kind = "type";
  34719. }
  34720. if (kind) {
  34721. var lh = this.lookahead();
  34722. if (lh.type === types.name && lh.value !== "from" || lh.type === types.braceL || lh.type === types.star) {
  34723. this.next();
  34724. node.importKind = kind;
  34725. }
  34726. }
  34727. inner.call(this, node);
  34728. };
  34729. });
  34730. // parse import-type/typeof shorthand
  34731. instance.extend("parseImportSpecifier", function () {
  34732. return function (node) {
  34733. var specifier = this.startNode();
  34734. var firstIdentLoc = this.state.start;
  34735. var firstIdent = this.parseIdentifier(true);
  34736. var specifierTypeKind = null;
  34737. if (firstIdent.name === "type") {
  34738. specifierTypeKind = "type";
  34739. } else if (firstIdent.name === "typeof") {
  34740. specifierTypeKind = "typeof";
  34741. }
  34742. var isBinding = false;
  34743. if (this.isContextual("as")) {
  34744. var as_ident = this.parseIdentifier(true);
  34745. if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) {
  34746. // `import {type as ,` or `import {type as }`
  34747. specifier.imported = as_ident;
  34748. specifier.importKind = specifierTypeKind;
  34749. specifier.local = as_ident.__clone();
  34750. } else {
  34751. // `import {type as foo`
  34752. specifier.imported = firstIdent;
  34753. specifier.importKind = null;
  34754. specifier.local = this.parseIdentifier();
  34755. }
  34756. } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) {
  34757. // `import {type foo`
  34758. specifier.imported = this.parseIdentifier(true);
  34759. specifier.importKind = specifierTypeKind;
  34760. if (this.eatContextual("as")) {
  34761. specifier.local = this.parseIdentifier();
  34762. } else {
  34763. isBinding = true;
  34764. specifier.local = specifier.imported.__clone();
  34765. }
  34766. } else {
  34767. isBinding = true;
  34768. specifier.imported = firstIdent;
  34769. specifier.importKind = null;
  34770. specifier.local = specifier.imported.__clone();
  34771. }
  34772. if ((node.importKind === "type" || node.importKind === "typeof") && (specifier.importKind === "type" || specifier.importKind === "typeof")) {
  34773. this.raise(firstIdentLoc, "`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`");
  34774. }
  34775. if (isBinding) this.checkReservedWord(specifier.local.name, specifier.start, true, true);
  34776. this.checkLVal(specifier.local, true, undefined, "import specifier");
  34777. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  34778. };
  34779. });
  34780. // parse function type parameters - function foo<T>() {}
  34781. instance.extend("parseFunctionParams", function (inner) {
  34782. return function (node) {
  34783. if (this.isRelational("<")) {
  34784. node.typeParameters = this.flowParseTypeParameterDeclaration();
  34785. }
  34786. inner.call(this, node);
  34787. };
  34788. });
  34789. // parse flow type annotations on variable declarator heads - let foo: string = bar
  34790. instance.extend("parseVarHead", function (inner) {
  34791. return function (decl) {
  34792. inner.call(this, decl);
  34793. if (this.match(types.colon)) {
  34794. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  34795. this.finishNode(decl.id, decl.id.type);
  34796. }
  34797. };
  34798. });
  34799. // parse the return type of an async arrow function - let foo = (async (): number => {});
  34800. instance.extend("parseAsyncArrowFromCallExpression", function (inner) {
  34801. return function (node, call) {
  34802. if (this.match(types.colon)) {
  34803. var oldNoAnonFunctionType = this.state.noAnonFunctionType;
  34804. this.state.noAnonFunctionType = true;
  34805. node.returnType = this.flowParseTypeAnnotation();
  34806. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  34807. }
  34808. return inner.call(this, node, call);
  34809. };
  34810. });
  34811. // todo description
  34812. instance.extend("shouldParseAsyncArrow", function (inner) {
  34813. return function () {
  34814. return this.match(types.colon) || inner.call(this);
  34815. };
  34816. });
  34817. // We need to support type parameter declarations for arrow functions. This
  34818. // is tricky. There are three situations we need to handle
  34819. //
  34820. // 1. This is either JSX or an arrow function. We'll try JSX first. If that
  34821. // fails, we'll try an arrow function. If that fails, we'll throw the JSX
  34822. // error.
  34823. // 2. This is an arrow function. We'll parse the type parameter declaration,
  34824. // parse the rest, make sure the rest is an arrow function, and go from
  34825. // there
  34826. // 3. This is neither. Just call the inner function
  34827. instance.extend("parseMaybeAssign", function (inner) {
  34828. return function () {
  34829. var jsxError = null;
  34830. for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  34831. args[_key4] = arguments[_key4];
  34832. }
  34833. if (types.jsxTagStart && this.match(types.jsxTagStart)) {
  34834. var state = this.state.clone();
  34835. try {
  34836. return inner.apply(this, args);
  34837. } catch (err) {
  34838. if (err instanceof SyntaxError) {
  34839. this.state = state;
  34840. // Remove `tc.j_expr` and `tc.j_oTag` from context added
  34841. // by parsing `jsxTagStart` to stop the JSX plugin from
  34842. // messing with the tokens
  34843. this.state.context.length -= 2;
  34844. jsxError = err;
  34845. } else {
  34846. // istanbul ignore next: no such error is expected
  34847. throw err;
  34848. }
  34849. }
  34850. }
  34851. if (jsxError != null || this.isRelational("<")) {
  34852. var arrowExpression = void 0;
  34853. var typeParameters = void 0;
  34854. try {
  34855. typeParameters = this.flowParseTypeParameterDeclaration();
  34856. arrowExpression = inner.apply(this, args);
  34857. arrowExpression.typeParameters = typeParameters;
  34858. arrowExpression.start = typeParameters.start;
  34859. arrowExpression.loc.start = typeParameters.loc.start;
  34860. } catch (err) {
  34861. throw jsxError || err;
  34862. }
  34863. if (arrowExpression.type === "ArrowFunctionExpression") {
  34864. return arrowExpression;
  34865. } else if (jsxError != null) {
  34866. throw jsxError;
  34867. } else {
  34868. this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration");
  34869. }
  34870. }
  34871. return inner.apply(this, args);
  34872. };
  34873. });
  34874. // handle return types for arrow functions
  34875. instance.extend("parseArrow", function (inner) {
  34876. return function (node) {
  34877. if (this.match(types.colon)) {
  34878. var state = this.state.clone();
  34879. try {
  34880. var oldNoAnonFunctionType = this.state.noAnonFunctionType;
  34881. this.state.noAnonFunctionType = true;
  34882. var returnType = this.flowParseTypeAndPredicateAnnotation();
  34883. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  34884. if (this.canInsertSemicolon()) this.unexpected();
  34885. if (!this.match(types.arrow)) this.unexpected();
  34886. // assign after it is clear it is an arrow
  34887. node.returnType = returnType;
  34888. } catch (err) {
  34889. if (err instanceof SyntaxError) {
  34890. this.state = state;
  34891. } else {
  34892. // istanbul ignore next: no such error is expected
  34893. throw err;
  34894. }
  34895. }
  34896. }
  34897. return inner.call(this, node);
  34898. };
  34899. });
  34900. instance.extend("shouldParseArrow", function (inner) {
  34901. return function () {
  34902. return this.match(types.colon) || inner.call(this);
  34903. };
  34904. });
  34905. };
  34906. // Adapted from String.fromcodepoint to export the function without modifying String
  34907. /*! https://mths.be/fromcodepoint v0.2.1 by @mathias */
  34908. // The MIT License (MIT)
  34909. // Copyright (c) Mathias Bynens
  34910. //
  34911. // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
  34912. // associated documentation files (the "Software"), to deal in the Software without restriction,
  34913. // including without limitation the rights to use, copy, modify, merge, publish, distribute,
  34914. // sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
  34915. // furnished to do so, subject to the following conditions:
  34916. //
  34917. // The above copyright notice and this permission notice shall be included in all copies or
  34918. // substantial portions of the Software.
  34919. //
  34920. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
  34921. // NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  34922. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  34923. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  34924. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  34925. var fromCodePoint = String.fromCodePoint;
  34926. if (!fromCodePoint) {
  34927. var stringFromCharCode = String.fromCharCode;
  34928. var floor = Math.floor;
  34929. fromCodePoint = function fromCodePoint() {
  34930. var MAX_SIZE = 0x4000;
  34931. var codeUnits = [];
  34932. var highSurrogate = void 0;
  34933. var lowSurrogate = void 0;
  34934. var index = -1;
  34935. var length = arguments.length;
  34936. if (!length) {
  34937. return "";
  34938. }
  34939. var result = "";
  34940. while (++index < length) {
  34941. var codePoint = Number(arguments[index]);
  34942. if (!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
  34943. codePoint < 0 || // not a valid Unicode code point
  34944. codePoint > 0x10FFFF || // not a valid Unicode code point
  34945. floor(codePoint) != codePoint // not an integer
  34946. ) {
  34947. throw RangeError("Invalid code point: " + codePoint);
  34948. }
  34949. if (codePoint <= 0xFFFF) {
  34950. // BMP code point
  34951. codeUnits.push(codePoint);
  34952. } else {
  34953. // Astral code point; split in surrogate halves
  34954. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  34955. codePoint -= 0x10000;
  34956. highSurrogate = (codePoint >> 10) + 0xD800;
  34957. lowSurrogate = codePoint % 0x400 + 0xDC00;
  34958. codeUnits.push(highSurrogate, lowSurrogate);
  34959. }
  34960. if (index + 1 == length || codeUnits.length > MAX_SIZE) {
  34961. result += stringFromCharCode.apply(null, codeUnits);
  34962. codeUnits.length = 0;
  34963. }
  34964. }
  34965. return result;
  34966. };
  34967. }
  34968. var fromCodePoint$1 = fromCodePoint;
  34969. var XHTMLEntities = {
  34970. quot: "\"",
  34971. amp: "&",
  34972. apos: "'",
  34973. lt: "<",
  34974. gt: ">",
  34975. nbsp: "\xA0",
  34976. iexcl: "\xA1",
  34977. cent: "\xA2",
  34978. pound: "\xA3",
  34979. curren: "\xA4",
  34980. yen: "\xA5",
  34981. brvbar: "\xA6",
  34982. sect: "\xA7",
  34983. uml: "\xA8",
  34984. copy: "\xA9",
  34985. ordf: "\xAA",
  34986. laquo: "\xAB",
  34987. not: "\xAC",
  34988. shy: "\xAD",
  34989. reg: "\xAE",
  34990. macr: "\xAF",
  34991. deg: "\xB0",
  34992. plusmn: "\xB1",
  34993. sup2: "\xB2",
  34994. sup3: "\xB3",
  34995. acute: "\xB4",
  34996. micro: "\xB5",
  34997. para: "\xB6",
  34998. middot: "\xB7",
  34999. cedil: "\xB8",
  35000. sup1: "\xB9",
  35001. ordm: "\xBA",
  35002. raquo: "\xBB",
  35003. frac14: "\xBC",
  35004. frac12: "\xBD",
  35005. frac34: "\xBE",
  35006. iquest: "\xBF",
  35007. Agrave: "\xC0",
  35008. Aacute: "\xC1",
  35009. Acirc: "\xC2",
  35010. Atilde: "\xC3",
  35011. Auml: "\xC4",
  35012. Aring: "\xC5",
  35013. AElig: "\xC6",
  35014. Ccedil: "\xC7",
  35015. Egrave: "\xC8",
  35016. Eacute: "\xC9",
  35017. Ecirc: "\xCA",
  35018. Euml: "\xCB",
  35019. Igrave: "\xCC",
  35020. Iacute: "\xCD",
  35021. Icirc: "\xCE",
  35022. Iuml: "\xCF",
  35023. ETH: "\xD0",
  35024. Ntilde: "\xD1",
  35025. Ograve: "\xD2",
  35026. Oacute: "\xD3",
  35027. Ocirc: "\xD4",
  35028. Otilde: "\xD5",
  35029. Ouml: "\xD6",
  35030. times: "\xD7",
  35031. Oslash: "\xD8",
  35032. Ugrave: "\xD9",
  35033. Uacute: "\xDA",
  35034. Ucirc: "\xDB",
  35035. Uuml: "\xDC",
  35036. Yacute: "\xDD",
  35037. THORN: "\xDE",
  35038. szlig: "\xDF",
  35039. agrave: "\xE0",
  35040. aacute: "\xE1",
  35041. acirc: "\xE2",
  35042. atilde: "\xE3",
  35043. auml: "\xE4",
  35044. aring: "\xE5",
  35045. aelig: "\xE6",
  35046. ccedil: "\xE7",
  35047. egrave: "\xE8",
  35048. eacute: "\xE9",
  35049. ecirc: "\xEA",
  35050. euml: "\xEB",
  35051. igrave: "\xEC",
  35052. iacute: "\xED",
  35053. icirc: "\xEE",
  35054. iuml: "\xEF",
  35055. eth: "\xF0",
  35056. ntilde: "\xF1",
  35057. ograve: "\xF2",
  35058. oacute: "\xF3",
  35059. ocirc: "\xF4",
  35060. otilde: "\xF5",
  35061. ouml: "\xF6",
  35062. divide: "\xF7",
  35063. oslash: "\xF8",
  35064. ugrave: "\xF9",
  35065. uacute: "\xFA",
  35066. ucirc: "\xFB",
  35067. uuml: "\xFC",
  35068. yacute: "\xFD",
  35069. thorn: "\xFE",
  35070. yuml: "\xFF",
  35071. OElig: "\u0152",
  35072. oelig: "\u0153",
  35073. Scaron: "\u0160",
  35074. scaron: "\u0161",
  35075. Yuml: "\u0178",
  35076. fnof: "\u0192",
  35077. circ: "\u02C6",
  35078. tilde: "\u02DC",
  35079. Alpha: "\u0391",
  35080. Beta: "\u0392",
  35081. Gamma: "\u0393",
  35082. Delta: "\u0394",
  35083. Epsilon: "\u0395",
  35084. Zeta: "\u0396",
  35085. Eta: "\u0397",
  35086. Theta: "\u0398",
  35087. Iota: "\u0399",
  35088. Kappa: "\u039A",
  35089. Lambda: "\u039B",
  35090. Mu: "\u039C",
  35091. Nu: "\u039D",
  35092. Xi: "\u039E",
  35093. Omicron: "\u039F",
  35094. Pi: "\u03A0",
  35095. Rho: "\u03A1",
  35096. Sigma: "\u03A3",
  35097. Tau: "\u03A4",
  35098. Upsilon: "\u03A5",
  35099. Phi: "\u03A6",
  35100. Chi: "\u03A7",
  35101. Psi: "\u03A8",
  35102. Omega: "\u03A9",
  35103. alpha: "\u03B1",
  35104. beta: "\u03B2",
  35105. gamma: "\u03B3",
  35106. delta: "\u03B4",
  35107. epsilon: "\u03B5",
  35108. zeta: "\u03B6",
  35109. eta: "\u03B7",
  35110. theta: "\u03B8",
  35111. iota: "\u03B9",
  35112. kappa: "\u03BA",
  35113. lambda: "\u03BB",
  35114. mu: "\u03BC",
  35115. nu: "\u03BD",
  35116. xi: "\u03BE",
  35117. omicron: "\u03BF",
  35118. pi: "\u03C0",
  35119. rho: "\u03C1",
  35120. sigmaf: "\u03C2",
  35121. sigma: "\u03C3",
  35122. tau: "\u03C4",
  35123. upsilon: "\u03C5",
  35124. phi: "\u03C6",
  35125. chi: "\u03C7",
  35126. psi: "\u03C8",
  35127. omega: "\u03C9",
  35128. thetasym: "\u03D1",
  35129. upsih: "\u03D2",
  35130. piv: "\u03D6",
  35131. ensp: "\u2002",
  35132. emsp: "\u2003",
  35133. thinsp: "\u2009",
  35134. zwnj: "\u200C",
  35135. zwj: "\u200D",
  35136. lrm: "\u200E",
  35137. rlm: "\u200F",
  35138. ndash: "\u2013",
  35139. mdash: "\u2014",
  35140. lsquo: "\u2018",
  35141. rsquo: "\u2019",
  35142. sbquo: "\u201A",
  35143. ldquo: "\u201C",
  35144. rdquo: "\u201D",
  35145. bdquo: "\u201E",
  35146. dagger: "\u2020",
  35147. Dagger: "\u2021",
  35148. bull: "\u2022",
  35149. hellip: "\u2026",
  35150. permil: "\u2030",
  35151. prime: "\u2032",
  35152. Prime: "\u2033",
  35153. lsaquo: "\u2039",
  35154. rsaquo: "\u203A",
  35155. oline: "\u203E",
  35156. frasl: "\u2044",
  35157. euro: "\u20AC",
  35158. image: "\u2111",
  35159. weierp: "\u2118",
  35160. real: "\u211C",
  35161. trade: "\u2122",
  35162. alefsym: "\u2135",
  35163. larr: "\u2190",
  35164. uarr: "\u2191",
  35165. rarr: "\u2192",
  35166. darr: "\u2193",
  35167. harr: "\u2194",
  35168. crarr: "\u21B5",
  35169. lArr: "\u21D0",
  35170. uArr: "\u21D1",
  35171. rArr: "\u21D2",
  35172. dArr: "\u21D3",
  35173. hArr: "\u21D4",
  35174. forall: "\u2200",
  35175. part: "\u2202",
  35176. exist: "\u2203",
  35177. empty: "\u2205",
  35178. nabla: "\u2207",
  35179. isin: "\u2208",
  35180. notin: "\u2209",
  35181. ni: "\u220B",
  35182. prod: "\u220F",
  35183. sum: "\u2211",
  35184. minus: "\u2212",
  35185. lowast: "\u2217",
  35186. radic: "\u221A",
  35187. prop: "\u221D",
  35188. infin: "\u221E",
  35189. ang: "\u2220",
  35190. and: "\u2227",
  35191. or: "\u2228",
  35192. cap: "\u2229",
  35193. cup: "\u222A",
  35194. "int": "\u222B",
  35195. there4: "\u2234",
  35196. sim: "\u223C",
  35197. cong: "\u2245",
  35198. asymp: "\u2248",
  35199. ne: "\u2260",
  35200. equiv: "\u2261",
  35201. le: "\u2264",
  35202. ge: "\u2265",
  35203. sub: "\u2282",
  35204. sup: "\u2283",
  35205. nsub: "\u2284",
  35206. sube: "\u2286",
  35207. supe: "\u2287",
  35208. oplus: "\u2295",
  35209. otimes: "\u2297",
  35210. perp: "\u22A5",
  35211. sdot: "\u22C5",
  35212. lceil: "\u2308",
  35213. rceil: "\u2309",
  35214. lfloor: "\u230A",
  35215. rfloor: "\u230B",
  35216. lang: "\u2329",
  35217. rang: "\u232A",
  35218. loz: "\u25CA",
  35219. spades: "\u2660",
  35220. clubs: "\u2663",
  35221. hearts: "\u2665",
  35222. diams: "\u2666"
  35223. };
  35224. var HEX_NUMBER = /^[\da-fA-F]+$/;
  35225. var DECIMAL_NUMBER = /^\d+$/;
  35226. types$1.j_oTag = new TokContext("<tag", false);
  35227. types$1.j_cTag = new TokContext("</tag", false);
  35228. types$1.j_expr = new TokContext("<tag>...</tag>", true, true);
  35229. types.jsxName = new TokenType("jsxName");
  35230. types.jsxText = new TokenType("jsxText", { beforeExpr: true });
  35231. types.jsxTagStart = new TokenType("jsxTagStart", { startsExpr: true });
  35232. types.jsxTagEnd = new TokenType("jsxTagEnd");
  35233. types.jsxTagStart.updateContext = function () {
  35234. this.state.context.push(types$1.j_expr); // treat as beginning of JSX expression
  35235. this.state.context.push(types$1.j_oTag); // start opening tag context
  35236. this.state.exprAllowed = false;
  35237. };
  35238. types.jsxTagEnd.updateContext = function (prevType) {
  35239. var out = this.state.context.pop();
  35240. if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) {
  35241. this.state.context.pop();
  35242. this.state.exprAllowed = this.curContext() === types$1.j_expr;
  35243. } else {
  35244. this.state.exprAllowed = true;
  35245. }
  35246. };
  35247. var pp$9 = Parser.prototype;
  35248. // Reads inline JSX contents token.
  35249. pp$9.jsxReadToken = function () {
  35250. var out = "";
  35251. var chunkStart = this.state.pos;
  35252. for (;;) {
  35253. if (this.state.pos >= this.input.length) {
  35254. this.raise(this.state.start, "Unterminated JSX contents");
  35255. }
  35256. var ch = this.input.charCodeAt(this.state.pos);
  35257. switch (ch) {
  35258. case 60: // "<"
  35259. case 123:
  35260. // "{"
  35261. if (this.state.pos === this.state.start) {
  35262. if (ch === 60 && this.state.exprAllowed) {
  35263. ++this.state.pos;
  35264. return this.finishToken(types.jsxTagStart);
  35265. }
  35266. return this.getTokenFromCode(ch);
  35267. }
  35268. out += this.input.slice(chunkStart, this.state.pos);
  35269. return this.finishToken(types.jsxText, out);
  35270. case 38:
  35271. // "&"
  35272. out += this.input.slice(chunkStart, this.state.pos);
  35273. out += this.jsxReadEntity();
  35274. chunkStart = this.state.pos;
  35275. break;
  35276. default:
  35277. if (isNewLine(ch)) {
  35278. out += this.input.slice(chunkStart, this.state.pos);
  35279. out += this.jsxReadNewLine(true);
  35280. chunkStart = this.state.pos;
  35281. } else {
  35282. ++this.state.pos;
  35283. }
  35284. }
  35285. }
  35286. };
  35287. pp$9.jsxReadNewLine = function (normalizeCRLF) {
  35288. var ch = this.input.charCodeAt(this.state.pos);
  35289. var out = void 0;
  35290. ++this.state.pos;
  35291. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  35292. ++this.state.pos;
  35293. out = normalizeCRLF ? "\n" : "\r\n";
  35294. } else {
  35295. out = String.fromCharCode(ch);
  35296. }
  35297. ++this.state.curLine;
  35298. this.state.lineStart = this.state.pos;
  35299. return out;
  35300. };
  35301. pp$9.jsxReadString = function (quote) {
  35302. var out = "";
  35303. var chunkStart = ++this.state.pos;
  35304. for (;;) {
  35305. if (this.state.pos >= this.input.length) {
  35306. this.raise(this.state.start, "Unterminated string constant");
  35307. }
  35308. var ch = this.input.charCodeAt(this.state.pos);
  35309. if (ch === quote) break;
  35310. if (ch === 38) {
  35311. // "&"
  35312. out += this.input.slice(chunkStart, this.state.pos);
  35313. out += this.jsxReadEntity();
  35314. chunkStart = this.state.pos;
  35315. } else if (isNewLine(ch)) {
  35316. out += this.input.slice(chunkStart, this.state.pos);
  35317. out += this.jsxReadNewLine(false);
  35318. chunkStart = this.state.pos;
  35319. } else {
  35320. ++this.state.pos;
  35321. }
  35322. }
  35323. out += this.input.slice(chunkStart, this.state.pos++);
  35324. return this.finishToken(types.string, out);
  35325. };
  35326. pp$9.jsxReadEntity = function () {
  35327. var str = "";
  35328. var count = 0;
  35329. var entity = void 0;
  35330. var ch = this.input[this.state.pos];
  35331. var startPos = ++this.state.pos;
  35332. while (this.state.pos < this.input.length && count++ < 10) {
  35333. ch = this.input[this.state.pos++];
  35334. if (ch === ";") {
  35335. if (str[0] === "#") {
  35336. if (str[1] === "x") {
  35337. str = str.substr(2);
  35338. if (HEX_NUMBER.test(str)) entity = fromCodePoint$1(parseInt(str, 16));
  35339. } else {
  35340. str = str.substr(1);
  35341. if (DECIMAL_NUMBER.test(str)) entity = fromCodePoint$1(parseInt(str, 10));
  35342. }
  35343. } else {
  35344. entity = XHTMLEntities[str];
  35345. }
  35346. break;
  35347. }
  35348. str += ch;
  35349. }
  35350. if (!entity) {
  35351. this.state.pos = startPos;
  35352. return "&";
  35353. }
  35354. return entity;
  35355. };
  35356. // Read a JSX identifier (valid tag or attribute name).
  35357. //
  35358. // Optimized version since JSX identifiers can"t contain
  35359. // escape characters and so can be read as single slice.
  35360. // Also assumes that first character was already checked
  35361. // by isIdentifierStart in readToken.
  35362. pp$9.jsxReadWord = function () {
  35363. var ch = void 0;
  35364. var start = this.state.pos;
  35365. do {
  35366. ch = this.input.charCodeAt(++this.state.pos);
  35367. } while (isIdentifierChar(ch) || ch === 45); // "-"
  35368. return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos));
  35369. };
  35370. // Transforms JSX element name to string.
  35371. function getQualifiedJSXName(object) {
  35372. if (object.type === "JSXIdentifier") {
  35373. return object.name;
  35374. }
  35375. if (object.type === "JSXNamespacedName") {
  35376. return object.namespace.name + ":" + object.name.name;
  35377. }
  35378. if (object.type === "JSXMemberExpression") {
  35379. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  35380. }
  35381. }
  35382. // Parse next token as JSX identifier
  35383. pp$9.jsxParseIdentifier = function () {
  35384. var node = this.startNode();
  35385. if (this.match(types.jsxName)) {
  35386. node.name = this.state.value;
  35387. } else if (this.state.type.keyword) {
  35388. node.name = this.state.type.keyword;
  35389. } else {
  35390. this.unexpected();
  35391. }
  35392. this.next();
  35393. return this.finishNode(node, "JSXIdentifier");
  35394. };
  35395. // Parse namespaced identifier.
  35396. pp$9.jsxParseNamespacedName = function () {
  35397. var startPos = this.state.start;
  35398. var startLoc = this.state.startLoc;
  35399. var name = this.jsxParseIdentifier();
  35400. if (!this.eat(types.colon)) return name;
  35401. var node = this.startNodeAt(startPos, startLoc);
  35402. node.namespace = name;
  35403. node.name = this.jsxParseIdentifier();
  35404. return this.finishNode(node, "JSXNamespacedName");
  35405. };
  35406. // Parses element name in any form - namespaced, member
  35407. // or single identifier.
  35408. pp$9.jsxParseElementName = function () {
  35409. var startPos = this.state.start;
  35410. var startLoc = this.state.startLoc;
  35411. var node = this.jsxParseNamespacedName();
  35412. while (this.eat(types.dot)) {
  35413. var newNode = this.startNodeAt(startPos, startLoc);
  35414. newNode.object = node;
  35415. newNode.property = this.jsxParseIdentifier();
  35416. node = this.finishNode(newNode, "JSXMemberExpression");
  35417. }
  35418. return node;
  35419. };
  35420. // Parses any type of JSX attribute value.
  35421. pp$9.jsxParseAttributeValue = function () {
  35422. var node = void 0;
  35423. switch (this.state.type) {
  35424. case types.braceL:
  35425. node = this.jsxParseExpressionContainer();
  35426. if (node.expression.type === "JSXEmptyExpression") {
  35427. this.raise(node.start, "JSX attributes must only be assigned a non-empty expression");
  35428. } else {
  35429. return node;
  35430. }
  35431. case types.jsxTagStart:
  35432. case types.string:
  35433. node = this.parseExprAtom();
  35434. node.extra = null;
  35435. return node;
  35436. default:
  35437. this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text");
  35438. }
  35439. };
  35440. // JSXEmptyExpression is unique type since it doesn't actually parse anything,
  35441. // and so it should start at the end of last read token (left brace) and finish
  35442. // at the beginning of the next one (right brace).
  35443. pp$9.jsxParseEmptyExpression = function () {
  35444. var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
  35445. return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
  35446. };
  35447. // Parse JSX spread child
  35448. pp$9.jsxParseSpreadChild = function () {
  35449. var node = this.startNode();
  35450. this.expect(types.braceL);
  35451. this.expect(types.ellipsis);
  35452. node.expression = this.parseExpression();
  35453. this.expect(types.braceR);
  35454. return this.finishNode(node, "JSXSpreadChild");
  35455. };
  35456. // Parses JSX expression enclosed into curly brackets.
  35457. pp$9.jsxParseExpressionContainer = function () {
  35458. var node = this.startNode();
  35459. this.next();
  35460. if (this.match(types.braceR)) {
  35461. node.expression = this.jsxParseEmptyExpression();
  35462. } else {
  35463. node.expression = this.parseExpression();
  35464. }
  35465. this.expect(types.braceR);
  35466. return this.finishNode(node, "JSXExpressionContainer");
  35467. };
  35468. // Parses following JSX attribute name-value pair.
  35469. pp$9.jsxParseAttribute = function () {
  35470. var node = this.startNode();
  35471. if (this.eat(types.braceL)) {
  35472. this.expect(types.ellipsis);
  35473. node.argument = this.parseMaybeAssign();
  35474. this.expect(types.braceR);
  35475. return this.finishNode(node, "JSXSpreadAttribute");
  35476. }
  35477. node.name = this.jsxParseNamespacedName();
  35478. node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null;
  35479. return this.finishNode(node, "JSXAttribute");
  35480. };
  35481. // Parses JSX opening tag starting after "<".
  35482. pp$9.jsxParseOpeningElementAt = function (startPos, startLoc) {
  35483. var node = this.startNodeAt(startPos, startLoc);
  35484. node.attributes = [];
  35485. node.name = this.jsxParseElementName();
  35486. while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) {
  35487. node.attributes.push(this.jsxParseAttribute());
  35488. }
  35489. node.selfClosing = this.eat(types.slash);
  35490. this.expect(types.jsxTagEnd);
  35491. return this.finishNode(node, "JSXOpeningElement");
  35492. };
  35493. // Parses JSX closing tag starting after "</".
  35494. pp$9.jsxParseClosingElementAt = function (startPos, startLoc) {
  35495. var node = this.startNodeAt(startPos, startLoc);
  35496. node.name = this.jsxParseElementName();
  35497. this.expect(types.jsxTagEnd);
  35498. return this.finishNode(node, "JSXClosingElement");
  35499. };
  35500. // Parses entire JSX element, including it"s opening tag
  35501. // (starting after "<"), attributes, contents and closing tag.
  35502. pp$9.jsxParseElementAt = function (startPos, startLoc) {
  35503. var node = this.startNodeAt(startPos, startLoc);
  35504. var children = [];
  35505. var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
  35506. var closingElement = null;
  35507. if (!openingElement.selfClosing) {
  35508. contents: for (;;) {
  35509. switch (this.state.type) {
  35510. case types.jsxTagStart:
  35511. startPos = this.state.start;startLoc = this.state.startLoc;
  35512. this.next();
  35513. if (this.eat(types.slash)) {
  35514. closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
  35515. break contents;
  35516. }
  35517. children.push(this.jsxParseElementAt(startPos, startLoc));
  35518. break;
  35519. case types.jsxText:
  35520. children.push(this.parseExprAtom());
  35521. break;
  35522. case types.braceL:
  35523. if (this.lookahead().type === types.ellipsis) {
  35524. children.push(this.jsxParseSpreadChild());
  35525. } else {
  35526. children.push(this.jsxParseExpressionContainer());
  35527. }
  35528. break;
  35529. // istanbul ignore next - should never happen
  35530. default:
  35531. this.unexpected();
  35532. }
  35533. }
  35534. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  35535. this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">");
  35536. }
  35537. }
  35538. node.openingElement = openingElement;
  35539. node.closingElement = closingElement;
  35540. node.children = children;
  35541. if (this.match(types.relational) && this.state.value === "<") {
  35542. this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
  35543. }
  35544. return this.finishNode(node, "JSXElement");
  35545. };
  35546. // Parses entire JSX element from current position.
  35547. pp$9.jsxParseElement = function () {
  35548. var startPos = this.state.start;
  35549. var startLoc = this.state.startLoc;
  35550. this.next();
  35551. return this.jsxParseElementAt(startPos, startLoc);
  35552. };
  35553. var jsxPlugin = function (instance) {
  35554. instance.extend("parseExprAtom", function (inner) {
  35555. return function (refShortHandDefaultPos) {
  35556. if (this.match(types.jsxText)) {
  35557. var node = this.parseLiteral(this.state.value, "JSXText");
  35558. // https://github.com/babel/babel/issues/2078
  35559. node.extra = null;
  35560. return node;
  35561. } else if (this.match(types.jsxTagStart)) {
  35562. return this.jsxParseElement();
  35563. } else {
  35564. return inner.call(this, refShortHandDefaultPos);
  35565. }
  35566. };
  35567. });
  35568. instance.extend("readToken", function (inner) {
  35569. return function (code) {
  35570. if (this.state.inPropertyName) return inner.call(this, code);
  35571. var context = this.curContext();
  35572. if (context === types$1.j_expr) {
  35573. return this.jsxReadToken();
  35574. }
  35575. if (context === types$1.j_oTag || context === types$1.j_cTag) {
  35576. if (isIdentifierStart(code)) {
  35577. return this.jsxReadWord();
  35578. }
  35579. if (code === 62) {
  35580. ++this.state.pos;
  35581. return this.finishToken(types.jsxTagEnd);
  35582. }
  35583. if ((code === 34 || code === 39) && context === types$1.j_oTag) {
  35584. return this.jsxReadString(code);
  35585. }
  35586. }
  35587. if (code === 60 && this.state.exprAllowed) {
  35588. ++this.state.pos;
  35589. return this.finishToken(types.jsxTagStart);
  35590. }
  35591. return inner.call(this, code);
  35592. };
  35593. });
  35594. instance.extend("updateContext", function (inner) {
  35595. return function (prevType) {
  35596. if (this.match(types.braceL)) {
  35597. var curContext = this.curContext();
  35598. if (curContext === types$1.j_oTag) {
  35599. this.state.context.push(types$1.braceExpression);
  35600. } else if (curContext === types$1.j_expr) {
  35601. this.state.context.push(types$1.templateQuasi);
  35602. } else {
  35603. inner.call(this, prevType);
  35604. }
  35605. this.state.exprAllowed = true;
  35606. } else if (this.match(types.slash) && prevType === types.jsxTagStart) {
  35607. this.state.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore
  35608. this.state.context.push(types$1.j_cTag); // reconsider as closing tag context
  35609. this.state.exprAllowed = false;
  35610. } else {
  35611. return inner.call(this, prevType);
  35612. }
  35613. };
  35614. });
  35615. };
  35616. plugins.estree = estreePlugin;
  35617. plugins.flow = flowPlugin;
  35618. plugins.jsx = jsxPlugin;
  35619. function parse(input, options) {
  35620. return new Parser(options, input).parse();
  35621. }
  35622. function parseExpression(input, options) {
  35623. var parser = new Parser(options, input);
  35624. if (parser.options.strictMode) {
  35625. parser.state.strict = true;
  35626. }
  35627. return parser.getExpression();
  35628. }
  35629. exports.parse = parse;
  35630. exports.parseExpression = parseExpression;
  35631. exports.tokTypes = types;
  35632. });
  35633. $__System.registerDynamic("10", ["d3", "136", "d1", "114", "d0", "d7", "11"], true, function ($__require, exports, module) {
  35634. "use strict";
  35635. var global = this || self,
  35636. GLOBAL = global;
  35637. exports.__esModule = true;
  35638. var _symbol = $__require("d3");
  35639. var _symbol2 = _interopRequireDefault(_symbol);
  35640. exports.default = function (code, opts) {
  35641. var stack = void 0;
  35642. try {
  35643. throw new Error();
  35644. } catch (error) {
  35645. if (error.stack) {
  35646. stack = error.stack.split("\n").slice(1).join("\n");
  35647. }
  35648. }
  35649. opts = (0, _assign2.default)({
  35650. allowReturnOutsideFunction: true,
  35651. allowSuperOutsideMethod: true,
  35652. preserveComments: false
  35653. }, opts);
  35654. var _getAst = function getAst() {
  35655. var ast = void 0;
  35656. try {
  35657. ast = babylon.parse(code, opts);
  35658. ast = _babelTraverse2.default.removeProperties(ast, { preserveComments: opts.preserveComments });
  35659. _babelTraverse2.default.cheap(ast, function (node) {
  35660. node[FROM_TEMPLATE] = true;
  35661. });
  35662. } catch (err) {
  35663. err.stack = err.stack + "from\n" + stack;
  35664. throw err;
  35665. }
  35666. _getAst = function getAst() {
  35667. return ast;
  35668. };
  35669. return ast;
  35670. };
  35671. return function () {
  35672. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  35673. args[_key] = arguments[_key];
  35674. }
  35675. return useTemplate(_getAst(), args);
  35676. };
  35677. };
  35678. var _cloneDeep = $__require("136");
  35679. var _cloneDeep2 = _interopRequireDefault(_cloneDeep);
  35680. var _assign = $__require("d1");
  35681. var _assign2 = _interopRequireDefault(_assign);
  35682. var _has = $__require("114");
  35683. var _has2 = _interopRequireDefault(_has);
  35684. var _babelTraverse = $__require("d0");
  35685. var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
  35686. var _babylon = $__require("d7");
  35687. var babylon = _interopRequireWildcard(_babylon);
  35688. var _babelTypes = $__require("11");
  35689. var t = _interopRequireWildcard(_babelTypes);
  35690. function _interopRequireWildcard(obj) {
  35691. if (obj && obj.__esModule) {
  35692. return obj;
  35693. } else {
  35694. var newObj = {};if (obj != null) {
  35695. for (var key in obj) {
  35696. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  35697. }
  35698. }newObj.default = obj;return newObj;
  35699. }
  35700. }
  35701. function _interopRequireDefault(obj) {
  35702. return obj && obj.__esModule ? obj : { default: obj };
  35703. }
  35704. var FROM_TEMPLATE = "_fromTemplate";
  35705. var TEMPLATE_SKIP = (0, _symbol2.default)();
  35706. function useTemplate(ast, nodes) {
  35707. ast = (0, _cloneDeep2.default)(ast);
  35708. var _ast = ast,
  35709. program = _ast.program;
  35710. if (nodes.length) {
  35711. (0, _babelTraverse2.default)(ast, templateVisitor, null, nodes);
  35712. }
  35713. if (program.body.length > 1) {
  35714. return program.body;
  35715. } else {
  35716. return program.body[0];
  35717. }
  35718. }
  35719. var templateVisitor = {
  35720. noScope: true,
  35721. enter: function enter(path, args) {
  35722. var node = path.node;
  35723. if (node[TEMPLATE_SKIP]) return path.skip();
  35724. if (t.isExpressionStatement(node)) {
  35725. node = node.expression;
  35726. }
  35727. var replacement = void 0;
  35728. if (t.isIdentifier(node) && node[FROM_TEMPLATE]) {
  35729. if ((0, _has2.default)(args[0], node.name)) {
  35730. replacement = args[0][node.name];
  35731. } else if (node.name[0] === "$") {
  35732. var i = +node.name.slice(1);
  35733. if (args[i]) replacement = args[i];
  35734. }
  35735. }
  35736. if (replacement === null) {
  35737. path.remove();
  35738. }
  35739. if (replacement) {
  35740. replacement[TEMPLATE_SKIP] = true;
  35741. path.replaceInline(replacement);
  35742. }
  35743. },
  35744. exit: function exit(_ref) {
  35745. var node = _ref.node;
  35746. if (!node.loc) _babelTraverse2.default.clearNode(node);
  35747. }
  35748. };
  35749. module.exports = exports["default"];
  35750. });
  35751. $__System.registerDynamic("1a0", ["d3", "d4", "1d", "d0", "133", "11", "189", "135", "10"], true, function ($__require, exports, module) {
  35752. "use strict";
  35753. var global = this || self,
  35754. GLOBAL = global;
  35755. exports.__esModule = true;
  35756. var _symbol = $__require("d3");
  35757. var _symbol2 = _interopRequireDefault(_symbol);
  35758. var _create = $__require("d4");
  35759. var _create2 = _interopRequireDefault(_create);
  35760. var _classCallCheck2 = $__require("1d");
  35761. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  35762. exports.default = function () {
  35763. return {
  35764. visitor: {
  35765. VariableDeclaration: function VariableDeclaration(path, file) {
  35766. var node = path.node,
  35767. parent = path.parent,
  35768. scope = path.scope;
  35769. if (!isBlockScoped(node)) return;
  35770. convertBlockScopedToVar(path, null, parent, scope, true);
  35771. if (node._tdzThis) {
  35772. var nodes = [node];
  35773. for (var i = 0; i < node.declarations.length; i++) {
  35774. var decl = node.declarations[i];
  35775. if (decl.init) {
  35776. var assign = t.assignmentExpression("=", decl.id, decl.init);
  35777. assign._ignoreBlockScopingTDZ = true;
  35778. nodes.push(t.expressionStatement(assign));
  35779. }
  35780. decl.init = file.addHelper("temporalUndefined");
  35781. }
  35782. node._blockHoist = 2;
  35783. if (path.isCompletionRecord()) {
  35784. nodes.push(t.expressionStatement(scope.buildUndefinedNode()));
  35785. }
  35786. path.replaceWithMultiple(nodes);
  35787. }
  35788. },
  35789. Loop: function Loop(path, file) {
  35790. var node = path.node,
  35791. parent = path.parent,
  35792. scope = path.scope;
  35793. t.ensureBlock(node);
  35794. var blockScoping = new BlockScoping(path, path.get("body"), parent, scope, file);
  35795. var replace = blockScoping.run();
  35796. if (replace) path.replaceWith(replace);
  35797. },
  35798. CatchClause: function CatchClause(path, file) {
  35799. var parent = path.parent,
  35800. scope = path.scope;
  35801. var blockScoping = new BlockScoping(null, path.get("body"), parent, scope, file);
  35802. blockScoping.run();
  35803. },
  35804. "BlockStatement|SwitchStatement|Program": function BlockStatementSwitchStatementProgram(path, file) {
  35805. if (!ignoreBlock(path)) {
  35806. var blockScoping = new BlockScoping(null, path, path.parent, path.scope, file);
  35807. blockScoping.run();
  35808. }
  35809. }
  35810. }
  35811. };
  35812. };
  35813. var _babelTraverse = $__require("d0");
  35814. var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
  35815. var _tdz = $__require("133");
  35816. var _babelTypes = $__require("11");
  35817. var t = _interopRequireWildcard(_babelTypes);
  35818. var _values = $__require("189");
  35819. var _values2 = _interopRequireDefault(_values);
  35820. var _extend = $__require("135");
  35821. var _extend2 = _interopRequireDefault(_extend);
  35822. var _babelTemplate = $__require("10");
  35823. var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
  35824. function _interopRequireWildcard(obj) {
  35825. if (obj && obj.__esModule) {
  35826. return obj;
  35827. } else {
  35828. var newObj = {};if (obj != null) {
  35829. for (var key in obj) {
  35830. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  35831. }
  35832. }newObj.default = obj;return newObj;
  35833. }
  35834. }
  35835. function _interopRequireDefault(obj) {
  35836. return obj && obj.__esModule ? obj : { default: obj };
  35837. }
  35838. function ignoreBlock(path) {
  35839. return t.isLoop(path.parent) || t.isCatchClause(path.parent);
  35840. }
  35841. var buildRetCheck = (0, _babelTemplate2.default)("\n if (typeof RETURN === \"object\") return RETURN.v;\n");
  35842. function isBlockScoped(node) {
  35843. if (!t.isVariableDeclaration(node)) return false;
  35844. if (node[t.BLOCK_SCOPED_SYMBOL]) return true;
  35845. if (node.kind !== "let" && node.kind !== "const") return false;
  35846. return true;
  35847. }
  35848. function convertBlockScopedToVar(path, node, parent, scope) {
  35849. var moveBindingsToParent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  35850. if (!node) {
  35851. node = path.node;
  35852. }
  35853. if (!t.isFor(parent)) {
  35854. for (var i = 0; i < node.declarations.length; i++) {
  35855. var declar = node.declarations[i];
  35856. declar.init = declar.init || scope.buildUndefinedNode();
  35857. }
  35858. }
  35859. node[t.BLOCK_SCOPED_SYMBOL] = true;
  35860. node.kind = "var";
  35861. if (moveBindingsToParent) {
  35862. var parentScope = scope.getFunctionParent();
  35863. var ids = path.getBindingIdentifiers();
  35864. for (var name in ids) {
  35865. var binding = scope.getOwnBinding(name);
  35866. if (binding) binding.kind = "var";
  35867. scope.moveBindingTo(name, parentScope);
  35868. }
  35869. }
  35870. }
  35871. function isVar(node) {
  35872. return t.isVariableDeclaration(node, { kind: "var" }) && !isBlockScoped(node);
  35873. }
  35874. var letReferenceBlockVisitor = _babelTraverse2.default.visitors.merge([{
  35875. Loop: {
  35876. enter: function enter(path, state) {
  35877. state.loopDepth++;
  35878. },
  35879. exit: function exit(path, state) {
  35880. state.loopDepth--;
  35881. }
  35882. },
  35883. Function: function Function(path, state) {
  35884. if (state.loopDepth > 0) {
  35885. path.traverse(letReferenceFunctionVisitor, state);
  35886. }
  35887. return path.skip();
  35888. }
  35889. }, _tdz.visitor]);
  35890. var letReferenceFunctionVisitor = _babelTraverse2.default.visitors.merge([{
  35891. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  35892. var ref = state.letReferences[path.node.name];
  35893. if (!ref) return;
  35894. var localBinding = path.scope.getBindingIdentifier(path.node.name);
  35895. if (localBinding && localBinding !== ref) return;
  35896. state.closurify = true;
  35897. }
  35898. }, _tdz.visitor]);
  35899. var hoistVarDeclarationsVisitor = {
  35900. enter: function enter(path, self) {
  35901. var node = path.node,
  35902. parent = path.parent;
  35903. if (path.isForStatement()) {
  35904. if (isVar(node.init, node)) {
  35905. var nodes = self.pushDeclar(node.init);
  35906. if (nodes.length === 1) {
  35907. node.init = nodes[0];
  35908. } else {
  35909. node.init = t.sequenceExpression(nodes);
  35910. }
  35911. }
  35912. } else if (path.isFor()) {
  35913. if (isVar(node.left, node)) {
  35914. self.pushDeclar(node.left);
  35915. node.left = node.left.declarations[0].id;
  35916. }
  35917. } else if (isVar(node, parent)) {
  35918. path.replaceWithMultiple(self.pushDeclar(node).map(function (expr) {
  35919. return t.expressionStatement(expr);
  35920. }));
  35921. } else if (path.isFunction()) {
  35922. return path.skip();
  35923. }
  35924. }
  35925. };
  35926. var loopLabelVisitor = {
  35927. LabeledStatement: function LabeledStatement(_ref, state) {
  35928. var node = _ref.node;
  35929. state.innerLabels.push(node.label.name);
  35930. }
  35931. };
  35932. var continuationVisitor = {
  35933. enter: function enter(path, state) {
  35934. if (path.isAssignmentExpression() || path.isUpdateExpression()) {
  35935. var bindings = path.getBindingIdentifiers();
  35936. for (var name in bindings) {
  35937. if (state.outsideReferences[name] !== path.scope.getBindingIdentifier(name)) continue;
  35938. state.reassignments[name] = true;
  35939. }
  35940. }
  35941. }
  35942. };
  35943. function loopNodeTo(node) {
  35944. if (t.isBreakStatement(node)) {
  35945. return "break";
  35946. } else if (t.isContinueStatement(node)) {
  35947. return "continue";
  35948. }
  35949. }
  35950. var loopVisitor = {
  35951. Loop: function Loop(path, state) {
  35952. var oldIgnoreLabeless = state.ignoreLabeless;
  35953. state.ignoreLabeless = true;
  35954. path.traverse(loopVisitor, state);
  35955. state.ignoreLabeless = oldIgnoreLabeless;
  35956. path.skip();
  35957. },
  35958. Function: function Function(path) {
  35959. path.skip();
  35960. },
  35961. SwitchCase: function SwitchCase(path, state) {
  35962. var oldInSwitchCase = state.inSwitchCase;
  35963. state.inSwitchCase = true;
  35964. path.traverse(loopVisitor, state);
  35965. state.inSwitchCase = oldInSwitchCase;
  35966. path.skip();
  35967. },
  35968. "BreakStatement|ContinueStatement|ReturnStatement": function BreakStatementContinueStatementReturnStatement(path, state) {
  35969. var node = path.node,
  35970. parent = path.parent,
  35971. scope = path.scope;
  35972. if (node[this.LOOP_IGNORE]) return;
  35973. var replace = void 0;
  35974. var loopText = loopNodeTo(node);
  35975. if (loopText) {
  35976. if (node.label) {
  35977. if (state.innerLabels.indexOf(node.label.name) >= 0) {
  35978. return;
  35979. }
  35980. loopText = loopText + "|" + node.label.name;
  35981. } else {
  35982. if (state.ignoreLabeless) return;
  35983. if (state.inSwitchCase) return;
  35984. if (t.isBreakStatement(node) && t.isSwitchCase(parent)) return;
  35985. }
  35986. state.hasBreakContinue = true;
  35987. state.map[loopText] = node;
  35988. replace = t.stringLiteral(loopText);
  35989. }
  35990. if (path.isReturnStatement()) {
  35991. state.hasReturn = true;
  35992. replace = t.objectExpression([t.objectProperty(t.identifier("v"), node.argument || scope.buildUndefinedNode())]);
  35993. }
  35994. if (replace) {
  35995. replace = t.returnStatement(replace);
  35996. replace[this.LOOP_IGNORE] = true;
  35997. path.skip();
  35998. path.replaceWith(t.inherits(replace, node));
  35999. }
  36000. }
  36001. };
  36002. var BlockScoping = function () {
  36003. function BlockScoping(loopPath, blockPath, parent, scope, file) {
  36004. (0, _classCallCheck3.default)(this, BlockScoping);
  36005. this.parent = parent;
  36006. this.scope = scope;
  36007. this.file = file;
  36008. this.blockPath = blockPath;
  36009. this.block = blockPath.node;
  36010. this.outsideLetReferences = (0, _create2.default)(null);
  36011. this.hasLetReferences = false;
  36012. this.letReferences = (0, _create2.default)(null);
  36013. this.body = [];
  36014. if (loopPath) {
  36015. this.loopParent = loopPath.parent;
  36016. this.loopLabel = t.isLabeledStatement(this.loopParent) && this.loopParent.label;
  36017. this.loopPath = loopPath;
  36018. this.loop = loopPath.node;
  36019. }
  36020. }
  36021. BlockScoping.prototype.run = function run() {
  36022. var block = this.block;
  36023. if (block._letDone) return;
  36024. block._letDone = true;
  36025. var needsClosure = this.getLetReferences();
  36026. if (t.isFunction(this.parent) || t.isProgram(this.block)) {
  36027. this.updateScopeInfo();
  36028. return;
  36029. }
  36030. if (!this.hasLetReferences) return;
  36031. if (needsClosure) {
  36032. this.wrapClosure();
  36033. } else {
  36034. this.remap();
  36035. }
  36036. this.updateScopeInfo(needsClosure);
  36037. if (this.loopLabel && !t.isLabeledStatement(this.loopParent)) {
  36038. return t.labeledStatement(this.loopLabel, this.loop);
  36039. }
  36040. };
  36041. BlockScoping.prototype.updateScopeInfo = function updateScopeInfo(wrappedInClosure) {
  36042. var scope = this.scope;
  36043. var parentScope = scope.getFunctionParent();
  36044. var letRefs = this.letReferences;
  36045. for (var key in letRefs) {
  36046. var ref = letRefs[key];
  36047. var binding = scope.getBinding(ref.name);
  36048. if (!binding) continue;
  36049. if (binding.kind === "let" || binding.kind === "const") {
  36050. binding.kind = "var";
  36051. if (wrappedInClosure) {
  36052. scope.removeBinding(ref.name);
  36053. } else {
  36054. scope.moveBindingTo(ref.name, parentScope);
  36055. }
  36056. }
  36057. }
  36058. };
  36059. BlockScoping.prototype.remap = function remap() {
  36060. var letRefs = this.letReferences;
  36061. var scope = this.scope;
  36062. for (var key in letRefs) {
  36063. var ref = letRefs[key];
  36064. if (scope.parentHasBinding(key) || scope.hasGlobal(key)) {
  36065. if (scope.hasOwnBinding(key)) scope.rename(ref.name);
  36066. if (this.blockPath.scope.hasOwnBinding(key)) this.blockPath.scope.rename(ref.name);
  36067. }
  36068. }
  36069. };
  36070. BlockScoping.prototype.wrapClosure = function wrapClosure() {
  36071. if (this.file.opts.throwIfClosureRequired) {
  36072. throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure " + "(throwIfClosureRequired).");
  36073. }
  36074. var block = this.block;
  36075. var outsideRefs = this.outsideLetReferences;
  36076. if (this.loop) {
  36077. for (var name in outsideRefs) {
  36078. var id = outsideRefs[name];
  36079. if (this.scope.hasGlobal(id.name) || this.scope.parentHasBinding(id.name)) {
  36080. delete outsideRefs[id.name];
  36081. delete this.letReferences[id.name];
  36082. this.scope.rename(id.name);
  36083. this.letReferences[id.name] = id;
  36084. outsideRefs[id.name] = id;
  36085. }
  36086. }
  36087. }
  36088. this.has = this.checkLoop();
  36089. this.hoistVarDeclarations();
  36090. var params = (0, _values2.default)(outsideRefs);
  36091. var args = (0, _values2.default)(outsideRefs);
  36092. var isSwitch = this.blockPath.isSwitchStatement();
  36093. var fn = t.functionExpression(null, params, t.blockStatement(isSwitch ? [block] : block.body));
  36094. fn.shadow = true;
  36095. this.addContinuations(fn);
  36096. var ref = fn;
  36097. if (this.loop) {
  36098. ref = this.scope.generateUidIdentifier("loop");
  36099. this.loopPath.insertBefore(t.variableDeclaration("var", [t.variableDeclarator(ref, fn)]));
  36100. }
  36101. var call = t.callExpression(ref, args);
  36102. var ret = this.scope.generateUidIdentifier("ret");
  36103. var hasYield = _babelTraverse2.default.hasType(fn.body, this.scope, "YieldExpression", t.FUNCTION_TYPES);
  36104. if (hasYield) {
  36105. fn.generator = true;
  36106. call = t.yieldExpression(call, true);
  36107. }
  36108. var hasAsync = _babelTraverse2.default.hasType(fn.body, this.scope, "AwaitExpression", t.FUNCTION_TYPES);
  36109. if (hasAsync) {
  36110. fn.async = true;
  36111. call = t.awaitExpression(call);
  36112. }
  36113. this.buildClosure(ret, call);
  36114. if (isSwitch) this.blockPath.replaceWithMultiple(this.body);else block.body = this.body;
  36115. };
  36116. BlockScoping.prototype.buildClosure = function buildClosure(ret, call) {
  36117. var has = this.has;
  36118. if (has.hasReturn || has.hasBreakContinue) {
  36119. this.buildHas(ret, call);
  36120. } else {
  36121. this.body.push(t.expressionStatement(call));
  36122. }
  36123. };
  36124. BlockScoping.prototype.addContinuations = function addContinuations(fn) {
  36125. var state = {
  36126. reassignments: {},
  36127. outsideReferences: this.outsideLetReferences
  36128. };
  36129. this.scope.traverse(fn, continuationVisitor, state);
  36130. for (var i = 0; i < fn.params.length; i++) {
  36131. var param = fn.params[i];
  36132. if (!state.reassignments[param.name]) continue;
  36133. var newParam = this.scope.generateUidIdentifier(param.name);
  36134. fn.params[i] = newParam;
  36135. this.scope.rename(param.name, newParam.name, fn);
  36136. fn.body.body.push(t.expressionStatement(t.assignmentExpression("=", param, newParam)));
  36137. }
  36138. };
  36139. BlockScoping.prototype.getLetReferences = function getLetReferences() {
  36140. var _this = this;
  36141. var block = this.block;
  36142. var declarators = [];
  36143. if (this.loop) {
  36144. var init = this.loop.left || this.loop.init;
  36145. if (isBlockScoped(init)) {
  36146. declarators.push(init);
  36147. (0, _extend2.default)(this.outsideLetReferences, t.getBindingIdentifiers(init));
  36148. }
  36149. }
  36150. var addDeclarationsFromChild = function addDeclarationsFromChild(path, node) {
  36151. node = node || path.node;
  36152. if (t.isClassDeclaration(node) || t.isFunctionDeclaration(node) || isBlockScoped(node)) {
  36153. if (isBlockScoped(node)) {
  36154. convertBlockScopedToVar(path, node, block, _this.scope);
  36155. }
  36156. declarators = declarators.concat(node.declarations || node);
  36157. }
  36158. if (t.isLabeledStatement(node)) {
  36159. addDeclarationsFromChild(path.get("body"), node.body);
  36160. }
  36161. };
  36162. if (block.body) {
  36163. for (var i = 0; i < block.body.length; i++) {
  36164. var declarPath = this.blockPath.get("body")[i];
  36165. addDeclarationsFromChild(declarPath);
  36166. }
  36167. }
  36168. if (block.cases) {
  36169. for (var _i = 0; _i < block.cases.length; _i++) {
  36170. var consequents = block.cases[_i].consequent;
  36171. for (var j = 0; j < consequents.length; j++) {
  36172. var _declarPath = this.blockPath.get("cases")[_i];
  36173. var declar = consequents[j];
  36174. addDeclarationsFromChild(_declarPath, declar);
  36175. }
  36176. }
  36177. }
  36178. for (var _i2 = 0; _i2 < declarators.length; _i2++) {
  36179. var _declar = declarators[_i2];
  36180. var keys = t.getBindingIdentifiers(_declar, false, true);
  36181. (0, _extend2.default)(this.letReferences, keys);
  36182. this.hasLetReferences = true;
  36183. }
  36184. if (!this.hasLetReferences) return;
  36185. var state = {
  36186. letReferences: this.letReferences,
  36187. closurify: false,
  36188. file: this.file,
  36189. loopDepth: 0
  36190. };
  36191. var loopOrFunctionParent = this.blockPath.find(function (path) {
  36192. return path.isLoop() || path.isFunction();
  36193. });
  36194. if (loopOrFunctionParent && loopOrFunctionParent.isLoop()) {
  36195. state.loopDepth++;
  36196. }
  36197. this.blockPath.traverse(letReferenceBlockVisitor, state);
  36198. return state.closurify;
  36199. };
  36200. BlockScoping.prototype.checkLoop = function checkLoop() {
  36201. var state = {
  36202. hasBreakContinue: false,
  36203. ignoreLabeless: false,
  36204. inSwitchCase: false,
  36205. innerLabels: [],
  36206. hasReturn: false,
  36207. isLoop: !!this.loop,
  36208. map: {},
  36209. LOOP_IGNORE: (0, _symbol2.default)()
  36210. };
  36211. this.blockPath.traverse(loopLabelVisitor, state);
  36212. this.blockPath.traverse(loopVisitor, state);
  36213. return state;
  36214. };
  36215. BlockScoping.prototype.hoistVarDeclarations = function hoistVarDeclarations() {
  36216. this.blockPath.traverse(hoistVarDeclarationsVisitor, this);
  36217. };
  36218. BlockScoping.prototype.pushDeclar = function pushDeclar(node) {
  36219. var declars = [];
  36220. var names = t.getBindingIdentifiers(node);
  36221. for (var name in names) {
  36222. declars.push(t.variableDeclarator(names[name]));
  36223. }
  36224. this.body.push(t.variableDeclaration(node.kind, declars));
  36225. var replace = [];
  36226. for (var i = 0; i < node.declarations.length; i++) {
  36227. var declar = node.declarations[i];
  36228. if (!declar.init) continue;
  36229. var expr = t.assignmentExpression("=", declar.id, declar.init);
  36230. replace.push(t.inherits(expr, declar));
  36231. }
  36232. return replace;
  36233. };
  36234. BlockScoping.prototype.buildHas = function buildHas(ret, call) {
  36235. var body = this.body;
  36236. body.push(t.variableDeclaration("var", [t.variableDeclarator(ret, call)]));
  36237. var retCheck = void 0;
  36238. var has = this.has;
  36239. var cases = [];
  36240. if (has.hasReturn) {
  36241. retCheck = buildRetCheck({
  36242. RETURN: ret
  36243. });
  36244. }
  36245. if (has.hasBreakContinue) {
  36246. for (var key in has.map) {
  36247. cases.push(t.switchCase(t.stringLiteral(key), [has.map[key]]));
  36248. }
  36249. if (has.hasReturn) {
  36250. cases.push(t.switchCase(null, [retCheck]));
  36251. }
  36252. if (cases.length === 1) {
  36253. var single = cases[0];
  36254. body.push(t.ifStatement(t.binaryExpression("===", ret, single.test), single.consequent[0]));
  36255. } else {
  36256. if (this.loop) {
  36257. for (var i = 0; i < cases.length; i++) {
  36258. var caseConsequent = cases[i].consequent[0];
  36259. if (t.isBreakStatement(caseConsequent) && !caseConsequent.label) {
  36260. caseConsequent.label = this.loopLabel = this.loopLabel || this.scope.generateUidIdentifier("loop");
  36261. }
  36262. }
  36263. }
  36264. body.push(t.switchStatement(ret, cases));
  36265. }
  36266. } else {
  36267. if (has.hasReturn) {
  36268. body.push(retCheck);
  36269. }
  36270. }
  36271. };
  36272. return BlockScoping;
  36273. }();
  36274. module.exports = exports["default"];
  36275. });
  36276. $__System.registerDynamic("1a1", ["15", "11"], true, function ($__require, exports, module) {
  36277. "use strict";
  36278. var global = this || self,
  36279. GLOBAL = global;
  36280. var _keys = $__require("15");
  36281. var _keys2 = _interopRequireDefault(_keys);
  36282. var _babelTypes = $__require("11");
  36283. var t = _interopRequireWildcard(_babelTypes);
  36284. function _interopRequireWildcard(obj) {
  36285. if (obj && obj.__esModule) {
  36286. return obj;
  36287. } else {
  36288. var newObj = {};if (obj != null) {
  36289. for (var key in obj) {
  36290. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  36291. }
  36292. }newObj.default = obj;return newObj;
  36293. }
  36294. }
  36295. function _interopRequireDefault(obj) {
  36296. return obj && obj.__esModule ? obj : { default: obj };
  36297. }
  36298. var hasOwn = Object.prototype.hasOwnProperty;
  36299. // The hoist function takes a FunctionExpression or FunctionDeclaration
  36300. // and replaces any Declaration nodes in its body with assignments, then
  36301. // returns a VariableDeclaration containing just the names of the removed
  36302. // declarations.
  36303. /**
  36304. * Copyright (c) 2014, Facebook, Inc.
  36305. * All rights reserved.
  36306. *
  36307. * This source code is licensed under the BSD-style license found in the
  36308. * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
  36309. * additional grant of patent rights can be found in the PATENTS file in
  36310. * the same directory.
  36311. */
  36312. exports.hoist = function (funPath) {
  36313. t.assertFunction(funPath.node);
  36314. var vars = {};
  36315. function varDeclToExpr(vdec, includeIdentifiers) {
  36316. t.assertVariableDeclaration(vdec);
  36317. // TODO assert.equal(vdec.kind, "var");
  36318. var exprs = [];
  36319. vdec.declarations.forEach(function (dec) {
  36320. // Note: We duplicate 'dec.id' here to ensure that the variable declaration IDs don't
  36321. // have the same 'loc' value, since that can make sourcemaps and retainLines behave poorly.
  36322. vars[dec.id.name] = t.identifier(dec.id.name);
  36323. if (dec.init) {
  36324. exprs.push(t.assignmentExpression("=", dec.id, dec.init));
  36325. } else if (includeIdentifiers) {
  36326. exprs.push(dec.id);
  36327. }
  36328. });
  36329. if (exprs.length === 0) return null;
  36330. if (exprs.length === 1) return exprs[0];
  36331. return t.sequenceExpression(exprs);
  36332. }
  36333. funPath.get("body").traverse({
  36334. VariableDeclaration: {
  36335. exit: function exit(path) {
  36336. var expr = varDeclToExpr(path.node, false);
  36337. if (expr === null) {
  36338. path.remove();
  36339. } else {
  36340. // We don't need to traverse this expression any further because
  36341. // there can't be any new declarations inside an expression.
  36342. path.replaceWith(t.expressionStatement(expr));
  36343. }
  36344. // Since the original node has been either removed or replaced,
  36345. // avoid traversing it any further.
  36346. path.skip();
  36347. }
  36348. },
  36349. ForStatement: function ForStatement(path) {
  36350. var init = path.node.init;
  36351. if (t.isVariableDeclaration(init)) {
  36352. path.get("init").replaceWith(varDeclToExpr(init, false));
  36353. }
  36354. },
  36355. ForXStatement: function ForXStatement(path) {
  36356. var left = path.get("left");
  36357. if (left.isVariableDeclaration()) {
  36358. left.replaceWith(varDeclToExpr(left.node, true));
  36359. }
  36360. },
  36361. FunctionDeclaration: function FunctionDeclaration(path) {
  36362. var node = path.node;
  36363. vars[node.id.name] = node.id;
  36364. var assignment = t.expressionStatement(t.assignmentExpression("=", node.id, t.functionExpression(node.id, node.params, node.body, node.generator, node.expression)));
  36365. if (path.parentPath.isBlockStatement()) {
  36366. // Insert the assignment form before the first statement in the
  36367. // enclosing block.
  36368. path.parentPath.unshiftContainer("body", assignment);
  36369. // Remove the function declaration now that we've inserted the
  36370. // equivalent assignment form at the beginning of the block.
  36371. path.remove();
  36372. } else {
  36373. // If the parent node is not a block statement, then we can just
  36374. // replace the declaration with the equivalent assignment form
  36375. // without worrying about hoisting it.
  36376. path.replaceWith(assignment);
  36377. }
  36378. // Don't hoist variables out of inner functions.
  36379. path.skip();
  36380. },
  36381. FunctionExpression: function FunctionExpression(path) {
  36382. // Don't descend into nested function expressions.
  36383. path.skip();
  36384. }
  36385. });
  36386. var paramNames = {};
  36387. funPath.get("params").forEach(function (paramPath) {
  36388. var param = paramPath.node;
  36389. if (t.isIdentifier(param)) {
  36390. paramNames[param.name] = param;
  36391. } else {
  36392. // Variables declared by destructuring parameter patterns will be
  36393. // harmlessly re-declared.
  36394. }
  36395. });
  36396. var declarations = [];
  36397. (0, _keys2.default)(vars).forEach(function (name) {
  36398. if (!hasOwn.call(paramNames, name)) {
  36399. declarations.push(t.variableDeclarator(vars[name], null));
  36400. }
  36401. });
  36402. if (declarations.length === 0) {
  36403. return null; // Be sure to handle this case!
  36404. }
  36405. return t.variableDeclaration("var", declarations);
  36406. };
  36407. });
  36408. $__System.registerDynamic("1a2", ["@node/assert", "11", "@node/util", "1a3"], true, function ($__require, exports, module) {
  36409. "use strict";
  36410. var global = this || self,
  36411. GLOBAL = global;
  36412. var _assert = $__require("@node/assert");
  36413. var _assert2 = _interopRequireDefault(_assert);
  36414. var _babelTypes = $__require("11");
  36415. var t = _interopRequireWildcard(_babelTypes);
  36416. var _util = $__require("@node/util");
  36417. function _interopRequireWildcard(obj) {
  36418. if (obj && obj.__esModule) {
  36419. return obj;
  36420. } else {
  36421. var newObj = {};if (obj != null) {
  36422. for (var key in obj) {
  36423. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  36424. }
  36425. }newObj.default = obj;return newObj;
  36426. }
  36427. }
  36428. function _interopRequireDefault(obj) {
  36429. return obj && obj.__esModule ? obj : { default: obj };
  36430. }
  36431. function Entry() {
  36432. _assert2.default.ok(this instanceof Entry);
  36433. } /**
  36434. * Copyright (c) 2014, Facebook, Inc.
  36435. * All rights reserved.
  36436. *
  36437. * This source code is licensed under the BSD-style license found in the
  36438. * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
  36439. * additional grant of patent rights can be found in the PATENTS file in
  36440. * the same directory.
  36441. */
  36442. function FunctionEntry(returnLoc) {
  36443. Entry.call(this);
  36444. t.assertLiteral(returnLoc);
  36445. this.returnLoc = returnLoc;
  36446. }
  36447. (0, _util.inherits)(FunctionEntry, Entry);
  36448. exports.FunctionEntry = FunctionEntry;
  36449. function LoopEntry(breakLoc, continueLoc, label) {
  36450. Entry.call(this);
  36451. t.assertLiteral(breakLoc);
  36452. t.assertLiteral(continueLoc);
  36453. if (label) {
  36454. t.assertIdentifier(label);
  36455. } else {
  36456. label = null;
  36457. }
  36458. this.breakLoc = breakLoc;
  36459. this.continueLoc = continueLoc;
  36460. this.label = label;
  36461. }
  36462. (0, _util.inherits)(LoopEntry, Entry);
  36463. exports.LoopEntry = LoopEntry;
  36464. function SwitchEntry(breakLoc) {
  36465. Entry.call(this);
  36466. t.assertLiteral(breakLoc);
  36467. this.breakLoc = breakLoc;
  36468. }
  36469. (0, _util.inherits)(SwitchEntry, Entry);
  36470. exports.SwitchEntry = SwitchEntry;
  36471. function TryEntry(firstLoc, catchEntry, finallyEntry) {
  36472. Entry.call(this);
  36473. t.assertLiteral(firstLoc);
  36474. if (catchEntry) {
  36475. _assert2.default.ok(catchEntry instanceof CatchEntry);
  36476. } else {
  36477. catchEntry = null;
  36478. }
  36479. if (finallyEntry) {
  36480. _assert2.default.ok(finallyEntry instanceof FinallyEntry);
  36481. } else {
  36482. finallyEntry = null;
  36483. }
  36484. // Have to have one or the other (or both).
  36485. _assert2.default.ok(catchEntry || finallyEntry);
  36486. this.firstLoc = firstLoc;
  36487. this.catchEntry = catchEntry;
  36488. this.finallyEntry = finallyEntry;
  36489. }
  36490. (0, _util.inherits)(TryEntry, Entry);
  36491. exports.TryEntry = TryEntry;
  36492. function CatchEntry(firstLoc, paramId) {
  36493. Entry.call(this);
  36494. t.assertLiteral(firstLoc);
  36495. t.assertIdentifier(paramId);
  36496. this.firstLoc = firstLoc;
  36497. this.paramId = paramId;
  36498. }
  36499. (0, _util.inherits)(CatchEntry, Entry);
  36500. exports.CatchEntry = CatchEntry;
  36501. function FinallyEntry(firstLoc, afterLoc) {
  36502. Entry.call(this);
  36503. t.assertLiteral(firstLoc);
  36504. t.assertLiteral(afterLoc);
  36505. this.firstLoc = firstLoc;
  36506. this.afterLoc = afterLoc;
  36507. }
  36508. (0, _util.inherits)(FinallyEntry, Entry);
  36509. exports.FinallyEntry = FinallyEntry;
  36510. function LabeledEntry(breakLoc, label) {
  36511. Entry.call(this);
  36512. t.assertLiteral(breakLoc);
  36513. t.assertIdentifier(label);
  36514. this.breakLoc = breakLoc;
  36515. this.label = label;
  36516. }
  36517. (0, _util.inherits)(LabeledEntry, Entry);
  36518. exports.LabeledEntry = LabeledEntry;
  36519. function LeapManager(emitter) {
  36520. _assert2.default.ok(this instanceof LeapManager);
  36521. var Emitter = $__require("1a3").Emitter;
  36522. _assert2.default.ok(emitter instanceof Emitter);
  36523. this.emitter = emitter;
  36524. this.entryStack = [new FunctionEntry(emitter.finalLoc)];
  36525. }
  36526. var LMp = LeapManager.prototype;
  36527. exports.LeapManager = LeapManager;
  36528. LMp.withEntry = function (entry, callback) {
  36529. _assert2.default.ok(entry instanceof Entry);
  36530. this.entryStack.push(entry);
  36531. try {
  36532. callback.call(this.emitter);
  36533. } finally {
  36534. var popped = this.entryStack.pop();
  36535. _assert2.default.strictEqual(popped, entry);
  36536. }
  36537. };
  36538. LMp._findLeapLocation = function (property, label) {
  36539. for (var i = this.entryStack.length - 1; i >= 0; --i) {
  36540. var entry = this.entryStack[i];
  36541. var loc = entry[property];
  36542. if (loc) {
  36543. if (label) {
  36544. if (entry.label && entry.label.name === label.name) {
  36545. return loc;
  36546. }
  36547. } else if (entry instanceof LabeledEntry) {
  36548. // Ignore LabeledEntry entries unless we are actually breaking to
  36549. // a label.
  36550. } else {
  36551. return loc;
  36552. }
  36553. }
  36554. }
  36555. return null;
  36556. };
  36557. LMp.getBreakLoc = function (label) {
  36558. return this._findLeapLocation("breakLoc", label);
  36559. };
  36560. LMp.getContinueLoc = function (label) {
  36561. return this._findLeapLocation("continueLoc", label);
  36562. };
  36563. });
  36564. $__System.registerDynamic("1a4", ["@node/assert", "11", "1a5"], true, function ($__require, exports, module) {
  36565. "use strict";
  36566. var global = this || self,
  36567. GLOBAL = global;
  36568. var _assert = $__require("@node/assert");
  36569. var _assert2 = _interopRequireDefault(_assert);
  36570. var _babelTypes = $__require("11");
  36571. var t = _interopRequireWildcard(_babelTypes);
  36572. function _interopRequireWildcard(obj) {
  36573. if (obj && obj.__esModule) {
  36574. return obj;
  36575. } else {
  36576. var newObj = {};if (obj != null) {
  36577. for (var key in obj) {
  36578. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  36579. }
  36580. }newObj.default = obj;return newObj;
  36581. }
  36582. }
  36583. function _interopRequireDefault(obj) {
  36584. return obj && obj.__esModule ? obj : { default: obj };
  36585. }
  36586. var m = $__require("1a5").makeAccessor(); /**
  36587. * Copyright (c) 2014, Facebook, Inc.
  36588. * All rights reserved.
  36589. *
  36590. * This source code is licensed under the BSD-style license found in the
  36591. * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
  36592. * additional grant of patent rights can be found in the PATENTS file in
  36593. * the same directory.
  36594. */
  36595. var hasOwn = Object.prototype.hasOwnProperty;
  36596. function makePredicate(propertyName, knownTypes) {
  36597. function onlyChildren(node) {
  36598. t.assertNode(node);
  36599. // Assume no side effects until we find out otherwise.
  36600. var result = false;
  36601. function check(child) {
  36602. if (result) {
  36603. // Do nothing.
  36604. } else if (Array.isArray(child)) {
  36605. child.some(check);
  36606. } else if (t.isNode(child)) {
  36607. _assert2.default.strictEqual(result, false);
  36608. result = predicate(child);
  36609. }
  36610. return result;
  36611. }
  36612. var keys = t.VISITOR_KEYS[node.type];
  36613. if (keys) {
  36614. for (var i = 0; i < keys.length; i++) {
  36615. var key = keys[i];
  36616. var child = node[key];
  36617. check(child);
  36618. }
  36619. }
  36620. return result;
  36621. }
  36622. function predicate(node) {
  36623. t.assertNode(node);
  36624. var meta = m(node);
  36625. if (hasOwn.call(meta, propertyName)) return meta[propertyName];
  36626. // Certain types are "opaque," which means they have no side
  36627. // effects or leaps and we don't care about their subexpressions.
  36628. if (hasOwn.call(opaqueTypes, node.type)) return meta[propertyName] = false;
  36629. if (hasOwn.call(knownTypes, node.type)) return meta[propertyName] = true;
  36630. return meta[propertyName] = onlyChildren(node);
  36631. }
  36632. predicate.onlyChildren = onlyChildren;
  36633. return predicate;
  36634. }
  36635. var opaqueTypes = {
  36636. FunctionExpression: true,
  36637. ArrowFunctionExpression: true
  36638. };
  36639. // These types potentially have side effects regardless of what side
  36640. // effects their subexpressions have.
  36641. var sideEffectTypes = {
  36642. CallExpression: true, // Anything could happen!
  36643. ForInStatement: true, // Modifies the key variable.
  36644. UnaryExpression: true, // Think delete.
  36645. BinaryExpression: true, // Might invoke .toString() or .valueOf().
  36646. AssignmentExpression: true, // Side-effecting by definition.
  36647. UpdateExpression: true, // Updates are essentially assignments.
  36648. NewExpression: true // Similar to CallExpression.
  36649. };
  36650. // These types are the direct cause of all leaps in control flow.
  36651. var leapTypes = {
  36652. YieldExpression: true,
  36653. BreakStatement: true,
  36654. ContinueStatement: true,
  36655. ReturnStatement: true,
  36656. ThrowStatement: true
  36657. };
  36658. // All leap types are also side effect types.
  36659. for (var type in leapTypes) {
  36660. if (hasOwn.call(leapTypes, type)) {
  36661. sideEffectTypes[type] = leapTypes[type];
  36662. }
  36663. }
  36664. exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes);
  36665. exports.containsLeap = makePredicate("containsLeap", leapTypes);
  36666. });
  36667. $__System.registerDynamic("1a3", ["5b", "@node/assert", "11", "1a2", "1a4", "1a6"], true, function ($__require, exports, module) {
  36668. "use strict";
  36669. var global = this || self,
  36670. GLOBAL = global;
  36671. var _stringify = $__require("5b");
  36672. var _stringify2 = _interopRequireDefault(_stringify);
  36673. var _assert = $__require("@node/assert");
  36674. var _assert2 = _interopRequireDefault(_assert);
  36675. var _babelTypes = $__require("11");
  36676. var t = _interopRequireWildcard(_babelTypes);
  36677. var _leap = $__require("1a2");
  36678. var leap = _interopRequireWildcard(_leap);
  36679. var _meta = $__require("1a4");
  36680. var meta = _interopRequireWildcard(_meta);
  36681. var _util = $__require("1a6");
  36682. var util = _interopRequireWildcard(_util);
  36683. function _interopRequireWildcard(obj) {
  36684. if (obj && obj.__esModule) {
  36685. return obj;
  36686. } else {
  36687. var newObj = {};if (obj != null) {
  36688. for (var key in obj) {
  36689. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  36690. }
  36691. }newObj.default = obj;return newObj;
  36692. }
  36693. }
  36694. function _interopRequireDefault(obj) {
  36695. return obj && obj.__esModule ? obj : { default: obj };
  36696. }
  36697. var hasOwn = Object.prototype.hasOwnProperty; /**
  36698. * Copyright (c) 2014, Facebook, Inc.
  36699. * All rights reserved.
  36700. *
  36701. * This source code is licensed under the BSD-style license found in the
  36702. * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
  36703. * additional grant of patent rights can be found in the PATENTS file in
  36704. * the same directory.
  36705. */
  36706. function Emitter(contextId) {
  36707. _assert2.default.ok(this instanceof Emitter);
  36708. t.assertIdentifier(contextId);
  36709. // Used to generate unique temporary names.
  36710. this.nextTempId = 0;
  36711. // In order to make sure the context object does not collide with
  36712. // anything in the local scope, we might have to rename it, so we
  36713. // refer to it symbolically instead of just assuming that it will be
  36714. // called "context".
  36715. this.contextId = contextId;
  36716. // An append-only list of Statements that grows each time this.emit is
  36717. // called.
  36718. this.listing = [];
  36719. // A sparse array whose keys correspond to locations in this.listing
  36720. // that have been marked as branch/jump targets.
  36721. this.marked = [true];
  36722. // The last location will be marked when this.getDispatchLoop is
  36723. // called.
  36724. this.finalLoc = loc();
  36725. // A list of all leap.TryEntry statements emitted.
  36726. this.tryEntries = [];
  36727. // Each time we evaluate the body of a loop, we tell this.leapManager
  36728. // to enter a nested loop context that determines the meaning of break
  36729. // and continue statements therein.
  36730. this.leapManager = new leap.LeapManager(this);
  36731. }
  36732. var Ep = Emitter.prototype;
  36733. exports.Emitter = Emitter;
  36734. // Offsets into this.listing that could be used as targets for branches or
  36735. // jumps are represented as numeric Literal nodes. This representation has
  36736. // the amazingly convenient benefit of allowing the exact value of the
  36737. // location to be determined at any time, even after generating code that
  36738. // refers to the location.
  36739. function loc() {
  36740. return t.numericLiteral(-1);
  36741. }
  36742. // Sets the exact value of the given location to the offset of the next
  36743. // Statement emitted.
  36744. Ep.mark = function (loc) {
  36745. t.assertLiteral(loc);
  36746. var index = this.listing.length;
  36747. if (loc.value === -1) {
  36748. loc.value = index;
  36749. } else {
  36750. // Locations can be marked redundantly, but their values cannot change
  36751. // once set the first time.
  36752. _assert2.default.strictEqual(loc.value, index);
  36753. }
  36754. this.marked[index] = true;
  36755. return loc;
  36756. };
  36757. Ep.emit = function (node) {
  36758. if (t.isExpression(node)) {
  36759. node = t.expressionStatement(node);
  36760. }
  36761. t.assertStatement(node);
  36762. this.listing.push(node);
  36763. };
  36764. // Shorthand for emitting assignment statements. This will come in handy
  36765. // for assignments to temporary variables.
  36766. Ep.emitAssign = function (lhs, rhs) {
  36767. this.emit(this.assign(lhs, rhs));
  36768. return lhs;
  36769. };
  36770. // Shorthand for an assignment statement.
  36771. Ep.assign = function (lhs, rhs) {
  36772. return t.expressionStatement(t.assignmentExpression("=", lhs, rhs));
  36773. };
  36774. // Convenience function for generating expressions like context.next,
  36775. // context.sent, and context.rval.
  36776. Ep.contextProperty = function (name, computed) {
  36777. return t.memberExpression(this.contextId, computed ? t.stringLiteral(name) : t.identifier(name), !!computed);
  36778. };
  36779. // Shorthand for setting context.rval and jumping to `context.stop()`.
  36780. Ep.stop = function (rval) {
  36781. if (rval) {
  36782. this.setReturnValue(rval);
  36783. }
  36784. this.jump(this.finalLoc);
  36785. };
  36786. Ep.setReturnValue = function (valuePath) {
  36787. t.assertExpression(valuePath.value);
  36788. this.emitAssign(this.contextProperty("rval"), this.explodeExpression(valuePath));
  36789. };
  36790. Ep.clearPendingException = function (tryLoc, assignee) {
  36791. t.assertLiteral(tryLoc);
  36792. var catchCall = t.callExpression(this.contextProperty("catch", true), [tryLoc]);
  36793. if (assignee) {
  36794. this.emitAssign(assignee, catchCall);
  36795. } else {
  36796. this.emit(catchCall);
  36797. }
  36798. };
  36799. // Emits code for an unconditional jump to the given location, even if the
  36800. // exact value of the location is not yet known.
  36801. Ep.jump = function (toLoc) {
  36802. this.emitAssign(this.contextProperty("next"), toLoc);
  36803. this.emit(t.breakStatement());
  36804. };
  36805. // Conditional jump.
  36806. Ep.jumpIf = function (test, toLoc) {
  36807. t.assertExpression(test);
  36808. t.assertLiteral(toLoc);
  36809. this.emit(t.ifStatement(test, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()])));
  36810. };
  36811. // Conditional jump, with the condition negated.
  36812. Ep.jumpIfNot = function (test, toLoc) {
  36813. t.assertExpression(test);
  36814. t.assertLiteral(toLoc);
  36815. var negatedTest = void 0;
  36816. if (t.isUnaryExpression(test) && test.operator === "!") {
  36817. // Avoid double negation.
  36818. negatedTest = test.argument;
  36819. } else {
  36820. negatedTest = t.unaryExpression("!", test);
  36821. }
  36822. this.emit(t.ifStatement(negatedTest, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()])));
  36823. };
  36824. // Returns a unique MemberExpression that can be used to store and
  36825. // retrieve temporary values. Since the object of the member expression is
  36826. // the context object, which is presumed to coexist peacefully with all
  36827. // other local variables, and since we just increment `nextTempId`
  36828. // monotonically, uniqueness is assured.
  36829. Ep.makeTempVar = function () {
  36830. return this.contextProperty("t" + this.nextTempId++);
  36831. };
  36832. Ep.getContextFunction = function (id) {
  36833. return t.functionExpression(id || null /*Anonymous*/
  36834. , [this.contextId], t.blockStatement([this.getDispatchLoop()]), false, // Not a generator anymore!
  36835. false // Nor an expression.
  36836. );
  36837. };
  36838. // Turns this.listing into a loop of the form
  36839. //
  36840. // while (1) switch (context.next) {
  36841. // case 0:
  36842. // ...
  36843. // case n:
  36844. // return context.stop();
  36845. // }
  36846. //
  36847. // Each marked location in this.listing will correspond to one generated
  36848. // case statement.
  36849. Ep.getDispatchLoop = function () {
  36850. var self = this;
  36851. var cases = [];
  36852. var current = void 0;
  36853. // If we encounter a break, continue, or return statement in a switch
  36854. // case, we can skip the rest of the statements until the next case.
  36855. var alreadyEnded = false;
  36856. self.listing.forEach(function (stmt, i) {
  36857. if (self.marked.hasOwnProperty(i)) {
  36858. cases.push(t.switchCase(t.numericLiteral(i), current = []));
  36859. alreadyEnded = false;
  36860. }
  36861. if (!alreadyEnded) {
  36862. current.push(stmt);
  36863. if (t.isCompletionStatement(stmt)) alreadyEnded = true;
  36864. }
  36865. });
  36866. // Now that we know how many statements there will be in this.listing,
  36867. // we can finally resolve this.finalLoc.value.
  36868. this.finalLoc.value = this.listing.length;
  36869. cases.push(t.switchCase(this.finalLoc, [
  36870. // Intentionally fall through to the "end" case...
  36871. ]),
  36872. // So that the runtime can jump to the final location without having
  36873. // to know its offset, we provide the "end" case as a synonym.
  36874. t.switchCase(t.stringLiteral("end"), [
  36875. // This will check/clear both context.thrown and context.rval.
  36876. t.returnStatement(t.callExpression(this.contextProperty("stop"), []))]));
  36877. return t.whileStatement(t.numericLiteral(1), t.switchStatement(t.assignmentExpression("=", this.contextProperty("prev"), this.contextProperty("next")), cases));
  36878. };
  36879. Ep.getTryLocsList = function () {
  36880. if (this.tryEntries.length === 0) {
  36881. // To avoid adding a needless [] to the majority of runtime.wrap
  36882. // argument lists, force the caller to handle this case specially.
  36883. return null;
  36884. }
  36885. var lastLocValue = 0;
  36886. return t.arrayExpression(this.tryEntries.map(function (tryEntry) {
  36887. var thisLocValue = tryEntry.firstLoc.value;
  36888. _assert2.default.ok(thisLocValue >= lastLocValue, "try entries out of order");
  36889. lastLocValue = thisLocValue;
  36890. var ce = tryEntry.catchEntry;
  36891. var fe = tryEntry.finallyEntry;
  36892. var locs = [tryEntry.firstLoc,
  36893. // The null here makes a hole in the array.
  36894. ce ? ce.firstLoc : null];
  36895. if (fe) {
  36896. locs[2] = fe.firstLoc;
  36897. locs[3] = fe.afterLoc;
  36898. }
  36899. return t.arrayExpression(locs);
  36900. }));
  36901. };
  36902. // All side effects must be realized in order.
  36903. // If any subexpression harbors a leap, all subexpressions must be
  36904. // neutered of side effects.
  36905. // No destructive modification of AST nodes.
  36906. Ep.explode = function (path, ignoreResult) {
  36907. var node = path.node;
  36908. var self = this;
  36909. t.assertNode(node);
  36910. if (t.isDeclaration(node)) throw getDeclError(node);
  36911. if (t.isStatement(node)) return self.explodeStatement(path);
  36912. if (t.isExpression(node)) return self.explodeExpression(path, ignoreResult);
  36913. switch (node.type) {
  36914. case "Program":
  36915. return path.get("body").map(self.explodeStatement, self);
  36916. case "VariableDeclarator":
  36917. throw getDeclError(node);
  36918. // These node types should be handled by their parent nodes
  36919. // (ObjectExpression, SwitchStatement, and TryStatement, respectively).
  36920. case "Property":
  36921. case "SwitchCase":
  36922. case "CatchClause":
  36923. throw new Error(node.type + " nodes should be handled by their parents");
  36924. default:
  36925. throw new Error("unknown Node of type " + (0, _stringify2.default)(node.type));
  36926. }
  36927. };
  36928. function getDeclError(node) {
  36929. return new Error("all declarations should have been transformed into " + "assignments before the Exploder began its work: " + (0, _stringify2.default)(node));
  36930. }
  36931. Ep.explodeStatement = function (path, labelId) {
  36932. var stmt = path.node;
  36933. var self = this;
  36934. var before = void 0,
  36935. after = void 0,
  36936. head = void 0;
  36937. t.assertStatement(stmt);
  36938. if (labelId) {
  36939. t.assertIdentifier(labelId);
  36940. } else {
  36941. labelId = null;
  36942. }
  36943. // Explode BlockStatement nodes even if they do not contain a yield,
  36944. // because we don't want or need the curly braces.
  36945. if (t.isBlockStatement(stmt)) {
  36946. path.get("body").forEach(function (path) {
  36947. self.explodeStatement(path);
  36948. });
  36949. return;
  36950. }
  36951. if (!meta.containsLeap(stmt)) {
  36952. // Technically we should be able to avoid emitting the statement
  36953. // altogether if !meta.hasSideEffects(stmt), but that leads to
  36954. // confusing generated code (for instance, `while (true) {}` just
  36955. // disappears) and is probably a more appropriate job for a dedicated
  36956. // dead code elimination pass.
  36957. self.emit(stmt);
  36958. return;
  36959. }
  36960. switch (stmt.type) {
  36961. case "ExpressionStatement":
  36962. self.explodeExpression(path.get("expression"), true);
  36963. break;
  36964. case "LabeledStatement":
  36965. after = loc();
  36966. // Did you know you can break from any labeled block statement or
  36967. // control structure? Well, you can! Note: when a labeled loop is
  36968. // encountered, the leap.LabeledEntry created here will immediately
  36969. // enclose a leap.LoopEntry on the leap manager's stack, and both
  36970. // entries will have the same label. Though this works just fine, it
  36971. // may seem a bit redundant. In theory, we could check here to
  36972. // determine if stmt knows how to handle its own label; for example,
  36973. // stmt happens to be a WhileStatement and so we know it's going to
  36974. // establish its own LoopEntry when we explode it (below). Then this
  36975. // LabeledEntry would be unnecessary. Alternatively, we might be
  36976. // tempted not to pass stmt.label down into self.explodeStatement,
  36977. // because we've handled the label here, but that's a mistake because
  36978. // labeled loops may contain labeled continue statements, which is not
  36979. // something we can handle in this generic case. All in all, I think a
  36980. // little redundancy greatly simplifies the logic of this case, since
  36981. // it's clear that we handle all possible LabeledStatements correctly
  36982. // here, regardless of whether they interact with the leap manager
  36983. // themselves. Also remember that labels and break/continue-to-label
  36984. // statements are rare, and all of this logic happens at transform
  36985. // time, so it has no additional runtime cost.
  36986. self.leapManager.withEntry(new leap.LabeledEntry(after, stmt.label), function () {
  36987. self.explodeStatement(path.get("body"), stmt.label);
  36988. });
  36989. self.mark(after);
  36990. break;
  36991. case "WhileStatement":
  36992. before = loc();
  36993. after = loc();
  36994. self.mark(before);
  36995. self.jumpIfNot(self.explodeExpression(path.get("test")), after);
  36996. self.leapManager.withEntry(new leap.LoopEntry(after, before, labelId), function () {
  36997. self.explodeStatement(path.get("body"));
  36998. });
  36999. self.jump(before);
  37000. self.mark(after);
  37001. break;
  37002. case "DoWhileStatement":
  37003. var first = loc();
  37004. var test = loc();
  37005. after = loc();
  37006. self.mark(first);
  37007. self.leapManager.withEntry(new leap.LoopEntry(after, test, labelId), function () {
  37008. self.explode(path.get("body"));
  37009. });
  37010. self.mark(test);
  37011. self.jumpIf(self.explodeExpression(path.get("test")), first);
  37012. self.mark(after);
  37013. break;
  37014. case "ForStatement":
  37015. head = loc();
  37016. var update = loc();
  37017. after = loc();
  37018. if (stmt.init) {
  37019. // We pass true here to indicate that if stmt.init is an expression
  37020. // then we do not care about its result.
  37021. self.explode(path.get("init"), true);
  37022. }
  37023. self.mark(head);
  37024. if (stmt.test) {
  37025. self.jumpIfNot(self.explodeExpression(path.get("test")), after);
  37026. } else {
  37027. // No test means continue unconditionally.
  37028. }
  37029. self.leapManager.withEntry(new leap.LoopEntry(after, update, labelId), function () {
  37030. self.explodeStatement(path.get("body"));
  37031. });
  37032. self.mark(update);
  37033. if (stmt.update) {
  37034. // We pass true here to indicate that if stmt.update is an
  37035. // expression then we do not care about its result.
  37036. self.explode(path.get("update"), true);
  37037. }
  37038. self.jump(head);
  37039. self.mark(after);
  37040. break;
  37041. case "TypeCastExpression":
  37042. return self.explodeExpression(path.get("expression"));
  37043. case "ForInStatement":
  37044. head = loc();
  37045. after = loc();
  37046. var keyIterNextFn = self.makeTempVar();
  37047. self.emitAssign(keyIterNextFn, t.callExpression(util.runtimeProperty("keys"), [self.explodeExpression(path.get("right"))]));
  37048. self.mark(head);
  37049. var keyInfoTmpVar = self.makeTempVar();
  37050. self.jumpIf(t.memberExpression(t.assignmentExpression("=", keyInfoTmpVar, t.callExpression(keyIterNextFn, [])), t.identifier("done"), false), after);
  37051. self.emitAssign(stmt.left, t.memberExpression(keyInfoTmpVar, t.identifier("value"), false));
  37052. self.leapManager.withEntry(new leap.LoopEntry(after, head, labelId), function () {
  37053. self.explodeStatement(path.get("body"));
  37054. });
  37055. self.jump(head);
  37056. self.mark(after);
  37057. break;
  37058. case "BreakStatement":
  37059. self.emitAbruptCompletion({
  37060. type: "break",
  37061. target: self.leapManager.getBreakLoc(stmt.label)
  37062. });
  37063. break;
  37064. case "ContinueStatement":
  37065. self.emitAbruptCompletion({
  37066. type: "continue",
  37067. target: self.leapManager.getContinueLoc(stmt.label)
  37068. });
  37069. break;
  37070. case "SwitchStatement":
  37071. // Always save the discriminant into a temporary variable in case the
  37072. // test expressions overwrite values like context.sent.
  37073. var disc = self.emitAssign(self.makeTempVar(), self.explodeExpression(path.get("discriminant")));
  37074. after = loc();
  37075. var defaultLoc = loc();
  37076. var condition = defaultLoc;
  37077. var caseLocs = [];
  37078. // If there are no cases, .cases might be undefined.
  37079. var cases = stmt.cases || [];
  37080. for (var i = cases.length - 1; i >= 0; --i) {
  37081. var c = cases[i];
  37082. t.assertSwitchCase(c);
  37083. if (c.test) {
  37084. condition = t.conditionalExpression(t.binaryExpression("===", disc, c.test), caseLocs[i] = loc(), condition);
  37085. } else {
  37086. caseLocs[i] = defaultLoc;
  37087. }
  37088. }
  37089. var discriminant = path.get("discriminant");
  37090. discriminant.replaceWith(condition);
  37091. self.jump(self.explodeExpression(discriminant));
  37092. self.leapManager.withEntry(new leap.SwitchEntry(after), function () {
  37093. path.get("cases").forEach(function (casePath) {
  37094. var i = casePath.key;
  37095. self.mark(caseLocs[i]);
  37096. casePath.get("consequent").forEach(function (path) {
  37097. self.explodeStatement(path);
  37098. });
  37099. });
  37100. });
  37101. self.mark(after);
  37102. if (defaultLoc.value === -1) {
  37103. self.mark(defaultLoc);
  37104. _assert2.default.strictEqual(after.value, defaultLoc.value);
  37105. }
  37106. break;
  37107. case "IfStatement":
  37108. var elseLoc = stmt.alternate && loc();
  37109. after = loc();
  37110. self.jumpIfNot(self.explodeExpression(path.get("test")), elseLoc || after);
  37111. self.explodeStatement(path.get("consequent"));
  37112. if (elseLoc) {
  37113. self.jump(after);
  37114. self.mark(elseLoc);
  37115. self.explodeStatement(path.get("alternate"));
  37116. }
  37117. self.mark(after);
  37118. break;
  37119. case "ReturnStatement":
  37120. self.emitAbruptCompletion({
  37121. type: "return",
  37122. value: self.explodeExpression(path.get("argument"))
  37123. });
  37124. break;
  37125. case "WithStatement":
  37126. throw new Error("WithStatement not supported in generator functions.");
  37127. case "TryStatement":
  37128. after = loc();
  37129. var handler = stmt.handler;
  37130. var catchLoc = handler && loc();
  37131. var catchEntry = catchLoc && new leap.CatchEntry(catchLoc, handler.param);
  37132. var finallyLoc = stmt.finalizer && loc();
  37133. var finallyEntry = finallyLoc && new leap.FinallyEntry(finallyLoc, after);
  37134. var tryEntry = new leap.TryEntry(self.getUnmarkedCurrentLoc(), catchEntry, finallyEntry);
  37135. self.tryEntries.push(tryEntry);
  37136. self.updateContextPrevLoc(tryEntry.firstLoc);
  37137. self.leapManager.withEntry(tryEntry, function () {
  37138. self.explodeStatement(path.get("block"));
  37139. if (catchLoc) {
  37140. if (finallyLoc) {
  37141. // If we have both a catch block and a finally block, then
  37142. // because we emit the catch block first, we need to jump over
  37143. // it to the finally block.
  37144. self.jump(finallyLoc);
  37145. } else {
  37146. // If there is no finally block, then we need to jump over the
  37147. // catch block to the fall-through location.
  37148. self.jump(after);
  37149. }
  37150. self.updateContextPrevLoc(self.mark(catchLoc));
  37151. var bodyPath = path.get("handler.body");
  37152. var safeParam = self.makeTempVar();
  37153. self.clearPendingException(tryEntry.firstLoc, safeParam);
  37154. bodyPath.traverse(catchParamVisitor, {
  37155. safeParam: safeParam,
  37156. catchParamName: handler.param.name
  37157. });
  37158. self.leapManager.withEntry(catchEntry, function () {
  37159. self.explodeStatement(bodyPath);
  37160. });
  37161. }
  37162. if (finallyLoc) {
  37163. self.updateContextPrevLoc(self.mark(finallyLoc));
  37164. self.leapManager.withEntry(finallyEntry, function () {
  37165. self.explodeStatement(path.get("finalizer"));
  37166. });
  37167. self.emit(t.returnStatement(t.callExpression(self.contextProperty("finish"), [finallyEntry.firstLoc])));
  37168. }
  37169. });
  37170. self.mark(after);
  37171. break;
  37172. case "ThrowStatement":
  37173. self.emit(t.throwStatement(self.explodeExpression(path.get("argument"))));
  37174. break;
  37175. default:
  37176. throw new Error("unknown Statement of type " + (0, _stringify2.default)(stmt.type));
  37177. }
  37178. };
  37179. var catchParamVisitor = {
  37180. Identifier: function Identifier(path, state) {
  37181. if (path.node.name === state.catchParamName && util.isReference(path)) {
  37182. path.replaceWith(state.safeParam);
  37183. }
  37184. },
  37185. Scope: function Scope(path, state) {
  37186. if (path.scope.hasOwnBinding(state.catchParamName)) {
  37187. // Don't descend into nested scopes that shadow the catch
  37188. // parameter with their own declarations.
  37189. path.skip();
  37190. }
  37191. }
  37192. };
  37193. Ep.emitAbruptCompletion = function (record) {
  37194. if (!isValidCompletion(record)) {
  37195. _assert2.default.ok(false, "invalid completion record: " + (0, _stringify2.default)(record));
  37196. }
  37197. _assert2.default.notStrictEqual(record.type, "normal", "normal completions are not abrupt");
  37198. var abruptArgs = [t.stringLiteral(record.type)];
  37199. if (record.type === "break" || record.type === "continue") {
  37200. t.assertLiteral(record.target);
  37201. abruptArgs[1] = record.target;
  37202. } else if (record.type === "return" || record.type === "throw") {
  37203. if (record.value) {
  37204. t.assertExpression(record.value);
  37205. abruptArgs[1] = record.value;
  37206. }
  37207. }
  37208. this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"), abruptArgs)));
  37209. };
  37210. function isValidCompletion(record) {
  37211. var type = record.type;
  37212. if (type === "normal") {
  37213. return !hasOwn.call(record, "target");
  37214. }
  37215. if (type === "break" || type === "continue") {
  37216. return !hasOwn.call(record, "value") && t.isLiteral(record.target);
  37217. }
  37218. if (type === "return" || type === "throw") {
  37219. return hasOwn.call(record, "value") && !hasOwn.call(record, "target");
  37220. }
  37221. return false;
  37222. }
  37223. // Not all offsets into emitter.listing are potential jump targets. For
  37224. // example, execution typically falls into the beginning of a try block
  37225. // without jumping directly there. This method returns the current offset
  37226. // without marking it, so that a switch case will not necessarily be
  37227. // generated for this offset (I say "not necessarily" because the same
  37228. // location might end up being marked in the process of emitting other
  37229. // statements). There's no logical harm in marking such locations as jump
  37230. // targets, but minimizing the number of switch cases keeps the generated
  37231. // code shorter.
  37232. Ep.getUnmarkedCurrentLoc = function () {
  37233. return t.numericLiteral(this.listing.length);
  37234. };
  37235. // The context.prev property takes the value of context.next whenever we
  37236. // evaluate the switch statement discriminant, which is generally good
  37237. // enough for tracking the last location we jumped to, but sometimes
  37238. // context.prev needs to be more precise, such as when we fall
  37239. // successfully out of a try block and into a finally block without
  37240. // jumping. This method exists to update context.prev to the freshest
  37241. // available location. If we were implementing a full interpreter, we
  37242. // would know the location of the current instruction with complete
  37243. // precision at all times, but we don't have that luxury here, as it would
  37244. // be costly and verbose to set context.prev before every statement.
  37245. Ep.updateContextPrevLoc = function (loc) {
  37246. if (loc) {
  37247. t.assertLiteral(loc);
  37248. if (loc.value === -1) {
  37249. // If an uninitialized location literal was passed in, set its value
  37250. // to the current this.listing.length.
  37251. loc.value = this.listing.length;
  37252. } else {
  37253. // Otherwise assert that the location matches the current offset.
  37254. _assert2.default.strictEqual(loc.value, this.listing.length);
  37255. }
  37256. } else {
  37257. loc = this.getUnmarkedCurrentLoc();
  37258. }
  37259. // Make sure context.prev is up to date in case we fell into this try
  37260. // statement without jumping to it. TODO Consider avoiding this
  37261. // assignment when we know control must have jumped here.
  37262. this.emitAssign(this.contextProperty("prev"), loc);
  37263. };
  37264. Ep.explodeExpression = function (path, ignoreResult) {
  37265. var expr = path.node;
  37266. if (expr) {
  37267. t.assertExpression(expr);
  37268. } else {
  37269. return expr;
  37270. }
  37271. var self = this;
  37272. var result = void 0; // Used optionally by several cases below.
  37273. var after = void 0;
  37274. function finish(expr) {
  37275. t.assertExpression(expr);
  37276. if (ignoreResult) {
  37277. self.emit(expr);
  37278. } else {
  37279. return expr;
  37280. }
  37281. }
  37282. // If the expression does not contain a leap, then we either emit the
  37283. // expression as a standalone statement or return it whole.
  37284. if (!meta.containsLeap(expr)) {
  37285. return finish(expr);
  37286. }
  37287. // If any child contains a leap (such as a yield or labeled continue or
  37288. // break statement), then any sibling subexpressions will almost
  37289. // certainly have to be exploded in order to maintain the order of their
  37290. // side effects relative to the leaping child(ren).
  37291. var hasLeapingChildren = meta.containsLeap.onlyChildren(expr);
  37292. // In order to save the rest of explodeExpression from a combinatorial
  37293. // trainwreck of special cases, explodeViaTempVar is responsible for
  37294. // deciding when a subexpression needs to be "exploded," which is my
  37295. // very technical term for emitting the subexpression as an assignment
  37296. // to a temporary variable and the substituting the temporary variable
  37297. // for the original subexpression. Think of exploded view diagrams, not
  37298. // Michael Bay movies. The point of exploding subexpressions is to
  37299. // control the precise order in which the generated code realizes the
  37300. // side effects of those subexpressions.
  37301. function explodeViaTempVar(tempVar, childPath, ignoreChildResult) {
  37302. _assert2.default.ok(!ignoreChildResult || !tempVar, "Ignoring the result of a child expression but forcing it to " + "be assigned to a temporary variable?");
  37303. var result = self.explodeExpression(childPath, ignoreChildResult);
  37304. if (ignoreChildResult) {
  37305. // Side effects already emitted above.
  37306. } else if (tempVar || hasLeapingChildren && !t.isLiteral(result)) {
  37307. // If tempVar was provided, then the result will always be assigned
  37308. // to it, even if the result does not otherwise need to be assigned
  37309. // to a temporary variable. When no tempVar is provided, we have
  37310. // the flexibility to decide whether a temporary variable is really
  37311. // necessary. Unfortunately, in general, a temporary variable is
  37312. // required whenever any child contains a yield expression, since it
  37313. // is difficult to prove (at all, let alone efficiently) whether
  37314. // this result would evaluate to the same value before and after the
  37315. // yield (see #206). One narrow case where we can prove it doesn't
  37316. // matter (and thus we do not need a temporary variable) is when the
  37317. // result in question is a Literal value.
  37318. result = self.emitAssign(tempVar || self.makeTempVar(), result);
  37319. }
  37320. return result;
  37321. }
  37322. // If ignoreResult is true, then we must take full responsibility for
  37323. // emitting the expression with all its side effects, and we should not
  37324. // return a result.
  37325. switch (expr.type) {
  37326. case "MemberExpression":
  37327. return finish(t.memberExpression(self.explodeExpression(path.get("object")), expr.computed ? explodeViaTempVar(null, path.get("property")) : expr.property, expr.computed));
  37328. case "CallExpression":
  37329. var calleePath = path.get("callee");
  37330. var argsPath = path.get("arguments");
  37331. var newCallee = void 0;
  37332. var newArgs = [];
  37333. var hasLeapingArgs = false;
  37334. argsPath.forEach(function (argPath) {
  37335. hasLeapingArgs = hasLeapingArgs || meta.containsLeap(argPath.node);
  37336. });
  37337. if (t.isMemberExpression(calleePath.node)) {
  37338. if (hasLeapingArgs) {
  37339. // If the arguments of the CallExpression contained any yield
  37340. // expressions, then we need to be sure to evaluate the callee
  37341. // before evaluating the arguments, but if the callee was a member
  37342. // expression, then we must be careful that the object of the
  37343. // member expression still gets bound to `this` for the call.
  37344. var newObject = explodeViaTempVar(
  37345. // Assign the exploded callee.object expression to a temporary
  37346. // variable so that we can use it twice without reevaluating it.
  37347. self.makeTempVar(), calleePath.get("object"));
  37348. var newProperty = calleePath.node.computed ? explodeViaTempVar(null, calleePath.get("property")) : calleePath.node.property;
  37349. newArgs.unshift(newObject);
  37350. newCallee = t.memberExpression(t.memberExpression(newObject, newProperty, calleePath.node.computed), t.identifier("call"), false);
  37351. } else {
  37352. newCallee = self.explodeExpression(calleePath);
  37353. }
  37354. } else {
  37355. newCallee = explodeViaTempVar(null, calleePath);
  37356. if (t.isMemberExpression(newCallee)) {
  37357. // If the callee was not previously a MemberExpression, then the
  37358. // CallExpression was "unqualified," meaning its `this` object
  37359. // should be the global object. If the exploded expression has
  37360. // become a MemberExpression (e.g. a context property, probably a
  37361. // temporary variable), then we need to force it to be unqualified
  37362. // by using the (0, object.property)(...) trick; otherwise, it
  37363. // will receive the object of the MemberExpression as its `this`
  37364. // object.
  37365. newCallee = t.sequenceExpression([t.numericLiteral(0), newCallee]);
  37366. }
  37367. }
  37368. argsPath.forEach(function (argPath) {
  37369. newArgs.push(explodeViaTempVar(null, argPath));
  37370. });
  37371. return finish(t.callExpression(newCallee, newArgs));
  37372. case "NewExpression":
  37373. return finish(t.newExpression(explodeViaTempVar(null, path.get("callee")), path.get("arguments").map(function (argPath) {
  37374. return explodeViaTempVar(null, argPath);
  37375. })));
  37376. case "ObjectExpression":
  37377. return finish(t.objectExpression(path.get("properties").map(function (propPath) {
  37378. if (propPath.isObjectProperty()) {
  37379. return t.objectProperty(propPath.node.key, explodeViaTempVar(null, propPath.get("value")), propPath.node.computed);
  37380. } else {
  37381. return propPath.node;
  37382. }
  37383. })));
  37384. case "ArrayExpression":
  37385. return finish(t.arrayExpression(path.get("elements").map(function (elemPath) {
  37386. return explodeViaTempVar(null, elemPath);
  37387. })));
  37388. case "SequenceExpression":
  37389. var lastIndex = expr.expressions.length - 1;
  37390. path.get("expressions").forEach(function (exprPath) {
  37391. if (exprPath.key === lastIndex) {
  37392. result = self.explodeExpression(exprPath, ignoreResult);
  37393. } else {
  37394. self.explodeExpression(exprPath, true);
  37395. }
  37396. });
  37397. return result;
  37398. case "LogicalExpression":
  37399. after = loc();
  37400. if (!ignoreResult) {
  37401. result = self.makeTempVar();
  37402. }
  37403. var left = explodeViaTempVar(result, path.get("left"));
  37404. if (expr.operator === "&&") {
  37405. self.jumpIfNot(left, after);
  37406. } else {
  37407. _assert2.default.strictEqual(expr.operator, "||");
  37408. self.jumpIf(left, after);
  37409. }
  37410. explodeViaTempVar(result, path.get("right"), ignoreResult);
  37411. self.mark(after);
  37412. return result;
  37413. case "ConditionalExpression":
  37414. var elseLoc = loc();
  37415. after = loc();
  37416. var test = self.explodeExpression(path.get("test"));
  37417. self.jumpIfNot(test, elseLoc);
  37418. if (!ignoreResult) {
  37419. result = self.makeTempVar();
  37420. }
  37421. explodeViaTempVar(result, path.get("consequent"), ignoreResult);
  37422. self.jump(after);
  37423. self.mark(elseLoc);
  37424. explodeViaTempVar(result, path.get("alternate"), ignoreResult);
  37425. self.mark(after);
  37426. return result;
  37427. case "UnaryExpression":
  37428. return finish(t.unaryExpression(expr.operator,
  37429. // Can't (and don't need to) break up the syntax of the argument.
  37430. // Think about delete a[b].
  37431. self.explodeExpression(path.get("argument")), !!expr.prefix));
  37432. case "BinaryExpression":
  37433. return finish(t.binaryExpression(expr.operator, explodeViaTempVar(null, path.get("left")), explodeViaTempVar(null, path.get("right"))));
  37434. case "AssignmentExpression":
  37435. return finish(t.assignmentExpression(expr.operator, self.explodeExpression(path.get("left")), self.explodeExpression(path.get("right"))));
  37436. case "UpdateExpression":
  37437. return finish(t.updateExpression(expr.operator, self.explodeExpression(path.get("argument")), expr.prefix));
  37438. case "YieldExpression":
  37439. after = loc();
  37440. var arg = expr.argument && self.explodeExpression(path.get("argument"));
  37441. if (arg && expr.delegate) {
  37442. var _result = self.makeTempVar();
  37443. self.emit(t.returnStatement(t.callExpression(self.contextProperty("delegateYield"), [arg, t.stringLiteral(_result.property.name), after])));
  37444. self.mark(after);
  37445. return _result;
  37446. }
  37447. self.emitAssign(self.contextProperty("next"), after);
  37448. self.emit(t.returnStatement(arg || null));
  37449. self.mark(after);
  37450. return self.contextProperty("sent");
  37451. default:
  37452. throw new Error("unknown Expression of type " + (0, _stringify2.default)(expr.type));
  37453. }
  37454. };
  37455. });
  37456. $__System.registerDynamic("1a7", ["11"], true, function ($__require, exports, module) {
  37457. "use strict";
  37458. var global = this || self,
  37459. GLOBAL = global;
  37460. exports.__esModule = true;
  37461. exports.default = replaceShorthandObjectMethod;
  37462. var _babelTypes = $__require("11");
  37463. var t = _interopRequireWildcard(_babelTypes);
  37464. function _interopRequireWildcard(obj) {
  37465. if (obj && obj.__esModule) {
  37466. return obj;
  37467. } else {
  37468. var newObj = {};if (obj != null) {
  37469. for (var key in obj) {
  37470. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  37471. }
  37472. }newObj.default = obj;return newObj;
  37473. }
  37474. }
  37475. // this function converts a shorthand object generator method into a normal
  37476. // (non-shorthand) object property which is a generator function expression. for
  37477. // example, this:
  37478. //
  37479. // var foo = {
  37480. // *bar(baz) { return 5; }
  37481. // }
  37482. //
  37483. // should be replaced with:
  37484. //
  37485. // var foo = {
  37486. // bar: function*(baz) { return 5; }
  37487. // }
  37488. //
  37489. // to do this, it clones the parameter array and the body of the object generator
  37490. // method into a new FunctionExpression.
  37491. //
  37492. // this method can be passed any Function AST node path, and it will return
  37493. // either:
  37494. // a) the path that was passed in (iff the path did not need to be replaced) or
  37495. // b) the path of the new FunctionExpression that was created as a replacement
  37496. // (iff the path did need to be replaced)
  37497. //
  37498. // In either case, though, the caller can count on the fact that the return value
  37499. // is a Function AST node path.
  37500. //
  37501. // If this function is called with an AST node path that is not a Function (or with an
  37502. // argument that isn't an AST node path), it will throw an error.
  37503. function replaceShorthandObjectMethod(path) {
  37504. if (!path.node || !t.isFunction(path.node)) {
  37505. throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.");
  37506. }
  37507. // this function only replaces shorthand object methods (called ObjectMethod
  37508. // in Babel-speak).
  37509. if (!t.isObjectMethod(path.node)) {
  37510. return path;
  37511. }
  37512. // this function only replaces generators.
  37513. if (!path.node.generator) {
  37514. return path;
  37515. }
  37516. var parameters = path.node.params.map(function (param) {
  37517. return t.cloneDeep(param);
  37518. });
  37519. var functionExpression = t.functionExpression(null, // id
  37520. parameters, // params
  37521. t.cloneDeep(path.node.body), // body
  37522. path.node.generator, path.node.async);
  37523. path.replaceWith(t.objectProperty(t.cloneDeep(path.node.key), // key
  37524. functionExpression, //value
  37525. path.node.computed, // computed
  37526. false // shorthand
  37527. ));
  37528. // path now refers to the ObjectProperty AST node path, but we want to return a
  37529. // Function AST node path for the function expression we created. we know that
  37530. // the FunctionExpression we just created is the value of the ObjectProperty,
  37531. // so return the "value" path off of this path.
  37532. return path.get("value");
  37533. }
  37534. });
  37535. $__System.registerDynamic('1a8', ['1a9', '37', 'c'], true, function ($__require, exports, module) {
  37536. var process = $__require('c');
  37537. var global = this || self,
  37538. GLOBAL = global;
  37539. $__require('1a9');
  37540. module.exports = $__require('37').Object.getOwnPropertySymbols;
  37541. });
  37542. $__System.registerDynamic("1aa", ["1a8"], true, function ($__require, exports, module) {
  37543. var global = this || self,
  37544. GLOBAL = global;
  37545. module.exports = { "default": $__require("1a8"), __esModule: true };
  37546. });
  37547. $__System.registerDynamic('1ab', ['c6', '37', '18f', 'c'], true, function ($__require, exports, module) {
  37548. var process = $__require('c');
  37549. var global = this || self,
  37550. GLOBAL = global;
  37551. // most Object methods by ES6 should accept primitives
  37552. var $export = $__require('c6'),
  37553. core = $__require('37'),
  37554. fails = $__require('18f');
  37555. module.exports = function (KEY, exec) {
  37556. var fn = (core.Object || {})[KEY] || Object[KEY],
  37557. exp = {};
  37558. exp[KEY] = exec(fn);
  37559. $export($export.S + $export.F * fails(function () {
  37560. fn(1);
  37561. }), 'Object', exp);
  37562. };
  37563. });
  37564. $__System.registerDynamic('1ac', ['18d', '18a', '1ab', 'c'], true, function ($__require, exports, module) {
  37565. var process = $__require('c');
  37566. var global = this || self,
  37567. GLOBAL = global;
  37568. // 19.1.2.14 Object.keys(O)
  37569. var toObject = $__require('18d'),
  37570. $keys = $__require('18a');
  37571. $__require('1ab')('keys', function () {
  37572. return function keys(it) {
  37573. return $keys(toObject(it));
  37574. };
  37575. });
  37576. });
  37577. $__System.registerDynamic('1ad', ['1ac', '37', 'c'], true, function ($__require, exports, module) {
  37578. var process = $__require('c');
  37579. var global = this || self,
  37580. GLOBAL = global;
  37581. $__require('1ac');
  37582. module.exports = $__require('37').Object.keys;
  37583. });
  37584. $__System.registerDynamic("15", ["1ad"], true, function ($__require, exports, module) {
  37585. var global = this || self,
  37586. GLOBAL = global;
  37587. module.exports = { "default": $__require("1ad"), __esModule: true };
  37588. });
  37589. $__System.registerDynamic('1ae', ['c6', '168', 'c'], true, function ($__require, exports, module) {
  37590. var process = $__require('c');
  37591. var global = this || self,
  37592. GLOBAL = global;
  37593. var $export = $__require('c6');
  37594. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  37595. $export($export.S, 'Object', { create: $__require('168') });
  37596. });
  37597. $__System.registerDynamic('1af', ['1ae', '37', 'c'], true, function ($__require, exports, module) {
  37598. var process = $__require('c');
  37599. var global = this || self,
  37600. GLOBAL = global;
  37601. $__require('1ae');
  37602. var $Object = $__require('37').Object;
  37603. module.exports = function create(P, D) {
  37604. return $Object.create(P, D);
  37605. };
  37606. });
  37607. $__System.registerDynamic("d4", ["1af"], true, function ($__require, exports, module) {
  37608. var global = this || self,
  37609. GLOBAL = global;
  37610. module.exports = { "default": $__require("1af"), __esModule: true };
  37611. });
  37612. $__System.registerDynamic("1b0", ["d4", "11"], true, function ($__require, exports, module) {
  37613. "use strict";
  37614. var global = this || self,
  37615. GLOBAL = global;
  37616. exports.__esModule = true;
  37617. var _create = $__require("d4");
  37618. var _create2 = _interopRequireDefault(_create);
  37619. exports.getBindingIdentifiers = getBindingIdentifiers;
  37620. exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
  37621. var _index = $__require("11");
  37622. var t = _interopRequireWildcard(_index);
  37623. function _interopRequireWildcard(obj) {
  37624. if (obj && obj.__esModule) {
  37625. return obj;
  37626. } else {
  37627. var newObj = {};if (obj != null) {
  37628. for (var key in obj) {
  37629. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  37630. }
  37631. }newObj.default = obj;return newObj;
  37632. }
  37633. }
  37634. function _interopRequireDefault(obj) {
  37635. return obj && obj.__esModule ? obj : { default: obj };
  37636. }
  37637. function getBindingIdentifiers(node, duplicates, outerOnly) {
  37638. var search = [].concat(node);
  37639. var ids = (0, _create2.default)(null);
  37640. while (search.length) {
  37641. var id = search.shift();
  37642. if (!id) continue;
  37643. var keys = t.getBindingIdentifiers.keys[id.type];
  37644. if (t.isIdentifier(id)) {
  37645. if (duplicates) {
  37646. var _ids = ids[id.name] = ids[id.name] || [];
  37647. _ids.push(id);
  37648. } else {
  37649. ids[id.name] = id;
  37650. }
  37651. continue;
  37652. }
  37653. if (t.isExportDeclaration(id)) {
  37654. if (t.isDeclaration(id.declaration)) {
  37655. search.push(id.declaration);
  37656. }
  37657. continue;
  37658. }
  37659. if (outerOnly) {
  37660. if (t.isFunctionDeclaration(id)) {
  37661. search.push(id.id);
  37662. continue;
  37663. }
  37664. if (t.isFunctionExpression(id)) {
  37665. continue;
  37666. }
  37667. }
  37668. if (keys) {
  37669. for (var i = 0; i < keys.length; i++) {
  37670. var key = keys[i];
  37671. if (id[key]) {
  37672. search = search.concat(id[key]);
  37673. }
  37674. }
  37675. }
  37676. }
  37677. return ids;
  37678. }
  37679. getBindingIdentifiers.keys = {
  37680. DeclareClass: ["id"],
  37681. DeclareFunction: ["id"],
  37682. DeclareModule: ["id"],
  37683. DeclareVariable: ["id"],
  37684. InterfaceDeclaration: ["id"],
  37685. TypeAlias: ["id"],
  37686. CatchClause: ["param"],
  37687. LabeledStatement: ["label"],
  37688. UnaryExpression: ["argument"],
  37689. AssignmentExpression: ["left"],
  37690. ImportSpecifier: ["local"],
  37691. ImportNamespaceSpecifier: ["local"],
  37692. ImportDefaultSpecifier: ["local"],
  37693. ImportDeclaration: ["specifiers"],
  37694. ExportSpecifier: ["exported"],
  37695. ExportNamespaceSpecifier: ["exported"],
  37696. ExportDefaultSpecifier: ["exported"],
  37697. FunctionDeclaration: ["id", "params"],
  37698. FunctionExpression: ["id", "params"],
  37699. ClassDeclaration: ["id"],
  37700. ClassExpression: ["id"],
  37701. RestElement: ["argument"],
  37702. UpdateExpression: ["argument"],
  37703. RestProperty: ["argument"],
  37704. ObjectProperty: ["value"],
  37705. AssignmentPattern: ["left"],
  37706. ArrayPattern: ["elements"],
  37707. ObjectPattern: ["properties"],
  37708. VariableDeclaration: ["declarations"],
  37709. VariableDeclarator: ["id"]
  37710. };
  37711. function getOuterBindingIdentifiers(node, duplicates) {
  37712. return getBindingIdentifiers(node, duplicates, true);
  37713. }
  37714. });
  37715. $__System.registerDynamic('1b1', [], true, function ($__require, exports, module) {
  37716. var global = this || self,
  37717. GLOBAL = global;
  37718. /*
  37719. Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
  37720. Redistribution and use in source and binary forms, with or without
  37721. modification, are permitted provided that the following conditions are met:
  37722. * Redistributions of source code must retain the above copyright
  37723. notice, this list of conditions and the following disclaimer.
  37724. * Redistributions in binary form must reproduce the above copyright
  37725. notice, this list of conditions and the following disclaimer in the
  37726. documentation and/or other materials provided with the distribution.
  37727. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
  37728. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  37729. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  37730. ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  37731. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  37732. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  37733. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  37734. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37735. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  37736. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37737. */
  37738. (function () {
  37739. 'use strict';
  37740. function isExpression(node) {
  37741. if (node == null) {
  37742. return false;
  37743. }
  37744. switch (node.type) {
  37745. case 'ArrayExpression':
  37746. case 'AssignmentExpression':
  37747. case 'BinaryExpression':
  37748. case 'CallExpression':
  37749. case 'ConditionalExpression':
  37750. case 'FunctionExpression':
  37751. case 'Identifier':
  37752. case 'Literal':
  37753. case 'LogicalExpression':
  37754. case 'MemberExpression':
  37755. case 'NewExpression':
  37756. case 'ObjectExpression':
  37757. case 'SequenceExpression':
  37758. case 'ThisExpression':
  37759. case 'UnaryExpression':
  37760. case 'UpdateExpression':
  37761. return true;
  37762. }
  37763. return false;
  37764. }
  37765. function isIterationStatement(node) {
  37766. if (node == null) {
  37767. return false;
  37768. }
  37769. switch (node.type) {
  37770. case 'DoWhileStatement':
  37771. case 'ForInStatement':
  37772. case 'ForStatement':
  37773. case 'WhileStatement':
  37774. return true;
  37775. }
  37776. return false;
  37777. }
  37778. function isStatement(node) {
  37779. if (node == null) {
  37780. return false;
  37781. }
  37782. switch (node.type) {
  37783. case 'BlockStatement':
  37784. case 'BreakStatement':
  37785. case 'ContinueStatement':
  37786. case 'DebuggerStatement':
  37787. case 'DoWhileStatement':
  37788. case 'EmptyStatement':
  37789. case 'ExpressionStatement':
  37790. case 'ForInStatement':
  37791. case 'ForStatement':
  37792. case 'IfStatement':
  37793. case 'LabeledStatement':
  37794. case 'ReturnStatement':
  37795. case 'SwitchStatement':
  37796. case 'ThrowStatement':
  37797. case 'TryStatement':
  37798. case 'VariableDeclaration':
  37799. case 'WhileStatement':
  37800. case 'WithStatement':
  37801. return true;
  37802. }
  37803. return false;
  37804. }
  37805. function isSourceElement(node) {
  37806. return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
  37807. }
  37808. function trailingStatement(node) {
  37809. switch (node.type) {
  37810. case 'IfStatement':
  37811. if (node.alternate != null) {
  37812. return node.alternate;
  37813. }
  37814. return node.consequent;
  37815. case 'LabeledStatement':
  37816. case 'ForStatement':
  37817. case 'ForInStatement':
  37818. case 'WhileStatement':
  37819. case 'WithStatement':
  37820. return node.body;
  37821. }
  37822. return null;
  37823. }
  37824. function isProblematicIfStatement(node) {
  37825. var current;
  37826. if (node.type !== 'IfStatement') {
  37827. return false;
  37828. }
  37829. if (node.alternate == null) {
  37830. return false;
  37831. }
  37832. current = node.consequent;
  37833. do {
  37834. if (current.type === 'IfStatement') {
  37835. if (current.alternate == null) {
  37836. return true;
  37837. }
  37838. }
  37839. current = trailingStatement(current);
  37840. } while (current);
  37841. return false;
  37842. }
  37843. module.exports = {
  37844. isExpression: isExpression,
  37845. isStatement: isStatement,
  37846. isIterationStatement: isIterationStatement,
  37847. isSourceElement: isSourceElement,
  37848. isProblematicIfStatement: isProblematicIfStatement,
  37849. trailingStatement: trailingStatement
  37850. };
  37851. })();
  37852. /* vim: set sw=4 ts=4 et tw=80 : */
  37853. });
  37854. $__System.registerDynamic('1b2', [], true, function ($__require, exports, module) {
  37855. var global = this || self,
  37856. GLOBAL = global;
  37857. /*
  37858. Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
  37859. Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
  37860. Redistribution and use in source and binary forms, with or without
  37861. modification, are permitted provided that the following conditions are met:
  37862. * Redistributions of source code must retain the above copyright
  37863. notice, this list of conditions and the following disclaimer.
  37864. * Redistributions in binary form must reproduce the above copyright
  37865. notice, this list of conditions and the following disclaimer in the
  37866. documentation and/or other materials provided with the distribution.
  37867. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  37868. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  37869. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  37870. ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  37871. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  37872. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  37873. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  37874. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37875. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  37876. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37877. */
  37878. (function () {
  37879. 'use strict';
  37880. var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
  37881. // See `tools/generate-identifier-regex.js`.
  37882. ES5Regex = {
  37883. // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart:
  37884. NonAsciiIdentifierStart: /[\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\u08A0-\u08B2\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\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\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\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\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-\u13F4\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-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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]/,
  37885. // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart:
  37886. NonAsciiIdentifierPart: /[\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\u08A0-\u08B2\u08E4-\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\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\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\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\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\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\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-\u13F4\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\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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]/
  37887. };
  37888. ES6Regex = {
  37889. // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart:
  37890. NonAsciiIdentifierStart: /[\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\u08A0-\u08B2\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\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\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\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\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-\u13F4\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-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\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\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\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\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]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\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]|\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]|\uD87E[\uDC00-\uDE1D]/,
  37891. // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart:
  37892. NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\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\u08A0-\u08B2\u08E4-\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\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\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\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\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\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\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\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\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-\u19DA\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\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\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-\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\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\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-\uAB5F\uAB64\uAB65\uABC0-\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-\uFE2D\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\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\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\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]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\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]|\uD82C[\uDC00\uDC01]|\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]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
  37893. };
  37894. function isDecimalDigit(ch) {
  37895. return 0x30 <= ch && ch <= 0x39; // 0..9
  37896. }
  37897. function isHexDigit(ch) {
  37898. return 0x30 <= ch && ch <= 0x39 || // 0..9
  37899. 0x61 <= ch && ch <= 0x66 || // a..f
  37900. 0x41 <= ch && ch <= 0x46; // A..F
  37901. }
  37902. function isOctalDigit(ch) {
  37903. return ch >= 0x30 && ch <= 0x37; // 0..7
  37904. }
  37905. // 7.2 White Space
  37906. NON_ASCII_WHITESPACES = [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF];
  37907. function isWhiteSpace(ch) {
  37908. return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
  37909. }
  37910. // 7.3 Line Terminators
  37911. function isLineTerminator(ch) {
  37912. return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
  37913. }
  37914. // 7.6 Identifier Names and Identifiers
  37915. function fromCodePoint(cp) {
  37916. if (cp <= 0xFFFF) {
  37917. return String.fromCharCode(cp);
  37918. }
  37919. var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
  37920. var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00);
  37921. return cu1 + cu2;
  37922. }
  37923. IDENTIFIER_START = new Array(0x80);
  37924. for (ch = 0; ch < 0x80; ++ch) {
  37925. IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
  37926. ch >= 0x41 && ch <= 0x5A || // A..Z
  37927. ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
  37928. }
  37929. IDENTIFIER_PART = new Array(0x80);
  37930. for (ch = 0; ch < 0x80; ++ch) {
  37931. IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || // a..z
  37932. ch >= 0x41 && ch <= 0x5A || // A..Z
  37933. ch >= 0x30 && ch <= 0x39 || // 0..9
  37934. ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
  37935. }
  37936. function isIdentifierStartES5(ch) {
  37937. return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
  37938. }
  37939. function isIdentifierPartES5(ch) {
  37940. return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
  37941. }
  37942. function isIdentifierStartES6(ch) {
  37943. return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
  37944. }
  37945. function isIdentifierPartES6(ch) {
  37946. return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
  37947. }
  37948. module.exports = {
  37949. isDecimalDigit: isDecimalDigit,
  37950. isHexDigit: isHexDigit,
  37951. isOctalDigit: isOctalDigit,
  37952. isWhiteSpace: isWhiteSpace,
  37953. isLineTerminator: isLineTerminator,
  37954. isIdentifierStartES5: isIdentifierStartES5,
  37955. isIdentifierPartES5: isIdentifierPartES5,
  37956. isIdentifierStartES6: isIdentifierStartES6,
  37957. isIdentifierPartES6: isIdentifierPartES6
  37958. };
  37959. })();
  37960. /* vim: set sw=4 ts=4 et tw=80 : */
  37961. });
  37962. $__System.registerDynamic('1b3', ['1b2'], true, function ($__require, exports, module) {
  37963. var global = this || self,
  37964. GLOBAL = global;
  37965. /*
  37966. Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
  37967. Redistribution and use in source and binary forms, with or without
  37968. modification, are permitted provided that the following conditions are met:
  37969. * Redistributions of source code must retain the above copyright
  37970. notice, this list of conditions and the following disclaimer.
  37971. * Redistributions in binary form must reproduce the above copyright
  37972. notice, this list of conditions and the following disclaimer in the
  37973. documentation and/or other materials provided with the distribution.
  37974. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  37975. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  37976. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  37977. ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  37978. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  37979. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  37980. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  37981. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37982. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  37983. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37984. */
  37985. (function () {
  37986. 'use strict';
  37987. var code = $__require('1b2');
  37988. function isStrictModeReservedWordES6(id) {
  37989. switch (id) {
  37990. case 'implements':
  37991. case 'interface':
  37992. case 'package':
  37993. case 'private':
  37994. case 'protected':
  37995. case 'public':
  37996. case 'static':
  37997. case 'let':
  37998. return true;
  37999. default:
  38000. return false;
  38001. }
  38002. }
  38003. function isKeywordES5(id, strict) {
  38004. // yield should not be treated as keyword under non-strict mode.
  38005. if (!strict && id === 'yield') {
  38006. return false;
  38007. }
  38008. return isKeywordES6(id, strict);
  38009. }
  38010. function isKeywordES6(id, strict) {
  38011. if (strict && isStrictModeReservedWordES6(id)) {
  38012. return true;
  38013. }
  38014. switch (id.length) {
  38015. case 2:
  38016. return id === 'if' || id === 'in' || id === 'do';
  38017. case 3:
  38018. return id === 'var' || id === 'for' || id === 'new' || id === 'try';
  38019. case 4:
  38020. return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum';
  38021. case 5:
  38022. return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super';
  38023. case 6:
  38024. return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import';
  38025. case 7:
  38026. return id === 'default' || id === 'finally' || id === 'extends';
  38027. case 8:
  38028. return id === 'function' || id === 'continue' || id === 'debugger';
  38029. case 10:
  38030. return id === 'instanceof';
  38031. default:
  38032. return false;
  38033. }
  38034. }
  38035. function isReservedWordES5(id, strict) {
  38036. return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
  38037. }
  38038. function isReservedWordES6(id, strict) {
  38039. return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
  38040. }
  38041. function isRestrictedWord(id) {
  38042. return id === 'eval' || id === 'arguments';
  38043. }
  38044. function isIdentifierNameES5(id) {
  38045. var i, iz, ch;
  38046. if (id.length === 0) {
  38047. return false;
  38048. }
  38049. ch = id.charCodeAt(0);
  38050. if (!code.isIdentifierStartES5(ch)) {
  38051. return false;
  38052. }
  38053. for (i = 1, iz = id.length; i < iz; ++i) {
  38054. ch = id.charCodeAt(i);
  38055. if (!code.isIdentifierPartES5(ch)) {
  38056. return false;
  38057. }
  38058. }
  38059. return true;
  38060. }
  38061. function decodeUtf16(lead, trail) {
  38062. return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
  38063. }
  38064. function isIdentifierNameES6(id) {
  38065. var i, iz, ch, lowCh, check;
  38066. if (id.length === 0) {
  38067. return false;
  38068. }
  38069. check = code.isIdentifierStartES6;
  38070. for (i = 0, iz = id.length; i < iz; ++i) {
  38071. ch = id.charCodeAt(i);
  38072. if (0xD800 <= ch && ch <= 0xDBFF) {
  38073. ++i;
  38074. if (i >= iz) {
  38075. return false;
  38076. }
  38077. lowCh = id.charCodeAt(i);
  38078. if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
  38079. return false;
  38080. }
  38081. ch = decodeUtf16(ch, lowCh);
  38082. }
  38083. if (!check(ch)) {
  38084. return false;
  38085. }
  38086. check = code.isIdentifierPartES6;
  38087. }
  38088. return true;
  38089. }
  38090. function isIdentifierES5(id, strict) {
  38091. return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
  38092. }
  38093. function isIdentifierES6(id, strict) {
  38094. return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
  38095. }
  38096. module.exports = {
  38097. isKeywordES5: isKeywordES5,
  38098. isKeywordES6: isKeywordES6,
  38099. isReservedWordES5: isReservedWordES5,
  38100. isReservedWordES6: isReservedWordES6,
  38101. isRestrictedWord: isRestrictedWord,
  38102. isIdentifierNameES5: isIdentifierNameES5,
  38103. isIdentifierNameES6: isIdentifierNameES6,
  38104. isIdentifierES5: isIdentifierES5,
  38105. isIdentifierES6: isIdentifierES6
  38106. };
  38107. })();
  38108. /* vim: set sw=4 ts=4 et tw=80 : */
  38109. });
  38110. $__System.registerDynamic('ff', ['1b1', '1b2', '1b3'], true, function ($__require, exports, module) {
  38111. var global = this || self,
  38112. GLOBAL = global;
  38113. /*
  38114. Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
  38115. Redistribution and use in source and binary forms, with or without
  38116. modification, are permitted provided that the following conditions are met:
  38117. * Redistributions of source code must retain the above copyright
  38118. notice, this list of conditions and the following disclaimer.
  38119. * Redistributions in binary form must reproduce the above copyright
  38120. notice, this list of conditions and the following disclaimer in the
  38121. documentation and/or other materials provided with the distribution.
  38122. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  38123. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  38124. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  38125. ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  38126. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  38127. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  38128. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  38129. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  38130. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  38131. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38132. */
  38133. (function () {
  38134. 'use strict';
  38135. exports.ast = $__require('1b1');
  38136. exports.code = $__require('1b2');
  38137. exports.keyword = $__require('1b3');
  38138. })();
  38139. /* vim: set sw=4 ts=4 et tw=80 : */
  38140. });
  38141. $__System.registerDynamic("1b4", ["15", "30", "17", "1b0", "ff", "11", "1b5"], true, function ($__require, exports, module) {
  38142. "use strict";
  38143. var global = this || self,
  38144. GLOBAL = global;
  38145. exports.__esModule = true;
  38146. var _keys = $__require("15");
  38147. var _keys2 = _interopRequireDefault(_keys);
  38148. var _typeof2 = $__require("30");
  38149. var _typeof3 = _interopRequireDefault(_typeof2);
  38150. var _getIterator2 = $__require("17");
  38151. var _getIterator3 = _interopRequireDefault(_getIterator2);
  38152. exports.isBinding = isBinding;
  38153. exports.isReferenced = isReferenced;
  38154. exports.isValidIdentifier = isValidIdentifier;
  38155. exports.isLet = isLet;
  38156. exports.isBlockScoped = isBlockScoped;
  38157. exports.isVar = isVar;
  38158. exports.isSpecifierDefault = isSpecifierDefault;
  38159. exports.isScope = isScope;
  38160. exports.isImmutable = isImmutable;
  38161. exports.isNodesEquivalent = isNodesEquivalent;
  38162. var _retrievers = $__require("1b0");
  38163. var _esutils = $__require("ff");
  38164. var _esutils2 = _interopRequireDefault(_esutils);
  38165. var _index = $__require("11");
  38166. var t = _interopRequireWildcard(_index);
  38167. var _constants = $__require("1b5");
  38168. function _interopRequireWildcard(obj) {
  38169. if (obj && obj.__esModule) {
  38170. return obj;
  38171. } else {
  38172. var newObj = {};if (obj != null) {
  38173. for (var key in obj) {
  38174. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  38175. }
  38176. }newObj.default = obj;return newObj;
  38177. }
  38178. }
  38179. function _interopRequireDefault(obj) {
  38180. return obj && obj.__esModule ? obj : { default: obj };
  38181. }
  38182. function isBinding(node, parent) {
  38183. var keys = _retrievers.getBindingIdentifiers.keys[parent.type];
  38184. if (keys) {
  38185. for (var i = 0; i < keys.length; i++) {
  38186. var key = keys[i];
  38187. var val = parent[key];
  38188. if (Array.isArray(val)) {
  38189. if (val.indexOf(node) >= 0) return true;
  38190. } else {
  38191. if (val === node) return true;
  38192. }
  38193. }
  38194. }
  38195. return false;
  38196. }
  38197. function isReferenced(node, parent) {
  38198. switch (parent.type) {
  38199. case "BindExpression":
  38200. return parent.object === node || parent.callee === node;
  38201. case "MemberExpression":
  38202. case "JSXMemberExpression":
  38203. if (parent.property === node && parent.computed) {
  38204. return true;
  38205. } else if (parent.object === node) {
  38206. return true;
  38207. } else {
  38208. return false;
  38209. }
  38210. case "MetaProperty":
  38211. return false;
  38212. case "ObjectProperty":
  38213. if (parent.key === node) {
  38214. return parent.computed;
  38215. }
  38216. case "VariableDeclarator":
  38217. return parent.id !== node;
  38218. case "ArrowFunctionExpression":
  38219. case "FunctionDeclaration":
  38220. case "FunctionExpression":
  38221. for (var _iterator = parent.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  38222. var _ref;
  38223. if (_isArray) {
  38224. if (_i >= _iterator.length) break;
  38225. _ref = _iterator[_i++];
  38226. } else {
  38227. _i = _iterator.next();
  38228. if (_i.done) break;
  38229. _ref = _i.value;
  38230. }
  38231. var param = _ref;
  38232. if (param === node) return false;
  38233. }
  38234. return parent.id !== node;
  38235. case "ExportSpecifier":
  38236. if (parent.source) {
  38237. return false;
  38238. } else {
  38239. return parent.local === node;
  38240. }
  38241. case "ExportNamespaceSpecifier":
  38242. case "ExportDefaultSpecifier":
  38243. return false;
  38244. case "JSXAttribute":
  38245. return parent.name !== node;
  38246. case "ClassProperty":
  38247. if (parent.key === node) {
  38248. return parent.computed;
  38249. } else {
  38250. return parent.value === node;
  38251. }
  38252. case "ImportDefaultSpecifier":
  38253. case "ImportNamespaceSpecifier":
  38254. case "ImportSpecifier":
  38255. return false;
  38256. case "ClassDeclaration":
  38257. case "ClassExpression":
  38258. return parent.id !== node;
  38259. case "ClassMethod":
  38260. case "ObjectMethod":
  38261. return parent.key === node && parent.computed;
  38262. case "LabeledStatement":
  38263. return false;
  38264. case "CatchClause":
  38265. return parent.param !== node;
  38266. case "RestElement":
  38267. return false;
  38268. case "AssignmentExpression":
  38269. return parent.right === node;
  38270. case "AssignmentPattern":
  38271. return parent.right === node;
  38272. case "ObjectPattern":
  38273. case "ArrayPattern":
  38274. return false;
  38275. }
  38276. return true;
  38277. }
  38278. function isValidIdentifier(name) {
  38279. if (typeof name !== "string" || _esutils2.default.keyword.isReservedWordES6(name, true)) {
  38280. return false;
  38281. } else if (name === "await") {
  38282. return false;
  38283. } else {
  38284. return _esutils2.default.keyword.isIdentifierNameES6(name);
  38285. }
  38286. }
  38287. function isLet(node) {
  38288. return t.isVariableDeclaration(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
  38289. }
  38290. function isBlockScoped(node) {
  38291. return t.isFunctionDeclaration(node) || t.isClassDeclaration(node) || t.isLet(node);
  38292. }
  38293. function isVar(node) {
  38294. return t.isVariableDeclaration(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
  38295. }
  38296. function isSpecifierDefault(specifier) {
  38297. return t.isImportDefaultSpecifier(specifier) || t.isIdentifier(specifier.imported || specifier.exported, { name: "default" });
  38298. }
  38299. function isScope(node, parent) {
  38300. if (t.isBlockStatement(node) && t.isFunction(parent, { body: node })) {
  38301. return false;
  38302. }
  38303. return t.isScopable(node);
  38304. }
  38305. function isImmutable(node) {
  38306. if (t.isType(node.type, "Immutable")) return true;
  38307. if (t.isIdentifier(node)) {
  38308. if (node.name === "undefined") {
  38309. return true;
  38310. } else {
  38311. return false;
  38312. }
  38313. }
  38314. return false;
  38315. }
  38316. function isNodesEquivalent(a, b) {
  38317. if ((typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || (typeof a === "undefined" ? "undefined" : (0, _typeof3.default)(a)) !== "object" || a == null || b == null) {
  38318. return a === b;
  38319. }
  38320. if (a.type !== b.type) {
  38321. return false;
  38322. }
  38323. var fields = (0, _keys2.default)(t.NODE_FIELDS[a.type] || a.type);
  38324. for (var _iterator2 = fields, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  38325. var _ref2;
  38326. if (_isArray2) {
  38327. if (_i2 >= _iterator2.length) break;
  38328. _ref2 = _iterator2[_i2++];
  38329. } else {
  38330. _i2 = _iterator2.next();
  38331. if (_i2.done) break;
  38332. _ref2 = _i2.value;
  38333. }
  38334. var field = _ref2;
  38335. if ((0, _typeof3.default)(a[field]) !== (0, _typeof3.default)(b[field])) {
  38336. return false;
  38337. }
  38338. if (Array.isArray(a[field])) {
  38339. if (!Array.isArray(b[field])) {
  38340. return false;
  38341. }
  38342. if (a[field].length !== b[field].length) {
  38343. return false;
  38344. }
  38345. for (var i = 0; i < a[field].length; i++) {
  38346. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  38347. return false;
  38348. }
  38349. }
  38350. continue;
  38351. }
  38352. if (!isNodesEquivalent(a[field], b[field])) {
  38353. return false;
  38354. }
  38355. }
  38356. return true;
  38357. }
  38358. });
  38359. $__System.registerDynamic('1b6', ['c6', 'c'], true, function ($__require, exports, module) {
  38360. var process = $__require('c');
  38361. var global = this || self,
  38362. GLOBAL = global;
  38363. // 20.1.2.6 Number.MAX_SAFE_INTEGER
  38364. var $export = $__require('c6');
  38365. $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
  38366. });
  38367. $__System.registerDynamic('1b7', ['1b6', 'c'], true, function ($__require, exports, module) {
  38368. var process = $__require('c');
  38369. var global = this || self,
  38370. GLOBAL = global;
  38371. $__require('1b6');
  38372. module.exports = 0x1fffffffffffff;
  38373. });
  38374. $__System.registerDynamic("1b8", ["1b7"], true, function ($__require, exports, module) {
  38375. var global = this || self,
  38376. GLOBAL = global;
  38377. module.exports = { "default": $__require("1b7"), __esModule: true };
  38378. });
  38379. $__System.registerDynamic('bf', ['185', '1b9', '7b'], true, function ($__require, exports, module) {
  38380. var global = this || self,
  38381. GLOBAL = global;
  38382. var baseGetTag = $__require('185'),
  38383. getPrototype = $__require('1b9'),
  38384. isObjectLike = $__require('7b');
  38385. /** `Object#toString` result references. */
  38386. var objectTag = '[object Object]';
  38387. /** Used for built-in method references. */
  38388. var funcProto = Function.prototype,
  38389. objectProto = Object.prototype;
  38390. /** Used to resolve the decompiled source of functions. */
  38391. var funcToString = funcProto.toString;
  38392. /** Used to check objects for own properties. */
  38393. var hasOwnProperty = objectProto.hasOwnProperty;
  38394. /** Used to infer the `Object` constructor. */
  38395. var objectCtorString = funcToString.call(Object);
  38396. /**
  38397. * Checks if `value` is a plain object, that is, an object created by the
  38398. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  38399. *
  38400. * @static
  38401. * @memberOf _
  38402. * @since 0.8.0
  38403. * @category Lang
  38404. * @param {*} value The value to check.
  38405. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  38406. * @example
  38407. *
  38408. * function Foo() {
  38409. * this.a = 1;
  38410. * }
  38411. *
  38412. * _.isPlainObject(new Foo);
  38413. * // => false
  38414. *
  38415. * _.isPlainObject([1, 2, 3]);
  38416. * // => false
  38417. *
  38418. * _.isPlainObject({ 'x': 0, 'y': 0 });
  38419. * // => true
  38420. *
  38421. * _.isPlainObject(Object.create(null));
  38422. * // => true
  38423. */
  38424. function isPlainObject(value) {
  38425. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  38426. return false;
  38427. }
  38428. var proto = getPrototype(value);
  38429. if (proto === null) {
  38430. return true;
  38431. }
  38432. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  38433. return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
  38434. }
  38435. module.exports = isPlainObject;
  38436. });
  38437. $__System.registerDynamic('1ba', ['185', '7b'], true, function ($__require, exports, module) {
  38438. var global = this || self,
  38439. GLOBAL = global;
  38440. var baseGetTag = $__require('185'),
  38441. isObjectLike = $__require('7b');
  38442. /** `Object#toString` result references. */
  38443. var regexpTag = '[object RegExp]';
  38444. /**
  38445. * The base implementation of `_.isRegExp` without Node.js optimizations.
  38446. *
  38447. * @private
  38448. * @param {*} value The value to check.
  38449. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  38450. */
  38451. function baseIsRegExp(value) {
  38452. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  38453. }
  38454. module.exports = baseIsRegExp;
  38455. });
  38456. $__System.registerDynamic('a6', ['1ba', '93', '1bb'], true, function ($__require, exports, module) {
  38457. var global = this || self,
  38458. GLOBAL = global;
  38459. var baseIsRegExp = $__require('1ba'),
  38460. baseUnary = $__require('93'),
  38461. nodeUtil = $__require('1bb');
  38462. /* Node.js helper references. */
  38463. var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
  38464. /**
  38465. * Checks if `value` is classified as a `RegExp` object.
  38466. *
  38467. * @static
  38468. * @memberOf _
  38469. * @since 0.1.0
  38470. * @category Lang
  38471. * @param {*} value The value to check.
  38472. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  38473. * @example
  38474. *
  38475. * _.isRegExp(/abc/);
  38476. * // => true
  38477. *
  38478. * _.isRegExp('/abc/');
  38479. * // => false
  38480. */
  38481. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  38482. module.exports = isRegExp;
  38483. });
  38484. $__System.registerDynamic("1bc", ["1b8", "5b", "17", "bf", "a6", "11"], true, function ($__require, exports, module) {
  38485. "use strict";
  38486. var global = this || self,
  38487. GLOBAL = global;
  38488. exports.__esModule = true;
  38489. var _maxSafeInteger = $__require("1b8");
  38490. var _maxSafeInteger2 = _interopRequireDefault(_maxSafeInteger);
  38491. var _stringify = $__require("5b");
  38492. var _stringify2 = _interopRequireDefault(_stringify);
  38493. var _getIterator2 = $__require("17");
  38494. var _getIterator3 = _interopRequireDefault(_getIterator2);
  38495. exports.toComputedKey = toComputedKey;
  38496. exports.toSequenceExpression = toSequenceExpression;
  38497. exports.toKeyAlias = toKeyAlias;
  38498. exports.toIdentifier = toIdentifier;
  38499. exports.toBindingIdentifierName = toBindingIdentifierName;
  38500. exports.toStatement = toStatement;
  38501. exports.toExpression = toExpression;
  38502. exports.toBlock = toBlock;
  38503. exports.valueToNode = valueToNode;
  38504. var _isPlainObject = $__require("bf");
  38505. var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
  38506. var _isRegExp = $__require("a6");
  38507. var _isRegExp2 = _interopRequireDefault(_isRegExp);
  38508. var _index = $__require("11");
  38509. var t = _interopRequireWildcard(_index);
  38510. function _interopRequireWildcard(obj) {
  38511. if (obj && obj.__esModule) {
  38512. return obj;
  38513. } else {
  38514. var newObj = {};if (obj != null) {
  38515. for (var key in obj) {
  38516. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  38517. }
  38518. }newObj.default = obj;return newObj;
  38519. }
  38520. }
  38521. function _interopRequireDefault(obj) {
  38522. return obj && obj.__esModule ? obj : { default: obj };
  38523. }
  38524. function toComputedKey(node) {
  38525. var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key || node.property;
  38526. if (!node.computed) {
  38527. if (t.isIdentifier(key)) key = t.stringLiteral(key.name);
  38528. }
  38529. return key;
  38530. }
  38531. function toSequenceExpression(nodes, scope) {
  38532. if (!nodes || !nodes.length) return;
  38533. var declars = [];
  38534. var bailed = false;
  38535. var result = convert(nodes);
  38536. if (bailed) return;
  38537. for (var i = 0; i < declars.length; i++) {
  38538. scope.push(declars[i]);
  38539. }
  38540. return result;
  38541. function convert(nodes) {
  38542. var ensureLastUndefined = false;
  38543. var exprs = [];
  38544. for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  38545. var _ref;
  38546. if (_isArray) {
  38547. if (_i >= _iterator.length) break;
  38548. _ref = _iterator[_i++];
  38549. } else {
  38550. _i = _iterator.next();
  38551. if (_i.done) break;
  38552. _ref = _i.value;
  38553. }
  38554. var node = _ref;
  38555. if (t.isExpression(node)) {
  38556. exprs.push(node);
  38557. } else if (t.isExpressionStatement(node)) {
  38558. exprs.push(node.expression);
  38559. } else if (t.isVariableDeclaration(node)) {
  38560. if (node.kind !== "var") return bailed = true;
  38561. for (var _iterator2 = node.declarations, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  38562. var _ref2;
  38563. if (_isArray2) {
  38564. if (_i2 >= _iterator2.length) break;
  38565. _ref2 = _iterator2[_i2++];
  38566. } else {
  38567. _i2 = _iterator2.next();
  38568. if (_i2.done) break;
  38569. _ref2 = _i2.value;
  38570. }
  38571. var declar = _ref2;
  38572. var bindings = t.getBindingIdentifiers(declar);
  38573. for (var key in bindings) {
  38574. declars.push({
  38575. kind: node.kind,
  38576. id: bindings[key]
  38577. });
  38578. }
  38579. if (declar.init) {
  38580. exprs.push(t.assignmentExpression("=", declar.id, declar.init));
  38581. }
  38582. }
  38583. ensureLastUndefined = true;
  38584. continue;
  38585. } else if (t.isIfStatement(node)) {
  38586. var consequent = node.consequent ? convert([node.consequent]) : scope.buildUndefinedNode();
  38587. var alternate = node.alternate ? convert([node.alternate]) : scope.buildUndefinedNode();
  38588. if (!consequent || !alternate) return bailed = true;
  38589. exprs.push(t.conditionalExpression(node.test, consequent, alternate));
  38590. } else if (t.isBlockStatement(node)) {
  38591. exprs.push(convert(node.body));
  38592. } else if (t.isEmptyStatement(node)) {
  38593. ensureLastUndefined = true;
  38594. continue;
  38595. } else {
  38596. return bailed = true;
  38597. }
  38598. ensureLastUndefined = false;
  38599. }
  38600. if (ensureLastUndefined || exprs.length === 0) {
  38601. exprs.push(scope.buildUndefinedNode());
  38602. }
  38603. if (exprs.length === 1) {
  38604. return exprs[0];
  38605. } else {
  38606. return t.sequenceExpression(exprs);
  38607. }
  38608. }
  38609. }
  38610. function toKeyAlias(node) {
  38611. var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : node.key;
  38612. var alias = void 0;
  38613. if (node.kind === "method") {
  38614. return toKeyAlias.increment() + "";
  38615. } else if (t.isIdentifier(key)) {
  38616. alias = key.name;
  38617. } else if (t.isStringLiteral(key)) {
  38618. alias = (0, _stringify2.default)(key.value);
  38619. } else {
  38620. alias = (0, _stringify2.default)(t.removePropertiesDeep(t.cloneDeep(key)));
  38621. }
  38622. if (node.computed) {
  38623. alias = "[" + alias + "]";
  38624. }
  38625. if (node.static) {
  38626. alias = "static:" + alias;
  38627. }
  38628. return alias;
  38629. }
  38630. toKeyAlias.uid = 0;
  38631. toKeyAlias.increment = function () {
  38632. if (toKeyAlias.uid >= _maxSafeInteger2.default) {
  38633. return toKeyAlias.uid = 0;
  38634. } else {
  38635. return toKeyAlias.uid++;
  38636. }
  38637. };
  38638. function toIdentifier(name) {
  38639. name = name + "";
  38640. name = name.replace(/[^a-zA-Z0-9$_]/g, "-");
  38641. name = name.replace(/^[-0-9]+/, "");
  38642. name = name.replace(/[-\s]+(.)?/g, function (match, c) {
  38643. return c ? c.toUpperCase() : "";
  38644. });
  38645. if (!t.isValidIdentifier(name)) {
  38646. name = "_" + name;
  38647. }
  38648. return name || "_";
  38649. }
  38650. function toBindingIdentifierName(name) {
  38651. name = toIdentifier(name);
  38652. if (name === "eval" || name === "arguments") name = "_" + name;
  38653. return name;
  38654. }
  38655. function toStatement(node, ignore) {
  38656. if (t.isStatement(node)) {
  38657. return node;
  38658. }
  38659. var mustHaveId = false;
  38660. var newType = void 0;
  38661. if (t.isClass(node)) {
  38662. mustHaveId = true;
  38663. newType = "ClassDeclaration";
  38664. } else if (t.isFunction(node)) {
  38665. mustHaveId = true;
  38666. newType = "FunctionDeclaration";
  38667. } else if (t.isAssignmentExpression(node)) {
  38668. return t.expressionStatement(node);
  38669. }
  38670. if (mustHaveId && !node.id) {
  38671. newType = false;
  38672. }
  38673. if (!newType) {
  38674. if (ignore) {
  38675. return false;
  38676. } else {
  38677. throw new Error("cannot turn " + node.type + " to a statement");
  38678. }
  38679. }
  38680. node.type = newType;
  38681. return node;
  38682. }
  38683. function toExpression(node) {
  38684. if (t.isExpressionStatement(node)) {
  38685. node = node.expression;
  38686. }
  38687. if (t.isExpression(node)) {
  38688. return node;
  38689. }
  38690. if (t.isClass(node)) {
  38691. node.type = "ClassExpression";
  38692. } else if (t.isFunction(node)) {
  38693. node.type = "FunctionExpression";
  38694. }
  38695. if (!t.isExpression(node)) {
  38696. throw new Error("cannot turn " + node.type + " to an expression");
  38697. }
  38698. return node;
  38699. }
  38700. function toBlock(node, parent) {
  38701. if (t.isBlockStatement(node)) {
  38702. return node;
  38703. }
  38704. if (t.isEmptyStatement(node)) {
  38705. node = [];
  38706. }
  38707. if (!Array.isArray(node)) {
  38708. if (!t.isStatement(node)) {
  38709. if (t.isFunction(parent)) {
  38710. node = t.returnStatement(node);
  38711. } else {
  38712. node = t.expressionStatement(node);
  38713. }
  38714. }
  38715. node = [node];
  38716. }
  38717. return t.blockStatement(node);
  38718. }
  38719. function valueToNode(value) {
  38720. if (value === undefined) {
  38721. return t.identifier("undefined");
  38722. }
  38723. if (value === true || value === false) {
  38724. return t.booleanLiteral(value);
  38725. }
  38726. if (value === null) {
  38727. return t.nullLiteral();
  38728. }
  38729. if (typeof value === "string") {
  38730. return t.stringLiteral(value);
  38731. }
  38732. if (typeof value === "number") {
  38733. return t.numericLiteral(value);
  38734. }
  38735. if ((0, _isRegExp2.default)(value)) {
  38736. var pattern = value.source;
  38737. var flags = value.toString().match(/\/([a-z]+|)$/)[1];
  38738. return t.regExpLiteral(pattern, flags);
  38739. }
  38740. if (Array.isArray(value)) {
  38741. return t.arrayExpression(value.map(t.valueToNode));
  38742. }
  38743. if ((0, _isPlainObject2.default)(value)) {
  38744. var props = [];
  38745. for (var key in value) {
  38746. var nodeKey = void 0;
  38747. if (t.isValidIdentifier(key)) {
  38748. nodeKey = t.identifier(key);
  38749. } else {
  38750. nodeKey = t.stringLiteral(key);
  38751. }
  38752. props.push(t.objectProperty(nodeKey, t.valueToNode(value[key])));
  38753. }
  38754. return t.objectExpression(props);
  38755. }
  38756. throw new Error("don't know how to turn this value into a node");
  38757. }
  38758. });
  38759. $__System.registerDynamic("1bd", ["11"], true, function ($__require, exports, module) {
  38760. "use strict";
  38761. var global = this || self,
  38762. GLOBAL = global;
  38763. exports.__esModule = true;
  38764. exports.createUnionTypeAnnotation = createUnionTypeAnnotation;
  38765. exports.removeTypeDuplicates = removeTypeDuplicates;
  38766. exports.createTypeAnnotationBasedOnTypeof = createTypeAnnotationBasedOnTypeof;
  38767. var _index = $__require("11");
  38768. var t = _interopRequireWildcard(_index);
  38769. function _interopRequireWildcard(obj) {
  38770. if (obj && obj.__esModule) {
  38771. return obj;
  38772. } else {
  38773. var newObj = {};if (obj != null) {
  38774. for (var key in obj) {
  38775. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  38776. }
  38777. }newObj.default = obj;return newObj;
  38778. }
  38779. }
  38780. function createUnionTypeAnnotation(types) {
  38781. var flattened = removeTypeDuplicates(types);
  38782. if (flattened.length === 1) {
  38783. return flattened[0];
  38784. } else {
  38785. return t.unionTypeAnnotation(flattened);
  38786. }
  38787. }
  38788. function removeTypeDuplicates(nodes) {
  38789. var generics = {};
  38790. var bases = {};
  38791. var typeGroups = [];
  38792. var types = [];
  38793. for (var i = 0; i < nodes.length; i++) {
  38794. var node = nodes[i];
  38795. if (!node) continue;
  38796. if (types.indexOf(node) >= 0) {
  38797. continue;
  38798. }
  38799. if (t.isAnyTypeAnnotation(node)) {
  38800. return [node];
  38801. }
  38802. if (t.isFlowBaseAnnotation(node)) {
  38803. bases[node.type] = node;
  38804. continue;
  38805. }
  38806. if (t.isUnionTypeAnnotation(node)) {
  38807. if (typeGroups.indexOf(node.types) < 0) {
  38808. nodes = nodes.concat(node.types);
  38809. typeGroups.push(node.types);
  38810. }
  38811. continue;
  38812. }
  38813. if (t.isGenericTypeAnnotation(node)) {
  38814. var name = node.id.name;
  38815. if (generics[name]) {
  38816. var existing = generics[name];
  38817. if (existing.typeParameters) {
  38818. if (node.typeParameters) {
  38819. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  38820. }
  38821. } else {
  38822. existing = node.typeParameters;
  38823. }
  38824. } else {
  38825. generics[name] = node;
  38826. }
  38827. continue;
  38828. }
  38829. types.push(node);
  38830. }
  38831. for (var type in bases) {
  38832. types.push(bases[type]);
  38833. }
  38834. for (var _name in generics) {
  38835. types.push(generics[_name]);
  38836. }
  38837. return types;
  38838. }
  38839. function createTypeAnnotationBasedOnTypeof(type) {
  38840. if (type === "string") {
  38841. return t.stringTypeAnnotation();
  38842. } else if (type === "number") {
  38843. return t.numberTypeAnnotation();
  38844. } else if (type === "undefined") {
  38845. return t.voidTypeAnnotation();
  38846. } else if (type === "boolean") {
  38847. return t.booleanTypeAnnotation();
  38848. } else if (type === "function") {
  38849. return t.genericTypeAnnotation(t.identifier("Function"));
  38850. } else if (type === "object") {
  38851. return t.genericTypeAnnotation(t.identifier("Object"));
  38852. } else if (type === "symbol") {
  38853. return t.genericTypeAnnotation(t.identifier("Symbol"));
  38854. } else {
  38855. throw new Error("Invalid typeof value");
  38856. }
  38857. }
  38858. });
  38859. $__System.registerDynamic("1be", [], true, function ($__require, exports, module) {
  38860. 'use strict';
  38861. var global = this || self,
  38862. GLOBAL = global;
  38863. module.exports = function toFastproperties(o) {
  38864. function Sub() {}
  38865. Sub.prototype = o;
  38866. var receiver = new Sub(); // create an instance
  38867. function ic() {
  38868. return typeof receiver.foo;
  38869. } // perform access
  38870. ic();
  38871. ic();
  38872. return o;
  38873. eval("o" + o); // ensure no dead code elimination
  38874. };
  38875. });
  38876. $__System.registerDynamic('1bf', ['1c0'], true, function ($__require, exports, module) {
  38877. var global = this || self,
  38878. GLOBAL = global;
  38879. var ListCache = $__require('1c0');
  38880. /**
  38881. * Removes all key-value entries from the stack.
  38882. *
  38883. * @private
  38884. * @name clear
  38885. * @memberOf Stack
  38886. */
  38887. function stackClear() {
  38888. this.__data__ = new ListCache();
  38889. this.size = 0;
  38890. }
  38891. module.exports = stackClear;
  38892. });
  38893. $__System.registerDynamic('1c1', [], true, function ($__require, exports, module) {
  38894. var global = this || self,
  38895. GLOBAL = global;
  38896. /**
  38897. * Removes `key` and its value from the stack.
  38898. *
  38899. * @private
  38900. * @name delete
  38901. * @memberOf Stack
  38902. * @param {string} key The key of the value to remove.
  38903. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  38904. */
  38905. function stackDelete(key) {
  38906. var data = this.__data__,
  38907. result = data['delete'](key);
  38908. this.size = data.size;
  38909. return result;
  38910. }
  38911. module.exports = stackDelete;
  38912. });
  38913. $__System.registerDynamic("1c2", [], true, function ($__require, exports, module) {
  38914. var global = this || self,
  38915. GLOBAL = global;
  38916. /**
  38917. * Gets the stack value for `key`.
  38918. *
  38919. * @private
  38920. * @name get
  38921. * @memberOf Stack
  38922. * @param {string} key The key of the value to get.
  38923. * @returns {*} Returns the entry value.
  38924. */
  38925. function stackGet(key) {
  38926. return this.__data__.get(key);
  38927. }
  38928. module.exports = stackGet;
  38929. });
  38930. $__System.registerDynamic("1c3", [], true, function ($__require, exports, module) {
  38931. var global = this || self,
  38932. GLOBAL = global;
  38933. /**
  38934. * Checks if a stack value for `key` exists.
  38935. *
  38936. * @private
  38937. * @name has
  38938. * @memberOf Stack
  38939. * @param {string} key The key of the entry to check.
  38940. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  38941. */
  38942. function stackHas(key) {
  38943. return this.__data__.has(key);
  38944. }
  38945. module.exports = stackHas;
  38946. });
  38947. $__System.registerDynamic('1c4', ['1c0', '1c5', '139'], true, function ($__require, exports, module) {
  38948. var global = this || self,
  38949. GLOBAL = global;
  38950. var ListCache = $__require('1c0'),
  38951. Map = $__require('1c5'),
  38952. MapCache = $__require('139');
  38953. /** Used as the size to enable large array optimizations. */
  38954. var LARGE_ARRAY_SIZE = 200;
  38955. /**
  38956. * Sets the stack `key` to `value`.
  38957. *
  38958. * @private
  38959. * @name set
  38960. * @memberOf Stack
  38961. * @param {string} key The key of the value to set.
  38962. * @param {*} value The value to set.
  38963. * @returns {Object} Returns the stack cache instance.
  38964. */
  38965. function stackSet(key, value) {
  38966. var data = this.__data__;
  38967. if (data instanceof ListCache) {
  38968. var pairs = data.__data__;
  38969. if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
  38970. pairs.push([key, value]);
  38971. this.size = ++data.size;
  38972. return this;
  38973. }
  38974. data = this.__data__ = new MapCache(pairs);
  38975. }
  38976. data.set(key, value);
  38977. this.size = data.size;
  38978. return this;
  38979. }
  38980. module.exports = stackSet;
  38981. });
  38982. $__System.registerDynamic('66', ['1c0', '1bf', '1c1', '1c2', '1c3', '1c4'], true, function ($__require, exports, module) {
  38983. var global = this || self,
  38984. GLOBAL = global;
  38985. var ListCache = $__require('1c0'),
  38986. stackClear = $__require('1bf'),
  38987. stackDelete = $__require('1c1'),
  38988. stackGet = $__require('1c2'),
  38989. stackHas = $__require('1c3'),
  38990. stackSet = $__require('1c4');
  38991. /**
  38992. * Creates a stack cache object to store key-value pairs.
  38993. *
  38994. * @private
  38995. * @constructor
  38996. * @param {Array} [entries] The key-value pairs to cache.
  38997. */
  38998. function Stack(entries) {
  38999. var data = this.__data__ = new ListCache(entries);
  39000. this.size = data.size;
  39001. }
  39002. // Add methods to `Stack`.
  39003. Stack.prototype.clear = stackClear;
  39004. Stack.prototype['delete'] = stackDelete;
  39005. Stack.prototype.get = stackGet;
  39006. Stack.prototype.has = stackHas;
  39007. Stack.prototype.set = stackSet;
  39008. module.exports = Stack;
  39009. });
  39010. $__System.registerDynamic("1c6", [], true, function ($__require, exports, module) {
  39011. var global = this || self,
  39012. GLOBAL = global;
  39013. /**
  39014. * A specialized version of `_.forEach` for arrays without support for
  39015. * iteratee shorthands.
  39016. *
  39017. * @private
  39018. * @param {Array} [array] The array to iterate over.
  39019. * @param {Function} iteratee The function invoked per iteration.
  39020. * @returns {Array} Returns `array`.
  39021. */
  39022. function arrayEach(array, iteratee) {
  39023. var index = -1,
  39024. length = array == null ? 0 : array.length;
  39025. while (++index < length) {
  39026. if (iteratee(array[index], index, array) === false) {
  39027. break;
  39028. }
  39029. }
  39030. return array;
  39031. }
  39032. module.exports = arrayEach;
  39033. });
  39034. $__System.registerDynamic('1c7', ['b7', '40'], true, function ($__require, exports, module) {
  39035. var global = this || self,
  39036. GLOBAL = global;
  39037. var copyObject = $__require('b7'),
  39038. keys = $__require('40');
  39039. /**
  39040. * The base implementation of `_.assign` without support for multiple sources
  39041. * or `customizer` functions.
  39042. *
  39043. * @private
  39044. * @param {Object} object The destination object.
  39045. * @param {Object} source The source object.
  39046. * @returns {Object} Returns `object`.
  39047. */
  39048. function baseAssign(object, source) {
  39049. return object && copyObject(source, keys(source), object);
  39050. }
  39051. module.exports = baseAssign;
  39052. });
  39053. $__System.registerDynamic('1c8', ['b7', 'b8'], true, function ($__require, exports, module) {
  39054. var global = this || self,
  39055. GLOBAL = global;
  39056. var copyObject = $__require('b7'),
  39057. keysIn = $__require('b8');
  39058. /**
  39059. * The base implementation of `_.assignIn` without support for multiple sources
  39060. * or `customizer` functions.
  39061. *
  39062. * @private
  39063. * @param {Object} object The destination object.
  39064. * @param {Object} source The source object.
  39065. * @returns {Object} Returns `object`.
  39066. */
  39067. function baseAssignIn(object, source) {
  39068. return object && copyObject(source, keysIn(source), object);
  39069. }
  39070. module.exports = baseAssignIn;
  39071. });
  39072. $__System.registerDynamic('ba', ['1c9'], true, function ($__require, exports, module) {
  39073. var global = this || self,
  39074. GLOBAL = global;
  39075. var root = $__require('1c9');
  39076. /** Detect free variable `exports`. */
  39077. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  39078. /** Detect free variable `module`. */
  39079. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  39080. /** Detect the popular CommonJS extension `module.exports`. */
  39081. var moduleExports = freeModule && freeModule.exports === freeExports;
  39082. /** Built-in value references. */
  39083. var Buffer = moduleExports ? root.Buffer : undefined,
  39084. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
  39085. /**
  39086. * Creates a clone of `buffer`.
  39087. *
  39088. * @private
  39089. * @param {Buffer} buffer The buffer to clone.
  39090. * @param {boolean} [isDeep] Specify a deep clone.
  39091. * @returns {Buffer} Returns the cloned buffer.
  39092. */
  39093. function cloneBuffer(buffer, isDeep) {
  39094. if (isDeep) {
  39095. return buffer.slice();
  39096. }
  39097. var length = buffer.length,
  39098. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  39099. buffer.copy(result);
  39100. return result;
  39101. }
  39102. module.exports = cloneBuffer;
  39103. });
  39104. $__System.registerDynamic("bc", [], true, function ($__require, exports, module) {
  39105. var global = this || self,
  39106. GLOBAL = global;
  39107. /**
  39108. * Copies the values of `source` to `array`.
  39109. *
  39110. * @private
  39111. * @param {Array} source The array to copy values from.
  39112. * @param {Array} [array=[]] The array to copy values to.
  39113. * @returns {Array} Returns `array`.
  39114. */
  39115. function copyArray(source, array) {
  39116. var index = -1,
  39117. length = source.length;
  39118. array || (array = Array(length));
  39119. while (++index < length) {
  39120. array[index] = source[index];
  39121. }
  39122. return array;
  39123. }
  39124. module.exports = copyArray;
  39125. });
  39126. $__System.registerDynamic('1ca', ['b7', '1cb'], true, function ($__require, exports, module) {
  39127. var global = this || self,
  39128. GLOBAL = global;
  39129. var copyObject = $__require('b7'),
  39130. getSymbols = $__require('1cb');
  39131. /**
  39132. * Copies own symbols of `source` to `object`.
  39133. *
  39134. * @private
  39135. * @param {Object} source The object to copy symbols from.
  39136. * @param {Object} [object={}] The object to copy symbols to.
  39137. * @returns {Object} Returns `object`.
  39138. */
  39139. function copySymbols(source, object) {
  39140. return copyObject(source, getSymbols(source), object);
  39141. }
  39142. module.exports = copySymbols;
  39143. });
  39144. $__System.registerDynamic('142', ['b4', '72'], true, function ($__require, exports, module) {
  39145. var global = this || self,
  39146. GLOBAL = global;
  39147. var baseAssignValue = $__require('b4'),
  39148. eq = $__require('72');
  39149. /** Used for built-in method references. */
  39150. var objectProto = Object.prototype;
  39151. /** Used to check objects for own properties. */
  39152. var hasOwnProperty = objectProto.hasOwnProperty;
  39153. /**
  39154. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  39155. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  39156. * for equality comparisons.
  39157. *
  39158. * @private
  39159. * @param {Object} object The object to modify.
  39160. * @param {string} key The key of the property to assign.
  39161. * @param {*} value The value to assign.
  39162. */
  39163. function assignValue(object, key, value) {
  39164. var objValue = object[key];
  39165. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
  39166. baseAssignValue(object, key, value);
  39167. }
  39168. }
  39169. module.exports = assignValue;
  39170. });
  39171. $__System.registerDynamic('14c', ['1cc'], true, function ($__require, exports, module) {
  39172. var global = this || self,
  39173. GLOBAL = global;
  39174. var getNative = $__require('1cc');
  39175. var defineProperty = function () {
  39176. try {
  39177. var func = getNative(Object, 'defineProperty');
  39178. func({}, '', {});
  39179. return func;
  39180. } catch (e) {}
  39181. }();
  39182. module.exports = defineProperty;
  39183. });
  39184. $__System.registerDynamic('b4', ['14c'], true, function ($__require, exports, module) {
  39185. var global = this || self,
  39186. GLOBAL = global;
  39187. var defineProperty = $__require('14c');
  39188. /**
  39189. * The base implementation of `assignValue` and `assignMergeValue` without
  39190. * value checks.
  39191. *
  39192. * @private
  39193. * @param {Object} object The object to modify.
  39194. * @param {string} key The key of the property to assign.
  39195. * @param {*} value The value to assign.
  39196. */
  39197. function baseAssignValue(object, key, value) {
  39198. if (key == '__proto__' && defineProperty) {
  39199. defineProperty(object, key, {
  39200. 'configurable': true,
  39201. 'enumerable': true,
  39202. 'value': value,
  39203. 'writable': true
  39204. });
  39205. } else {
  39206. object[key] = value;
  39207. }
  39208. }
  39209. module.exports = baseAssignValue;
  39210. });
  39211. $__System.registerDynamic('b7', ['142', 'b4'], true, function ($__require, exports, module) {
  39212. var global = this || self,
  39213. GLOBAL = global;
  39214. var assignValue = $__require('142'),
  39215. baseAssignValue = $__require('b4');
  39216. /**
  39217. * Copies properties of `source` to `object`.
  39218. *
  39219. * @private
  39220. * @param {Object} source The object to copy properties from.
  39221. * @param {Array} props The property identifiers to copy.
  39222. * @param {Object} [object={}] The object to copy properties to.
  39223. * @param {Function} [customizer] The function to customize copied values.
  39224. * @returns {Object} Returns `object`.
  39225. */
  39226. function copyObject(source, props, object, customizer) {
  39227. var isNew = !object;
  39228. object || (object = {});
  39229. var index = -1,
  39230. length = props.length;
  39231. while (++index < length) {
  39232. var key = props[index];
  39233. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
  39234. if (newValue === undefined) {
  39235. newValue = source[key];
  39236. }
  39237. if (isNew) {
  39238. baseAssignValue(object, key, newValue);
  39239. } else {
  39240. assignValue(object, key, newValue);
  39241. }
  39242. }
  39243. return object;
  39244. }
  39245. module.exports = copyObject;
  39246. });
  39247. $__System.registerDynamic('1cd', ['b7', '1ce'], true, function ($__require, exports, module) {
  39248. var global = this || self,
  39249. GLOBAL = global;
  39250. var copyObject = $__require('b7'),
  39251. getSymbolsIn = $__require('1ce');
  39252. /**
  39253. * Copies own and inherited symbols of `source` to `object`.
  39254. *
  39255. * @private
  39256. * @param {Object} source The object to copy symbols from.
  39257. * @param {Object} [object={}] The object to copy symbols to.
  39258. * @returns {Object} Returns `object`.
  39259. */
  39260. function copySymbolsIn(source, object) {
  39261. return copyObject(source, getSymbolsIn(source), object);
  39262. }
  39263. module.exports = copySymbolsIn;
  39264. });
  39265. $__System.registerDynamic('76', ['1cf', '1cb', '40'], true, function ($__require, exports, module) {
  39266. var global = this || self,
  39267. GLOBAL = global;
  39268. var baseGetAllKeys = $__require('1cf'),
  39269. getSymbols = $__require('1cb'),
  39270. keys = $__require('40');
  39271. /**
  39272. * Creates an array of own enumerable property names and symbols of `object`.
  39273. *
  39274. * @private
  39275. * @param {Object} object The object to query.
  39276. * @returns {Array} Returns the array of property names and symbols.
  39277. */
  39278. function getAllKeys(object) {
  39279. return baseGetAllKeys(object, keys, getSymbols);
  39280. }
  39281. module.exports = getAllKeys;
  39282. });
  39283. $__System.registerDynamic('1cf', ['64', '4b'], true, function ($__require, exports, module) {
  39284. var global = this || self,
  39285. GLOBAL = global;
  39286. var arrayPush = $__require('64'),
  39287. isArray = $__require('4b');
  39288. /**
  39289. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  39290. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  39291. * symbols of `object`.
  39292. *
  39293. * @private
  39294. * @param {Object} object The object to query.
  39295. * @param {Function} keysFunc The function to get the keys of `object`.
  39296. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  39297. * @returns {Array} Returns the array of property names and symbols.
  39298. */
  39299. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  39300. var result = keysFunc(object);
  39301. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  39302. }
  39303. module.exports = baseGetAllKeys;
  39304. });
  39305. $__System.registerDynamic("64", [], true, function ($__require, exports, module) {
  39306. var global = this || self,
  39307. GLOBAL = global;
  39308. /**
  39309. * Appends the elements of `values` to `array`.
  39310. *
  39311. * @private
  39312. * @param {Array} array The array to modify.
  39313. * @param {Array} values The values to append.
  39314. * @returns {Array} Returns `array`.
  39315. */
  39316. function arrayPush(array, values) {
  39317. var index = -1,
  39318. length = values.length,
  39319. offset = array.length;
  39320. while (++index < length) {
  39321. array[offset + index] = values[index];
  39322. }
  39323. return array;
  39324. }
  39325. module.exports = arrayPush;
  39326. });
  39327. $__System.registerDynamic("1d0", [], true, function ($__require, exports, module) {
  39328. var global = this || self,
  39329. GLOBAL = global;
  39330. /**
  39331. * A specialized version of `_.filter` for arrays without support for
  39332. * iteratee shorthands.
  39333. *
  39334. * @private
  39335. * @param {Array} [array] The array to iterate over.
  39336. * @param {Function} predicate The function invoked per iteration.
  39337. * @returns {Array} Returns the new filtered array.
  39338. */
  39339. function arrayFilter(array, predicate) {
  39340. var index = -1,
  39341. length = array == null ? 0 : array.length,
  39342. resIndex = 0,
  39343. result = [];
  39344. while (++index < length) {
  39345. var value = array[index];
  39346. if (predicate(value, index, array)) {
  39347. result[resIndex++] = value;
  39348. }
  39349. }
  39350. return result;
  39351. }
  39352. module.exports = arrayFilter;
  39353. });
  39354. $__System.registerDynamic('1cb', ['1d0', '1d1'], true, function ($__require, exports, module) {
  39355. var global = this || self,
  39356. GLOBAL = global;
  39357. var arrayFilter = $__require('1d0'),
  39358. stubArray = $__require('1d1');
  39359. /** Used for built-in method references. */
  39360. var objectProto = Object.prototype;
  39361. /** Built-in value references. */
  39362. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  39363. /* Built-in method references for those with the same name as other `lodash` methods. */
  39364. var nativeGetSymbols = Object.getOwnPropertySymbols;
  39365. /**
  39366. * Creates an array of the own enumerable symbols of `object`.
  39367. *
  39368. * @private
  39369. * @param {Object} object The object to query.
  39370. * @returns {Array} Returns the array of symbols.
  39371. */
  39372. var getSymbols = !nativeGetSymbols ? stubArray : function (object) {
  39373. if (object == null) {
  39374. return [];
  39375. }
  39376. object = Object(object);
  39377. return arrayFilter(nativeGetSymbols(object), function (symbol) {
  39378. return propertyIsEnumerable.call(object, symbol);
  39379. });
  39380. };
  39381. module.exports = getSymbols;
  39382. });
  39383. $__System.registerDynamic("1d1", [], true, function ($__require, exports, module) {
  39384. var global = this || self,
  39385. GLOBAL = global;
  39386. /**
  39387. * This method returns a new empty array.
  39388. *
  39389. * @static
  39390. * @memberOf _
  39391. * @since 4.13.0
  39392. * @category Util
  39393. * @returns {Array} Returns the new empty array.
  39394. * @example
  39395. *
  39396. * var arrays = _.times(2, _.stubArray);
  39397. *
  39398. * console.log(arrays);
  39399. * // => [[], []]
  39400. *
  39401. * console.log(arrays[0] === arrays[1]);
  39402. * // => false
  39403. */
  39404. function stubArray() {
  39405. return [];
  39406. }
  39407. module.exports = stubArray;
  39408. });
  39409. $__System.registerDynamic('1ce', ['64', '1b9', '1cb', '1d1'], true, function ($__require, exports, module) {
  39410. var global = this || self,
  39411. GLOBAL = global;
  39412. var arrayPush = $__require('64'),
  39413. getPrototype = $__require('1b9'),
  39414. getSymbols = $__require('1cb'),
  39415. stubArray = $__require('1d1');
  39416. /* Built-in method references for those with the same name as other `lodash` methods. */
  39417. var nativeGetSymbols = Object.getOwnPropertySymbols;
  39418. /**
  39419. * Creates an array of the own and inherited enumerable symbols of `object`.
  39420. *
  39421. * @private
  39422. * @param {Object} object The object to query.
  39423. * @returns {Array} Returns the array of symbols.
  39424. */
  39425. var getSymbolsIn = !nativeGetSymbols ? stubArray : function (object) {
  39426. var result = [];
  39427. while (object) {
  39428. arrayPush(result, getSymbols(object));
  39429. object = getPrototype(object);
  39430. }
  39431. return result;
  39432. };
  39433. module.exports = getSymbolsIn;
  39434. });
  39435. $__System.registerDynamic("1d2", [], true, function ($__require, exports, module) {
  39436. var global = this || self,
  39437. GLOBAL = global;
  39438. /**
  39439. * This function is like
  39440. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  39441. * except that it includes inherited enumerable properties.
  39442. *
  39443. * @private
  39444. * @param {Object} object The object to query.
  39445. * @returns {Array} Returns the array of property names.
  39446. */
  39447. function nativeKeysIn(object) {
  39448. var result = [];
  39449. if (object != null) {
  39450. for (var key in Object(object)) {
  39451. result.push(key);
  39452. }
  39453. }
  39454. return result;
  39455. }
  39456. module.exports = nativeKeysIn;
  39457. });
  39458. $__System.registerDynamic('1d3', ['81', '143', '1d2'], true, function ($__require, exports, module) {
  39459. var global = this || self,
  39460. GLOBAL = global;
  39461. var isObject = $__require('81'),
  39462. isPrototype = $__require('143'),
  39463. nativeKeysIn = $__require('1d2');
  39464. /** Used for built-in method references. */
  39465. var objectProto = Object.prototype;
  39466. /** Used to check objects for own properties. */
  39467. var hasOwnProperty = objectProto.hasOwnProperty;
  39468. /**
  39469. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  39470. *
  39471. * @private
  39472. * @param {Object} object The object to query.
  39473. * @returns {Array} Returns the array of property names.
  39474. */
  39475. function baseKeysIn(object) {
  39476. if (!isObject(object)) {
  39477. return nativeKeysIn(object);
  39478. }
  39479. var isProto = isPrototype(object),
  39480. result = [];
  39481. for (var key in object) {
  39482. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  39483. result.push(key);
  39484. }
  39485. }
  39486. return result;
  39487. }
  39488. module.exports = baseKeysIn;
  39489. });
  39490. $__System.registerDynamic('b8', ['1d4', '1d3', '3f'], true, function ($__require, exports, module) {
  39491. var global = this || self,
  39492. GLOBAL = global;
  39493. var arrayLikeKeys = $__require('1d4'),
  39494. baseKeysIn = $__require('1d3'),
  39495. isArrayLike = $__require('3f');
  39496. /**
  39497. * Creates an array of the own and inherited enumerable property names of `object`.
  39498. *
  39499. * **Note:** Non-object values are coerced to objects.
  39500. *
  39501. * @static
  39502. * @memberOf _
  39503. * @since 3.0.0
  39504. * @category Object
  39505. * @param {Object} object The object to query.
  39506. * @returns {Array} Returns the array of property names.
  39507. * @example
  39508. *
  39509. * function Foo() {
  39510. * this.a = 1;
  39511. * this.b = 2;
  39512. * }
  39513. *
  39514. * Foo.prototype.c = 3;
  39515. *
  39516. * _.keysIn(new Foo);
  39517. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  39518. */
  39519. function keysIn(object) {
  39520. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  39521. }
  39522. module.exports = keysIn;
  39523. });
  39524. $__System.registerDynamic('1d5', ['1cf', '1ce', 'b8'], true, function ($__require, exports, module) {
  39525. var global = this || self,
  39526. GLOBAL = global;
  39527. var baseGetAllKeys = $__require('1cf'),
  39528. getSymbolsIn = $__require('1ce'),
  39529. keysIn = $__require('b8');
  39530. /**
  39531. * Creates an array of own and inherited enumerable property names and
  39532. * symbols of `object`.
  39533. *
  39534. * @private
  39535. * @param {Object} object The object to query.
  39536. * @returns {Array} Returns the array of property names and symbols.
  39537. */
  39538. function getAllKeysIn(object) {
  39539. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  39540. }
  39541. module.exports = getAllKeysIn;
  39542. });
  39543. $__System.registerDynamic('1d6', ['1cc', '1c9'], true, function ($__require, exports, module) {
  39544. var global = this || self,
  39545. GLOBAL = global;
  39546. var getNative = $__require('1cc'),
  39547. root = $__require('1c9');
  39548. /* Built-in method references that are verified to be native. */
  39549. var DataView = getNative(root, 'DataView');
  39550. module.exports = DataView;
  39551. });
  39552. $__System.registerDynamic('1d7', ['1cc', '1c9'], true, function ($__require, exports, module) {
  39553. var global = this || self,
  39554. GLOBAL = global;
  39555. var getNative = $__require('1cc'),
  39556. root = $__require('1c9');
  39557. /* Built-in method references that are verified to be native. */
  39558. var Promise = getNative(root, 'Promise');
  39559. module.exports = Promise;
  39560. });
  39561. $__System.registerDynamic('1d8', ['1cc', '1c9'], true, function ($__require, exports, module) {
  39562. var global = this || self,
  39563. GLOBAL = global;
  39564. var getNative = $__require('1cc'),
  39565. root = $__require('1c9');
  39566. /* Built-in method references that are verified to be native. */
  39567. var WeakMap = getNative(root, 'WeakMap');
  39568. module.exports = WeakMap;
  39569. });
  39570. $__System.registerDynamic('78', ['1d6', '1c5', '1d7', '1d9', '1d8', '185', '1da'], true, function ($__require, exports, module) {
  39571. var global = this || self,
  39572. GLOBAL = global;
  39573. var DataView = $__require('1d6'),
  39574. Map = $__require('1c5'),
  39575. Promise = $__require('1d7'),
  39576. Set = $__require('1d9'),
  39577. WeakMap = $__require('1d8'),
  39578. baseGetTag = $__require('185'),
  39579. toSource = $__require('1da');
  39580. /** `Object#toString` result references. */
  39581. var mapTag = '[object Map]',
  39582. objectTag = '[object Object]',
  39583. promiseTag = '[object Promise]',
  39584. setTag = '[object Set]',
  39585. weakMapTag = '[object WeakMap]';
  39586. var dataViewTag = '[object DataView]';
  39587. /** Used to detect maps, sets, and weakmaps. */
  39588. var dataViewCtorString = toSource(DataView),
  39589. mapCtorString = toSource(Map),
  39590. promiseCtorString = toSource(Promise),
  39591. setCtorString = toSource(Set),
  39592. weakMapCtorString = toSource(WeakMap);
  39593. /**
  39594. * Gets the `toStringTag` of `value`.
  39595. *
  39596. * @private
  39597. * @param {*} value The value to query.
  39598. * @returns {string} Returns the `toStringTag`.
  39599. */
  39600. var getTag = baseGetTag;
  39601. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  39602. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
  39603. getTag = function (value) {
  39604. var result = baseGetTag(value),
  39605. Ctor = result == objectTag ? value.constructor : undefined,
  39606. ctorString = Ctor ? toSource(Ctor) : '';
  39607. if (ctorString) {
  39608. switch (ctorString) {
  39609. case dataViewCtorString:
  39610. return dataViewTag;
  39611. case mapCtorString:
  39612. return mapTag;
  39613. case promiseCtorString:
  39614. return promiseTag;
  39615. case setCtorString:
  39616. return setTag;
  39617. case weakMapCtorString:
  39618. return weakMapTag;
  39619. }
  39620. }
  39621. return result;
  39622. };
  39623. }
  39624. module.exports = getTag;
  39625. });
  39626. $__System.registerDynamic('1db', [], true, function ($__require, exports, module) {
  39627. var global = this || self,
  39628. GLOBAL = global;
  39629. /** Used for built-in method references. */
  39630. var objectProto = Object.prototype;
  39631. /** Used to check objects for own properties. */
  39632. var hasOwnProperty = objectProto.hasOwnProperty;
  39633. /**
  39634. * Initializes an array clone.
  39635. *
  39636. * @private
  39637. * @param {Array} array The array to clone.
  39638. * @returns {Array} Returns the initialized clone.
  39639. */
  39640. function initCloneArray(array) {
  39641. var length = array.length,
  39642. result = array.constructor(length);
  39643. // Add properties assigned by `RegExp#exec`.
  39644. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  39645. result.index = array.index;
  39646. result.input = array.input;
  39647. }
  39648. return result;
  39649. }
  39650. module.exports = initCloneArray;
  39651. });
  39652. $__System.registerDynamic('1dc', ['1dd'], true, function ($__require, exports, module) {
  39653. var global = this || self,
  39654. GLOBAL = global;
  39655. var cloneArrayBuffer = $__require('1dd');
  39656. /**
  39657. * Creates a clone of `dataView`.
  39658. *
  39659. * @private
  39660. * @param {Object} dataView The data view to clone.
  39661. * @param {boolean} [isDeep] Specify a deep clone.
  39662. * @returns {Object} Returns the cloned data view.
  39663. */
  39664. function cloneDataView(dataView, isDeep) {
  39665. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  39666. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  39667. }
  39668. module.exports = cloneDataView;
  39669. });
  39670. $__System.registerDynamic("1de", [], true, function ($__require, exports, module) {
  39671. var global = this || self,
  39672. GLOBAL = global;
  39673. /**
  39674. * Adds the key-value `pair` to `map`.
  39675. *
  39676. * @private
  39677. * @param {Object} map The map to modify.
  39678. * @param {Array} pair The key-value pair to add.
  39679. * @returns {Object} Returns `map`.
  39680. */
  39681. function addMapEntry(map, pair) {
  39682. // Don't return `map.set` because it's not chainable in IE 11.
  39683. map.set(pair[0], pair[1]);
  39684. return map;
  39685. }
  39686. module.exports = addMapEntry;
  39687. });
  39688. $__System.registerDynamic("73", [], true, function ($__require, exports, module) {
  39689. var global = this || self,
  39690. GLOBAL = global;
  39691. /**
  39692. * Converts `map` to its key-value pairs.
  39693. *
  39694. * @private
  39695. * @param {Object} map The map to convert.
  39696. * @returns {Array} Returns the key-value pairs.
  39697. */
  39698. function mapToArray(map) {
  39699. var index = -1,
  39700. result = Array(map.size);
  39701. map.forEach(function (value, key) {
  39702. result[++index] = [key, value];
  39703. });
  39704. return result;
  39705. }
  39706. module.exports = mapToArray;
  39707. });
  39708. $__System.registerDynamic('1df', ['1de', '1e0', '73'], true, function ($__require, exports, module) {
  39709. var global = this || self,
  39710. GLOBAL = global;
  39711. var addMapEntry = $__require('1de'),
  39712. arrayReduce = $__require('1e0'),
  39713. mapToArray = $__require('73');
  39714. /** Used to compose bitmasks for cloning. */
  39715. var CLONE_DEEP_FLAG = 1;
  39716. /**
  39717. * Creates a clone of `map`.
  39718. *
  39719. * @private
  39720. * @param {Object} map The map to clone.
  39721. * @param {Function} cloneFunc The function to clone values.
  39722. * @param {boolean} [isDeep] Specify a deep clone.
  39723. * @returns {Object} Returns the cloned map.
  39724. */
  39725. function cloneMap(map, isDeep, cloneFunc) {
  39726. var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
  39727. return arrayReduce(array, addMapEntry, new map.constructor());
  39728. }
  39729. module.exports = cloneMap;
  39730. });
  39731. $__System.registerDynamic("1e1", [], true, function ($__require, exports, module) {
  39732. var global = this || self,
  39733. GLOBAL = global;
  39734. /** Used to match `RegExp` flags from their coerced string values. */
  39735. var reFlags = /\w*$/;
  39736. /**
  39737. * Creates a clone of `regexp`.
  39738. *
  39739. * @private
  39740. * @param {Object} regexp The regexp to clone.
  39741. * @returns {Object} Returns the cloned regexp.
  39742. */
  39743. function cloneRegExp(regexp) {
  39744. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  39745. result.lastIndex = regexp.lastIndex;
  39746. return result;
  39747. }
  39748. module.exports = cloneRegExp;
  39749. });
  39750. $__System.registerDynamic("1e2", [], true, function ($__require, exports, module) {
  39751. var global = this || self,
  39752. GLOBAL = global;
  39753. /**
  39754. * Adds `value` to `set`.
  39755. *
  39756. * @private
  39757. * @param {Object} set The set to modify.
  39758. * @param {*} value The value to add.
  39759. * @returns {Object} Returns `set`.
  39760. */
  39761. function addSetEntry(set, value) {
  39762. // Don't return `set.add` because it's not chainable in IE 11.
  39763. set.add(value);
  39764. return set;
  39765. }
  39766. module.exports = addSetEntry;
  39767. });
  39768. $__System.registerDynamic("1e0", [], true, function ($__require, exports, module) {
  39769. var global = this || self,
  39770. GLOBAL = global;
  39771. /**
  39772. * A specialized version of `_.reduce` for arrays without support for
  39773. * iteratee shorthands.
  39774. *
  39775. * @private
  39776. * @param {Array} [array] The array to iterate over.
  39777. * @param {Function} iteratee The function invoked per iteration.
  39778. * @param {*} [accumulator] The initial value.
  39779. * @param {boolean} [initAccum] Specify using the first element of `array` as
  39780. * the initial value.
  39781. * @returns {*} Returns the accumulated value.
  39782. */
  39783. function arrayReduce(array, iteratee, accumulator, initAccum) {
  39784. var index = -1,
  39785. length = array == null ? 0 : array.length;
  39786. if (initAccum && length) {
  39787. accumulator = array[++index];
  39788. }
  39789. while (++index < length) {
  39790. accumulator = iteratee(accumulator, array[index], index, array);
  39791. }
  39792. return accumulator;
  39793. }
  39794. module.exports = arrayReduce;
  39795. });
  39796. $__System.registerDynamic('1e3', ['1e2', '1e0', '74'], true, function ($__require, exports, module) {
  39797. var global = this || self,
  39798. GLOBAL = global;
  39799. var addSetEntry = $__require('1e2'),
  39800. arrayReduce = $__require('1e0'),
  39801. setToArray = $__require('74');
  39802. /** Used to compose bitmasks for cloning. */
  39803. var CLONE_DEEP_FLAG = 1;
  39804. /**
  39805. * Creates a clone of `set`.
  39806. *
  39807. * @private
  39808. * @param {Object} set The set to clone.
  39809. * @param {Function} cloneFunc The function to clone values.
  39810. * @param {boolean} [isDeep] Specify a deep clone.
  39811. * @returns {Object} Returns the cloned set.
  39812. */
  39813. function cloneSet(set, isDeep, cloneFunc) {
  39814. var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
  39815. return arrayReduce(array, addSetEntry, new set.constructor());
  39816. }
  39817. module.exports = cloneSet;
  39818. });
  39819. $__System.registerDynamic('1e4', ['61'], true, function ($__require, exports, module) {
  39820. var global = this || self,
  39821. GLOBAL = global;
  39822. var Symbol = $__require('61');
  39823. /** Used to convert symbols to primitives and strings. */
  39824. var symbolProto = Symbol ? Symbol.prototype : undefined,
  39825. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  39826. /**
  39827. * Creates a clone of the `symbol` object.
  39828. *
  39829. * @private
  39830. * @param {Object} symbol The symbol object to clone.
  39831. * @returns {Object} Returns the cloned symbol object.
  39832. */
  39833. function cloneSymbol(symbol) {
  39834. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  39835. }
  39836. module.exports = cloneSymbol;
  39837. });
  39838. $__System.registerDynamic('71', ['1c9'], true, function ($__require, exports, module) {
  39839. var global = this || self,
  39840. GLOBAL = global;
  39841. var root = $__require('1c9');
  39842. /** Built-in value references. */
  39843. var Uint8Array = root.Uint8Array;
  39844. module.exports = Uint8Array;
  39845. });
  39846. $__System.registerDynamic('1dd', ['71'], true, function ($__require, exports, module) {
  39847. var global = this || self,
  39848. GLOBAL = global;
  39849. var Uint8Array = $__require('71');
  39850. /**
  39851. * Creates a clone of `arrayBuffer`.
  39852. *
  39853. * @private
  39854. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  39855. * @returns {ArrayBuffer} Returns the cloned array buffer.
  39856. */
  39857. function cloneArrayBuffer(arrayBuffer) {
  39858. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  39859. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  39860. return result;
  39861. }
  39862. module.exports = cloneArrayBuffer;
  39863. });
  39864. $__System.registerDynamic('bb', ['1dd'], true, function ($__require, exports, module) {
  39865. var global = this || self,
  39866. GLOBAL = global;
  39867. var cloneArrayBuffer = $__require('1dd');
  39868. /**
  39869. * Creates a clone of `typedArray`.
  39870. *
  39871. * @private
  39872. * @param {Object} typedArray The typed array to clone.
  39873. * @param {boolean} [isDeep] Specify a deep clone.
  39874. * @returns {Object} Returns the cloned typed array.
  39875. */
  39876. function cloneTypedArray(typedArray, isDeep) {
  39877. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  39878. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  39879. }
  39880. module.exports = cloneTypedArray;
  39881. });
  39882. $__System.registerDynamic('1e5', ['1dd', '1dc', '1df', '1e1', '1e3', '1e4', 'bb'], true, function ($__require, exports, module) {
  39883. var global = this || self,
  39884. GLOBAL = global;
  39885. var cloneArrayBuffer = $__require('1dd'),
  39886. cloneDataView = $__require('1dc'),
  39887. cloneMap = $__require('1df'),
  39888. cloneRegExp = $__require('1e1'),
  39889. cloneSet = $__require('1e3'),
  39890. cloneSymbol = $__require('1e4'),
  39891. cloneTypedArray = $__require('bb');
  39892. /** `Object#toString` result references. */
  39893. var boolTag = '[object Boolean]',
  39894. dateTag = '[object Date]',
  39895. mapTag = '[object Map]',
  39896. numberTag = '[object Number]',
  39897. regexpTag = '[object RegExp]',
  39898. setTag = '[object Set]',
  39899. stringTag = '[object String]',
  39900. symbolTag = '[object Symbol]';
  39901. var arrayBufferTag = '[object ArrayBuffer]',
  39902. dataViewTag = '[object DataView]',
  39903. float32Tag = '[object Float32Array]',
  39904. float64Tag = '[object Float64Array]',
  39905. int8Tag = '[object Int8Array]',
  39906. int16Tag = '[object Int16Array]',
  39907. int32Tag = '[object Int32Array]',
  39908. uint8Tag = '[object Uint8Array]',
  39909. uint8ClampedTag = '[object Uint8ClampedArray]',
  39910. uint16Tag = '[object Uint16Array]',
  39911. uint32Tag = '[object Uint32Array]';
  39912. /**
  39913. * Initializes an object clone based on its `toStringTag`.
  39914. *
  39915. * **Note:** This function only supports cloning values with tags of
  39916. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  39917. *
  39918. * @private
  39919. * @param {Object} object The object to clone.
  39920. * @param {string} tag The `toStringTag` of the object to clone.
  39921. * @param {Function} cloneFunc The function to clone values.
  39922. * @param {boolean} [isDeep] Specify a deep clone.
  39923. * @returns {Object} Returns the initialized clone.
  39924. */
  39925. function initCloneByTag(object, tag, cloneFunc, isDeep) {
  39926. var Ctor = object.constructor;
  39927. switch (tag) {
  39928. case arrayBufferTag:
  39929. return cloneArrayBuffer(object);
  39930. case boolTag:
  39931. case dateTag:
  39932. return new Ctor(+object);
  39933. case dataViewTag:
  39934. return cloneDataView(object, isDeep);
  39935. case float32Tag:case float64Tag:
  39936. case int8Tag:case int16Tag:case int32Tag:
  39937. case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:
  39938. return cloneTypedArray(object, isDeep);
  39939. case mapTag:
  39940. return cloneMap(object, isDeep, cloneFunc);
  39941. case numberTag:
  39942. case stringTag:
  39943. return new Ctor(object);
  39944. case regexpTag:
  39945. return cloneRegExp(object);
  39946. case setTag:
  39947. return cloneSet(object, isDeep, cloneFunc);
  39948. case symbolTag:
  39949. return cloneSymbol(object);
  39950. }
  39951. }
  39952. module.exports = initCloneByTag;
  39953. });
  39954. $__System.registerDynamic('1e6', ['81'], true, function ($__require, exports, module) {
  39955. var global = this || self,
  39956. GLOBAL = global;
  39957. var isObject = $__require('81');
  39958. /** Built-in value references. */
  39959. var objectCreate = Object.create;
  39960. /**
  39961. * The base implementation of `_.create` without support for assigning
  39962. * properties to the created object.
  39963. *
  39964. * @private
  39965. * @param {Object} proto The object to inherit from.
  39966. * @returns {Object} Returns the new object.
  39967. */
  39968. var baseCreate = function () {
  39969. function object() {}
  39970. return function (proto) {
  39971. if (!isObject(proto)) {
  39972. return {};
  39973. }
  39974. if (objectCreate) {
  39975. return objectCreate(proto);
  39976. }
  39977. object.prototype = proto;
  39978. var result = new object();
  39979. object.prototype = undefined;
  39980. return result;
  39981. };
  39982. }();
  39983. module.exports = baseCreate;
  39984. });
  39985. $__System.registerDynamic('1b9', ['1e7'], true, function ($__require, exports, module) {
  39986. var global = this || self,
  39987. GLOBAL = global;
  39988. var overArg = $__require('1e7');
  39989. /** Built-in value references. */
  39990. var getPrototype = overArg(Object.getPrototypeOf, Object);
  39991. module.exports = getPrototype;
  39992. });
  39993. $__System.registerDynamic('bd', ['1e6', '1b9', '143'], true, function ($__require, exports, module) {
  39994. var global = this || self,
  39995. GLOBAL = global;
  39996. var baseCreate = $__require('1e6'),
  39997. getPrototype = $__require('1b9'),
  39998. isPrototype = $__require('143');
  39999. /**
  40000. * Initializes an object clone.
  40001. *
  40002. * @private
  40003. * @param {Object} object The object to clone.
  40004. * @returns {Object} Returns the initialized clone.
  40005. */
  40006. function initCloneObject(object) {
  40007. return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  40008. }
  40009. module.exports = initCloneObject;
  40010. });
  40011. $__System.registerDynamic("1e8", [], true, function ($__require, exports, module) {
  40012. var global = this || self,
  40013. GLOBAL = global;
  40014. /**
  40015. * The base implementation of `_.times` without support for iteratee shorthands
  40016. * or max array length checks.
  40017. *
  40018. * @private
  40019. * @param {number} n The number of times to invoke `iteratee`.
  40020. * @param {Function} iteratee The function invoked per iteration.
  40021. * @returns {Array} Returns the array of results.
  40022. */
  40023. function baseTimes(n, iteratee) {
  40024. var index = -1,
  40025. result = Array(n);
  40026. while (++index < n) {
  40027. result[index] = iteratee(index);
  40028. }
  40029. return result;
  40030. }
  40031. module.exports = baseTimes;
  40032. });
  40033. $__System.registerDynamic('1e9', ['185', '7b'], true, function ($__require, exports, module) {
  40034. var global = this || self,
  40035. GLOBAL = global;
  40036. var baseGetTag = $__require('185'),
  40037. isObjectLike = $__require('7b');
  40038. /** `Object#toString` result references. */
  40039. var argsTag = '[object Arguments]';
  40040. /**
  40041. * The base implementation of `_.isArguments`.
  40042. *
  40043. * @private
  40044. * @param {*} value The value to check.
  40045. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  40046. */
  40047. function baseIsArguments(value) {
  40048. return isObjectLike(value) && baseGetTag(value) == argsTag;
  40049. }
  40050. module.exports = baseIsArguments;
  40051. });
  40052. $__System.registerDynamic('62', ['1e9', '7b'], true, function ($__require, exports, module) {
  40053. var global = this || self,
  40054. GLOBAL = global;
  40055. var baseIsArguments = $__require('1e9'),
  40056. isObjectLike = $__require('7b');
  40057. /** Used for built-in method references. */
  40058. var objectProto = Object.prototype;
  40059. /** Used to check objects for own properties. */
  40060. var hasOwnProperty = objectProto.hasOwnProperty;
  40061. /** Built-in value references. */
  40062. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  40063. /**
  40064. * Checks if `value` is likely an `arguments` object.
  40065. *
  40066. * @static
  40067. * @memberOf _
  40068. * @since 0.1.0
  40069. * @category Lang
  40070. * @param {*} value The value to check.
  40071. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  40072. * else `false`.
  40073. * @example
  40074. *
  40075. * _.isArguments(function() { return arguments; }());
  40076. * // => true
  40077. *
  40078. * _.isArguments([1, 2, 3]);
  40079. * // => false
  40080. */
  40081. var isArguments = baseIsArguments(function () {
  40082. return arguments;
  40083. }()) ? baseIsArguments : function (value) {
  40084. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
  40085. };
  40086. module.exports = isArguments;
  40087. });
  40088. $__System.registerDynamic("4b", [], true, function ($__require, exports, module) {
  40089. var global = this || self,
  40090. GLOBAL = global;
  40091. /**
  40092. * Checks if `value` is classified as an `Array` object.
  40093. *
  40094. * @static
  40095. * @memberOf _
  40096. * @since 0.1.0
  40097. * @category Lang
  40098. * @param {*} value The value to check.
  40099. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  40100. * @example
  40101. *
  40102. * _.isArray([1, 2, 3]);
  40103. * // => true
  40104. *
  40105. * _.isArray(document.body.children);
  40106. * // => false
  40107. *
  40108. * _.isArray('abc');
  40109. * // => false
  40110. *
  40111. * _.isArray(_.noop);
  40112. * // => false
  40113. */
  40114. var isArray = Array.isArray;
  40115. module.exports = isArray;
  40116. });
  40117. $__System.registerDynamic("1ea", [], true, function ($__require, exports, module) {
  40118. var global = this || self,
  40119. GLOBAL = global;
  40120. /**
  40121. * This method returns `false`.
  40122. *
  40123. * @static
  40124. * @memberOf _
  40125. * @since 4.13.0
  40126. * @category Util
  40127. * @returns {boolean} Returns `false`.
  40128. * @example
  40129. *
  40130. * _.times(2, _.stubFalse);
  40131. * // => [false, false]
  40132. */
  40133. function stubFalse() {
  40134. return false;
  40135. }
  40136. module.exports = stubFalse;
  40137. });
  40138. $__System.registerDynamic('79', ['1c9', '1ea'], true, function ($__require, exports, module) {
  40139. var global = this || self,
  40140. GLOBAL = global;
  40141. var root = $__require('1c9'),
  40142. stubFalse = $__require('1ea');
  40143. /** Detect free variable `exports`. */
  40144. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  40145. /** Detect free variable `module`. */
  40146. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  40147. /** Detect the popular CommonJS extension `module.exports`. */
  40148. var moduleExports = freeModule && freeModule.exports === freeExports;
  40149. /** Built-in value references. */
  40150. var Buffer = moduleExports ? root.Buffer : undefined;
  40151. /* Built-in method references for those with the same name as other `lodash` methods. */
  40152. var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
  40153. /**
  40154. * Checks if `value` is a buffer.
  40155. *
  40156. * @static
  40157. * @memberOf _
  40158. * @since 4.3.0
  40159. * @category Lang
  40160. * @param {*} value The value to check.
  40161. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  40162. * @example
  40163. *
  40164. * _.isBuffer(new Buffer(2));
  40165. * // => true
  40166. *
  40167. * _.isBuffer(new Uint8Array(2));
  40168. * // => false
  40169. */
  40170. var isBuffer = nativeIsBuffer || stubFalse;
  40171. module.exports = isBuffer;
  40172. });
  40173. $__System.registerDynamic('13c', [], true, function ($__require, exports, module) {
  40174. var global = this || self,
  40175. GLOBAL = global;
  40176. /** Used as references for various `Number` constants. */
  40177. var MAX_SAFE_INTEGER = 9007199254740991;
  40178. /** Used to detect unsigned integer values. */
  40179. var reIsUint = /^(?:0|[1-9]\d*)$/;
  40180. /**
  40181. * Checks if `value` is a valid array-like index.
  40182. *
  40183. * @private
  40184. * @param {*} value The value to check.
  40185. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  40186. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  40187. */
  40188. function isIndex(value, length) {
  40189. length = length == null ? MAX_SAFE_INTEGER : length;
  40190. return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
  40191. }
  40192. module.exports = isIndex;
  40193. });
  40194. $__System.registerDynamic('7b', [], true, function ($__require, exports, module) {
  40195. var global = this || self,
  40196. GLOBAL = global;
  40197. /**
  40198. * Checks if `value` is object-like. A value is object-like if it's not `null`
  40199. * and has a `typeof` result of "object".
  40200. *
  40201. * @static
  40202. * @memberOf _
  40203. * @since 4.0.0
  40204. * @category Lang
  40205. * @param {*} value The value to check.
  40206. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  40207. * @example
  40208. *
  40209. * _.isObjectLike({});
  40210. * // => true
  40211. *
  40212. * _.isObjectLike([1, 2, 3]);
  40213. * // => true
  40214. *
  40215. * _.isObjectLike(_.noop);
  40216. * // => false
  40217. *
  40218. * _.isObjectLike(null);
  40219. * // => false
  40220. */
  40221. function isObjectLike(value) {
  40222. return value != null && typeof value == 'object';
  40223. }
  40224. module.exports = isObjectLike;
  40225. });
  40226. $__System.registerDynamic('1eb', ['185', '13d', '7b'], true, function ($__require, exports, module) {
  40227. var global = this || self,
  40228. GLOBAL = global;
  40229. var baseGetTag = $__require('185'),
  40230. isLength = $__require('13d'),
  40231. isObjectLike = $__require('7b');
  40232. /** `Object#toString` result references. */
  40233. var argsTag = '[object Arguments]',
  40234. arrayTag = '[object Array]',
  40235. boolTag = '[object Boolean]',
  40236. dateTag = '[object Date]',
  40237. errorTag = '[object Error]',
  40238. funcTag = '[object Function]',
  40239. mapTag = '[object Map]',
  40240. numberTag = '[object Number]',
  40241. objectTag = '[object Object]',
  40242. regexpTag = '[object RegExp]',
  40243. setTag = '[object Set]',
  40244. stringTag = '[object String]',
  40245. weakMapTag = '[object WeakMap]';
  40246. var arrayBufferTag = '[object ArrayBuffer]',
  40247. dataViewTag = '[object DataView]',
  40248. float32Tag = '[object Float32Array]',
  40249. float64Tag = '[object Float64Array]',
  40250. int8Tag = '[object Int8Array]',
  40251. int16Tag = '[object Int16Array]',
  40252. int32Tag = '[object Int32Array]',
  40253. uint8Tag = '[object Uint8Array]',
  40254. uint8ClampedTag = '[object Uint8ClampedArray]',
  40255. uint16Tag = '[object Uint16Array]',
  40256. uint32Tag = '[object Uint32Array]';
  40257. /** Used to identify `toStringTag` values of typed arrays. */
  40258. var typedArrayTags = {};
  40259. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  40260. 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;
  40261. /**
  40262. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  40263. *
  40264. * @private
  40265. * @param {*} value The value to check.
  40266. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  40267. */
  40268. function baseIsTypedArray(value) {
  40269. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  40270. }
  40271. module.exports = baseIsTypedArray;
  40272. });
  40273. $__System.registerDynamic("93", [], true, function ($__require, exports, module) {
  40274. var global = this || self,
  40275. GLOBAL = global;
  40276. /**
  40277. * The base implementation of `_.unary` without support for storing metadata.
  40278. *
  40279. * @private
  40280. * @param {Function} func The function to cap arguments for.
  40281. * @returns {Function} Returns the new capped function.
  40282. */
  40283. function baseUnary(func) {
  40284. return function (value) {
  40285. return func(value);
  40286. };
  40287. }
  40288. module.exports = baseUnary;
  40289. });
  40290. $__System.registerDynamic('1bb', ['1ec'], true, function ($__require, exports, module) {
  40291. var global = this || self,
  40292. GLOBAL = global;
  40293. var freeGlobal = $__require('1ec');
  40294. /** Detect free variable `exports`. */
  40295. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  40296. /** Detect free variable `module`. */
  40297. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  40298. /** Detect the popular CommonJS extension `module.exports`. */
  40299. var moduleExports = freeModule && freeModule.exports === freeExports;
  40300. /** Detect free variable `process` from Node.js. */
  40301. var freeProcess = moduleExports && freeGlobal.process;
  40302. /** Used to access faster Node.js helpers. */
  40303. var nodeUtil = function () {
  40304. try {
  40305. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  40306. } catch (e) {}
  40307. }();
  40308. module.exports = nodeUtil;
  40309. });
  40310. $__System.registerDynamic('7a', ['1eb', '93', '1bb'], true, function ($__require, exports, module) {
  40311. var global = this || self,
  40312. GLOBAL = global;
  40313. var baseIsTypedArray = $__require('1eb'),
  40314. baseUnary = $__require('93'),
  40315. nodeUtil = $__require('1bb');
  40316. /* Node.js helper references. */
  40317. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  40318. /**
  40319. * Checks if `value` is classified as a typed array.
  40320. *
  40321. * @static
  40322. * @memberOf _
  40323. * @since 3.0.0
  40324. * @category Lang
  40325. * @param {*} value The value to check.
  40326. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  40327. * @example
  40328. *
  40329. * _.isTypedArray(new Uint8Array);
  40330. * // => true
  40331. *
  40332. * _.isTypedArray([]);
  40333. * // => false
  40334. */
  40335. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  40336. module.exports = isTypedArray;
  40337. });
  40338. $__System.registerDynamic('1d4', ['1e8', '62', '4b', '79', '13c', '7a'], true, function ($__require, exports, module) {
  40339. var global = this || self,
  40340. GLOBAL = global;
  40341. var baseTimes = $__require('1e8'),
  40342. isArguments = $__require('62'),
  40343. isArray = $__require('4b'),
  40344. isBuffer = $__require('79'),
  40345. isIndex = $__require('13c'),
  40346. isTypedArray = $__require('7a');
  40347. /** Used for built-in method references. */
  40348. var objectProto = Object.prototype;
  40349. /** Used to check objects for own properties. */
  40350. var hasOwnProperty = objectProto.hasOwnProperty;
  40351. /**
  40352. * Creates an array of the enumerable property names of the array-like `value`.
  40353. *
  40354. * @private
  40355. * @param {*} value The value to query.
  40356. * @param {boolean} inherited Specify returning inherited property names.
  40357. * @returns {Array} Returns the array of property names.
  40358. */
  40359. function arrayLikeKeys(value, inherited) {
  40360. var isArr = isArray(value),
  40361. isArg = !isArr && isArguments(value),
  40362. isBuff = !isArr && !isArg && isBuffer(value),
  40363. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  40364. skipIndexes = isArr || isArg || isBuff || isType,
  40365. result = skipIndexes ? baseTimes(value.length, String) : [],
  40366. length = result.length;
  40367. for (var key in value) {
  40368. if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (
  40369. // Safari 9 has enumerable `arguments.length` in strict mode.
  40370. key == 'length' ||
  40371. // Node.js 0.10 has enumerable non-index properties on buffers.
  40372. isBuff && (key == 'offset' || key == 'parent') ||
  40373. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  40374. isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') ||
  40375. // Skip index properties.
  40376. isIndex(key, length)))) {
  40377. result.push(key);
  40378. }
  40379. }
  40380. return result;
  40381. }
  40382. module.exports = arrayLikeKeys;
  40383. });
  40384. $__System.registerDynamic('143', [], true, function ($__require, exports, module) {
  40385. var global = this || self,
  40386. GLOBAL = global;
  40387. /** Used for built-in method references. */
  40388. var objectProto = Object.prototype;
  40389. /**
  40390. * Checks if `value` is likely a prototype object.
  40391. *
  40392. * @private
  40393. * @param {*} value The value to check.
  40394. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  40395. */
  40396. function isPrototype(value) {
  40397. var Ctor = value && value.constructor,
  40398. proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
  40399. return value === proto;
  40400. }
  40401. module.exports = isPrototype;
  40402. });
  40403. $__System.registerDynamic("1e7", [], true, function ($__require, exports, module) {
  40404. var global = this || self,
  40405. GLOBAL = global;
  40406. /**
  40407. * Creates a unary function that invokes `func` with its argument transformed.
  40408. *
  40409. * @private
  40410. * @param {Function} func The function to wrap.
  40411. * @param {Function} transform The argument transform.
  40412. * @returns {Function} Returns the new function.
  40413. */
  40414. function overArg(func, transform) {
  40415. return function (arg) {
  40416. return func(transform(arg));
  40417. };
  40418. }
  40419. module.exports = overArg;
  40420. });
  40421. $__System.registerDynamic('1ed', ['1e7'], true, function ($__require, exports, module) {
  40422. var global = this || self,
  40423. GLOBAL = global;
  40424. var overArg = $__require('1e7');
  40425. /* Built-in method references for those with the same name as other `lodash` methods. */
  40426. var nativeKeys = overArg(Object.keys, Object);
  40427. module.exports = nativeKeys;
  40428. });
  40429. $__System.registerDynamic('1ee', ['143', '1ed'], true, function ($__require, exports, module) {
  40430. var global = this || self,
  40431. GLOBAL = global;
  40432. var isPrototype = $__require('143'),
  40433. nativeKeys = $__require('1ed');
  40434. /** Used for built-in method references. */
  40435. var objectProto = Object.prototype;
  40436. /** Used to check objects for own properties. */
  40437. var hasOwnProperty = objectProto.hasOwnProperty;
  40438. /**
  40439. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  40440. *
  40441. * @private
  40442. * @param {Object} object The object to query.
  40443. * @returns {Array} Returns the array of property names.
  40444. */
  40445. function baseKeys(object) {
  40446. if (!isPrototype(object)) {
  40447. return nativeKeys(object);
  40448. }
  40449. var result = [];
  40450. for (var key in Object(object)) {
  40451. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  40452. result.push(key);
  40453. }
  40454. }
  40455. return result;
  40456. }
  40457. module.exports = baseKeys;
  40458. });
  40459. $__System.registerDynamic('13d', [], true, function ($__require, exports, module) {
  40460. var global = this || self,
  40461. GLOBAL = global;
  40462. /** Used as references for various `Number` constants. */
  40463. var MAX_SAFE_INTEGER = 9007199254740991;
  40464. /**
  40465. * Checks if `value` is a valid array-like length.
  40466. *
  40467. * **Note:** This method is loosely based on
  40468. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  40469. *
  40470. * @static
  40471. * @memberOf _
  40472. * @since 4.0.0
  40473. * @category Lang
  40474. * @param {*} value The value to check.
  40475. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  40476. * @example
  40477. *
  40478. * _.isLength(3);
  40479. * // => true
  40480. *
  40481. * _.isLength(Number.MIN_VALUE);
  40482. * // => false
  40483. *
  40484. * _.isLength(Infinity);
  40485. * // => false
  40486. *
  40487. * _.isLength('3');
  40488. * // => false
  40489. */
  40490. function isLength(value) {
  40491. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  40492. }
  40493. module.exports = isLength;
  40494. });
  40495. $__System.registerDynamic('3f', ['be', '13d'], true, function ($__require, exports, module) {
  40496. var global = this || self,
  40497. GLOBAL = global;
  40498. var isFunction = $__require('be'),
  40499. isLength = $__require('13d');
  40500. /**
  40501. * Checks if `value` is array-like. A value is considered array-like if it's
  40502. * not a function and has a `value.length` that's an integer greater than or
  40503. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  40504. *
  40505. * @static
  40506. * @memberOf _
  40507. * @since 4.0.0
  40508. * @category Lang
  40509. * @param {*} value The value to check.
  40510. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  40511. * @example
  40512. *
  40513. * _.isArrayLike([1, 2, 3]);
  40514. * // => true
  40515. *
  40516. * _.isArrayLike(document.body.children);
  40517. * // => true
  40518. *
  40519. * _.isArrayLike('abc');
  40520. * // => true
  40521. *
  40522. * _.isArrayLike(_.noop);
  40523. * // => false
  40524. */
  40525. function isArrayLike(value) {
  40526. return value != null && isLength(value.length) && !isFunction(value);
  40527. }
  40528. module.exports = isArrayLike;
  40529. });
  40530. $__System.registerDynamic('40', ['1d4', '1ee', '3f'], true, function ($__require, exports, module) {
  40531. var global = this || self,
  40532. GLOBAL = global;
  40533. var arrayLikeKeys = $__require('1d4'),
  40534. baseKeys = $__require('1ee'),
  40535. isArrayLike = $__require('3f');
  40536. /**
  40537. * Creates an array of the own enumerable property names of `object`.
  40538. *
  40539. * **Note:** Non-object values are coerced to objects. See the
  40540. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  40541. * for more details.
  40542. *
  40543. * @static
  40544. * @since 0.1.0
  40545. * @memberOf _
  40546. * @category Object
  40547. * @param {Object} object The object to query.
  40548. * @returns {Array} Returns the array of property names.
  40549. * @example
  40550. *
  40551. * function Foo() {
  40552. * this.a = 1;
  40553. * this.b = 2;
  40554. * }
  40555. *
  40556. * Foo.prototype.c = 3;
  40557. *
  40558. * _.keys(new Foo);
  40559. * // => ['a', 'b'] (iteration order is not guaranteed)
  40560. *
  40561. * _.keys('hi');
  40562. * // => ['0', '1']
  40563. */
  40564. function keys(object) {
  40565. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  40566. }
  40567. module.exports = keys;
  40568. });
  40569. $__System.registerDynamic('b1', ['66', '1c6', '142', '1c7', '1c8', 'ba', 'bc', '1ca', '1cd', '76', '1d5', '78', '1db', '1e5', 'bd', '4b', '79', '81', '40'], true, function ($__require, exports, module) {
  40570. var global = this || self,
  40571. GLOBAL = global;
  40572. var Stack = $__require('66'),
  40573. arrayEach = $__require('1c6'),
  40574. assignValue = $__require('142'),
  40575. baseAssign = $__require('1c7'),
  40576. baseAssignIn = $__require('1c8'),
  40577. cloneBuffer = $__require('ba'),
  40578. copyArray = $__require('bc'),
  40579. copySymbols = $__require('1ca'),
  40580. copySymbolsIn = $__require('1cd'),
  40581. getAllKeys = $__require('76'),
  40582. getAllKeysIn = $__require('1d5'),
  40583. getTag = $__require('78'),
  40584. initCloneArray = $__require('1db'),
  40585. initCloneByTag = $__require('1e5'),
  40586. initCloneObject = $__require('bd'),
  40587. isArray = $__require('4b'),
  40588. isBuffer = $__require('79'),
  40589. isObject = $__require('81'),
  40590. keys = $__require('40');
  40591. /** Used to compose bitmasks for cloning. */
  40592. var CLONE_DEEP_FLAG = 1,
  40593. CLONE_FLAT_FLAG = 2,
  40594. CLONE_SYMBOLS_FLAG = 4;
  40595. /** `Object#toString` result references. */
  40596. var argsTag = '[object Arguments]',
  40597. arrayTag = '[object Array]',
  40598. boolTag = '[object Boolean]',
  40599. dateTag = '[object Date]',
  40600. errorTag = '[object Error]',
  40601. funcTag = '[object Function]',
  40602. genTag = '[object GeneratorFunction]',
  40603. mapTag = '[object Map]',
  40604. numberTag = '[object Number]',
  40605. objectTag = '[object Object]',
  40606. regexpTag = '[object RegExp]',
  40607. setTag = '[object Set]',
  40608. stringTag = '[object String]',
  40609. symbolTag = '[object Symbol]',
  40610. weakMapTag = '[object WeakMap]';
  40611. var arrayBufferTag = '[object ArrayBuffer]',
  40612. dataViewTag = '[object DataView]',
  40613. float32Tag = '[object Float32Array]',
  40614. float64Tag = '[object Float64Array]',
  40615. int8Tag = '[object Int8Array]',
  40616. int16Tag = '[object Int16Array]',
  40617. int32Tag = '[object Int32Array]',
  40618. uint8Tag = '[object Uint8Array]',
  40619. uint8ClampedTag = '[object Uint8ClampedArray]',
  40620. uint16Tag = '[object Uint16Array]',
  40621. uint32Tag = '[object Uint32Array]';
  40622. /** Used to identify `toStringTag` values supported by `_.clone`. */
  40623. var cloneableTags = {};
  40624. 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;
  40625. cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  40626. /**
  40627. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  40628. * traversed objects.
  40629. *
  40630. * @private
  40631. * @param {*} value The value to clone.
  40632. * @param {boolean} bitmask The bitmask flags.
  40633. * 1 - Deep clone
  40634. * 2 - Flatten inherited properties
  40635. * 4 - Clone symbols
  40636. * @param {Function} [customizer] The function to customize cloning.
  40637. * @param {string} [key] The key of `value`.
  40638. * @param {Object} [object] The parent object of `value`.
  40639. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  40640. * @returns {*} Returns the cloned value.
  40641. */
  40642. function baseClone(value, bitmask, customizer, key, object, stack) {
  40643. var result,
  40644. isDeep = bitmask & CLONE_DEEP_FLAG,
  40645. isFlat = bitmask & CLONE_FLAT_FLAG,
  40646. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  40647. if (customizer) {
  40648. result = object ? customizer(value, key, object, stack) : customizer(value);
  40649. }
  40650. if (result !== undefined) {
  40651. return result;
  40652. }
  40653. if (!isObject(value)) {
  40654. return value;
  40655. }
  40656. var isArr = isArray(value);
  40657. if (isArr) {
  40658. result = initCloneArray(value);
  40659. if (!isDeep) {
  40660. return copyArray(value, result);
  40661. }
  40662. } else {
  40663. var tag = getTag(value),
  40664. isFunc = tag == funcTag || tag == genTag;
  40665. if (isBuffer(value)) {
  40666. return cloneBuffer(value, isDeep);
  40667. }
  40668. if (tag == objectTag || tag == argsTag || isFunc && !object) {
  40669. result = isFlat || isFunc ? {} : initCloneObject(value);
  40670. if (!isDeep) {
  40671. return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
  40672. }
  40673. } else {
  40674. if (!cloneableTags[tag]) {
  40675. return object ? value : {};
  40676. }
  40677. result = initCloneByTag(value, tag, baseClone, isDeep);
  40678. }
  40679. }
  40680. // Check for circular references and return its corresponding clone.
  40681. stack || (stack = new Stack());
  40682. var stacked = stack.get(value);
  40683. if (stacked) {
  40684. return stacked;
  40685. }
  40686. stack.set(value, result);
  40687. var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
  40688. var props = isArr ? undefined : keysFunc(value);
  40689. arrayEach(props || value, function (subValue, key) {
  40690. if (props) {
  40691. key = subValue;
  40692. subValue = value[key];
  40693. }
  40694. // Recursively populate clone (susceptible to call stack limits).
  40695. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  40696. });
  40697. return result;
  40698. }
  40699. module.exports = baseClone;
  40700. });
  40701. $__System.registerDynamic('ce', ['b1'], true, function ($__require, exports, module) {
  40702. var global = this || self,
  40703. GLOBAL = global;
  40704. var baseClone = $__require('b1');
  40705. /** Used to compose bitmasks for cloning. */
  40706. var CLONE_SYMBOLS_FLAG = 4;
  40707. /**
  40708. * Creates a shallow clone of `value`.
  40709. *
  40710. * **Note:** This method is loosely based on the
  40711. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  40712. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  40713. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  40714. * arrays. The own enumerable properties of `arguments` objects are cloned
  40715. * as plain objects. An empty object is returned for uncloneable values such
  40716. * as error objects, functions, DOM nodes, and WeakMaps.
  40717. *
  40718. * @static
  40719. * @memberOf _
  40720. * @since 0.1.0
  40721. * @category Lang
  40722. * @param {*} value The value to clone.
  40723. * @returns {*} Returns the cloned value.
  40724. * @see _.cloneDeep
  40725. * @example
  40726. *
  40727. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  40728. *
  40729. * var shallow = _.clone(objects);
  40730. * console.log(shallow[0] === objects[0]);
  40731. * // => true
  40732. */
  40733. function clone(value) {
  40734. return baseClone(value, CLONE_SYMBOLS_FLAG);
  40735. }
  40736. module.exports = clone;
  40737. });
  40738. $__System.registerDynamic('1ef', ['1f0'], true, function ($__require, exports, module) {
  40739. var global = this || self,
  40740. GLOBAL = global;
  40741. var nativeCreate = $__require('1f0');
  40742. /**
  40743. * Removes all key-value entries from the hash.
  40744. *
  40745. * @private
  40746. * @name clear
  40747. * @memberOf Hash
  40748. */
  40749. function hashClear() {
  40750. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  40751. this.size = 0;
  40752. }
  40753. module.exports = hashClear;
  40754. });
  40755. $__System.registerDynamic("1f1", [], true, function ($__require, exports, module) {
  40756. var global = this || self,
  40757. GLOBAL = global;
  40758. /**
  40759. * Removes `key` and its value from the hash.
  40760. *
  40761. * @private
  40762. * @name delete
  40763. * @memberOf Hash
  40764. * @param {Object} hash The hash to modify.
  40765. * @param {string} key The key of the value to remove.
  40766. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  40767. */
  40768. function hashDelete(key) {
  40769. var result = this.has(key) && delete this.__data__[key];
  40770. this.size -= result ? 1 : 0;
  40771. return result;
  40772. }
  40773. module.exports = hashDelete;
  40774. });
  40775. $__System.registerDynamic('1f2', ['1f0'], true, function ($__require, exports, module) {
  40776. var global = this || self,
  40777. GLOBAL = global;
  40778. var nativeCreate = $__require('1f0');
  40779. /** Used to stand-in for `undefined` hash values. */
  40780. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  40781. /** Used for built-in method references. */
  40782. var objectProto = Object.prototype;
  40783. /** Used to check objects for own properties. */
  40784. var hasOwnProperty = objectProto.hasOwnProperty;
  40785. /**
  40786. * Gets the hash value for `key`.
  40787. *
  40788. * @private
  40789. * @name get
  40790. * @memberOf Hash
  40791. * @param {string} key The key of the value to get.
  40792. * @returns {*} Returns the entry value.
  40793. */
  40794. function hashGet(key) {
  40795. var data = this.__data__;
  40796. if (nativeCreate) {
  40797. var result = data[key];
  40798. return result === HASH_UNDEFINED ? undefined : result;
  40799. }
  40800. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  40801. }
  40802. module.exports = hashGet;
  40803. });
  40804. $__System.registerDynamic('1f3', ['1f0'], true, function ($__require, exports, module) {
  40805. var global = this || self,
  40806. GLOBAL = global;
  40807. var nativeCreate = $__require('1f0');
  40808. /** Used for built-in method references. */
  40809. var objectProto = Object.prototype;
  40810. /** Used to check objects for own properties. */
  40811. var hasOwnProperty = objectProto.hasOwnProperty;
  40812. /**
  40813. * Checks if a hash value for `key` exists.
  40814. *
  40815. * @private
  40816. * @name has
  40817. * @memberOf Hash
  40818. * @param {string} key The key of the entry to check.
  40819. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  40820. */
  40821. function hashHas(key) {
  40822. var data = this.__data__;
  40823. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  40824. }
  40825. module.exports = hashHas;
  40826. });
  40827. $__System.registerDynamic('1f0', ['1cc'], true, function ($__require, exports, module) {
  40828. var global = this || self,
  40829. GLOBAL = global;
  40830. var getNative = $__require('1cc');
  40831. /* Built-in method references that are verified to be native. */
  40832. var nativeCreate = getNative(Object, 'create');
  40833. module.exports = nativeCreate;
  40834. });
  40835. $__System.registerDynamic('1f4', ['1f0'], true, function ($__require, exports, module) {
  40836. var global = this || self,
  40837. GLOBAL = global;
  40838. var nativeCreate = $__require('1f0');
  40839. /** Used to stand-in for `undefined` hash values. */
  40840. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  40841. /**
  40842. * Sets the hash `key` to `value`.
  40843. *
  40844. * @private
  40845. * @name set
  40846. * @memberOf Hash
  40847. * @param {string} key The key of the value to set.
  40848. * @param {*} value The value to set.
  40849. * @returns {Object} Returns the hash instance.
  40850. */
  40851. function hashSet(key, value) {
  40852. var data = this.__data__;
  40853. this.size += this.has(key) ? 0 : 1;
  40854. data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
  40855. return this;
  40856. }
  40857. module.exports = hashSet;
  40858. });
  40859. $__System.registerDynamic('1f5', ['1ef', '1f1', '1f2', '1f3', '1f4'], true, function ($__require, exports, module) {
  40860. var global = this || self,
  40861. GLOBAL = global;
  40862. var hashClear = $__require('1ef'),
  40863. hashDelete = $__require('1f1'),
  40864. hashGet = $__require('1f2'),
  40865. hashHas = $__require('1f3'),
  40866. hashSet = $__require('1f4');
  40867. /**
  40868. * Creates a hash object.
  40869. *
  40870. * @private
  40871. * @constructor
  40872. * @param {Array} [entries] The key-value pairs to cache.
  40873. */
  40874. function Hash(entries) {
  40875. var index = -1,
  40876. length = entries == null ? 0 : entries.length;
  40877. this.clear();
  40878. while (++index < length) {
  40879. var entry = entries[index];
  40880. this.set(entry[0], entry[1]);
  40881. }
  40882. }
  40883. // Add methods to `Hash`.
  40884. Hash.prototype.clear = hashClear;
  40885. Hash.prototype['delete'] = hashDelete;
  40886. Hash.prototype.get = hashGet;
  40887. Hash.prototype.has = hashHas;
  40888. Hash.prototype.set = hashSet;
  40889. module.exports = Hash;
  40890. });
  40891. $__System.registerDynamic("1f6", [], true, function ($__require, exports, module) {
  40892. var global = this || self,
  40893. GLOBAL = global;
  40894. /**
  40895. * Removes all key-value entries from the list cache.
  40896. *
  40897. * @private
  40898. * @name clear
  40899. * @memberOf ListCache
  40900. */
  40901. function listCacheClear() {
  40902. this.__data__ = [];
  40903. this.size = 0;
  40904. }
  40905. module.exports = listCacheClear;
  40906. });
  40907. $__System.registerDynamic('1f7', ['1f8'], true, function ($__require, exports, module) {
  40908. var global = this || self,
  40909. GLOBAL = global;
  40910. var assocIndexOf = $__require('1f8');
  40911. /** Used for built-in method references. */
  40912. var arrayProto = Array.prototype;
  40913. /** Built-in value references. */
  40914. var splice = arrayProto.splice;
  40915. /**
  40916. * Removes `key` and its value from the list cache.
  40917. *
  40918. * @private
  40919. * @name delete
  40920. * @memberOf ListCache
  40921. * @param {string} key The key of the value to remove.
  40922. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  40923. */
  40924. function listCacheDelete(key) {
  40925. var data = this.__data__,
  40926. index = assocIndexOf(data, key);
  40927. if (index < 0) {
  40928. return false;
  40929. }
  40930. var lastIndex = data.length - 1;
  40931. if (index == lastIndex) {
  40932. data.pop();
  40933. } else {
  40934. splice.call(data, index, 1);
  40935. }
  40936. --this.size;
  40937. return true;
  40938. }
  40939. module.exports = listCacheDelete;
  40940. });
  40941. $__System.registerDynamic('1f9', ['1f8'], true, function ($__require, exports, module) {
  40942. var global = this || self,
  40943. GLOBAL = global;
  40944. var assocIndexOf = $__require('1f8');
  40945. /**
  40946. * Gets the list cache value for `key`.
  40947. *
  40948. * @private
  40949. * @name get
  40950. * @memberOf ListCache
  40951. * @param {string} key The key of the value to get.
  40952. * @returns {*} Returns the entry value.
  40953. */
  40954. function listCacheGet(key) {
  40955. var data = this.__data__,
  40956. index = assocIndexOf(data, key);
  40957. return index < 0 ? undefined : data[index][1];
  40958. }
  40959. module.exports = listCacheGet;
  40960. });
  40961. $__System.registerDynamic('1fa', ['1f8'], true, function ($__require, exports, module) {
  40962. var global = this || self,
  40963. GLOBAL = global;
  40964. var assocIndexOf = $__require('1f8');
  40965. /**
  40966. * Checks if a list cache value for `key` exists.
  40967. *
  40968. * @private
  40969. * @name has
  40970. * @memberOf ListCache
  40971. * @param {string} key The key of the entry to check.
  40972. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  40973. */
  40974. function listCacheHas(key) {
  40975. return assocIndexOf(this.__data__, key) > -1;
  40976. }
  40977. module.exports = listCacheHas;
  40978. });
  40979. $__System.registerDynamic("72", [], true, function ($__require, exports, module) {
  40980. var global = this || self,
  40981. GLOBAL = global;
  40982. /**
  40983. * Performs a
  40984. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  40985. * comparison between two values to determine if they are equivalent.
  40986. *
  40987. * @static
  40988. * @memberOf _
  40989. * @since 4.0.0
  40990. * @category Lang
  40991. * @param {*} value The value to compare.
  40992. * @param {*} other The other value to compare.
  40993. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  40994. * @example
  40995. *
  40996. * var object = { 'a': 1 };
  40997. * var other = { 'a': 1 };
  40998. *
  40999. * _.eq(object, object);
  41000. * // => true
  41001. *
  41002. * _.eq(object, other);
  41003. * // => false
  41004. *
  41005. * _.eq('a', 'a');
  41006. * // => true
  41007. *
  41008. * _.eq('a', Object('a'));
  41009. * // => false
  41010. *
  41011. * _.eq(NaN, NaN);
  41012. * // => true
  41013. */
  41014. function eq(value, other) {
  41015. return value === other || value !== value && other !== other;
  41016. }
  41017. module.exports = eq;
  41018. });
  41019. $__System.registerDynamic('1f8', ['72'], true, function ($__require, exports, module) {
  41020. var global = this || self,
  41021. GLOBAL = global;
  41022. var eq = $__require('72');
  41023. /**
  41024. * Gets the index at which the `key` is found in `array` of key-value pairs.
  41025. *
  41026. * @private
  41027. * @param {Array} array The array to inspect.
  41028. * @param {*} key The key to search for.
  41029. * @returns {number} Returns the index of the matched value, else `-1`.
  41030. */
  41031. function assocIndexOf(array, key) {
  41032. var length = array.length;
  41033. while (length--) {
  41034. if (eq(array[length][0], key)) {
  41035. return length;
  41036. }
  41037. }
  41038. return -1;
  41039. }
  41040. module.exports = assocIndexOf;
  41041. });
  41042. $__System.registerDynamic('1fb', ['1f8'], true, function ($__require, exports, module) {
  41043. var global = this || self,
  41044. GLOBAL = global;
  41045. var assocIndexOf = $__require('1f8');
  41046. /**
  41047. * Sets the list cache `key` to `value`.
  41048. *
  41049. * @private
  41050. * @name set
  41051. * @memberOf ListCache
  41052. * @param {string} key The key of the value to set.
  41053. * @param {*} value The value to set.
  41054. * @returns {Object} Returns the list cache instance.
  41055. */
  41056. function listCacheSet(key, value) {
  41057. var data = this.__data__,
  41058. index = assocIndexOf(data, key);
  41059. if (index < 0) {
  41060. ++this.size;
  41061. data.push([key, value]);
  41062. } else {
  41063. data[index][1] = value;
  41064. }
  41065. return this;
  41066. }
  41067. module.exports = listCacheSet;
  41068. });
  41069. $__System.registerDynamic('1c0', ['1f6', '1f7', '1f9', '1fa', '1fb'], true, function ($__require, exports, module) {
  41070. var global = this || self,
  41071. GLOBAL = global;
  41072. var listCacheClear = $__require('1f6'),
  41073. listCacheDelete = $__require('1f7'),
  41074. listCacheGet = $__require('1f9'),
  41075. listCacheHas = $__require('1fa'),
  41076. listCacheSet = $__require('1fb');
  41077. /**
  41078. * Creates an list cache object.
  41079. *
  41080. * @private
  41081. * @constructor
  41082. * @param {Array} [entries] The key-value pairs to cache.
  41083. */
  41084. function ListCache(entries) {
  41085. var index = -1,
  41086. length = entries == null ? 0 : entries.length;
  41087. this.clear();
  41088. while (++index < length) {
  41089. var entry = entries[index];
  41090. this.set(entry[0], entry[1]);
  41091. }
  41092. }
  41093. // Add methods to `ListCache`.
  41094. ListCache.prototype.clear = listCacheClear;
  41095. ListCache.prototype['delete'] = listCacheDelete;
  41096. ListCache.prototype.get = listCacheGet;
  41097. ListCache.prototype.has = listCacheHas;
  41098. ListCache.prototype.set = listCacheSet;
  41099. module.exports = ListCache;
  41100. });
  41101. $__System.registerDynamic('1c5', ['1cc', '1c9'], true, function ($__require, exports, module) {
  41102. var global = this || self,
  41103. GLOBAL = global;
  41104. var getNative = $__require('1cc'),
  41105. root = $__require('1c9');
  41106. /* Built-in method references that are verified to be native. */
  41107. var Map = getNative(root, 'Map');
  41108. module.exports = Map;
  41109. });
  41110. $__System.registerDynamic('1fc', ['1f5', '1c0', '1c5'], true, function ($__require, exports, module) {
  41111. var global = this || self,
  41112. GLOBAL = global;
  41113. var Hash = $__require('1f5'),
  41114. ListCache = $__require('1c0'),
  41115. Map = $__require('1c5');
  41116. /**
  41117. * Removes all key-value entries from the map.
  41118. *
  41119. * @private
  41120. * @name clear
  41121. * @memberOf MapCache
  41122. */
  41123. function mapCacheClear() {
  41124. this.size = 0;
  41125. this.__data__ = {
  41126. 'hash': new Hash(),
  41127. 'map': new (Map || ListCache)(),
  41128. 'string': new Hash()
  41129. };
  41130. }
  41131. module.exports = mapCacheClear;
  41132. });
  41133. $__System.registerDynamic('1fd', ['1fe'], true, function ($__require, exports, module) {
  41134. var global = this || self,
  41135. GLOBAL = global;
  41136. var getMapData = $__require('1fe');
  41137. /**
  41138. * Removes `key` and its value from the map.
  41139. *
  41140. * @private
  41141. * @name delete
  41142. * @memberOf MapCache
  41143. * @param {string} key The key of the value to remove.
  41144. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  41145. */
  41146. function mapCacheDelete(key) {
  41147. var result = getMapData(this, key)['delete'](key);
  41148. this.size -= result ? 1 : 0;
  41149. return result;
  41150. }
  41151. module.exports = mapCacheDelete;
  41152. });
  41153. $__System.registerDynamic('1ff', ['1fe'], true, function ($__require, exports, module) {
  41154. var global = this || self,
  41155. GLOBAL = global;
  41156. var getMapData = $__require('1fe');
  41157. /**
  41158. * Gets the map value for `key`.
  41159. *
  41160. * @private
  41161. * @name get
  41162. * @memberOf MapCache
  41163. * @param {string} key The key of the value to get.
  41164. * @returns {*} Returns the entry value.
  41165. */
  41166. function mapCacheGet(key) {
  41167. return getMapData(this, key).get(key);
  41168. }
  41169. module.exports = mapCacheGet;
  41170. });
  41171. $__System.registerDynamic('200', ['1fe'], true, function ($__require, exports, module) {
  41172. var global = this || self,
  41173. GLOBAL = global;
  41174. var getMapData = $__require('1fe');
  41175. /**
  41176. * Checks if a map value for `key` exists.
  41177. *
  41178. * @private
  41179. * @name has
  41180. * @memberOf MapCache
  41181. * @param {string} key The key of the entry to check.
  41182. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  41183. */
  41184. function mapCacheHas(key) {
  41185. return getMapData(this, key).has(key);
  41186. }
  41187. module.exports = mapCacheHas;
  41188. });
  41189. $__System.registerDynamic('201', [], true, function ($__require, exports, module) {
  41190. var global = this || self,
  41191. GLOBAL = global;
  41192. /**
  41193. * Checks if `value` is suitable for use as unique object key.
  41194. *
  41195. * @private
  41196. * @param {*} value The value to check.
  41197. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  41198. */
  41199. function isKeyable(value) {
  41200. var type = typeof value;
  41201. return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
  41202. }
  41203. module.exports = isKeyable;
  41204. });
  41205. $__System.registerDynamic('1fe', ['201'], true, function ($__require, exports, module) {
  41206. var global = this || self,
  41207. GLOBAL = global;
  41208. var isKeyable = $__require('201');
  41209. /**
  41210. * Gets the data for `map`.
  41211. *
  41212. * @private
  41213. * @param {Object} map The map to query.
  41214. * @param {string} key The reference key.
  41215. * @returns {*} Returns the map data.
  41216. */
  41217. function getMapData(map, key) {
  41218. var data = map.__data__;
  41219. return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
  41220. }
  41221. module.exports = getMapData;
  41222. });
  41223. $__System.registerDynamic('202', ['1fe'], true, function ($__require, exports, module) {
  41224. var global = this || self,
  41225. GLOBAL = global;
  41226. var getMapData = $__require('1fe');
  41227. /**
  41228. * Sets the map `key` to `value`.
  41229. *
  41230. * @private
  41231. * @name set
  41232. * @memberOf MapCache
  41233. * @param {string} key The key of the value to set.
  41234. * @param {*} value The value to set.
  41235. * @returns {Object} Returns the map cache instance.
  41236. */
  41237. function mapCacheSet(key, value) {
  41238. var data = getMapData(this, key),
  41239. size = data.size;
  41240. data.set(key, value);
  41241. this.size += data.size == size ? 0 : 1;
  41242. return this;
  41243. }
  41244. module.exports = mapCacheSet;
  41245. });
  41246. $__System.registerDynamic('139', ['1fc', '1fd', '1ff', '200', '202'], true, function ($__require, exports, module) {
  41247. var global = this || self,
  41248. GLOBAL = global;
  41249. var mapCacheClear = $__require('1fc'),
  41250. mapCacheDelete = $__require('1fd'),
  41251. mapCacheGet = $__require('1ff'),
  41252. mapCacheHas = $__require('200'),
  41253. mapCacheSet = $__require('202');
  41254. /**
  41255. * Creates a map cache object to store key-value pairs.
  41256. *
  41257. * @private
  41258. * @constructor
  41259. * @param {Array} [entries] The key-value pairs to cache.
  41260. */
  41261. function MapCache(entries) {
  41262. var index = -1,
  41263. length = entries == null ? 0 : entries.length;
  41264. this.clear();
  41265. while (++index < length) {
  41266. var entry = entries[index];
  41267. this.set(entry[0], entry[1]);
  41268. }
  41269. }
  41270. // Add methods to `MapCache`.
  41271. MapCache.prototype.clear = mapCacheClear;
  41272. MapCache.prototype['delete'] = mapCacheDelete;
  41273. MapCache.prototype.get = mapCacheGet;
  41274. MapCache.prototype.has = mapCacheHas;
  41275. MapCache.prototype.set = mapCacheSet;
  41276. module.exports = MapCache;
  41277. });
  41278. $__System.registerDynamic('203', [], true, function ($__require, exports, module) {
  41279. var global = this || self,
  41280. GLOBAL = global;
  41281. /** Used to stand-in for `undefined` hash values. */
  41282. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  41283. /**
  41284. * Adds `value` to the array cache.
  41285. *
  41286. * @private
  41287. * @name add
  41288. * @memberOf SetCache
  41289. * @alias push
  41290. * @param {*} value The value to cache.
  41291. * @returns {Object} Returns the cache instance.
  41292. */
  41293. function setCacheAdd(value) {
  41294. this.__data__.set(value, HASH_UNDEFINED);
  41295. return this;
  41296. }
  41297. module.exports = setCacheAdd;
  41298. });
  41299. $__System.registerDynamic("204", [], true, function ($__require, exports, module) {
  41300. var global = this || self,
  41301. GLOBAL = global;
  41302. /**
  41303. * Checks if `value` is in the array cache.
  41304. *
  41305. * @private
  41306. * @name has
  41307. * @memberOf SetCache
  41308. * @param {*} value The value to search for.
  41309. * @returns {number} Returns `true` if `value` is found, else `false`.
  41310. */
  41311. function setCacheHas(value) {
  41312. return this.__data__.has(value);
  41313. }
  41314. module.exports = setCacheHas;
  41315. });
  41316. $__System.registerDynamic('6e', ['139', '203', '204'], true, function ($__require, exports, module) {
  41317. var global = this || self,
  41318. GLOBAL = global;
  41319. var MapCache = $__require('139'),
  41320. setCacheAdd = $__require('203'),
  41321. setCacheHas = $__require('204');
  41322. /**
  41323. *
  41324. * Creates an array cache object to store unique values.
  41325. *
  41326. * @private
  41327. * @constructor
  41328. * @param {Array} [values] The values to cache.
  41329. */
  41330. function SetCache(values) {
  41331. var index = -1,
  41332. length = values == null ? 0 : values.length;
  41333. this.__data__ = new MapCache();
  41334. while (++index < length) {
  41335. this.add(values[index]);
  41336. }
  41337. }
  41338. // Add methods to `SetCache`.
  41339. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  41340. SetCache.prototype.has = setCacheHas;
  41341. module.exports = SetCache;
  41342. });
  41343. $__System.registerDynamic("3a", [], true, function ($__require, exports, module) {
  41344. var global = this || self,
  41345. GLOBAL = global;
  41346. /**
  41347. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  41348. * support for iteratee shorthands.
  41349. *
  41350. * @private
  41351. * @param {Array} array The array to inspect.
  41352. * @param {Function} predicate The function invoked per iteration.
  41353. * @param {number} fromIndex The index to search from.
  41354. * @param {boolean} [fromRight] Specify iterating from right to left.
  41355. * @returns {number} Returns the index of the matched value, else `-1`.
  41356. */
  41357. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  41358. var length = array.length,
  41359. index = fromIndex + (fromRight ? 1 : -1);
  41360. while (fromRight ? index-- : ++index < length) {
  41361. if (predicate(array[index], index, array)) {
  41362. return index;
  41363. }
  41364. }
  41365. return -1;
  41366. }
  41367. module.exports = baseFindIndex;
  41368. });
  41369. $__System.registerDynamic("205", [], true, function ($__require, exports, module) {
  41370. var global = this || self,
  41371. GLOBAL = global;
  41372. /**
  41373. * The base implementation of `_.isNaN` without support for number objects.
  41374. *
  41375. * @private
  41376. * @param {*} value The value to check.
  41377. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  41378. */
  41379. function baseIsNaN(value) {
  41380. return value !== value;
  41381. }
  41382. module.exports = baseIsNaN;
  41383. });
  41384. $__System.registerDynamic("206", [], true, function ($__require, exports, module) {
  41385. var global = this || self,
  41386. GLOBAL = global;
  41387. /**
  41388. * A specialized version of `_.indexOf` which performs strict equality
  41389. * comparisons of values, i.e. `===`.
  41390. *
  41391. * @private
  41392. * @param {Array} array The array to inspect.
  41393. * @param {*} value The value to search for.
  41394. * @param {number} fromIndex The index to search from.
  41395. * @returns {number} Returns the index of the matched value, else `-1`.
  41396. */
  41397. function strictIndexOf(array, value, fromIndex) {
  41398. var index = fromIndex - 1,
  41399. length = array.length;
  41400. while (++index < length) {
  41401. if (array[index] === value) {
  41402. return index;
  41403. }
  41404. }
  41405. return -1;
  41406. }
  41407. module.exports = strictIndexOf;
  41408. });
  41409. $__System.registerDynamic('127', ['3a', '205', '206'], true, function ($__require, exports, module) {
  41410. var global = this || self,
  41411. GLOBAL = global;
  41412. var baseFindIndex = $__require('3a'),
  41413. baseIsNaN = $__require('205'),
  41414. strictIndexOf = $__require('206');
  41415. /**
  41416. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  41417. *
  41418. * @private
  41419. * @param {Array} array The array to inspect.
  41420. * @param {*} value The value to search for.
  41421. * @param {number} fromIndex The index to search from.
  41422. * @returns {number} Returns the index of the matched value, else `-1`.
  41423. */
  41424. function baseIndexOf(array, value, fromIndex) {
  41425. return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
  41426. }
  41427. module.exports = baseIndexOf;
  41428. });
  41429. $__System.registerDynamic('207', ['127'], true, function ($__require, exports, module) {
  41430. var global = this || self,
  41431. GLOBAL = global;
  41432. var baseIndexOf = $__require('127');
  41433. /**
  41434. * A specialized version of `_.includes` for arrays without support for
  41435. * specifying an index to search from.
  41436. *
  41437. * @private
  41438. * @param {Array} [array] The array to inspect.
  41439. * @param {*} target The value to search for.
  41440. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  41441. */
  41442. function arrayIncludes(array, value) {
  41443. var length = array == null ? 0 : array.length;
  41444. return !!length && baseIndexOf(array, value, 0) > -1;
  41445. }
  41446. module.exports = arrayIncludes;
  41447. });
  41448. $__System.registerDynamic("208", [], true, function ($__require, exports, module) {
  41449. var global = this || self,
  41450. GLOBAL = global;
  41451. /**
  41452. * This function is like `arrayIncludes` except that it accepts a comparator.
  41453. *
  41454. * @private
  41455. * @param {Array} [array] The array to inspect.
  41456. * @param {*} target The value to search for.
  41457. * @param {Function} comparator The comparator invoked per element.
  41458. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  41459. */
  41460. function arrayIncludesWith(array, value, comparator) {
  41461. var index = -1,
  41462. length = array == null ? 0 : array.length;
  41463. while (++index < length) {
  41464. if (comparator(value, array[index])) {
  41465. return true;
  41466. }
  41467. }
  41468. return false;
  41469. }
  41470. module.exports = arrayIncludesWith;
  41471. });
  41472. $__System.registerDynamic("6f", [], true, function ($__require, exports, module) {
  41473. var global = this || self,
  41474. GLOBAL = global;
  41475. /**
  41476. * Checks if a `cache` value for `key` exists.
  41477. *
  41478. * @private
  41479. * @param {Object} cache The cache to query.
  41480. * @param {string} key The key of the entry to check.
  41481. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  41482. */
  41483. function cacheHas(cache, key) {
  41484. return cache.has(key);
  41485. }
  41486. module.exports = cacheHas;
  41487. });
  41488. $__System.registerDynamic('61', ['1c9'], true, function ($__require, exports, module) {
  41489. var global = this || self,
  41490. GLOBAL = global;
  41491. var root = $__require('1c9');
  41492. /** Built-in value references. */
  41493. var Symbol = root.Symbol;
  41494. module.exports = Symbol;
  41495. });
  41496. $__System.registerDynamic('209', ['61'], true, function ($__require, exports, module) {
  41497. var global = this || self,
  41498. GLOBAL = global;
  41499. var Symbol = $__require('61');
  41500. /** Used for built-in method references. */
  41501. var objectProto = Object.prototype;
  41502. /** Used to check objects for own properties. */
  41503. var hasOwnProperty = objectProto.hasOwnProperty;
  41504. /**
  41505. * Used to resolve the
  41506. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  41507. * of values.
  41508. */
  41509. var nativeObjectToString = objectProto.toString;
  41510. /** Built-in value references. */
  41511. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  41512. /**
  41513. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  41514. *
  41515. * @private
  41516. * @param {*} value The value to query.
  41517. * @returns {string} Returns the raw `toStringTag`.
  41518. */
  41519. function getRawTag(value) {
  41520. var isOwn = hasOwnProperty.call(value, symToStringTag),
  41521. tag = value[symToStringTag];
  41522. try {
  41523. value[symToStringTag] = undefined;
  41524. var unmasked = true;
  41525. } catch (e) {}
  41526. var result = nativeObjectToString.call(value);
  41527. if (unmasked) {
  41528. if (isOwn) {
  41529. value[symToStringTag] = tag;
  41530. } else {
  41531. delete value[symToStringTag];
  41532. }
  41533. }
  41534. return result;
  41535. }
  41536. module.exports = getRawTag;
  41537. });
  41538. $__System.registerDynamic("20a", [], true, function ($__require, exports, module) {
  41539. var global = this || self,
  41540. GLOBAL = global;
  41541. /** Used for built-in method references. */
  41542. var objectProto = Object.prototype;
  41543. /**
  41544. * Used to resolve the
  41545. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  41546. * of values.
  41547. */
  41548. var nativeObjectToString = objectProto.toString;
  41549. /**
  41550. * Converts `value` to a string using `Object.prototype.toString`.
  41551. *
  41552. * @private
  41553. * @param {*} value The value to convert.
  41554. * @returns {string} Returns the converted string.
  41555. */
  41556. function objectToString(value) {
  41557. return nativeObjectToString.call(value);
  41558. }
  41559. module.exports = objectToString;
  41560. });
  41561. $__System.registerDynamic('185', ['61', '209', '20a'], true, function ($__require, exports, module) {
  41562. var global = this || self,
  41563. GLOBAL = global;
  41564. var Symbol = $__require('61'),
  41565. getRawTag = $__require('209'),
  41566. objectToString = $__require('20a');
  41567. /** `Object#toString` result references. */
  41568. var nullTag = '[object Null]',
  41569. undefinedTag = '[object Undefined]';
  41570. /** Built-in value references. */
  41571. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  41572. /**
  41573. * The base implementation of `getTag` without fallbacks for buggy environments.
  41574. *
  41575. * @private
  41576. * @param {*} value The value to query.
  41577. * @returns {string} Returns the `toStringTag`.
  41578. */
  41579. function baseGetTag(value) {
  41580. if (value == null) {
  41581. return value === undefined ? undefinedTag : nullTag;
  41582. }
  41583. return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
  41584. }
  41585. module.exports = baseGetTag;
  41586. });
  41587. $__System.registerDynamic('be', ['185', '81'], true, function ($__require, exports, module) {
  41588. var global = this || self,
  41589. GLOBAL = global;
  41590. var baseGetTag = $__require('185'),
  41591. isObject = $__require('81');
  41592. /** `Object#toString` result references. */
  41593. var asyncTag = '[object AsyncFunction]',
  41594. funcTag = '[object Function]',
  41595. genTag = '[object GeneratorFunction]',
  41596. proxyTag = '[object Proxy]';
  41597. /**
  41598. * Checks if `value` is classified as a `Function` object.
  41599. *
  41600. * @static
  41601. * @memberOf _
  41602. * @since 0.1.0
  41603. * @category Lang
  41604. * @param {*} value The value to check.
  41605. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  41606. * @example
  41607. *
  41608. * _.isFunction(_);
  41609. * // => true
  41610. *
  41611. * _.isFunction(/abc/);
  41612. * // => false
  41613. */
  41614. function isFunction(value) {
  41615. if (!isObject(value)) {
  41616. return false;
  41617. }
  41618. // The use of `Object#toString` avoids issues with the `typeof` operator
  41619. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  41620. var tag = baseGetTag(value);
  41621. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  41622. }
  41623. module.exports = isFunction;
  41624. });
  41625. $__System.registerDynamic('20b', ['1c9'], true, function ($__require, exports, module) {
  41626. var global = this || self,
  41627. GLOBAL = global;
  41628. var root = $__require('1c9');
  41629. /** Used to detect overreaching core-js shims. */
  41630. var coreJsData = root['__core-js_shared__'];
  41631. module.exports = coreJsData;
  41632. });
  41633. $__System.registerDynamic('20c', ['20b'], true, function ($__require, exports, module) {
  41634. var global = this || self,
  41635. GLOBAL = global;
  41636. var coreJsData = $__require('20b');
  41637. /** Used to detect methods masquerading as native. */
  41638. var maskSrcKey = function () {
  41639. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  41640. return uid ? 'Symbol(src)_1.' + uid : '';
  41641. }();
  41642. /**
  41643. * Checks if `func` has its source masked.
  41644. *
  41645. * @private
  41646. * @param {Function} func The function to check.
  41647. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  41648. */
  41649. function isMasked(func) {
  41650. return !!maskSrcKey && maskSrcKey in func;
  41651. }
  41652. module.exports = isMasked;
  41653. });
  41654. $__System.registerDynamic('81', [], true, function ($__require, exports, module) {
  41655. var global = this || self,
  41656. GLOBAL = global;
  41657. /**
  41658. * Checks if `value` is the
  41659. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  41660. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  41661. *
  41662. * @static
  41663. * @memberOf _
  41664. * @since 0.1.0
  41665. * @category Lang
  41666. * @param {*} value The value to check.
  41667. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  41668. * @example
  41669. *
  41670. * _.isObject({});
  41671. * // => true
  41672. *
  41673. * _.isObject([1, 2, 3]);
  41674. * // => true
  41675. *
  41676. * _.isObject(_.noop);
  41677. * // => true
  41678. *
  41679. * _.isObject(null);
  41680. * // => false
  41681. */
  41682. function isObject(value) {
  41683. var type = typeof value;
  41684. return value != null && (type == 'object' || type == 'function');
  41685. }
  41686. module.exports = isObject;
  41687. });
  41688. $__System.registerDynamic('1da', [], true, function ($__require, exports, module) {
  41689. var global = this || self,
  41690. GLOBAL = global;
  41691. /** Used for built-in method references. */
  41692. var funcProto = Function.prototype;
  41693. /** Used to resolve the decompiled source of functions. */
  41694. var funcToString = funcProto.toString;
  41695. /**
  41696. * Converts `func` to its source code.
  41697. *
  41698. * @private
  41699. * @param {Function} func The function to convert.
  41700. * @returns {string} Returns the source code.
  41701. */
  41702. function toSource(func) {
  41703. if (func != null) {
  41704. try {
  41705. return funcToString.call(func);
  41706. } catch (e) {}
  41707. try {
  41708. return func + '';
  41709. } catch (e) {}
  41710. }
  41711. return '';
  41712. }
  41713. module.exports = toSource;
  41714. });
  41715. $__System.registerDynamic('20d', ['be', '20c', '81', '1da'], true, function ($__require, exports, module) {
  41716. var global = this || self,
  41717. GLOBAL = global;
  41718. var isFunction = $__require('be'),
  41719. isMasked = $__require('20c'),
  41720. isObject = $__require('81'),
  41721. toSource = $__require('1da');
  41722. /**
  41723. * Used to match `RegExp`
  41724. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  41725. */
  41726. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  41727. /** Used to detect host constructors (Safari). */
  41728. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  41729. /** Used for built-in method references. */
  41730. var funcProto = Function.prototype,
  41731. objectProto = Object.prototype;
  41732. /** Used to resolve the decompiled source of functions. */
  41733. var funcToString = funcProto.toString;
  41734. /** Used to check objects for own properties. */
  41735. var hasOwnProperty = objectProto.hasOwnProperty;
  41736. /** Used to detect if a method is native. */
  41737. var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
  41738. /**
  41739. * The base implementation of `_.isNative` without bad shim checks.
  41740. *
  41741. * @private
  41742. * @param {*} value The value to check.
  41743. * @returns {boolean} Returns `true` if `value` is a native function,
  41744. * else `false`.
  41745. */
  41746. function baseIsNative(value) {
  41747. if (!isObject(value) || isMasked(value)) {
  41748. return false;
  41749. }
  41750. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  41751. return pattern.test(toSource(value));
  41752. }
  41753. module.exports = baseIsNative;
  41754. });
  41755. $__System.registerDynamic("20e", [], true, function ($__require, exports, module) {
  41756. var global = this || self,
  41757. GLOBAL = global;
  41758. /**
  41759. * Gets the value at `key` of `object`.
  41760. *
  41761. * @private
  41762. * @param {Object} [object] The object to query.
  41763. * @param {string} key The key of the property to get.
  41764. * @returns {*} Returns the property value.
  41765. */
  41766. function getValue(object, key) {
  41767. return object == null ? undefined : object[key];
  41768. }
  41769. module.exports = getValue;
  41770. });
  41771. $__System.registerDynamic('1cc', ['20d', '20e'], true, function ($__require, exports, module) {
  41772. var global = this || self,
  41773. GLOBAL = global;
  41774. var baseIsNative = $__require('20d'),
  41775. getValue = $__require('20e');
  41776. /**
  41777. * Gets the native function at `key` of `object`.
  41778. *
  41779. * @private
  41780. * @param {Object} object The object to query.
  41781. * @param {string} key The key of the method to get.
  41782. * @returns {*} Returns the function if it's native, else `undefined`.
  41783. */
  41784. function getNative(object, key) {
  41785. var value = getValue(object, key);
  41786. return baseIsNative(value) ? value : undefined;
  41787. }
  41788. module.exports = getNative;
  41789. });
  41790. $__System.registerDynamic('1ec', [], true, function ($__require, exports, module) {
  41791. var global = this || self,
  41792. GLOBAL = global;
  41793. /** Detect free variable `global` from Node.js. */
  41794. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  41795. module.exports = freeGlobal;
  41796. });
  41797. $__System.registerDynamic('1c9', ['1ec'], true, function ($__require, exports, module) {
  41798. var global = this || self,
  41799. GLOBAL = global;
  41800. var freeGlobal = $__require('1ec');
  41801. /** Detect free variable `self`. */
  41802. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  41803. /** Used as a reference to the global object. */
  41804. var root = freeGlobal || freeSelf || Function('return this')();
  41805. module.exports = root;
  41806. });
  41807. $__System.registerDynamic('1d9', ['1cc', '1c9'], true, function ($__require, exports, module) {
  41808. var global = this || self,
  41809. GLOBAL = global;
  41810. var getNative = $__require('1cc'),
  41811. root = $__require('1c9');
  41812. /* Built-in method references that are verified to be native. */
  41813. var Set = getNative(root, 'Set');
  41814. module.exports = Set;
  41815. });
  41816. $__System.registerDynamic("20f", [], true, function ($__require, exports, module) {
  41817. var global = this || self,
  41818. GLOBAL = global;
  41819. /**
  41820. * This method returns `undefined`.
  41821. *
  41822. * @static
  41823. * @memberOf _
  41824. * @since 2.3.0
  41825. * @category Util
  41826. * @example
  41827. *
  41828. * _.times(2, _.noop);
  41829. * // => [undefined, undefined]
  41830. */
  41831. function noop() {
  41832. // No operation performed.
  41833. }
  41834. module.exports = noop;
  41835. });
  41836. $__System.registerDynamic('210', ['1d9', '20f', '74'], true, function ($__require, exports, module) {
  41837. var global = this || self,
  41838. GLOBAL = global;
  41839. var Set = $__require('1d9'),
  41840. noop = $__require('20f'),
  41841. setToArray = $__require('74');
  41842. /** Used as references for various `Number` constants. */
  41843. var INFINITY = 1 / 0;
  41844. /**
  41845. * Creates a set object of `values`.
  41846. *
  41847. * @private
  41848. * @param {Array} values The values to add to the set.
  41849. * @returns {Object} Returns the new set.
  41850. */
  41851. var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function (values) {
  41852. return new Set(values);
  41853. };
  41854. module.exports = createSet;
  41855. });
  41856. $__System.registerDynamic("74", [], true, function ($__require, exports, module) {
  41857. var global = this || self,
  41858. GLOBAL = global;
  41859. /**
  41860. * Converts `set` to an array of its values.
  41861. *
  41862. * @private
  41863. * @param {Object} set The set to convert.
  41864. * @returns {Array} Returns the values.
  41865. */
  41866. function setToArray(set) {
  41867. var index = -1,
  41868. result = Array(set.size);
  41869. set.forEach(function (value) {
  41870. result[++index] = value;
  41871. });
  41872. return result;
  41873. }
  41874. module.exports = setToArray;
  41875. });
  41876. $__System.registerDynamic('211', ['6e', '207', '208', '6f', '210', '74'], true, function ($__require, exports, module) {
  41877. var global = this || self,
  41878. GLOBAL = global;
  41879. var SetCache = $__require('6e'),
  41880. arrayIncludes = $__require('207'),
  41881. arrayIncludesWith = $__require('208'),
  41882. cacheHas = $__require('6f'),
  41883. createSet = $__require('210'),
  41884. setToArray = $__require('74');
  41885. /** Used as the size to enable large array optimizations. */
  41886. var LARGE_ARRAY_SIZE = 200;
  41887. /**
  41888. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  41889. *
  41890. * @private
  41891. * @param {Array} array The array to inspect.
  41892. * @param {Function} [iteratee] The iteratee invoked per element.
  41893. * @param {Function} [comparator] The comparator invoked per element.
  41894. * @returns {Array} Returns the new duplicate free array.
  41895. */
  41896. function baseUniq(array, iteratee, comparator) {
  41897. var index = -1,
  41898. includes = arrayIncludes,
  41899. length = array.length,
  41900. isCommon = true,
  41901. result = [],
  41902. seen = result;
  41903. if (comparator) {
  41904. isCommon = false;
  41905. includes = arrayIncludesWith;
  41906. } else if (length >= LARGE_ARRAY_SIZE) {
  41907. var set = iteratee ? null : createSet(array);
  41908. if (set) {
  41909. return setToArray(set);
  41910. }
  41911. isCommon = false;
  41912. includes = cacheHas;
  41913. seen = new SetCache();
  41914. } else {
  41915. seen = iteratee ? [] : result;
  41916. }
  41917. outer: while (++index < length) {
  41918. var value = array[index],
  41919. computed = iteratee ? iteratee(value) : value;
  41920. value = comparator || value !== 0 ? value : 0;
  41921. if (isCommon && computed === computed) {
  41922. var seenIndex = seen.length;
  41923. while (seenIndex--) {
  41924. if (seen[seenIndex] === computed) {
  41925. continue outer;
  41926. }
  41927. }
  41928. if (iteratee) {
  41929. seen.push(computed);
  41930. }
  41931. result.push(value);
  41932. } else if (!includes(seen, computed, comparator)) {
  41933. if (seen !== result) {
  41934. seen.push(computed);
  41935. }
  41936. result.push(value);
  41937. }
  41938. }
  41939. return result;
  41940. }
  41941. module.exports = baseUniq;
  41942. });
  41943. $__System.registerDynamic('212', ['211'], true, function ($__require, exports, module) {
  41944. var global = this || self,
  41945. GLOBAL = global;
  41946. var baseUniq = $__require('211');
  41947. /**
  41948. * Creates a duplicate-free version of an array, using
  41949. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  41950. * for equality comparisons, in which only the first occurrence of each element
  41951. * is kept. The order of result values is determined by the order they occur
  41952. * in the array.
  41953. *
  41954. * @static
  41955. * @memberOf _
  41956. * @since 0.1.0
  41957. * @category Array
  41958. * @param {Array} array The array to inspect.
  41959. * @returns {Array} Returns the new duplicate free array.
  41960. * @example
  41961. *
  41962. * _.uniq([2, 1, 2]);
  41963. * // => [2, 1]
  41964. */
  41965. function uniq(array) {
  41966. return array && array.length ? baseUniq(array) : [];
  41967. }
  41968. module.exports = uniq;
  41969. });
  41970. $__System.registerDynamic('213', ['1a9', '37', 'c'], true, function ($__require, exports, module) {
  41971. var process = $__require('c');
  41972. var global = this || self,
  41973. GLOBAL = global;
  41974. $__require('1a9');
  41975. module.exports = $__require('37').Symbol['for'];
  41976. });
  41977. $__System.registerDynamic("214", ["213"], true, function ($__require, exports, module) {
  41978. var global = this || self,
  41979. GLOBAL = global;
  41980. module.exports = { "default": $__require("213"), __esModule: true };
  41981. });
  41982. $__System.registerDynamic("1b5", ["214"], true, function ($__require, exports, module) {
  41983. "use strict";
  41984. var global = this || self,
  41985. GLOBAL = global;
  41986. exports.__esModule = true;
  41987. exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined;
  41988. var _for = $__require("214");
  41989. var _for2 = _interopRequireDefault(_for);
  41990. function _interopRequireDefault(obj) {
  41991. return obj && obj.__esModule ? obj : { default: obj };
  41992. }
  41993. var STATEMENT_OR_BLOCK_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  41994. var FLATTENABLE_KEYS = exports.FLATTENABLE_KEYS = ["body", "expressions"];
  41995. var FOR_INIT_KEYS = exports.FOR_INIT_KEYS = ["left", "init"];
  41996. var COMMENT_KEYS = exports.COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  41997. var LOGICAL_OPERATORS = exports.LOGICAL_OPERATORS = ["||", "&&"];
  41998. var UPDATE_OPERATORS = exports.UPDATE_OPERATORS = ["++", "--"];
  41999. var BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  42000. var EQUALITY_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  42001. var COMPARISON_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]);
  42002. var BOOLEAN_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS);
  42003. var NUMBER_BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  42004. var BINARY_OPERATORS = exports.BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS);
  42005. var BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  42006. var NUMBER_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = ["+", "-", "++", "--", "~"];
  42007. var STRING_UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = ["typeof"];
  42008. var UNARY_OPERATORS = exports.UNARY_OPERATORS = ["void"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS);
  42009. var INHERIT_KEYS = exports.INHERIT_KEYS = {
  42010. optional: ["typeAnnotation", "typeParameters", "returnType"],
  42011. force: ["start", "loc", "end"]
  42012. };
  42013. var BLOCK_SCOPED_SYMBOL = exports.BLOCK_SCOPED_SYMBOL = (0, _for2.default)("var used to be block scoped");
  42014. var NOT_LOCAL_BINDING = exports.NOT_LOCAL_BINDING = (0, _for2.default)("should not be considered a local binding");
  42015. });
  42016. $__System.registerDynamic("215", ["11", "1b5", "216"], true, function ($__require, exports, module) {
  42017. "use strict";
  42018. var global = this || self,
  42019. GLOBAL = global;
  42020. var _index = $__require("11");
  42021. var t = _interopRequireWildcard(_index);
  42022. var _constants = $__require("1b5");
  42023. var _index2 = $__require("216");
  42024. var _index3 = _interopRequireDefault(_index2);
  42025. function _interopRequireDefault(obj) {
  42026. return obj && obj.__esModule ? obj : { default: obj };
  42027. }
  42028. function _interopRequireWildcard(obj) {
  42029. if (obj && obj.__esModule) {
  42030. return obj;
  42031. } else {
  42032. var newObj = {};if (obj != null) {
  42033. for (var key in obj) {
  42034. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  42035. }
  42036. }newObj.default = obj;return newObj;
  42037. }
  42038. }
  42039. (0, _index3.default)("ArrayExpression", {
  42040. fields: {
  42041. elements: {
  42042. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
  42043. default: []
  42044. }
  42045. },
  42046. visitor: ["elements"],
  42047. aliases: ["Expression"]
  42048. });
  42049. (0, _index3.default)("AssignmentExpression", {
  42050. fields: {
  42051. operator: {
  42052. validate: (0, _index2.assertValueType)("string")
  42053. },
  42054. left: {
  42055. validate: (0, _index2.assertNodeType)("LVal")
  42056. },
  42057. right: {
  42058. validate: (0, _index2.assertNodeType)("Expression")
  42059. }
  42060. },
  42061. builder: ["operator", "left", "right"],
  42062. visitor: ["left", "right"],
  42063. aliases: ["Expression"]
  42064. });
  42065. (0, _index3.default)("BinaryExpression", {
  42066. builder: ["operator", "left", "right"],
  42067. fields: {
  42068. operator: {
  42069. validate: _index2.assertOneOf.apply(undefined, _constants.BINARY_OPERATORS)
  42070. },
  42071. left: {
  42072. validate: (0, _index2.assertNodeType)("Expression")
  42073. },
  42074. right: {
  42075. validate: (0, _index2.assertNodeType)("Expression")
  42076. }
  42077. },
  42078. visitor: ["left", "right"],
  42079. aliases: ["Binary", "Expression"]
  42080. });
  42081. (0, _index3.default)("Directive", {
  42082. visitor: ["value"],
  42083. fields: {
  42084. value: {
  42085. validate: (0, _index2.assertNodeType)("DirectiveLiteral")
  42086. }
  42087. }
  42088. });
  42089. (0, _index3.default)("DirectiveLiteral", {
  42090. builder: ["value"],
  42091. fields: {
  42092. value: {
  42093. validate: (0, _index2.assertValueType)("string")
  42094. }
  42095. }
  42096. });
  42097. (0, _index3.default)("BlockStatement", {
  42098. builder: ["body", "directives"],
  42099. visitor: ["directives", "body"],
  42100. fields: {
  42101. directives: {
  42102. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))),
  42103. default: []
  42104. },
  42105. body: {
  42106. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement")))
  42107. }
  42108. },
  42109. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  42110. });
  42111. (0, _index3.default)("BreakStatement", {
  42112. visitor: ["label"],
  42113. fields: {
  42114. label: {
  42115. validate: (0, _index2.assertNodeType)("Identifier"),
  42116. optional: true
  42117. }
  42118. },
  42119. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  42120. });
  42121. (0, _index3.default)("CallExpression", {
  42122. visitor: ["callee", "arguments"],
  42123. fields: {
  42124. callee: {
  42125. validate: (0, _index2.assertNodeType)("Expression")
  42126. },
  42127. arguments: {
  42128. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement")))
  42129. }
  42130. },
  42131. aliases: ["Expression"]
  42132. });
  42133. (0, _index3.default)("CatchClause", {
  42134. visitor: ["param", "body"],
  42135. fields: {
  42136. param: {
  42137. validate: (0, _index2.assertNodeType)("Identifier")
  42138. },
  42139. body: {
  42140. validate: (0, _index2.assertNodeType)("BlockStatement")
  42141. }
  42142. },
  42143. aliases: ["Scopable"]
  42144. });
  42145. (0, _index3.default)("ConditionalExpression", {
  42146. visitor: ["test", "consequent", "alternate"],
  42147. fields: {
  42148. test: {
  42149. validate: (0, _index2.assertNodeType)("Expression")
  42150. },
  42151. consequent: {
  42152. validate: (0, _index2.assertNodeType)("Expression")
  42153. },
  42154. alternate: {
  42155. validate: (0, _index2.assertNodeType)("Expression")
  42156. }
  42157. },
  42158. aliases: ["Expression", "Conditional"]
  42159. });
  42160. (0, _index3.default)("ContinueStatement", {
  42161. visitor: ["label"],
  42162. fields: {
  42163. label: {
  42164. validate: (0, _index2.assertNodeType)("Identifier"),
  42165. optional: true
  42166. }
  42167. },
  42168. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  42169. });
  42170. (0, _index3.default)("DebuggerStatement", {
  42171. aliases: ["Statement"]
  42172. });
  42173. (0, _index3.default)("DoWhileStatement", {
  42174. visitor: ["test", "body"],
  42175. fields: {
  42176. test: {
  42177. validate: (0, _index2.assertNodeType)("Expression")
  42178. },
  42179. body: {
  42180. validate: (0, _index2.assertNodeType)("Statement")
  42181. }
  42182. },
  42183. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  42184. });
  42185. (0, _index3.default)("EmptyStatement", {
  42186. aliases: ["Statement"]
  42187. });
  42188. (0, _index3.default)("ExpressionStatement", {
  42189. visitor: ["expression"],
  42190. fields: {
  42191. expression: {
  42192. validate: (0, _index2.assertNodeType)("Expression")
  42193. }
  42194. },
  42195. aliases: ["Statement", "ExpressionWrapper"]
  42196. });
  42197. (0, _index3.default)("File", {
  42198. builder: ["program", "comments", "tokens"],
  42199. visitor: ["program"],
  42200. fields: {
  42201. program: {
  42202. validate: (0, _index2.assertNodeType)("Program")
  42203. }
  42204. }
  42205. });
  42206. (0, _index3.default)("ForInStatement", {
  42207. visitor: ["left", "right", "body"],
  42208. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  42209. fields: {
  42210. left: {
  42211. validate: (0, _index2.assertNodeType)("VariableDeclaration", "LVal")
  42212. },
  42213. right: {
  42214. validate: (0, _index2.assertNodeType)("Expression")
  42215. },
  42216. body: {
  42217. validate: (0, _index2.assertNodeType)("Statement")
  42218. }
  42219. }
  42220. });
  42221. (0, _index3.default)("ForStatement", {
  42222. visitor: ["init", "test", "update", "body"],
  42223. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  42224. fields: {
  42225. init: {
  42226. validate: (0, _index2.assertNodeType)("VariableDeclaration", "Expression"),
  42227. optional: true
  42228. },
  42229. test: {
  42230. validate: (0, _index2.assertNodeType)("Expression"),
  42231. optional: true
  42232. },
  42233. update: {
  42234. validate: (0, _index2.assertNodeType)("Expression"),
  42235. optional: true
  42236. },
  42237. body: {
  42238. validate: (0, _index2.assertNodeType)("Statement")
  42239. }
  42240. }
  42241. });
  42242. (0, _index3.default)("FunctionDeclaration", {
  42243. builder: ["id", "params", "body", "generator", "async"],
  42244. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  42245. fields: {
  42246. id: {
  42247. validate: (0, _index2.assertNodeType)("Identifier")
  42248. },
  42249. params: {
  42250. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal")))
  42251. },
  42252. body: {
  42253. validate: (0, _index2.assertNodeType)("BlockStatement")
  42254. },
  42255. generator: {
  42256. default: false,
  42257. validate: (0, _index2.assertValueType)("boolean")
  42258. },
  42259. async: {
  42260. default: false,
  42261. validate: (0, _index2.assertValueType)("boolean")
  42262. }
  42263. },
  42264. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"]
  42265. });
  42266. (0, _index3.default)("FunctionExpression", {
  42267. inherits: "FunctionDeclaration",
  42268. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  42269. fields: {
  42270. id: {
  42271. validate: (0, _index2.assertNodeType)("Identifier"),
  42272. optional: true
  42273. },
  42274. params: {
  42275. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("LVal")))
  42276. },
  42277. body: {
  42278. validate: (0, _index2.assertNodeType)("BlockStatement")
  42279. },
  42280. generator: {
  42281. default: false,
  42282. validate: (0, _index2.assertValueType)("boolean")
  42283. },
  42284. async: {
  42285. default: false,
  42286. validate: (0, _index2.assertValueType)("boolean")
  42287. }
  42288. }
  42289. });
  42290. (0, _index3.default)("Identifier", {
  42291. builder: ["name"],
  42292. visitor: ["typeAnnotation"],
  42293. aliases: ["Expression", "LVal"],
  42294. fields: {
  42295. name: {
  42296. validate: function validate(node, key, val) {
  42297. if (!t.isValidIdentifier(val)) {}
  42298. }
  42299. },
  42300. decorators: {
  42301. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator")))
  42302. }
  42303. }
  42304. });
  42305. (0, _index3.default)("IfStatement", {
  42306. visitor: ["test", "consequent", "alternate"],
  42307. aliases: ["Statement", "Conditional"],
  42308. fields: {
  42309. test: {
  42310. validate: (0, _index2.assertNodeType)("Expression")
  42311. },
  42312. consequent: {
  42313. validate: (0, _index2.assertNodeType)("Statement")
  42314. },
  42315. alternate: {
  42316. optional: true,
  42317. validate: (0, _index2.assertNodeType)("Statement")
  42318. }
  42319. }
  42320. });
  42321. (0, _index3.default)("LabeledStatement", {
  42322. visitor: ["label", "body"],
  42323. aliases: ["Statement"],
  42324. fields: {
  42325. label: {
  42326. validate: (0, _index2.assertNodeType)("Identifier")
  42327. },
  42328. body: {
  42329. validate: (0, _index2.assertNodeType)("Statement")
  42330. }
  42331. }
  42332. });
  42333. (0, _index3.default)("StringLiteral", {
  42334. builder: ["value"],
  42335. fields: {
  42336. value: {
  42337. validate: (0, _index2.assertValueType)("string")
  42338. }
  42339. },
  42340. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  42341. });
  42342. (0, _index3.default)("NumericLiteral", {
  42343. builder: ["value"],
  42344. deprecatedAlias: "NumberLiteral",
  42345. fields: {
  42346. value: {
  42347. validate: (0, _index2.assertValueType)("number")
  42348. }
  42349. },
  42350. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  42351. });
  42352. (0, _index3.default)("NullLiteral", {
  42353. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  42354. });
  42355. (0, _index3.default)("BooleanLiteral", {
  42356. builder: ["value"],
  42357. fields: {
  42358. value: {
  42359. validate: (0, _index2.assertValueType)("boolean")
  42360. }
  42361. },
  42362. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  42363. });
  42364. (0, _index3.default)("RegExpLiteral", {
  42365. builder: ["pattern", "flags"],
  42366. deprecatedAlias: "RegexLiteral",
  42367. aliases: ["Expression", "Literal"],
  42368. fields: {
  42369. pattern: {
  42370. validate: (0, _index2.assertValueType)("string")
  42371. },
  42372. flags: {
  42373. validate: (0, _index2.assertValueType)("string"),
  42374. default: ""
  42375. }
  42376. }
  42377. });
  42378. (0, _index3.default)("LogicalExpression", {
  42379. builder: ["operator", "left", "right"],
  42380. visitor: ["left", "right"],
  42381. aliases: ["Binary", "Expression"],
  42382. fields: {
  42383. operator: {
  42384. validate: _index2.assertOneOf.apply(undefined, _constants.LOGICAL_OPERATORS)
  42385. },
  42386. left: {
  42387. validate: (0, _index2.assertNodeType)("Expression")
  42388. },
  42389. right: {
  42390. validate: (0, _index2.assertNodeType)("Expression")
  42391. }
  42392. }
  42393. });
  42394. (0, _index3.default)("MemberExpression", {
  42395. builder: ["object", "property", "computed"],
  42396. visitor: ["object", "property"],
  42397. aliases: ["Expression", "LVal"],
  42398. fields: {
  42399. object: {
  42400. validate: (0, _index2.assertNodeType)("Expression")
  42401. },
  42402. property: {
  42403. validate: function validate(node, key, val) {
  42404. var expectedType = node.computed ? "Expression" : "Identifier";
  42405. (0, _index2.assertNodeType)(expectedType)(node, key, val);
  42406. }
  42407. },
  42408. computed: {
  42409. default: false
  42410. }
  42411. }
  42412. });
  42413. (0, _index3.default)("NewExpression", {
  42414. visitor: ["callee", "arguments"],
  42415. aliases: ["Expression"],
  42416. fields: {
  42417. callee: {
  42418. validate: (0, _index2.assertNodeType)("Expression")
  42419. },
  42420. arguments: {
  42421. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression", "SpreadElement")))
  42422. }
  42423. }
  42424. });
  42425. (0, _index3.default)("Program", {
  42426. visitor: ["directives", "body"],
  42427. builder: ["body", "directives"],
  42428. fields: {
  42429. directives: {
  42430. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Directive"))),
  42431. default: []
  42432. },
  42433. body: {
  42434. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement")))
  42435. }
  42436. },
  42437. aliases: ["Scopable", "BlockParent", "Block", "FunctionParent"]
  42438. });
  42439. (0, _index3.default)("ObjectExpression", {
  42440. visitor: ["properties"],
  42441. aliases: ["Expression"],
  42442. fields: {
  42443. properties: {
  42444. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadProperty")))
  42445. }
  42446. }
  42447. });
  42448. (0, _index3.default)("ObjectMethod", {
  42449. builder: ["kind", "key", "params", "body", "computed"],
  42450. fields: {
  42451. kind: {
  42452. validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("method", "get", "set")),
  42453. default: "method"
  42454. },
  42455. computed: {
  42456. validate: (0, _index2.assertValueType)("boolean"),
  42457. default: false
  42458. },
  42459. key: {
  42460. validate: function validate(node, key, val) {
  42461. var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
  42462. _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val);
  42463. }
  42464. },
  42465. decorators: {
  42466. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator")))
  42467. },
  42468. body: {
  42469. validate: (0, _index2.assertNodeType)("BlockStatement")
  42470. },
  42471. generator: {
  42472. default: false,
  42473. validate: (0, _index2.assertValueType)("boolean")
  42474. },
  42475. async: {
  42476. default: false,
  42477. validate: (0, _index2.assertValueType)("boolean")
  42478. }
  42479. },
  42480. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  42481. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  42482. });
  42483. (0, _index3.default)("ObjectProperty", {
  42484. builder: ["key", "value", "computed", "shorthand", "decorators"],
  42485. fields: {
  42486. computed: {
  42487. validate: (0, _index2.assertValueType)("boolean"),
  42488. default: false
  42489. },
  42490. key: {
  42491. validate: function validate(node, key, val) {
  42492. var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
  42493. _index2.assertNodeType.apply(undefined, expectedTypes)(node, key, val);
  42494. }
  42495. },
  42496. value: {
  42497. validate: (0, _index2.assertNodeType)("Expression", "Pattern", "RestElement")
  42498. },
  42499. shorthand: {
  42500. validate: (0, _index2.assertValueType)("boolean"),
  42501. default: false
  42502. },
  42503. decorators: {
  42504. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator"))),
  42505. optional: true
  42506. }
  42507. },
  42508. visitor: ["key", "value", "decorators"],
  42509. aliases: ["UserWhitespacable", "Property", "ObjectMember"]
  42510. });
  42511. (0, _index3.default)("RestElement", {
  42512. visitor: ["argument", "typeAnnotation"],
  42513. aliases: ["LVal"],
  42514. fields: {
  42515. argument: {
  42516. validate: (0, _index2.assertNodeType)("LVal")
  42517. },
  42518. decorators: {
  42519. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Decorator")))
  42520. }
  42521. }
  42522. });
  42523. (0, _index3.default)("ReturnStatement", {
  42524. visitor: ["argument"],
  42525. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  42526. fields: {
  42527. argument: {
  42528. validate: (0, _index2.assertNodeType)("Expression"),
  42529. optional: true
  42530. }
  42531. }
  42532. });
  42533. (0, _index3.default)("SequenceExpression", {
  42534. visitor: ["expressions"],
  42535. fields: {
  42536. expressions: {
  42537. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Expression")))
  42538. }
  42539. },
  42540. aliases: ["Expression"]
  42541. });
  42542. (0, _index3.default)("SwitchCase", {
  42543. visitor: ["test", "consequent"],
  42544. fields: {
  42545. test: {
  42546. validate: (0, _index2.assertNodeType)("Expression"),
  42547. optional: true
  42548. },
  42549. consequent: {
  42550. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("Statement")))
  42551. }
  42552. }
  42553. });
  42554. (0, _index3.default)("SwitchStatement", {
  42555. visitor: ["discriminant", "cases"],
  42556. aliases: ["Statement", "BlockParent", "Scopable"],
  42557. fields: {
  42558. discriminant: {
  42559. validate: (0, _index2.assertNodeType)("Expression")
  42560. },
  42561. cases: {
  42562. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("SwitchCase")))
  42563. }
  42564. }
  42565. });
  42566. (0, _index3.default)("ThisExpression", {
  42567. aliases: ["Expression"]
  42568. });
  42569. (0, _index3.default)("ThrowStatement", {
  42570. visitor: ["argument"],
  42571. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  42572. fields: {
  42573. argument: {
  42574. validate: (0, _index2.assertNodeType)("Expression")
  42575. }
  42576. }
  42577. });
  42578. (0, _index3.default)("TryStatement", {
  42579. visitor: ["block", "handler", "finalizer"],
  42580. aliases: ["Statement"],
  42581. fields: {
  42582. body: {
  42583. validate: (0, _index2.assertNodeType)("BlockStatement")
  42584. },
  42585. handler: {
  42586. optional: true,
  42587. handler: (0, _index2.assertNodeType)("BlockStatement")
  42588. },
  42589. finalizer: {
  42590. optional: true,
  42591. validate: (0, _index2.assertNodeType)("BlockStatement")
  42592. }
  42593. }
  42594. });
  42595. (0, _index3.default)("UnaryExpression", {
  42596. builder: ["operator", "argument", "prefix"],
  42597. fields: {
  42598. prefix: {
  42599. default: true
  42600. },
  42601. argument: {
  42602. validate: (0, _index2.assertNodeType)("Expression")
  42603. },
  42604. operator: {
  42605. validate: _index2.assertOneOf.apply(undefined, _constants.UNARY_OPERATORS)
  42606. }
  42607. },
  42608. visitor: ["argument"],
  42609. aliases: ["UnaryLike", "Expression"]
  42610. });
  42611. (0, _index3.default)("UpdateExpression", {
  42612. builder: ["operator", "argument", "prefix"],
  42613. fields: {
  42614. prefix: {
  42615. default: false
  42616. },
  42617. argument: {
  42618. validate: (0, _index2.assertNodeType)("Expression")
  42619. },
  42620. operator: {
  42621. validate: _index2.assertOneOf.apply(undefined, _constants.UPDATE_OPERATORS)
  42622. }
  42623. },
  42624. visitor: ["argument"],
  42625. aliases: ["Expression"]
  42626. });
  42627. (0, _index3.default)("VariableDeclaration", {
  42628. builder: ["kind", "declarations"],
  42629. visitor: ["declarations"],
  42630. aliases: ["Statement", "Declaration"],
  42631. fields: {
  42632. kind: {
  42633. validate: (0, _index2.chain)((0, _index2.assertValueType)("string"), (0, _index2.assertOneOf)("var", "let", "const"))
  42634. },
  42635. declarations: {
  42636. validate: (0, _index2.chain)((0, _index2.assertValueType)("array"), (0, _index2.assertEach)((0, _index2.assertNodeType)("VariableDeclarator")))
  42637. }
  42638. }
  42639. });
  42640. (0, _index3.default)("VariableDeclarator", {
  42641. visitor: ["id", "init"],
  42642. fields: {
  42643. id: {
  42644. validate: (0, _index2.assertNodeType)("LVal")
  42645. },
  42646. init: {
  42647. optional: true,
  42648. validate: (0, _index2.assertNodeType)("Expression")
  42649. }
  42650. }
  42651. });
  42652. (0, _index3.default)("WhileStatement", {
  42653. visitor: ["test", "body"],
  42654. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  42655. fields: {
  42656. test: {
  42657. validate: (0, _index2.assertNodeType)("Expression")
  42658. },
  42659. body: {
  42660. validate: (0, _index2.assertNodeType)("BlockStatement", "Statement")
  42661. }
  42662. }
  42663. });
  42664. (0, _index3.default)("WithStatement", {
  42665. visitor: ["object", "body"],
  42666. aliases: ["Statement"],
  42667. fields: {
  42668. object: {
  42669. object: (0, _index2.assertNodeType)("Expression")
  42670. },
  42671. body: {
  42672. validate: (0, _index2.assertNodeType)("BlockStatement", "Statement")
  42673. }
  42674. }
  42675. });
  42676. });
  42677. $__System.registerDynamic("217", ["216"], true, function ($__require, exports, module) {
  42678. "use strict";
  42679. var global = this || self,
  42680. GLOBAL = global;
  42681. var _index = $__require("216");
  42682. var _index2 = _interopRequireDefault(_index);
  42683. function _interopRequireDefault(obj) {
  42684. return obj && obj.__esModule ? obj : { default: obj };
  42685. }
  42686. (0, _index2.default)("AssignmentPattern", {
  42687. visitor: ["left", "right"],
  42688. aliases: ["Pattern", "LVal"],
  42689. fields: {
  42690. left: {
  42691. validate: (0, _index.assertNodeType)("Identifier")
  42692. },
  42693. right: {
  42694. validate: (0, _index.assertNodeType)("Expression")
  42695. },
  42696. decorators: {
  42697. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
  42698. }
  42699. }
  42700. });
  42701. (0, _index2.default)("ArrayPattern", {
  42702. visitor: ["elements", "typeAnnotation"],
  42703. aliases: ["Pattern", "LVal"],
  42704. fields: {
  42705. elements: {
  42706. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Identifier", "Pattern", "RestElement")))
  42707. },
  42708. decorators: {
  42709. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
  42710. }
  42711. }
  42712. });
  42713. (0, _index2.default)("ArrowFunctionExpression", {
  42714. builder: ["params", "body", "async"],
  42715. visitor: ["params", "body", "returnType", "typeParameters"],
  42716. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  42717. fields: {
  42718. params: {
  42719. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal")))
  42720. },
  42721. body: {
  42722. validate: (0, _index.assertNodeType)("BlockStatement", "Expression")
  42723. },
  42724. async: {
  42725. validate: (0, _index.assertValueType)("boolean"),
  42726. default: false
  42727. }
  42728. }
  42729. });
  42730. (0, _index2.default)("ClassBody", {
  42731. visitor: ["body"],
  42732. fields: {
  42733. body: {
  42734. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ClassMethod", "ClassProperty")))
  42735. }
  42736. }
  42737. });
  42738. (0, _index2.default)("ClassDeclaration", {
  42739. builder: ["id", "superClass", "body", "decorators"],
  42740. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  42741. aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"],
  42742. fields: {
  42743. id: {
  42744. validate: (0, _index.assertNodeType)("Identifier")
  42745. },
  42746. body: {
  42747. validate: (0, _index.assertNodeType)("ClassBody")
  42748. },
  42749. superClass: {
  42750. optional: true,
  42751. validate: (0, _index.assertNodeType)("Expression")
  42752. },
  42753. decorators: {
  42754. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
  42755. }
  42756. }
  42757. });
  42758. (0, _index2.default)("ClassExpression", {
  42759. inherits: "ClassDeclaration",
  42760. aliases: ["Scopable", "Class", "Expression", "Pureish"],
  42761. fields: {
  42762. id: {
  42763. optional: true,
  42764. validate: (0, _index.assertNodeType)("Identifier")
  42765. },
  42766. body: {
  42767. validate: (0, _index.assertNodeType)("ClassBody")
  42768. },
  42769. superClass: {
  42770. optional: true,
  42771. validate: (0, _index.assertNodeType)("Expression")
  42772. },
  42773. decorators: {
  42774. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
  42775. }
  42776. }
  42777. });
  42778. (0, _index2.default)("ExportAllDeclaration", {
  42779. visitor: ["source"],
  42780. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  42781. fields: {
  42782. source: {
  42783. validate: (0, _index.assertNodeType)("StringLiteral")
  42784. }
  42785. }
  42786. });
  42787. (0, _index2.default)("ExportDefaultDeclaration", {
  42788. visitor: ["declaration"],
  42789. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  42790. fields: {
  42791. declaration: {
  42792. validate: (0, _index.assertNodeType)("FunctionDeclaration", "ClassDeclaration", "Expression")
  42793. }
  42794. }
  42795. });
  42796. (0, _index2.default)("ExportNamedDeclaration", {
  42797. visitor: ["declaration", "specifiers", "source"],
  42798. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  42799. fields: {
  42800. declaration: {
  42801. validate: (0, _index.assertNodeType)("Declaration"),
  42802. optional: true
  42803. },
  42804. specifiers: {
  42805. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ExportSpecifier")))
  42806. },
  42807. source: {
  42808. validate: (0, _index.assertNodeType)("StringLiteral"),
  42809. optional: true
  42810. }
  42811. }
  42812. });
  42813. (0, _index2.default)("ExportSpecifier", {
  42814. visitor: ["local", "exported"],
  42815. aliases: ["ModuleSpecifier"],
  42816. fields: {
  42817. local: {
  42818. validate: (0, _index.assertNodeType)("Identifier")
  42819. },
  42820. exported: {
  42821. validate: (0, _index.assertNodeType)("Identifier")
  42822. }
  42823. }
  42824. });
  42825. (0, _index2.default)("ForOfStatement", {
  42826. visitor: ["left", "right", "body"],
  42827. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  42828. fields: {
  42829. left: {
  42830. validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal")
  42831. },
  42832. right: {
  42833. validate: (0, _index.assertNodeType)("Expression")
  42834. },
  42835. body: {
  42836. validate: (0, _index.assertNodeType)("Statement")
  42837. }
  42838. }
  42839. });
  42840. (0, _index2.default)("ImportDeclaration", {
  42841. visitor: ["specifiers", "source"],
  42842. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  42843. fields: {
  42844. specifiers: {
  42845. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  42846. },
  42847. source: {
  42848. validate: (0, _index.assertNodeType)("StringLiteral")
  42849. }
  42850. }
  42851. });
  42852. (0, _index2.default)("ImportDefaultSpecifier", {
  42853. visitor: ["local"],
  42854. aliases: ["ModuleSpecifier"],
  42855. fields: {
  42856. local: {
  42857. validate: (0, _index.assertNodeType)("Identifier")
  42858. }
  42859. }
  42860. });
  42861. (0, _index2.default)("ImportNamespaceSpecifier", {
  42862. visitor: ["local"],
  42863. aliases: ["ModuleSpecifier"],
  42864. fields: {
  42865. local: {
  42866. validate: (0, _index.assertNodeType)("Identifier")
  42867. }
  42868. }
  42869. });
  42870. (0, _index2.default)("ImportSpecifier", {
  42871. visitor: ["local", "imported"],
  42872. aliases: ["ModuleSpecifier"],
  42873. fields: {
  42874. local: {
  42875. validate: (0, _index.assertNodeType)("Identifier")
  42876. },
  42877. imported: {
  42878. validate: (0, _index.assertNodeType)("Identifier")
  42879. },
  42880. importKind: {
  42881. validate: (0, _index.assertOneOf)(null, "type", "typeof")
  42882. }
  42883. }
  42884. });
  42885. (0, _index2.default)("MetaProperty", {
  42886. visitor: ["meta", "property"],
  42887. aliases: ["Expression"],
  42888. fields: {
  42889. meta: {
  42890. validate: (0, _index.assertValueType)("string")
  42891. },
  42892. property: {
  42893. validate: (0, _index.assertValueType)("string")
  42894. }
  42895. }
  42896. });
  42897. (0, _index2.default)("ClassMethod", {
  42898. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  42899. builder: ["kind", "key", "params", "body", "computed", "static"],
  42900. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  42901. fields: {
  42902. kind: {
  42903. validate: (0, _index.chain)((0, _index.assertValueType)("string"), (0, _index.assertOneOf)("get", "set", "method", "constructor")),
  42904. default: "method"
  42905. },
  42906. computed: {
  42907. default: false,
  42908. validate: (0, _index.assertValueType)("boolean")
  42909. },
  42910. static: {
  42911. default: false,
  42912. validate: (0, _index.assertValueType)("boolean")
  42913. },
  42914. key: {
  42915. validate: function validate(node, key, val) {
  42916. var expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
  42917. _index.assertNodeType.apply(undefined, expectedTypes)(node, key, val);
  42918. }
  42919. },
  42920. params: {
  42921. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("LVal")))
  42922. },
  42923. body: {
  42924. validate: (0, _index.assertNodeType)("BlockStatement")
  42925. },
  42926. generator: {
  42927. default: false,
  42928. validate: (0, _index.assertValueType)("boolean")
  42929. },
  42930. async: {
  42931. default: false,
  42932. validate: (0, _index.assertValueType)("boolean")
  42933. }
  42934. }
  42935. });
  42936. (0, _index2.default)("ObjectPattern", {
  42937. visitor: ["properties", "typeAnnotation"],
  42938. aliases: ["Pattern", "LVal"],
  42939. fields: {
  42940. properties: {
  42941. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("RestProperty", "Property")))
  42942. },
  42943. decorators: {
  42944. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Decorator")))
  42945. }
  42946. }
  42947. });
  42948. (0, _index2.default)("SpreadElement", {
  42949. visitor: ["argument"],
  42950. aliases: ["UnaryLike"],
  42951. fields: {
  42952. argument: {
  42953. validate: (0, _index.assertNodeType)("Expression")
  42954. }
  42955. }
  42956. });
  42957. (0, _index2.default)("Super", {
  42958. aliases: ["Expression"]
  42959. });
  42960. (0, _index2.default)("TaggedTemplateExpression", {
  42961. visitor: ["tag", "quasi"],
  42962. aliases: ["Expression"],
  42963. fields: {
  42964. tag: {
  42965. validate: (0, _index.assertNodeType)("Expression")
  42966. },
  42967. quasi: {
  42968. validate: (0, _index.assertNodeType)("TemplateLiteral")
  42969. }
  42970. }
  42971. });
  42972. (0, _index2.default)("TemplateElement", {
  42973. builder: ["value", "tail"],
  42974. fields: {
  42975. value: {},
  42976. tail: {
  42977. validate: (0, _index.assertValueType)("boolean"),
  42978. default: false
  42979. }
  42980. }
  42981. });
  42982. (0, _index2.default)("TemplateLiteral", {
  42983. visitor: ["quasis", "expressions"],
  42984. aliases: ["Expression", "Literal"],
  42985. fields: {
  42986. quasis: {
  42987. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("TemplateElement")))
  42988. },
  42989. expressions: {
  42990. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("Expression")))
  42991. }
  42992. }
  42993. });
  42994. (0, _index2.default)("YieldExpression", {
  42995. builder: ["argument", "delegate"],
  42996. visitor: ["argument"],
  42997. aliases: ["Expression", "Terminatorless"],
  42998. fields: {
  42999. delegate: {
  43000. validate: (0, _index.assertValueType)("boolean"),
  43001. default: false
  43002. },
  43003. argument: {
  43004. optional: true,
  43005. validate: (0, _index.assertNodeType)("Expression")
  43006. }
  43007. }
  43008. });
  43009. });
  43010. $__System.registerDynamic("218", ["216"], true, function ($__require, exports, module) {
  43011. "use strict";
  43012. var global = this || self,
  43013. GLOBAL = global;
  43014. var _index = $__require("216");
  43015. var _index2 = _interopRequireDefault(_index);
  43016. function _interopRequireDefault(obj) {
  43017. return obj && obj.__esModule ? obj : { default: obj };
  43018. }
  43019. (0, _index2.default)("AnyTypeAnnotation", {
  43020. aliases: ["Flow", "FlowBaseAnnotation"],
  43021. fields: {}
  43022. });
  43023. (0, _index2.default)("ArrayTypeAnnotation", {
  43024. visitor: ["elementType"],
  43025. aliases: ["Flow"],
  43026. fields: {}
  43027. });
  43028. (0, _index2.default)("BooleanTypeAnnotation", {
  43029. aliases: ["Flow", "FlowBaseAnnotation"],
  43030. fields: {}
  43031. });
  43032. (0, _index2.default)("BooleanLiteralTypeAnnotation", {
  43033. aliases: ["Flow"],
  43034. fields: {}
  43035. });
  43036. (0, _index2.default)("NullLiteralTypeAnnotation", {
  43037. aliases: ["Flow", "FlowBaseAnnotation"],
  43038. fields: {}
  43039. });
  43040. (0, _index2.default)("ClassImplements", {
  43041. visitor: ["id", "typeParameters"],
  43042. aliases: ["Flow"],
  43043. fields: {}
  43044. });
  43045. (0, _index2.default)("ClassProperty", {
  43046. visitor: ["key", "value", "typeAnnotation", "decorators"],
  43047. builder: ["key", "value", "typeAnnotation", "decorators", "computed"],
  43048. aliases: ["Property"],
  43049. fields: {
  43050. computed: {
  43051. validate: (0, _index.assertValueType)("boolean"),
  43052. default: false
  43053. }
  43054. }
  43055. });
  43056. (0, _index2.default)("DeclareClass", {
  43057. visitor: ["id", "typeParameters", "extends", "body"],
  43058. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  43059. fields: {}
  43060. });
  43061. (0, _index2.default)("DeclareFunction", {
  43062. visitor: ["id"],
  43063. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  43064. fields: {}
  43065. });
  43066. (0, _index2.default)("DeclareInterface", {
  43067. visitor: ["id", "typeParameters", "extends", "body"],
  43068. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  43069. fields: {}
  43070. });
  43071. (0, _index2.default)("DeclareModule", {
  43072. visitor: ["id", "body"],
  43073. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  43074. fields: {}
  43075. });
  43076. (0, _index2.default)("DeclareModuleExports", {
  43077. visitor: ["typeAnnotation"],
  43078. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  43079. fields: {}
  43080. });
  43081. (0, _index2.default)("DeclareTypeAlias", {
  43082. visitor: ["id", "typeParameters", "right"],
  43083. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  43084. fields: {}
  43085. });
  43086. (0, _index2.default)("DeclareVariable", {
  43087. visitor: ["id"],
  43088. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  43089. fields: {}
  43090. });
  43091. (0, _index2.default)("ExistentialTypeParam", {
  43092. aliases: ["Flow"]
  43093. });
  43094. (0, _index2.default)("FunctionTypeAnnotation", {
  43095. visitor: ["typeParameters", "params", "rest", "returnType"],
  43096. aliases: ["Flow"],
  43097. fields: {}
  43098. });
  43099. (0, _index2.default)("FunctionTypeParam", {
  43100. visitor: ["name", "typeAnnotation"],
  43101. aliases: ["Flow"],
  43102. fields: {}
  43103. });
  43104. (0, _index2.default)("GenericTypeAnnotation", {
  43105. visitor: ["id", "typeParameters"],
  43106. aliases: ["Flow"],
  43107. fields: {}
  43108. });
  43109. (0, _index2.default)("InterfaceExtends", {
  43110. visitor: ["id", "typeParameters"],
  43111. aliases: ["Flow"],
  43112. fields: {}
  43113. });
  43114. (0, _index2.default)("InterfaceDeclaration", {
  43115. visitor: ["id", "typeParameters", "extends", "body"],
  43116. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  43117. fields: {}
  43118. });
  43119. (0, _index2.default)("IntersectionTypeAnnotation", {
  43120. visitor: ["types"],
  43121. aliases: ["Flow"],
  43122. fields: {}
  43123. });
  43124. (0, _index2.default)("MixedTypeAnnotation", {
  43125. aliases: ["Flow", "FlowBaseAnnotation"]
  43126. });
  43127. (0, _index2.default)("EmptyTypeAnnotation", {
  43128. aliases: ["Flow", "FlowBaseAnnotation"]
  43129. });
  43130. (0, _index2.default)("NullableTypeAnnotation", {
  43131. visitor: ["typeAnnotation"],
  43132. aliases: ["Flow"],
  43133. fields: {}
  43134. });
  43135. (0, _index2.default)("NumericLiteralTypeAnnotation", {
  43136. aliases: ["Flow"],
  43137. fields: {}
  43138. });
  43139. (0, _index2.default)("NumberTypeAnnotation", {
  43140. aliases: ["Flow", "FlowBaseAnnotation"],
  43141. fields: {}
  43142. });
  43143. (0, _index2.default)("StringLiteralTypeAnnotation", {
  43144. aliases: ["Flow"],
  43145. fields: {}
  43146. });
  43147. (0, _index2.default)("StringTypeAnnotation", {
  43148. aliases: ["Flow", "FlowBaseAnnotation"],
  43149. fields: {}
  43150. });
  43151. (0, _index2.default)("ThisTypeAnnotation", {
  43152. aliases: ["Flow", "FlowBaseAnnotation"],
  43153. fields: {}
  43154. });
  43155. (0, _index2.default)("TupleTypeAnnotation", {
  43156. visitor: ["types"],
  43157. aliases: ["Flow"],
  43158. fields: {}
  43159. });
  43160. (0, _index2.default)("TypeofTypeAnnotation", {
  43161. visitor: ["argument"],
  43162. aliases: ["Flow"],
  43163. fields: {}
  43164. });
  43165. (0, _index2.default)("TypeAlias", {
  43166. visitor: ["id", "typeParameters", "right"],
  43167. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  43168. fields: {}
  43169. });
  43170. (0, _index2.default)("TypeAnnotation", {
  43171. visitor: ["typeAnnotation"],
  43172. aliases: ["Flow"],
  43173. fields: {}
  43174. });
  43175. (0, _index2.default)("TypeCastExpression", {
  43176. visitor: ["expression", "typeAnnotation"],
  43177. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  43178. fields: {}
  43179. });
  43180. (0, _index2.default)("TypeParameter", {
  43181. visitor: ["bound"],
  43182. aliases: ["Flow"],
  43183. fields: {}
  43184. });
  43185. (0, _index2.default)("TypeParameterDeclaration", {
  43186. visitor: ["params"],
  43187. aliases: ["Flow"],
  43188. fields: {}
  43189. });
  43190. (0, _index2.default)("TypeParameterInstantiation", {
  43191. visitor: ["params"],
  43192. aliases: ["Flow"],
  43193. fields: {}
  43194. });
  43195. (0, _index2.default)("ObjectTypeAnnotation", {
  43196. visitor: ["properties", "indexers", "callProperties"],
  43197. aliases: ["Flow"],
  43198. fields: {}
  43199. });
  43200. (0, _index2.default)("ObjectTypeCallProperty", {
  43201. visitor: ["value"],
  43202. aliases: ["Flow", "UserWhitespacable"],
  43203. fields: {}
  43204. });
  43205. (0, _index2.default)("ObjectTypeIndexer", {
  43206. visitor: ["id", "key", "value"],
  43207. aliases: ["Flow", "UserWhitespacable"],
  43208. fields: {}
  43209. });
  43210. (0, _index2.default)("ObjectTypeProperty", {
  43211. visitor: ["key", "value"],
  43212. aliases: ["Flow", "UserWhitespacable"],
  43213. fields: {}
  43214. });
  43215. (0, _index2.default)("ObjectTypeSpreadProperty", {
  43216. visitor: ["argument"],
  43217. aliases: ["Flow", "UserWhitespacable"],
  43218. fields: {}
  43219. });
  43220. (0, _index2.default)("QualifiedTypeIdentifier", {
  43221. visitor: ["id", "qualification"],
  43222. aliases: ["Flow"],
  43223. fields: {}
  43224. });
  43225. (0, _index2.default)("UnionTypeAnnotation", {
  43226. visitor: ["types"],
  43227. aliases: ["Flow"],
  43228. fields: {}
  43229. });
  43230. (0, _index2.default)("VoidTypeAnnotation", {
  43231. aliases: ["Flow", "FlowBaseAnnotation"],
  43232. fields: {}
  43233. });
  43234. });
  43235. $__System.registerDynamic("219", ["216"], true, function ($__require, exports, module) {
  43236. "use strict";
  43237. var global = this || self,
  43238. GLOBAL = global;
  43239. var _index = $__require("216");
  43240. var _index2 = _interopRequireDefault(_index);
  43241. function _interopRequireDefault(obj) {
  43242. return obj && obj.__esModule ? obj : { default: obj };
  43243. }
  43244. (0, _index2.default)("JSXAttribute", {
  43245. visitor: ["name", "value"],
  43246. aliases: ["JSX", "Immutable"],
  43247. fields: {
  43248. name: {
  43249. validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
  43250. },
  43251. value: {
  43252. optional: true,
  43253. validate: (0, _index.assertNodeType)("JSXElement", "StringLiteral", "JSXExpressionContainer")
  43254. }
  43255. }
  43256. });
  43257. (0, _index2.default)("JSXClosingElement", {
  43258. visitor: ["name"],
  43259. aliases: ["JSX", "Immutable"],
  43260. fields: {
  43261. name: {
  43262. validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression")
  43263. }
  43264. }
  43265. });
  43266. (0, _index2.default)("JSXElement", {
  43267. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  43268. visitor: ["openingElement", "children", "closingElement"],
  43269. aliases: ["JSX", "Immutable", "Expression"],
  43270. fields: {
  43271. openingElement: {
  43272. validate: (0, _index.assertNodeType)("JSXOpeningElement")
  43273. },
  43274. closingElement: {
  43275. optional: true,
  43276. validate: (0, _index.assertNodeType)("JSXClosingElement")
  43277. },
  43278. children: {
  43279. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement")))
  43280. }
  43281. }
  43282. });
  43283. (0, _index2.default)("JSXEmptyExpression", {
  43284. aliases: ["JSX", "Expression"]
  43285. });
  43286. (0, _index2.default)("JSXExpressionContainer", {
  43287. visitor: ["expression"],
  43288. aliases: ["JSX", "Immutable"],
  43289. fields: {
  43290. expression: {
  43291. validate: (0, _index.assertNodeType)("Expression")
  43292. }
  43293. }
  43294. });
  43295. (0, _index2.default)("JSXSpreadChild", {
  43296. visitor: ["expression"],
  43297. aliases: ["JSX", "Immutable"],
  43298. fields: {
  43299. expression: {
  43300. validate: (0, _index.assertNodeType)("Expression")
  43301. }
  43302. }
  43303. });
  43304. (0, _index2.default)("JSXIdentifier", {
  43305. builder: ["name"],
  43306. aliases: ["JSX", "Expression"],
  43307. fields: {
  43308. name: {
  43309. validate: (0, _index.assertValueType)("string")
  43310. }
  43311. }
  43312. });
  43313. (0, _index2.default)("JSXMemberExpression", {
  43314. visitor: ["object", "property"],
  43315. aliases: ["JSX", "Expression"],
  43316. fields: {
  43317. object: {
  43318. validate: (0, _index.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
  43319. },
  43320. property: {
  43321. validate: (0, _index.assertNodeType)("JSXIdentifier")
  43322. }
  43323. }
  43324. });
  43325. (0, _index2.default)("JSXNamespacedName", {
  43326. visitor: ["namespace", "name"],
  43327. aliases: ["JSX"],
  43328. fields: {
  43329. namespace: {
  43330. validate: (0, _index.assertNodeType)("JSXIdentifier")
  43331. },
  43332. name: {
  43333. validate: (0, _index.assertNodeType)("JSXIdentifier")
  43334. }
  43335. }
  43336. });
  43337. (0, _index2.default)("JSXOpeningElement", {
  43338. builder: ["name", "attributes", "selfClosing"],
  43339. visitor: ["name", "attributes"],
  43340. aliases: ["JSX", "Immutable"],
  43341. fields: {
  43342. name: {
  43343. validate: (0, _index.assertNodeType)("JSXIdentifier", "JSXMemberExpression")
  43344. },
  43345. selfClosing: {
  43346. default: false,
  43347. validate: (0, _index.assertValueType)("boolean")
  43348. },
  43349. attributes: {
  43350. validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
  43351. }
  43352. }
  43353. });
  43354. (0, _index2.default)("JSXSpreadAttribute", {
  43355. visitor: ["argument"],
  43356. aliases: ["JSX"],
  43357. fields: {
  43358. argument: {
  43359. validate: (0, _index.assertNodeType)("Expression")
  43360. }
  43361. }
  43362. });
  43363. (0, _index2.default)("JSXText", {
  43364. aliases: ["JSX", "Immutable"],
  43365. builder: ["value"],
  43366. fields: {
  43367. value: {
  43368. validate: (0, _index.assertValueType)("string")
  43369. }
  43370. }
  43371. });
  43372. });
  43373. $__System.registerDynamic("21a", ["216"], true, function ($__require, exports, module) {
  43374. "use strict";
  43375. var global = this || self,
  43376. GLOBAL = global;
  43377. var _index = $__require("216");
  43378. var _index2 = _interopRequireDefault(_index);
  43379. function _interopRequireDefault(obj) {
  43380. return obj && obj.__esModule ? obj : { default: obj };
  43381. }
  43382. (0, _index2.default)("Noop", {
  43383. visitor: []
  43384. });
  43385. (0, _index2.default)("ParenthesizedExpression", {
  43386. visitor: ["expression"],
  43387. aliases: ["Expression", "ExpressionWrapper"],
  43388. fields: {
  43389. expression: {
  43390. validate: (0, _index.assertNodeType)("Expression")
  43391. }
  43392. }
  43393. });
  43394. });
  43395. $__System.registerDynamic("21b", ["216"], true, function ($__require, exports, module) {
  43396. "use strict";
  43397. var global = this || self,
  43398. GLOBAL = global;
  43399. var _index = $__require("216");
  43400. var _index2 = _interopRequireDefault(_index);
  43401. function _interopRequireDefault(obj) {
  43402. return obj && obj.__esModule ? obj : { default: obj };
  43403. }
  43404. (0, _index2.default)("AwaitExpression", {
  43405. builder: ["argument"],
  43406. visitor: ["argument"],
  43407. aliases: ["Expression", "Terminatorless"],
  43408. fields: {
  43409. argument: {
  43410. validate: (0, _index.assertNodeType)("Expression")
  43411. }
  43412. }
  43413. });
  43414. (0, _index2.default)("ForAwaitStatement", {
  43415. visitor: ["left", "right", "body"],
  43416. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  43417. fields: {
  43418. left: {
  43419. validate: (0, _index.assertNodeType)("VariableDeclaration", "LVal")
  43420. },
  43421. right: {
  43422. validate: (0, _index.assertNodeType)("Expression")
  43423. },
  43424. body: {
  43425. validate: (0, _index.assertNodeType)("Statement")
  43426. }
  43427. }
  43428. });
  43429. (0, _index2.default)("BindExpression", {
  43430. visitor: ["object", "callee"],
  43431. aliases: ["Expression"],
  43432. fields: {}
  43433. });
  43434. (0, _index2.default)("Import", {
  43435. aliases: ["Expression"]
  43436. });
  43437. (0, _index2.default)("Decorator", {
  43438. visitor: ["expression"],
  43439. fields: {
  43440. expression: {
  43441. validate: (0, _index.assertNodeType)("Expression")
  43442. }
  43443. }
  43444. });
  43445. (0, _index2.default)("DoExpression", {
  43446. visitor: ["body"],
  43447. aliases: ["Expression"],
  43448. fields: {
  43449. body: {
  43450. validate: (0, _index.assertNodeType)("BlockStatement")
  43451. }
  43452. }
  43453. });
  43454. (0, _index2.default)("ExportDefaultSpecifier", {
  43455. visitor: ["exported"],
  43456. aliases: ["ModuleSpecifier"],
  43457. fields: {
  43458. exported: {
  43459. validate: (0, _index.assertNodeType)("Identifier")
  43460. }
  43461. }
  43462. });
  43463. (0, _index2.default)("ExportNamespaceSpecifier", {
  43464. visitor: ["exported"],
  43465. aliases: ["ModuleSpecifier"],
  43466. fields: {
  43467. exported: {
  43468. validate: (0, _index.assertNodeType)("Identifier")
  43469. }
  43470. }
  43471. });
  43472. (0, _index2.default)("RestProperty", {
  43473. visitor: ["argument"],
  43474. aliases: ["UnaryLike"],
  43475. fields: {
  43476. argument: {
  43477. validate: (0, _index.assertNodeType)("LVal")
  43478. }
  43479. }
  43480. });
  43481. (0, _index2.default)("SpreadProperty", {
  43482. visitor: ["argument"],
  43483. aliases: ["UnaryLike"],
  43484. fields: {
  43485. argument: {
  43486. validate: (0, _index.assertNodeType)("Expression")
  43487. }
  43488. }
  43489. });
  43490. });
  43491. $__System.registerDynamic("21c", ["216", "215", "217", "218", "219", "21a", "21b"], true, function ($__require, exports, module) {
  43492. "use strict";
  43493. var global = this || self,
  43494. GLOBAL = global;
  43495. $__require("216");
  43496. $__require("215");
  43497. $__require("217");
  43498. $__require("218");
  43499. $__require("219");
  43500. $__require("21a");
  43501. $__require("21b");
  43502. });
  43503. $__System.registerDynamic('173', ['21d', '166', 'c'], true, function ($__require, exports, module) {
  43504. var process = $__require('c');
  43505. var global = this || self,
  43506. GLOBAL = global;
  43507. // getting tag from 19.1.3.6 Object.prototype.toString()
  43508. var cof = $__require('21d'),
  43509. TAG = $__require('166')('toStringTag')
  43510. // ES3 wrong here
  43511. ,
  43512. ARG = cof(function () {
  43513. return arguments;
  43514. }()) == 'Arguments';
  43515. // fallback for IE11 Script Access Denied error
  43516. var tryGet = function (it, key) {
  43517. try {
  43518. return it[key];
  43519. } catch (e) {/* empty */}
  43520. };
  43521. module.exports = function (it) {
  43522. var O, T, B;
  43523. return it === undefined ? 'Undefined' : it === null ? 'Null'
  43524. // @@toStringTag case
  43525. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  43526. // builtinTag case
  43527. : ARG ? cof(O)
  43528. // ES3 arguments fallback
  43529. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  43530. };
  43531. });
  43532. $__System.registerDynamic('197', ['173', '166', '195', '37', 'c'], true, function ($__require, exports, module) {
  43533. var process = $__require('c');
  43534. var global = this || self,
  43535. GLOBAL = global;
  43536. var classof = $__require('173'),
  43537. ITERATOR = $__require('166')('iterator'),
  43538. Iterators = $__require('195');
  43539. module.exports = $__require('37').getIteratorMethod = function (it) {
  43540. if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)];
  43541. };
  43542. });
  43543. $__System.registerDynamic('21e', ['10b', '197', '37', 'c'], true, function ($__require, exports, module) {
  43544. var process = $__require('c');
  43545. var global = this || self,
  43546. GLOBAL = global;
  43547. var anObject = $__require('10b'),
  43548. get = $__require('197');
  43549. module.exports = $__require('37').getIterator = function (it) {
  43550. var iterFn = get(it);
  43551. if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  43552. return anObject(iterFn.call(it));
  43553. };
  43554. });
  43555. $__System.registerDynamic('21f', ['36', '176', '21e', 'c'], true, function ($__require, exports, module) {
  43556. var process = $__require('c');
  43557. var global = this || self,
  43558. GLOBAL = global;
  43559. $__require('36');
  43560. $__require('176');
  43561. module.exports = $__require('21e');
  43562. });
  43563. $__System.registerDynamic("17", ["21f"], true, function ($__require, exports, module) {
  43564. var global = this || self,
  43565. GLOBAL = global;
  43566. module.exports = { "default": $__require("21f"), __esModule: true };
  43567. });
  43568. $__System.registerDynamic('220', ['37', 'c'], true, function ($__require, exports, module) {
  43569. var process = $__require('c');
  43570. var global = this || self,
  43571. GLOBAL = global;
  43572. var core = $__require('37'),
  43573. $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });
  43574. module.exports = function stringify(it) {
  43575. // eslint-disable-line no-unused-vars
  43576. return $JSON.stringify.apply($JSON, arguments);
  43577. };
  43578. });
  43579. $__System.registerDynamic("5b", ["220"], true, function ($__require, exports, module) {
  43580. var global = this || self,
  43581. GLOBAL = global;
  43582. module.exports = { "default": $__require("220"), __esModule: true };
  43583. });
  43584. $__System.registerDynamic('221', ['222', '16b', 'c'], true, function ($__require, exports, module) {
  43585. var process = $__require('c');
  43586. var global = this || self,
  43587. GLOBAL = global;
  43588. var toInteger = $__require('222'),
  43589. defined = $__require('16b');
  43590. // true -> String#at
  43591. // false -> String#codePointAt
  43592. module.exports = function (TO_STRING) {
  43593. return function (that, pos) {
  43594. var s = String(defined(that)),
  43595. i = toInteger(pos),
  43596. l = s.length,
  43597. a,
  43598. b;
  43599. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  43600. a = s.charCodeAt(i);
  43601. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  43602. };
  43603. };
  43604. });
  43605. $__System.registerDynamic('176', ['221', '16d', 'c'], true, function ($__require, exports, module) {
  43606. 'use strict';
  43607. var process = $__require('c');
  43608. var global = this || self,
  43609. GLOBAL = global;
  43610. var $at = $__require('221')(true);
  43611. // 21.1.3.27 String.prototype[@@iterator]()
  43612. $__require('16d')(String, 'String', function (iterated) {
  43613. this._t = String(iterated); // target
  43614. this._i = 0; // next index
  43615. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  43616. }, function () {
  43617. var O = this._t,
  43618. index = this._i,
  43619. point;
  43620. if (index >= O.length) return { value: undefined, done: true };
  43621. point = $at(O, index);
  43622. this._i += point.length;
  43623. return { value: point, done: false };
  43624. });
  43625. });
  43626. $__System.registerDynamic("223", ["c"], true, function ($__require, exports, module) {
  43627. var process = $__require("c");
  43628. var global = this || self,
  43629. GLOBAL = global;
  43630. module.exports = function () {/* empty */};
  43631. });
  43632. $__System.registerDynamic("16e", ["c"], true, function ($__require, exports, module) {
  43633. var process = $__require("c");
  43634. var global = this || self,
  43635. GLOBAL = global;
  43636. module.exports = function (done, value) {
  43637. return { value: value, done: !!done };
  43638. };
  43639. });
  43640. $__System.registerDynamic('224', ['168', '225', '19b', '192', '166', 'c'], true, function ($__require, exports, module) {
  43641. 'use strict';
  43642. var process = $__require('c');
  43643. var global = this || self,
  43644. GLOBAL = global;
  43645. var create = $__require('168'),
  43646. descriptor = $__require('225'),
  43647. setToStringTag = $__require('19b'),
  43648. IteratorPrototype = {};
  43649. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  43650. $__require('192')(IteratorPrototype, $__require('166')('iterator'), function () {
  43651. return this;
  43652. });
  43653. module.exports = function (Constructor, NAME, next) {
  43654. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  43655. setToStringTag(Constructor, NAME + ' Iterator');
  43656. };
  43657. });
  43658. $__System.registerDynamic('18d', ['16b', 'c'], true, function ($__require, exports, module) {
  43659. var process = $__require('c');
  43660. var global = this || self,
  43661. GLOBAL = global;
  43662. // 7.1.13 ToObject(argument)
  43663. var defined = $__require('16b');
  43664. module.exports = function (it) {
  43665. return Object(defined(it));
  43666. };
  43667. });
  43668. $__System.registerDynamic('226', ['191', '18d', '227', 'c'], true, function ($__require, exports, module) {
  43669. var process = $__require('c');
  43670. var global = this || self,
  43671. GLOBAL = global;
  43672. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  43673. var has = $__require('191'),
  43674. toObject = $__require('18d'),
  43675. IE_PROTO = $__require('227')('IE_PROTO'),
  43676. ObjectProto = Object.prototype;
  43677. module.exports = Object.getPrototypeOf || function (O) {
  43678. O = toObject(O);
  43679. if (has(O, IE_PROTO)) return O[IE_PROTO];
  43680. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  43681. return O.constructor.prototype;
  43682. }return O instanceof Object ? ObjectProto : null;
  43683. };
  43684. });
  43685. $__System.registerDynamic('16d', ['228', 'c6', '19d', '192', '191', '195', '224', '19b', '226', '166', 'c'], true, function ($__require, exports, module) {
  43686. 'use strict';
  43687. var process = $__require('c');
  43688. var global = this || self,
  43689. GLOBAL = global;
  43690. var LIBRARY = $__require('228'),
  43691. $export = $__require('c6'),
  43692. redefine = $__require('19d'),
  43693. hide = $__require('192'),
  43694. has = $__require('191'),
  43695. Iterators = $__require('195'),
  43696. $iterCreate = $__require('224'),
  43697. setToStringTag = $__require('19b'),
  43698. getPrototypeOf = $__require('226'),
  43699. ITERATOR = $__require('166')('iterator'),
  43700. BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
  43701. ,
  43702. FF_ITERATOR = '@@iterator',
  43703. KEYS = 'keys',
  43704. VALUES = 'values';
  43705. var returnThis = function () {
  43706. return this;
  43707. };
  43708. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  43709. $iterCreate(Constructor, NAME, next);
  43710. var getMethod = function (kind) {
  43711. if (!BUGGY && kind in proto) return proto[kind];
  43712. switch (kind) {
  43713. case KEYS:
  43714. return function keys() {
  43715. return new Constructor(this, kind);
  43716. };
  43717. case VALUES:
  43718. return function values() {
  43719. return new Constructor(this, kind);
  43720. };
  43721. }return function entries() {
  43722. return new Constructor(this, kind);
  43723. };
  43724. };
  43725. var TAG = NAME + ' Iterator',
  43726. DEF_VALUES = DEFAULT == VALUES,
  43727. VALUES_BUG = false,
  43728. proto = Base.prototype,
  43729. $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT],
  43730. $default = $native || getMethod(DEFAULT),
  43731. $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined,
  43732. $anyNative = NAME == 'Array' ? proto.entries || $native : $native,
  43733. methods,
  43734. key,
  43735. IteratorPrototype;
  43736. // Fix native
  43737. if ($anyNative) {
  43738. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  43739. if (IteratorPrototype !== Object.prototype) {
  43740. // Set @@toStringTag to native iterators
  43741. setToStringTag(IteratorPrototype, TAG, true);
  43742. // fix for some old engines
  43743. if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
  43744. }
  43745. }
  43746. // fix Array#{values, @@iterator}.name in V8 / FF
  43747. if (DEF_VALUES && $native && $native.name !== VALUES) {
  43748. VALUES_BUG = true;
  43749. $default = function values() {
  43750. return $native.call(this);
  43751. };
  43752. }
  43753. // Define iterator
  43754. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  43755. hide(proto, ITERATOR, $default);
  43756. }
  43757. // Plug for library
  43758. Iterators[NAME] = $default;
  43759. Iterators[TAG] = returnThis;
  43760. if (DEFAULT) {
  43761. methods = {
  43762. values: DEF_VALUES ? $default : getMethod(VALUES),
  43763. keys: IS_SET ? $default : getMethod(KEYS),
  43764. entries: $entries
  43765. };
  43766. if (FORCED) for (key in methods) {
  43767. if (!(key in proto)) redefine(proto, key, methods[key]);
  43768. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  43769. }
  43770. return methods;
  43771. };
  43772. });
  43773. $__System.registerDynamic('229', ['223', '16e', '195', '22a', '16d', 'c'], true, function ($__require, exports, module) {
  43774. 'use strict';
  43775. var process = $__require('c');
  43776. var global = this || self,
  43777. GLOBAL = global;
  43778. var addToUnscopables = $__require('223'),
  43779. step = $__require('16e'),
  43780. Iterators = $__require('195'),
  43781. toIObject = $__require('22a');
  43782. // 22.1.3.4 Array.prototype.entries()
  43783. // 22.1.3.13 Array.prototype.keys()
  43784. // 22.1.3.29 Array.prototype.values()
  43785. // 22.1.3.30 Array.prototype[@@iterator]()
  43786. module.exports = $__require('16d')(Array, 'Array', function (iterated, kind) {
  43787. this._t = toIObject(iterated); // target
  43788. this._i = 0; // next index
  43789. this._k = kind; // kind
  43790. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  43791. }, function () {
  43792. var O = this._t,
  43793. kind = this._k,
  43794. index = this._i++;
  43795. if (!O || index >= O.length) {
  43796. this._t = undefined;
  43797. return step(1);
  43798. }
  43799. if (kind == 'keys') return step(0, index);
  43800. if (kind == 'values') return step(0, O[index]);
  43801. return step(0, [index, O[index]]);
  43802. }, 'values');
  43803. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  43804. Iterators.Arguments = Iterators.Array;
  43805. addToUnscopables('keys');
  43806. addToUnscopables('values');
  43807. addToUnscopables('entries');
  43808. });
  43809. $__System.registerDynamic("195", ["c"], true, function ($__require, exports, module) {
  43810. var process = $__require("c");
  43811. var global = this || self,
  43812. GLOBAL = global;
  43813. module.exports = {};
  43814. });
  43815. $__System.registerDynamic('36', ['229', '163', '192', '195', '166', 'c'], true, function ($__require, exports, module) {
  43816. var process = $__require('c');
  43817. var global = this || self,
  43818. GLOBAL = global;
  43819. $__require('229');
  43820. var global = $__require('163'),
  43821. hide = $__require('192'),
  43822. Iterators = $__require('195'),
  43823. TO_STRING_TAG = $__require('166')('toStringTag');
  43824. for (var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++) {
  43825. var NAME = collections[i],
  43826. Collection = global[NAME],
  43827. proto = Collection && Collection.prototype;
  43828. if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  43829. Iterators[NAME] = Iterators.Array;
  43830. }
  43831. });
  43832. $__System.registerDynamic('22b', ['176', '36', '22c', 'c'], true, function ($__require, exports, module) {
  43833. var process = $__require('c');
  43834. var global = this || self,
  43835. GLOBAL = global;
  43836. $__require('176');
  43837. $__require('36');
  43838. module.exports = $__require('22c').f('iterator');
  43839. });
  43840. $__System.registerDynamic("22d", ["22b"], true, function ($__require, exports, module) {
  43841. var global = this || self,
  43842. GLOBAL = global;
  43843. module.exports = { "default": $__require("22b"), __esModule: true };
  43844. });
  43845. $__System.registerDynamic('22e', ['c'], true, function ($__require, exports, module) {
  43846. var process = $__require('c');
  43847. var global = this || self,
  43848. GLOBAL = global;
  43849. module.exports = function (it) {
  43850. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  43851. return it;
  43852. };
  43853. });
  43854. $__System.registerDynamic('10c', ['22e', 'c'], true, function ($__require, exports, module) {
  43855. var process = $__require('c');
  43856. var global = this || self,
  43857. GLOBAL = global;
  43858. // optional / simple context binding
  43859. var aFunction = $__require('22e');
  43860. module.exports = function (fn, that, length) {
  43861. aFunction(fn);
  43862. if (that === undefined) return fn;
  43863. switch (length) {
  43864. case 1:
  43865. return function (a) {
  43866. return fn.call(that, a);
  43867. };
  43868. case 2:
  43869. return function (a, b) {
  43870. return fn.call(that, a, b);
  43871. };
  43872. case 3:
  43873. return function (a, b, c) {
  43874. return fn.call(that, a, b, c);
  43875. };
  43876. }
  43877. return function () /* ...args */{
  43878. return fn.apply(that, arguments);
  43879. };
  43880. };
  43881. });
  43882. $__System.registerDynamic('c6', ['163', '37', '10c', '192', 'c'], true, function ($__require, exports, module) {
  43883. var process = $__require('c');
  43884. var global = this || self,
  43885. GLOBAL = global;
  43886. var global = $__require('163'),
  43887. core = $__require('37'),
  43888. ctx = $__require('10c'),
  43889. hide = $__require('192'),
  43890. PROTOTYPE = 'prototype';
  43891. var $export = function (type, name, source) {
  43892. var IS_FORCED = type & $export.F,
  43893. IS_GLOBAL = type & $export.G,
  43894. IS_STATIC = type & $export.S,
  43895. IS_PROTO = type & $export.P,
  43896. IS_BIND = type & $export.B,
  43897. IS_WRAP = type & $export.W,
  43898. exports = IS_GLOBAL ? core : core[name] || (core[name] = {}),
  43899. expProto = exports[PROTOTYPE],
  43900. target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE],
  43901. key,
  43902. own,
  43903. out;
  43904. if (IS_GLOBAL) source = name;
  43905. for (key in source) {
  43906. // contains in native
  43907. own = !IS_FORCED && target && target[key] !== undefined;
  43908. if (own && key in exports) continue;
  43909. // export native or passed
  43910. out = own ? target[key] : source[key];
  43911. // prevent global pollution for namespaces
  43912. exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
  43913. // bind timers to global for call from export context
  43914. : IS_BIND && own ? ctx(out, global)
  43915. // wrap global constructors for prevent change them in library
  43916. : IS_WRAP && target[key] == out ? function (C) {
  43917. var F = function (a, b, c) {
  43918. if (this instanceof C) {
  43919. switch (arguments.length) {
  43920. case 0:
  43921. return new C();
  43922. case 1:
  43923. return new C(a);
  43924. case 2:
  43925. return new C(a, b);
  43926. }return new C(a, b, c);
  43927. }return C.apply(this, arguments);
  43928. };
  43929. F[PROTOTYPE] = C[PROTOTYPE];
  43930. return F;
  43931. // make static versions for prototype methods
  43932. }(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  43933. // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
  43934. if (IS_PROTO) {
  43935. (exports.virtual || (exports.virtual = {}))[key] = out;
  43936. // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
  43937. if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
  43938. }
  43939. }
  43940. };
  43941. // type bitmap
  43942. $export.F = 1; // forced
  43943. $export.G = 2; // global
  43944. $export.S = 4; // static
  43945. $export.P = 8; // proto
  43946. $export.B = 16; // bind
  43947. $export.W = 32; // wrap
  43948. $export.U = 64; // safe
  43949. $export.R = 128; // real proto method for `library`
  43950. module.exports = $export;
  43951. });
  43952. $__System.registerDynamic('19d', ['192', 'c'], true, function ($__require, exports, module) {
  43953. var process = $__require('c');
  43954. var global = this || self,
  43955. GLOBAL = global;
  43956. module.exports = $__require('192');
  43957. });
  43958. $__System.registerDynamic('16f', ['22f', '10a', '191', '164', '18f', 'c'], true, function ($__require, exports, module) {
  43959. var process = $__require('c');
  43960. var global = this || self,
  43961. GLOBAL = global;
  43962. var META = $__require('22f')('meta'),
  43963. isObject = $__require('10a'),
  43964. has = $__require('191'),
  43965. setDesc = $__require('164').f,
  43966. id = 0;
  43967. var isExtensible = Object.isExtensible || function () {
  43968. return true;
  43969. };
  43970. var FREEZE = !$__require('18f')(function () {
  43971. return isExtensible(Object.preventExtensions({}));
  43972. });
  43973. var setMeta = function (it) {
  43974. setDesc(it, META, { value: {
  43975. i: 'O' + ++id, // object ID
  43976. w: {} // weak collections IDs
  43977. } });
  43978. };
  43979. var fastKey = function (it, create) {
  43980. // return primitive with prefix
  43981. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  43982. if (!has(it, META)) {
  43983. // can't set metadata to uncaught frozen object
  43984. if (!isExtensible(it)) return 'F';
  43985. // not necessary to add metadata
  43986. if (!create) return 'E';
  43987. // add missing metadata
  43988. setMeta(it);
  43989. // return object ID
  43990. }return it[META].i;
  43991. };
  43992. var getWeak = function (it, create) {
  43993. if (!has(it, META)) {
  43994. // can't set metadata to uncaught frozen object
  43995. if (!isExtensible(it)) return true;
  43996. // not necessary to add metadata
  43997. if (!create) return false;
  43998. // add missing metadata
  43999. setMeta(it);
  44000. // return hash weak collections IDs
  44001. }return it[META].w;
  44002. };
  44003. // add metadata on freeze-family methods calling
  44004. var onFreeze = function (it) {
  44005. if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  44006. return it;
  44007. };
  44008. var meta = module.exports = {
  44009. KEY: META,
  44010. NEED: false,
  44011. fastKey: fastKey,
  44012. getWeak: getWeak,
  44013. onFreeze: onFreeze
  44014. };
  44015. });
  44016. $__System.registerDynamic('19b', ['164', '191', '166', 'c'], true, function ($__require, exports, module) {
  44017. var process = $__require('c');
  44018. var global = this || self,
  44019. GLOBAL = global;
  44020. var def = $__require('164').f,
  44021. has = $__require('191'),
  44022. TAG = $__require('166')('toStringTag');
  44023. module.exports = function (it, tag, stat) {
  44024. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  44025. };
  44026. });
  44027. $__System.registerDynamic('230', ['18a', '22a', 'c'], true, function ($__require, exports, module) {
  44028. var process = $__require('c');
  44029. var global = this || self,
  44030. GLOBAL = global;
  44031. var getKeys = $__require('18a'),
  44032. toIObject = $__require('22a');
  44033. module.exports = function (object, el) {
  44034. var O = toIObject(object),
  44035. keys = getKeys(O),
  44036. length = keys.length,
  44037. index = 0,
  44038. key;
  44039. while (length > index) if (O[key = keys[index++]] === el) return key;
  44040. };
  44041. });
  44042. $__System.registerDynamic('231', ['18a', '18b', '18c', 'c'], true, function ($__require, exports, module) {
  44043. var process = $__require('c');
  44044. var global = this || self,
  44045. GLOBAL = global;
  44046. // all enumerable object keys, includes symbols
  44047. var getKeys = $__require('18a'),
  44048. gOPS = $__require('18b'),
  44049. pIE = $__require('18c');
  44050. module.exports = function (it) {
  44051. var result = getKeys(it),
  44052. getSymbols = gOPS.f;
  44053. if (getSymbols) {
  44054. var symbols = getSymbols(it),
  44055. isEnum = pIE.f,
  44056. i = 0,
  44057. key;
  44058. while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  44059. }return result;
  44060. };
  44061. });
  44062. $__System.registerDynamic('199', ['21d', 'c'], true, function ($__require, exports, module) {
  44063. var process = $__require('c');
  44064. var global = this || self,
  44065. GLOBAL = global;
  44066. // 7.2.2 IsArray(argument)
  44067. var cof = $__require('21d');
  44068. module.exports = Array.isArray || function isArray(arg) {
  44069. return cof(arg) == 'Array';
  44070. };
  44071. });
  44072. $__System.registerDynamic('232', ['164', '10b', '18a', '165', 'c'], true, function ($__require, exports, module) {
  44073. var process = $__require('c');
  44074. var global = this || self,
  44075. GLOBAL = global;
  44076. var dP = $__require('164'),
  44077. anObject = $__require('10b'),
  44078. getKeys = $__require('18a');
  44079. module.exports = $__require('165') ? Object.defineProperties : function defineProperties(O, Properties) {
  44080. anObject(O);
  44081. var keys = getKeys(Properties),
  44082. length = keys.length,
  44083. i = 0,
  44084. P;
  44085. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  44086. return O;
  44087. };
  44088. });
  44089. $__System.registerDynamic('233', ['163', 'c'], true, function ($__require, exports, module) {
  44090. var process = $__require('c');
  44091. var global = this || self,
  44092. GLOBAL = global;
  44093. module.exports = $__require('163').document && document.documentElement;
  44094. });
  44095. $__System.registerDynamic('168', ['10b', '232', '234', '227', '235', '233', 'c'], true, function ($__require, exports, module) {
  44096. var process = $__require('c');
  44097. var global = this || self,
  44098. GLOBAL = global;
  44099. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  44100. var anObject = $__require('10b'),
  44101. dPs = $__require('232'),
  44102. enumBugKeys = $__require('234'),
  44103. IE_PROTO = $__require('227')('IE_PROTO'),
  44104. Empty = function () {/* empty */},
  44105. PROTOTYPE = 'prototype';
  44106. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  44107. var createDict = function () {
  44108. // Thrash, waste and sodomy: IE GC bug
  44109. var iframe = $__require('235')('iframe'),
  44110. i = enumBugKeys.length,
  44111. lt = '<',
  44112. gt = '>',
  44113. iframeDocument;
  44114. iframe.style.display = 'none';
  44115. $__require('233').appendChild(iframe);
  44116. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  44117. // createDict = iframe.contentWindow.Object;
  44118. // html.removeChild(iframe);
  44119. iframeDocument = iframe.contentWindow.document;
  44120. iframeDocument.open();
  44121. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  44122. iframeDocument.close();
  44123. createDict = iframeDocument.F;
  44124. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  44125. return createDict();
  44126. };
  44127. module.exports = Object.create || function create(O, Properties) {
  44128. var result;
  44129. if (O !== null) {
  44130. Empty[PROTOTYPE] = anObject(O);
  44131. result = new Empty();
  44132. Empty[PROTOTYPE] = null;
  44133. // add "__proto__" for Object.getPrototypeOf polyfill
  44134. result[IE_PROTO] = O;
  44135. } else result = createDict();
  44136. return Properties === undefined ? result : dPs(result, Properties);
  44137. };
  44138. });
  44139. $__System.registerDynamic('236', ['22a', '237', 'c'], true, function ($__require, exports, module) {
  44140. var process = $__require('c');
  44141. var global = this || self,
  44142. GLOBAL = global;
  44143. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  44144. var toIObject = $__require('22a'),
  44145. gOPN = $__require('237').f,
  44146. toString = {}.toString;
  44147. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
  44148. var getWindowNames = function (it) {
  44149. try {
  44150. return gOPN(it);
  44151. } catch (e) {
  44152. return windowNames.slice();
  44153. }
  44154. };
  44155. module.exports.f = function getOwnPropertyNames(it) {
  44156. return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
  44157. };
  44158. });
  44159. $__System.registerDynamic('10d', ['18c', '225', '22a', '238', '191', '239', '165', 'c'], true, function ($__require, exports, module) {
  44160. var process = $__require('c');
  44161. var global = this || self,
  44162. GLOBAL = global;
  44163. var pIE = $__require('18c'),
  44164. createDesc = $__require('225'),
  44165. toIObject = $__require('22a'),
  44166. toPrimitive = $__require('238'),
  44167. has = $__require('191'),
  44168. IE8_DOM_DEFINE = $__require('239'),
  44169. gOPD = Object.getOwnPropertyDescriptor;
  44170. exports.f = $__require('165') ? gOPD : function getOwnPropertyDescriptor(O, P) {
  44171. O = toIObject(O);
  44172. P = toPrimitive(P, true);
  44173. if (IE8_DOM_DEFINE) try {
  44174. return gOPD(O, P);
  44175. } catch (e) {/* empty */}
  44176. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  44177. };
  44178. });
  44179. $__System.registerDynamic('18a', ['23a', '234', 'c'], true, function ($__require, exports, module) {
  44180. var process = $__require('c');
  44181. var global = this || self,
  44182. GLOBAL = global;
  44183. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  44184. var $keys = $__require('23a'),
  44185. enumBugKeys = $__require('234');
  44186. module.exports = Object.keys || function keys(O) {
  44187. return $keys(O, enumBugKeys);
  44188. };
  44189. });
  44190. $__System.registerDynamic("191", ["c"], true, function ($__require, exports, module) {
  44191. var process = $__require("c");
  44192. var global = this || self,
  44193. GLOBAL = global;
  44194. var hasOwnProperty = {}.hasOwnProperty;
  44195. module.exports = function (it, key) {
  44196. return hasOwnProperty.call(it, key);
  44197. };
  44198. });
  44199. $__System.registerDynamic("21d", ["c"], true, function ($__require, exports, module) {
  44200. var process = $__require("c");
  44201. var global = this || self,
  44202. GLOBAL = global;
  44203. var toString = {}.toString;
  44204. module.exports = function (it) {
  44205. return toString.call(it).slice(8, -1);
  44206. };
  44207. });
  44208. $__System.registerDynamic('18e', ['21d', 'c'], true, function ($__require, exports, module) {
  44209. var process = $__require('c');
  44210. var global = this || self,
  44211. GLOBAL = global;
  44212. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  44213. var cof = $__require('21d');
  44214. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  44215. return cof(it) == 'String' ? it.split('') : Object(it);
  44216. };
  44217. });
  44218. $__System.registerDynamic("16b", ["c"], true, function ($__require, exports, module) {
  44219. var process = $__require("c");
  44220. var global = this || self,
  44221. GLOBAL = global;
  44222. // 7.2.1 RequireObjectCoercible(argument)
  44223. module.exports = function (it) {
  44224. if (it == undefined) throw TypeError("Can't call method on " + it);
  44225. return it;
  44226. };
  44227. });
  44228. $__System.registerDynamic('22a', ['18e', '16b', 'c'], true, function ($__require, exports, module) {
  44229. var process = $__require('c');
  44230. var global = this || self,
  44231. GLOBAL = global;
  44232. // to indexed object, toObject with fallback for non-array-like ES3 strings
  44233. var IObject = $__require('18e'),
  44234. defined = $__require('16b');
  44235. module.exports = function (it) {
  44236. return IObject(defined(it));
  44237. };
  44238. });
  44239. $__System.registerDynamic('196', ['222', 'c'], true, function ($__require, exports, module) {
  44240. var process = $__require('c');
  44241. var global = this || self,
  44242. GLOBAL = global;
  44243. // 7.1.15 ToLength
  44244. var toInteger = $__require('222'),
  44245. min = Math.min;
  44246. module.exports = function (it) {
  44247. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  44248. };
  44249. });
  44250. $__System.registerDynamic("222", ["c"], true, function ($__require, exports, module) {
  44251. var process = $__require("c");
  44252. var global = this || self,
  44253. GLOBAL = global;
  44254. // 7.1.4 ToInteger
  44255. var ceil = Math.ceil,
  44256. floor = Math.floor;
  44257. module.exports = function (it) {
  44258. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  44259. };
  44260. });
  44261. $__System.registerDynamic('23b', ['222', 'c'], true, function ($__require, exports, module) {
  44262. var process = $__require('c');
  44263. var global = this || self,
  44264. GLOBAL = global;
  44265. var toInteger = $__require('222'),
  44266. max = Math.max,
  44267. min = Math.min;
  44268. module.exports = function (index, length) {
  44269. index = toInteger(index);
  44270. return index < 0 ? max(index + length, 0) : min(index, length);
  44271. };
  44272. });
  44273. $__System.registerDynamic('23c', ['22a', '196', '23b', 'c'], true, function ($__require, exports, module) {
  44274. var process = $__require('c');
  44275. var global = this || self,
  44276. GLOBAL = global;
  44277. // false -> Array#indexOf
  44278. // true -> Array#includes
  44279. var toIObject = $__require('22a'),
  44280. toLength = $__require('196'),
  44281. toIndex = $__require('23b');
  44282. module.exports = function (IS_INCLUDES) {
  44283. return function ($this, el, fromIndex) {
  44284. var O = toIObject($this),
  44285. length = toLength(O.length),
  44286. index = toIndex(fromIndex, length),
  44287. value;
  44288. // Array#includes uses SameValueZero equality algorithm
  44289. if (IS_INCLUDES && el != el) while (length > index) {
  44290. value = O[index++];
  44291. if (value != value) return true;
  44292. // Array#toIndex ignores holes, Array#includes - not
  44293. } else for (; length > index; index++) if (IS_INCLUDES || index in O) {
  44294. if (O[index] === el) return IS_INCLUDES || index || 0;
  44295. }return !IS_INCLUDES && -1;
  44296. };
  44297. };
  44298. });
  44299. $__System.registerDynamic('227', ['23d', '22f', 'c'], true, function ($__require, exports, module) {
  44300. var process = $__require('c');
  44301. var global = this || self,
  44302. GLOBAL = global;
  44303. var shared = $__require('23d')('keys'),
  44304. uid = $__require('22f');
  44305. module.exports = function (key) {
  44306. return shared[key] || (shared[key] = uid(key));
  44307. };
  44308. });
  44309. $__System.registerDynamic('23a', ['191', '22a', '23c', '227', 'c'], true, function ($__require, exports, module) {
  44310. var process = $__require('c');
  44311. var global = this || self,
  44312. GLOBAL = global;
  44313. var has = $__require('191'),
  44314. toIObject = $__require('22a'),
  44315. arrayIndexOf = $__require('23c')(false),
  44316. IE_PROTO = $__require('227')('IE_PROTO');
  44317. module.exports = function (object, names) {
  44318. var O = toIObject(object),
  44319. i = 0,
  44320. result = [],
  44321. key;
  44322. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  44323. // Don't enum bug & hidden keys
  44324. while (names.length > i) if (has(O, key = names[i++])) {
  44325. ~arrayIndexOf(result, key) || result.push(key);
  44326. }
  44327. return result;
  44328. };
  44329. });
  44330. $__System.registerDynamic('234', ['c'], true, function ($__require, exports, module) {
  44331. var process = $__require('c');
  44332. var global = this || self,
  44333. GLOBAL = global;
  44334. // IE 8- don't enum bug keys
  44335. module.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');
  44336. });
  44337. $__System.registerDynamic('237', ['23a', '234', 'c'], true, function ($__require, exports, module) {
  44338. var process = $__require('c');
  44339. var global = this || self,
  44340. GLOBAL = global;
  44341. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  44342. var $keys = $__require('23a'),
  44343. hiddenKeys = $__require('234').concat('length', 'prototype');
  44344. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  44345. return $keys(O, hiddenKeys);
  44346. };
  44347. });
  44348. $__System.registerDynamic("18c", ["c"], true, function ($__require, exports, module) {
  44349. var process = $__require("c");
  44350. var global = this || self,
  44351. GLOBAL = global;
  44352. exports.f = {}.propertyIsEnumerable;
  44353. });
  44354. $__System.registerDynamic("18b", ["c"], true, function ($__require, exports, module) {
  44355. var process = $__require("c");
  44356. var global = this || self,
  44357. GLOBAL = global;
  44358. exports.f = Object.getOwnPropertySymbols;
  44359. });
  44360. $__System.registerDynamic("225", ["c"], true, function ($__require, exports, module) {
  44361. var process = $__require("c");
  44362. var global = this || self,
  44363. GLOBAL = global;
  44364. module.exports = function (bitmap, value) {
  44365. return {
  44366. enumerable: !(bitmap & 1),
  44367. configurable: !(bitmap & 2),
  44368. writable: !(bitmap & 4),
  44369. value: value
  44370. };
  44371. };
  44372. });
  44373. $__System.registerDynamic('192', ['164', '225', '165', 'c'], true, function ($__require, exports, module) {
  44374. var process = $__require('c');
  44375. var global = this || self,
  44376. GLOBAL = global;
  44377. var dP = $__require('164'),
  44378. createDesc = $__require('225');
  44379. module.exports = $__require('165') ? function (object, key, value) {
  44380. return dP.f(object, key, createDesc(1, value));
  44381. } : function (object, key, value) {
  44382. object[key] = value;
  44383. return object;
  44384. };
  44385. });
  44386. $__System.registerDynamic('1a9', ['163', '191', '165', 'c6', '19d', '16f', '18f', '23d', '19b', '22f', '166', '22c', '23e', '230', '231', '199', '10b', '22a', '238', '225', '168', '236', '10d', '164', '18a', '237', '18c', '18b', '228', '192', 'c'], true, function ($__require, exports, module) {
  44387. 'use strict';
  44388. // ECMAScript 6 symbols shim
  44389. var process = $__require('c');
  44390. var global = this || self,
  44391. GLOBAL = global;
  44392. var global = $__require('163'),
  44393. has = $__require('191'),
  44394. DESCRIPTORS = $__require('165'),
  44395. $export = $__require('c6'),
  44396. redefine = $__require('19d'),
  44397. META = $__require('16f').KEY,
  44398. $fails = $__require('18f'),
  44399. shared = $__require('23d'),
  44400. setToStringTag = $__require('19b'),
  44401. uid = $__require('22f'),
  44402. wks = $__require('166'),
  44403. wksExt = $__require('22c'),
  44404. wksDefine = $__require('23e'),
  44405. keyOf = $__require('230'),
  44406. enumKeys = $__require('231'),
  44407. isArray = $__require('199'),
  44408. anObject = $__require('10b'),
  44409. toIObject = $__require('22a'),
  44410. toPrimitive = $__require('238'),
  44411. createDesc = $__require('225'),
  44412. _create = $__require('168'),
  44413. gOPNExt = $__require('236'),
  44414. $GOPD = $__require('10d'),
  44415. $DP = $__require('164'),
  44416. $keys = $__require('18a'),
  44417. gOPD = $GOPD.f,
  44418. dP = $DP.f,
  44419. gOPN = gOPNExt.f,
  44420. $Symbol = global.Symbol,
  44421. $JSON = global.JSON,
  44422. _stringify = $JSON && $JSON.stringify,
  44423. PROTOTYPE = 'prototype',
  44424. HIDDEN = wks('_hidden'),
  44425. TO_PRIMITIVE = wks('toPrimitive'),
  44426. isEnum = {}.propertyIsEnumerable,
  44427. SymbolRegistry = shared('symbol-registry'),
  44428. AllSymbols = shared('symbols'),
  44429. OPSymbols = shared('op-symbols'),
  44430. ObjectProto = Object[PROTOTYPE],
  44431. USE_NATIVE = typeof $Symbol == 'function',
  44432. QObject = global.QObject;
  44433. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  44434. var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  44435. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  44436. var setSymbolDesc = DESCRIPTORS && $fails(function () {
  44437. return _create(dP({}, 'a', {
  44438. get: function () {
  44439. return dP(this, 'a', { value: 7 }).a;
  44440. }
  44441. })).a != 7;
  44442. }) ? function (it, key, D) {
  44443. var protoDesc = gOPD(ObjectProto, key);
  44444. if (protoDesc) delete ObjectProto[key];
  44445. dP(it, key, D);
  44446. if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
  44447. } : dP;
  44448. var wrap = function (tag) {
  44449. var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  44450. sym._k = tag;
  44451. return sym;
  44452. };
  44453. var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  44454. return typeof it == 'symbol';
  44455. } : function (it) {
  44456. return it instanceof $Symbol;
  44457. };
  44458. var $defineProperty = function defineProperty(it, key, D) {
  44459. if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  44460. anObject(it);
  44461. key = toPrimitive(key, true);
  44462. anObject(D);
  44463. if (has(AllSymbols, key)) {
  44464. if (!D.enumerable) {
  44465. if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
  44466. it[HIDDEN][key] = true;
  44467. } else {
  44468. if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
  44469. D = _create(D, { enumerable: createDesc(0, false) });
  44470. }return setSymbolDesc(it, key, D);
  44471. }return dP(it, key, D);
  44472. };
  44473. var $defineProperties = function defineProperties(it, P) {
  44474. anObject(it);
  44475. var keys = enumKeys(P = toIObject(P)),
  44476. i = 0,
  44477. l = keys.length,
  44478. key;
  44479. while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  44480. return it;
  44481. };
  44482. var $create = function create(it, P) {
  44483. return P === undefined ? _create(it) : $defineProperties(_create(it), P);
  44484. };
  44485. var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  44486. var E = isEnum.call(this, key = toPrimitive(key, true));
  44487. if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  44488. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
  44489. };
  44490. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  44491. it = toIObject(it);
  44492. key = toPrimitive(key, true);
  44493. if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  44494. var D = gOPD(it, key);
  44495. if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  44496. return D;
  44497. };
  44498. var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  44499. var names = gOPN(toIObject(it)),
  44500. result = [],
  44501. i = 0,
  44502. key;
  44503. while (names.length > i) {
  44504. if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  44505. }return result;
  44506. };
  44507. var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  44508. var IS_OP = it === ObjectProto,
  44509. names = gOPN(IS_OP ? OPSymbols : toIObject(it)),
  44510. result = [],
  44511. i = 0,
  44512. key;
  44513. while (names.length > i) {
  44514. if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  44515. }return result;
  44516. };
  44517. // 19.4.1.1 Symbol([description])
  44518. if (!USE_NATIVE) {
  44519. $Symbol = function Symbol() {
  44520. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
  44521. var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
  44522. var $set = function (value) {
  44523. if (this === ObjectProto) $set.call(OPSymbols, value);
  44524. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  44525. setSymbolDesc(this, tag, createDesc(1, value));
  44526. };
  44527. if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
  44528. return wrap(tag);
  44529. };
  44530. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  44531. return this._k;
  44532. });
  44533. $GOPD.f = $getOwnPropertyDescriptor;
  44534. $DP.f = $defineProperty;
  44535. $__require('237').f = gOPNExt.f = $getOwnPropertyNames;
  44536. $__require('18c').f = $propertyIsEnumerable;
  44537. $__require('18b').f = $getOwnPropertySymbols;
  44538. if (DESCRIPTORS && !$__require('228')) {
  44539. redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  44540. }
  44541. wksExt.f = function (name) {
  44542. return wrap(wks(name));
  44543. };
  44544. }
  44545. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
  44546. for (var symbols =
  44547. // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  44548. 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), i = 0; symbols.length > i;) wks(symbols[i++]);
  44549. for (var symbols = $keys(wks.store), i = 0; symbols.length > i;) wksDefine(symbols[i++]);
  44550. $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  44551. // 19.4.2.1 Symbol.for(key)
  44552. 'for': function (key) {
  44553. return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key);
  44554. },
  44555. // 19.4.2.5 Symbol.keyFor(sym)
  44556. keyFor: function keyFor(key) {
  44557. if (isSymbol(key)) return keyOf(SymbolRegistry, key);
  44558. throw TypeError(key + ' is not a symbol!');
  44559. },
  44560. useSetter: function () {
  44561. setter = true;
  44562. },
  44563. useSimple: function () {
  44564. setter = false;
  44565. }
  44566. });
  44567. $export($export.S + $export.F * !USE_NATIVE, 'Object', {
  44568. // 19.1.2.2 Object.create(O [, Properties])
  44569. create: $create,
  44570. // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  44571. defineProperty: $defineProperty,
  44572. // 19.1.2.3 Object.defineProperties(O, Properties)
  44573. defineProperties: $defineProperties,
  44574. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  44575. getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  44576. // 19.1.2.7 Object.getOwnPropertyNames(O)
  44577. getOwnPropertyNames: $getOwnPropertyNames,
  44578. // 19.1.2.8 Object.getOwnPropertySymbols(O)
  44579. getOwnPropertySymbols: $getOwnPropertySymbols
  44580. });
  44581. // 24.3.2 JSON.stringify(value [, replacer [, space]])
  44582. $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  44583. var S = $Symbol();
  44584. // MS Edge converts symbol values to JSON as {}
  44585. // WebKit converts symbol values to JSON as null
  44586. // V8 throws on boxed symbols
  44587. return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
  44588. })), 'JSON', {
  44589. stringify: function stringify(it) {
  44590. if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  44591. var args = [it],
  44592. i = 1,
  44593. replacer,
  44594. $replacer;
  44595. while (arguments.length > i) args.push(arguments[i++]);
  44596. replacer = args[1];
  44597. if (typeof replacer == 'function') $replacer = replacer;
  44598. if ($replacer || !isArray(replacer)) replacer = function (key, value) {
  44599. if ($replacer) value = $replacer.call(this, key, value);
  44600. if (!isSymbol(value)) return value;
  44601. };
  44602. args[1] = replacer;
  44603. return _stringify.apply($JSON, args);
  44604. }
  44605. });
  44606. // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
  44607. $Symbol[PROTOTYPE][TO_PRIMITIVE] || $__require('192')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  44608. // 19.4.3.5 Symbol.prototype[@@toStringTag]
  44609. setToStringTag($Symbol, 'Symbol');
  44610. // 20.2.1.9 Math[@@toStringTag]
  44611. setToStringTag(Math, 'Math', true);
  44612. // 24.3.3 JSON[@@toStringTag]
  44613. setToStringTag(global.JSON, 'JSON', true);
  44614. });
  44615. $__System.registerDynamic("35", ["c"], true, function ($__require, exports, module) {
  44616. var process = $__require("c");
  44617. var global = this || self,
  44618. GLOBAL = global;
  44619. });
  44620. $__System.registerDynamic('23f', ['23e', 'c'], true, function ($__require, exports, module) {
  44621. var process = $__require('c');
  44622. var global = this || self,
  44623. GLOBAL = global;
  44624. $__require('23e')('asyncIterator');
  44625. });
  44626. $__System.registerDynamic("228", ["c"], true, function ($__require, exports, module) {
  44627. var process = $__require("c");
  44628. var global = this || self,
  44629. GLOBAL = global;
  44630. module.exports = true;
  44631. });
  44632. $__System.registerDynamic('23d', ['163', 'c'], true, function ($__require, exports, module) {
  44633. var process = $__require('c');
  44634. var global = this || self,
  44635. GLOBAL = global;
  44636. var global = $__require('163'),
  44637. SHARED = '__core-js_shared__',
  44638. store = global[SHARED] || (global[SHARED] = {});
  44639. module.exports = function (key) {
  44640. return store[key] || (store[key] = {});
  44641. };
  44642. });
  44643. $__System.registerDynamic('22f', ['c'], true, function ($__require, exports, module) {
  44644. var process = $__require('c');
  44645. var global = this || self,
  44646. GLOBAL = global;
  44647. var id = 0,
  44648. px = Math.random();
  44649. module.exports = function (key) {
  44650. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  44651. };
  44652. });
  44653. $__System.registerDynamic('166', ['23d', '22f', '163', 'c'], true, function ($__require, exports, module) {
  44654. var process = $__require('c');
  44655. var global = this || self,
  44656. GLOBAL = global;
  44657. var store = $__require('23d')('wks'),
  44658. uid = $__require('22f'),
  44659. Symbol = $__require('163').Symbol,
  44660. USE_SYMBOL = typeof Symbol == 'function';
  44661. var $exports = module.exports = function (name) {
  44662. return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  44663. };
  44664. $exports.store = store;
  44665. });
  44666. $__System.registerDynamic('22c', ['166', 'c'], true, function ($__require, exports, module) {
  44667. var process = $__require('c');
  44668. var global = this || self,
  44669. GLOBAL = global;
  44670. exports.f = $__require('166');
  44671. });
  44672. $__System.registerDynamic('10b', ['10a', 'c'], true, function ($__require, exports, module) {
  44673. var process = $__require('c');
  44674. var global = this || self,
  44675. GLOBAL = global;
  44676. var isObject = $__require('10a');
  44677. module.exports = function (it) {
  44678. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  44679. return it;
  44680. };
  44681. });
  44682. $__System.registerDynamic('163', ['c'], true, function ($__require, exports, module) {
  44683. var process = $__require('c');
  44684. var global = this || self,
  44685. GLOBAL = global;
  44686. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  44687. var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
  44688. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  44689. });
  44690. $__System.registerDynamic('235', ['10a', '163', 'c'], true, function ($__require, exports, module) {
  44691. var process = $__require('c');
  44692. var global = this || self,
  44693. GLOBAL = global;
  44694. var isObject = $__require('10a'),
  44695. document = $__require('163').document
  44696. // in old IE typeof document.createElement is 'object'
  44697. ,
  44698. is = isObject(document) && isObject(document.createElement);
  44699. module.exports = function (it) {
  44700. return is ? document.createElement(it) : {};
  44701. };
  44702. });
  44703. $__System.registerDynamic('239', ['165', '18f', '235', 'c'], true, function ($__require, exports, module) {
  44704. var process = $__require('c');
  44705. var global = this || self,
  44706. GLOBAL = global;
  44707. module.exports = !$__require('165') && !$__require('18f')(function () {
  44708. return Object.defineProperty($__require('235')('div'), 'a', { get: function () {
  44709. return 7;
  44710. } }).a != 7;
  44711. });
  44712. });
  44713. $__System.registerDynamic('10a', ['c'], true, function ($__require, exports, module) {
  44714. var process = $__require('c');
  44715. var global = this || self,
  44716. GLOBAL = global;
  44717. module.exports = function (it) {
  44718. return typeof it === 'object' ? it !== null : typeof it === 'function';
  44719. };
  44720. });
  44721. $__System.registerDynamic('238', ['10a', 'c'], true, function ($__require, exports, module) {
  44722. var process = $__require('c');
  44723. var global = this || self,
  44724. GLOBAL = global;
  44725. // 7.1.1 ToPrimitive(input [, PreferredType])
  44726. var isObject = $__require('10a');
  44727. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  44728. // and the second argument - flag - preferred type is a string
  44729. module.exports = function (it, S) {
  44730. if (!isObject(it)) return it;
  44731. var fn, val;
  44732. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  44733. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  44734. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  44735. throw TypeError("Can't convert object to primitive value");
  44736. };
  44737. });
  44738. $__System.registerDynamic("18f", ["c"], true, function ($__require, exports, module) {
  44739. var process = $__require("c");
  44740. var global = this || self,
  44741. GLOBAL = global;
  44742. module.exports = function (exec) {
  44743. try {
  44744. return !!exec();
  44745. } catch (e) {
  44746. return true;
  44747. }
  44748. };
  44749. });
  44750. $__System.registerDynamic('165', ['18f', 'c'], true, function ($__require, exports, module) {
  44751. var process = $__require('c');
  44752. var global = this || self,
  44753. GLOBAL = global;
  44754. // Thank's IE8 for his funny defineProperty
  44755. module.exports = !$__require('18f')(function () {
  44756. return Object.defineProperty({}, 'a', { get: function () {
  44757. return 7;
  44758. } }).a != 7;
  44759. });
  44760. });
  44761. $__System.registerDynamic('164', ['10b', '239', '238', '165', 'c'], true, function ($__require, exports, module) {
  44762. var process = $__require('c');
  44763. var global = this || self,
  44764. GLOBAL = global;
  44765. var anObject = $__require('10b'),
  44766. IE8_DOM_DEFINE = $__require('239'),
  44767. toPrimitive = $__require('238'),
  44768. dP = Object.defineProperty;
  44769. exports.f = $__require('165') ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  44770. anObject(O);
  44771. P = toPrimitive(P, true);
  44772. anObject(Attributes);
  44773. if (IE8_DOM_DEFINE) try {
  44774. return dP(O, P, Attributes);
  44775. } catch (e) {/* empty */}
  44776. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  44777. if ('value' in Attributes) O[P] = Attributes.value;
  44778. return O;
  44779. };
  44780. });
  44781. $__System.registerDynamic('23e', ['163', '37', '228', '22c', '164', 'c'], true, function ($__require, exports, module) {
  44782. var process = $__require('c');
  44783. var global = this || self,
  44784. GLOBAL = global;
  44785. var global = $__require('163'),
  44786. core = $__require('37'),
  44787. LIBRARY = $__require('228'),
  44788. wksExt = $__require('22c'),
  44789. defineProperty = $__require('164').f;
  44790. module.exports = function (name) {
  44791. var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  44792. if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
  44793. };
  44794. });
  44795. $__System.registerDynamic('240', ['23e', 'c'], true, function ($__require, exports, module) {
  44796. var process = $__require('c');
  44797. var global = this || self,
  44798. GLOBAL = global;
  44799. $__require('23e')('observable');
  44800. });
  44801. $__System.registerDynamic('37', ['c'], true, function ($__require, exports, module) {
  44802. var process = $__require('c');
  44803. var global = this || self,
  44804. GLOBAL = global;
  44805. var core = module.exports = { version: '2.4.0' };
  44806. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  44807. });
  44808. $__System.registerDynamic("@system-env", [], true, function() {
  44809. return {
  44810. "default": true
  44811. };
  44812. });
  44813. $__System.registerDynamic('c', ['@system-env', '@node/process'], true, function ($__require, exports, module) {
  44814. var global = this || self,
  44815. GLOBAL = global;
  44816. var productionEnv = $__require('@system-env').production;
  44817. var process = $__require('@node/process');
  44818. var pEnv = process.env;
  44819. pEnv.NODE_ENV = productionEnv ? 'production' : 'development';
  44820. module.exports = process;
  44821. });
  44822. $__System.registerDynamic('241', ['1a9', '35', '23f', '240', '37', 'c'], true, function ($__require, exports, module) {
  44823. var process = $__require('c');
  44824. var global = this || self,
  44825. GLOBAL = global;
  44826. $__require('1a9');
  44827. $__require('35');
  44828. $__require('23f');
  44829. $__require('240');
  44830. module.exports = $__require('37').Symbol;
  44831. });
  44832. $__System.registerDynamic("d3", ["241"], true, function ($__require, exports, module) {
  44833. var global = this || self,
  44834. GLOBAL = global;
  44835. module.exports = { "default": $__require("241"), __esModule: true };
  44836. });
  44837. $__System.registerDynamic("30", ["22d", "d3"], true, function ($__require, exports, module) {
  44838. "use strict";
  44839. var global = this || self,
  44840. GLOBAL = global;
  44841. exports.__esModule = true;
  44842. var _iterator = $__require("22d");
  44843. var _iterator2 = _interopRequireDefault(_iterator);
  44844. var _symbol = $__require("d3");
  44845. var _symbol2 = _interopRequireDefault(_symbol);
  44846. var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) {
  44847. return typeof obj;
  44848. } : function (obj) {
  44849. return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj;
  44850. };
  44851. function _interopRequireDefault(obj) {
  44852. return obj && obj.__esModule ? obj : { default: obj };
  44853. }
  44854. exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
  44855. return typeof obj === "undefined" ? "undefined" : _typeof(obj);
  44856. } : function (obj) {
  44857. return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
  44858. };
  44859. });
  44860. $__System.registerDynamic("216", ["17", "5b", "30", "11"], true, function ($__require, exports, module) {
  44861. "use strict";
  44862. var global = this || self,
  44863. GLOBAL = global;
  44864. exports.__esModule = true;
  44865. exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = undefined;
  44866. var _getIterator2 = $__require("17");
  44867. var _getIterator3 = _interopRequireDefault(_getIterator2);
  44868. var _stringify = $__require("5b");
  44869. var _stringify2 = _interopRequireDefault(_stringify);
  44870. var _typeof2 = $__require("30");
  44871. var _typeof3 = _interopRequireDefault(_typeof2);
  44872. exports.assertEach = assertEach;
  44873. exports.assertOneOf = assertOneOf;
  44874. exports.assertNodeType = assertNodeType;
  44875. exports.assertNodeOrValueType = assertNodeOrValueType;
  44876. exports.assertValueType = assertValueType;
  44877. exports.chain = chain;
  44878. exports.default = defineType;
  44879. var _index = $__require("11");
  44880. var t = _interopRequireWildcard(_index);
  44881. function _interopRequireWildcard(obj) {
  44882. if (obj && obj.__esModule) {
  44883. return obj;
  44884. } else {
  44885. var newObj = {};if (obj != null) {
  44886. for (var key in obj) {
  44887. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  44888. }
  44889. }newObj.default = obj;return newObj;
  44890. }
  44891. }
  44892. function _interopRequireDefault(obj) {
  44893. return obj && obj.__esModule ? obj : { default: obj };
  44894. }
  44895. var VISITOR_KEYS = exports.VISITOR_KEYS = {};
  44896. var ALIAS_KEYS = exports.ALIAS_KEYS = {};
  44897. var NODE_FIELDS = exports.NODE_FIELDS = {};
  44898. var BUILDER_KEYS = exports.BUILDER_KEYS = {};
  44899. var DEPRECATED_KEYS = exports.DEPRECATED_KEYS = {};
  44900. function getType(val) {
  44901. if (Array.isArray(val)) {
  44902. return "array";
  44903. } else if (val === null) {
  44904. return "null";
  44905. } else if (val === undefined) {
  44906. return "undefined";
  44907. } else {
  44908. return typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val);
  44909. }
  44910. }
  44911. function assertEach(callback) {
  44912. function validator(node, key, val) {
  44913. if (!Array.isArray(val)) return;
  44914. for (var i = 0; i < val.length; i++) {
  44915. callback(node, key + "[" + i + "]", val[i]);
  44916. }
  44917. }
  44918. validator.each = callback;
  44919. return validator;
  44920. }
  44921. function assertOneOf() {
  44922. for (var _len = arguments.length, vals = Array(_len), _key = 0; _key < _len; _key++) {
  44923. vals[_key] = arguments[_key];
  44924. }
  44925. function validate(node, key, val) {
  44926. if (vals.indexOf(val) < 0) {
  44927. throw new TypeError("Property " + key + " expected value to be one of " + (0, _stringify2.default)(vals) + " but got " + (0, _stringify2.default)(val));
  44928. }
  44929. }
  44930. validate.oneOf = vals;
  44931. return validate;
  44932. }
  44933. function assertNodeType() {
  44934. for (var _len2 = arguments.length, types = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  44935. types[_key2] = arguments[_key2];
  44936. }
  44937. function validate(node, key, val) {
  44938. var valid = false;
  44939. for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  44940. var _ref;
  44941. if (_isArray) {
  44942. if (_i >= _iterator.length) break;
  44943. _ref = _iterator[_i++];
  44944. } else {
  44945. _i = _iterator.next();
  44946. if (_i.done) break;
  44947. _ref = _i.value;
  44948. }
  44949. var type = _ref;
  44950. if (t.is(type, val)) {
  44951. valid = true;
  44952. break;
  44953. }
  44954. }
  44955. if (!valid) {
  44956. throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type)));
  44957. }
  44958. }
  44959. validate.oneOfNodeTypes = types;
  44960. return validate;
  44961. }
  44962. function assertNodeOrValueType() {
  44963. for (var _len3 = arguments.length, types = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  44964. types[_key3] = arguments[_key3];
  44965. }
  44966. function validate(node, key, val) {
  44967. var valid = false;
  44968. for (var _iterator2 = types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  44969. var _ref2;
  44970. if (_isArray2) {
  44971. if (_i2 >= _iterator2.length) break;
  44972. _ref2 = _iterator2[_i2++];
  44973. } else {
  44974. _i2 = _iterator2.next();
  44975. if (_i2.done) break;
  44976. _ref2 = _i2.value;
  44977. }
  44978. var type = _ref2;
  44979. if (getType(val) === type || t.is(type, val)) {
  44980. valid = true;
  44981. break;
  44982. }
  44983. }
  44984. if (!valid) {
  44985. throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + (0, _stringify2.default)(types) + " " + ("but instead got " + (0, _stringify2.default)(val && val.type)));
  44986. }
  44987. }
  44988. validate.oneOfNodeOrValueTypes = types;
  44989. return validate;
  44990. }
  44991. function assertValueType(type) {
  44992. function validate(node, key, val) {
  44993. var valid = getType(val) === type;
  44994. if (!valid) {
  44995. throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val));
  44996. }
  44997. }
  44998. validate.type = type;
  44999. return validate;
  45000. }
  45001. function chain() {
  45002. for (var _len4 = arguments.length, fns = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  45003. fns[_key4] = arguments[_key4];
  45004. }
  45005. function validate() {
  45006. for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  45007. var _ref3;
  45008. if (_isArray3) {
  45009. if (_i3 >= _iterator3.length) break;
  45010. _ref3 = _iterator3[_i3++];
  45011. } else {
  45012. _i3 = _iterator3.next();
  45013. if (_i3.done) break;
  45014. _ref3 = _i3.value;
  45015. }
  45016. var fn = _ref3;
  45017. fn.apply(undefined, arguments);
  45018. }
  45019. }
  45020. validate.chainOf = fns;
  45021. return validate;
  45022. }
  45023. function defineType(type) {
  45024. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  45025. var inherits = opts.inherits && store[opts.inherits] || {};
  45026. opts.fields = opts.fields || inherits.fields || {};
  45027. opts.visitor = opts.visitor || inherits.visitor || [];
  45028. opts.aliases = opts.aliases || inherits.aliases || [];
  45029. opts.builder = opts.builder || inherits.builder || opts.visitor || [];
  45030. if (opts.deprecatedAlias) {
  45031. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  45032. }
  45033. for (var _iterator4 = opts.visitor.concat(opts.builder), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  45034. var _ref4;
  45035. if (_isArray4) {
  45036. if (_i4 >= _iterator4.length) break;
  45037. _ref4 = _iterator4[_i4++];
  45038. } else {
  45039. _i4 = _iterator4.next();
  45040. if (_i4.done) break;
  45041. _ref4 = _i4.value;
  45042. }
  45043. var _key5 = _ref4;
  45044. opts.fields[_key5] = opts.fields[_key5] || {};
  45045. }
  45046. for (var key in opts.fields) {
  45047. var field = opts.fields[key];
  45048. if (opts.builder.indexOf(key) === -1) {
  45049. field.optional = true;
  45050. }
  45051. if (field.default === undefined) {
  45052. field.default = null;
  45053. } else if (!field.validate) {
  45054. field.validate = assertValueType(getType(field.default));
  45055. }
  45056. }
  45057. VISITOR_KEYS[type] = opts.visitor;
  45058. BUILDER_KEYS[type] = opts.builder;
  45059. NODE_FIELDS[type] = opts.fields;
  45060. ALIAS_KEYS[type] = opts.aliases;
  45061. store[type] = opts;
  45062. }
  45063. var store = {};
  45064. });
  45065. $__System.registerDynamic("242", ["11"], true, function ($__require, exports, module) {
  45066. "use strict";
  45067. var global = this || self,
  45068. GLOBAL = global;
  45069. exports.__esModule = true;
  45070. exports.isReactComponent = undefined;
  45071. exports.isCompatTag = isCompatTag;
  45072. exports.buildChildren = buildChildren;
  45073. var _index = $__require("11");
  45074. var t = _interopRequireWildcard(_index);
  45075. function _interopRequireWildcard(obj) {
  45076. if (obj && obj.__esModule) {
  45077. return obj;
  45078. } else {
  45079. var newObj = {};if (obj != null) {
  45080. for (var key in obj) {
  45081. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  45082. }
  45083. }newObj.default = obj;return newObj;
  45084. }
  45085. }
  45086. var isReactComponent = exports.isReactComponent = t.buildMatchMemberExpression("React.Component");
  45087. function isCompatTag(tagName) {
  45088. return !!tagName && /^[a-z]|\-/.test(tagName);
  45089. }
  45090. function cleanJSXElementLiteralChild(child, args) {
  45091. var lines = child.value.split(/\r\n|\n|\r/);
  45092. var lastNonEmptyLine = 0;
  45093. for (var i = 0; i < lines.length; i++) {
  45094. if (lines[i].match(/[^ \t]/)) {
  45095. lastNonEmptyLine = i;
  45096. }
  45097. }
  45098. var str = "";
  45099. for (var _i = 0; _i < lines.length; _i++) {
  45100. var line = lines[_i];
  45101. var isFirstLine = _i === 0;
  45102. var isLastLine = _i === lines.length - 1;
  45103. var isLastNonEmptyLine = _i === lastNonEmptyLine;
  45104. var trimmedLine = line.replace(/\t/g, " ");
  45105. if (!isFirstLine) {
  45106. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  45107. }
  45108. if (!isLastLine) {
  45109. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  45110. }
  45111. if (trimmedLine) {
  45112. if (!isLastNonEmptyLine) {
  45113. trimmedLine += " ";
  45114. }
  45115. str += trimmedLine;
  45116. }
  45117. }
  45118. if (str) args.push(t.stringLiteral(str));
  45119. }
  45120. function buildChildren(node) {
  45121. var elems = [];
  45122. for (var i = 0; i < node.children.length; i++) {
  45123. var child = node.children[i];
  45124. if (t.isJSXText(child)) {
  45125. cleanJSXElementLiteralChild(child, elems);
  45126. continue;
  45127. }
  45128. if (t.isJSXExpressionContainer(child)) child = child.expression;
  45129. if (t.isJSXEmptyExpression(child)) continue;
  45130. elems.push(child);
  45131. }
  45132. return elems;
  45133. }
  45134. });
  45135. $__System.registerDynamic("11", ["1aa", "17", "15", "5b", "1b5", "1b0", "1b4", "1bc", "1bd", "1be", "ce", "212", "21c", "216", "242"], true, function ($__require, exports, module) {
  45136. "use strict";
  45137. var global = this || self,
  45138. GLOBAL = global;
  45139. exports.__esModule = true;
  45140. exports.createTypeAnnotationBasedOnTypeof = exports.removeTypeDuplicates = exports.createUnionTypeAnnotation = exports.valueToNode = exports.toBlock = exports.toExpression = exports.toStatement = exports.toBindingIdentifierName = exports.toIdentifier = exports.toKeyAlias = exports.toSequenceExpression = exports.toComputedKey = exports.isNodesEquivalent = exports.isImmutable = exports.isScope = exports.isSpecifierDefault = exports.isVar = exports.isBlockScoped = exports.isLet = exports.isValidIdentifier = exports.isReferenced = exports.isBinding = exports.getOuterBindingIdentifiers = exports.getBindingIdentifiers = exports.TYPES = exports.react = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = undefined;
  45141. var _getOwnPropertySymbols = $__require("1aa");
  45142. var _getOwnPropertySymbols2 = _interopRequireDefault(_getOwnPropertySymbols);
  45143. var _getIterator2 = $__require("17");
  45144. var _getIterator3 = _interopRequireDefault(_getIterator2);
  45145. var _keys = $__require("15");
  45146. var _keys2 = _interopRequireDefault(_keys);
  45147. var _stringify = $__require("5b");
  45148. var _stringify2 = _interopRequireDefault(_stringify);
  45149. var _constants = $__require("1b5");
  45150. Object.defineProperty(exports, "STATEMENT_OR_BLOCK_KEYS", {
  45151. enumerable: true,
  45152. get: function get() {
  45153. return _constants.STATEMENT_OR_BLOCK_KEYS;
  45154. }
  45155. });
  45156. Object.defineProperty(exports, "FLATTENABLE_KEYS", {
  45157. enumerable: true,
  45158. get: function get() {
  45159. return _constants.FLATTENABLE_KEYS;
  45160. }
  45161. });
  45162. Object.defineProperty(exports, "FOR_INIT_KEYS", {
  45163. enumerable: true,
  45164. get: function get() {
  45165. return _constants.FOR_INIT_KEYS;
  45166. }
  45167. });
  45168. Object.defineProperty(exports, "COMMENT_KEYS", {
  45169. enumerable: true,
  45170. get: function get() {
  45171. return _constants.COMMENT_KEYS;
  45172. }
  45173. });
  45174. Object.defineProperty(exports, "LOGICAL_OPERATORS", {
  45175. enumerable: true,
  45176. get: function get() {
  45177. return _constants.LOGICAL_OPERATORS;
  45178. }
  45179. });
  45180. Object.defineProperty(exports, "UPDATE_OPERATORS", {
  45181. enumerable: true,
  45182. get: function get() {
  45183. return _constants.UPDATE_OPERATORS;
  45184. }
  45185. });
  45186. Object.defineProperty(exports, "BOOLEAN_NUMBER_BINARY_OPERATORS", {
  45187. enumerable: true,
  45188. get: function get() {
  45189. return _constants.BOOLEAN_NUMBER_BINARY_OPERATORS;
  45190. }
  45191. });
  45192. Object.defineProperty(exports, "EQUALITY_BINARY_OPERATORS", {
  45193. enumerable: true,
  45194. get: function get() {
  45195. return _constants.EQUALITY_BINARY_OPERATORS;
  45196. }
  45197. });
  45198. Object.defineProperty(exports, "COMPARISON_BINARY_OPERATORS", {
  45199. enumerable: true,
  45200. get: function get() {
  45201. return _constants.COMPARISON_BINARY_OPERATORS;
  45202. }
  45203. });
  45204. Object.defineProperty(exports, "BOOLEAN_BINARY_OPERATORS", {
  45205. enumerable: true,
  45206. get: function get() {
  45207. return _constants.BOOLEAN_BINARY_OPERATORS;
  45208. }
  45209. });
  45210. Object.defineProperty(exports, "NUMBER_BINARY_OPERATORS", {
  45211. enumerable: true,
  45212. get: function get() {
  45213. return _constants.NUMBER_BINARY_OPERATORS;
  45214. }
  45215. });
  45216. Object.defineProperty(exports, "BINARY_OPERATORS", {
  45217. enumerable: true,
  45218. get: function get() {
  45219. return _constants.BINARY_OPERATORS;
  45220. }
  45221. });
  45222. Object.defineProperty(exports, "BOOLEAN_UNARY_OPERATORS", {
  45223. enumerable: true,
  45224. get: function get() {
  45225. return _constants.BOOLEAN_UNARY_OPERATORS;
  45226. }
  45227. });
  45228. Object.defineProperty(exports, "NUMBER_UNARY_OPERATORS", {
  45229. enumerable: true,
  45230. get: function get() {
  45231. return _constants.NUMBER_UNARY_OPERATORS;
  45232. }
  45233. });
  45234. Object.defineProperty(exports, "STRING_UNARY_OPERATORS", {
  45235. enumerable: true,
  45236. get: function get() {
  45237. return _constants.STRING_UNARY_OPERATORS;
  45238. }
  45239. });
  45240. Object.defineProperty(exports, "UNARY_OPERATORS", {
  45241. enumerable: true,
  45242. get: function get() {
  45243. return _constants.UNARY_OPERATORS;
  45244. }
  45245. });
  45246. Object.defineProperty(exports, "INHERIT_KEYS", {
  45247. enumerable: true,
  45248. get: function get() {
  45249. return _constants.INHERIT_KEYS;
  45250. }
  45251. });
  45252. Object.defineProperty(exports, "BLOCK_SCOPED_SYMBOL", {
  45253. enumerable: true,
  45254. get: function get() {
  45255. return _constants.BLOCK_SCOPED_SYMBOL;
  45256. }
  45257. });
  45258. Object.defineProperty(exports, "NOT_LOCAL_BINDING", {
  45259. enumerable: true,
  45260. get: function get() {
  45261. return _constants.NOT_LOCAL_BINDING;
  45262. }
  45263. });
  45264. exports.is = is;
  45265. exports.isType = isType;
  45266. exports.validate = validate;
  45267. exports.shallowEqual = shallowEqual;
  45268. exports.appendToMemberExpression = appendToMemberExpression;
  45269. exports.prependToMemberExpression = prependToMemberExpression;
  45270. exports.ensureBlock = ensureBlock;
  45271. exports.clone = clone;
  45272. exports.cloneWithoutLoc = cloneWithoutLoc;
  45273. exports.cloneDeep = cloneDeep;
  45274. exports.buildMatchMemberExpression = buildMatchMemberExpression;
  45275. exports.removeComments = removeComments;
  45276. exports.inheritsComments = inheritsComments;
  45277. exports.inheritTrailingComments = inheritTrailingComments;
  45278. exports.inheritLeadingComments = inheritLeadingComments;
  45279. exports.inheritInnerComments = inheritInnerComments;
  45280. exports.inherits = inherits;
  45281. exports.assertNode = assertNode;
  45282. exports.isNode = isNode;
  45283. exports.traverseFast = traverseFast;
  45284. exports.removeProperties = removeProperties;
  45285. exports.removePropertiesDeep = removePropertiesDeep;
  45286. var _retrievers = $__require("1b0");
  45287. Object.defineProperty(exports, "getBindingIdentifiers", {
  45288. enumerable: true,
  45289. get: function get() {
  45290. return _retrievers.getBindingIdentifiers;
  45291. }
  45292. });
  45293. Object.defineProperty(exports, "getOuterBindingIdentifiers", {
  45294. enumerable: true,
  45295. get: function get() {
  45296. return _retrievers.getOuterBindingIdentifiers;
  45297. }
  45298. });
  45299. var _validators = $__require("1b4");
  45300. Object.defineProperty(exports, "isBinding", {
  45301. enumerable: true,
  45302. get: function get() {
  45303. return _validators.isBinding;
  45304. }
  45305. });
  45306. Object.defineProperty(exports, "isReferenced", {
  45307. enumerable: true,
  45308. get: function get() {
  45309. return _validators.isReferenced;
  45310. }
  45311. });
  45312. Object.defineProperty(exports, "isValidIdentifier", {
  45313. enumerable: true,
  45314. get: function get() {
  45315. return _validators.isValidIdentifier;
  45316. }
  45317. });
  45318. Object.defineProperty(exports, "isLet", {
  45319. enumerable: true,
  45320. get: function get() {
  45321. return _validators.isLet;
  45322. }
  45323. });
  45324. Object.defineProperty(exports, "isBlockScoped", {
  45325. enumerable: true,
  45326. get: function get() {
  45327. return _validators.isBlockScoped;
  45328. }
  45329. });
  45330. Object.defineProperty(exports, "isVar", {
  45331. enumerable: true,
  45332. get: function get() {
  45333. return _validators.isVar;
  45334. }
  45335. });
  45336. Object.defineProperty(exports, "isSpecifierDefault", {
  45337. enumerable: true,
  45338. get: function get() {
  45339. return _validators.isSpecifierDefault;
  45340. }
  45341. });
  45342. Object.defineProperty(exports, "isScope", {
  45343. enumerable: true,
  45344. get: function get() {
  45345. return _validators.isScope;
  45346. }
  45347. });
  45348. Object.defineProperty(exports, "isImmutable", {
  45349. enumerable: true,
  45350. get: function get() {
  45351. return _validators.isImmutable;
  45352. }
  45353. });
  45354. Object.defineProperty(exports, "isNodesEquivalent", {
  45355. enumerable: true,
  45356. get: function get() {
  45357. return _validators.isNodesEquivalent;
  45358. }
  45359. });
  45360. var _converters = $__require("1bc");
  45361. Object.defineProperty(exports, "toComputedKey", {
  45362. enumerable: true,
  45363. get: function get() {
  45364. return _converters.toComputedKey;
  45365. }
  45366. });
  45367. Object.defineProperty(exports, "toSequenceExpression", {
  45368. enumerable: true,
  45369. get: function get() {
  45370. return _converters.toSequenceExpression;
  45371. }
  45372. });
  45373. Object.defineProperty(exports, "toKeyAlias", {
  45374. enumerable: true,
  45375. get: function get() {
  45376. return _converters.toKeyAlias;
  45377. }
  45378. });
  45379. Object.defineProperty(exports, "toIdentifier", {
  45380. enumerable: true,
  45381. get: function get() {
  45382. return _converters.toIdentifier;
  45383. }
  45384. });
  45385. Object.defineProperty(exports, "toBindingIdentifierName", {
  45386. enumerable: true,
  45387. get: function get() {
  45388. return _converters.toBindingIdentifierName;
  45389. }
  45390. });
  45391. Object.defineProperty(exports, "toStatement", {
  45392. enumerable: true,
  45393. get: function get() {
  45394. return _converters.toStatement;
  45395. }
  45396. });
  45397. Object.defineProperty(exports, "toExpression", {
  45398. enumerable: true,
  45399. get: function get() {
  45400. return _converters.toExpression;
  45401. }
  45402. });
  45403. Object.defineProperty(exports, "toBlock", {
  45404. enumerable: true,
  45405. get: function get() {
  45406. return _converters.toBlock;
  45407. }
  45408. });
  45409. Object.defineProperty(exports, "valueToNode", {
  45410. enumerable: true,
  45411. get: function get() {
  45412. return _converters.valueToNode;
  45413. }
  45414. });
  45415. var _flow = $__require("1bd");
  45416. Object.defineProperty(exports, "createUnionTypeAnnotation", {
  45417. enumerable: true,
  45418. get: function get() {
  45419. return _flow.createUnionTypeAnnotation;
  45420. }
  45421. });
  45422. Object.defineProperty(exports, "removeTypeDuplicates", {
  45423. enumerable: true,
  45424. get: function get() {
  45425. return _flow.removeTypeDuplicates;
  45426. }
  45427. });
  45428. Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
  45429. enumerable: true,
  45430. get: function get() {
  45431. return _flow.createTypeAnnotationBasedOnTypeof;
  45432. }
  45433. });
  45434. var _toFastProperties = $__require("1be");
  45435. var _toFastProperties2 = _interopRequireDefault(_toFastProperties);
  45436. var _clone = $__require("ce");
  45437. var _clone2 = _interopRequireDefault(_clone);
  45438. var _uniq = $__require("212");
  45439. var _uniq2 = _interopRequireDefault(_uniq);
  45440. $__require("21c");
  45441. var _definitions = $__require("216");
  45442. var _react2 = $__require("242");
  45443. var _react = _interopRequireWildcard(_react2);
  45444. function _interopRequireWildcard(obj) {
  45445. if (obj && obj.__esModule) {
  45446. return obj;
  45447. } else {
  45448. var newObj = {};if (obj != null) {
  45449. for (var key in obj) {
  45450. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  45451. }
  45452. }newObj.default = obj;return newObj;
  45453. }
  45454. }
  45455. function _interopRequireDefault(obj) {
  45456. return obj && obj.__esModule ? obj : { default: obj };
  45457. }
  45458. var t = exports;
  45459. function registerType(type) {
  45460. var is = t["is" + type];
  45461. if (!is) {
  45462. is = t["is" + type] = function (node, opts) {
  45463. return t.is(type, node, opts);
  45464. };
  45465. }
  45466. t["assert" + type] = function (node, opts) {
  45467. opts = opts || {};
  45468. if (!is(node, opts)) {
  45469. throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts));
  45470. }
  45471. };
  45472. }
  45473. exports.VISITOR_KEYS = _definitions.VISITOR_KEYS;
  45474. exports.ALIAS_KEYS = _definitions.ALIAS_KEYS;
  45475. exports.NODE_FIELDS = _definitions.NODE_FIELDS;
  45476. exports.BUILDER_KEYS = _definitions.BUILDER_KEYS;
  45477. exports.DEPRECATED_KEYS = _definitions.DEPRECATED_KEYS;
  45478. exports.react = _react;
  45479. for (var type in t.VISITOR_KEYS) {
  45480. registerType(type);
  45481. }
  45482. t.FLIPPED_ALIAS_KEYS = {};
  45483. (0, _keys2.default)(t.ALIAS_KEYS).forEach(function (type) {
  45484. t.ALIAS_KEYS[type].forEach(function (alias) {
  45485. var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || [];
  45486. types.push(type);
  45487. });
  45488. });
  45489. (0, _keys2.default)(t.FLIPPED_ALIAS_KEYS).forEach(function (type) {
  45490. t[type.toUpperCase() + "_TYPES"] = t.FLIPPED_ALIAS_KEYS[type];
  45491. registerType(type);
  45492. });
  45493. var TYPES = exports.TYPES = (0, _keys2.default)(t.VISITOR_KEYS).concat((0, _keys2.default)(t.FLIPPED_ALIAS_KEYS)).concat((0, _keys2.default)(t.DEPRECATED_KEYS));
  45494. function is(type, node, opts) {
  45495. if (!node) return false;
  45496. var matches = isType(node.type, type);
  45497. if (!matches) return false;
  45498. if (typeof opts === "undefined") {
  45499. return true;
  45500. } else {
  45501. return t.shallowEqual(node, opts);
  45502. }
  45503. }
  45504. function isType(nodeType, targetType) {
  45505. if (nodeType === targetType) return true;
  45506. if (t.ALIAS_KEYS[targetType]) return false;
  45507. var aliases = t.FLIPPED_ALIAS_KEYS[targetType];
  45508. if (aliases) {
  45509. if (aliases[0] === nodeType) return true;
  45510. for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
  45511. var _ref;
  45512. if (_isArray) {
  45513. if (_i >= _iterator.length) break;
  45514. _ref = _iterator[_i++];
  45515. } else {
  45516. _i = _iterator.next();
  45517. if (_i.done) break;
  45518. _ref = _i.value;
  45519. }
  45520. var alias = _ref;
  45521. if (nodeType === alias) return true;
  45522. }
  45523. }
  45524. return false;
  45525. }
  45526. (0, _keys2.default)(t.BUILDER_KEYS).forEach(function (type) {
  45527. var keys = t.BUILDER_KEYS[type];
  45528. function builder() {
  45529. if (arguments.length > keys.length) {
  45530. throw new Error("t." + type + ": Too many arguments passed. Received " + arguments.length + " but can receive " + ("no more than " + keys.length));
  45531. }
  45532. var node = {};
  45533. node.type = type;
  45534. var i = 0;
  45535. for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
  45536. var _ref2;
  45537. if (_isArray2) {
  45538. if (_i2 >= _iterator2.length) break;
  45539. _ref2 = _iterator2[_i2++];
  45540. } else {
  45541. _i2 = _iterator2.next();
  45542. if (_i2.done) break;
  45543. _ref2 = _i2.value;
  45544. }
  45545. var _key = _ref2;
  45546. var field = t.NODE_FIELDS[type][_key];
  45547. var arg = arguments[i++];
  45548. if (arg === undefined) arg = (0, _clone2.default)(field.default);
  45549. node[_key] = arg;
  45550. }
  45551. for (var key in node) {
  45552. validate(node, key, node[key]);
  45553. }
  45554. return node;
  45555. }
  45556. t[type] = builder;
  45557. t[type[0].toLowerCase() + type.slice(1)] = builder;
  45558. });
  45559. var _loop = function _loop(_type) {
  45560. var newType = t.DEPRECATED_KEYS[_type];
  45561. function proxy(fn) {
  45562. return function () {
  45563. console.trace("The node type " + _type + " has been renamed to " + newType);
  45564. return fn.apply(this, arguments);
  45565. };
  45566. }
  45567. t[_type] = t[_type[0].toLowerCase() + _type.slice(1)] = proxy(t[newType]);
  45568. t["is" + _type] = proxy(t["is" + newType]);
  45569. t["assert" + _type] = proxy(t["assert" + newType]);
  45570. };
  45571. for (var _type in t.DEPRECATED_KEYS) {
  45572. _loop(_type);
  45573. }
  45574. function validate(node, key, val) {
  45575. if (!node) return;
  45576. var fields = t.NODE_FIELDS[node.type];
  45577. if (!fields) return;
  45578. var field = fields[key];
  45579. if (!field || !field.validate) return;
  45580. if (field.optional && val == null) return;
  45581. field.validate(node, key, val);
  45582. }
  45583. function shallowEqual(actual, expected) {
  45584. var keys = (0, _keys2.default)(expected);
  45585. for (var _iterator3 = keys, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
  45586. var _ref3;
  45587. if (_isArray3) {
  45588. if (_i3 >= _iterator3.length) break;
  45589. _ref3 = _iterator3[_i3++];
  45590. } else {
  45591. _i3 = _iterator3.next();
  45592. if (_i3.done) break;
  45593. _ref3 = _i3.value;
  45594. }
  45595. var key = _ref3;
  45596. if (actual[key] !== expected[key]) {
  45597. return false;
  45598. }
  45599. }
  45600. return true;
  45601. }
  45602. function appendToMemberExpression(member, append, computed) {
  45603. member.object = t.memberExpression(member.object, member.property, member.computed);
  45604. member.property = append;
  45605. member.computed = !!computed;
  45606. return member;
  45607. }
  45608. function prependToMemberExpression(member, prepend) {
  45609. member.object = t.memberExpression(prepend, member.object);
  45610. return member;
  45611. }
  45612. function ensureBlock(node) {
  45613. var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "body";
  45614. return node[key] = t.toBlock(node[key], node);
  45615. }
  45616. function clone(node) {
  45617. if (!node) return node;
  45618. var newNode = {};
  45619. for (var key in node) {
  45620. if (key[0] === "_") continue;
  45621. newNode[key] = node[key];
  45622. }
  45623. return newNode;
  45624. }
  45625. function cloneWithoutLoc(node) {
  45626. var newNode = clone(node);
  45627. delete newNode.loc;
  45628. return newNode;
  45629. }
  45630. function cloneDeep(node) {
  45631. if (!node) return node;
  45632. var newNode = {};
  45633. for (var key in node) {
  45634. if (key[0] === "_") continue;
  45635. var val = node[key];
  45636. if (val) {
  45637. if (val.type) {
  45638. val = t.cloneDeep(val);
  45639. } else if (Array.isArray(val)) {
  45640. val = val.map(t.cloneDeep);
  45641. }
  45642. }
  45643. newNode[key] = val;
  45644. }
  45645. return newNode;
  45646. }
  45647. function buildMatchMemberExpression(match, allowPartial) {
  45648. var parts = match.split(".");
  45649. return function (member) {
  45650. if (!t.isMemberExpression(member)) return false;
  45651. var search = [member];
  45652. var i = 0;
  45653. while (search.length) {
  45654. var node = search.shift();
  45655. if (allowPartial && i === parts.length) {
  45656. return true;
  45657. }
  45658. if (t.isIdentifier(node)) {
  45659. if (parts[i] !== node.name) return false;
  45660. } else if (t.isStringLiteral(node)) {
  45661. if (parts[i] !== node.value) return false;
  45662. } else if (t.isMemberExpression(node)) {
  45663. if (node.computed && !t.isStringLiteral(node.property)) {
  45664. return false;
  45665. } else {
  45666. search.push(node.object);
  45667. search.push(node.property);
  45668. continue;
  45669. }
  45670. } else {
  45671. return false;
  45672. }
  45673. if (++i > parts.length) {
  45674. return false;
  45675. }
  45676. }
  45677. return true;
  45678. };
  45679. }
  45680. function removeComments(node) {
  45681. for (var _iterator4 = t.COMMENT_KEYS, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, _getIterator3.default)(_iterator4);;) {
  45682. var _ref4;
  45683. if (_isArray4) {
  45684. if (_i4 >= _iterator4.length) break;
  45685. _ref4 = _iterator4[_i4++];
  45686. } else {
  45687. _i4 = _iterator4.next();
  45688. if (_i4.done) break;
  45689. _ref4 = _i4.value;
  45690. }
  45691. var key = _ref4;
  45692. delete node[key];
  45693. }
  45694. return node;
  45695. }
  45696. function inheritsComments(child, parent) {
  45697. inheritTrailingComments(child, parent);
  45698. inheritLeadingComments(child, parent);
  45699. inheritInnerComments(child, parent);
  45700. return child;
  45701. }
  45702. function inheritTrailingComments(child, parent) {
  45703. _inheritComments("trailingComments", child, parent);
  45704. }
  45705. function inheritLeadingComments(child, parent) {
  45706. _inheritComments("leadingComments", child, parent);
  45707. }
  45708. function inheritInnerComments(child, parent) {
  45709. _inheritComments("innerComments", child, parent);
  45710. }
  45711. function _inheritComments(key, child, parent) {
  45712. if (child && parent) {
  45713. child[key] = (0, _uniq2.default)([].concat(child[key], parent[key]).filter(Boolean));
  45714. }
  45715. }
  45716. function inherits(child, parent) {
  45717. if (!child || !parent) return child;
  45718. for (var _iterator5 = t.INHERIT_KEYS.optional, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) {
  45719. var _ref5;
  45720. if (_isArray5) {
  45721. if (_i5 >= _iterator5.length) break;
  45722. _ref5 = _iterator5[_i5++];
  45723. } else {
  45724. _i5 = _iterator5.next();
  45725. if (_i5.done) break;
  45726. _ref5 = _i5.value;
  45727. }
  45728. var _key2 = _ref5;
  45729. if (child[_key2] == null) {
  45730. child[_key2] = parent[_key2];
  45731. }
  45732. }
  45733. for (var key in parent) {
  45734. if (key[0] === "_") child[key] = parent[key];
  45735. }
  45736. for (var _iterator6 = t.INHERIT_KEYS.force, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
  45737. var _ref6;
  45738. if (_isArray6) {
  45739. if (_i6 >= _iterator6.length) break;
  45740. _ref6 = _iterator6[_i6++];
  45741. } else {
  45742. _i6 = _iterator6.next();
  45743. if (_i6.done) break;
  45744. _ref6 = _i6.value;
  45745. }
  45746. var _key3 = _ref6;
  45747. child[_key3] = parent[_key3];
  45748. }
  45749. t.inheritsComments(child, parent);
  45750. return child;
  45751. }
  45752. function assertNode(node) {
  45753. if (!isNode(node)) {
  45754. throw new TypeError("Not a valid node " + (node && node.type));
  45755. }
  45756. }
  45757. function isNode(node) {
  45758. return !!(node && _definitions.VISITOR_KEYS[node.type]);
  45759. }
  45760. (0, _toFastProperties2.default)(t);
  45761. (0, _toFastProperties2.default)(t.VISITOR_KEYS);
  45762. function traverseFast(node, enter, opts) {
  45763. if (!node) return;
  45764. var keys = t.VISITOR_KEYS[node.type];
  45765. if (!keys) return;
  45766. opts = opts || {};
  45767. enter(node, opts);
  45768. for (var _iterator7 = keys, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
  45769. var _ref7;
  45770. if (_isArray7) {
  45771. if (_i7 >= _iterator7.length) break;
  45772. _ref7 = _iterator7[_i7++];
  45773. } else {
  45774. _i7 = _iterator7.next();
  45775. if (_i7.done) break;
  45776. _ref7 = _i7.value;
  45777. }
  45778. var key = _ref7;
  45779. var subNode = node[key];
  45780. if (Array.isArray(subNode)) {
  45781. for (var _iterator8 = subNode, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, _getIterator3.default)(_iterator8);;) {
  45782. var _ref8;
  45783. if (_isArray8) {
  45784. if (_i8 >= _iterator8.length) break;
  45785. _ref8 = _iterator8[_i8++];
  45786. } else {
  45787. _i8 = _iterator8.next();
  45788. if (_i8.done) break;
  45789. _ref8 = _i8.value;
  45790. }
  45791. var _node = _ref8;
  45792. traverseFast(_node, enter, opts);
  45793. }
  45794. } else {
  45795. traverseFast(subNode, enter, opts);
  45796. }
  45797. }
  45798. }
  45799. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  45800. var CLEAR_KEYS_PLUS_COMMENTS = t.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  45801. function removeProperties(node, opts) {
  45802. opts = opts || {};
  45803. var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  45804. for (var _iterator9 = map, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, _getIterator3.default)(_iterator9);;) {
  45805. var _ref9;
  45806. if (_isArray9) {
  45807. if (_i9 >= _iterator9.length) break;
  45808. _ref9 = _iterator9[_i9++];
  45809. } else {
  45810. _i9 = _iterator9.next();
  45811. if (_i9.done) break;
  45812. _ref9 = _i9.value;
  45813. }
  45814. var _key4 = _ref9;
  45815. if (node[_key4] != null) node[_key4] = undefined;
  45816. }
  45817. for (var key in node) {
  45818. if (key[0] === "_" && node[key] != null) node[key] = undefined;
  45819. }
  45820. var syms = (0, _getOwnPropertySymbols2.default)(node);
  45821. for (var _iterator10 = syms, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, _getIterator3.default)(_iterator10);;) {
  45822. var _ref10;
  45823. if (_isArray10) {
  45824. if (_i10 >= _iterator10.length) break;
  45825. _ref10 = _iterator10[_i10++];
  45826. } else {
  45827. _i10 = _iterator10.next();
  45828. if (_i10.done) break;
  45829. _ref10 = _i10.value;
  45830. }
  45831. var sym = _ref10;
  45832. node[sym] = null;
  45833. }
  45834. }
  45835. function removePropertiesDeep(tree, opts) {
  45836. traverseFast(tree, removeProperties, opts);
  45837. return tree;
  45838. }
  45839. });
  45840. $__System.registerDynamic("1a6", ["11"], true, function ($__require, exports, module) {
  45841. "use strict";
  45842. var global = this || self,
  45843. GLOBAL = global;
  45844. exports.__esModule = true;
  45845. exports.runtimeProperty = runtimeProperty;
  45846. exports.isReference = isReference;
  45847. var _babelTypes = $__require("11");
  45848. var t = _interopRequireWildcard(_babelTypes);
  45849. function _interopRequireWildcard(obj) {
  45850. if (obj && obj.__esModule) {
  45851. return obj;
  45852. } else {
  45853. var newObj = {};if (obj != null) {
  45854. for (var key in obj) {
  45855. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  45856. }
  45857. }newObj.default = obj;return newObj;
  45858. }
  45859. }
  45860. function runtimeProperty(name) {
  45861. return t.memberExpression(t.identifier("regeneratorRuntime"), t.identifier(name), false);
  45862. } /**
  45863. * Copyright (c) 2014, Facebook, Inc.
  45864. * All rights reserved.
  45865. *
  45866. * This source code is licensed under the BSD-style license found in the
  45867. * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
  45868. * additional grant of patent rights can be found in the PATENTS file in
  45869. * the same directory.
  45870. */
  45871. function isReference(path) {
  45872. return path.isReferenced() || path.parentPath.isAssignmentExpression({ left: path.node });
  45873. }
  45874. });
  45875. $__System.registerDynamic("1a5", [], true, function ($__require, exports, module) {
  45876. "use strict";
  45877. var global = this || self,
  45878. GLOBAL = global;
  45879. var originalObject = Object;
  45880. var originalDefProp = Object.defineProperty;
  45881. var originalCreate = Object.create;
  45882. function defProp(obj, name, value) {
  45883. if (originalDefProp) try {
  45884. originalDefProp.call(originalObject, obj, name, { value: value });
  45885. } catch (definePropertyIsBrokenInIE8) {
  45886. obj[name] = value;
  45887. } else {
  45888. obj[name] = value;
  45889. }
  45890. }
  45891. // For functions that will be invoked using .call or .apply, we need to
  45892. // define those methods on the function objects themselves, rather than
  45893. // inheriting them from Function.prototype, so that a malicious or clumsy
  45894. // third party cannot interfere with the functionality of this module by
  45895. // redefining Function.prototype.call or .apply.
  45896. function makeSafeToCall(fun) {
  45897. if (fun) {
  45898. defProp(fun, "call", fun.call);
  45899. defProp(fun, "apply", fun.apply);
  45900. }
  45901. return fun;
  45902. }
  45903. makeSafeToCall(originalDefProp);
  45904. makeSafeToCall(originalCreate);
  45905. var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty);
  45906. var numToStr = makeSafeToCall(Number.prototype.toString);
  45907. var strSlice = makeSafeToCall(String.prototype.slice);
  45908. var cloner = function () {};
  45909. function create(prototype) {
  45910. if (originalCreate) {
  45911. return originalCreate.call(originalObject, prototype);
  45912. }
  45913. cloner.prototype = prototype || null;
  45914. return new cloner();
  45915. }
  45916. var rand = Math.random;
  45917. var uniqueKeys = create(null);
  45918. function makeUniqueKey() {
  45919. // Collisions are highly unlikely, but this module is in the business of
  45920. // making guarantees rather than safe bets.
  45921. do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2)); while (hasOwn.call(uniqueKeys, uniqueKey));
  45922. return uniqueKeys[uniqueKey] = uniqueKey;
  45923. }
  45924. function internString(str) {
  45925. var obj = {};
  45926. obj[str] = true;
  45927. return Object.keys(obj)[0];
  45928. }
  45929. // External users might find this function useful, but it is not necessary
  45930. // for the typical use of this module.
  45931. exports.makeUniqueKey = makeUniqueKey;
  45932. // Object.getOwnPropertyNames is the only way to enumerate non-enumerable
  45933. // properties, so if we wrap it to ignore our secret keys, there should be
  45934. // no way (except guessing) to access those properties.
  45935. var originalGetOPNs = Object.getOwnPropertyNames;
  45936. Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
  45937. for (var names = originalGetOPNs(object), src = 0, dst = 0, len = names.length; src < len; ++src) {
  45938. if (!hasOwn.call(uniqueKeys, names[src])) {
  45939. if (src > dst) {
  45940. names[dst] = names[src];
  45941. }
  45942. ++dst;
  45943. }
  45944. }
  45945. names.length = dst;
  45946. return names;
  45947. };
  45948. function defaultCreatorFn(object) {
  45949. return create(null);
  45950. }
  45951. function makeAccessor(secretCreatorFn) {
  45952. var brand = makeUniqueKey();
  45953. var passkey = create(null);
  45954. secretCreatorFn = secretCreatorFn || defaultCreatorFn;
  45955. function register(object) {
  45956. var secret; // Created lazily.
  45957. function vault(key, forget) {
  45958. // Only code that has access to the passkey can retrieve (or forget)
  45959. // the secret object.
  45960. if (key === passkey) {
  45961. return forget ? secret = null : secret || (secret = secretCreatorFn(object));
  45962. }
  45963. }
  45964. defProp(object, brand, vault);
  45965. }
  45966. function accessor(object) {
  45967. if (!hasOwn.call(object, brand)) register(object);
  45968. return object[brand](passkey);
  45969. }
  45970. accessor.forget = function (object) {
  45971. if (hasOwn.call(object, brand)) object[brand](passkey, true);
  45972. };
  45973. return accessor;
  45974. }
  45975. exports.makeAccessor = makeAccessor;
  45976. });
  45977. $__System.registerDynamic("243", ["@node/assert", "11", "1a1", "1a3", "1a7", "1a6", "1a5"], true, function ($__require, exports, module) {
  45978. "use strict";
  45979. var global = this || self,
  45980. GLOBAL = global;
  45981. var _assert = $__require("@node/assert");
  45982. var _assert2 = _interopRequireDefault(_assert);
  45983. var _babelTypes = $__require("11");
  45984. var t = _interopRequireWildcard(_babelTypes);
  45985. var _hoist = $__require("1a1");
  45986. var _emit = $__require("1a3");
  45987. var _replaceShorthandObjectMethod = $__require("1a7");
  45988. var _replaceShorthandObjectMethod2 = _interopRequireDefault(_replaceShorthandObjectMethod);
  45989. var _util = $__require("1a6");
  45990. var util = _interopRequireWildcard(_util);
  45991. function _interopRequireWildcard(obj) {
  45992. if (obj && obj.__esModule) {
  45993. return obj;
  45994. } else {
  45995. var newObj = {};if (obj != null) {
  45996. for (var key in obj) {
  45997. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  45998. }
  45999. }newObj.default = obj;return newObj;
  46000. }
  46001. }
  46002. function _interopRequireDefault(obj) {
  46003. return obj && obj.__esModule ? obj : { default: obj };
  46004. }
  46005. /**
  46006. * Copyright (c) 2014, Facebook, Inc.
  46007. * All rights reserved.
  46008. *
  46009. * This source code is licensed under the BSD-style license found in the
  46010. * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
  46011. * additional grant of patent rights can be found in the PATENTS file in
  46012. * the same directory.
  46013. */
  46014. var getMarkInfo = $__require("1a5").makeAccessor();
  46015. exports.visitor = {
  46016. Function: {
  46017. exit: function exit(path, state) {
  46018. var node = path.node;
  46019. if (node.generator) {
  46020. if (node.async) {
  46021. // Async generator
  46022. if (state.opts.asyncGenerators === false) return;
  46023. } else {
  46024. // Plain generator
  46025. if (state.opts.generators === false) return;
  46026. }
  46027. } else if (node.async) {
  46028. // Async function
  46029. if (state.opts.async === false) return;
  46030. } else {
  46031. // Not a generator or async function.
  46032. return;
  46033. }
  46034. // if this is an ObjectMethod, we need to convert it to an ObjectProperty
  46035. path = (0, _replaceShorthandObjectMethod2.default)(path);
  46036. node = path.node;
  46037. var contextId = path.scope.generateUidIdentifier("context");
  46038. var argsId = path.scope.generateUidIdentifier("args");
  46039. path.ensureBlock();
  46040. var bodyBlockPath = path.get("body");
  46041. if (node.async) {
  46042. bodyBlockPath.traverse(awaitVisitor);
  46043. }
  46044. bodyBlockPath.traverse(functionSentVisitor, {
  46045. context: contextId
  46046. });
  46047. var outerBody = [];
  46048. var innerBody = [];
  46049. bodyBlockPath.get("body").forEach(function (childPath) {
  46050. var node = childPath.node;
  46051. if (t.isExpressionStatement(node) && t.isStringLiteral(node.expression)) {
  46052. // Babylon represents directives like "use strict" as elements
  46053. // of a bodyBlockPath.node.directives array, but they could just
  46054. // as easily be represented (by other parsers) as traditional
  46055. // string-literal-valued expression statements, so we need to
  46056. // handle that here. (#248)
  46057. outerBody.push(node);
  46058. } else if (node && node._blockHoist != null) {
  46059. outerBody.push(node);
  46060. } else {
  46061. innerBody.push(node);
  46062. }
  46063. });
  46064. if (outerBody.length > 0) {
  46065. // Only replace the inner body if we actually hoisted any statements
  46066. // to the outer body.
  46067. bodyBlockPath.node.body = innerBody;
  46068. }
  46069. var outerFnExpr = getOuterFnExpr(path);
  46070. // Note that getOuterFnExpr has the side-effect of ensuring that the
  46071. // function has a name (so node.id will always be an Identifier), even
  46072. // if a temporary name has to be synthesized.
  46073. t.assertIdentifier(node.id);
  46074. var innerFnId = t.identifier(node.id.name + "$");
  46075. // Turn all declarations into vars, and replace the original
  46076. // declarations with equivalent assignment expressions.
  46077. var vars = (0, _hoist.hoist)(path);
  46078. var didRenameArguments = renameArguments(path, argsId);
  46079. if (didRenameArguments) {
  46080. vars = vars || t.variableDeclaration("var", []);
  46081. var argumentIdentifier = t.identifier("arguments");
  46082. // we need to do this as otherwise arguments in arrow functions gets hoisted
  46083. argumentIdentifier._shadowedFunctionLiteral = path;
  46084. vars.declarations.push(t.variableDeclarator(argsId, argumentIdentifier));
  46085. }
  46086. var emitter = new _emit.Emitter(contextId);
  46087. emitter.explode(path.get("body"));
  46088. if (vars && vars.declarations.length > 0) {
  46089. outerBody.push(vars);
  46090. }
  46091. var wrapArgs = [emitter.getContextFunction(innerFnId),
  46092. // Async functions that are not generators don't care about the
  46093. // outer function because they don't need it to be marked and don't
  46094. // inherit from its .prototype.
  46095. node.generator ? outerFnExpr : t.nullLiteral(), t.thisExpression()];
  46096. var tryLocsList = emitter.getTryLocsList();
  46097. if (tryLocsList) {
  46098. wrapArgs.push(tryLocsList);
  46099. }
  46100. var wrapCall = t.callExpression(util.runtimeProperty(node.async ? "async" : "wrap"), wrapArgs);
  46101. outerBody.push(t.returnStatement(wrapCall));
  46102. node.body = t.blockStatement(outerBody);
  46103. var oldDirectives = bodyBlockPath.node.directives;
  46104. if (oldDirectives) {
  46105. // Babylon represents directives like "use strict" as elements of
  46106. // a bodyBlockPath.node.directives array. (#248)
  46107. node.body.directives = oldDirectives;
  46108. }
  46109. var wasGeneratorFunction = node.generator;
  46110. if (wasGeneratorFunction) {
  46111. node.generator = false;
  46112. }
  46113. if (node.async) {
  46114. node.async = false;
  46115. }
  46116. if (wasGeneratorFunction && t.isExpression(node)) {
  46117. path.replaceWith(t.callExpression(util.runtimeProperty("mark"), [node]));
  46118. }
  46119. // Generators are processed in 'exit' handlers so that regenerator only has to run on
  46120. // an ES5 AST, but that means traversal will not pick up newly inserted references
  46121. // to things like 'regeneratorRuntime'. To avoid this, we explicitly requeue.
  46122. path.requeue();
  46123. }
  46124. }
  46125. };
  46126. // Given a NodePath for a Function, return an Expression node that can be
  46127. // used to refer reliably to the function object from inside the function.
  46128. // This expression is essentially a replacement for arguments.callee, with
  46129. // the key advantage that it works in strict mode.
  46130. function getOuterFnExpr(funPath) {
  46131. var node = funPath.node;
  46132. t.assertFunction(node);
  46133. if (!node.id) {
  46134. // Default-exported function declarations, and function expressions may not
  46135. // have a name to reference, so we explicitly add one.
  46136. node.id = funPath.scope.parent.generateUidIdentifier("callee");
  46137. }
  46138. if (node.generator && // Non-generator functions don't need to be marked.
  46139. t.isFunctionDeclaration(node)) {
  46140. var pp = funPath.findParent(function (path) {
  46141. return path.isProgram() || path.isBlockStatement();
  46142. });
  46143. if (!pp) {
  46144. return node.id;
  46145. }
  46146. var markDecl = getRuntimeMarkDecl(pp);
  46147. var markedArray = markDecl.declarations[0].id;
  46148. var funDeclIdArray = markDecl.declarations[0].init.callee.object;
  46149. t.assertArrayExpression(funDeclIdArray);
  46150. var index = funDeclIdArray.elements.length;
  46151. funDeclIdArray.elements.push(node.id);
  46152. return t.memberExpression(markedArray, t.numericLiteral(index), true);
  46153. }
  46154. return node.id;
  46155. }
  46156. function getRuntimeMarkDecl(blockPath) {
  46157. var block = blockPath.node;
  46158. _assert2.default.ok(Array.isArray(block.body));
  46159. var info = getMarkInfo(block);
  46160. if (info.decl) {
  46161. return info.decl;
  46162. }
  46163. info.decl = t.variableDeclaration("var", [t.variableDeclarator(blockPath.scope.generateUidIdentifier("marked"), t.callExpression(t.memberExpression(t.arrayExpression([]), t.identifier("map"), false), [util.runtimeProperty("mark")]))]);
  46164. blockPath.unshiftContainer("body", info.decl);
  46165. return info.decl;
  46166. }
  46167. function renameArguments(funcPath, argsId) {
  46168. var state = {
  46169. didRenameArguments: false,
  46170. argsId: argsId
  46171. };
  46172. funcPath.traverse(argumentsVisitor, state);
  46173. // If the traversal replaced any arguments references, then we need to
  46174. // alias the outer function's arguments binding (be it the implicit
  46175. // arguments object or some other parameter or variable) to the variable
  46176. // named by argsId.
  46177. return state.didRenameArguments;
  46178. }
  46179. var argumentsVisitor = {
  46180. "FunctionExpression|FunctionDeclaration": function FunctionExpressionFunctionDeclaration(path) {
  46181. path.skip();
  46182. },
  46183. Identifier: function Identifier(path, state) {
  46184. if (path.node.name === "arguments" && util.isReference(path)) {
  46185. path.replaceWith(state.argsId);
  46186. state.didRenameArguments = true;
  46187. }
  46188. }
  46189. };
  46190. var functionSentVisitor = {
  46191. MetaProperty: function MetaProperty(path) {
  46192. var node = path.node;
  46193. if (node.meta.name === "function" && node.property.name === "sent") {
  46194. path.replaceWith(t.memberExpression(this.context, t.identifier("_sent")));
  46195. }
  46196. }
  46197. };
  46198. var awaitVisitor = {
  46199. Function: function Function(path) {
  46200. path.skip(); // Don't descend into nested function scopes.
  46201. },
  46202. AwaitExpression: function AwaitExpression(path) {
  46203. // Convert await expressions to yield expressions.
  46204. var argument = path.node.argument;
  46205. // Transforming `await x` to `yield regeneratorRuntime.awrap(x)`
  46206. // causes the argument to be wrapped in such a way that the runtime
  46207. // can distinguish between awaited and merely yielded values.
  46208. path.replaceWith(t.yieldExpression(t.callExpression(util.runtimeProperty("awrap"), [argument]), false));
  46209. }
  46210. };
  46211. });
  46212. $__System.registerDynamic("244", ["243"], true, function ($__require, exports, module) {
  46213. "use strict";
  46214. var global = this || self,
  46215. GLOBAL = global;
  46216. exports.__esModule = true;
  46217. exports.default = function () {
  46218. return $__require("243");
  46219. };
  46220. });
  46221. $__System.registerDynamic("245", ["244"], true, function ($__require, exports, module) {
  46222. "use strict";
  46223. var global = this || self,
  46224. GLOBAL = global;
  46225. module.exports = $__require("244");
  46226. });
  46227. $__System.register('a', ['d9', 'ec', 'da', 'dc', 'de', 'e3', 'e4', 'ed', '103', '104', '105', '106', '107', '108', '118', '119', '11a', '11b', '11c', '11d', '12a', '12b', '12c', '131', '132', '1a0', '245'], function (_export, _context) {
  46228. "use strict";
  46229. var babel, dynamicImportSyntax, modulesRegisterPlugin, externalHelpersPlugin, runtimeTransformPlugin, p1, p2, p3, pReact, templateLiterals, literals, functionName, arrowFunctions, blockScopedFunctions, classes, objectSuper, shorthandProperties, computedProperties, forOf, stickyRegex, unicodeRegex, constants, spread, parameters, destructuring, blockScoping, regenerator, modulesRegister, externalHelpers, runtimeTransform, pluginsStage1, pluginsStage2, pluginsStage3, pluginsReact, es2015Plugins, regeneratorPlugin, presetES2015, presetES2015Register;
  46230. return {
  46231. setters: [function (_d) {
  46232. babel = _d.default;
  46233. }, function (_ec) {
  46234. dynamicImportSyntax = _ec.default;
  46235. }, function (_da) {
  46236. modulesRegisterPlugin = _da.default;
  46237. }, function (_dc) {
  46238. externalHelpersPlugin = _dc.default;
  46239. }, function (_de) {
  46240. runtimeTransformPlugin = _de.default;
  46241. }, function (_e) {
  46242. p1 = _e.default;
  46243. }, function (_e2) {
  46244. p2 = _e2.default;
  46245. }, function (_ed) {
  46246. p3 = _ed.default;
  46247. }, function (_) {
  46248. pReact = _.default;
  46249. }, function (_2) {
  46250. templateLiterals = _2.default;
  46251. }, function (_3) {
  46252. literals = _3.default;
  46253. }, function (_4) {
  46254. functionName = _4.default;
  46255. }, function (_5) {
  46256. arrowFunctions = _5.default;
  46257. }, function (_6) {
  46258. blockScopedFunctions = _6.default;
  46259. }, function (_7) {
  46260. classes = _7.default;
  46261. }, function (_8) {
  46262. objectSuper = _8.default;
  46263. }, function (_a) {
  46264. shorthandProperties = _a.default;
  46265. }, function (_b) {
  46266. computedProperties = _b.default;
  46267. }, function (_c) {
  46268. forOf = _c.default;
  46269. }, function (_d2) {
  46270. stickyRegex = _d2.default;
  46271. }, function (_a2) {
  46272. unicodeRegex = _a2.default;
  46273. }, function (_b2) {
  46274. constants = _b2.default;
  46275. }, function (_c2) {
  46276. spread = _c2.default;
  46277. }, function (_9) {
  46278. parameters = _9.default;
  46279. }, function (_10) {
  46280. destructuring = _10.default;
  46281. }, function (_a3) {
  46282. blockScoping = _a3.default;
  46283. }, function (_11) {
  46284. regenerator = _11.default;
  46285. }],
  46286. execute: function () {
  46287. _export('babel', babel);
  46288. _export('modulesRegister', modulesRegister = {
  46289. plugins: [dynamicImportSyntax, modulesRegisterPlugin]
  46290. });
  46291. _export('modulesRegister', modulesRegister);
  46292. _export('externalHelpers', externalHelpers = {
  46293. plugins: [externalHelpersPlugin]
  46294. });
  46295. _export('externalHelpers', externalHelpers);
  46296. _export('runtimeTransform', runtimeTransform = {
  46297. plugins: [[runtimeTransformPlugin, { polyfill: false }]]
  46298. });
  46299. _export('runtimeTransform', runtimeTransform);
  46300. _export('pluginsStage1', pluginsStage1 = p1.plugins);
  46301. _export('pluginsStage2', pluginsStage2 = p2.plugins);
  46302. _export('pluginsStage3', pluginsStage3 = p3.plugins);
  46303. _export('pluginsReact', pluginsReact = pReact.plugins);
  46304. _export('pluginsStage1', pluginsStage1);
  46305. _export('pluginsStage2', pluginsStage2);
  46306. _export('pluginsStage3', pluginsStage3);
  46307. _export('pluginsReact', pluginsReact);
  46308. es2015Plugins = [templateLiterals, literals, functionName, arrowFunctions, blockScopedFunctions, classes, objectSuper, shorthandProperties, computedProperties, forOf, stickyRegex, unicodeRegex, constants, spread, parameters, destructuring, blockScoping];
  46309. regeneratorPlugin = [regenerator, { async: false, asyncGenerators: false }];
  46310. _export('presetES2015', presetES2015 = {
  46311. plugins: [dynamicImportSyntax].concat(es2015Plugins, [regeneratorPlugin])
  46312. });
  46313. _export('presetES2015', presetES2015);
  46314. _export('presetES2015Register', presetES2015Register = {
  46315. plugins: [dynamicImportSyntax].concat(es2015Plugins, [modulesRegisterPlugin, regeneratorPlugin])
  46316. });
  46317. _export('presetES2015Register', presetES2015Register);
  46318. }
  46319. };
  46320. });
  46321. })
  46322. (function(factory) {
  46323. define([], factory);
  46324. });